Data transmission method and system

文档序号:1675891 发布日期:2019-12-31 浏览:7次 中文

阅读说明:本技术 数据传输方法及系统 (Data transmission method and system ) 是由 王知明 范志刚 于 2019-08-23 设计创作,主要内容包括:本公开提供一种数据传输方法及系统,涉及电子信息技术领域,能够解决在基于参考图像帧编码的方法传输数据时,因为参考图像帧与图像帧序列对比相似度低,从而造成在对图像帧序列编码时数据量增大,导致数据处理效率低的问题。具体技术方案为:发送设备在获取图像帧序列后,根据预设算法,获取图像帧序列对应的目标参考图像帧,通过该目标参考图像帧对图像帧序列进行编码处理,并将编码处理后的图像帧序列和编码处理后的目标参考图像帧,向接收设备发送。接收设备获取已编码的图像帧序列和已编码的目标帧序列对应的目标参考图像帧后,根据目标参考图像帧,对已编码的图像帧序列进行解码处理,获得图像帧序列。本公开用于数据传输。(The invention provides a data transmission method and a data transmission system, relates to the technical field of electronic information, and can solve the problem of low data processing efficiency caused by increased data volume when coding an image frame sequence due to low contrast similarity between a reference image frame and the image frame sequence when data is transmitted by a reference image frame coding method. The specific technical scheme is as follows: after acquiring the image frame sequence, the sending device acquires a target reference image frame corresponding to the image frame sequence according to a preset algorithm, performs coding processing on the image frame sequence through the target reference image frame, and sends the image frame sequence after the coding processing and the target reference image frame after the coding processing to the receiving device. And after the receiving equipment acquires the coded image frame sequence and the target reference image frame corresponding to the coded target frame sequence, decoding the coded image frame sequence according to the target reference image frame to obtain the image frame sequence. The present disclosure is for data transmission.)

1. A data transmission method, applied to a transmitting device, the method comprising:

acquiring a sequence of image frames, the sequence of image frames comprising at least one image frame;

generating a target reference image frame corresponding to the image frame sequence according to the image frame sequence and a preset rule;

according to the target reference image frame, encoding the image frame sequence;

transmitting the encoded sequence of image frames and the target reference image frame to a receiving device.

2. The method of claim 1, wherein generating the target reference image frame corresponding to the sequence of image frames comprises:

dividing each image frame in the image frame sequence into M × N macro blocks, and acquiring position information corresponding to each macro block in each image frame, wherein M is more than or equal to 1, and N is more than or equal to 1;

according to the position information and the target position information corresponding to each macro block in each image frame, acquiring a candidate macro block corresponding to each image frame at the target position;

comparing each candidate macro block by block, and determining the target number corresponding to each candidate macro block, wherein the target number refers to the number of macro blocks with the similarity reaching a preset value with the candidate macro blocks;

after the target number corresponding to each candidate macro block is sequenced, the candidate macro block with the largest target number is used as a reference macro block;

and generating a target reference image frame according to the reference macro block and the target position information.

3. The method of claim 1, wherein encoding the sequence of image frames comprises:

comparing, block by block, whether the image frame sequence and the target reference image frame have the same macro blocks;

according to the comparison result, when the image frame sequence and the target reference image frame have the same macro blocks, acquiring the corresponding reference position information of the macro blocks in the image frame sequence in the target reference image frame;

according to the comparison result, when the image frame sequence and the target reference image frame have different macro blocks, determining the macro block in the image frame sequence as a target macro block;

and carrying out coding processing on the image frame sequence according to the reference position information and the target macro block.

4. The method of claim 2, wherein the target reference image frame comprises a reference macroblock, and wherein the sending the target reference image frame comprises:

marking the reference macro block according to the reference macro block in the image frame sequence and target position information corresponding to the reference macro block;

transmitting the target reference image frame by the transmitting the marked reference macro block.

5. The method of claim 1, wherein the transmitting the sequence of image frames comprises:

and according to the ordering information of each image frame in the image frame sequence, marking the image frame sequence, and then sending the image frame sequence.

6. A data transmission method, applied to a receiving device, the method comprising:

acquiring target data, wherein the target data comprises: the image coding method comprises the steps of encoding an image frame sequence and a target reference image frame corresponding to the encoded image frame sequence;

and decoding the coded image frame sequence according to the target reference image frame.

7. The method of claim 6, wherein said obtaining a target reference image frame corresponding to said encoded sequence of image frames comprises,

analyzing the coded image frame sequence, and acquiring marking information corresponding to a target reference image frame in the image frame sequence according to an analysis result, wherein the marking information is used for indicating macro block information forming the target reference image frame in the target frame sequence;

and acquiring a corresponding reference macro block according to the marking information, and generating a target reference image frame according to the reference macro block.

8. The method according to claim 6, wherein the image frame sequence comprises a target macro block and reference position information, the reference position information refers to position information corresponding to the same macro block in the image frame sequence as in the target reference image frame, the target macro block refers to a macro block in the image frame sequence different from the target reference image frame, the decoding process for the encoded image frame sequence comprises,

determining a macro block corresponding to the reference position information in the target reference image frame according to the reference position information and the target reference image frame;

and decoding the coded image frame sequence according to the target macro block and the macro block corresponding to the reference position information in the target reference image frame.

9. A data transmission system, the system comprising: a sending device and a receiving device,

the sending device is connected with the receiving device,

the sending device is used for acquiring an image frame sequence, and the image frame sequence comprises at least one image frame;

generating a target reference image frame corresponding to the image frame sequence according to the image frame sequence and a preset rule;

according to the target reference image frame, encoding the image frame sequence;

transmitting the encoded sequence of image frames and the target reference image frame to a receiving device.

The receiving device is configured to acquire an encoded image frame sequence and a target reference image frame corresponding to the encoded image frame sequence, where the image frame sequence includes a target macro block and reference position information, the reference position information refers to position information of a macro block in the image frame sequence, which is the same as that in the target reference image frame, and the target macro block refers to a macro block in the image frame sequence, which is different from that in the target reference image frame;

and decoding the coded image frame sequence according to the target reference image frame.

10. The system of claim 9, wherein the sending device is further configured to,

comparing, block by block, whether the image frame sequence and the target reference image frame have the same macro blocks;

according to the comparison result, when the image frame sequence and the target reference image frame have the same macro blocks, acquiring the corresponding reference position information of the macro blocks in the image frame sequence in the target reference image frame;

according to the comparison result, when the image frame sequence and the target reference image frame have different macro blocks, determining the macro block in the image frame sequence as a target macro block;

and carrying out coding processing on the image frame sequence according to the reference position information and the target macro block.

Technical Field

The present disclosure relates to the field of electronic information technologies, and in particular, to a data transmission method and system.

Background

With the development of information technology, the demand of people for communication service is continuously increasing, and the contradiction between image communication and the capacity of a communication network is increasingly prominent. Especially for video image communication, due to its huge data volume, it is difficult to transmit and store data without image compression. Therefore, image compression capability is particularly important for video images.

Image compression is the application of data compression techniques to digital images with the goal of reducing redundant information in the image data, thereby storing and transmitting the data in a more efficient format.

In order to improve the efficiency of data transmission and storage, the prior art transmits the data by a reference frame coding method when video coding is performed, and the principle of interframe reference frame coding is as follows: when the current image frame is coded, the current frame and the reference frame are compared, partial data which are the same as or similar to the reference frame are removed, and the positions of the same data are marked, so that the purpose of compression is achieved. However, in the prior art, when a reference frame is determined according to an image frame at a fixed position, the reference frame and the image frame in an image frame sequence have low similarity, so that the referenceability with a subsequent image frame is reduced, and when the subsequent image is encoded according to the reference frame, the data amount of the removed similar part is reduced, so that the data amount is increased during image encoding, transmission and decoding, the data processing efficiency is low, and the problems of calculation resource waste and transmission bandwidth waste are also caused.

Disclosure of Invention

The embodiment of the disclosure provides a data transmission method and system, which can solve the problems of low data processing efficiency and waste of transmission bandwidth caused by increased data volume when encoding an image frame sequence due to low contrast similarity between a reference image frame and the image frame sequence when transmitting data by a reference image frame encoding method. The technical scheme is as follows:

according to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method applied to a sending device, the method including:

acquiring a sequence of image frames, the sequence of image frames comprising at least one image frame;

generating a target reference image frame corresponding to the image frame sequence according to the image frame sequence and a preset rule;

according to the target reference image frame, coding the image frame sequence;

the encoded image frame sequence and the target reference image frame are transmitted to a receiving device.

In one embodiment, the method, when generating the target reference image frame corresponding to the image frame sequence, includes:

dividing each image frame in the image frame sequence into M × N macro blocks, and acquiring position information corresponding to each macro block in each image frame, wherein M is more than or equal to 1, and N is more than or equal to 1;

according to the position information and the target position information corresponding to each macro block in each image frame, acquiring an alternative macro block corresponding to each image frame at the target position;

comparing each candidate macro block by block, and determining the target number corresponding to each candidate macro block, wherein the target number refers to the number of macro blocks with the similarity reaching a preset value with the candidate macro blocks;

after the target number corresponding to each candidate macro block is sequenced, the candidate macro block with the maximum target number is used as a reference macro block;

and generating a target reference image frame according to the reference macro block and the target position information.

In one embodiment, the method includes, when encoding the sequence of image frames:

comparing whether the image frame sequence and the target reference image frame have the same macro blocks on a block-by-block basis;

according to the comparison result, when the image frame sequence and the target reference image frame have the same macro block, acquiring the corresponding reference position information of the macro block in the image frame sequence in the target reference image frame;

according to the comparison result, when the image frame sequence and the target reference image frame have different macro blocks, determining the macro block in the image frame sequence as a target macro block;

and carrying out coding processing on the image frame sequence according to the reference position information and the target macro block.

In one embodiment, the method wherein the target reference image frame comprises a reference macro block, the method comprising, upon transmitting the target reference image frame:

marking the reference macro block according to the reference macro block in the image frame sequence and the target position information corresponding to the reference macro block;

the target reference image frame is transmitted by the transmitting of the marked reference macro block.

In one embodiment, the method, when transmitting a sequence of image frames, comprises:

the image frame sequence is transmitted after being marked according to the ordering information of each image frame in the image frame sequence.

According to the data transmission method provided by the embodiment of the disclosure, after the sending device obtains the image frame sequence, the target reference image frame corresponding to the image frame sequence is obtained according to the preset algorithm. And after the image frame sequence is coded according to the target reference image frame, the coded image frame sequence and the target reference image frame are sent. According to the data transmission method provided by the embodiment of the disclosure, when the target reference image frame is determined, the reference macro block is determined based on the encoding referenceability in the image frame sequence, and the reference macro block can be the macro block with the largest number of the same macro blocks in the image frame sequence, so that the proportion of the same macro blocks in the image frame sequence and the reference target frame is improved, therefore, when the image frame sequence is encoded based on the reference frame encoding principle, the target macro blocks needing to be encoded in the image frame sequence are reduced, the encoded data amount is reduced, the encoding processing efficiency is improved, and the transmission bandwidth is saved.

According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission method applied to a receiving device, the method including:

acquiring an encoded image frame sequence and a target reference image frame corresponding to the encoded image frame sequence, wherein the image frame sequence comprises a target macro block and reference position information, the reference position information refers to position information of a macro block in the image frame sequence, which is the same as that in the target reference image frame, and the target macro block refers to a macro block in the image frame sequence, which is different from that in the target reference image frame;

and decoding the coded image frame sequence according to the target reference image frame.

In one embodiment, the method acquires a target reference image frame corresponding to the encoded image frame sequence, including,

analyzing the coded image frame sequence, and acquiring mark information corresponding to a target reference image frame in the image frame sequence according to an analysis result, wherein the mark information is used for indicating macro block information forming the target reference image frame in the target frame sequence;

and acquiring a corresponding reference macro block according to the mark information, and generating a target reference image frame according to the reference macro block.

In one embodiment, the method performs a decoding process on the encoded image frame sequence, including,

determining a macro block corresponding to the reference position information in the target reference image frame according to the reference position information and the target reference image frame;

and decoding the coded image frame sequence according to the target macro block and the macro block corresponding to the reference position information in the target reference image frame. According to the data transmission method provided by the embodiment of the disclosure, after the sending device obtains the image frame sequence, the target reference image frame corresponding to the image frame sequence is obtained according to the preset algorithm. And after the image frame sequence is coded according to the target reference image frame, the coded image frame sequence and the target reference image frame are sent. According to the data transmission method provided by the embodiment of the disclosure, when the target reference image frame is determined, the reference macro block is determined based on the encoding referenceability in the image frame sequence, and the reference macro block can be the macro block with the largest number of the same macro blocks in the image frame sequence, so that the proportion of the same macro blocks in the image frame sequence and the reference target frame is improved, therefore, when the image frame sequence is encoded based on the reference frame encoding principle, the target macro blocks needing to be encoded in the image frame sequence are reduced, the encoded data amount is reduced, the encoding processing efficiency is improved, and the transmission bandwidth is saved.

The data transmission method provided by the embodiment of the disclosure acquires, by a receiving device, an encoded image frame sequence and a target reference image frame corresponding to the image frame sequence, where the image frame sequence includes: the image processing device comprises a target macro block and reference position information, wherein the target macro block is a macro block which is different from a target reference image frame in an image frame sequence, and the reference position information is the position information of the same macro block in the target reference image frame in the image frame sequence and the target reference image frame. The encoded image frame sequence is parsed from the target reference image frame. According to the data transmission method provided by the embodiment of the disclosure, when the receiving device decodes the image frame sequence, only the target macro block and the reference position information need to be decoded, so that the data volume during decoding processing is greatly reduced, and the decoding efficiency is improved.

According to a third aspect of the embodiments of the present disclosure, there is provided a data transmission system including: a sending device and a receiving device,

the sending device is connected to the receiving device,

the sending device is used for acquiring an image frame sequence, and the image frame sequence comprises at least one image frame;

generating a target reference image frame corresponding to the image frame sequence according to the image frame sequence and a preset rule;

according to the target reference image frame, coding the image frame sequence;

the encoded image frame sequence and the target reference image frame are transmitted to a receiving device.

The receiving device is used for acquiring an encoded image frame sequence and a target reference image frame corresponding to the encoded image frame sequence, wherein the image frame sequence comprises a target macro block and reference position information, the reference position information refers to position information of the same macro block in the image frame sequence and the target reference image frame in the target reference image frame, and the target macro block refers to a macro block different from the target reference image frame in the image frame sequence;

and decoding the coded image frame sequence according to the target reference image frame.

The transmitting device in the system, in one embodiment, is further configured to,

comparing whether the image frame sequence and the target reference image frame have the same macro blocks on a block-by-block basis;

according to the comparison result, when the image frame sequence and the target reference image frame have the same macro block, acquiring the corresponding reference position information of the macro block in the image frame sequence in the target reference image frame;

according to the comparison result, when the image frame sequence and the target reference image frame have different macro blocks, determining the macro block in the image frame sequence as a target macro block;

and carrying out coding processing on the image frame sequence according to the reference position information and the target macro block.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

Fig. 1 is a flowchart of a data transmission method provided by an embodiment of the present disclosure;

fig. 2 is a flowchart 1 of a data transmission method provided by an embodiment of the present disclosure;

fig. 3 is a structural diagram of a data transmission system according to an embodiment of the present disclosure.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种实时视频的HLS快速分享的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类