Video processing method and apparatus, computer device, storage medium and program product

By deleting non-reference frames and sampling video frames, the video decoding efficiency is improved, the problem of low decoding efficiency in the traditional video sparse frame processing scheme is solved, and efficient video frame decoding and accurate video semantic retention are achieved.

WO2024217150A1PCT designated stage expired Publication Date: 2024-10-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/078595
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-19
Filing Date
2024-02-26
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

The decoding efficiency of traditional video sparse frame-cutting processing solutions is low, resulting in low video decoding efficiency.

Method used

By obtaining the attribute information of video frames, deleting non-reference frames, extracting instant decoding refresh frames, and sampling the target picture group and the reorganized picture group when the number of frames does not meet the decoding conditions, only sampling frames and instant decoding refresh frames are processed. Frame decoding.

Benefits of technology

It improves video decoding efficiency, reduces memory space usage and decoding calculations, ensures the core semantics of the video are preserved under a fixed number of frame cuts, and improves the accuracy of video classification and recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078595_24102024_PF_FP_ABST
    Figure CN2024078595_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a video processing method and apparatus, a computer device, a storage medium and a computer program product. The method can be applied to the field of artificial intelligence, and can be specifically applied to a scenario of performing video processing on a computer, a smart phone or a vehicle-mounted device. The method comprises: acquiring from a video to be processed attribute information of a video frame, a first type of picture group and a second type of picture group (202); according to the attribute information, deleting non-reference frames from the first type of picture group and non-reference frames from the second type of picture group, so as to obtain a first type of regrouped picture group and a second type of regrouped picture group (204); extracting instant decoded refresh frames from the first type of regrouped picture group to obtain the instant decoded refresh frames and a target picture group not containing the instant decoded refresh frames (206); when the number of frames of the instant decoded refresh frames does not meet a decoding condition, sampling the target picture group and the second type of regrouped picture group to obtain sampled frames (208); and performing video frame decoding on the sampled frames and the instant decoded refresh frames (210).
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device, computer equipment, storage medium and program product

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 19, 2023, with application number 202310468833X, and invention name “Video processing method, device, computer equipment, storage medium and program product”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of video processing technology, and in particular to a video processing method, apparatus, computer equipment, storage medium, and computer program product. Background Art

[0003] With the continuous development of video processing technology and Internet technology, the general public can easily obtain various videos of interest, and then process the obtained videos accordingly according to the actual processing task. For example, when the processing task is a video understanding task, the video can be first sparsely framed to speed up the processing speed of the video understanding task.

[0004] Traditional video sparse frame processing schemes primarily involve uniformly sampling video frames to obtain a specific video frame to be decoded, obtaining its dependent frames, and then decoding the specific video frame and its dependent frames to obtain the sparsely processed target video. However, this video sparse frame processing scheme requires decoding many additional video frames, resulting in low video decoding efficiency.

[0005] Summary of the Invention

[0006] According to various embodiments of the present application, a video processing method, apparatus, computer device, computer-readable storage medium, and computer program product are provided.

[0007] In a first aspect, the present application provides a video processing method, which is executed by a computer device, and the method includes:

[0008] Acquire attribute information of a video frame, a first-category picture group, and a second-category picture group from a video to be processed;

[0009] According to the attribute information, the non-reference frames in the first type of picture group and the non-reference frames in the second type of picture group are deleted to obtain a first type of reorganized picture group and a second type of reorganized picture group;

[0010] Extracting an instantaneous decoding refresh frame from the first type of recombined picture group to obtain the instantaneous decoding refresh frame and a target picture group that does not include the instantaneous decoding refresh frame;

[0011] When the number of frames of the instant decoding refresh frame does not meet the decoding condition, sampling the target group of pictures and the second type of reorganized group of pictures to obtain a sampled frame;

[0012] Video frame decoding is performed on the sampling frame and the instant decoding refresh frame to obtain a decoded frame.

[0013] In a second aspect, the present application further provides a video processing device. The device comprises:

[0014] An acquisition module, configured to acquire attribute information of a video frame, a first-category picture group, and a second-category picture group from a video to be processed;

[0015] a screening module, configured to delete the non-reference frames in the first-category picture group and the non-reference frames in the second-category picture group according to the attribute information, to obtain the first-category recombined picture group and the second-category recombined picture group;

[0016] an extraction module, configured to extract an instantaneous decoding refresh frame from the first type of recombined picture groups, and obtain the instantaneous decoding refresh frame and a target picture group that does not include the instantaneous decoding refresh frame;

[0017] a sampling module, configured to sample the target group of pictures and the second-type recombined group of pictures to obtain a sampling frame when the number of frames of the instant decoding refresh frame does not meet a decoding condition;

[0018] The decoding module is used to perform video frame decoding on the sampling frame and the instant decoding refresh frame to obtain a decoded frame.

[0019] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps of the video processing method when executing the computer program.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the video processing method when executed by a processor.

[0021] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of the video processing method when executed by a processor.

[0022] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 is a diagram illustrating an application environment of a video processing method according to an embodiment;

[0024] FIG2 a is a schematic flow chart of a video processing method according to an embodiment;

[0025] FIG2 b is a schematic flow chart of a video processing method in another embodiment;

[0026] FIG3 is a schematic diagram of a closed GOP and an open GOP in one embodiment;

[0027] FIG4 is a schematic diagram showing GOP changes before and after code stream reorganization of a closed GOP in one embodiment;

[0028] FIG5 is a schematic diagram of extracting IDR frames and non-IDR frames from a reconstructed GOP in one embodiment;

[0029] FIG6 is a schematic diagram of sampling in a non-IDR frame sequence according to one embodiment;

[0030] FIG7 is a schematic diagram of classifying decoded frames using a video classification model in one embodiment;

[0031] FIG8 is a schematic diagram of a process for obtaining description information corresponding to a target object in a video by identifying decoded frames in one embodiment;

[0032] FIG9 is a schematic diagram showing a target object in a highlighted manner in one embodiment;

[0033] FIG10 is a schematic diagram showing search terms and object description information in one embodiment;

[0034] FIG11 is a schematic flow chart of a video processing method in another embodiment;

[0035] FIG12 is a schematic diagram of video processing and classification using an existing frame capture method and a frame capture method of the present application in one embodiment;

[0036] FIG13 is a structural block diagram of a video processing device according to an embodiment;

[0037] FIG14 is a structural block diagram of a video processing device according to an embodiment;

[0038] FIG15 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] It should be noted that in the following description, the terms "first, second and third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first, second and third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0041] The video processing method provided in the embodiments of the present application can be applied in the application environment shown in FIG1 . In this embodiment, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated with server 104 or placed in the cloud or on other network servers.

[0042] The terminal 102 or the server 104 can deploy a video processing system, through which the video to be processed can be processed to achieve sparseness of the video to be processed, thereby obtaining a streamlined target video that can fully express the original semantics of the video to be processed, and the target video is a video composed of decoded frames after sparseness.

[0043] The terminal 102 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, IoT device, or portable wearable device. IoT device may be a smart speaker, smart TV, smart air conditioner, or smart car device. Portable wearable device may be a smart watch, smart bracelet, or head-mounted device.

[0044] Server 104 can be an independent physical server or a service node in a blockchain system. Each service node in the blockchain system forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). Furthermore, server 104 can be a server cluster consisting of multiple physical servers. It can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0045] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus), or a network, and this application does not impose any limitation thereto.

[0046] In one embodiment, as shown in FIG. 2a and FIG. 2b , a video processing method is provided. The method may be executed by the server or the terminal in FIG. 1 , or by the server and the terminal in collaboration. The method is described using the terminal in FIG. 1 as an example, and includes the following steps:

[0047] S202 : Acquire attribute information of a video frame, a first type of picture group, and a second type of picture group from the video to be processed.

[0048] The video to be processed may refer to a video that needs to be processed, specifically a short video, a medium video, or a long video. In practical applications, the video to be processed may be a sports video, a conference video, an entertainment video, a game video, or other types of videos.

[0049] The video frame may be each frame of the image constituting the video to be processed. The attribute information may be information used to describe the video frame, including: first attribute information for distinguishing between an instantaneous decoding refresh frame and a non-instantaneous decoding refresh frame and second attribute information for distinguishing between a non-reference frame. The second attribute information may be nal_ref_idc, which is an important component of each NALU (network abstraction layer unit) and may indicate the importance of the NALU. For example, when nal_ref_idc=0, it indicates that the video frame is a non-reference frame and may be discarded during decoding; when nal_ref_idc!=0, it indicates that the video frame is a reference frame and may not be discarded during decoding.

[0050] A Group of Pictures (GOP) is a set of consecutive video frames. The frames within a GOP are highly similar, and a single video can consist of multiple GOPs. In a video encoding sequence, there are three main types of frames: I-frames, P-frames, and B-frames. The first frame of a GOP is an I-frame, which is categorized as either Instantaneous Decoding Refresh (IDR) frames or non-IDR frames. IDR frames are key frames that are independent of other video frames and are encoded using only the information within the frame. When an IDR frame is decoded, the decoder clears the reference frame queue and establishes a new one. Non-IDR frames, however, may rely on frames in the previous GOP during decoding. Typically, a re-encoding of an I-frame is necessary when the video content changes significantly. P-frames rely on previous I-frames or P-frames during decoding, using inter-frame prediction using motion prediction. B-frames offer the highest compression ratios and rely on previous and subsequent reference frames for decoding. I-frames and P-frames can serve as reference frames.

[0051] The first type of GOP is a closed GOP (closed GOP for short). This refers to a GOP whose first frame is an instantaneous decode refresh frame. Video frames in a closed GOP only rely on other frames within the group during decoding. As shown in Figure 3, the GOP on the left is a closed GOP because its first frame is an IDR frame.

[0052] The second type of GOP is an open GOP (open GOP for short). This refers to a GOP whose first frame is not an immediate decode refresh frame. Video frames in an open GOP may rely on reference frames in previous GOPs during decoding. As shown in Figure 3, the GOP on the right is an open GOP because its first frame is not an IDR frame.

[0053] In one embodiment, the terminal parses attribute information and at least two picture groups from a video to be processed, wherein the attribute information includes first attribute information for distinguishing between instantaneous decoding refresh frames and non-instantaneous decoding refresh frames; and performs group classification on the at least two picture groups based on the first attribute information to obtain a first type of picture group including instantaneous decoding refresh frames and a second type of picture group including non-instantaneous decoding refresh frames.

[0054] Before parsing, the terminal may first receive an input video stream of the video to be processed, and then perform code stream parsing on the video stream of the video to be processed to obtain attribute information and at least two picture groups.

[0055] For example, the terminal performs code stream analysis on the video stream to be processed to obtain attribute information nal_ref_idc, and can determine the distribution of closed picture groups and open picture groups based on nal_ref_idc to obtain closed picture groups and open picture groups.

[0056] The steps for obtaining the first type of picture group and the second type of picture group may specifically include: determining, by the terminal, position information of an instantaneous decoding refresh frame based on first attribute information; determining distribution information of different types of picture groups based on the position information of the instantaneous decoding refresh frame; and screening, from at least two picture groups, a first type of picture group including an instantaneous decoding refresh frame and a second type of picture group including non-instantaneous decoding refresh frames based on the distribution information.

[0057] S204 , deleting non-reference frames in the first type of picture group and non-reference frames in the second type of picture group according to the attribute information, to obtain a first type of reorganized picture group and a second type of reorganized picture group.

[0058] A non-reference frame refers to a frame that is not a dependency of other video frames during decoding. This means that decoding of other video frames can be completed without relying on this non-reference frame. In practical applications, P-frames and B-frames can be used as non-reference frames. It should be noted that while the P-frames and B-frames mentioned above can be used as non-reference frames, not all P-frames and B-frames are considered non-reference frames.

[0059] For example, as shown in Figure 3, the decoding of any video frame from frames 1 to 15 does not depend on frames 2, 3, 5, 6, 9, and 10. Therefore, frames 2, 3, 5, 6, 9, and 10 are non-reference frames. In other words, if video frame A is a non-reference frame, no other video frame in the video being processed depends on video frame A during decoding. In other words, video frame A is not a dependent frame of any other video frame in the video being processed.

[0060] Correspondingly, a reference frame can refer to a frame that can be used as a dependency for other video frames during decoding, that is, when decoding other video frames, it is necessary to rely on the reference frame to complete the decoding process. For example, as shown in Figure 3, when decoding the 4th frame, it is dependent on the 1st frame to complete the decoding, so the 1st frame is the reference frame. Similarly, the 4th, 7th, 8th, and 11th to 15th frames are all reference frames. In other words, if video frame B is a reference frame, then during decoding, video frame A is a dependent frame of a certain video frame in the video to be processed, that is, a certain video frame in the video to be processed needs to rely on video frame A to complete the decoding during decoding.

[0061] In one embodiment, the attribute information includes second attribute information for distinguishing non-reference frames, so S204 may specifically include: searching for non-reference frames in the first category of picture groups and non-reference frames in the second category of picture groups based on the second attribute information; deleting the non-reference frames in the first category of picture groups and the non-reference frames in the second category of picture groups to obtain first category of reorganized picture groups and second category of reorganized picture groups.

[0062] For example, in the first and second types of GOPs, video frames with attribute information nal_ref_idc=0 are searched. The video frames with nal_ref_idc=0 are non-reference frames, so the video frames with nal_ref_idc=0 can be removed from the first and second types of GOPs.

[0063] The specific steps for obtaining the first type of reorganized picture group and the second type of reorganized picture group include: the terminal deletes the non-reference frames in the first type of picture group, and establishes a binding relationship between the video frames in the first type of picture group after the non-reference frames are deleted, to obtain the first type of reorganized picture group; deletes the non-reference frames in the second type of picture group, and establishes a binding relationship between the video frames in the second type of picture group after the non-reference frames are deleted, to obtain the second type of reorganized picture group.

[0064] For example, as shown in FIG4 , FIG4 is a schematic diagram of GOP changes before and after code stream reorganization of a closed GOP. Since any video frame in the closed GOP does not depend on the 2nd, 3rd, 5th, 6th, 9th, and 10th frames during decoding, that is, the 2nd, 3rd, 5th, 6th, 9th, and 10th frames are non-reference frames, the 2nd, 3rd, 5th, 6th, 9th, and 10th frames can be removed from the closed GOP to complete the decoupling of the non-reference frames, and then the retained video frames are combined to obtain the reorganized closed GOP.

[0065] S206 , extracting the instantaneous decoding refresh frame from the first type of reorganized picture group to obtain a target picture group that does not include the instantaneous decoding refresh frame.

[0066] Specifically, the terminal extracts the instantaneous decoding refresh frame from the first type of reassembled picture group according to the first attribute information, wherein the first attribute information can distinguish between the instantaneous decoding refresh frame and the non-instantaneous decoding refresh frame.

[0067] After extracting all instantaneous decoding refresh frames of the to-be-processed video from the first type of reconstructed picture group, the terminal may combine the extracted instantaneous decoding refresh frames to obtain a second video frame sequence. Since the second video frame sequence is a sequence composed of instantaneous decoding refresh frames, the second video frame sequence may also be referred to as an instantaneous decoding refresh frame sequence, as shown in FIG5 .

[0068] Furthermore, after extracting all instantaneous decoding refresh frames of the video to be processed from the first type of reconstructed picture group, the terminal may further combine the first type of reconstructed picture group (i.e., the target picture group) from which the instantaneous decoding refresh frames are extracted with the second type of reconstructed picture group to obtain a first video frame sequence. Since the first video frame sequence is composed of reference frames other than the instantaneous decoding refresh frames, the first video frame sequence may also be referred to as a non-instantaneous decoding refresh frame sequence, as shown in FIG5 .

[0069] S208 : When the number of frames of the instant decoding refresh frame does not meet the decoding condition, sampling is performed on the target group of pictures and the second type of reorganized group of pictures to obtain sampled frames.

[0070] The decoding condition may be a minimum number of video frames during decoding. The number of video frames may be a number of captured frames preset by a user according to actual needs. Therefore, the number of video frames may also be referred to as a preset number of frames.

[0071] In one embodiment, the terminal determines whether the number of frames refreshed by instant decoding meets the decoding conditions. If not, the terminal samples the target group of pictures and the second type of reconstructed group of pictures to obtain sampled frames. The sampling can be performed using a random sampling or uniform sampling method. Using a uniform sampling method allows the decoded video frames to be evenly distributed across the video to be processed, avoiding clumping.

[0072] Specifically, after the terminal combines the target picture group and the second type of recombined picture group to obtain a first video frame sequence, the terminal determines whether the number of frames of the instant decoding refresh frame is greater than or equal to the preset number of frames. If it is less than the preset number of frames, the terminal determines the difference between the preset number of frames and the number of frames of the instant decoding refresh frame; sampling is performed in the first video frame sequence based on the difference, thereby obtaining a sampled frame with a frame number equal to the difference.

[0073] For example, as shown in FIG6 , if the preset number of frames is 100 and the number of IDR frames extracted is 60, there are still 40 frames missing. The terminal will perform uniform sampling in the non-IDR frame sequence to obtain 40 sample frames.

[0074] During sampling, the terminal may prioritize sampling the first video frame in the first type of reconstructed picture group after extracting the instantaneous decoding refresh frame, thereby reducing the number of dependent frames. When the sum of the number of sampled frames and the number of instantaneous decoding refresh frames equals a preset number of frames, S210 may be executed. When the sum of the number of sampled frames and the number of instantaneous decoding refresh frames is less than the preset number of frames, the terminal continues sampling in the second type of reconstructed picture group until the sum of the number of sampled frames and the number of instantaneous decoding refresh frames equals the preset number of frames, thereby extracting the important video frames of the video to be processed, and then executing S210.

[0075] In one embodiment, the non-reference frame is a first-class non-reference frame, that is, the first-class non-reference frame refers to a non-reference frame in the video to be processed or each picture group; therefore, the above-mentioned step of sampling based on the difference in the first video frame sequence can specifically include: determining the second-class non-reference frame in the first video frame sequence; removing the second-class non-reference frame from the first video frame sequence to obtain a new video frame sequence; and sampling based on the difference in the new video frame sequence. Removing the second-class non-reference frame from the first video frame sequence achieves secondary stripping of the non-reference frame, further reducing redundant frames, and is conducive to further improving decoding efficiency.

[0076] After the instantaneous decoding refresh frame is extracted from the first type of reconstructed picture group, a new non-reference frame may exist in the first type of reconstructed picture group after the instantaneous decoding refresh frame is extracted. Accordingly, a new non-reference frame may exist in the first video frame sequence. The new non-reference frame is a second type of non-reference frame. In this case, the second type of non-reference frame can be removed from the first video frame sequence.

[0077] S210 , performing video frame decoding on the sampling frame and the instantaneous decoding refresh frame to obtain a decoded frame.

[0078] The number of sample frames may be N, where N is an integer greater than or equal to 2. During video frame decoding, the terminal may decode the sample frames in parallel, and then decode the sample frames to obtain corresponding decoded frames. Furthermore, the terminal may generate a target video based on the decoded frames.

[0079] In one embodiment, after obtaining a sample frame, the terminal can also determine whether the sample frame has any dependent frames. If so, the dependent frames are extracted to extract the key video frames of the video to be processed. The sample frame, the instantaneous decoding refresh frame, and the dependent frames are then decoded to obtain corresponding decoded frames. Furthermore, the terminal can generate the target video based on the decoded frames.

[0080] For decoding of sampling frames, instantaneous decoding refresh frames and dependent frames, the specific decoding steps include: the terminal decodes at least two instantaneous decoding refresh frames in parallel; and decodes the dependent frames and sampling frames in sequence in a serial manner.

[0081] Among them, the sampling frame may include at least a part of the video frames (that is, it may be a part of the video frames or all the video frames) that have corresponding dependent frames, and the at least part of the video frames is called the first part of the sampling frames, and the other part of the video frames does not have a corresponding dependent frame, and the other part of the video frames is the second part of the sampling frames.

[0082] Specifically, when the sampling frame has a corresponding dependent frame, and the dependent frame is not the same frame as the instantaneous decoding refresh frame, the terminal extracts the dependent frame of the sampling frame from at least one of the target picture group or the second type of reconstructed picture group, and then performs video frame decoding on the sampling frame, the instantaneous decoding refresh frame and the dependent frame.

[0083] Among them, in the first type of reconstructed picture group, the instant decoding refresh frame is the dependent frame of its next video frame, that is, the next video frame depends on the immediate decoding refresh frame during decoding. When the next video frame is used as a sampling frame, even if the next video frame has a dependent frame, since the dependent frame is the immediate decoding refresh frame, there is no need to extract the dependent frame at this time; if the sampling frame is not the next video frame of the immediate decoding refresh frame, but other video frames separated by the next video frame, the dependent frame and the immediate decoding refresh frame are not the same frame, and the corresponding dependent frame needs to be extracted at this time.

[0084] For example, when a sampling frame with a frame number equal to the above-mentioned difference is sampled in the target picture group, the terminal can extract the dependent frame of the sampling frame from the target picture group; or, when a sampling frame with a frame number equal to the above-mentioned difference is sampled only from the second type of reconstructed picture group, the terminal can extract the dependent frame of the sampling frame from the second type of reconstructed picture group; or, when a sampling frame with a frame number equal to the above-mentioned difference is sampled from the above-mentioned two types of reconstructed picture groups, the terminal can extract the dependent frame of the sampling frame from the first type of reconstructed picture group and the second type of reconstructed picture group.

[0085] For example, as shown in Figure 6, assuming that frames 2 and 4 are sampled frames, since frame 2's dependent frame is an IDR frame, there is no need to extract its dependent frame. Since frame 4's dependent frame is frame 3, frame 3 needs to be extracted. During decoding, the terminal only needs to decode the IDR frame and frames 2-4, without decoding frame 2.

[0086] In the above embodiment, a first type of picture group containing instantaneous decoding refresh frames and a second type of picture group not containing instantaneous decoding refresh frames are extracted from the video to be processed, and non-reference frames in the first and second types of picture groups are eliminated, thereby effectively avoiding the decoding of non-reference frames, reducing memory space usage, and facilitating improved video decoding efficiency. In addition, during the video thinning process, instantaneous decoding refresh frames are extracted from the first type of reconstructed picture group, and only when the number of instantaneous decoding refresh frames does not meet the decoding condition, the first type of reconstructed picture group and the second type of reconstructed picture group from which the instantaneous decoding refresh frames are extracted are sampled to obtain sampled frames. Therefore, it is not necessary to decode all reference frames of the video to be processed. Only the sampled frames and the instantaneous decoding refresh frames need to be decoded to obtain decoded frames, further reducing the decoding computational complexity and significantly improving video decoding efficiency. Moreover, under the premise of fixing the required number of frame clippings, the obtained decoded frames cover the core semantics of the video to be processed, so that in downstream application scenarios, the decoded frames can be used to obtain video processing results that represent the video to be processed with high accuracy.

[0087] In one embodiment, the terminal obtains a luminance vector, a first chrominance vector, and a second chrominance vector of a decoded frame; and linearly transforms the luminance vector, the first chrominance vector, and the second chrominance vector to obtain a decoded frame in a target format. Furthermore, after obtaining the decoded frame in the target format, the terminal may further obtain a target video based on the decoded frame in the target format.

[0088] The format of the decoded frame may be a YUV format, where Y represents brightness and U and V represent chrominance. The target format may be an RGB (red green blue) or BGR format.

[0089] The Y, U, and V vectors can be linearly transformed to convert the YUV format to the RGB format or the BGR format. The linear transformation formula is as follows: R = Y + 1.403*V; G = Y - 0.344*U - 0.714*V; B = Y + 1.770*U.

[0090] In the above embodiment, the format of the decoded frames is converted to obtain decoded frames in the target format, and the target video is obtained based on the decoded frames in the target format, thereby converting the decoded frames into the target video that can be used on conventional devices.

[0091] After obtaining the decoded frame in the target format, the decoded frame can be applied to the corresponding application scenario, such as video understanding, posture recognition, and content recognition. The specific application scenarios are as follows:

[0092] Scenario 1, application scenario of video understanding.

[0093] In one embodiment, the terminal responds to the video classification operation by classifying the decoded frames using a video classification model to determine the video type to which the video to be processed belongs. Because the decoded frames retain all key information about the video to be processed, classification using the target video can significantly shorten video classification time and improve video classification efficiency.

[0094] The video classification operation may be an operation input by a user for performing classification using decoded frames.

[0095] Specifically, the user can trigger the video classification operation on the operation page of the client. At this time, the terminal can input the decoded frame into the video classification model, and use the video classification model to understand and classify the decoded frame to obtain the video type to which the video to be processed belongs.

[0096] For example, as shown in FIG7 , the decoded frames obtained after the sports video to be processed is sparsely processed are input into the video classification model. Through the understanding and classification of the video classification model, the type corresponding to the sports video can be output, such as the sports video to be processed is a video of "horse racing", "swimming", "high jump" and "hula hoop" competitions.

[0097] Scenario 2, application scenario of posture recognition.

[0098] In one embodiment, in response to a gesture recognition operation, the terminal uses a video recognition model to perform gesture recognition on an object in a target video and obtain gesture information corresponding to the object. After obtaining the gesture information, if the gesture information meets a preset gesture condition, the terminal can initiate an interaction process corresponding to the gesture condition, such as taking a photo of the object.

[0099] The object in the target video may be a person. The gesture recognition operation may be an operation for gesture recognition input by a user through a terminal. Alternatively, the gesture recognition operation may be an operation for gesture recognition triggered when the terminal detects a user through an associated device, which may be a device connected to the terminal, such as a drone or robot.

[0100] For example, when a drone or robot detects a human object, it sends a start command to a terminal (such as a mobile phone), which triggers the gesture recognition operation and enters the gesture recognition process. The drone or robot sends the video to be processed obtained by real-time shooting of the human object in the form of a video stream to the terminal. The terminal processes the video to be processed using the video processing method of the present application to obtain a corresponding decoded frame, and then performs gesture recognition on the human object in the decoded frame to obtain corresponding gesture information, such as OK gesture information. If the human object makes an OK gesture, the OK gesture corresponds to the photo taking parameter. When the OK gesture information is recognized through the decoded frame, the terminal can capture the human object.

[0101] Scenario 3, application scenario of content recognition.

[0102] In one embodiment, in response to the content recognition operation, the terminal performs semantic recognition on the decoded frame through a video processing model to obtain video information corresponding to the video to be processed.

[0103] The video information may be video description information or object description information corresponding to a target object in a video frame to be processed.

[0104] When the video information is object description information, the terminal can input the decoded frame into the video processing model for semantic recognition to obtain the corresponding object description information. In addition, the user can select one of the multiple target objects in the current playback frame for recognition and search to obtain the corresponding object description information. The steps can be referred to in Figure 8 and may include:

[0105] S802 : During playback of the decoded frame, in response to an image processing operation triggered on the current playback frame, displaying a target object segmented from the current playback frame in a highlighted manner.

[0106] The currently played frame is the decoded frame currently played. The target object is identified and segmented by a video processing model.

[0107] The image processing operation can be a click or long press on the current playback frame. The highlighting method can be a display method that distinguishes the target object from other image content (such as the background) in the current playback frame, such as placing a semi-transparent mask with the same size as the target object above the target object to distinguish the target object from other image content in the current playback frame. The semi-transparent mask can be a semi-transparent white mask or other color mask.

[0108] The target object can be an object of interest in the current playback frame, including human objects, static objects, and graphic text. Furthermore, target objects can include plants, animals, buildings, mountains, and rivers. Static objects can include clothing worn by the human object, objects held in hand, and nearby objects. Nearby objects and handheld objects can be cars, mobile phones, computers, chargers, watches, food, and fruit, respectively. Clothing can include clothes, pants, hats, and other decorative items worn.

[0109] For example, in a sports video, as shown in Figure 9, the current frame is the currently playing frame in the sports video. If the user prefers the commentary style of the commentator in the current frame but is unsure of the commentator's identity, they can double-click the current frame. The terminal will then detect the target object in the current frame and highlight it. It should be noted that if there are multiple target objects in the current frame, all of them can be detected through target detection and displayed in a highlighted manner.

[0110] S804 , in response to the triggering operation on the target object, displaying search terms related to the target object triggered in the current playing frame.

[0111] The search terms may include characters or words directly related to the target object, or may be words related to the target object. The number of search terms may be one or more, such as one, two, or more than two. In addition, the search terms may also include characters or words indirectly related to the target object, such as search terms for other related objects derived from the target object. For example, assuming that the target object is a person (such as Liu), the search terms may include an introduction to Liu and Liu's recent dynamics, as shown in FIG10 (a).

[0112] The triggering operation on the target object may refer to an operation of selecting the target object, such as an operation of touching or clicking the target object.

[0113] When there are multiple target objects segmented, you can display search terms related to specific target objects according to actual needs. For example, if there are target objects a and target objects b, you can click or touch target object a to display search terms related to target object a; or you can click or touch target object b to display search terms related to target object b.

[0114] S806 : In response to the triggering operation on the search term, displaying object description information associated with the target object searched based on the triggered search term.

[0115] The object description information may be public information of the target object, through which the target object can be understood; or the object information may be detailed information of other related objects derived from the target object.

[0116] When there are multiple search terms, you can select one of them to trigger, as shown in Figure 10 (a), which triggers the search term "Liu's introduction". In addition, if the displayed search terms do not meet your needs, you can enter the actual search terms in the search box based on the displayed search terms, and then use the entered search terms to search.

[0117] In one embodiment, in response to a triggering operation on a search term, the terminal searches for object description information of a target object based on the triggered search term; during the search process, the terminal can jump from the current page to the search page, such as jumping from a media page displaying media information to the search page; and the object description information is displayed on the search page, as shown in Figure 10 (b). The search page can be a page for displaying object description information.

[0118] It should be noted that, in addition to being applicable to the above three application scenarios, the video processing method of the present application can also be applied to any other scenario requiring video decoding.

[0119] In the above embodiment, during the video playback process, if it is necessary to search for the content in the current playback frame, an operation can be triggered on the current playback frame. At this time, the target object in the current playback frame will be segmented and displayed in a highlighted manner, so that the required target object can be selected, avoiding the need to use the entire current playback frame for searching; in addition, search terms related to the target object are also displayed, so that one of the search terms can be selected for search to obtain the object description information of the target object, so as to search for the target object and the search direction in a targeted manner, thereby realizing a refined search and improving the accuracy of the search results and the search effect; moreover, when searching, there is no need to manually input the current playback frame into the search engine for search, thereby improving the search efficiency.

[0120] As an example, the solution of the present application is described with reference to Figures 3, 4, 5, 6, 11, and 12, as follows:

[0121] As shown in Figure 11, the video stream of the video to be processed is first parsed to obtain the distribution of non-reference frames and different types of GOPs, such as closed GOPs and open GOPs. The non-reference frames in the GOP are then decoupled and reassembled, and the two associated reference frames are bound together. Next, IDR frames are preferentially extracted from the reassembled GOP, and all extracted IDR frames are combined into an IDR frame sequence. The remaining video frames in the reassembled GOP are combined into a non-IDR frame sequence. If the number of IDR frames is less than the number of frames actually required by the user, uniform sampling is performed from the non-IDR frame sequence. The IDR frames, sampled frames, and their dependent frames are then decoded to obtain decoded frames. Finally, all decoded frames are converted to a color space from YUV format to the universal RGB / BGR format.

[0122] (1) Code stream analysis.

[0123] In the video stream to be processed, each video frame is encapsulated in a data packet. This data packet contains not only the frame type (I-frame, P-frame, B-frame), but also attribute information such as whether the video frame is an IDR frame and nal_ref_idc. The attribute information used to determine whether it is an IDR frame can be used to determine the distribution of each closed GOP, while nal_ref_idc can be used to filter out non-reference frames (nal_ref_idc = 0 indicates a non-reference frame, and nal_ref_idc != 0 indicates a reference frame).

[0124] The first frame of each GOP is an I-frame. If the first frame is an IDR-frame, the GOP is a closed GOP; otherwise, it is an open GOP. Frame decoding in an open GOP may rely on the decoding results of the previous GOP. For example, frame 14 depends on the decoding results of frame 12. See Figure 3. Furthermore, the distribution of non-reference frames can be obtained based on nal_ref_idc. For example, frames 2 and 3 are non-reference frames. Non-reference frames mean that the decoding of other frames does not depend on the decoding results of frames 2 and 3. Therefore, discarding these two frames will not affect the subsequent decoding process.

[0125] (2) Stream reorganization.

[0126] Since non-reference frames are similar to nearby reference frames, the present application strips non-reference frames to achieve decoupling, so that only the decoding of reference frames is considered during decoding, thereby reducing redundant frames and improving decoding efficiency.

[0127] Figure 4 shows the specific process of GOP reorganization. Taking the closed GOP in Figure 4 as an example, this application first decouples the non-reference frames, that is, discards the 2nd, 3rd, 5th, 6th, 9th, and 10th frames, and then binds the video frames in the reorganized GOP, such as associating the 7th frame with the 4th frame, so that the decoder decodes the 7th frame after decoding the 4th frame, without decoding the 2nd and 3rd frames.

[0128] (3) IDR frame extraction.

[0129] Typically, when encountering video frames with large differences during video encoding, the reference frame queue is cleared and an IDR frame is re-encoded to prevent the encoding error from continuing to propagate. This application prioritizes extracting IDR frames and retains frames with large image changes as much as possible. All extracted IDR frames can form an IDR frame sequence, as shown in Figure 5.

[0130] Since each closed GOP is independent of each other, the first frame of each closed GOP (i.e., the IDR frame) can be decoded directly and separately. During the decoding process, video decoding can be performed in parallel, further accelerating the decoding speed. In addition, by prioritizing the decoding of IDR frames, the memory access and decoding of other frames in the GOP can be reduced, thus accelerating the decoding speed.

[0131] (4) Non-IDR frame extraction.

[0132] When the number of IDR frames I num When the number of intercepted frames N is less than the required number, the non-IDR frame sequence will be sampled to obtain a sufficient number of video frames. As shown in Figure 5, after obtaining the non-IDR frame sequence, the number of non-IDR frames required for decoding is calculated as T = NI num Then, T video frames are uniformly sampled from the non-IDR frame sequence (hereinafter referred to as sampling frames for easy distinction). Since the sampling frames may depend on other reference frames (referred to as dependent frames), the IDR frames, sampling frames and corresponding dependent frames can be decoded to ensure complete decoding of the sampling frames.

[0133] As shown in FIG6 , two sampling frames (such as frames 2 and 4) are obtained by uniformly sampling from a non-IDR frame sequence. Since the dependent frame of frame 2 is an IDR frame and the dependent frame of frame 4 is frame 3, frame 3 needs to be decoded before decoding the sampling frame.

[0134] This application only needs to decode IDR frames, sampling frames and corresponding dependent frames, without decoding and caching all non-IDR frames first and then uniformly sampling them, which greatly reduces memory consumption and decoding time.

[0135] It should be pointed out that after the non-reference frames in each GOP of the video stream are stripped and reassembled, a reassembled GOP is obtained. New non-reference frames may appear in the reassembled GOP. At this time, secondary stripping can be performed to further reduce redundant frames, thereby greatly improving decoding efficiency.

[0136] (5) Color space conversion.

[0137] The decoded video frame format is YUV format, and the color space needs to be converted to the universal RGB / BGR format. The conversion from YUV format to RGB / BGR format can be achieved by linearly transforming the Y, U, and V vectors. The linear transformation formula is as follows: R = Y + 1.403 * VG = Y - 0.344 * U - 0.714 * VB = Y + 1.770 * U

[0138] (6) Examples of technology applications.

[0139] As a general video sparse frame cropping method, the present application can be applied to application scenarios such as video understanding, action recognition, and video content description. As shown in Figure 12, the solution of the present application is used to process the video to be processed, and a target video mainly including IDR frames is obtained. In addition, the frames with large picture changes can be retained by using IDR frames, which is more conducive to video processing tasks. In addition, decoding is accelerated by stripping non-reference frames, and the decoded video frame results will be given to a specific video model for processing, such as obtaining the video type by video understanding. As can be seen from Figure 12, under the premise of a fixed number of frame cropping, the frame cropping method of the present application can be used to identify all video clips in the video to be processed, while the existing frame cropping method cannot identify all video clips in the video to be processed, resulting in a low video classification accuracy rate.

[0140] This application implements fast video sparse frame cropping based on non-reference frame stripping and IDR frame extraction. Compared with existing methods, the advantages of this application are:

[0141] (1) Discard non-reference frames, reduce redundant frames and speed up decoding;

[0142] (2) Prioritize decoding IDR frames and retain as many video frames with large picture changes as possible to ensure that the frame capture results can best represent the entire video to be processed;

[0143] (3) Only the sampled frame and its dependent frames are decoded to avoid the memory surge and low decoding efficiency caused by decoding all frames.

[0144] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0145] Based on the same inventive concept, the embodiments of the present application further provide a video processing device for implementing the aforementioned video processing method. The implementation solution provided by the device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more video processing device embodiments provided below can be found in the above-mentioned limitations on the video processing method and will not be repeated here.

[0146] In one embodiment, as shown in FIG13 , a video processing apparatus is provided, including: an acquisition module 1302 , a screening module 1304 , an extraction module 1306 , a sampling module 1308 , and a decoding module 1310 , wherein:

[0147] An acquisition module 1302 is configured to acquire attribute information of a video frame, a first-category picture group, and a second-category picture group from a video to be processed;

[0148] A screening module 1304 is configured to delete non-reference frames in the first type of picture group and non-reference frames in the second type of picture group based on the attribute information to obtain a first type of reconstructed picture group and a second type of reconstructed picture group;

[0149] An extraction module 1306 is configured to extract the instantaneous decoding refresh frame from the first type of reconstructed picture group to obtain the instantaneous decoding refresh frame and a target picture group that does not include the instantaneous decoding refresh frame;

[0150] A sampling module 1308 is configured to sample the target group of pictures and the second type of reconstructed group of pictures to obtain a sampling frame when the number of frames of the instant decoding refresh frame does not meet the decoding condition;

[0151] The decoding module 1310 is configured to perform video frame decoding on the sampling frame and the instant decoding refresh frame to obtain a decoded frame.

[0152] In some of the embodiments, the attribute information includes first attribute information for distinguishing an instantaneous decoding refresh frame from a non-instantaneous decoding refresh frame;

[0153] The acquisition module 1302 is further configured to parse first attribute information and at least two picture groups from the video to be processed; and perform group classification on the at least two picture groups based on the first attribute information to obtain a first type of picture group including instantaneous decoding refresh frames and a second type of picture group including non-instantaneous decoding refresh frames.

[0154] In some embodiments, the acquisition module 1302 is further configured to determine position information of the instantaneous decoding refresh frame based on the first attribute information; determine distribution information of different types of picture groups based on the position information of the instantaneous decoding refresh frame; and filter out, from the at least two picture groups, a first type of picture group including the instantaneous decoding refresh frame and a second type of picture group including the non-instantaneous decoding refresh frame based on the distribution information.

[0155] In some of these embodiments, the attribute information includes second attribute information for distinguishing non-reference frames;

[0156] The screening module 1304 is further configured to search for non-reference frames in the first type of picture group and non-reference frames in the second type of picture group based on the second attribute information; and delete the non-reference frames in the first type of picture group and the non-reference frames in the second type of picture group to obtain the first type of reconstructed picture group and the second type of reconstructed picture group.

[0157] In some embodiments, the screening module 1304 is further configured to delete the non-reference frames in the first category of picture groups, and establish a binding relationship between the video frames in the first category of picture groups after the non-reference frames are deleted, to obtain a first category of reorganized picture groups; and delete the non-reference frames in the second category of picture groups, and establish a binding relationship between the video frames in the second category of picture groups after the non-reference frames are deleted, to obtain a second category of reorganized picture groups.

[0158] In some embodiments, as shown in FIG14 , the apparatus further comprises:

[0159] An arrangement module 1312 is configured to combine the target picture group and the second type of recombined picture group to obtain a first video frame sequence;

[0160] The sampling module 1308 is further configured to determine a difference between the preset number of frames and the number of frames of the instantaneous decoding refresh frame when the number of frames of the instantaneous decoding refresh frame is less than the preset number of frames; and perform sampling in the first video frame sequence according to the difference.

[0161] In some of these embodiments, the non-reference frame is a first type of non-reference frame;

[0162] The sampling module 1308 is further configured to determine a second type of non-reference frames in the first video frame sequence; remove the second type of non-reference frames from the first video frame sequence to obtain a new video frame sequence; and perform sampling in the new video frame sequence based on the difference.

[0163] In some of these embodiments, the extracted instantaneous decoding refresh frames constitute a second sequence of video frames;

[0164] The decoding module 1310 is further configured to, when the number of instantaneous decoding refresh frames meets a decoding condition, perform video frame decoding based on each instantaneous decoding refresh frame in the second video frame sequence to obtain a decoded frame.

[0165] In some embodiments, the sampling module 1308 is further configured to extract the dependent frame of the sampled frame from at least one of the target group of pictures or the second type of reconstructed group of pictures when the sampled frame has a corresponding dependent frame and the dependent frame is not the same as the instantaneous decoding refresh frame;

[0166] The decoding module 1310 is further configured to perform video frame decoding on the sampling frames, the instant decoding refresh frames and the dependent frames.

[0167] In some of these embodiments, the number of frames of the instantaneous decoding refresh frame is at least two;

[0168] The decoding module 1310 is further configured to perform video frame decoding on at least two instantaneous decoding refresh frames in parallel, and to perform video frame decoding on dependent frames and sampling frames in sequence in a serial manner.

[0169] In the above embodiment, a first type of picture group containing instantaneous decoding refresh frames and a second type of picture group not containing instantaneous decoding refresh frames are extracted from the video to be processed, and non-reference frames in the first and second types of picture groups are eliminated, thereby effectively avoiding the decoding of non-reference frames, reducing memory space usage, and facilitating improved video decoding efficiency. In addition, during the video thinning process, instantaneous decoding refresh frames are extracted from the first type of reconstructed picture group, and only when the number of instantaneous decoding refresh frames does not meet the decoding condition, the first type of reconstructed picture group and the second type of reconstructed picture group from which the instantaneous decoding refresh frames are extracted are sampled to obtain sampled frames. Therefore, it is not necessary to decode all reference frames of the video to be processed. Only the sampled frames and the instantaneous decoding refresh frames need to be decoded to obtain decoded frames, further reducing the decoding computational complexity and significantly improving video decoding efficiency. Moreover, under the premise of fixing the required number of frame clippings, the obtained decoded frames cover the core semantics of the video to be processed, so that in downstream application scenarios, the decoded frames can be used to obtain video processing results that represent the video to be processed with high accuracy.

[0170] In some embodiments, as shown in FIG14 , the apparatus further comprises:

[0171] The acquisition module 1302 is further configured to acquire a luminance vector, a first chrominance vector, and a second chrominance vector of a decoded frame;

[0172] The conversion module 1314 is configured to perform linear conversion on the luminance vector, the first chrominance vector, and the second chrominance vector respectively to obtain a decoded frame in a target format.

[0173] In some embodiments, as shown in FIG14 , the apparatus further comprises:

[0174] A classification module 1316 is configured to classify the target video using a video classification model in response to the video classification operation to obtain a video type to which the target video belongs;

[0175] The gesture recognition module 1318 is configured to perform gesture recognition on an object in a target video using a video recognition model in response to a gesture recognition operation to obtain gesture information corresponding to the object;

[0176] The semantic recognition module 1320 is configured to perform semantic recognition on the target video through a video processing model in response to the content recognition operation, and obtain video information corresponding to the target video.

[0177] In some of these embodiments, the video information includes object description information;

[0178] The semantic recognition module 1320 is also used to, during the playback of the target video, in response to an image processing operation triggered on the current playback frame of the target video, display in a highlighted manner the target object segmented from the current playback frame; the target object is identified and segmented by the video processing model; in response to the triggering operation on the target object, display search terms related to the target object triggered in the current playback frame; in response to the triggering operation on the search terms, display object description information associated with the target object searched based on the triggered search terms.

[0179] In the above embodiment, after the video to be processed is cut out to obtain decoded frames, the decoded frames are used for classification and recognition, which can effectively speed up the efficiency of classification and recognition while ensuring the accuracy.

[0180] In addition, during the video playback process, if you need to search for the content in the current playback frame, you can trigger an operation on the current playback frame. At this time, the target object in the current playback frame will be segmented and displayed in a highlighted manner, so that you can select the required target object, avoiding the need to use the entire current playback frame for searching; in addition, search terms related to the target object are also displayed, so that you can select one of the search terms for search and obtain the object description information of the target object, so as to search for the target object and the search direction in a targeted manner, thereby realizing refined search and improving the accuracy of search results and search effect; moreover, when searching, there is no need to manually input the current playback frame into the search engine for search, which improves search efficiency.

[0181] Each module in the above-mentioned video processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0182] In one embodiment, a computer device is provided. The computer device may be a server or a terminal. Taking a terminal as an example, its internal structure diagram may be shown in FIG15 . The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication. The wireless communication may be implemented via Wi-Fi, a mobile cellular network, NFC (near field communication), or other technologies. When executed by the processor, the computer program implements a video processing method. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0183] Those skilled in the art will understand that the structure shown in FIG15 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0184] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the video processing method when executing the computer program.

[0185] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the video processing method are implemented.

[0186] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the video processing method when executed by a processor.

[0187] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0188] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0189] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0190] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A video processing method, executed by a computer device, wherein: The method comprises: Acquire attribute information of a video frame, a first-category picture group, and a second-category picture group from a video to be processed; According to the attribute information, the non-reference frames in the first type of picture group and the non-reference frames in the second type of picture group are deleted to obtain a first type of reorganized picture group and a second type of reorganized picture group; Extracting an instantaneous decoding refresh frame from the first type of reorganized picture group, obtaining the instantaneous decoding refresh frame and a target picture group that does not include the instantaneous decoding refresh frame; When the number of frames of the instant decoding refresh frame does not meet the decoding condition, sampling the target group of pictures and the second type of reorganized group of pictures to obtain a sampled frame; Video frame decoding is performed on the sampling frame and the instant decoding refresh frame to obtain a decoded frame.

2. The method according to claim 1, wherein: The step of acquiring attribute information of a video frame, a first type of picture group, and a second type of picture group from the video to be processed includes: Parsing attribute information and at least two picture groups from the video to be processed; the attribute information includes first attribute information for distinguishing the instantaneous decoding refresh frame from the non-instantaneous decoding refresh frame; The at least two picture groups are group-identified according to the first attribute information to obtain a first picture group including the instantaneous decoding refresh frame and a second picture group including the non-instantaneous decoding refresh frame.

3. The method according to claim 2, wherein: The step of performing group identification on the at least two picture groups according to the first attribute information to obtain a first picture group including the instantaneous decoding refresh frame and a second picture group including the non-instantaneous decoding refresh frame comprises: Determining the position information of the instant decoding refresh frame according to the first attribute information; Determine distribution information of different types of picture groups based on position information of the instant decoding refresh frame; A first type of picture group including the instantaneous decoding refresh frame and a second type of picture group including the non-instantaneous decoding refresh frame are screened out from the at least two picture groups according to the distribution information.

4. The method according to claim 1, wherein: The attribute information includes second attribute information for distinguishing the non-reference frame; The method of deleting the non-reference frames in the first type of picture group and the non-reference frames in the second type of picture group according to the attribute information to obtain the first type of reorganized picture group and the second type of reorganized picture group comprises: searching for non-reference frames in the first type of picture group and non-reference frames in the second type of picture group according to the second attribute information; The non-reference frames in the first-type picture group and the non-reference frames in the second-type picture group are deleted to obtain a first-type reorganized picture group and a second-type reorganized picture group.

5. The method according to claim 4, wherein: The step of deleting the non-reference frames in the first type of picture group and the non-reference frames in the second type of picture group to obtain the first type of reorganized picture group and the second type of reorganized picture group comprises: Deleting the non-reference frames in the first-type picture group, and establishing a binding relationship between the video frames in the first-type picture group after deleting the non-reference frames, to obtain a first-type reorganized picture group; The non-reference frames in the second-type picture group are deleted, and a binding relationship is established for the video frames in the second-type picture group after the non-reference frames are deleted, so as to obtain a second-type reorganized picture group.

6. The method according to claim 1, wherein: After extracting the instant decoding refresh frame from the first type of reorganized picture group, the method further includes: Combining the target picture group and the second-type reorganized picture group to obtain a first video frame sequence; When the number of frames of the instant decoding refresh frame does not meet the decoding condition, sampling the target group of pictures and the second type of reorganized group of pictures comprises: When the frame number of the instantaneous decoding refresh frame is less than the preset frame number, determining a difference between the preset frame number and the frame number of the instantaneous decoding refresh frame; Sampling is performed in the first video frame sequence according to the difference value.

7. The method according to claim 6, wherein: The non-reference frame is a first type of non-reference frame; and the sampling according to the difference in the first video frame sequence includes: determining a second type of non-reference frame in the first video frame sequence; Eliminating the second type of non-reference frames from the first video frame sequence to obtain a new video frame sequence; Sampling is performed in the new video frame sequence according to the difference.

8. The method according to claim 1, wherein: The extracted instant decoding refresh frames constitute a second video frame sequence; the method further comprises: When the number of the instantaneous decoding refresh frames meets the decoding condition, video frame decoding is performed based on each instantaneous decoding refresh frame in the second video frame sequence to obtain a decoded frame.

9. The method according to claim 1, wherein: The method further comprises: When the sample frame has a corresponding dependent frame, and the dependent frame is not the same frame as the instantaneous decoding refresh frame, extracting the dependent frame of the sample frame from at least one of the target group of pictures or the second type of reconstructed group of pictures; The performing video frame decoding on the sampling frame and the instant decoding refresh frame comprises: Video frame decoding is performed on the sampling frame, the instantaneous decoding refresh frame and the dependent frame.

10. The method according to claim 9, wherein: The number of frames of the instant decoding refresh frame is at least two; and the video frame decoding of the sampling frame, the instant decoding refresh frame and the dependent frame includes: Decoding the video frames on at least two of the instantaneous decoding refresh frames in parallel; The dependent frame and the sampling frame are sequentially decoded in a serial manner.

11. The method according to any one of claims 1 to 10, wherein: The method further comprises: Obtaining a luminance vector, a first chrominance vector, and a second chrominance vector of the decoded frame; The luminance vector, the first chrominance vector, and the second chrominance vector are linearly converted respectively to obtain a decoded frame in a target format.

12. The method according to claim 11, wherein: The method further comprises: In response to the video classification operation, the decoded frame is classified by a video classification model to obtain a video type to which the video to be processed belongs; In response to the gesture recognition operation, performing gesture recognition on the object in the decoded frame through a video recognition model to obtain gesture information corresponding to the object; In response to the content recognition operation, semantic recognition is performed on the decoded frame through a video processing model to obtain video information corresponding to the video to be processed.

13. The method according to claim 12, wherein: The video information includes object description information; in response to the content recognition operation, semantic recognition is performed on the decoded frame through a video processing model to obtain video information corresponding to the video to be processed, including: In the process of playing the decoded frame, in response to an image processing operation triggered on the current playing frame, a target object segmented from the current playing frame is displayed in a prominent manner; the current playing frame is the decoded frame currently being played; the target object is identified and segmented by a video processing model; In response to a triggering operation on the target object, displaying search terms related to the target object triggered in the current playing frame; In response to a triggering operation on the search term, object description information associated with the target object searched based on the triggered search term is displayed.

14. A video processing device, wherein: The device comprises: An acquisition module, used for acquiring attribute information of a video frame, a first-category picture group, and a second-category picture group from a video to be processed; A screening module, configured to delete the non-reference frames in the first-category picture group and the non-reference frames in the second-category picture group according to the attribute information, so as to obtain the first-category reorganized picture group and the second-category reorganized picture group; An extraction module, configured to extract an instantaneous decoding refresh frame from the first type of reorganized picture group, and obtain the instantaneous decoding refresh frame and a target picture group that does not include the instantaneous decoding refresh frame; A sampling module, configured to sample the target group of pictures and the second type of reorganized group of pictures to obtain a sampling frame when the number of frames of the instant decoding refresh frame does not meet a decoding condition; The decoding module is used to perform video frame decoding on the sampling frame and the instant decoding refresh frame to obtain a decoded frame.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Encoding device, encoding method, transmission device, decoding device, decoding method, and reception device

    CN105340277A

  • Code stream coding method and device for code stream receiving equipment

    CN107333133A

  • Video data transmission method and device

    CN113365066A

  • Streaming media seek method, client, storage medium and mobile device

    CN114615549A

  • Video frame extraction method and device, equipment and storage medium

    CN115499662A