Image processing method and apparatus, and device

By categorizing P frames and applying selective frame exclusion, the method addresses playback disruptions and bandwidth issues, ensuring continuous video decoding and efficient resource utilization.

GB2634174APending Publication Date: 2025-04-02HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
GB2024017832
Authority / Receiving Office
GB · GB
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-06-24
Filing Date
2023-06-25
Publication Date
2025-04-02

AI Technical Summary

Technical Problem

Existing video encoding methods face issues with frame dropping, particularly with P frames, leading to incorrect decoding and playback disruptions when a P frame is dropped, as subsequent frames rely on previous frames for encoding.

Method used

The method divides P frames into different types (e.g., first-type and second-type P frames) based on their positional relationships, allowing for selective frame exclusion based on sampling ratios, ensuring playback continuity and bandwidth savings.

Benefits of technology

This approach ensures uninterrupted video playback by strategically dropping frames while maintaining image quality and reducing bandwidth consumption, suitable for decoding, network transmission, and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application provides an image processing method and apparatus, and a device. The method comprises: dividing all P frames in a GOP sequence into at least two types of P frames, the at least
Need to check novelty before this filing date? Find Prior Art

Description

1 JlL V / I l 1Al Ju JLJlLJLjJLf The present application relates to the field of video encoding and decoding, and in particular to an image processing method, apparatus and device. BACKGROUND In order to save space, video images are transmitted after being encoded. A complete video encoding method may include processes such as prediction, transformation, quantization, entropy encoding, filtering, etc., wherein predictive encoding may include intra encoding and inter encoding. The inter encoding uses pixels of adjacent encoded images to predict pixels of the current image by using correlation in a video time domain, to achieve the purpose of removing redundancy in the video time domain. The intra encoding takes into account strong correlation in space domain between adjacent blocks, and uses surrounding pixels that have been reconstructed as reference pixels to predict the current un-coded block, which only needs to perform subsequent encoding processing on residual values instead of encoding original values, thereby effectively removing the redundancy in the space domain and greatly improving the compression efficiency. In the process of encoding a video, all of images can be divided into I frames and P frames. An I frame is an image using the intra encoding, that is, it can be encoded independently without reference to any other image. A P frame is an image using the inter encoding, that is, it need to be encoded with reference to other image to complete the encoding, such as relying on a previous image to complete the encoding. For example, continuous video frames include frames 1 to 10 in order, wherein the frame 1 is an I frame, the frames 2 to 5 are P frames, the frame 6 is an I frame, and the frames 7 to 10 are P frames. Then, the frame 1 uses intra encoding, the frame 2 completes inter encoding with reference to the frame 1, the frame 3 completes inter encoding with reference to the frame 2, the frame 4 completes inter encoding with reference to the frame 3, the frame 5 completes inter encoding with reference to the frame 4, the frame 6 uses intra encoding, the frame 7 completes inter encoding with reference to the frame 6, and so on. Obviously, in the above method, each of the P frames cannot be dropped. Once a P frame is dropped, the subsequent P frames cannot be processed correctly. For example, if the frame 3 is dropped, the frame 4 cannot complete inter encoding with reference to the frame 3, and the frame 5 cannot complete inter encoding with reference to the frame 4. SUMMARY The present application provides an image processing method, which includes: dividing all of P frames in a group of picture, GOP, sequence into at least two types of P frames, there is a P frame that cannot be used as a reference frame in the at least two types of P frames, and a P frame that can be used as a reference frame in the at least two types of P frames; if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, excluding a P frame that cannot be used as a reference frame, or if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, excluding a P frame that cannot be used as a reference frame and on a P frame that can be used as a reference frame. In one possible implementation, the method includes: dividing all of the P frames in the GOP sequence into first-type P frames and second-type P frames; wherein a first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type p frame, and can be used as a reference frame for a second-type P frame; if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding first-type P frames, or excluding the first-type P frames and second-type P frames. In one possible implementation, dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames includes: dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames on the basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, there are Ml first-type P frames between two adjacent second-type P frames, and there are M2 first-type P frames between an I frame of the GOP sequence and a first second-type P frame; wherein, Ml is a positive integer, and M2 is a positive integer. For each first-type P frame, if there is / are previous second-type P frame(s) to this first-type P frame, a previous second-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; if there is no previous second-type P frame to this first-type P frame, an I frame of the GOP sequence is used as a reference frame for this first-type P frame. For each second-type P frame, if there is / are previous second-type P frame(s) to this second-type P frame, a previous second-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous second-type P frame to this second-type P frame, the 1 frame of the GOP sequence is used as a reference frame for this second-type P frame. Exemplarily, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames includes: if it is determined on a basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, excluding all or some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames; or, if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, then excluding some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames; wherein, the second sampling ratio is greater than the first sampling ratio, and the third sampling ratio is greater than the second sampling ratio. In one possible implementation, the method further includes: if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, then determining a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; or, if the service information includes network quality corresponding to a target network between a sending end and a receiving end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the network quality; if the network quality is not at an optimal level of network quality, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on the basis of the network quality; wherein, the sampling ratio is the first sampling ratio or the second sampling ratio; or, the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio. In one possible implementation, the method includes: dividing all of the P frames in the GOP sequence into first-type P frames, second-type P frames and third-type P frames; wherein a first-type P frame cannot be used as a reference frame, a second-type P frames can only be used as a reference frame for a first-type P frame, and a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame; if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames. In one possible implementation, dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames includes dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames on the basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, there are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame is located between the two first-type P frames; there are two first-type P frames and one second-type P frame between an I frame of the GOP sequence and a first third-type P frame, and the one second-type P frame is located between the two first-type P frames. Exemplarily, for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame is used as the reference frame for this first-type P frame; if a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous third-type P frame(s) to this second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous third-type P frame to this second-type P frame, the I frame of the GOP sequence is used as the reference frame for this second-type P frame; for each third-type P frame, if there is / are previous third-type P frame(s) to this third-type P frame, a previous third-type P frame closest to this third-type P frame is used as the reference frame for this third-type P frame; if there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as the reference frame for this third-type P frame. Exemplarily, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames includes: if it is determined on the basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, excluding all or some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames; wherein the second sampling ratio is greater than the first sampling ratio; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, excluding all of the first-type P frames, excluding all of the second-type P frames, and excluding all or some of the third-type P frames; wherein the third sampling ratio is greater than the second sampling ratio. The method further includes: if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, then determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio; or, if the service information includes network quality corresponding to a target network between a sending end and a receiving end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the network quality; if the network quality is not at an optimal level of network quality, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on the basis of the network quality, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio. Exemplarily, the method further includes: when an image sequence set includes at least two GOP sequences, for each GOP sequence, if this GOP sequence is not a first GOP sequence of the image sequence set, using an I frame of the first GOP sequence as a reference frame for a first frame of the GOP sequence. The present application provides an image processing apparatus, which includes: a dividing module, configured to divide all of P frames in a group of pictures (GOP) sequence into at least two types of P frames, wherein there is a P frame that cannot be used as a reference frame in the at least two types of P frames, and there is a P frame that can be used as a reference frame in the at least two types of P frames; a processing module, configured to, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude a P frame that cannot be used as a reference frame; or, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude a P frame that cannot be used as a reference frame and a P frame that can be used as a reference frame. In one possible implementation, the dividing module is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames and second-type P frames; wherein a first-type P frame cannot be used as a reference frame, the second-type P frame can be used as a reference frame for a first-type P frame, and can be used as a reference frame for a second-type P frame; the processing module is specifically configured to, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, exclude the first-type P frames, or exclude the first-type P frames and the second-type P frames. Wherein, when dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames, the dividing module is specifically configured to divide all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames on the basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, there are Ml first-type P frames between two adjacent second-type P frames, and there are M2 first-type P frames between an I frame of the GOP sequence and a first second-type P frame; wherein, both Ml and M2 are positive integers. Wherein, for each first-type P frame, if there is / are previous second-type P frame(s) to this first-type P frame, a previous second-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; if there is no previous second-type P frame to this first-type P frame, an I frame of the GOP sequence is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous second-type P frame(s) to this second-type P frame, a previous second-type P frame closest to this second-type P frame is used as the reference frame for this second-type P frame; if there is no previous second-type P frame to this second-type P frame, the I frame of the GOP sequence is used as the reference frame for this second-type P frame. Wherein, when if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, the processing module is specifically configured to, if it is determined on the basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; or, if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein, the second sampling ratio is greater than the first sampling ratio, and the third sampling ratio is greater than the second sampling ratio. Wherein, the processing module is further configured to, if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; or, if the service information includes network quality corresponding to a target network between a sending end and a receiving end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the network quality; if the network quality is not at an optimal level of network quality, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the network quality; and the sampling ratio is the first sampling ratio or the second sampling ratio; or, the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio. Wherein, the dividing module is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames, second-type P frames and third-type P frames; wherein a first-type P frame cannot be used as a reference frames, a second-type P frame can only be used as a reference frame for a first-type P frame, and a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame; and the processing module is specifically configured to, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, exclude the first-type P frames, or exclude the first-type P frames and the second-type P frames, or exclude the first-type P frames, the second-type P frames and the third-type P frames. Wherein, when dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames, the dividing module is specifically configured to divide all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames on the basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, for all of the P frames in the GOP sequence, there are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame is located between the two first-type P frames; there are two first-type P frames and one second-type P frame between an 1 frame of the GOP sequence and a first third-type P frame, and the one second-type P frame is located between the two first-type P frames. Wherein, for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame is used as the reference frame for this first-type P frame; if a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous third-type P frame(s) to this second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous third-type P frame to this second-type P frame, the I frame of the GOP sequence is used as a reference frame for this second-type P frame; for each third-type P frame, if there is / are previous third-type P frame(s) to this third-type P frame, a previous third-type P frame closest to this third-type P frame is used as a reference frame for this third-type P frame; if there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as a reference frame for this third-type P frame. Wherein, when if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames, the processing module is specifically configured to, if it is determined on the basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein the second sampling ratio is greater than the first sampling ratio; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, exclude all of the second-type P frames , and exclude all or some of the third-type P frames; wherein the third sampling ratio is greater than the second sampling ratio. Wherein, the processing module is further configured to, if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio; or, if the service information includes network quality corresponding to a target network between an encoding end and a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the network quality; if the network quality is not an optimal level of network quality, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine the sampling ratio corresponding to the GOP sequence on the basis of the network quality, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio. When an image sequence set includes at least two GOP sequences, for each GOP sequence, if this GOP sequence is not a first GOP sequence of the image sequence set, the dividing module is further configured to use an I frame of the first GOP sequence as a reference frame for a first frame of the GOP sequence. The present application provides an image processing device, which includes a processor and a machine-readable storage medium having stored therein machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions to implement the image processing method disclosed in the above embodiment of the present application. It can be seen from the above technical solutions that in the embodiments of the present application, all of P frames in a GOP (group of pictures) sequence can be divided into a P frame that cannot be used as a reference frame and a P frame that can be used as a reference frame. On this basis, the P frame that cannot be used as a reference frame can be excluded, or the P frame that cannot be used as a reference frame and the P frame that can be used as a reference frame can be excluded. The above method provides a new video frame sequence, which includes different types of P frames. In the video frame sequence, frames can be dropped according to a certain rule, which can not only ensure that the video frame sequence is played in sequence which has the characteristics of intermittently dropping P frames according to the rule without affecting viewing, but also some P frames are dropped, in some special scenarios, to save bandwidth. The video frame sequence has a better use prospect in decoding, network transmission, and storage, and has the characteristics of decoding multiplication channels, low bandwidth transmission, and low bit rate storage, etc. BRIEF DESCRIPTION OF THE DRAWINGS Figures lAand IB are schematic diagrams of a GOP sequence; Figure 2 is a schematic flow chart of an image processing method in one implementation of the present application; Figures 3 A and 3B are schematic diagrams of a GOP sequence; Figures 4A to 4C are schematic diagrams of performing frame exclusion on P frames in GOP sequences; Figures 5A to 5E are schematic diagrams of displaying images through multiple channels; Figure 6 is a schematic diagram of an image sequence set; Figure 7 is a schematic flow chart of an image processing method in one implementation of the present application; Figures 8 A and 8B are schematic diagrams of a GOP sequence; Figures 9Ato 9C are schematic diagrams of performing frame exclusion on P frames in GOP sequences; Figure 10 is a schematic diagram of an image sequence set; Figure 11 is a schematic diagram of a structure of an image processing apparatus in one implementation of the present application; Figure 12 is a hardware structure diagram of an image processing device in one implementation of the present application. DETAILED DESCRIPTION In the process of video encoding and video decoding, all of images can be divided into I frames and P frames. The I frame is an image using intra encoding, that is, it can be encoded independently without reference to any other image. The P frame is an image using inter encoding, that is, it needs to complete the encoding with reference to other image, such as relying on a previous image to complete the encoding. The video encoding is a compression technology created for image storage, which can compress an image into a data rate with a small volume and store it in a hard disk. When a video need to be played, the data rate is re-decoded into an image and the image is displayed. When encoding the image, there are encoding methods such as H.264 and H.265 and so on. The video decoding is a technology that re-decodes a data rate into an image. After the data rate (such as a data rate stored in a hard disk or transmitted from a network) is decoded into the image, the image can be displayed to achieve video playback. In the process of video encoding and video decoding, a GOP sequence may be formed by combining an I frame and all of P frames between the I frame and a next I frame, that is, a first frame of the GOP sequence is the I frame, and there is only one I frame in the GOP sequence, and the I frame of the GOP sequence may be followed by P frames. For example, continuous video frames include frames 1 to 10 in order, the frame 1 is an I frame, the frames 2 to 5 are P frames, the frame 6 is an I frame, and the frames 7 to 10 are P frames, then, GOP sequence 1 includes the frames 1 to 5, and GOP sequence 2 includes the frames 6 to 10, as shown in Figure 1A, which shows the GOP sequence 1 and the GOP sequence 2, and each GOP sequence may include one I frame and multiple P frames. For each GOP sequence, each P frame in the GOP sequence needs to refer to a previous frame. For example, for the GOP sequence 1, the frame 2 completes inter encoding with reference to the frame 1, the frame 3 completes inter encoding with reference to the frame 2, the frame 4 completes inter encoding with reference to the frame 3, and the frame 5 completes inter encoding with reference to the frame 4. However, in the above structure, each of the P frames cannot be dropped. Once a P frame is dropped, subsequent P frames cannot be processed correctly. For example, as shown in Figure IB, if the frame 3 is dropped, the frame 4 cannot complete inter encoding with reference to the frame 3, and the frame 5 cannot complete inter encoding with reference to the frame 4. That is to say, all of the P frames subsequent to the frame 3 cannot be processed correctly. Normally, there will be a period of time between 2 to 10 seconds between two I frames. If a P frame is dropped, it will result in the image failing to be displayed normally for several seconds. In view of the above problems, a new video frame sequence is provided by an embodiment of the present application. The video frame sequence may include different types of P frames, such as P frames that cannot be used as reference frames and P frames that can be used as reference frames. The video frame sequence may drop a frame according to a certain rule, which can ensure that the video frame sequence is played in order and viewing is not affected when a P frame is dropped, and also achieve the purpose of saving bandwidth by dropping some P frames. The new video frame sequence in the embodiment of the present application can divide all of P frames in a GOP sequence into at least two types of P frames, which include P frames that cannot be used as reference frames, and P frames that can be used as reference frames. On this basis, if it is detennined that frame exclusion needs to be performed on P frames in the GOP sequence, the P frames that cannot be used as reference frames are excluded, or if it is detennined that frame exclusion needs to be performed on P frames in the GOP sequence, the P frames that cannot be used as reference frames and P frames that can be used as reference frames are excluded. The technical solutions of embodiments of the present application are described below in combination with specific embodiments. In an embodiment of the present application, an image processing method is provided, which can be applied to any device. Referring to Figure 2, which is a schematic flow chart of the image processing method, the method may include: Step 201, dividing all of P frames in a GOP sequence into first-type P frames and second-type P frames; exemplarily, a first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, and the second-type P frame can also be used as a reference frame for a second-type P frame. Exemplarily, for each GOP sequence, the GOP sequence may include an I frame and multiple P frames. In the embodiment of the present application, all of P frames in the GOP sequence may be divided into two types of P frames, which may be called first-type P frames and second-type P frames, respectively. A first-type P frame can also be called an ordinary P frame, and cannot be used as a reference frame for other frame. The first-type P frame can use other frame as a reference frame for this first-type P frame. For example, the first-type P frame can use a second-type P frame as the reference frame, or the first-type P frame can use an I frame of the GOP sequence as the reference frame. However, the first-type P frame cannot use other first-type P frame as the reference frame. A second-type P frame can also be called a referenced P frame (that is, the second-type P frame can be used as a reference frame). The second-type P frame can be used as a reference frame for a first-type P frame, and the second-type P frame can also be used as a reference frame for a second-type P frame. The second-type P frame can use other frame as a reference frame for this second-type P frame. For example, the second-type P frame can use other second-type P frame as the reference frame, or the second-type P frame can use the I frame of the GOP sequence as the reference frame. However, the second-type P frame cannot use the first-type P frame as the reference frame. In one possible implementation, when all of P frames in a GOP sequence are divided into first-type P frames and second-type P frames, any dividing method can be used, and there is no limitation on this dividing method, as long as both the first-type P frames and the second-type P frames exist. Exemplarily, all of the P frames in the GOP sequence may be divided into the first-type P frames and the second-type P frames based on a position ordering relationship among all P frames in the GOP sequence, that is, the dividing method is based on the position ordering relationship. The position ordering relationship refers to which P frame a P frame is in the GOP sequence, such as the first P frame, the second P frame, etc., which is used to indicate at which position in the GOP sequence it is located. For example, the first P frame is a first-type P frame, the second P frame is a second-type P frame, the third P frame is a first-type P frame, the fourth P frame is a second-type P frame, and so on. For another example, the first and second P frames are first-type P frames, the third and fourth P frames are second-type P frames, and so on. For another example, the first and second P frames are first-type P frames, the third P frame is a second-type P frame, and so on. For another example, the first, second and third P frames are first-type P frames, the fourth P frame is a second-type P frame, and so on. For another example, the first P frame is a first-type P frame, the second and third P frames are second-type P frames, and so on. Of course, the above dividing methods are just examples. Exemplarily, when all of P frames are divided into first-type P frames and second-type P frames, the number of the first-type P frames may be the same as that of the second-type P frames, or the number of the first-type P frames may be different from that of the second-type P frames. When the number of the first-type P frames is different from that of the second-type P frames, the number of the first-type P frames may be greater than that of the second-type P frames, or the number of the first-type P frames may be less than that of the second-type P frames. For example, in the following, it takes that the number of the first-type P frames is greater than that of the second-type P frames as an example. Exemplarily, when all of P frames are divided into first-type P frames and second-type P frames, at least two first-type P frames may occur consecutively, but two second-type P frames may not occur consecutively. For example, a first-type P frame may be followed by a first-type P frame or a second-type P frame, and a second-type P frame may be followed by a first-type P frame, but the second-type P frame may not be followed by a second-type P frame. Exemplarily, the I frame of the GOP sequence may be followed by a first-type P frame, or the I frame of the GOP sequence may be followed by a second-type P frame. For example, the first P frame following the I frame of the GOP sequence is a first-type P frame. In one possible implementation, when all of P frames in a GOP sequence are divided into first-type P frames and second-type P frames, Ml first-type P frames exist between two adjacent second-type P frames, and M2 first-type P frames exist between the I frame (i.e., the first frame) of the GOP sequence and a first second-type P frame. Ml and M2 are positive integers, both of them can be configured based on experience, and Ml and M2 can be the same or different. Wherein, when Ml first-type P frames exist between two adjacent second-type P frames, Ml is variable. For example, 3 first-type P frames exist between the first second-type P frame and a second second-type P frame, 4 first-type P frames exist between the second second-type P frame and a third second-type P frame, 3 first-type P frames exist between the third second-type P frame and a fourth second-type P frame, and so on. Exemplarily, a first-type P frame needs to be included between two adjacent second-type P frames, and the number of first-type P frames can be kept at a fixed number, such as the number of the first-type P frames is more than 1. However, in order to prevent image quality being poor, the number of the first-type P frames cannot be too large. For the convenience of description, in the embodiment of the present application, it takes that three first-type P frames are included between two adjacent second-type P frames as an example, and three first-type P frames exist between the I frame of the GOP sequence and the first second-type P frame. Of course, the above dividing method is only an example and does not aim at limiting. For example, four first-type P frames being included between two adjacent second-type P frames can be taken as an example, or two first-type P frames being included between two adjacent second-type P frames can be taken as an example. For the convenience of description, in an embodiment of the present application, a GOP sequence shown in Figure 3 A is taken as an example, wherein the first frame following the I frame is a first-type P frame, and three first-type P frames exist between the I frame and a first second-type P frame. Three first-type P frames exist between two adjacent second-type P frames. Referring to Figure 3A, all frames in the GOP sequence are ordered as: an I frame, a first-type P frame, a first-type P frame, a first-type P frame, a second-type P frame, a first-type P frame, a first-type P frame, a first-type P frame, a second-type P frame, and so on. In one possible implementation, based on the characteristic that “a first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, and the second-type P frame can also be used as a reference frame for a second-type P frame”, then: for each first-type P frame, if there are / is previous second-type P frame(s) to the first-type P frame, a previous second-type P frame closest to the first-type P frame is used as a reference frame for a first-type P frame; if there is no previous second-type P frame to the first-type P frame, the I frame of the GOP sequence is used as a reference frame for a first-type P frame. For each second-type P frame, if there are / is previous second-type P frame(s) to the second-type P frame, a previous second-type P frame closest to the second-type P frame is used as a reference frame for a second-type P frame; if there is no previous second-type P frame to the second-type P frame, the I frame of the GOP sequence is used as a reference frame for a second-type P frame. Referring to Figure 3B, relationships between each P frame and reference frame are shown. For first-type P frames, a reference frame for a first first-type P frame is a previous I frame, a reference frame for a second first-type P frame is the previous I frame, a reference frame for a third first-type P frame is the previous I frame, a reference frame for a fourth first-type P frame is a previous second-type P frame, a reference frame for a fifth first-type P frame is the previous second-type P frame, a reference frame for a sixth first-type P frame is the previous second-type P frame, and so on. For second-type P frames, a reference frame for a first second-type P frame is the previous I frame, a reference frame for a second second-type P frame is the previous second-type P frame, a reference frame for a third second-type P frame is the previous second-type P frame, and so on. Step 202, if it is determined that frame exclusion needs to be performed on P frames in a GOP sequence, excluding first-type P frames, or excluding first-type P frames and second-type P frames. Exemplarily, performing frame exclusion on a P frame refers to that this P frame is not processed, for example, when a P frame needs to be excluded on an encoding end, the P frame will not be encoded, and when a P frame needs to be excluded on a decoding end, the P frame will not be decoded. In one possible implementation, if it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, all of first-type P frames or some of the first-type P frames may be excluded; or, all of the first-type P frames may be excluded, and all of second-type P frames or some of the second-type P frames may be excluded. In summary, it can be seen that when a first-type P frame need to be excluded, it is not necessary to consider whether the second-type P frame is excluded, and the first-type P frame can be directly excluded. When a second-type P frame needs to be excluded, it is necessary to consider whether the first-type P frame is excluded, and the second-type P frame can be excluded only after all of the first-type P frames are excluded. In one possible implementation, in order to perform frame exclusion on P frames in a GOP sequence, multiple sampling ratios may be defined, which are used to indicate how many P frames are to be excluded. For example, when the sampling ratio is x, it indicates that x of all the P frames are to be excluded, and different sampling ratios indicate different sampling methods. For example, two sampling ratios may be defined, which are recorded as a first sampling ratio and a second sampling ratio, wherein the first sampling ratio is smaller than the second sampling ratio. For the first sampling ratio, all of the first-type P frames or some of the first-type P frames may be excluded; for the second sampling ratio, all of the first-type P frames may be excluded, and all of the second-type P frames or some of the second-type P frames may be excluded. For another example, three sampling ratios may be defined, which are recorded as a first sampling ratio, a second sampling ratio, and a third sampling ratio, wherein the first sampling ratio is smaller than the second sampling ratio, and the second sampling ratio is smaller than the third sampling ratio. For the first sampling ratio, some of the first-type P frames may be excluded; for the second sampling ratio, all of the first-type P frames may be excluded; for the third sampling ratio, all of the first-type P frames may be excluded, and all or some of the second-type P frames may be excluded. For yet another example, four sampling ratios may be defined, which are recorded as a first sampling ratio, a second sampling ratio, a third sampling ratio, and a fourth sampling ratio, wherein the first sampling ratio is smaller than the second sampling ratio, the second sampling ratio is smaller than the third sampling ratio, and the third sampling ratio is smaller than the fourth sampling ratio. For the first sampling ratio, some of the first-type P frames are excluded; for the second sampling ratio, all of the first-type P frames are excluded; for the third sampling ratio, all of the first-type P frames are excluded and some of the second-type P frames are excluded; for the fourth sampling ratio, all of the first-type P frames are excluded and all of the second-type P frames are excluded. Of course, the above is only examples of defining sampling ratios, which does not aim at limiting. Any number of sampling ratios can be defined. For the convenience of description, the following description will take defining two or three sampling ratios as an example. Exemplarily, on the basis of defining the first sampling ratio, the second sampling ratio and the third sampling ratio, if it needs to perform frame exclusion on P frames in a GOP sequence using the first sampling ratio, then some of the first-type P frames are excluded; if it needs to perform frame exclusion on P frames in the GOP sequence using the second sampling ratio, all of the first-type P frames are excluded; if it needs to perform frame exclusion on P frames in the GOP sequence using the third sampling ratio, then all of the first-type P frames are excluded, and all or some of the second-type P frames are excluded. Assuming that the total number of the first-type P frames accounts for xl of that of P frames, the total number of the second-type P frames accounts for x2 of that of P frames, and a sum of xl and x2 is 1, then the first sampling ratio is less than xl, the second sampling ratio is less than or equal to xl, and the second sampling ratio being equal to xl is taken as an example, the third sampling ratio is less than or equal to xl+ x2. Referring to Figure 3A and Figure 3B, xl is 0.75, and x2 is 0.25. On this basis, if a sampling ratio is less than or equal to 0.5, the sampling ratio can be determined as the first sampling ratio. If a sampling ratio is greater than 0.5, and less than or equal to 0.75, the sampling ratio can be determined as the second sampling ratio. If a sampling ratio is greater than 0.75, and less than or equal to 1, the sampling ratio can be determined as the third sampling ratio. In summary, it can be seen that when the P frames are performed frame exclusion, all or some of the first-type P frames are preferentially excluded, and after all of the first-type P frames are excluded, all or some of the second-type P frames are excluded. When some of the second-type P frames are excluded, previous second-type P frame(s) is / are retained, and following second-type P frame(s) is / are excluded, for example, all of the second-type P frames following a kth (k is greater than 1) second-type P frame are excluded. As shown in Figure 4A, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using a first sampling ratio, some of first-type P frames are excluded. In this case, the first sampling ratio is less than or equal to 0.5. The first sampling ratio of 0.5 is taken as an example, it needs to exclude two first-type P frames between two second-type P frames, that is, one first-type P frame is retained between the two second-type P frames. For example, frame exclusion is performed on three first-type P frames between the two second-type P frames according to a strategy of one dropped, one retained, and one dropped. As shown in Figure 4B, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using a second sampling ratio, all of first-type P frames are excluded. In this case, the second sampling ratio is less than or equal to 0.75 and greater than 0.5. As shown in Figure 4C, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using a third sampling ratio, all of first-type P frames can be excluded, and all of second-type P frames can be excluded. In this case, the third sampling ratio is less than or equal to 1 and greater than 0.75. As shown in Figure 4A, one GOP sequence can implement 1 / 2 frame exclusion. When the 1 / 2 frame exclusion fails to meet service requirements, as shown in Figure 4B, one GOP sequence can implement 3 / 4 frame exclusion. When the 3 / 4 frame exclusion fails to meet service requirements, as shown in Figure 4C, one GOP sequence can implement full frame exclusion. Exemplarily, on the basis of defining the first sampling ratio and the second sampling ratio, if it is determined that the frame exclusion needs to be performed on the P frames in a GOP sequence using the first sampling ratio, then all of first-type P frames may be excluded; if it is detennined that the frame exclusion needs to be performed on the P frames in a GOP sequence using the second sampling ratio, then all of first-type P frames may be excluded, and all or some of second-type P frames may be excluded. Assuming that the total number of the first-type P frames accounts for xl of that of P frames, the total number of the second-type P frames accounts for x2 of that of P frames, and a sum of xl and x2 is 1, then the first sampling ratio is less than or equal to xl, and the second sampling ratio is less than or equal to xl+x2. Referring to Figure 3A and Figure 3B, xl is 0.75, and x2 is 0.25. On this basis, if a sampling ratio is less than or equal to 0.75, it is determined that the sampling ratio is the first sampling ratio. If a sampling ratio is greater than 0.75 and less than or equal to 1, it is determined that the sampling ratio is the second sampling ratio. As shown in Figure 4B, if it is determined that the frame exclusion needs to be performed on the P frames in a GOP sequence using the first sampling ratio, all of first-type P frames may be excluded. In this case, the first sampling ratio is less than or equal to 0.75. As shown in Figure 4C, if it is determined that the frame exclusion needs to be performed on the P frames in a GOP sequence using the second sampling ratio, all of first-type P frames may be excluded and all of second-type P frames may be excluded. In this case, the second sampling ratio is less than or equal to 1 and greater than 0.75. As shown in Figure 4B, one GOP sequence can implement 3 / 4 frame excluded. When the 3 / 4 frame excluded fails to meet service requirements, as shown in Figure 4C, one GOP sequence can implement full frame excluded. In one possible implementation, on the basis of defining the first sampling ratio, the second sampling ratio and the third sampling ratio, a sampling ratio corresponding to a GOP sequence can be determined on the basis of service information. For example, it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the first sampling ratio, or it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the second sampling ratio, or it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the third sampling ratio. If frame exclusion being performed on P frames in the GOP sequence using the first sampling ratio can meet the service requirements corresponding to the service information, for example, excluding 50% of the P frames from the GOP sequence can meet the service requirements, it is detennined to use the first sampling ratio on the basis of the service information. If using the first sampling ratio fails to meet the service requirements, but frame exclusion being performed on P frames in the GOP sequence using the second sampling ratio can meet the service requirements corresponding to the service information, that is, excluding 75% of the P frames from the GOP sequence can meet the service requirements, it is determined to use the second sampling ratio on the basis of the service information. If using the first sampling ratio fails to meet the service requirements, and using the second sampling ratio also fails to meet the service requirements, it is determined to use the third sampling ratio on the basis of the service information. In another possible implementation, on the basis of defining the first sampling ratio and the second sampling ratio, a sampling ratio corresponding to a GOP sequence can be detennined on the basis of the service information. For example, it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the first sampling ratio, or it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the second sampling ratio. For example, if frame exclusion being performed on the P frames in the GOP sequence using the first sampling ratio can meet the service requirements corresponding to the service information, that is, excluding 75% of the P frames from the GOP sequence can meet the service requirements, then it is determined to use the first sampling ratio on the basis of the service information. If using the first sampling ratio fails to meet the service requirement, it is determined to use the second sampling ratio on the basis of the service information. On the basis of defining the first sampling ratio, the second sampling ratio and the third sampling ratio, the above frame exclusion process is described below in combination with two specific application scenarios of the service information. Of course, on the basis of defining the first sampling ratio and the second sampling ratio, the implementation method thereof can be similar, which will not be repeated herein. Application scenario 1: service information may include a resolution corresponding to a GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end. On the basis of the resolution, the frame rate, and the decoding capability, whether frame exclusion needs to be performed on P frames in the GOP sequence is determined. If frame exclusion does not need to be performed on P frames in the GOP sequence, no P frame in the GOP sequence is performed frame exclusion. If frame exclusion needs to be performed on P frames in the GOP sequence, a sampling ratio corresponding to the GOP sequence is determined on the basis of the resolution, the frame rate, and the decoding capability. For example, the sampling ratio corresponding to the GOP sequence may be a first sampling ratio, a second sampling ratio, or a third sampling ratio. Alternatively, the sampling ratio corresponding to the GOP sequence, such as the first sampling ratio or the second sampling ratio, is determined based on the resolution, the frame rate, and the decoding capability. For example, assuming that a NVR device has a decoding capability of 4*1080P30, that is, the NVR device can decode 4*30 frames of images with a resolution of 1920*1080 per second, and decoding of an image that beyonds this decoding capability cannot be completed. a. If the GOP sequence corresponds to 4*30 frames of images (with a resolution of 1920*1080, a frame rate of 4*30 frames), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion does not need to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate match with the decoding capability. Therefore, the NVR device does not perform frame exclusion on the P frames in the GOP sequence, and can decode 4*30 frames of images per second, and display 1080P30 images through 4 channels, as shown in Figure 5 A. b. If the GOP sequence corresponds to 8*30 frames of images (with a resolution of 1920*1080, a frame rate of 8*30 frames), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, the NVR device determines that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a first sampling ratio (that is, the method of 1 / 2 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P15 of images can be displayed through 8 channels, as shown in Figure 5B. Obviously, 8 channels of 15 frames correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as from 4 channels to 8 channels, the decoding capability can be made to support decoding images with this resolution and frame rate by performing frame exclusion on frames for each channel of the images, to meet service requirements. c. If the GOP sequence corresponds to 4*60 frames of images (with a resolution of 1920*1080, a frame rate of 4*60 frames), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, the NVR device determines that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a first sampling ratio (that is, the method of 1 / 2 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P30 of images can be displayed through 4 channels, as shown in Figure 5C. Obviously, after the 4*60 frames are performed frame exclusion in a manner of 1 / 2 frame exclusion, the 4*30 frames are remained. Obviously, when playing back at multiple times speed, such as changing from 30 frames of images to 60 frames of images, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images, to meet service requirements. Obviously, the 30 frames at double speed is equivalent to 60 frames per second, which, after 1 / 2 frame exclusion, is equivalent to 30 frames per second. d. If the GOP sequence corresponds to 12*30 frames of images (with a resolution of 1920*1080, a frame rate of 12*30 frames), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, the NVR device determines that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a second sampling ratio (that is, the method of 3 / 4 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P10 of images can be displayed through 12 channels, as shown in Figure 5D. Obviously, 12 channels of 10 frames correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as changing from 4 channels to 12 channels, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images, to meet service requirements. e. If the GOP sequence corresponds to 16*30 frames of images (with a resolution of 1920*1080, a frame rate of 16*30 frames), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, the NVR device determines that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a third sampling ratio (that is, the method of 4 / 4 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P7.5 of images can be displayed through 16 channels, as —29 — shown in Figure 5E. Obviously, 16 channels of 7.5 frames correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as changing from 4 channels to 16 channels, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images, to meet service requirements. In summary, it can be seen that when conditions of multiple times speed and / or multiple channels are changed arbitrarily, frames can be performed frame exclusion according to the first sampling ratio, the second sampling ratio, or the third sampling ratio, to meet service requirements. Application scenario 2: the service information may include network quality corresponding to a target network between a sending end and a receiving end, and whether frame exclusion needs to be performed on P frames in a GOP sequence is determined on the basis of the network quality. If frame exclusion does not need to be performed on P frames in a GOP sequence, no P frame in the GOP sequence is excluded. If frame exclusion needs to be performed on P frames in a GOP sequence, a sampling ratio corresponding to the GOP sequence is determined on the basis of the network quality. For example, the sampling ratio corresponding to the GOP sequence may be a first sampling ratio, a second sampling ratio, or a third sampling ratio. Alternatively, the sampling ratio corresponding to the GOP sequence is determined on the basis of the network quality, and the sampling ratio corresponding to the GOP sequence may be the first sampling ratio or the second sampling ratio. For example, when the sending end sends a GOP sequence to the receiving end, it is necessary to detect the network quality (such as jitter, packet loss rate, etc.) corresponding to the target network which is used to carry the GOP sequence, and there is no limitation on this detection method. In one possible implementation, four levels of network quality may be designed. If the network quality corresponding to the target network is a first level (i.e., an optimal level) of the network quality, it is determined that frame exclusion does not need to be performed on the P frames in a GOP sequence. If the network quality corresponding to the target network is a second level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the first sampling ratio, such as a method of 1 / 2 frame exclusion. If the network quality corresponding to the target network is a third level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the second sampling ratio, such as a method of 3 / 4 frame exclusion. If the network quality corresponding to the target network is a fourth level (i.e., a worst level) of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the third sampling ratio, such as a method of 4 / 4 frame exclusion. In another possible implementation, two levels of network quality may be designed. If the network quality corresponding to the target network is a first level (i.e., an optimal level) of the network quality, it is determined that frame exclusion is performed on no P frame in the GOP sequence. If the network quality corresponding to the target network is a second level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the first sampling ratio. During the transmission of the GOP sequence, if the network quality is still the second level of the network quality, the sampling ratio is adjusted to the second sampling ratio. During the transmission of the GOP sequence, if the network quality is still the second level of the network quality, the sampling ratio is adjusted to the third sampling ratio. In addition, during the transmission of the GOP sequence, if the network quality is restored to the first level of the network quality, no P frame in the GOP sequence is excluded. Of course, the above two application scenarios are just two examples for determining the sampling ratio, and other methods can also be used to determine the sampling ratio corresponding to the GOP sequence, and there is no limitation on this. For example, the sampling ratio corresponding to the GOP sequence is determined based on the size of each frame, such as when the size of the frame is less than a first threshold value, no P frame in the GOP sequence is excluded; when the size of the frame is greater than the first threshold value and less than a second threshold value, the sampling ratio is the first sampling ratio; when the size of the frame is greater than the second threshold value and less than a third threshold value, the sampling ratio is the second sampling ratio, and when the size of the frame is greater than the third threshold value, the sampling ratio is the third sampling ratio. In one possible implementation, at least two GOP sequences may be combined into one image sequence set. Based on this, when the image sequence set includes at least two GOP sequences, for each GOP sequence, if the GOP sequence is not the first GOP sequence of the image sequence set, an I frame of the first GOP sequence may be used as a reference frame for the first frame of the GOP sequence. In this implementation, if the GOP sequence is not the first GOP sequence of the image sequence set, the first frame of the GOP sequence may be called a key P frame (i.e., no longer called an I frame), and a reference frame of the key P frame is the previous I frame closest to the key P frame. Exemplarily, for an image sequence set, the image sequence set may include at least one key P frame, that is, at least one key P frame is allowed to exist, and the key P frame is used to replace the I frame. The key P frame can only refer to the previous I frame closest to the key P frame, and frame structure of the key P frame can effectively reduce the overall bandwidth. Referring to Figure 6, which is a schematic diagram of an image sequence set, the image sequence set may include a key P frame. Between an I frame and the key P frame, there may be first-type P frames and second-type P frames, and the structural relationships between the first-type P frames and the second-type P frames may refer to the above embodiment. Between two adjacent key P frames, there may exist the first-type P frames and the second-type P frames, and the structural relationships between the first-type P frames and the second-type P frames may refer to the above embodiment. On this basis, when frame exclusion is performed on P frames, the first-type P frames may be excluded, and the second-type P frames may be excluded, but the key P frames may not be excluded. It can be seen from the above technical solutions that in the embodiment of the present application, all of the P frames in a GOP sequence can be divided into first-type P frames and second-type P frames. A first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, and the second-type P frame can also be used as a reference frame for a second-type P frame. On this basis, the first-type P frame can be excluded, or the first-type P frame and the second-type P frame can be excluded. The above method provides a new video frame sequence, which includes different types of P frames, i.e., the first-type P frames and the second-type P frames. In the video frame sequence, frames can be dropped according to a certain rule, which can not only ensure that the video frame sequence is played in sequence which has the characteristics of intermittently dropping the P frames according to the rule without affecting viewing, but also some of the P frames are dropped, in some special scenarios, to save bandwidth. The video frame sequence has a better prospect of use in decoding, network transmission, and storage, and has the characteristics of decoding multiplication channels, low-bandwidth transmission, and low bit rate storage, etc. In a weak network environment, it can also solve problems of long-tenn black screen and blurred screen after frames are dropped. The frame dropping strategy can be implemented dynamically, and be adjusted arbitrarily according to an on-site situation, so as to flexibly and effectively reduce consumption without affecting the integrity of decoding. The video frame sequence can ensure the flexibility of frame excluded and the stability of image quality, which can effectively improve customer experience. The frames can be dropped in a certain rule during the decoding process to achieve decoding in the form of 1 / 2 frame, 3 / 4 frame, etc. Alternatively, low-bandwidth transmission of 1 / 2 frame and 3 / 4 frame can be achieved in the network transmission. This frame dropping strategy can be implemented dynamically, and be adjusted arbitrarily according to an on-site situation, so as to flexibly and effectively reduce consumption without affecting the integrity of decoding. An embodiment of the present application provides an image processing method, which can be applied to any device. Referring to Figure 7, which is a schematic flow chart of the image processing method, the method may include: Step 701, dividing all of P frames in a GOP sequence into first-type P frames, second-type P frames and third-type P frames; exemplarily, a first-type P frame cannot be used as a reference frame, a second-type P frame can only be used as a reference frame for a first-type P frame, a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame. Exemplarily, for each GOP sequence, the GOP sequence may include an I frame and multiple P frames. In the embodiment of the present application, all of the P frames in the GOP sequence may be divided into three types of P frames, which may be called first-type P frames, second-type P frames and third-type P frames. A first-type P frame can also be called an ordinary P frame, and cannot be used as a reference frame for other frame. The first-type P frame can use other frame as a reference frame for this first-type P frame. For example, the first-type P frame can use the second-type P frame as a reference frame, the first-type P frame can use the third-type P frame as a reference frame, or the first-type P frame can also use an I frame of the GOP sequence as a reference frame. However, the first-type P frame cannot use a first-type P frame (i.e., any other first-type P frame except this first-type P frame) as a reference frame. A second-type P frame can also be called a 2X-type P frame. The second-type P frame can only be used as a reference frame for a first-type P frame, but cannot be used as a reference frame for a second-type P frame, also cannot be used as a reference frame for a third-type P frame. The second-type P frame can use other frame as a reference frame for this second-type P frame. For example, the second-type P frame can use a third-type P frame as a reference frame, or the second-type P frame can use the I frame of the GOP sequence as a reference frame. However, the second-type P frame cannot use a second-type P frame (that is, any other second-type P frame except this second-type P frame) as a reference frame, and the second-type P frame cannot use the first-type P frame as a reference frame. The third-type P frame can also be called a 4X-type P frame. The third-type P frame can be used as a reference frame for a first-type P frame, and can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame. The third-type P frame can use other frame as a reference frame for a third-type P frame. For example, the third-type P frame can use a third-type P frame (that is, any other third-type P frame except the third-type P frame) as a reference frame, or the third-type P frame can use the I frame of the GOP sequence as a reference frame. However, the third-type P frame cannot use the second-type P frame as a reference frame, and the third-type P frame cannot use the first-type P frame as a reference frame. In one possible implementation, when all of P frames in a GOP sequence are divided into first-type P frames, second-type P frames, and third-type P frames, any dividing method may be used, which is not limited in this embodiment, as long as the first-type P frames, second-type P frames, and third-type P frames can exist at the same time. Exemplarily, all of the P frames in the GOP sequence may be divided into the first-type P frames, the second-type P frames, and the third-type P frames on the basis of a position ordering relationship among all the P frames in the GOP sequence, that is, the dividing method is on the basis of the position ordering relationship. The position ordering relationship refers to which P frame the P frame is in the GOP sequence, such as the first P frame, the second P frame, the third P frame, etc., which is used to indicate at which position in the GOP sequence it is located. For example, the first P frame is a first-type P frame, the second P frame is a second-type P frame, the third P frame is a third-type P frame, the fourth P frame is a first-type P frame, the fifth P frame is a second-type P frame, the sixth P frame is a third-type P frame, and so on. For example, the first P frame and the second P frame are first-type P frames, the third P frame and the fourth P frame are second-type P frames, the fifth P frame and the sixth P frame are third-type P frames, and so on. For another example, the first P frame is a first-type P frame, the second P frame is a second-type P frame, the third P frame is a first-type P frame, the fourth P frame is a third-type P frame, the fifth P frame is a first-type P frame, and the sixth P frame is a second-type P frame, and so on. For example, the first P frame and the second P frame are first-type P frames, the third P frame is a second-type P frame, the fourth P frame is a third-type P frame, the fifth P frame and the sixth P frame are first-type P frames, and so on. Of course, the above dividing methods are just a few examples. Exemplarily, when all of the P frames are divided into the first-type P frames, the second-type P frames and the third-type P frames, the number of the first-type P frames may be the same as that of the second-type P frames, or the number of the first-type P frames may be different from that of the second-type P frames. The number of the first-type P frames may be the same as that of the third-type P frames, or the number of the first-type P frames may be different from that of the third-type P frames. The number of the second-type P frames may be the same as that of the third-type P frames, or the number of the second-type P frames may be different from that of the third-type P frames. Exemplarily, the number of the first-type P frames may be greater than that of the second-type P frames, or the number of the first-type P frames may be less than that of the second-type P frames. The number of the first-type P frames may be greater than that of the third-type P frames, or the number of the first-type P frames may be less than that of the third-type P frames. The number of the second-type P frames may be greater than that of the third-type P frames, or the number of the second-type P frames may be less than that of the third-type P frames. For example, the number of the first-type P frames is greater than that of the second-type P frames, the number of the first-type P frames is greater than that of the third-type P frames, and the number of the second-type P frames is equal to that of the third-type P frames. For another example, the number of the second-type P frames is equal to that of the third-type P frames, and the number of the first-type P frames is greater than or equal to a sum of the number of die second-type P frames and that of the third-type P frames. Exemplarily, when all the P frames are divided into the first-type P frames, the second-type P frames, and the third-type P frames, the first-type P frames, the second-type P frames, and the third-type P frames may occur alternately, that is, two first-type P frames will not occur consecutively, two second-type P frames will not occur consecutively, and two third-type P frames will not occur consecutively. For example, the first-type P frame may be followed by a second-type P frame or a third-type P frame, but not a first-type P frame, the second-type P frame may be followed by a first-type P frame or a third-type P frame, but not a second-type P frame, and the third-type P frame may be followed by a first-type P frame or a second-type P frame, but not a third-type P frame. For example, the first-type P frame may be followed by a second-type P frame or a third-type P frame, the second-type P frame may be followed by a first-type P frame, and the third-type P frame may be followed by a first-type P frame. Exemplarily, the I frame in the GOP sequence may be followed by the first-type P frame, or the I frame in the GOP sequence may be followed by the second-type P frame, or the 1 frame in the GOP sequence may be followed by the third- type P frame, which is not limited. For example, the first P frame following the I frame in the GOP sequence is a first-type P frame. In one possible implementation, when all of the P frames in the GOP sequence are divided into the first-type P frames, the second-type P frames, and the third-type P frames, there may be two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame may be located between the two first-type P frames. In addition, there may be two first-type P frames and one second-type P frame between the I frame (i.e., the first frame) of the GOP sequence and a first third-type P frame, and this second-type P frame may be located between the two first-type P frames. Of course, the above dividing method is only an example and does not aim at limiting. For example, there may be three first-type P frames and two second-type P frames between two adjacent third-type P frames, and a second-type P frame is located between two first-type P frames. For another example, there may be two first-type P frames and three second-type P frames between two adjacent third-type P frames, and a first-type P frame is located between two second-type P frames. For another example, there may be two first-type P frames and two second-type P frames between two adjacent third-type P frames, and a second-type P frame is located between the two first-type P frames, while a first-type P frame is located between the two second-type P frames. For another example, there may be three first-type P frames and three second-type P frames between two adjacent third-type P frames, and a second-type P frame is located between two first-type P frames, while a first-type P frame is located between two second-type P frames. For the convenience of description, in this embodiment, taking the GOP sequence shown in Figure 8A as an example, the first frame following the I frame is a first-type P frame, and there are two first-type P frames and one second-type P frame between the I frame and a first third-type P frame, while the second-type P frame is located between the two first-type P frames. There are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the second-type P frame is located between the two first-type P frames. Referring to Figure 8A, all the frames in the GOP sequence are ordered as: the I frame, a first-type P frame, a second-type P frame, a first-type P frame, a third-type P frame, a first-type P frame, a second-type P frame, a first-type P frame, a third-type P frame, a first-type P frame, a second-type P frame, a first-type P frame, a third-type P frame, and so on. In one possible implementation, on the basis of the characteristics that “a first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame”, then: for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame (which may be an I frame, a second-type P frame, or a third-type P frame) is used as a reference frame for this first-type P frame. If a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame (such as an I frame, a second-type P frame, or a third-type P frame) closest to this first-type P frame is used as a reference frame for this first-type P frame. For each second-type P frame, if there is / are previous third-type P frame(s) to the second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame. If there is no previous third-type P frame to the second-type P frame, the I frame of the GOP sequence is used as the reference frame for this second-type P frame. For each third-type P frame, if there is / are previous third-type P frame(s) in front of the third-type P frame, a previous third-type P frame closest to this third-type P frame is used as a reference frame for this third-type P frame. If there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as the reference frame for this third-type P frame. Referring to Figure 8B, it shows the relationships between individual P frames and reference frames. For first-type P frames, a reference frame for a first first-type P frame is a previous I frame, a reference frame for a second first-type P frame is a previous second-type P frame, a reference frame for a third first-type P frame is a previous third-type P frame, a reference frame for a fourth first-type P frame is a previous second-type P frame, a reference frame for a fifth first-type P frame is a previous third-type P frame, and so on. For second-type P frames, a reference frame for a first second-type P frame is the previous I frame, a reference frame for a second second-type P frame is a previous third-type P frame, a reference frame for a third second-type P frame is a previous third-type P frame, and so on. For third-type P frames, a reference frame for a first third-type P frame is the previous I frame, a reference frame for a second third-type P frame is a previous third-type P frame, a reference frame for a third third-type P frame is a previous third-type P frame, and so on. Step 702, if it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, excluding first-type P frames, or excluding first-type P frames and second-type P frames, or excluding first-type P frames, second-type P frames and third-type P frames. Exemplarily, performing frame exclusion on a P frame may refer to that this P frame is not processed, for example, when a P frame needs to be excluded on an encoding end, the P frame will not be encoded, and when a P frame needs to be excluded on a decoding end, the P frame will not be decoded. In one possible implementation, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, all or some of the first-type P frames may be excluded; or, all of the first-type P frames may be excluded, and all or some of the second-type P frames are excluded; or, all of the first-type P frames may be excluded, all of the second-type P frames are excluded, and all or some of the third-type P frames are excluded. In summary, it can be seen that when a first-type P frame need to be excluded, it is not necessary to consider whether the second-type P frame and the third-type P frame are excluded, and the first-type P frame may be directly excluded. When a second-type P frame needs to be excluded, it is necessary to consider whether the first-type P frame is excluded, and it is not necessary to consider whether the third-type P frame is excluded, the second-type P frame can be excluded only after all of the first-type P frames are excluded. When a third-type P frame needs to be excluded, it is necessary to consider whether the first-type P frame is excluded and whether the second-type P frame is excluded, the third-type P frames can be excluded only after all of the first-type P frames are excluded and all of the second-type P frames are excluded. In one possible implementation, in order to perform frame exclusion on the P frame in the GOP sequence, multiple sampling ratios may be defined, which are used to indicate how many P frames are to be excluded. For example, when a sampling ratio is x, it indicates that x of all of the P frames are to be excluded. Different sampling ratios indicate different sampling methods. For example, three sampling ratios are defined, which are recorded as a first sampling ratio, a second sampling ratio and a third sampling ratio, wherein the first sampling ratio is smaller than the second sampling ratio, and the second sampling ratio is smaller than the third sampling ratio. For the first sampling ratio, all or some of first-type P frames are excluded; for the second sampling ratio, all of the first-type P frames are excluded, and all or some of second-type P frames are excluded; for the third sampling ratio, all of the first-type P frames are excluded, all of the second-type P frames are excluded, and all or some of third-type P frames are excluded. For another example, six sampling ratios are defined, which are recorded as a first sampling ratio, a second sampling ratio, a third sampling ratio, a fourth sampling ratio, a fifth sampling ratio and a sixth sampling ratio. The first sampling ratio is smaller than the second sampling ratio, the second sampling ratio is smaller than the third sampling ratio, the third sampling ratio is smaller than the fourth sampling ratio, the fourth sampling ratio is smaller than the fifth sampling ratio, and the fifth sampling ratio is smaller than the sixth sampling ratio. For the first sampling ratio, some of first-type P frames are excluded; for the second sampling ratio, all of the first-type P frames are excluded; for the third sampling ratio, all of the first-type P frames are excluded and some of second-type P frames are excluded; for the fourth sampling ratio, all of the first-type P frames are excluded and all of the second-type P frames are excluded; for the fifth sampling ratio, all of the first-type P frames are excluded, all of the second-type P frames are excluded, and some of third-type P frames are excluded; for the sixth sampling ratio, all of the first-type P frames are excluded, all of the second-type P frames are excluded, and all of the third-type P frames are excluded. Of course, the above is only examples of defining sampling ratios, and there is no limitation to this. Any number of sampling ratios can be defined. For the convenience of description, the following will take defining three sampling ratios as an example for explanation. On this basis, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence using the first sampling ratio, all or some of the first-type P frames can be excluded; if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence using the second sampling ratio, all of the first-type P frames can be excluded, and all or some of the second-type P frames can be excluded; if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence using the third sampling ratio, all of the first-type P frames can be excluded, all of the second-type P frames can be excluded, and all or some of the third-type P frames can be excluded. Exemplarily, assuming that the total number of the first-type P frames accounts for xl of that of the P frames, the total number of the second-type P frames accounts for x2 of that of the P frames, the total number of the third-type P frames accounts for x3 of that of the P frames, and the sum of xl, x2 and x3 is 1, then the first sampling ratio is less than or equal to xl, the second sampling ratio is greater than xl and less than or equal to xl+x2, and the third sampling ratio is greater than xl+x2 and less than or equal to xl+x2+x3. Referring to Figure 8A and Figure 8B, xl is 0.5, x2 is 0.25, and x3 is 0.25. On this basis, if a sampling ratio is less than or equal to 0.5, it means that the sampling ratio is the first sampling ratio. If a sampling ratio is greater than 0.5 and less than or equal to 0.75, it means that the sampling ratio is the second sampling ratio. If a sampling ratio is greater than 0.75 and less than or equal to 1, it means that the sampling ratio is the third sampling ratio. In summary, it can be seen that when P frames are performed frame exclusion, all or some of the first-type P frames are preferentially excluded. After all of the first-type P frames are excluded, all or some of the second-type P frames can be excluded. After all of the second-type P frames are excluded, all or some of the third-type P frames can be excluded. When some of the third-type P frames are excluded, previous third-type P frame(s) is / are retained and following third-type P frame(s) is / are excluded, for example, all of third-type P frames following a kth (k is greater than 1) third-type P frame are excluded. Exemplarily, referring to Figure 9A, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using the first sampling ratio, all of first-type P frames are excluded. In this case, the first sampling ratio is less than or equal to 0.5. Referring to Figure 9B, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using the second sampling ratio, all of first-type P frames are excluded, and all of second-type P frames are excluded. In this case, the second sampling ratio is less than or equal to 0.75 and greater than 0.5. Referring to Figure 9C, if it is determined that the frame exclusion is performed on the P frames in a GOP sequence using the third sampling ratio, all of first-type P frames are excluded, all of second-type P frames are excluded, and all of third-type P frames are excluded. In this case, the third sampling ratio is less than or equal to 1 and greater than 0.75. As shown in Figure 9A, one GOP sequence can implement 1 / 2 frame exclusion. When the 1 / 2 frame exclusion fails to meet the service requirements, as shown in Figure 9B, one GOP sequence can implement 3 / 4 frame exclusion. When the 3 / 4 frame exclusion fails to meet the service requirements, as shown in Figure 9C, one GOP sequence can implement full frame exclusion. In one possible implementation, a sampling ratio corresponding to the GOP sequence can be determined on the basis of service information. For example, it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the first sampling ratio, or it is determined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the second sampling ratio, or it is detennined on the basis of the service information that the frame exclusion is performed on the P frames in the GOP sequence using the third sampling ratio. If frame exclusion being performed on the P frames in the GOP sequence using the first sampling ratio can meet the service requirements corresponding to the service information, that is, excluding xl (such as 0.5) of P frames from the GOP sequence can meet the service requirements, it is determined to use the first sampling ratio on the basis of the service information. If using the first sampling ratio fails to meet the service requirements, but frame exclusion being performed on the P frames in the GOP sequence using the second sampling ratio can meet the service requirements corresponding to the service information, that is, excluding xl+x2 (such as 0.75) of P frames from the GOP sequence can meet the service requirements, it is determined to use the second sampling ratio on the basis of the service information. If using the first sampling ratio fails to meet the service requirements, and using the second sampling ratio also fails to meet the service requirements, it is determined to use the third sampling ratio on the basis of the service information. The frame exclusion process is described below in conjunction with two specific application scenarios of service information. Application scenario 1: service information may include a resolution corresponding to a GOP sequence (such as 4*30 frames representing a frame rate), a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end. On the basis of the resolution, the frame rate, and the decoding capability, it is determined whether frame exclusion needs to be performed on P frames in the GOP sequence. If frame exclusion does not need to be performed on the P frames in the GOP sequence, no P frame in the GOP sequence is excluded. If frame exclusion needs to be performed on P frames in the GOP sequence, a sampling ratio corresponding to the GOP sequence is determined on the basis of the resolution, the frame rate, and the decoding capability. For example, the sampling ratio corresponding to the GOP sequence may be a first sampling ratio, a second sampling ratio, or a third sampling ratio. For example, assuming that a NVR device has a decoding capability of 4*1080P30, that is, the NVR device can decode 4*30 frames of images with a resolution of 1920*1080 per second, and decoding of an image that beyonds this decoding capability cannot be completed. a. If the GOP sequence corresponds to 4*30 frames of images (with a resolution of 1920*1080), then based on the resolution, the frame rate and the decoding capability, it is detennined that frame exclusion does not need to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate match with the decoding capability. Therefore, the NVR device does not perform frame exclusion on the P frames in the GOP sequence, and can decode 4*30 frames of images per second, and display 1080P30 images through 4 channels, as shown in Figure 5A. b. If the GOP sequence corresponds to 8*30 frames of images (with a resolution of 1920*1080), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a first sampling ratio (that is, the method for 1 / 2 frame exclusion). When 4*30 frames of images can be decoded per second, a 1080P15 image can be displayed through 8 channels, as shown in Figure 5B. Obviously, 15 frames of the 8 channels correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as from 4 channels to 8 channels, the decoding capability can support decoding the image with this resolution and frame rate by performing frame exclusion on frames for each channel of the images to meet service requirements. c. If the GOP sequence corresponds to 4*60 frames of images (with a resolution of 1920*1080), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a first sampling ratio (that is, the method of 1 / 2 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P30 of images can be displayed through 4 channels, as shown in Figure 5C. Obviously, after the 4*60 frames are performed frame exclusion in a manner of 1 / 2 frame exclusion, the 4*30 frames are retained. Obviously, when playing back at multiple times speed, such as changing from 30 frames of images to 60 frames of images, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images to meet service requirements. Obviously, the 30 frames at double speed is equivalent to 60 frames per second, which, after 1 / 2 frame exclusion, is equivalent to 30 frames per second. d. If the GOP sequence corresponds to 12*30 frames of images (with a resolution of 1920*1080), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a second sampling ratio (that is, the method of 3 / 4 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P10 of images can be displayed through 12 channels, as shown in Figure 5D. Obviously, 12 channels of 10 frames correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as changing from 4 channels to 12 channels, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images, to meet service requirements. e. If the GOP sequence corresponds to 16*30 frames of images (with a resolution of 1920*1080), then based on the resolution, the frame rate and the decoding capability, it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, that is, the resolution, the frame rate do not match with the decoding capability (that is, the decoding capability does not support decoding images with this resolution and frame rate). Therefore, it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, and each channel of images are performed frame exclusion according to a third sampling ratio (that is, the method of 4 / 4 frame exclusion). In the case that 4*30 frames of images can be decoded per second, 1080P7.5 of images can be displayed through 16 channels, as shown in Figure 5E. Obviously, 16 channels of 7.5 frames correspond to 4*30 frames. Obviously, when the number of decoding channels increases, such as changing from 4 channels to 16 channels, the decoding capability can support decoding the images with this resolution and frame rate by performing frame exclusion on frames from each channel of the images to meet service requirements. In summary, it can be seen that when conditions of multiple times speed and / or multiple channels are changed arbitrarily, frames can be performed frame exclusion according to the first sampling ratio, the second sampling ratio, or the third sampling ratio to meet service requirements. Application scenario 2: if the service information includes network quality corresponding to a target network between a sending end and a receiving end, it is determined whether frame exclusion needs to be performed on P frames in a GOP sequence on the basis of the network quality. If frame exclusion does not need to be performed on P frames in a GOP sequence, no P frame in the GOP sequence is excluded. If frame exclusion needs to be performed on P frames in a GOP sequence, a sampling ratio corresponding to the GOP sequence is detennined on the basis of the network quality, such as a first sampling ratio, or a second sampling ratio, or a third sampling ratio. For example, when the sending end sends a GOP sequence to the receiving end, it is necessary to detect the network quality (such as jitter, packet loss rate, etc.) corresponding to the target network which is used to carry the GOP sequence, and there is no limitation on this detection method. In one possible implementation, four levels of network quality may be designed. If the network quality corresponding to the target network is a first level (i.e., an optimal level) of the network quality, it is determined that frame exclusion is performed on no P frame in a GOP sequence. If the network quality corresponding to the target network is a second level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the first sampling ratio, such as a method of 1 / 2 frame exclusion. If the network quality corresponding to the target network is a third level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the second sampling ratio, such as a method of 3 / 4 frame exclusion. If the network quality corresponding to the target network is a fourth level (i.e., a worst level) of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the third sampling ratio, such as a method of 4 / 4 frame exclusion. In another possible implementation, two levels of network quality may be designed. If the network quality corresponding to the target network is a first level (i.e., an optimal level) of the network quality, it is determined that frame exclusion is performed on no P frame in the GOP sequence. If the network quality corresponding to the target network is a second level of the network quality, it is determined that frame exclusion is performed on the P frames in the GOP sequence, and the sampling ratio is the first sampling ratio. During the transmission of the GOP sequence, if the network quality is still the second level of the network quality, the sampling ratio is adjusted to the second sampling ratio. During the transmission of the GOP sequence, if the network quality is still the second level of the network quality, the sampling ratio is adjusted to the third sampling ratio. In addition, during the transmission of the GOP sequence, if the network quality is restored to the first level of the network quality, no the P frame in the GOP sequence is performed frame exclusion. Of course, the above two application scenarios are just two examples for determining the sampling ratio, and other methods can also be used to determine the sampling ratio corresponding to the GOP sequence, and there is no limitation on this. For example, the sampling ratio corresponding to the GOP sequence is determined based on the size of each frame, such as when the size of the frame is less than a first threshold value, no P frame in the GOP sequence is excluded; when the size of the frame is greater than the first threshold value and less than a second threshold value, the sampling ratio is the first sampling ratio; when the size of the frame is greater than the second threshold value and less than a third threshold value, the sampling ratio is the second sampling ratio, and when the size of the frame is greater than the third threshold value, the sampling ratio is the third sampling ratio. In one possible implementation, at least two GOP sequences may be combined into one image sequence set. Based on this, when the image sequence set includes at least two GOP sequences, for each GOP sequence, if the GOP sequence is not the first GOP sequence of the image sequence set, an I frame of the first GOP sequence may be used as a reference frame for the first frame of the GOP sequence. In this implementation, if the GOP sequence is not the first GOP sequence of the image sequence set, the first frame of the GOP sequence may be called a key P frame (i.e., no longer called an I frame), and a reference frame of the key P frame is the previous I frame closest to the key P frame. Exemplarily, for an image sequence set, the image sequence set may include at least one key P frame, that is, at least one key P frame is allowed to exist, and the key P frame is used to replace the I frame. The key P frame can only refer to the previous I frame closest to the key P frame, and frame structure of the key P frame can effectively reduce the overall bandwidth. Referring to Figure 10, which is a schematic diagram of an image sequence set, the image sequence set may include a key P frame. Between an I frame and the key P frame, there may be first-type P frames, second-type P frames, and third-type P frames. Structural relationships among the first-type P frames, the second-type P frame, and the third-type P frame may be referred to the above embodiment. There may be first-type P frame(s), second-type P frame(s), and third-type P frame(s) between two adjacent key P frames. Structural relationships among the first-type P frame(s), the second-type P frame(s), and the third-type P frame(s) may be referred to the above embodiment. When frame exclusion is performed on P frames, a first-type P frame can be excluded, a second-type P frame can be excluded, and a third-type P frame can be excluded, but a key P frame cannot be excluded. It can be seen from the above technical solutions that this embodiment provides a new video frame sequence, which includes first-type P frames, second-type P frames and third-type P frames, wherein frames can be dropped according to a certain rule, which can not only ensure that the video frame sequence is played in sequence which has the characteristics of intermittently dropping the P frames according to the rule without affecting viewing, but also some of the P frames are dropped, in some special scenarios, to save bandwidth. The video frame sequence has a better prospect of use in decoding, network transmission, and storage, and has the characteristics of decoding multiplication channels, low-bandwidth transmission, and low bit rate storage, etc. In a weak network environment, it can also solve problems of long-term black screen and blurred screen after frames are dropped. The frame dropping strategy can be implemented dynamically, and be adjusted arbitrarily according to an on-site situation, so as to flexibly and effectively reduce consumption without affecting the integrity of decoding. The video frame sequence can ensure the flexibility of frame excluded and the stability of image quality, which can effectively improve customer experience. Based on the same application concept as the above method, an embodiment of the present application provides an image processing apparatus. Referring to Figure 11, which is a schematic diagram of a structure of an image processing apparatus, the apparatus may include: a dividing module 111, configured to divide all of P frames in a group of pictures, GOP, sequence into at least two types of P frames, wherein there is a P frame that cannot be used as a reference frame in the at least two types of P frames, and there is a P frame that can be used as a reference frame in the at least two types of P frames; a processing module 112, configured to, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude the P frame that cannot be used as a reference frame; or, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude the P frame that cannot be used as a reference frame and the P frame that can be used as a reference frame. Exemplarily, the dividing module 111 is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames and second-type P frames; wherein a first-type P frame cannot be used as a reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, and the second-type P frame can be used as a reference frame for a second-type P frame; the processing module 112 is specifically configured to, if it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, exclude first-type P frames, or exclude first-type P frames and second-type P frames. Exemplarily, when dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames, the dividing module 111 is specifically configured to divide all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames on the basis of a position ordering relationship among all P frames in the GOP sequence; wherein, there are Ml first-type P frames between two adjacent second-type P frames, and there are M2 first-type P frames between an I frame of the GOP sequence and a first second-type P frame; wherein, both Ml and M2 are positive integers. Exemplarily, for each first-type P frame, if there is / are previous second-type P frame(s) to this first-type P frame, a previous second-type P frame closest to this first-type P frame is used as the reference frame for this first-type P frame; if there is no previous second-type P frame to this first-type P frame, an I frame of the GOP sequence is used as the reference frame for this first-type P frame; for each second-type P frame, if there is / are previous second-type P frame(s) to this second-type P frame, a previous second-type P frame closest to this second-type P frame is used as the reference frame for this second-type P frame; if there is no previous second-type P frame to this second-type P frame, the I frame of the GOP sequence is used as the reference frame for this second-type P frame. Exemplarily, when, if it is determined that frame exclusion needs to be performed on P frames in the GOP sequence, excluding first-type P frames, or excluding first-type P frames and second-type P frames, the processing module 112 is specifically configured to: if it is determined on the basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; or, if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein, the second sampling ratio is greater than the first sampling ratio, and the third sampling ratio is greater than the second sampling ratio. Exemplarily, the processing module 112 is further configured to, if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determine whether frame exclusion needs to be performed on P frames in the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform frame excluded on the P frames in the GOP sequence; if it is determined to perform frame excluded on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; or, if the service information includes network quality corresponding to a target network between a sending end and a receiving end, determine whether frame exclusion needs to be performed on P frames in a GOP sequence on the basis of the network quality; if the network quality is not at an optimal level of network quality, determine to perform frame exclusion on the P frames in the GOP sequence; if it is determined to perform frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the network quality; and the sampling ratio is the first sampling ratio or the second sampling ratio; or, the sampling ratio is the first sampling ratio, the second sampling ratio, or the third sampling ratio. Exemplarily, the dividing module 111 is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames, second-type P frames and third-type P frames; wherein a first-type P frame cannot be used as a reference frame, a second-type P frame can only be used as a reference frame for a first-type P frame, and a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame; the processing module 112 is specifically configured to, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude first-type P frames, or exclude first-type P frames and second-type P frames, or exclude first-type P frames, second-type P frames and third-type P frames. Exemplarily, when dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames, the dividing module 111 is specifically configured to divide all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames on the basis of a position ordering relationship among all the P frames in the GOP sequence; wherein, for all of the P frames in the GOP sequence, there are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame is located between the two first-type P frames; there are two first-type P frames and one second-type P frame between an I frame of the GOP sequence and a first third-type P frame, and this second-type P frame is located between the two first-type P frames. Exemplarily, for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame is used as a reference frame for this first-type P frame; if a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous third-type P frame(s) to this second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous third-type P frame to this second-type P frame, the I frame of the GOP sequence is used as the reference frame for this second-type P frame; for each third-type P frame, if there is / are previous third-type P frame(s) to this third-type P frame, a previous third-type P frame closest to this third-type P frame is used the a reference frame for this third-type P frame; if there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as a reference frame for this third-type P frame; Exemplarily, when excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, the processing module 112 is specifically configured to, if it is determined on the basis of service information that the frame exclusion needs to be perfonned on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein the second sampling ratio is greater than the first sampling ratio; if it is determined on the basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, exclude all of the second-type P frames, and exclude all or some of the third-type P frames; wherein the third sampling ratio is greater than the second sampling ratio. Exemplarily, the processing module 112 is further configured to, if the service information includes a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determine whether frame exclusion needs to be performed on P frames in the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform frame exclusion on the P frames in the GOP sequence; if it is determined to perform frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the resolution, the frame rate, and the decoding capability, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio; or, if the service information includes network quality corresponding to a target network between an encoding end and a decoding end, determine whether frame exclusion needs to be performed on the P frames in the GOP sequence on the basis of the network quality; if the network quality is not at an optimal level of network quality, determine to perform frame exclusion on the P frames in the GOP sequence; if it is determined to perfonn frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the network quality, and the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio. Exemplarily, when an image sequence set includes at least two GOP sequences, for each GOP sequence, if this GOP sequence is not a first GOP sequence of the image sequence set, the dividing module 111 is further configured to use an I frame of the first GOP sequence as a reference frame for a first frame of the GOP sequence. Based on the same application concept as the above methods, an embodiment of the present application provides an image processing device. As shown in Figure 12, the image processing device includes a processor 1201 and a machine-readable storage medium 1202 having stored therein machine-executable instructions that can be executed by the processor 1201; the processor 1201 is configured to execute the machine-executable instructions to implement the image processing methods disclosed in the above examples of the present application. Based on the same application concept as the above methods, an embodiment of the present application further provides a machine-readable storage medium having stored therein several computer instructions; which when executed by a processor, can implement the image processing methods disclosed in the above examples of the present application. The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be a RAM (Radom Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as hard disk drive), a solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. The above descriptions are only embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, there are various modifications and variations in the present application. Any modifications, equivalent replacements, improvements, and the like made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. An image processing method, which comprises:dividing all of P frames in a group of pictures, GOP, sequence into at least two types of P frames, wherein there is a P frame that cannot be used as a reference frame in the at least two types of P frames, and there is a P frame that can be used as a reference frame in the at least two types of P frames;if it is determined that frame exclusion needs to be perfonned on the P frames in the GOP sequence, excluding a P frame that cannot be used as a reference frame; or, if it is determined that frame exclusion needs to be perfonned on the P frames in the GOP sequence, excluding a P frame that cannot be used as a reference frame and a P frame that can be used as a reference frame.

2. The method according to claim 1, wherein the method comprises:dividing all of the P frames in the GOP sequence into first-type P frames and second-type P frames; wherein a first-type P frame cannot be used as the reference frame, a second-type P frame can be used as a reference frame for a first-type P frame, and can be used as a reference frame for a second-type P frame;if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding first-type P frames, or excluding the first-type P frames and second-type P frames.

3. The method according to claim 2, wherein,dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames comprises:dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames on a basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, there are Ml first-type P frames between two adjacent second-type P frames, and there are M2 first-type P frames between an I frame of the GOP sequence and a first second-type P frame; wherein, Ml is a positive integer, and M2 is a positive integer.

4. The method according to claim 2 or 3, wherein,for each first-type P frame, if there is / are previous second-type P frame(s) to this first-type P frame, a previous second-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; if there is no previous second-type P frame to this first-type P frame, an I frame of the GOP sequence is used as a reference frame for this first-type P frame;for each second-type P frame, if there is / are previous second-type P frame(s) to this second-type P frame, a previous second-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous second-type P frame to this second-type P frame, the I frame of the GOP sequence is used as a reference frame for this second-type P frame.

5. The method according to claim 2, wherein,if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, comprises:if it is determined on a basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, excluding all or some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames; or,if it is determined on a basis of the service information that the frame exclusion needs to be perfonned on the P frames in the GOP sequence using a first sampling ratio, excluding some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames;wherein, the second sampling ratio is greater than the first sampling ratio, and a third sampling ratio is greater than the second sampling ratio.

6. The method according to claim 5, wherein the method further comprises:if the service information comprises a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; or,if the service information comprises network quality corresponding to a target network between a sending end and a receiving end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the network quality; if the network quality is not at an optimal level of network quality, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on the basis of the network quality;wherein, the sampling ratio is the first sampling ratio or the second sampling ratio; or,the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio.

7. The method according to claim 1, wherein the method comprises:dividing all of the P frames in the GOP sequence into first-type P frames, second-type P frames and third-type P frames; wherein a first-type P frame cannot be used as a reference frame, a second-type P frame can only be used as a reference frame for a first-type P frame, and a third-type P frame can be used as areference frame for a first-type P frame, and can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame;if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding first-type P frames, or excluding the first-type P frames and second-type P frames, or excluding the first-type P frames, the second-type P frames and third-type P frames.

8. The method according to claim 7, wherein dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames comprises:dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames on a basis of a position ordering relationship among all of the P frames in the GOP sequence;wherein, there are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame is located between the two first-type P frames;there are two first-type P frames and one second-type P frame between an I frame of the GOP sequence and a first third-type P frame, and the one second-type P frame is located between the two first-type P frames.

9. The method according to claim 7 or 8, wherein,for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame is used as a reference frame for this first-type P frame; if a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame;for each second-type P frame, if there is / are previous third-type P frame(s) to this second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous third-type P frame to this second-type P frame, an I frame of the GOP sequence is used as a reference frame for this second-type P frame;for each third-type P frame, if there is / are previous third-type P frame(s) tothis third-type P frame, a previous third-type P frame closest to this third-type P frame is used as a reference frame for this third-type P frame; if there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as a reference frame for this third-type P frame.

10. The method according to claim 7, wherein,if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames, comprises:if it is determined on a basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, excluding all or some of the first-type P frames;if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, excluding all of the first-type P frames, and excluding all or some of the second-type P frames; wherein the second sampling ratio is greater than the first sampling ratio;if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, excluding all of the first-type P frames, excluding all of the second-type P frames, and excluding all or some of the third-type P frames; wherein the third sampling ratio is greater than the second sampling ratio.

11. The method according to claim 10, wherein the method further comprises:if the service information comprises a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determining to perform the frame exclusion on the P frames in the GOP sequence;if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio; or,if the service information comprises network quality corresponding to a target network between a sending end and a receiving end, determining whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the network quality; if the network quality is not at an optimal level of network quality, determining to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determining a sampling ratio corresponding to the GOP sequence on the basis of the network quality, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio.

12. The method according to claim 2 or 7, wherein the method further comprises:when an image sequence set comprises at least two GOP sequences, for each GOP sequence, if this GOP sequence is not a first GOP sequence of the image sequence set, using an I frame of the first GOP sequence as a reference frame for a first frame of this GOP sequence.

13. An image processing apparatus, which comprises:a dividing module, configured to divide all of P frames in a group of pictures, GOP, sequence into at least two types of P frames, wherein there is a P frame that cannot be used as a reference frame in the at least two types of P frames, and there is a P frame that can be used as a reference frame in the at least two types of P frames;a processing module, configured to, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude a P frame that cannot be used as a reference frame; or, if it is determined that frame exclusion needs to be performed on the P frames in the GOP sequence, exclude a P frame thatcannot be used as a reference frame and a P frame that can be used as a reference frame.

14. The apparatus according to claim 13, wherein,the dividing module is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames and second-type P frames; wherein a first-type P frame cannot be used as the reference frame, the second-type P frame can be used as a reference frame for a first-type P frame, and can be used as a reference frame for a second-type P frame; the processing module is specifically configured to, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, exclude first-type P frames, or exclude the first-type P frames and second-type P frames.

15. The apparatus according to claim 14, wherein,the dividing module is, when dividing all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames, specifically configured to divide all of the P frames in the GOP sequence into the first-type P frames and the second-type P frames on a basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, there are Ml first-type P frames between two adjacent second-type P frames, and there are M2 first-type P frames between an I frame of the GOP sequence and a first second-type P frame; wherein, both Ml and M2 are positive integers.

16. The apparatus according to claim 14 or 15, wherein,for each first-type P frame, if there is / are previous second-type P frame(s) to this first-type P frame, a previous second-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; if there is no previous second-type P frame to this first-type P frame, an 1 frame of the GOP sequence is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous second-type P frame(s) to this second-type P frame, a previous second-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous second-type P frame to this second-type P frame, the I frame of the GOP sequence is used as areference frame for this second-type P frame.

17. The apparatus according to claim 14, wherein,the processing module is, when if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, specifically configured to, if it is detennined on a basis of service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is detennined on a basis of the service infonnation that the frame exclusion needs to be perfonned on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; or, if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude some of the first-type P frames; if it is detennined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames; if it is determined on a basis of the service infonnation that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein, the second sampling ratio is greater than the first sampling ratio, and a third sampling ratio is greater than the second sampling ratio.

18. The apparatus according to claim 17, wherein,the processing module is further configured to, if the service infonnation comprises a resolution corresponding to the GOP sequence, a frame rate conesponding to the GOP sequence, and a decoding capability conesponding to a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform the frame exclusion onthe P frames in the GOP sequence; if it is detennined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; or, if the service information comprises network quality corresponding to a target network between a sending end and a receiving end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the network quality; if the network quality is not at an optimal level of network quality, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the network quality; and the sampling ratio is the first sampling ratio or the second sampling ratio; or, the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio.

19. The apparatus according to claim 12, wherein,the dividing module is specifically configured to divide all of the P frames in the GOP sequence into first-type P frames, second-type P frames and third-type P frames; wherein a first-type P frame cannot be used as a reference frames, a second-type P frame can only be used as a reference frame for a first-type P frame, and a third-type P frame can be used as a reference frame for a first-type P frame, can be used as a reference frame for a second-type P frame, and can be used as a reference frame for a third-type P frame; the processing module is specifically configured to, if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, exclude first-type P frames, or exclude the first-type P frames and second-type P frames, or exclude the first-type P frames, the second-type P frames and third-type P frames.

20. The apparatus according to claim 19, wherein,the dividing module is, when dividing all of the P frames in the GOP sequence into the first-type P frames, the second-type P frames and the third-type P frames, specifically configured to divide all of the P frames in the GOP sequence into thefirst-type P frames, the second-type P frames and the third-type P frames on a basis of a position ordering relationship among all of the P frames in the GOP sequence; wherein, for all of the P frames in the GOP sequence, there are two first-type P frames and one second-type P frame between two adjacent third-type P frames, and the one second-type P frame is located between the two first-type P frames; there are two first-type P frames and one second-type P frame between an I frame of the GOP sequence and a first third-type P frame, and the one second-type P frame is located between the two first-type P frames.

21. The apparatus according to claim 19 or 20, wherein,for each first-type P frame, if a previous frame of this first-type P frame is not a first-type P frame, the previous frame of this first-type P frame is used as a reference frame for this first-type P frame; if a previous frame of this first-type P frame is a first-type P frame, a previous non-first-type P frame closest to this first-type P frame is used as a reference frame for this first-type P frame; for each second-type P frame, if there is / are previous third-type P frame(s) to this second-type P frame, a previous third-type P frame closest to this second-type P frame is used as a reference frame for this second-type P frame; if there is no previous third-type P frame to this second-type P frame, an I frame of the GOP sequence is used as a reference frame for this second-type P frame; for each third-type P frame, if there is / are previous third-type P frame(s) to this third-type P frame, a previous third-type P frame closest to this third-type P frame is used as a reference frame for this third-type P frame; if there is no previous third-type P frame to this third-type P frame, the I frame of the GOP sequence is used as a reference frame for this third-type P frame.

22. The apparatus according to claim 19, wherein,the processing module is, when if it is determined that the frame exclusion needs to be performed on the P frames in the GOP sequence, excluding the first-type P frames, or excluding the first-type P frames and the second-type P frames, or excluding the first-type P frames, the second-type P frames and the third-type P frames, specifically configured to, if it is determined on a basis ofservice information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a first sampling ratio, exclude all or some of the first-type P frames; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a second sampling ratio, exclude all of the first-type P frames, and exclude all or some of the second-type P frames; wherein the second sampling ratio is greater than the first sampling ratio; if it is determined on a basis of the service information that the frame exclusion needs to be performed on the P frames in the GOP sequence using a third sampling ratio, exclude all of the first-type P frames, exclude all of the second-type P frames , and exclude all or some of the third-type P frames; wherein the third sampling ratio is greater than the second sampling ratio.

23. The apparatus according to claim 22, wherein,the processing module is further configured to, if the service information comprises a resolution corresponding to the GOP sequence, a frame rate corresponding to the GOP sequence, and a decoding capability corresponding to a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability; if the decoding capability does not support decoding images with the resolution and the frame rate, determine to perform the frame exclusion on the P frames in the GOP sequence; if it is determined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on a basis of the resolution, the frame rate, and the decoding capability, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio; or, if the service information comprises network quality corresponding to a target network between an encoding end and a decoding end, determine whether the frame exclusion needs to be performed on the P frames in the GOP sequence on a basis of the network quality; if the network quality is not an optimal level of network quality, determine to perform the frame exclusion on the P frames in the GOP sequence; if it isdetermined to perform the frame exclusion on the P frames in the GOP sequence, determine a sampling ratio corresponding to the GOP sequence on the basis of the network quality, wherein the sampling ratio is the first sampling ratio, or the second sampling ratio, or the third sampling ratio.

24. The apparatus according to claim 14 or 19, wherein,when an image sequence set comprises at least two GOP sequences, for each GOP sequence, if this GOP sequence is not a first GOP sequence of the image sequence set, the dividing module is further configured to use an I frame of the first GOP sequence as a reference frame for a first frame of this GOP sequence.

25. An image processing device, which comprises a processor and a machine-readable storage medium having stored therein machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions to implement steps of the methods according to any one of claims 1-12.INTERNATIONAL SEARCH REPORT International application No. PCT / CN2023 / 102139A. CLASSIFICATION OF SUBJECT MATTER H04N19 / 109(2014.01)i According to International Patent Classification (IPC) or to both national classification and IPC B. FIELDS SEARCHED Minimum documentation searched (classification system followed by classification symbols) IPC: H04N Documentation searched other than minimum documentation to the extent that such documents are included in the fields searched Electronic data base consulted during the international search (name of data base and, where practicable, search terms used) CNABS, CNTXT, CNKI, VEN, EPTXT, WOTXT, USTXT: MW, HHfi, SWA PM, MW, SM, Sff, video, encode, decode, GOP, P frame, non-reference, reference, frame, extraction, drop, discard, AVS C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document, with indication, where appropriate, of the relevant passages Relevant to claim No. PX CN 115150610 A (HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.) 04 October 2022 (2022-10-04) claims 1-10, and description, paragraphs 0005-0031 1-25 PX v A. CN 115150611 A (HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.) 04 October 2022 (2022-10-04) claims 1-10, and description, paragraphs 0005-0030 CN 101621688 A (WUHAN UNIVERSITY) 06 January 2010 (2010-01-06) description, page 3, line 5-page 4, line 3, and figures 1 and 2 1-25 1-4, 12-16,24, 25 X CN 101257628 A (WUHAN UNIVERSITY) 03 September 2008 (2008-09-03) description, page 6, lines 16-20 1-4, 12-16, 24, 25 X CN 112866746 A (HANGZHOU WULIAN TECHNOLOGY CO., LTD.) 28 May 2021 (2021-05-28) description, paragraphs 0072-0086 1-4, 12-16, 24, 25 X US 2013156105 Al (COREY BRANDON J et al.) 20 June 2013 (2013-06-20) claims 1-17 1-4, 12-16, 24, 25 | f | Further documents are listed in the continuation of Box C. | / 1 See patent family annex. * Special categories of cited documents: “T” later document published after the international filing date or priority “A” document defining the general state of the art which is not considered date and not in conflict with the application but cited to understand the to be of particular relevance principle or theory underlying the invention ■‘D” document cited by the applicant in the international application “X” document of particular relevance; the claimed invention cannot be “E” earlier application or patent but published on or after- the international considered novel or cannot be considered to involve an inventive step filing date when the document is taken alone “L" document which may throw doubts on priority claim(s) or which is “Y” document of particular- relevance; the claimed invention cannot be cited to establish the publication date of another citation or other considered to involve an inventive step when the document is special reason (as specified) combined with one or more other such documents, such combination “O” document referring to an oral disclosure, use, exhibition or other- bei“g obvious t0 a skilled in the means document member of the same patent family “P” document published prior to the international filing date but later than the priority date claimed Date of the actual completion of the international search 27 September 2023 Date of mailing of the international search report 28 September 2023 Name and mailing address of the ISA / CN China National Intellectual Property Administration (ISA / CN) China No. 6, Xitucheng Road, Jimenqiao. Haidian District, Beijing 100088 Authorized officer Telephone No.

Citation Information

Patent Citations

  • Adjustable compressing method for realizing video code stream frame rate

    CN101257628A

  • Codec method for realizing AVS video standard time domain classification

    CN101621688A

  • Video frame extraction method and device, electronic equipment and computer readable storage medium

    CN111405288A

  • H.264 video coding method and device, chip, storage equipment and electronic equipment

    CN112291566A

  • Multi-channel serial flow cloud game control method, device and equipment and storage medium

    CN112866746A