CN110149515B - Data transmission method and device - Google Patents
Data transmission method and device Download PDFInfo
- Publication number
- CN110149515B CN110149515B CN201910256258.0A CN201910256258A CN110149515B CN 110149515 B CN110149515 B CN 110149515B CN 201910256258 A CN201910256258 A CN 201910256258A CN 110149515 B CN110149515 B CN 110149515B
- Authority
- CN
- China
- Prior art keywords
- target
- current image
- frame
- image frame
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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 an image region, e.g. an object
- H04N19/176—Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N19/196—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present disclosure provides a data transmission method and apparatus, which relate to the field of communications and can solve the problem of image quality degradation caused by the limitation of transmission resources when I-frame image data in video data is transmitted. The specific technical scheme is as follows: acquiring a current image frame which is a P frame in video data; when the I frame transmission effect corresponding to the current image frame meets the preset requirement and the target transmission resource of the current image frame meets the preset requirement, determining the target transmission resource of the current image frame; determining a target macro block with the same I frame content in the current image frame data as the current image frame; the target macro block is transmitted through the target transmission resource. The invention is used for video data transmission.
Description
Technical Field
The present disclosure relates to the field of communications, and in particular, to a data transmission method and apparatus.
Background
As the amount of data information contained in the video data is larger and larger, in order to better transmit the video data, the video image data is processed by an image compression technique to ensure that more data is transmitted under the condition of the inherent bandwidth. In the prior art, when video data is transmitted frame by frame, frame image data is first classified into: and carrying out coding and decoding processing on the I frame image data, the P frame image data and the B frame image data. According to the h.264 video compression standard, in the video transmission process, since the data volume of the code stream after processing the I-frame image data is larger than that of the code stream for processing the P-frame image data, the requirement on the bandwidth is higher in the process of transmitting the I-frame image data, if the currently available bandwidth cannot meet the transmission of the code stream generated by the current data transmission method in the transmission process, a large amount of I-frame data cannot be transmitted to a target end through a network, so that data loss is caused, and the quality of the image at a decoding end is affected.
Disclosure of Invention
The embodiment of the disclosure provides a data transmission method and device, which can solve the problem of image quality reduction caused by bandwidth limitation in the process of transmitting I frame images in video data. 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, including:
acquiring a current image frame, wherein the current image frame is a P frame,
when the transmission effect of the I frame corresponding to the current image frame meets the preset condition and the target transmission resource corresponding to the current image frame meets the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame, wherein the target transmission resource is idle resource after the data of the current image frame is transmitted, and the target macro block is the same macro block in the I frame corresponding to the current image frame in the current image frame;
at least one target macroblock is transmitted over a target transmission resource.
In one embodiment, before the obtaining of the current image frame when the transmission effect of the I frame corresponding to the current image frame meets the preset condition, the method further includes:
acquiring target code stream data after processing an I frame corresponding to a current image frame according to a preset coding rule;
after processing target code stream data according to transmission resources, acquiring a target image, wherein the transmission resources comprise bandwidth resources;
and determining the I frame transmission effect corresponding to the current image frame according to the target image.
In one embodiment, when the transmission effect of the I frame corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets a preset condition, the method determines at least one target macro block in the current image frame according to the I frame corresponding to the current image frame, including:
acquiring target coding quality parameters according to the target image, wherein the target coding quality parameters are used for indicating the coding quality of target image data, and the target coding quality parameters comprise a peak signal-to-noise ratio, definition and an error rate;
determining whether the target coding quality parameter accords with a preset coding quality parameter;
when the transmission effect of the I frame corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame, including:
when the target coding quality parameter does not accord with the preset coding quality parameter and the target transmission resource corresponding to the current image frame accords with the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame.
In one embodiment, the method for determining at least one target macro block comprises:
determining target position data and position data according to an I frame corresponding to the current image frame and a target coding quality parameter, wherein the position data is used for indicating macro block position data which is not in a preset range in the I frame corresponding to the current image frame;
when the block image data corresponding to the target position in the current image frame is consistent with the macro block corresponding to the target position in the I frame corresponding to the current image frame, determining that the macro block corresponding to the target position in the current image frame is the target macro block.
In one embodiment, the method further comprises, prior to transmitting at least one target macroblock over the target transmission resource,
determining a target coding rule according to an I frame transmission effect and a target transmission resource corresponding to a current image frame;
at least one target macroblock is processed by a target coding rule.
The data transmission method provided by the embodiment of the disclosure acquires a current image frame which is a P frame in video data; when the I frame transmission effect corresponding to the current image frame meets the preset requirement and the target transmission resource of the current image frame meets the preset requirement, determining the target transmission resource of the current image frame; determining a target macro block with the same I frame content in the current image frame data as the current image frame; the target macro block is transmitted through the target transmission resource. The method comprises the steps of acquiring idle transmission resources of a current image P frame when the current transmission resources cannot meet the transmission requirements of an I frame corresponding to the current image frame, namely the transmission effect of the I frame corresponding to the current image frame is lower than the coding and decoding quality requirements; when the idle resources of the current image frame meet the preset requirements, the I frame corresponding to the current image frame is transmitted through the idle resources, and the requirement of transmitting I frame image data with high quality under the transmission condition of a small bandwidth is met.
According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission apparatus including:
an acquisition module, a determination module and a transmission module,
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a current image frame which is a P frame;
the determining module is used for determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame when the transmission effect of the I frame corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, wherein the target transmission resource is idle resource after the data of the current image frame is transmitted, and the target macro block is the same macro block in the I frame corresponding to the current image frame in the current image frame;
a transmission module for transmitting at least one target macroblock over a target transmission resource.
In one embodiment, the determining module of the apparatus includes: a data acquisition unit, an image acquisition unit and a determination unit,
the data acquisition unit is used for acquiring target code stream data after processing the I frame corresponding to the current image frame according to a preset coding rule;
the image acquisition unit is used for acquiring a target image after processing target code stream data according to transmission resources, wherein the transmission resources comprise bandwidth resources;
and the determining unit is used for determining the I frame transmission effect corresponding to the current image frame according to the target image.
In one embodiment, the determining module of the apparatus further comprises: the device comprises a parameter acquisition unit, a first determination unit and a second determination unit;
the parameter acquiring unit is used for acquiring target coding quality parameters according to the target image data, wherein the target coding quality parameters are used for indicating the coding quality of the target image data, and the coding quality parameters comprise a peak signal-to-noise ratio, definition and an error rate;
a first determining unit for determining whether the target encoding quality parameter conforms to a preset encoding quality parameter;
a second determining unit, configured to determine, when an I-frame transmission effect corresponding to the current image frame meets a preset condition and when a target transmission resource corresponding to the current image frame meets the preset condition, at least one target macro block in the current image frame according to the I-frame corresponding to the current image frame, where the determining unit includes:
when the target coding quality parameter does not accord with the preset coding quality parameter and the target transmission resource corresponding to the current image frame accords with the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame.
In one embodiment, the determining module of the apparatus includes a third determining unit and a fourth determining unit:
a third determining unit, configured to determine target position data according to the target encoding quality parameter and an I frame corresponding to the current image frame, where the position data is used to indicate block image position data that is not within a preset range in the target image data;
and the fourth determining unit is used for determining the macro block corresponding to the target position in the current image frame as the target macro block when the macro block corresponding to the target position in the current image frame is consistent with the macro block corresponding to the target position in the I frame corresponding to the current image frame.
In one embodiment, the transmission module of the apparatus comprises: a determination unit and a processing unit;
the determining unit is used for determining a target coding rule according to the I frame transmission effect and the target transmission resource corresponding to the current image frame;
and the processing unit is used for processing the target macro block through the target coding rule.
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 structural diagram of a data transmission device according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of a determination module in a data transmission device according to an embodiment of the present disclosure;
fig. 4 is a block diagram 1 of a determination module in a data transmission device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a determination module in a data transmission device according to an embodiment of the present disclosure;
fig. 6 is a structural diagram of a transmission module in a data transmission device 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.
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. and acquiring a current image frame which is a P frame.
The current image frame may be frame image data of at least one frame in the video data.
The current image frame is a P frame; the method refers to classifying frame images according to the high-compression digital video codec standard H.264/AVC (Advanced video Coding), and comprises the following steps: i frame, P frame, B frame; the I frame refers to a complete coding frame image, namely a reference frame for coding processing; the P frame refers to a frame image generated with reference to the previous I frame and containing only the difference portion code; the B frame refers to a frame image encoded with reference to frames before and after.
102. And when the I frame transmission effect corresponding to the current image frame meets the preset condition and the target transmission resource corresponding to the current image frame meets the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame.
The I frame corresponding to the current image frame refers to a corresponding I frame when the current image frame is a P frame coding difference frame image, and the I frame corresponding to the current image frame may be a previous image frame of the current image frame or a previous image frame I frame when the previous image frame is a P frame.
The target transmission resource refers to an idle resource after the current image frame data is transmitted.
The target macro block refers to the same macro block in the I frame corresponding to the current image frame in the current image frame.
In an optional embodiment, in the present disclosure, when it is determined that an I-frame transmission effect corresponding to a current image frame meets a preset condition, the method includes:
acquiring target code stream data after processing the I frame corresponding to the current image frame according to a preset coding rule;
after the target code stream data is processed according to transmission resources, the target image is obtained, wherein the transmission resources comprise bandwidth resources;
and determining the I frame transmission effect corresponding to the current image frame according to the target image.
Further, in the step of obtaining target code stream data after processing the I frame corresponding to the current image frame according to a preset coding rule, the setting of the preset coding rule includes:
acquiring a current transmission resource and an I frame corresponding to a current image frame;
and setting a preset coding rule according to the current transmission resource and the I frame corresponding to the current image frame, thereby ensuring that the size of the coded code stream is adaptive to the current transmission resource.
And determining a preset encoding rule according to transmission resources in the encoding and decoding process, so that the code stream size after the I frame corresponding to the current image frame is encoded and processed is ensured to be adaptive to the current network bandwidth.
In a specific embodiment, when encoding an I-frame corresponding to a current image frame, the encoding rule parameter type may be according to: and setting a video type macro block, a picture type macro block and a character type macro block.
When the current image frame corresponds to the I frame, the I frame is complete frame image data, so that the data volume corresponding to the I frame image is large; when the network bandwidth is low, if the I frame corresponding to the current image frame is transmitted according to the picture type macro block coding, the image data may be lost, so when the coding rule is set, the video type macro block, the picture type macro block and the character type macro block in the I frame are all coded according to the video type macro block, and the transmission of complete frame data can be realized under the condition of low bandwidth rate.
At this time, the transmission effect of the I frame corresponding to the current image frame, that is, the image quality is not very high, but the integrity of the I frame corresponding to the current image frame may be relatively high, so that it is necessary to further determine whether the target image data meets the preset requirement, that is, the display effect of the target image data.
In an optional embodiment, when the transmission effect of the I frame corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, when at least one target macro block is determined in the current image frame according to the I frame corresponding to the current image frame, the method includes:
acquiring target coding quality parameters according to the target image data, wherein the target coding quality parameters are used for indicating the coding quality of the target image data, and the target coding quality parameters comprise a peak signal-to-noise ratio, definition and an error rate;
determining whether the target coding quality parameter meets a preset coding quality parameter, for example, whether a peak signal-to-noise ratio in the target coding quality parameter meets a preset threshold range;
when the transmission effect of the I frame corresponding to the current image frame meets the preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame, including:
when the target coding quality parameter does not accord with the preset coding quality parameter and when the target transmission resource corresponding to the current image frame accords with the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame.
The target transmission resource refers to an idle resource after the current image frame data is transmitted; further, according to the standard H.264/AVC of the highly compressed digital video codec, the target transmission resource refers to an idle resource after processing different partial image data of the current image frame and the I frame corresponding to the current image frame.
In a specific embodiment, how to determine the target transmission resource includes:
according to the H.264/AVC coding rule, when the current image frame data in the embodiment is the I frame corresponding to the current P frame image data and the previous image frame, according to the H.264/AVC coding rule, the I frame image data is complete one frame image data, so that the data volume corresponding to the I frame image data is large, and the required bandwidth resource is also large; the P frame image data represents the difference between the frame and the previous key frame, and only the data of the difference part is transmitted when the P frame image data is transmitted, so that the data amount corresponding to the P frame image data is small. When the bandwidth resource for transmitting the I frame image data is utilized, a part of the bandwidth resource is not utilized after the P frame image data is transmitted.
In an optional embodiment, when a target transmission resource corresponding to a current image frame meets a preset condition, determining at least one target macro block in the current image frame according to an I frame corresponding to the current image frame includes:
when the target transmission resource corresponding to the current image frame can meet the requirement and the bandwidth transmission resource required when one macro block in the current image frame is processed according to a preset coding rule, determining at least one target macro block in the current image frame according to an I frame corresponding to the current image frame.
The target macro block refers to the same macro block in the I frame corresponding to the current image frame in the current image frame.
In an alternative embodiment, the present disclosure, when determining the target macroblock, includes:
determining target position data according to an I frame corresponding to a current image frame and a target coding quality parameter, wherein the target position data is used for indicating block image position data which is not in a preset range in the target image data;
and according to the target position data, when the macro block corresponding to the target position in the current image frame is consistent with the macro block corresponding to the target position in the I frame corresponding to the current image frame, determining the macro block corresponding to the target position in the current image frame as a target macro block.
Here, the I frame corresponding to the current image frame includes four macro blocks, i.e., an a macro block, a B macro block, a C macro block, and a D macro block; referring to an I frame corresponding to a current image frame, data of a corresponding position of the current image frame data are an a macro block, a B macro block, an E macro block, and a D macro block as examples, and when a target macro block is specified, the method includes:
according to the block-by-block comparison result of the target image data and the I frame corresponding to the current image frame, determining the macro blocks which do not accord with the preset coding quality parameter in the target image data, wherein the macro blocks B and C are macro blocks which do not accord with the preset coding quality parameter: and determining target position data corresponding to the B macro block and the C macro block, namely, the macro blocks to be optimized in the transmitted target image data are the B macro block and the C macro block.
Determining a target macro block, namely: and acquiring a macro block corresponding to the I frame corresponding to the current image frame and a macro block corresponding to the current image frame data according to the target position data, determining whether the macro blocks are consistent, and if so, determining that the macro block is a target macro block. In this example, the corresponding position of the I-frame B macro block corresponding to the current image frame is the B macro block in the current image frame data, and the corresponding position of the I-frame C macro block corresponding to the current image frame is the E macro block in the current image frame data; and according to the judgment standard, the B macro block in the current image frame data is consistent with the sub macro block at the corresponding position of the current frame, and the B macro block in the current image frame data is the target macro block.
When the transmission effect of the I frame corresponding to the current image frame meets the preset condition, the next frame of the I frame corresponding to the current image frame, namely the current image frame, is obtained, if the current image frame is the I frame, the above process is repeated, namely, the image is continuously coded and decoded for transmission, and if the current image frame data is the P frame, the coded data of the image is small due to the format attribute of the P frame, so that after the P frame image is transmitted, a part of bandwidth resources are not utilized in the transmission resources; the resource is determined to be a target transmission resource.
In the embodiment, the I-frame image is transmitted by the unused transmission resource after the P-frame image is transmitted, so that the image data quality of the I-frame image data can be ensured under the condition that the transmission bandwidth cannot completely transmit the I-frame image.
103. At least one target macroblock is transmitted over a target transmission resource.
In an alternative embodiment, before transmitting at least one target macroblock via the target transmission resource, further comprising,
determining a target coding rule according to the I frame transmission effect corresponding to the current image frame and the target transmission resource;
the target macroblock is processed by the target encoding rule.
For example, error data is determined according to the transmission effect of comparing an I frame corresponding to the current image frame with an I frame corresponding to the current image frame, the reason that target image data does not accord with a preset rule is determined by analyzing the error data, and an encoding rule is determined according to the reason that the target image data does not accord with the preset rule; if the display definition of the text part does not meet the preset range, after the target image macro block is obtained, the target macro block needs to be processed according to the coding rule corresponding to the number of the block images in the text format.
For example, the target transmission resource includes a bandwidth transmission resource, and different bandwidth sizes are corresponding to different encoding rules, so that the amount of the target transmission resource determines the setting of the encoding rules, and the amount of the target transmission resource is determined according to different macro blocks of the current image frame and the I frame corresponding to the current image frame, and if the amount of different image data is larger than the amount of the I frame corresponding to the current image frame, the amount of the target transmission resource is smaller.
In an alternative embodiment, after transmitting the target macroblock through the target transmission resource, the present disclosure further includes:
acquiring a current image frame transmission effect;
and when the transmission effect of the current image frame meets the preset requirement, acquiring a third image frame, wherein the third image frame is the next image frame of the current image frame.
And further judging whether the third image frame is a P frame, if so, circularly processing according to the method disclosed by the invention, namely: when the transmission effect of the current image frame meets the preset condition, namely the transmission effect is lower than the coding and decoding quality requirement, repeating the data transmission method, namely further acquiring the next frame of the current image frame: and when the third image frame is a P frame, processing the macro block, which has the same I frame content and is at the target position, of the third image frame corresponding to the current image frame by using the residual bandwidth until the transmitted target image data meets the preset requirement.
The method and the device can not only finish the purpose of transmitting the P frame image data, but also transmit the I frame image by using the idle resource of the P frame image data when the transmission effect of the I frame image is lower than the coding and decoding quality requirement, thereby optimizing the image display effect after the I frame image is transmitted.
According to the embodiment of the disclosure, after the current image frame is obtained, when the transmission effect of the I frame corresponding to the current image frame is lower than the coding and decoding quality requirement and the target resource of the current image frame meets the preset requirement, the data of the current image frame, which is the same as the I frame corresponding to the current image frame, is processed through the target resource; and acquiring the transmission effect of the current image frame, wherein the transmission effect of the current image frame meets the requirement: namely, the transmission effect is lower than the coding and decoding quality requirement, and the next frame corresponding to the current image frame is obtained: and the third image frame, namely, gradually distributing the I frame corresponding to the current image frame and the next frames of image data corresponding to the third frame of image data in the encoding and transmitting process, and progressively transmitting the image data until the preset encoding and decoding requirements are met, so that the image with higher frame data volume is completely transmitted under the condition of lower bandwidth rate, and the problems of encoding and decoding quality reduction and poor image display effect caused by data information loss in the video data transmission process are avoided.
The data transmission method provided by the embodiment of the disclosure acquires a current image frame which is a P frame in video data; when the I frame transmission effect corresponding to the current image frame meets the preset requirement and the target transmission resource of the current image frame meets the preset requirement, determining the target transmission resource of the current image frame; determining a target macro block with the same I frame content in the current image frame data as the current image frame; the target macro block is transmitted through the target transmission resource. The method comprises the steps of acquiring idle transmission resources of a current image P frame when the current transmission resources cannot meet the transmission requirements of an I frame corresponding to the current image frame, namely the transmission effect of the I frame corresponding to the current image frame is lower than the coding and decoding quality requirements; when the idle resources of the current image frame meet the preset requirements, the I frame corresponding to the current image frame is transmitted through the idle resources, and the requirement of transmitting I frame image data with high quality under the transmission condition of a small bandwidth is met.
Example two
Based on the data transmission method described in the embodiment corresponding to fig. 1, the following is an embodiment of the apparatus of the present disclosure, which may be used to execute the embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a data transmission apparatus, as shown in fig. 2, the data transmission apparatus 20 includes: an acquisition module 201, a determination module 202 and a transmission module 203,
an obtaining module 201, configured to obtain a current image frame, where the current image frame is a P frame.
A determining module 202, configured to determine, according to an I frame corresponding to the current image frame, at least one target macro block in the current image frame when the I frame transmission effect corresponding to the current image frame meets a preset condition and when a target transmission resource corresponding to the current image frame meets the preset condition, where the target transmission resource is an idle resource after transmission of data of the current image frame, and the target macro block is a macro block in the current image frame that is the same as the macro block in the I frame corresponding to the current image frame.
As shown in fig. 3, in an alternative embodiment, the determining module 202 includes: a data acquisition unit 2021, an image acquisition unit 2022, and a determination unit 2023,
the data acquisition unit 2021 is configured to acquire target code stream data after processing the I frame corresponding to the current image frame according to a preset encoding rule;
an image obtaining unit 2022, configured to obtain a target image after processing the target code stream data according to a transmission resource, where the transmission resource includes a bandwidth resource;
the determining unit 2023 is configured to determine, according to the target image, an I-frame transmission effect corresponding to the current image frame.
As shown in fig. 4, in an alternative embodiment, the determining module 202 includes: a parameter acquisition unit 2024, a first determination unit 2025, and a second determination unit 2026;
a parameter obtaining unit 2024, configured to obtain a target coding quality parameter according to the target image data, where the target coding quality parameter is used to indicate a coding quality of the target image data, and the coding quality parameter includes a peak signal-to-noise ratio, a sharpness, and an error rate;
a first determining unit 2025, configured to determine whether the target encoding quality parameter conforms to a preset encoding quality parameter;
the second determining unit 2026, configured to obtain the current image frame when the I-frame transmission effect corresponding to the current image frame meets the preset condition, where the obtaining includes:
and when the target coding quality parameter does not accord with the preset coding quality parameter, acquiring the current image frame.
As shown in fig. 5, in an alternative embodiment, the determining module 202 includes a third determining unit 2027 and a fourth determining unit 2028:
a third determining unit 2027, configured to determine target position data according to the target encoding quality parameter and the I frame corresponding to the current image frame, the position data being used to indicate block image position data that is not within a preset range in the target image data;
a fourth determining unit 2028, configured to determine, when the macroblock corresponding to the target position in the current image frame is consistent with the macroblock corresponding to the target position in the I frame corresponding to the current image frame, that the macroblock corresponding to the target position in the current image frame is the target macroblock.
A transmission module 203, configured to transmit at least one target macroblock through a target transmission resource.
As shown in fig. 6, in an alternative embodiment, the transmission module 203 includes: a determination unit 2031 and a processing unit 2032;
a determining unit 2031, configured to determine a target encoding rule according to an I-frame transmission effect and a target transmission resource corresponding to a current image frame;
a processing unit 2032, configured to process the target macroblock according to the target coding rule.
The data transmission device provided by the embodiment of the disclosure acquires a current image frame which is a P frame in video data; when the I frame transmission effect corresponding to the current image frame meets the preset requirement and the target transmission resource of the current image frame meets the preset requirement, determining the target transmission resource of the current image frame; determining a target macro block with the same I frame content in the current image frame data as the current image frame; the target macro block is transmitted through the target transmission resource. The method comprises the steps that when the current transmission resource cannot meet the transmission requirement of an I frame corresponding to the current image frame, namely the transmission effect of the I frame corresponding to the current image frame is lower than the coding and decoding quality requirement, the idle transmission resource of a P frame of the current image is obtained; when the idle resources of the current image frame meet the preset requirements, the I frame corresponding to the current image frame is transmitted through the idle resources, and the requirement of transmitting I frame image data with high quality under the transmission condition of a small bandwidth is met.
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 (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the data transmission method described in the embodiment corresponding to fig. 1, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method of data transmission, the method comprising:
acquiring a current image frame, wherein the current image frame is a P frame;
when the I frame transmission effect corresponding to the current image frame meets a preset condition and when a target transmission resource corresponding to the current image frame meets the preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame, wherein the target transmission resource is an idle resource after the data of the current image frame is transmitted, the target macro block is the same macro block in the I frame corresponding to the current image frame in the current image frame, and the preset condition comprises a condition determined according to a coding quality parameter;
transmitting the at least one target macroblock over the target transmission resource.
2. The method according to claim 1, wherein when the I-frame transmission effect corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets a preset condition, before determining at least one target macro block in the current image frame according to the I-frame corresponding to the current image frame, the method further comprises:
acquiring target code stream data after processing the I frame corresponding to the current image frame according to a preset coding rule;
after processing the target code stream data according to transmission resources, acquiring a target image, wherein the transmission resources comprise bandwidth resources;
and determining the I frame transmission effect corresponding to the current image frame according to the target image.
3. The method according to claim 2, wherein the determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame when the I frame transmission effect corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets a preset condition comprises:
acquiring target coding quality parameters according to the target image, wherein the target coding quality parameters are used for indicating the coding quality of target image data, and the target coding quality parameters comprise a peak signal-to-noise ratio, definition and an error rate;
determining whether the target coding quality parameter accords with a preset coding quality parameter;
determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame when the I frame transmission effect corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, including:
when the target coding quality parameter does not accord with a preset coding quality parameter and when the target transmission resource corresponding to the current image frame accords with a preset condition, determining at least one target macro block in the current image frame according to the I frame corresponding to the current image frame.
4. The method of claim 3, wherein said determining at least one target macroblock in said current image frame comprises:
determining target position data according to the I frame corresponding to the current image frame and the target coding quality parameter, wherein the position data is used for indicating macro block position data which is not in a preset range in the I frame corresponding to the current image frame;
when the block image data corresponding to the target position in the current image frame is consistent with the macro block corresponding to the target position in the I frame corresponding to the current image frame, determining that the macro block corresponding to the target position in the current image frame is a target macro block.
5. The method of claim 1, wherein prior to said transmitting said at least one target macroblock over said target transmission resource, said method further comprises,
determining a target coding rule according to the I frame transmission effect corresponding to the current image frame and the target transmission resource;
processing the at least one target macroblock by the target encoding rule.
6. A data transmission apparatus, comprising: an acquisition module, a determination module and a transmission module,
the acquisition module is used for acquiring a current image frame, wherein the current image frame is a P frame;
the determining module is configured to determine at least one target macro block in the current image frame according to an I frame corresponding to the current image frame when an I frame transmission effect corresponding to the current image frame meets a preset condition and when a target transmission resource corresponding to the current image frame meets the preset condition, where the target transmission resource is an idle resource after transmission of data of the current image frame, the target macro block is a macro block in the current image frame that is the same as the I frame corresponding to the current image frame, and the preset condition includes a condition determined according to a coding quality parameter;
the transmission module is configured to transmit the at least one target macroblock through the target transmission resource.
7. The apparatus of claim 6, wherein the determining module comprises: a data acquisition unit, an image acquisition unit and a determination unit,
the data acquisition unit is used for acquiring target code stream data after processing the I frame corresponding to the current image frame according to a preset coding rule;
the image acquisition unit is used for acquiring a target image after processing the target code stream data according to transmission resources, wherein the transmission resources comprise bandwidth resources;
the determining unit is used for determining the I frame transmission effect corresponding to the current image frame according to the target image.
8. The apparatus of claim 6, wherein the determining module comprises: the device comprises a parameter acquisition unit, a first determination unit and a second determination unit;
the parameter acquiring unit is used for acquiring target coding quality parameters according to the target image data, wherein the target coding quality parameters are used for indicating the coding quality of the target image data, and the coding quality parameters comprise a peak signal-to-noise ratio, definition and an error rate;
the first determining unit is used for determining whether the target coding quality parameter accords with a preset coding quality parameter;
the second determining unit is configured to determine, when the I-frame transmission effect corresponding to the current image frame meets a preset condition and when the target transmission resource corresponding to the current image frame meets the preset condition, at least one target macro block in the current image frame according to the I-frame corresponding to the current image frame, where the determining includes:
9. the apparatus of claim 6, wherein the determining module comprises a third determining unit and a fourth determining unit:
the third determining unit is configured to determine target position data according to the target encoding quality parameter and an I frame corresponding to the current image frame, where the position data is used to indicate block image position data that is not within a preset range in the target image data;
the fourth determining unit is configured to determine, when the macroblock corresponding to the target position in the current image frame is consistent with the macroblock corresponding to the target position in the I frame corresponding to the current image frame, that the macroblock corresponding to the target position in the current image frame is a target macroblock.
10. The apparatus of claim 6, wherein the transmission module comprises:
a determination unit and a processing unit;
the determining unit is configured to determine a target encoding rule according to the I-frame transmission effect corresponding to the current image frame and the target transmission resource;
the processing unit is configured to process the target macroblock according to the target encoding rule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910256258.0A CN110149515B (en) | 2019-04-01 | 2019-04-01 | Data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910256258.0A CN110149515B (en) | 2019-04-01 | 2019-04-01 | Data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110149515A CN110149515A (en) | 2019-08-20 |
CN110149515B true CN110149515B (en) | 2021-06-04 |
Family
ID=67589310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910256258.0A Active CN110149515B (en) | 2019-04-01 | 2019-04-01 | Data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110149515B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112771830A (en) * | 2019-11-29 | 2021-05-07 | 深圳市大疆创新科技有限公司 | Data transmission method, device, system and storage medium |
CN111556315B (en) * | 2020-04-07 | 2024-07-23 | 西安万像电子科技有限公司 | Data transmission method and device |
CN111741276B (en) * | 2020-08-28 | 2020-12-04 | 浙江大华技术股份有限公司 | Method for sending key frame by video equipment, video equipment and storage device |
CN112422964B (en) * | 2020-10-30 | 2024-05-17 | 西安万像电子科技有限公司 | Progressive coding method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101707551A (en) * | 2009-10-30 | 2010-05-12 | 杭州华三通信技术有限公司 | Data transmission method and device |
CN102547376A (en) * | 2010-12-28 | 2012-07-04 | 中国移动通信集团公司 | Video data transmission method, device and system |
CN104284135A (en) * | 2013-07-02 | 2015-01-14 | 华为技术有限公司 | Video transmission method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100657314B1 (en) * | 2005-05-04 | 2006-12-20 | 삼성전자주식회사 | Apparatus and method for transmitting multimedia streaming |
-
2019
- 2019-04-01 CN CN201910256258.0A patent/CN110149515B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101707551A (en) * | 2009-10-30 | 2010-05-12 | 杭州华三通信技术有限公司 | Data transmission method and device |
CN102547376A (en) * | 2010-12-28 | 2012-07-04 | 中国移动通信集团公司 | Video data transmission method, device and system |
CN104284135A (en) * | 2013-07-02 | 2015-01-14 | 华为技术有限公司 | Video transmission method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110149515A (en) | 2019-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110149515B (en) | Data transmission method and device | |
US9716891B2 (en) | Quantization method and apparatus in encoding/decoding | |
WO2018103568A1 (en) | Methods of encoding and decoding cloud desktop content, device, and system | |
CN106937121B (en) | Image decoding and encoding method, decoding and encoding device, decoder and encoder | |
US20120307904A1 (en) | Partial frame utilization in video codecs | |
WO2016165603A1 (en) | Encoding and decoding method and device for video data | |
CN113542740B (en) | Image transmission method and device | |
US20200236359A1 (en) | Apparatus and method for image coding with boundary partition processing | |
CN109862365B (en) | Image data processing method and device | |
CN109803146B (en) | Method, apparatus, medium, and device for secondary compression of video | |
CN111263243B (en) | Video coding method and device, computer readable medium and electronic equipment | |
US20190191185A1 (en) | Method and apparatus for processing video signal using coefficient-induced reconstruction | |
CN110740316A (en) | Data coding method and device | |
CN116208773A (en) | Encoder, decoder and corresponding methods for adaptive loop filtering | |
EP1227684A2 (en) | Encoding of video signals | |
CN114071161A (en) | Image encoding method, image decoding method and related device | |
CN113079375B (en) | Method and device for determining video coding and decoding priority order based on correlation comparison | |
CN111182310A (en) | Video processing method and device, computer readable medium and electronic equipment | |
WO2022011916A1 (en) | Video coding method and apparatus | |
WO2024078066A1 (en) | Video decoding method and apparatus, video encoding method and apparatus, storage medium, and device | |
US20160057431A1 (en) | Method and device for transmitting a sequence of pictures, and corresponding method and device for reception, computer program and recording medium | |
CN117751575A (en) | Method or apparatus for estimating film grain parameters | |
CN111212288B (en) | Video data encoding and decoding method and device, computer equipment and storage medium | |
CN116982262A (en) | State transition for dependent quantization in video coding | |
CN108024111A (en) | A kind of frame type decision method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211209 Address after: Room 2563, building 11, No. 6055, Jinhai highway, Fengxian District, Shanghai 201403 Patentee after: Shanghai Jingxiang Microelectronics Co.,Ltd. Address before: Room 302, 3 / F, workshop 4, 3G intelligent terminal Industrial Park, 8 Tangyan South Road, hi tech Zone, Xi'an City, Shaanxi Province 710075 Patentee before: XI'AN VANXVM ELECTRONICS TECHNOLOGY Co.,Ltd. |