Data processing method, device, non-volatile storage medium and processor

By combining progressive encoders and mature video encoders, image encoding is optimized based on image differences and encoding limit values, solving the problem of balancing quality and fluency in image transmission, and improving image quality and user experience.

CN113873250BActive Publication Date: 2024-10-15XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110984610.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-25
Publication Date
2024-10-15
Estimated Expiration
2041-08-25

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to balance image quality and smoothness when transmitting images using a single type of encoder, resulting in poor user experience.

Method used

By using a progressive encoder and a mature video encoder together, the image is predicted and encoded based on the reference frame, basic quality layer and image differences to ensure that the single frame code stream is within the encoding limit value, thereby achieving the best encoding method for the image.

Benefits of technology

On the basis of ensuring fluency, the image quality is improved, solving the problem of a single encoder being difficult to balance image quality and fluency, and providing a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113873250B_ABST
    Figure CN113873250B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method, device, non-volatile storage medium and processor. The method includes: obtaining a first image and a second image, wherein the second image is the next frame image of the first image in time sequence; when the first image is different from the second image, predicting the single frame code stream when the first encoder is used to encode the second image according to the reference frame, basic quality layer and second image of the first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is the encoding level included in the first encoder, and the encoding quality of the basic quality layer corresponds to the encoding quality of the second encoder; when the single frame code stream is less than or equal to the single frame encoding limit value, the first encoder is used to encode the second image to obtain the target encoding result of the second image; and output the target encoding result. The present invention solves the technical problem that it is difficult to balance image quality and fluency when a single type of encoder is used to transmit images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image transmission, and in particular to a data processing method, device, non-volatile storage medium and processor. Background Art

[0002] When transmitting images, encoders and decoders are required to encode and decode the images. In related technologies, a progressive encoder or a mature video encoder can be used to encode image data. The progressive encoder adopts the VGTP progressive scheme, which can encode each macroblock of the image in layers. For example, it can be divided into n layers at most. The encoder decides how many layers each macroblock should be output to based on the transmission feedback bandwidth until all n layers are encoded and the image becomes completely clear. However, in some scenarios, the progressive encoder may encode only one layer of each macroblock of the entire frame image, which may exceed the bandwidth that the transmission can support, and the single transmission time is prolonged. In addition, due to the small number of layers of single encoding output, the process of image clarity is prolonged. Therefore, during the process of current limiting and continuous picture changes, the displayed picture may be blurred until the picture stops and becomes clear.

[0003] Although mature video encoders such as H264 and H265 have perfect current limiting functions, due to color space issues, the image clarity cannot reach the optimal level, resulting in insufficient picture quality of the video image.

[0004] Obviously, using a single encoder will either cause problems with smoothness or picture quality. Smoothness and picture quality are mutually antagonistic, and it is difficult to provide users with a perfect video viewing experience.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide a data processing method, device, non-volatile storage medium and processor to at least solve the technical problem that it is difficult to balance image quality and fluency when a single type of encoder is used to transmit images.

[0007] According to one aspect of an embodiment of the present invention, a data processing method is provided, including: acquiring a first image and a second image, wherein the second image is the next frame image of the first image in time sequence; in a case where the first image is different from the second image, predicting a single-frame code stream when the second image is encoded by the first encoder based on a reference frame, a basic quality layer and the second image of a first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a coding level included in the first encoder, and the coding quality of the basic quality layer corresponds to the coding quality of the second encoder; in a case where the single-frame code stream is less than or equal to the single-frame coding limit value, encoding the second image by the first encoder to obtain a target coding result of the second image; and outputting the target coding result.

[0008] Optionally, when the first image is the same as the second image, the above method also includes: obtaining the encoding type of the first image; when the first image is encoded using the first encoder, encoding the second image using the first encoder to obtain a first encoding result of the second image, wherein the target encoding result includes the first encoding result; and outputting the first encoding result.

[0009] Optionally, the above method also includes: when the first image is encoded using the second encoder, inputting the second image into the first encoder; encoding the second image using the first encoder to obtain a second encoding result of the second image, wherein the target encoding result includes the second encoding result; when the encoding quality layer corresponding to the second encoding result is higher than the basic quality layer, outputting the second encoding result.

[0010] Optionally, the above method also includes: obtaining a target frame rate and a bandwidth of a data transmission channel, wherein the target frame rate is a frame rate output parameter of the target encoding result, and the data transmission channel is used to transmit the target encoding result; determining the single frame encoding limit value according to the target frame rate and the bandwidth; and determining the basic quality layer of the first encoder using a PSNR indicator according to the second encoder and the bandwidth.

[0011] Optionally, the above method also includes: acquiring a third image, wherein the third image is the next frame image of the second image in time sequence; when the third image is different from the second image, interrupting the output of the target encoding result; outputting a third encoding result, wherein the third encoding result is obtained by encoding the third image.

[0012] Optionally, the method further comprises: when the target encoding result reaches the highest quality layer of the first encoder, updating the reference frame of the first encoder to the second image.

[0013] Optionally, when the single-frame code stream is greater than the single-frame encoding limit value, the above method also includes: using the second encoder to encode the second image to obtain a target encoding result of the second image, wherein the amount of data of the single-frame image encoded by the second encoder is less than or equal to the single-frame encoding limit value.

[0014] According to another aspect of an embodiment of the present invention, a data processing device is also provided, including: an acquisition module, used to acquire a first image and a second image, wherein the second image is the next frame image of the first image in time sequence; a prediction module, used to predict a single-frame code stream when the second image is encoded by the first encoder based on a reference frame, a basic quality layer and the second image of the first encoder when the first image is different, wherein the first encoder is a progressive encoder, the basic quality layer is a coding level included in the first encoder, and the coding quality of the basic quality layer corresponds to the coding quality of the second encoder; an encoding module, used to encode the second image by the first encoder when the single-frame code stream is less than or equal to the single-frame coding limit value to obtain a target coding result of the second image; and an output module, used to output the target coding result.

[0015] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned data processing methods.

[0016] According to yet another aspect of the embodiments of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned data processing methods when running.

[0017] In an embodiment of the present invention, a progressive encoder and a mature video encoder are used in combination. When the first image is different from the second image, the single-frame code stream when the second image is encoded by the first encoder is predicted according to the reference frame, the basic quality layer and the second image of the first encoder. When the single-frame code stream is less than or equal to the single-frame encoding limit value, the first encoder is used to encode the second image, and a target encoding result of the second image is obtained and output, thereby achieving the purpose of adopting the most suitable encoding method according to the actual conditions of image transmission, thereby achieving the technical effect of improving the quality of the transmitted image as much as possible on the basis of ensuring the smoothness of image transmission, and further solving the technical problem that it is difficult to balance image quality and smoothness when a single type of encoder is used to transmit images. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 It is a timing diagram of encoding a continuously changing image using a progressive encoder according to the related art;

[0020] Figure 2 It is a timing diagram of encoding an interval-varying image using a progressive encoder according to the related art;

[0021] Figure 3 is a flow chart of a data processing method provided according to an embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of a second image encoding process when the image is still according to an optional embodiment of the present invention;

[0023] Figure 5 is a flowchart of a dual encoder encoding method provided according to an optional embodiment of the present invention;

[0024] Figure 6 is a structural block diagram of a data processing device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:

[0028] A progressive encoder is an encoder that uses a progressive coding scheme to encode the transmitted image. The image is encoded in layers, and the encoding results are transmitted in layers. The layered results are superimposed on each other to gradually improve the image quality at the decoding end.

[0029] Coding quality layer is a concept derived from the progressive encoder. Since the progressive encoder adopts a coding method of encoding images in layers, each coding level of the image is called a coding quality layer.

[0030] Video encoder: The video encoder described in the present invention specifically refers to a mature non-progressive encoder, such as H264 encoder and H265 encoder.

[0031] PSNR, Peak Signal to Noise Ratio, referred to as PSNR, is a standard for evaluating images and is used to evaluate image quality.

[0032] Example 1

[0033] According to an embodiment of the present invention, a data processing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Due to the limitation of the algorithm, the output code stream of the existing progressive image transmission scheme may still exceed the bandwidth limit when the bandwidth of the transmission channel is low, resulting in excessive network load for data transmission and unsmooth image. In addition, due to the limited bandwidth, encoding and transmission according to the existing progressive scheme may cause the changed area of ​​the image to be blurred and unclear, and it is necessary to wait until the image of the video source does not change before it can slowly become clear.

[0035] In addition, due to the limitations of the algorithm of the progressive image transmission scheme itself, the granularity of its coding layering is limited. In some scenarios, the encoder may encode only one layer of each macroblock of the entire frame image, which may exceed the transmission bandwidth, resulting in a single transmission time extension. In addition, due to bandwidth limitations, the number of image layers output by the progressive encoder at a time is small, and the image clarity process takes a long time. Therefore, in the case of bandwidth limitation or continuous changes in the video source, the display image on the decoding end may be blurred until the image stops and becomes clear.

[0036] Figure 1 is a timing diagram of encoding a continuously changing image using a progressive encoder according to the related art, such as Figure 1 As shown, the horizontal axis represents the temporal change of image encoding, and the vertical axis represents the image quality. Figure 1 The left part shows that when the image of the video source changes continuously and the degree of change exceeds the bandwidth limit, the progressive encoder can only encode three image quality layers for each frame of the video source image, causing the user to continue to watch images with only three quality layers at the decoding end, and the picture is not clear; Figure 1 The right part indicates that when the progressive encoder wants to encode the video source image to the highest quality layer, since each encoding can only improve the image quality layer by 3 layers, it takes x frames to raise the image quality to the highest level. The image is blurred at first and then gradually becomes clear.

[0037] Figure 2 It is a timing diagram of using a progressive encoder to encode interval-changing images according to the relevant technology. When the image of the video source is an interval-changing image, the progressive encoder can gradually encode in layers within the interval time to make the image clearer. However, in this case, the image of the video source cannot change within the interval time, resulting in the decoding end being unable to obtain a stable high-quality image.

[0038] Simply using mature video encoders such as H264 and H265, although the current limiting function is perfect, the image clarity cannot reach the optimal level due to color space issues.

[0039] Figure 3 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0040] Step S302, acquiring a first image and a second image, wherein the second image is a next frame image of the first image in time sequence.

[0041] Step S304, when the first image is different from the second image, predicting a single frame code stream when the second image is encoded by the first encoder according to the reference frame, the basic quality layer and the second image of the first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a coding level included in the first encoder, and the coding quality of the basic quality layer corresponds to the coding quality of the second encoder.

[0042] It should be noted that the basic quality layer is a specific image quality layer in the first encoder. When the first encoder is used to encode an image to the layer, the image quality level of the layer corresponds to the quality level encoded by the second encoder, for example, the two are roughly equivalent. The second encoder can be a mature video encoder, such as an H264 encoder or an H265 encoder. When the parameters are determined, the image code stream output by the mature video encoder is relatively stable.

[0043] Step S306, when the single-frame code stream is less than or equal to the single-frame coding limit value, the first encoder is used to encode the second image to obtain the target coding result of the second image. Through this step, it can be determined whether the second image is suitable for encoding by the first encoder. When the single-frame code stream is less than or equal to the single-frame coding limit value, that is, encoding the second image by the first encoder will not affect the smoothness of image transmission. At this time, the first encoder with better coding quality, that is, the progressive encoder, is used to encode the second image based on the reference frame, which can obtain a better coding effect and achieve a higher image quality level. The user can watch a clearer image at the decoding end with guaranteed smoothness.

[0044] Step S308: Output the target encoding result. Optionally, the encoding result is output to a decoding end, which decodes and displays it.

[0045] Through the above steps, a progressive encoder and a mature video encoder are used in combination. When the first image is different from the second image, the single-frame code stream when the second image is encoded by the first encoder is predicted according to the reference frame, the basic quality layer and the second image of the first encoder. When the single-frame code stream is less than or equal to the single-frame encoding limit value, the first encoder is used to encode the second image, and the target encoding result of the second image is obtained and output, thereby achieving the purpose of adopting the most suitable encoding method according to the actual conditions of image transmission, thereby achieving the technical effect of improving the quality of the transmitted image as much as possible on the basis of ensuring the smoothness of image transmission, and further solving the technical problem that it is difficult to balance image quality and smoothness when a single type of encoder is used to transmit images.

[0046] As an optional embodiment, the target frame rate and the bandwidth of the data transmission channel can also be obtained, wherein the target frame rate is the frame rate output parameter of the target encoding result, and the data transmission channel is used to transmit the target encoding result; based on the target frame rate and bandwidth, the single-frame encoding limit value is determined; based on the second encoder and the bandwidth, the PSNR indicator is used to determine the basic quality layer of the first encoder.

[0047] Optionally, the target frame rate is used as an image transmission parameter, which can also be called a custom minimum frame rate. The parameter is obtained by receiving the user's configuration instructions. This parameter can represent the minimum fluency acceptable to the user. On the one hand, it is an output parameter of a mature video encoder. On the other hand, it is also a parameter required by the progressive encoder to determine the single-frame flow limit. It is used to calculate the maximum limit of single-frame encoding, that is, the single-frame encoding limit value. For example, the bandwidth of the current data transmission channel is 5Mbps. When the custom minimum frame rate is 10fps, the single-frame encoding limit value is 500Kbps. The single-frame code stream of the progressive encoder cannot exceed 500kb. The value is used to prevent the output code stream of the progressive encoder from exceeding the bandwidth limit to cause image freezes, so as to ensure the smoothness of the image sent and displayed.

[0048] As a basic quality indicator, the basic quality layer can establish a corresponding relationship between the number of coding layers of the mature video encoder, i.e., the second encoder, and the first encoder. For example, if the encoding result of the second encoder at 2M current limiting is equivalent to the 5-layer image output quality of the progressive encoder, then the 5-layer will be used as the basic quality layer of the first encoder. The specific corresponding number of layers can be obtained by encoding the same frame of image at the same time, and comparing the encoding results of the second encoder under various current limiting conditions with the encoding results of each layer of the first encoder. The comparison criterion can be subjective feeling, or it can be established through PSNR comparison to establish a basic image quality correspondence. At this time, the corresponding number of coding layers in the progressive encoder is defined as the basic quality layer.

[0049] As an optional embodiment, when the first image is the same as the second image, the encoding type of the first image can also be obtained; when the first image is encoded using a first encoder, the second image is encoded using the first encoder to obtain a first encoding result of the second image, wherein the target encoding result includes the first encoding result; and the first encoding result is output.

[0050] In this optional embodiment, when the first image is the same as the second image, it indicates that the current frame of the video source is unchanged from the previous frame and the picture is still. At this time, there is a window period available for the network bandwidth of the current data transmission. At this time, the bandwidth limitation of the data transmission channel can be ignored and the first encoder can be used to progressively encode the second image of the current frame to gradually improve the image quality.

[0051] As an optional embodiment, when the first image is the same as the second image and the first image is encoded using a second encoder, the second image can also be input into the first encoder; the second image is encoded using the first encoder to obtain a second encoding result of the second image, wherein the target encoding result includes the second encoding result; when the encoding quality layer corresponding to the second encoding result is higher than the basic quality layer, the second encoding result is output.

[0052] This embodiment protects a solution. When the first image and the second image are the same and the first image is encoded by the second encoder, the encoding channel can be switched to the first encoder for encoding the second image. Since the first encoder is a progressive encoder, the quality of the encoding result of the second image will gradually improve, but at the beginning it may not be as high as the image quality of the encoding result obtained by encoding the first image by the second encoder. Therefore, it can be judged whether the second encoding result of the second image reaches the basic quality layer. When the quality of the second encoding result is higher than the basic quality layer, it can be considered that the encoding image quality of the second image exceeds the encoding image quality of the first image, and the second encoding result of the second image will be clearer. At this time, the second encoding result is output to the decoding end; when the encoding image quality of the second image has not exceeded the encoding image quality of the first image, the encoding result of the first image can continue to be used at the decoding end to avoid the image quality degradation caused by encoding the second image by the first encoder.

[0053] Figure 4 is a schematic diagram of a second image encoding process when the image is still according to an optional embodiment of the present invention. Figure 4 As shown in the figure, "Video Encoding" means that the previous frame of the image is encoded by a mature video encoder, that is, the first image is encoded by the second encoder; "Progressive Encoding" means that the second image is encoded by the first encoder, and "No Change in Picture" means that the first image and the second image are the same, and the picture in the video source is static. At this time, the first encoder is used to encode the second image, and the second image can be encoded to the basic quality layer and sent for display. At this time, the image quality is equivalent to the image quality of the first image sent for display. Continuing to use progressive encoding and improve the image quality of the second image, the encoding result of the second image can be gradually improved to the highest quality layer, and at this time, a lossless second image can be output to the decoding end.

[0054] As an optional embodiment, when the single-frame code stream is greater than the single-frame coding limit value, the second encoder can be directly used to encode the second image to obtain the target coding result of the second image, wherein the amount of data encoded by the second encoder for the single-frame image is less than or equal to the single-frame coding limit value. When the single-frame code stream is greater than the single-frame coding limit value, the picture may change rapidly at this time, and the use of a progressive encoder cannot adapt to such drastic changes in the picture. At this time, the use of the second encoder can give priority to ensuring the stability and smoothness of the output image, avoiding problems such as freezes and flowery screens in the pictures viewed by users.

[0055] As an optional embodiment, when the target encoding result reaches the highest quality layer of the first encoder, the reference frame of the first encoder can be updated to the second image. Optionally, the decoding end can determine whether the current frame it receives is an image of the highest quality layer. If so, the frame number can be fed back to the encoding end, and the encoding end sets the image corresponding to the frame number as the reference frame.

[0056] As an optional embodiment, a third image can also be obtained, wherein the third image is the next frame image of the second image in time sequence; when the third image is different from the second image, the output of the target encoding result is interrupted; and the third encoding result is output, wherein the third encoding result is obtained by encoding the third image. Optionally, when the next frame image of the second image remains unchanged, the second image can continue to be encoded by a progressive encoder and output to the decoding end, gradually improving the picture quality; but when the next frame image of the third image changes, that is, the third image is different from the second image, the current progressive encoding output of the second image is interrupted, and the output quality of the second image is no longer improved, but the next frame image encoding cycle is entered, and the single frame code stream of the third image encoded by the first encoder is predicted according to the current reference frame, basic quality layer and third image of the first encoder, and the single frame code stream of the encoded third image is compared with the single frame encoding limit value to determine which encoder to use and in what way to encode the third image. The subsequent judgment process and encoding process of the third image are the same as those of the encoding of the second image, which will not be repeated here.

[0057] Figure 5 is a flowchart of a dual encoder encoding method according to an optional embodiment of the present invention, such as Figure 5 As shown, the method for encoding a video stream using a dual encoder of a progressive encoder and a mature video encoder may include the following steps:

[0058] Step 1) obtaining the current limited bandwidth B Mbps of the current data transmission channel, and setting the mature video encoder parameters accordingly;

[0059] Step 2) determining a basic quality layer in the progressive encoder corresponding to the encoding quality of the video encoder according to the corresponding relationship between the encoding result of the mature video encoder and the encoding result of the progressive encoder;

[0060] Step 3) calculating a single-frame encoding limit value of the progressive encoder according to the current limiting bandwidth and the customized minimum frame rate;

[0061] Step 4) When a new frame arrives, determine whether the current image has changed compared to the previous frame. If yes, jump to step 5), otherwise jump to step 7);

[0062] Step 5) Using a progressive encoder, refer to the reference frame of the progressive encoder and the progressive encoding result of the previous frame (the two may be the same, such as when the previous frame is just switched to the reference frame), predictively encode the current frame so that all macroblocks in the current frame at least reach the single-frame code stream required by the basic quality layer; if the single-frame code stream is less than or equal to the single-frame encoding limit value and meets the requirements, the progressive encoder is used to encode the current frame image, and the progressive encoding result is output. When the progressive encoding result reaches the highest quality layer and the previous frame is not X-type encoding (refer to step 8), the reference frame is switched to the current frame, and the process jumps to step 9); when the single-frame code stream is greater than the single-frame encoding limit value, the process jumps to step 6);

[0063] Step 6) Encode the current frame using a video encoder and output it, then jump to step 9);

[0064] Step 7) The current frame has no change compared with the previous frame, indicating that the picture is still, which means that the current data transmission network has a bandwidth window period available. At this time, the bandwidth limitation can be ignored and the encoding method used in the previous frame can be directly determined. If the previous frame uses non-progressive encoding, jump to step 8) and enter the X encoding cycle for the first time (refer to step 8); if the previous frame uses progressive encoding, jump to step 5);

[0065] Step 8) This process is called an X coding cycle, that is, a frame of image is encoded from the beginning to the highest quality layer in a progressive coding manner, which is called a complete X coding cycle; when the picture is still and bandwidth limitation is not considered, first switch to the progressive encoder, enable progressive coding, and output when the encoding result reaches at least the basic quality layer, and the output encoding quality can be higher than the basic quality layer; the frame encoded in the X coding cycle can be marked as a special type frame X, sent to transmission, and jump to step 9); when bandwidth limitation needs to be considered and the first image and the second image are different, according to the bandwidth limitation, the progressive encoder performs a normal progressive encoding process until the highest quality layer is reached. At this time, the encoded frame is also marked as a special type frame X, and jump to step 9);

[0066] Step 9) The data transmission of frame X has the lowest priority and can be discarded at any time; the process of transmitting data of type X is called the X transmission cycle and can be interrupted; when the transmission receives new data to be transmitted, it first determines whether the type of the transmission data is X. If so, the frame is queued in order and waits for transmission; if the frame is not data of type X, it means that a new image of the video source different from the current frame has entered the encoding end, and all X frames in the current transmission queue are cleared at this time, and the X frame image is no longer transmitted, interrupting the X transmission cycle; then the frame data corresponding to the current new image is queued in order and waits for transmission, and then jumps to step 10);

[0067] Step 10) The decoder receives the transmitted data. Regardless of the type of data, it first decodes and displays it. At the same time, it determines whether the current frame is an X frame and whether it reaches the highest quality layer. If it reaches it, the frame number N of the X frame is fed back to the encoder. The P encoder at the encoder switches the reference frame to N. This action indicates that the X cycle is completed and the picture is completely clear. At this time, the encoder can use the currently encoded X frame as a reference frame for subsequent encoding. If the X cycle of step 9 is interrupted, the R end X frame will not reach the highest quality layer, and will not even receive the X frame. The encoder does not need to make any changes and jumps to step 4 to continue the new encoding and decoding process.

[0068] Example 2

[0069] According to an embodiment of the present invention, a data processing device for implementing the above data processing method is also provided. Figure 6 is a structural block diagram of a data processing device provided according to an embodiment of the present invention, such as Figure 6 As shown, the data processing device includes: an acquisition module 62, a prediction module 64, an encoding module 66 and an output module 68. The data processing device is described below.

[0070] An acquisition module 62 is used to acquire a first image and a second image, wherein the second image is a next frame image of the first image in time sequence;

[0071] a prediction module 64, connected to the acquisition module 62, for predicting, when the first image is different from the second image, a single frame code stream when the second image is encoded by the first encoder according to a reference frame, a basic quality layer and the second image of the first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a coding layer included in the first encoder, and the coding quality of the basic quality layer corresponds to the coding quality of the second encoder;

[0072] The encoding module 66 is connected to the prediction module 64 and is used to encode the second image using the first encoder to obtain a target encoding result of the second image when the single-frame code stream is less than or equal to the single-frame encoding limit value;

[0073] The output module 68 is connected to the encoding module 66 and is used to output the target encoding result.

[0074] It should be noted here that the above-mentioned acquisition module 62, prediction module 64, encoding module 66 and output module 68 correspond to steps S302 to S308 in Example 1, and the instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1.

[0075] Example 3

[0076] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.

[0077] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0078] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a first image and a second image, wherein the second image is the next frame image of the first image in time sequence; when the first image is different from the second image, predict the single-frame code stream when the second image is encoded by the first encoder according to the reference frame, basic quality layer and second image of the first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is the encoding level included in the first encoder, and the encoding quality of the basic quality layer corresponds to the encoding quality of the second encoder; when the single-frame code stream is less than or equal to the single-frame encoding limit value, encode the second image using the first encoder to obtain the target encoding result of the second image; and output the target encoding result.

[0079] Optionally, the processor may also execute program codes of the following steps: when the first image is the same as the second image, it also includes: obtaining the encoding type of the first image; when the first image is encoded using the first encoder, encoding the second image using the first encoder to obtain a first encoding result of the second image, wherein the target encoding result includes the first encoding result; and outputting the first encoding result.

[0080] Optionally, the processor may also execute program codes of the following steps: when the first image is encoded using the second encoder, inputting the second image into the first encoder; encoding the second image using the first encoder to obtain a second encoding result of the second image, wherein the target encoding result includes the second encoding result; and when the encoding quality layer corresponding to the second encoding result is higher than the basic quality layer, outputting the second encoding result.

[0081] Optionally, the processor may also execute the program code of the following steps: obtaining a target frame rate and a bandwidth of a data transmission channel, wherein the target frame rate is a frame rate output parameter of a target encoding result, and the data transmission channel is used to transmit the target encoding result; determining a single-frame encoding limit value based on the target frame rate and bandwidth; and determining a basic quality layer of the first encoder using a PSNR indicator based on the second encoder and bandwidth.

[0082] Optionally, the processor may also execute program code of the following steps: acquiring a third image, wherein the third image is the next frame image of the second image in time sequence; when the third image is different from the second image, interrupting the output of the target encoding result; and outputting a third encoding result, wherein the third encoding result is obtained by encoding the third image.

[0083] Optionally, the processor may further execute a program code of the following steps: when the target encoding result reaches the highest quality layer of the first encoder, updating the reference frame of the first encoder to the second image.

[0084] Optionally, the processor may also execute program code of the following steps: when a single-frame code stream is greater than a single-frame coding limit value, it also includes: encoding a second image using a second encoder to obtain a target coding result of the second image, wherein the amount of data encoded by the second encoder for a single-frame image is less than or equal to the single-frame coding limit value.

[0085] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0086] Example 4

[0087] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the data processing method provided in the above embodiment 1.

[0088] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0089] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for performing the following steps: acquiring a first image and a second image, wherein the second image is the next frame image of the first image in time sequence; when the first image is different from the second image, predicting a single-frame code stream when the second image is encoded by the first encoder based on a reference frame, a basic quality layer and a second image of the first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a coding level included in the first encoder, and the coding quality of the basic quality layer corresponds to the coding quality of the second encoder; when the single-frame code stream is less than or equal to a single-frame coding limit value, encoding the second image using the first encoder to obtain a target coding result of the second image; and outputting the target coding result.

[0090] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: when the first image is the same as the second image, it also includes: obtaining the encoding type of the first image; when the first image is encoded using the first encoder, encoding the second image using the first encoder to obtain a first encoding result of the second image, wherein the target encoding result includes the first encoding result; and outputting the first encoding result.

[0091] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for performing the following steps: when the first image is encoded using the second encoder, inputting the second image into the first encoder; encoding the second image using the first encoder to obtain a second encoding result of the second image, wherein the target encoding result includes the second encoding result; and when the encoding quality layer corresponding to the second encoding result is higher than the basic quality layer, outputting the second encoding result.

[0092] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: obtaining a target frame rate and a bandwidth of a data transmission channel, wherein the target frame rate is a frame rate output parameter of a target encoding result, and the data transmission channel is used to transmit the target encoding result; determining a single frame encoding limit value based on the target frame rate and bandwidth; and determining a basic quality layer of the first encoder using a PSNR indicator based on the second encoder and the bandwidth.

[0093] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: acquiring a third image, wherein the third image is the next frame image of the second image in time sequence; when the third image is different from the second image, interrupting the output of the target encoding result; outputting a third encoding result, wherein the third encoding result is obtained by encoding the third image.

[0094] Optionally, in this embodiment, the non-volatile storage medium is configured to store a program code for executing the following steps: when the target encoding result reaches the highest quality layer of the first encoder, updating the reference frame of the first encoder to the second image.

[0095] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: when a single-frame code stream is greater than a single-frame encoding limit value, it also includes: encoding a second image using a second encoder to obtain a target encoding result of the second image, wherein the amount of data encoded by the second encoder for the single-frame image is less than or equal to the single-frame encoding limit value.

[0096] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0097] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0100] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0102] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data processing method, It is characterized in that include: Acquire a first image and a second image, wherein the second image is a next frame image of the first image in time sequence; In the case where the first image is different from the second image, predicting a single frame code stream when the second image is encoded by the first encoder according to a reference frame, a basic quality layer and the second image of a first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a pre-selected image quality layer in the first encoder, the encoding quality of the basic quality layer is the same as the encoding quality of the second encoder, and the second encoder is a non-progressive encoder, including: a video encoder; When the single-frame code stream is less than or equal to the single-frame coding limit value, encoding the second image using the first encoder to obtain a target coding result of the second image; When the single-frame code stream is greater than the single-frame coding limit value, the second encoder is used to encode the second image to obtain the target coding result of the second image, wherein the amount of data of the single-frame image encoded by the second encoder is less than or equal to the single-frame coding limit value; Output the target encoding result.

2. The method according to claim 1, It is characterized in that In the case where the first image is the same as the second image, the method further includes: Obtaining a coding type of the first image; In a case where the first image is encoded by the first encoder, the second image is encoded by the first encoder to obtain a first encoding result of the second image, wherein the target encoding result includes the first encoding result; Output the first encoding result.

3. The method according to claim 2, It is characterized in that Also includes: When the first image is encoded by the second encoder, inputting the second image into the first encoder; encoding the second image by using the first encoder to obtain a second encoding result of the second image, wherein the target encoding result includes the second encoding result; In a case where the coding quality layer corresponding to the second coding result is higher than the basic quality layer, the second coding result is output.

4. The method according to any one of claims 1 to 3, It is characterized in that Also includes: Acquire a target frame rate and a bandwidth of a data transmission channel, wherein the target frame rate is a frame rate output parameter of the target encoding result, and the data transmission channel is used to transmit the target encoding result; Determining the single-frame encoding limit value according to the target frame rate and the bandwidth; A basic quality layer of the first encoder is determined by adopting a PSNR indicator according to the second encoder and the bandwidth.

5. The method according to claim 4, It is characterized in that Also includes: Acquire a third image, wherein the third image is a next frame image of the second image in time sequence; When the third image is different from the second image, interrupting the output of the target encoding result; A third encoding result is output, wherein the third encoding result is obtained by encoding the third image.

6. The method according to claim 4, It is characterized in that Also includes: When the target encoding result reaches the highest quality layer of the first encoder, the reference frame of the first encoder is updated to the second image.

7. A data processing device, It is characterized in that include: An acquisition module, used to acquire a first image and a second image, wherein the second image is a next frame image of the first image in time sequence; A prediction module, configured to predict, when the first image is different from the second image, a single frame code stream when the second image is encoded by the first encoder according to a reference frame, a basic quality layer and the second image of a first encoder, wherein the first encoder is a progressive encoder, the basic quality layer is a pre-selected image quality layer in the first encoder, the encoding quality of the basic quality layer is the same as the encoding quality of the second encoder, and the second encoder is a non-progressive encoder, comprising: a video encoder; an encoding module, configured to, when the single-frame code stream is less than or equal to a single-frame encoding limit value, use the first encoder to encode the second image to obtain a target encoding result of the second image; and, when the single-frame code stream is greater than the single-frame encoding limit value, use the second encoder to encode the second image to obtain the target encoding result of the second image, wherein the amount of data encoded by the second encoder for the single-frame image is less than or equal to the single-frame encoding limit value; An output module is used to output the target encoding result.

8. A non-volatile storage medium, It is characterized in that The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 6.

9. A processor, It is characterized in that The processor is used to run a program, wherein the program executes the data processing method according to any one of claims 1 to 6 when running.