WO2022236758A1 - 数据编码方法和设备 - Google Patents

数据编码方法和设备 Download PDF

Info

Publication number
WO2022236758A1
WO2022236758A1 PCT/CN2021/093515 CN2021093515W WO2022236758A1 WO 2022236758 A1 WO2022236758 A1 WO 2022236758A1 CN 2021093515 W CN2021093515 W CN 2021093515W WO 2022236758 A1 WO2022236758 A1 WO 2022236758A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
channel
image data
auxiliary
encoded
Prior art date
Application number
PCT/CN2021/093515
Other languages
English (en)
French (fr)
Inventor
马宁
苏文艺
陈颖
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2021/093515 priority Critical patent/WO2022236758A1/zh
Publication of WO2022236758A1 publication Critical patent/WO2022236758A1/zh

Links

Images

Classifications

    • 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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests

Definitions

  • the present application relates to the field of communication technologies, and in particular to a data encoding method and device.
  • the embodiment of the present application provides a data encoding method and device, aiming to provide a solution that can not only ensure the transmission quality of the main channel image data, but also ensure the smoothness of the code stream when the main channel image is switched, especially in data transmission. It works better when the channel capacity of the system fluctuates.
  • the present application provides a data encoding method, the method is applied to the sending end, and the method includes:
  • At least one channel of main channel coded data and at least one channel of auxiliary channel coded data are transmitted simultaneously, and the channel remaining capacity is determined according to the real-time capacity of the channel and the data volume of at least one channel of main channel coded data.
  • the present application provides a sending end, including: a memory and a processor; the memory is used to store instructions executable by the processor; wherein the processor is configured to execute:
  • At least one channel of main channel coded data and at least one channel of auxiliary channel coded data are transmitted simultaneously, and the remaining capacity of the channel is determined according to the real-time capacity of the channel and the data volume of at least one channel of main channel coded data.
  • the present application provides a data transmission system, including: at least one sending end and a receiving end involved in the second aspect, wherein the receiving end is configured to receive data sent by the sending end.
  • the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the data encoding involved in the first aspect and alternative solutions method.
  • the embodiment of the present application provides a data encoding method and device, adopts an adaptive code stream allocation mechanism, controls the data volume of the encoded data of the main channel to be smaller than the channel capacity, and gives priority to ensuring that the code stream of the main channel meets the requirements of quality and smoothness. It is required to control the frame rate of the encoding process of auxiliary channel image data according to the remaining capacity of the channel, and ensure the quality of each frame of auxiliary channel encoded data, so as to realize the full utilization of remaining channel resources.
  • the auxiliary channel encoded data before switching is already being transmitted, there is no need for the sender to rewrite and send I frames during the switching process, which can ensure the switching speed. Since the main channel image data after switching needs to be based on The auxiliary channel coded data before switching is displayed and processed, and by controlling the quality of the auxiliary channel encoded data in each frame, the image quality of the main channel after switching can be guaranteed.
  • FIG. 1 is a schematic structural diagram of an image transmission system in an unmanned aerial vehicle system provided by another embodiment of the present application;
  • FIG. 2 is a schematic structural diagram of a multi-camera camera system provided by another embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a data encoding method provided by another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a data encoding method provided in another embodiment of the present application.
  • FIG. 5 is a schematic diagram of the principle of encoding auxiliary road image data in a serial manner provided by another embodiment of the present application.
  • FIG. 6 is a schematic diagram of the principle of encoding auxiliary road image data in a serial manner provided by another embodiment of the present application.
  • FIG. 7A is a schematic diagram of the principle of encoding auxiliary road image data in a parallel manner provided by another embodiment of the present application.
  • FIG. 7B is a schematic diagram of the principle of encoding auxiliary road image data in a parallel manner provided by another embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a data encoding device provided by another embodiment of the present application.
  • the currently widely used video coding standards in the industry including H.263, H.264, H.265, MPEG4, etc., provide two types of frame types.
  • the first frame type is an I frame.
  • the feature of the I frame is that all image blocks adopt a predictive compression method that does not depend on any other frame information. Since there is no reference to temporal correlation for prediction, the compression ratio is low, and the code rate of the frame after encoding is relatively high. And because there is no reference to other frames, as long as the receiving end receives the I frame correctly, it can recover the erroneous frame data.
  • the second type of frame is a P frame or a B frame.
  • the feature of these two frames is that the image block selection adopts a predictive compression method that depends on other frame information. Since the time correlation is used for prediction, the compression rate is relatively high, and the code rate of the frame after encoding is relatively low. And because of relying on and referring to other frames, even if the receiving end receives the frame correctly, if there is an error in the transmission of the previous frame, the error cannot be recovered.
  • the main reason for the above problems is that the latest transmitted image data has not transmitted a reference frame before, and usually only I frames can be transmitted, and the I frame has a large bit rate and a long transmission time, so it is prone to image freezes, blurs, and switching speeds slow problem. Therefore, in order to ensure that there will not be a large delay when the image data of the main and auxiliary channels are switched, and that the image quality will not be reduced at the moment of switching, the method of transmitting multiple channels of image data can be used at the same time.
  • the encoding rate of the main and auxiliary image data is determined according to the preset ratio and system channel capacity.
  • the code rate of the image data of the main road is high, and the code rate of the image data of the auxiliary road is low.
  • the encoded data of the main and auxiliary road image data is simultaneously transmitted.
  • the image data of the main road is displayed, and the image data of the auxiliary road is not displayed.
  • the switched main road image data is displayed, and the switched auxiliary road image data is not displayed.
  • the channel capacity fluctuates greatly, and using a fixed ratio to allocate the encoding rate of the image data of the main and auxiliary channels will make the transmission effect of the image data of the main and auxiliary channels worse.
  • the channel capacity is already very small, and a certain amount of resources must be allocated to transmit the image data of the auxiliary channel, which will cause the quality of the image data of the main channel to be even worse.
  • this application provides a data encoding method and device.
  • a scheme for encoding main and auxiliary road image data in an adaptive manner Through the self-adaptive coding rate allocation mechanism, the main channel code stream obtained after encoding the main channel image data is guaranteed to meet the quality and fluency requirements, and the auxiliary channel image data is encoded by variable frame rate control, making full use of the remaining bandwidth to Transmit the auxiliary channel code stream, and control the encoding quality of each frame of auxiliary channel image data, realize the full utilization of resources, and also ensure the quality of the main channel code stream and the switching rate of the main and auxiliary image data switching display.
  • An embodiment of the present application provides a data transmission system, and the data transmission system includes at least one sending end and one receiving end. Each sending end is used to send one or more channels of encoded image data to the receiving end. After receiving the multiple channels of encoded image data, the receiving end selects at least one channel from the multi-channel encoded image data to display, here , the image data to be displayed is called main road image data, and the image data that does not need to be displayed is called auxiliary road image data.
  • the sending end and the receiving end of the data transmission system can implement the data encoding method described in the following embodiments, so that when the data transmission system is used for image transmission, the quality of the main channel image data can also be guaranteed.
  • the smoothness of the code stream when switching with the auxiliary channel image data can be implemented.
  • the image transmission system in the UAV system includes multiple image sensors, a sending end and a receiving end.
  • a plurality of image sensors and a sending end are mounted on the UAV 01, and a receiving end is mounted on the controller 02, and the UAV 01 communicates with the receiving end of the controller 02 through the sending end.
  • Each image sensor collects one channel of image data. After multiple image sensors collect multiple channels of image data, they are encoded by the sending end and transmitted to the receiving end of the controller 02.
  • the receiving end of the controller 02 receives multiple channels of coded image data, decodes the image data to be displayed, and then displays it.
  • the multi-camera camera system includes multiple cameras 03 and a control device 04 .
  • Each camera 03 is located at a different position, each camera 03 is provided with a sending end, and the control device 04 is provided with a receiving end.
  • Each camera 03 is used to collect one channel of image data, and send it to the control device 04 through the sending end in the camera 03 .
  • the control device 04 may select one or more channels from the received multiple channels of image data as the main channel of image data for display.
  • Both the image transmission system and the multi-camera system in the UAV system can implement the data encoding described in the following embodiments to ensure the quality of the main road image data, and also ensure the smooth flow of the main and auxiliary road image data when switching sex.
  • the sending end acquires the real-time capacity of the channel, at least one path of main road image data, and at least one path of auxiliary road image data.
  • a channel refers to a channel for data transmission between the sending end and the receiving end.
  • a channel refers to a channel shared by each sending end to transmit data with the receiving end.
  • the capacity of the data transmission channel between the sending end and the receiving end changes in real time with factors such as distance and signal strength.
  • the channel capacity at the previous moment may be obtained first, and then the channel capacity at the current moment may be predicted according to the channel capacity at the previous moment.
  • the prediction may also be made in conjunction with the amount of change in distance between the sending end and the receiving end.
  • the sending end receives multiple image data collected by multiple image sensors.
  • the image data that needs to be displayed at the receiving end is called the main road image data
  • the image data that is not displayed at the receiving end is called the auxiliary road image data.
  • the sending end encodes at least one channel of main channel image data to obtain at least one channel of encoded data of the main channel.
  • the data volume of the encoded data of one channel of the main channel obtained by encoding is smaller than the real-time capacity of the channel. If there are multiple channels of image data, the total data volume of the multiple channels of main encoded data obtained by encoding is smaller than the real-time capacity of the channel.
  • M represents the channel capacity
  • N represents the data volume of the main channel coded data.
  • each channel of main channel image data may be encoded with a preset code rate.
  • code rate allocation When performing code rate allocation, set the code rate according to the requirements of the main channel image data, for example: for the main channel image data with high quality requirements, let the code rate be higher.
  • the code rate can also be set according to the priority of image data of each main channel. For example: Make the bit rate of the main road image data with high priority higher.
  • the data volume of at least one channel of the encoded data of the main channel can be greater than ⁇ times the real-time capacity of the channel, and ⁇ is less than 1, for example: ⁇ can be between 0.7 and 0.9 Value to ensure that the main channel coded data uses most of the channel capacity.
  • the sending end performs variable frame rate encoding on at least one auxiliary channel image data according to preset quality requirements and channel remaining capacity, to obtain at least one auxiliary channel encoded data.
  • the remaining capacity of the channel is determined according to the real-time capacity of the channel and the data volume of the coded data of at least one main channel.
  • the channel remaining capacity is the difference between the real-time capacity of the channel and the data volume of one channel of encoded data of the main channel.
  • the remaining capacity of the channel is the difference between the real-time capacity of the channel and the total data volume of the encoded data of the multiple channels of main channels.
  • each sending end encodes image data of one auxiliary path
  • the quality of each frame of image data after encoding is guaranteed.
  • each sender adopts variable frame rate control for the encoding process according to the allocated remaining capacity of the channel, so as to ensure that the obtained secondary channel encoded data can meet the allocated remaining capacity requirement.
  • the preset quality requirements can be determined according to actual needs, for example: to ensure that the signal-to-noise ratio of the obtained sub-path coded data of each frame is greater than a certain preset threshold, and to ensure that the data volume of each frame of sub-path coded data obtained is greater than a predetermined threshold.
  • a certain preset threshold For example: to ensure that the signal-to-noise ratio of the obtained sub-path coded data of each frame is greater than a certain preset threshold, and to ensure that the data volume of each frame of sub-path coded data obtained is greater than a predetermined threshold.
  • Set the threshold There is no limit here.
  • a time-sharing transmission method or a frequency-division transmission method may be used, which is not limited here.
  • the coding rate of the main road image data may be controlled according to the reconstruction rate of the auxiliary road image data, that is, the data volume of the main road coded data may be controlled according to the reconstruction rate of the auxiliary road image data. If the reconstruction rate is high, the encoding rate of the main channel image data can be appropriately reduced, that is, the data volume of the main channel encoded data can be reduced.
  • an embodiment of the present application provides a data encoding method, which is applied to the above-mentioned data transmission system, and the method includes the following steps:
  • the sending end acquires the real-time capacity of the channel, at least one path of main road image data, and at least one path of auxiliary road image data.
  • the average value of the channel capacity in the current time period can be obtained according to the average value of the channel capacity in the previous time period, so as to improve the accuracy of the predicted channel capacity , and then according to the average value of the channel capacity, the encoding control of the main and auxiliary channel image data is performed to ensure the data transmission effect and the smoothness of switching.
  • the sending end encodes at least one channel of main channel image data to obtain at least one channel of main channel encoded data.
  • encoding control can be performed on the main channel image data within a period of time to improve the effect of data transmission.
  • Encoding at least one channel of main channel image data within a preset time period to obtain at least one channel of main channel encoded data within a preset time period.
  • the pre-set coding rate can also be used to encode the main channel image data to ensure that the sum of the average data volume of each main channel encoded data is less than the real-time capacity of the channel average value.
  • the sending end performs variable frame rate encoding on at least one auxiliary channel image data according to preset quality requirements and channel remaining capacity, to obtain at least one auxiliary channel encoded data.
  • each sender is provided with a buffer area, and the setting of the buffer area in each sender is determined according to the priority of each sender or the data transmission requirements of each sender. Capacity, and ensure that the total capacity of buffers at all senders matches the remaining capacity of the channel.
  • the polling order may be determined according to the priority of the image data of each auxiliary road, and the order with higher priority is earlier, and the order with lower priority is later.
  • the polling sequence can also be determined according to the discarding of the last frame of data. If the last frame of image data of a certain auxiliary road is lost, the image data will be polled preferentially during this rotation. That is, the polling sequence obtained by means of the polling sequence determined according to the loss of the last frame of data changes in real time.
  • auxiliary road image data 001 to auxiliary road image data 004 there are 4 channels of auxiliary road image data, which are marked as auxiliary road image data 001 to auxiliary road image data 004 in sequence.
  • t0 represents the current moment
  • t1 represents the next moment.
  • the polling order is auxiliary road image data 001 to auxiliary road image data 004 .
  • Two buffer units 11 are set according to the remaining capacity of the channel.
  • the preset quality requirement includes that the obtained data volume of one frame of auxiliary channel coded data is greater than a second data volume threshold. That is, the current frame data of the currently processed road image data is encoded to obtain a frame of coded data of the road, ensuring that the data volume of the coded data of one frame of road obtained is greater than the second data volume threshold.
  • the second data volume threshold is determined according to the resolution of the auxiliary road image data. The higher the resolution of the auxiliary channel image data is, the larger the second data amount threshold is, thereby ensuring the encoding quality of the high-resolution image data.
  • the preset quality requirement includes that the obtained signal-to-noise ratio of one frame of auxiliary channel coded data is greater than a minimum signal-to-noise ratio threshold. That is to encode the current frame data of the currently processed one-way auxiliary road image data to obtain one frame of auxiliary-road coded data, and ensure that the signal-to-noise ratio of the obtained one-frame auxiliary-road coded data is greater than the minimum signal-to-noise ratio threshold.
  • each sender is allocated channel remaining Capacity, and set the buffer area according to the remaining capacity of the allocated channel.
  • each sending end is used to send one channel of image data.
  • the one channel of image data sent by the sending end 0005 is the main channel image data
  • the image data sent by the sending end 0001 to the sending end 0004 is the auxiliary channel image data.
  • the sending end 0001 and the sending end 0004 are provided with two buffer units
  • the sending end 0002 and the sending end 0003 are provided with one buffer unit.
  • the encoded auxiliary path image data buffered in the buffer meeting the preset frame skipping condition specifically includes: the data volume of the encoded auxiliary path image data buffered in the buffer of the sending end is greater than or equal to the channel remaining capacity allocated by the sending end.
  • the coded auxiliary channel image data buffered in the buffer area of the sending end does not meet the preset frame skipping condition specifically includes: the data volume of the encoded auxiliary channel image data buffered in the buffer area of the sending end is less than the channel remaining capacity allocated by the sending end.
  • the sending end 0001 encodes the auxiliary channel image data
  • the two buffer units 11 of the sending end 0001 are in an idle state, which does not meet the frame skipping condition, and enters S2004.
  • one cache unit 11 of the sending end 0002 is in an idle state, which does not meet the frame skipping condition, and enters S2004.
  • the buffer unit 11 of the sending end 0003 has already buffered the data, but the sending end 0003 has no buffer unit to continue buffering the data, which meets the frame skipping condition and enters S2003.
  • the buffer area can no longer cache the image data
  • the current frame data of the auxiliary road image data is no longer encoded
  • the current frame data of the auxiliary road image data is directly discarded for encoding.
  • the preset quality requirement includes that the obtained data volume of one frame of auxiliary channel coded data is greater than a second data volume threshold. That is, encoding the current frame data of the auxiliary road image data to obtain a frame of auxiliary road encoded data ensures that the data volume of the obtained one frame of auxiliary road encoded data is greater than the second data volume threshold.
  • the second data volume threshold is determined according to the resolution of the auxiliary road image data. The higher the resolution of the auxiliary channel image data is, the larger the second data amount threshold is, thereby ensuring the encoding quality of the high-resolution image data.
  • the preset quality requirement includes that the obtained signal-to-noise ratio of one frame of auxiliary channel coded data is greater than a minimum signal-to-noise ratio threshold. That is, the current frame data of the auxiliary road image data is encoded to obtain a frame of auxiliary road coded data, and the signal-to-noise ratio of the obtained frame of auxiliary road coded data is guaranteed to be greater than the minimum signal-to-noise ratio threshold.
  • the encoded auxiliary road image data cached in the buffer area meets the preset frame skipping condition specifically includes: the data volume of the encoded auxiliary road image data buffered in the buffer area is greater than or equal to the channel remaining capacity.
  • the coded auxiliary road image data buffered in the buffer area does not meet the preset frame skipping condition specifically includes: the data volume of the encoded auxiliary road image data buffered in the buffer area is less than the remaining capacity of the channel.
  • auxiliary channel image data there are 4 channels of auxiliary channel image data, which are sequentially marked as auxiliary channel image data 001 to auxiliary channel image data 004 , and four buffer units 11 are configured in the sending end according to the remaining capacity of the channel.
  • the coded data is buffered in all the four buffer units and the frame skipping condition is met, go to S3003.
  • FIG. 7B when there is an idle buffer unit among the 4 buffer units, the frame skipping condition is not satisfied, and S3004 is entered.
  • the buffer area can no longer buffer the image data
  • the current frame data is no longer encoded
  • the current frame data of all auxiliary channel image data are directly discarded.
  • the preset quality requirement includes that the obtained data volume of one frame of auxiliary channel coded data is greater than a second data volume threshold.
  • encode the current frame data of the auxiliary road image data to obtain a frame of auxiliary road encoded data, and ensure that the data volume of the obtained one frame of auxiliary road encoded data is greater than the second data volume threshold.
  • the second data volume threshold is determined according to the resolution of the auxiliary road image data. The higher the resolution of the auxiliary channel image data is, the larger the second data amount threshold is, thereby ensuring the encoding quality of the high-resolution image data.
  • the preset quality requirement includes that the signal-to-noise ratio obtained after reconstruction of one frame of auxiliary channel coded data is greater than a minimum signal-to-noise ratio threshold.
  • a minimum signal-to-noise ratio threshold For each auxiliary channel image data, encode the current frame data of the auxiliary channel image data to obtain a frame of auxiliary channel encoded data, and ensure that the signal-to-noise ratio after reconstruction of the obtained one frame of auxiliary channel encoded data is greater than the minimum signal-to-noise ratio threshold.
  • the minimum signal-to-noise ratio threshold may be determined according to actual requirements.
  • the encoded data of the current frame data of all auxiliary road image data is cached in the buffer Area.
  • the encoding quality requirements of each frame of the auxiliary channel coded data are guaranteed by changing the frame rate. Under the current frame rate, the remaining capacity of the channel occupied by the main channel coded data can be filled, the channel utilization rate can be improved, and the data auxiliary channel can also be guaranteed. Improve the transmission quality of image data, thereby increasing the switching rate of main and auxiliary channels.
  • the sending end simultaneously sends at least one path of encoded data of the main path and at least one path of encoded data of the auxiliary path to the receiving end.
  • the sending end simultaneously sends at least one path of encoded data of the main path and at least one path of encoded data of the auxiliary path to the receiving end.
  • At least one channel of encoded data of the main channel and at least one channel of encoded data of the auxiliary channel are transmitted in a frequency division transmission manner.
  • At least one channel of main channel image data and at least one channel of auxiliary channel image data are transmitted in a time-division transmission manner; wherein, during time-division transmission, the priority of the encoded data of the main channel is higher than that of the encoded data of the auxiliary channel. That is to say, after the wireless channel sends the coded data of the main channel, it sends the coded data of the auxiliary channel.
  • the receiving end decodes at least one channel of encoded data of the main channel and at least one channel of encoded data of the auxiliary channel, and displays the image data of the main channel.
  • the receiving end decodes at least one main road encoded data and at least one auxiliary road encoded data, and displays the main road image data, but does not display the auxiliary road image data.
  • the average value of the capacity of the channel within the preset time period is obtained to improve the accuracy of the prediction result of the channel capacity, and then the image data of the main and auxiliary roads is encoded and controlled based on the average value of the channel capacity to improve data transmission. Effect.
  • the encoded data of the main channel When encoding the image data of the main channel, ensure that the encoded data is smaller than the channel capacity to ensure the transmission effect of the image data of the main channel, and then encode the image data of the auxiliary channel based on the frame skipping strategy, and ensure that the encoded data of each frame of image data is Quality, so that the encoded data of the auxiliary channel can meet the remaining capacity, and control the quality of the encoded data of the auxiliary channel, so that when the image data of the main and auxiliary channels is switched, it can be quickly decoded according to the transmitted image data of the auxiliary channel, and the image data of the main channel after switching can be displayed , to ensure the smoothness of the code stream when the image data of the main and auxiliary channels is switched.
  • an embodiment of the present application provides a sending end 400, including: a memory 401 and a processor 402; the memory 401 is used to store instructions executable by the processor 402; wherein, the processor 402 is configured to execute:
  • At least one channel of main channel coded data and at least one channel of auxiliary channel coded data are transmitted simultaneously, and the channel remaining capacity is determined according to the real-time capacity of the channel and the data volume of at least one channel of main channel coded data.
  • the processor 402 is configured to execute:
  • the sum of the average values of the data volumes of the coded data of each main path is smaller than the average value of the real-time capacity of the channel.
  • the average value of the data volume of each main channel of encoded data is greater than the first data volume threshold.
  • the sending end is provided with a cache area; the processor 402 is configured to execute:
  • the current frame data of the auxiliary road image data is discarded.
  • the processor 402 is configured to execute: when the encoded auxiliary road image data cached in the buffer area does not meet the preset frame skipping condition, encode the current frame data of the auxiliary road image data according to the preset quality requirement , to obtain the coded data of the auxiliary road.
  • the encoded auxiliary road image data cached in the buffer area meets the preset frame skipping conditions, including:
  • the data volume of the encoded auxiliary road image data buffered in the buffer area is greater than or equal to the remaining capacity of the channel; and/or,
  • the data volume of the encoded auxiliary road image data buffered in the buffer area is less than the remaining capacity of the channel.
  • the processor 402 is configured to execute:
  • the second data amount threshold is determined according to the resolution of the auxiliary road image data.
  • the processor 402 is configured to execute:
  • the processor 402 is configured to execute:
  • the sending end further includes: a sender, and the sender is configured to execute:

Landscapes

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

Abstract

本申请实施例提供一种数据编码方法和设备,方法应用于发送端,方法包括:获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据,对至少一路主路图像数据进行编码获得至少一路主路编码数据,其中,至少一路主路编码数据的数据量小于信道实时容量,根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码获得至少一路辅路编码数据,其中,至少一路主路编码数据和至少一路辅路编码数据是同时传输的,信道剩余容量是根据信道实时容量和至少一路主路编码数据的数据量确定的。本申请既能保证主路图像数据的传输质量,也能保证主辅路图像切换时码流的流畅性,尤其是在数据传输系统的信道容量出现抖动时效果更佳。

Description

数据编码方法和设备 技术领域
本申请涉及通信技术领域,尤其涉及一种数据编码方法和设备。
背景技术
在数据传输系统中传输多路图像数据时,例如:传输M路图像数据,M为大于1的正整数,仅有其中几路图像数据被显示,称之为主路图像数据,例如:有N路主路图像数据,N为正整数,且N小于M,不显示的图像数据称之为辅路图像数据。主辅路图像数据可以相互切换。
在对主路图像数据和辅路图数据进行传输时,既要保证主路图像数据在传输过程中的质量,也要保证在主辅路图像切换时码流的流畅性。
发明内容
本申请实施例提供一种数据编码方法和设备,旨在提供一种既能保证主路图像数据的传输质量,也能保证主辅路图像切换时码流的流畅性的方案,尤其是在数据传输系统的信道容量出现抖动时效果更佳。
第一方面,本申请提供一种数据编码方法,方法应用于发送端,方法包括:
获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据;
对至少一路主路图像数据进行编码,获得至少一路主路编码数据;其中,至少一路主路编码数据的数据量小于信道实时容量;
根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据;
其中,至少一路主路编码数据和至少一路辅路编码数据是同时传输的,信道剩余容量是根据信道实时容量和至少一路主路编码数据的数据量确定的。
第二方面,本申请提供一种发送端,包括:存储器和处理器;存储器用于存储处理器可执行指令;其中,处理器被配置为执行:
获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据;
对至少一路主路图像数据进行编码,获得至少一路主路编码数据;其中,至少一路主路编码数据的数据量小于信道实时容量;
根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据;
其中,至少一路主路编码数据和至少一路辅路编码数据是同时传输的,信道剩余容量 是根据信道实时容量和至少一路主路编码数据的数据量确定的。
第三方面,本申请提供一种数据传输系统,包括:至少一个第二方面所涉及的发送端和接收端,其中,接收端用于接收发送端发送的数据。
第四方面,本申请提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现第一方面及可选方案所涉及的数据编码方法。
综上所述,本申请实施例提供数据编码方法和设备,采用自适应的码流分配机制,通过控制主路编码数据的数据量小于信道容量,并优先保证主路码流符合质量和流畅的要求,根据信道剩余容量对辅路图像数据的编码过程进行变帧率控制,并保证每帧辅路编码数据的质量,实现剩余信道资源的充分利用。在主辅路图像数据切换过程中,由于切换前的辅路编码数据已经在传输,切换过程中不需要发送端重新编写并发送I帧,可以保证切换的速度,由于切换后的主路图像数据需要基于切换前的辅路编码数据进行显示处理,通过控制每帧辅路编码数据的质量,可以保证切换后的主路图像质量。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请另一实施例提供的无人机系统中图传系统的结构示意图;
图2为本申请另一实施例提供的多机位摄像系统的结构示意图;
图3为本申请另一实施例提供的数据编码方法的流程示意图;
图4为本申请另一实施例提供的数据编码方法的流程示意图;
图5为本申请另一实施例提供的以串行方式对辅路图像数据进行编码的原理示意图;
图6为本申请另一实施例提供的以串行方式对辅路图像数据进行编码的原理示意图;
图7A为本申请另一实施例提供的以并行方式对辅路图像数据进行编码的原理示意图;
图7B为本申请另一实施例提供的以并行方式对辅路图像数据进行编码的原理示意图;
图8为本申请另一实施例提供的数据编码设备的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
目前业界广泛使用的视频编码标准,包括H.263,H.264,H.265,MPEG4等等,都提供了两类帧类型。
第一种帧类型为I帧。I帧的特征是所有的图像分块采用不依赖于其他任何帧信息的预测压缩方式。由于没有参考时间相关性进行预测,压缩率较低,编码后该帧的码率较高。又因为不参考其他帧,接收端只要正确接收到I帧,即可恢复出错的帧数据。
第二种帧类型为P帧或者B帧,这两种帧的特征是图像分块选择采用依赖于其他帧信息的预测压缩方式。由于参考了时间相关性进行预测,压缩率较高,编码后该帧的码率较低。又因为依赖和参考其他帧,即使接收端正确接收该帧,如果之前帧传输时出现错误,错误也不能被恢复。
在数据传输系统中传输多路图像数据时,例如:传输M路图像数据,M为大于1的正整数,仅有其中几路图像数据被显示,称之为主路图像数据,例如:有N路主路图像数据,N为正整数,且N小于M,不显示的图像数据称之为辅路图像数据。主辅路图像数据可以相互切换。
通常情况下,由于数据传输系统的信道容量受限,又需要保证低延迟,通常仅会传输需要显示的图像数据。若使用过程中,用户选择了显示之前没有传输的图像数据,在切换的过程中可能会出现图像的卡顿、模糊、切换速度慢等问题。
出现上述问题的主要原因是最新传输的图像数据之前没有传输参考帧,通常只能传输I帧,而I帧的码率较大,传输时间较长,因此容易出现图像卡顿、模糊以及切换速度慢的问题。因此,为了保证主辅路图像数据切换时不会出现较大的延迟,以及保证切换瞬间的画质不会下降,可以同时使用传输多路图像数据方法。在传输多路图像数据时,主辅图像数据的编码率根据预先设置的比例和系统信道容量确定。一般主路图像数据的码率高,辅路图像数据的码率低。在完成主辅路图像数据编码后,同时传输主辅路图像数据的编码数据。在主辅图像数据切换之前,显示主路图像数据,不显示辅路图像数据。在主辅图像数据切换时,显示切换后的主路图像数据,不显示切换后的辅路图像数据。
在上述技术方案中,使用固定比例方式为主辅路图像数据分配码率,而数字编码存在编码率不好控制的问题,使得主辅路图像数据在编码后的实际编码率与设定的编码率有误 差,造成得到的编码后的数据会偏大或者偏小。若编码数据的数据量偏小,则没有充分利用信道容量。若编码数据的数据量偏大,则会造成图像传输卡顿。
尤其在无线传输环境下,信道容量抖动较大,而使用固定比例分配主辅路图像数据的编码率会使主辅路图像数据的传输效果更差。比如,信道容量已经很小,还要分出一定资源传输辅路图像数据,会造成主路图像数据的质量更差。
为了解决采用固定比例方式为主辅路图像数据分配编码率带来的问题,本申请提供一种数据编码方法和设备,相较于以固定比例方式为主辅路图像数据分配编码率,本申请提出一种自适应方式对主辅路图像数据进行编码的方案。通过自适应的编码率分配机制,优先保证对主路图像数据进行编码后得到的主路码流符合质量和流畅性的要求,采用变帧率控制对辅路图像数据进行编码,充分利用剩余带宽来传输辅路码流,并控制对每帧辅路图像数据的编码质量,实现资源的充分利用,也保证了主路码流的质量和主辅图像数据切换显示的切换速率。
本申请实施例提供一种数据传输系统,该数据传输系统包括至少一个发送端和一个接收端。每个发送端用于向接收端发送一路或多路编码后的图像数据,接收端在接收到多路编码后的图像数据后,从多路编码后的图像数据中选择至少一路显示,此处,将要显示的图像数据称为主路图像数据,将不需要显示的图像数据称为辅路图像数据。
数据传输系统的发送端和接收端可执行如下实施例所描述的数据编码方法,以实现在使用数据传输系统进行图像传输时,既能保证主路图像数据的质量,也能保证主路图像数据和辅路图像数据切换时码流的流畅性。
下面分别以无人机系统中图传系统和多机位摄像系统为例描述本申请实施例提供的数据传输系统的应用场景。
如图1所示,无人机系统中图传系统包括多个图像传感器、一个发送端和一个接收端。多个图像传感器和一个发送端搭载在无人机01上,一个接收端搭载在控制器02上,无人机01通过发送端和控制器02的接收端之间相互通信。每个图像传感器采集一路图像数据,多个图像传感器在采集到多路图像数据后,通过发送端编码后传输到控制器02的接收端上。控制器02的接收端在接收到多路编码后的图像数据,对要显示的图像数据进行解码后显示。
例如:无人机上搭载有采集前视角的图像数据的图像传感器,还搭载有采集后视角的图像数据的图像传感器,在无人机向前飞行时,在控制器上显示前视角的图像数据,主路图像数据为前视角的图像数据。在无人向后飞行时,在控制器上显示后视角的图像数据,主路图像数据切换为后视角的图像数据。此处需要说明的是,采集前视角的图像数据的图像传感器可以为多个,采集后视角的图像数据的图像传感器也可以为多个,在无人机向前飞行时,可以在控制器上显示多路图像数据,也就是主路图像数据有多路。
如图2所示,多机位摄像系统包括多个摄像机03和一个控制设备04。每个摄像机03位于不同的位置,每个摄像机03内设有一个发送端,控制设备04内设有一个接收端。每 个摄像机03用于采集一路图像数据,并通过摄像机03内的发送端向控制设备04发送。控制设备04在接收到多路图像数据后,可以从接收到的多路图像数据中选择一路或多路作为主路图像数据显示。
无人机系统中的图传系统和多机位摄像系统均可以执行下面实施例描述的数据编码,以实现保证主路图像数据的质量,也能保证主辅路图像数据在切换时码流的流畅性。
如图3所示,本申请一实施例提供一种数据编码方法,该方法应用于上述数据传输系统,该方法包括如下步骤:
S201、发送端获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据。
在该步骤中,在图1所示的一个发送端和一个接收端传输数据,信道是指该发送端和接收端之间进行数据传输的信道。在图2所示的多个发送端和一个接收端传输数据,信道是指每个发送端共用的和接收端传输数据的信道。
发送端和接收端之间的数据传输信道的容量随着距离、信号强度等因素实时变化的。在获取信道实时容量时,可以先获取上一时刻的信道容量,再根据上一时刻的信道容量预测当前时刻的信道容量。在一实施例中,在预测当前时刻的信道容量时,也可以结合发送端与接收端之间的距离变化量进行预测。
发送端接收多路图像传感器采集的多路图像数据。其中,将需要在接收端显示的图像数据称为主路图像数据,不在接收端显示的图像数据称为辅路图像数据。
S202、发送端对至少一路主路图像数据进行编码,获得至少一路主路编码数据。
在该步骤中,对每一路主路图像数据进行编码获得一路主路编码数据,并保证至少一路主路编码数据的数据量小于信道实时容量,利用当前信道容量实时传输主路编码数据,避免主路编码数据积压,或者在积压后出现数据丢失等问题,以保证主路编码数据的质量。
若仅有一路图像数据,让编码所获得的一路主路编码数据的数据量小于信道实时容量。若有多路图像数据,让编码所获得的多路主编码数据的总数据量小于信道实时容量。
例如:若有一路图像数据时,使主路图像数据编码后的码率为N=f(M),其中,N=a×M,0<a<1。M表示信道容量,N表示主路编码数据的数据量。
在有多路主路图像数据时,可以采用预先设置的码率对各路主路图像数据进行编码。在进行码率分配时,根据各路主路图像数据的需求设置编码率,例如:对于质量要求高的主路图像数据,让其码率较高。也可以根据各路主路图像数据的优先级设置码率。例如:让优先级高的主路图像数据的码率较高。
在一实施例中,为进一步保证主路编码数据的质量,可以使至少一路主路编码数据的数据量大于信道实时容量的α倍,α小于1,例如:α可以取0.7~0.9之间的数值,以保证主路编码数据使用大部分信道容量。
S203、发送端根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据。
在该步骤中,信道剩余容量是根据信道实时容量和至少一路主路编码数据的数据量确 定的。在仅有一路主路图像数据时,信道剩余容量是信道实时容量和一路主路编码数据的数据量之间的差值。在有多路主路图像数据时,信道剩余容量是信道实时容量和多路主路编码数据的总数据量之间的差值。
在图1所示的一个发送端和一个接收端的数据传输系统中,该发送端对至少一路辅路图像数据进行编码时,保证编码后的每帧图像数据的质量。更具体地,根据预设质量要求对至少一路辅路图像数据进行编码,保证辅路图像数据的编码质量,同时根据信道剩余容量对编码过程采用变帧率控制,以保证所获得的辅路编码数据能够满足剩余信道容量要求。
此处需要说明的是,在图1所示的一个发送端和一个接收端的数据传输系统中,有多路辅路图像数据需要传输时,可以采用并行的方式进行编码和在编码过程进行变帧率控制,还可以采用串行的方式进行编码和在编码过程进行变帧率控制,此处不做限制。
在图2所示的多个发送端和一个接收端的数据传输系统中,该每个发送端对一路辅路图像数据进行编码时,保证编码后的每帧图像数据的质量。同时,每个发送端根据所分配的信道剩余容量对编码过程采用变帧率控制,以保证所获得的辅路编码数据能够满足自身所分配的剩余容量要求。
其中,预设质量要求可以根据实际需求确定,例如:保证所获得的每帧辅路编码数据的信噪比大于某一预设阈值,保证所获得的每帧辅路编码数据的数据量大于某一预设阈值。此处不做限定。
在获得至少一路主路编码数据和至少一路辅路编码数据后,同时将至少一路主路编码数据和至少一路辅路编码数据传输至接收端。在进行数据传输时,可以使用分时传输方式,也可以使用分频传输方式,此处不做限定。
在一实施例中,可以根据辅路图像数据的重建速率控制主路图像数据的编码率,也就是根据辅路图像数据的重建速率控制主路编码数据的数据量。若重建速率较高,则可以适当降低主路图像数据的编码率,也就是降低主路编码数据的数据量。
在上述技术方案中,在使用数据传输系统传输多路图像数据时,由于同时传输多路图像数据,在主路码流和辅路码流切换时,无需再传输数据量比较大的I帧,保证主辅两路图像数据在切换时码流的流畅性。在对主路图像数据进行编码时,让主路编码数据的数量小于信道实时容量,以保证主路数据的质量。在根据剩余容量对辅路图像数据进行变帧率编码,以使辅路编码数据满足剩余容量,且在对辅路图像数据进行编码时,控制辅路编码数据的质量,以在主辅路图像数据进行切换时,可以根据所传输的辅路图像数据进行快速解码,并显示切换后的主路图像数据,保证主辅路图像数据切换时码流的流畅性。
如图4所示,本申请一实施例提供一种数据编码方法,该方法应用于上述数据传输系统,该方法包括如下步骤:
S301、发送端获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据。
其中,由于信道容量实时抖动,在获取信道实时容量时,可以根据上一时间段内的信 道容量的平均值获得当前时间段内的信道容量的平均值,以提升预测得到的信道容量的准确性,进而根据信道容量的平均值进行主辅路图像数据的编码控制,保证数据传输效果和切换时的流畅性。
S302、发送端对至少一路主路图像数据进行编码,获得至少一路主路编码数据。
在该步骤中,由于数字编码并不能严格控制编码后大小,可以对一段时间内的主路图像数据进行编码控制,以提升数据传输的效果。对预设时间段内的至少一路主路图像数据进行编码,获得预设时间段内的至少一路主路编码数据。在对预设时间段内的至少一路主路图像数据进行编码时,要求保证各路主路编码数据的数据量的平均值的总和小于信道实时容量的平均值。
在有多路主路图像数据传输时,也可以采用预先设置的编码率对各路主路图像数据进行编码,以保证每路主路编码数据的数据量的平均值的总和小于信道实时容量的平均值。设置编码率的方式已经在上述实施例中详细说明,此处不再说明。
在一实施例中,为进一步保证主路图像数据的传输效果,使每路主路编码数据的数据量的平均值大于第一数据量阈值,第一数据量阈值根据实际质量需求确定。
S303、发送端根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据。
其中,在仅有一个发送端和一个接收端的数据传输系统中,该发送端内设有缓存区。该缓存区用于存储辅路编码数据,该缓存区是根据信道剩余容量确定,并保证缓存区的总容量和信道剩余容量匹配,例如:缓存区的总容量是信道剩余容量的0.9~1.1倍。
在有多个发送端和一个接收端的数据传输系统中,每个发送端内设有缓存区,根据每个发送端的优先级或者每个发送端的数据传输需求确定每个发送端内设置缓存区的容量,并保证所有发送端的缓存区的总容量和信道剩余容量匹配。
在图1所示的一个发送端和一个接收端的传输系统中,以串行方式对多路辅路图像数据的当前帧进行数据编码的过程具体为:
S1001、按照预设的轮询次序获取当前处理的一路辅路图像数据的当前帧数据,并获取缓存区内缓存的已编码的辅路图像数据。
其中,轮询次序可以根据各路辅路图像数据的优先级确定,优先级高的次序靠前,优先级低的次序靠后。轮询次序还可以根据上一帧数据的丢弃情况确定。若某一辅路图像数据的上一帧数据被丢失,则在本次轮旋时优先轮询该图像数据。也就是根据上一帧数据的丢失情况确定的轮询次序的方式所获得的轮询次序是实时变化的。
S1002、判断缓存区内缓存的已编码的辅路图像数据是否满足预设跳帧条件,若满足,进入S1003,若不满足,进入S1004。
其中,缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件具体包括:缓存区内缓存的已编码的辅路图像数据的数据量大于或等于信道剩余容量。缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件具体包括:缓存区内缓存的已编码的辅路图像数据的 数据量小于信道剩余容量。
S1003、丢弃该路辅路图像数据的当前帧数据,并结束对当前帧数据的编码流程。
其中,在满足跳帧条件时,也就是缓存区已经无法在缓存图像数据,则不再对当前帧数据进行编码,直接丢弃还没有编码的当前帧图像数据。
例如:如图5所示,有4路辅路图像数据,依次标记为辅路图像数据001至辅路图像数据004。t0表示当前时刻,t1表示下一时刻。轮询次序是辅路图像数据001至辅路图像数据004。根据信道剩余容量设置两个缓存单元11,辅路图像数据001和辅路图像数据002的编码后的数据已经占用两个缓存单元11,缓存单元11已经无法再缓存编码数据,也就是在对辅路图像数据003进行编码时,缓存单元11中缓存数据已经符合跳帧条件,又当前处理的图像数据是辅路图像数据003在t0时刻的数据,则丢弃掉辅路图像数据003的当前帧数据和辅路图像数据004的当前帧数据。
S1004、根据预设质量要求对该路辅路图像数据的当前帧数据进行编码获得至少一路辅路编码数据。
在一实施例中,预设质量要求包括所获得的一帧辅路编码数据的数据量大于第二数据量阈值。也就是对当前处理的一路辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据,保证所获得的一帧辅路编码数据的数据量大于第二数据量阈值。其中,第二数据量阈值是根据辅路图像数据的分辨率确定的。辅路图像数据的分辨率越高,第二数据量阈值越大,进而保证高分辨率图像数据的编码质量。
在一实施例中,预设质量要求包括所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。也就是对当前处理的一路辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据,并保证所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。
S1005、在获得一帧辅路编码数据后,将辅路编码数据缓存至缓存区。
其中,在以串行方式对每路辅路图像数据的当前帧数据进行编码时,每获得一路辅路图像数据的编码数据后,将所获得的一帧辅路编码数据缓存至缓存区。
S1006、判断是否轮询所有辅路图像数据的当前帧数据,若是,结束对当前帧数据的编码流程。若否,则进入S1001。
在图2所示的多个发送端和一个接收端的传输系统中,当多个发送端所发送图像数据时,根据每个发送端发送的辅路图像数据的优先级为每个发送端分配信道剩余容量,并根据所分配的信道剩余容量设置缓存区。
例如:如图6所示,有5个发送端,依次标记为发送端0001至发送端0005,每个发送端用于发送一路图像数据。发送端0005发送的一路图像数据为主路图像数据,发送端0001至发送端0004发送的图像数据为辅路图像数据。发送端0001和发送端0004设置有两个缓存单元,发送端0002和发送端0003设置有一个缓存单元。
每个发送端对从图像传感器处接收到的一路辅路图像数据的当前帧进行数据编码的过程具体为:
S2001、获取辅路图像数据的当前帧数据,并获取缓存区内缓存的已编码的辅路图像数据。
S2002、判断缓存区内缓存的已编码的辅路图像数据是否满足预设跳帧条件,若满足,进入S2003,若不满足,进入S2004。
其中,缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件具体包括:发送端的缓存区内缓存的已编码的辅路图像数据的数据量大于或等于发送端所分配的信道剩余容量。发送端的缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件具体包括:发送端的缓存区内缓存的已编码的辅路图像数据的数据量小于发送端所分配的信道剩余容量。
在发送端0001对辅路图像数据进行编码时,发送端0001的两个缓存单元11均处于空闲状态,不符合跳帧条件,进入S2004。
在发送端0002对辅路图像数据进行编码时,发送端0002的一个缓存单元11处于空闲状态,不符合跳帧条件,进入S2004。
在发送端0003对辅路图像数据进行编码时,发送端0003的缓存单元11已经缓存数据,而发送端0003没有缓存单元可以继续缓存数据,符合跳帧条件,进入S2003。
在发送端0004对辅路图像数据进行编码时,发送端0004的两个缓存单元11内仅有一个缓存单元11已经缓存数据,不符合跳帧条件,进入S2004。
S2003、丢弃该路辅路图像数据的当前帧数据。
其中,在满足跳帧条件时,也就是缓存区已经无法在缓存图像数据,则不再对该辅路图像数据的当前帧数据进行编码,直接丢弃该辅路图像数据的当前帧数据进行编码。
S2004、根据预设质量要求对该辅路图像数据的当前帧数据进行编码获得辅路编码数据。
在一实施例中,预设质量要求包括所获得的一帧辅路编码数据的数据量大于第二数据量阈值。也就是对该辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据,保证所获得的一帧辅路编码数据的数据量大于第二数据量阈值。其中,第二数据量阈值是根据辅路图像数据的分辨率确定的。辅路图像数据的分辨率越高,第二数据量阈值越大,进而保证高分辨率图像数据的编码质量。
在一实施例中,预设质量要求包括所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。也就是对该辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据,并保证所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。
S2005、在获得一帧辅路编码数据后,将辅路编码数据缓存至缓存区。
其中,在以串行方式对每路辅路图像数据的当前帧数据进行编码时,每获得一路辅路图像数据的编码数据后,将所获得的一帧辅路编码数据缓存至缓存区。
S2006、判断是否轮询所有发送端,若是,结束对当前帧数据的编码流程。若否,则进入S2001。
在图1所示的一个发送端和一个接收端的数据传输系统中,以并行方式对多路辅路图 像数据的当前帧进行数据编码的过程具体为:
S3001、获取所有辅路图像数据的当前帧数据,并获取缓存区内缓存的已编码的辅路图像数据。
S3002、判断缓存区内缓存的已编码的辅路图像数据是否满足预设跳帧条件,若满足,进入S3003,若不满足,进入S3004。
其中,缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件具体包括:缓存区内缓存的已编码的辅路图像数据的数据量大于或等于信道剩余容量。缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件具体包括:缓存区内缓存的已编码的辅路图像数据的数据量小于信道剩余容量。
如图7A所示,有4路辅路图像数据,依次标记为辅路图像数据001至辅路图像数据004,根据信道剩余容量在发送端内配置有4个缓存单元11。当4个缓存单元均缓存有编码数据,满足跳帧条件,则进入S3003。如图7B所示,当4个缓存单元中有空闲的缓存单元时,则不满足跳帧条件,进入S3004。
S3003、丢弃该路辅路图像数据的当前帧数据。
其中,在满足跳帧条件时,也就是缓存区已经无法在缓存图像数据,则不再对当前帧数据进行编码,直接丢弃所有辅路图像数据的当前帧数据。
在图7A的示例中,若满足跳帧条件时,需要将4路辅路图像数据在t0时刻的数据丢弃。
S3004、根据预设质量要求对每路辅路图像数据的当前帧数据进行编码获得至少一路辅路编码数据。
在一实施例中,预设质量要求包括所获得的一帧辅路编码数据的数据量大于第二数据量阈值。针对每路辅路图像数据,对辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据,保证所获得的一帧辅路编码数据的数据量大于第二数据量阈值。其中,第二数据量阈值是根据辅路图像数据的分辨率确定的。辅路图像数据的分辨率越高,第二数据量阈值越大,进而保证高分辨率图像数据的编码质量。
在一实施例中,预设质量要求包括对所获得的一帧辅路编码数据进行重建后的信噪比大于最低信噪比阈值。针对每路辅路图像数据,对辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据,并保证对所获得的一帧辅路编码数据进行重建后的信噪比大于最低信噪比阈值。其中,最低信噪比阈值可以根据实际需求确定。
在图7B的示例中,不满足跳帧时,根据预设质量要求将4路辅路图像数据进行编码。
S3005、在对所有当前帧数据进行编码后,将获得的辅路编码数据缓存至缓存区。
其中,在以并行方式对每路辅路图像数据的当前帧数据进行编码时,在获得所有辅路图像数据的当前帧数据的编码数据后,将所有辅路图像数据的当前帧数据的编码数据缓存至缓存区。
可以看出,对于辅路图像数据的编码过程,不关注其总码流大小,而是关注其编码后 每帧编码数据的质量,并通过帧率可变的策略保证获得的辅路编码数据满足剩余信道容量要求。
上述实施例中,通过变帧率保证每帧辅路编码数据的编码质量要求,在当前帧率下能够将主路编码数据占用后的信道剩余容量填满,提升信道使用率,也能保证数据辅路图像数据的传输质量,从而提升主辅路切换速率。
S304、发送端同时向接收端发送至少一路主路编码数据和至少一路辅路编码数据。
在该步骤中,发送端在获得至少一路主路编码数据和至少一路辅路编码数据后,同时向接收端发送至少一路主路编码数据和至少一路辅路编码数据。
在一种实施例中,按照分频传输的方式发送至少一路主路编码数据和至少一路辅路编码数据。
在一种实施例中,按照分时传输的方式发送至少一路主路图像数据和至少一路辅路图像数据;其中,在分时传输时主路编码数据的优先级高于辅路编码数据的优先级。也就是无线信道在发送完主路编码数据后,再发送辅路编码数据。
S305、接收端对至少一路主路编码数据和至少一路辅路编码数据进行解码处理,并显示主路图像数据。
其中,接收端在接收到至少一路主路编码数据和至少一路辅路编码数据后,对至少一路主路编码数据和至少一路辅路编码数据进行解码处理,并显示主路图像数据,但不显示辅路图像数据。
在上述实施例中,获取信道在预设时间段内的容量的平均值,以提升信道容量的预测结果的准确性,进而基于信道容量的平均值对主辅路图像数据进行编码控制,提升数据传输效果。又对主路图像数据进行编码时保证编码数据小于信道容量,以保证主路图像数据传输效果,再基于跳帧策略对辅路图像数据进行编码,并在编码时保证每帧图像数据编码后的数据质量,以使辅路编码数据满足剩余容量,且控制辅路编码数据的质量,以在主辅路图像数据进行切换时,可以根据所传输的辅路图像数据进行快速解码,并显示切换后的主路图像数据,保证主辅路图像数据切换时码流的流畅性。
如图8所示,本申请一实施例提供一种发送端400,包括:存储器401和处理器402;存储器401用于存储处理器402可执行指令;其中,处理器402被配置为执行:
获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据;
对至少一路主路图像数据进行编码,获得至少一路主路编码数据;其中,至少一路主路编码数据的数据量小于信道实时容量;
根据预设质量要求和信道剩余容量对至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据;
其中,至少一路主路编码数据和至少一路辅路编码数据是同时传输的,信道剩余容量是根据信道实时容量和至少一路主路编码数据的数据量确定的。
在一实施例中,处理器402被配置为执行:
对预设时间段内的至少一路主路图像数据进行编码,获得预设时间段内的至少一路主路编码数据;
其中,每路主路编码数据的数据量的平均值的总和小于信道实时容量的平均值。
在一实施例中,每路主路编码数据的数据量的平均值大于第一数据量阈值。
在一实施例中,发送端设有缓存区;处理器402被配置为执行:
获取每路辅路图像数据的当前帧数据和缓存区内缓存的已编码的辅路图像数据;
当缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件时,丢弃辅路图像数据的当前帧数据。
在一实施例中,处理器402被配置为执行:当缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件时,根据预设质量要求对辅路图像数据的当前帧数据进行编码,获得辅路编码数据。
在一实施例中,缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件,包括:
缓存区内缓存的已编码的辅路图像数据的数据量大于或等于信道剩余容量;和/或,
缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件,包括:
缓存区内缓存的已编码的辅路图像数据的数据量小于信道剩余容量。
在一实施例中,处理器402被配置为执行:
对辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据;其中,所获得的一帧辅路编码数据的数据量大于第二数据量阈值。
在一实施例中,第二数据量阈值是根据辅路图像数据的分辨率确定的。
在一实施例中,处理器402被配置为执行:
对辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据;其中,所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。
在一实施例中,处理器402被配置为执行:
在获得一帧辅路编码数据后,将辅路编码数据缓存至缓存区;或者
在对所有当前帧数据进行编码后,将获得的辅路编码数据缓存至缓存区。
在一实施例中,发送端还包括:发送器,发送器被配置为执行:
按照分频传输的方式发送至少一路主路编码数据和至少一路辅路编码数据;或者
按照分时传输的方式发送至少一路主路图像数据和至少一路辅路图像数据;其中,在分时传输时主路编码数据的优先级高于辅路编码数据的优先级。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:只读内存(Read-Only Memory,ROM)、随机存取存储器401(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管 参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (24)

  1. 一种数据编码方法,其特征在于,所述方法应用于发送端,所述方法包括:
    获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据;
    对所述至少一路主路图像数据进行编码,获得至少一路主路编码数据;其中,所述至少一路主路编码数据的数据量小于所述信道实时容量;
    根据预设质量要求和信道剩余容量对所述至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据;
    其中,所述至少一路主路编码数据和所述至少一路辅路编码数据是同时传输的,所述信道剩余容量是根据信道实时容量和所述至少一路主路编码数据的数据量确定的。
  2. 根据权利要求1所述的方法,其特征在于,对所述至少一路主路图像数据进行编码,获得至少一路主路编码数据,具体包括:
    对预设时间段内的至少一路主路图像数据进行编码,获得所述预设时间段内的至少一路主路编码数据;
    其中,每路主路编码数据的数据量的平均值的总和小于所述信道实时容量的平均值。
  3. 根据权利要求2所述的方法,其特征在于,所述每路主路编码数据的数据量的平均值大于第一数据量阈值。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,所述发送端设有缓存区;根据所述预设质量要求和所述信道剩余容量对至少一路辅路图像数据进行变帧率编码获得所述辅路编码数据,具体包括:
    获取辅路图像数据的当前帧数据和缓存区内缓存的已编码的辅路图像数据;
    当所述缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件时,丢弃所述辅路图像数据的当前帧数据。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件时,根据所述预设质量要求对所述辅路图像数据的当前帧数据进行编码,获得至少一路辅路编码数据。
  6. 根据权利要求5所述的方法,其特征在于:
    所述缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件,包括:
    所述缓存区内缓存的已编码的辅路图像数据的数据量大于或等于所述信道剩余容量;和/或,
    所述缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件,包括:
    所述缓存区内缓存的已编码的辅路图像数据的数据量小于所述信道剩余容量。
  7. 根据权利要求5或6所述的方法,其特征在于,根据所述预设质量要求对辅路图像数据的当前帧数据进行编码获得辅路编码数据,具体包括:
    对所述辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据;其中,所获得的 一帧辅路编码数据的数据量大于第二数据量阈值。
  8. 根据权利要求7所述的方法,其特征在于,所述第二数据量阈值是根据所述辅路图像数据的分辨率确定的。
  9. 根据权利要求5或6所述的方法,其特征在于,根据所述预设质量要求对辅路图像数据的当前帧数据进行编码获得辅路编码数据,具体包括:
    对所述辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据;其中,对所获得的一帧辅路编码数据进行重建后的信噪比大于最低信噪比阈值。
  10. 根据权利要求6至9中任意一项所述的方法,其特征在于,所述方法还包括:
    在获得一帧辅路编码数据后,将所述辅路编码数据缓存至缓存区;或者
    在对所有当前帧数据进行编码后,将获得的辅路编码数据缓存至缓存区。
  11. 根据权利要求1至10中任意一项所述的方法,其特征在于,所述方法还包括:
    按照分频传输的方式发送所述至少一路主路编码数据和至少一路辅路编码数据;或者
    按照分时传输的方式发送所述至少一路主路图像数据和至少一路辅路图像数据;其中,在分时传输时所述主路编码数据的优先级高于所述辅路编码数据的优先级。
  12. 一种发送端,其特征在于,包括:存储器和处理器;所述存储器用于存储所述处理器可执行指令;其中,所述处理器被配置为执行:
    获取信道实时容量、至少一路主路图像数据和至少一路辅路图像数据;
    对所述至少一路主路图像数据进行编码,获得至少一路主路编码数据;其中,所述至少一路主路编码数据的数据量小于所述信道实时容量;
    根据预设质量要求和信道剩余容量对所述至少一路辅路图像数据进行变帧率编码,获得至少一路辅路编码数据;
    其中,所述至少一路主路编码数据和所述至少一路辅路编码数据是同时传输的,所述信道剩余容量是根据信道实时容量和所述至少一路主路编码数据的数据量确定的。
  13. 根据权利要求12所述的发送端,其特征在于,所述处理器被配置为执行:
    对预设时间段内的至少一路主路图像数据进行编码,获得所述预设时间段内的至少一路主路编码数据;
    其中,每路主路编码数据的数据量的平均值的总和小于所述信道实时容量的平均值。
  14. 根据权利要求13所述的发送端,其特征在于,所述每路主路编码数据的数据量的平均值大于第一数据量阈值。
  15. 根据权利要求12至14中任意一项所述的发送端,其特征在于,所述发送端设有缓存区;所述处理器被配置为执行:
    获取每路辅路图像数据的当前帧数据和缓存区内缓存的已编码的辅路图像数据;
    当所述缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件时,丢弃所述辅路图像数据的当前帧数据。
  16. 根据权利要求15所述的发送端,其特征在于,所述处理器被配置为执行:当所 述缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件时,根据所述预设质量要求对所述辅路图像数据的当前帧数据进行编码,获得辅路编码数据。
  17. 根据权利要求16所述的发送端,其特征在于:
    所述缓存区内缓存的已编码的辅路图像数据满足预设跳帧条件,包括:
    所述缓存区内缓存的已编码的辅路图像数据的数据量大于或等于所述信道剩余容量;和/或,
    所述缓存区内缓存的已编码的辅路图像数据不满足预设跳帧条件,包括:
    所述缓存区内缓存的已编码的辅路图像数据的数据量小于所述信道剩余容量。
  18. 根据权利要求16或17所述的发送端,其特征在于,所述处理器被配置为执行:
    对所述辅路图像数据的当前帧数据进行编码获得一帧辅路编码数据;其中,所获得的一帧辅路编码数据的数据量大于第二数据量阈值。
  19. 根据权利要求18所述的发送端,其特征在于,所述第二数据量阈值是根据所述辅路图像数据的分辨率确定的。
  20. 根据权利要求16或17所述的发送端,其特征在于,所述处理器被配置为执行:
    对所述辅路图像数据的当前帧数据进行编码,获得一帧辅路编码数据;其中,所获得的一帧辅路编码数据的信噪比大于最低信噪比阈值。
  21. 根据权利要求16至20中任意一项所述的发送端,其特征在于,所述处理器被配置为执行:
    在获得一帧辅路编码数据后,将所述辅路编码数据缓存至缓存区;或者
    在对所有当前帧数据进行编码后,将获得的辅路编码数据缓存至缓存区。
  22. 根据权利要求12至21中任意一项所述的发送端,其特征在于,所述发送端还包括:发送器,所述发送器被配置为执行:
    按照分频传输的方式发送所述至少一路主路编码数据和至少一路辅路编码数据;或者
    按照分时传输的方式发送所述至少一路主路图像数据和至少一路辅路图像数据;其中,在分时传输时所述主路编码数据的优先级高于所述辅路编码数据的优先级。
  23. 一种数据传输系统,其特征在于,包括:至少一个如权利要求12至22中任意一项所述的发送端和接收端,其中,所述接收端用于接收所述发送端发送的数据。
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如权利要求1至11任一项所述的数据编码方法。
PCT/CN2021/093515 2021-05-13 2021-05-13 数据编码方法和设备 WO2022236758A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/093515 WO2022236758A1 (zh) 2021-05-13 2021-05-13 数据编码方法和设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/093515 WO2022236758A1 (zh) 2021-05-13 2021-05-13 数据编码方法和设备

Publications (1)

Publication Number Publication Date
WO2022236758A1 true WO2022236758A1 (zh) 2022-11-17

Family

ID=84027902

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/093515 WO2022236758A1 (zh) 2021-05-13 2021-05-13 数据编码方法和设备

Country Status (1)

Country Link
WO (1) WO2022236758A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08256312A (ja) * 1995-03-16 1996-10-01 Mitsubishi Electric Corp 多重映像伝送装置
CN107533792A (zh) * 2015-03-02 2018-01-02 瓦威亚无人机公司 用于在如无人机等远程控制机器与地面站点之间传输命令和视频流的系统
CN108881972A (zh) * 2018-08-01 2018-11-23 广州视源电子科技股份有限公司 一种码率分配方法、装置、设备和存储介质
CN109076194A (zh) * 2017-11-21 2018-12-21 深圳市大疆创新科技有限公司 一种视频处理方法、设备、飞行器、系统及存储介质
CN110769271A (zh) * 2019-11-11 2020-02-07 广州酷狗计算机科技有限公司 调节多路码流的码率的方法和装置
CN111510735A (zh) * 2020-04-21 2020-08-07 新石器慧通(北京)科技有限公司 弱网环境下多路视频的编码传输方法、装置及无人车辆

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08256312A (ja) * 1995-03-16 1996-10-01 Mitsubishi Electric Corp 多重映像伝送装置
CN107533792A (zh) * 2015-03-02 2018-01-02 瓦威亚无人机公司 用于在如无人机等远程控制机器与地面站点之间传输命令和视频流的系统
CN109076194A (zh) * 2017-11-21 2018-12-21 深圳市大疆创新科技有限公司 一种视频处理方法、设备、飞行器、系统及存储介质
CN108881972A (zh) * 2018-08-01 2018-11-23 广州视源电子科技股份有限公司 一种码率分配方法、装置、设备和存储介质
CN110769271A (zh) * 2019-11-11 2020-02-07 广州酷狗计算机科技有限公司 调节多路码流的码率的方法和装置
CN111510735A (zh) * 2020-04-21 2020-08-07 新石器慧通(北京)科技有限公司 弱网环境下多路视频的编码传输方法、装置及无人车辆

Similar Documents

Publication Publication Date Title
CN104702968B (zh) 一种视频帧丢帧方法及视频发送装置
CN101778426B (zh) 移动无线网络中视频数据流传输的方法及设备
US9042444B2 (en) System and method for transmission of data signals over a wireless network
US10602139B2 (en) Embedded multimedia systems with adaptive rate control for power efficient video streaming
US8538176B2 (en) Method for sending compressed data representing a digital image and corresponding device
US20110270913A1 (en) Controlling an adaptive streaming of digital content
US20080084927A1 (en) Real-time network adaptive digital video encoding/decoding
US20080170630A1 (en) System and a method for controlling one or more signal sequences characteristics
US20140126628A1 (en) Best quality given a maximum bit rate
US9985887B2 (en) Method and apparatus for providing a low latency transmission system using adaptive buffering estimation
US20170063959A1 (en) Method and Apparatus for Providing a Low Latency Transmission System Using Adjustable Buffers
JPH11164270A (ja) マルチチャンネルを用いるビデオデータ伝送方法及びその装置
KR20060011964A (ko) 혁신적인 레이트 적응 시그널링을 위한 방법 및 장치
CN104735470A (zh) 一种流媒体数据传输方法及装置
CN113068001B (zh) 基于级联摄像机的数据处理方法、装置、设备和介质
CN112995048A (zh) 数据中心网络的阻塞控制与调度融合方法及终端设备
CN112272299A (zh) 一种视频编码的方法、装置、设备和存储介质
CN109862400A (zh) 一种流媒体传输方法、装置及其系统
WO2022236758A1 (zh) 数据编码方法和设备
US20190089759A1 (en) Video encoding circuit and wireless video transmission apparatus and method
US8270307B2 (en) Network-adaptive preemptive repair in real-time video
JP2014187448A (ja) 映像配信システム及びデコーダ並びに映像配信方法
CN115883848A (zh) 一种编码控制方法、装置、设备、存储介质及产品
JP2551641B2 (ja) 可変レート画像符号化装置および可変レート画像復号化装置
CN117939134B (zh) 一种无线视频通信方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21941331

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21941331

Country of ref document: EP

Kind code of ref document: A1