Video processing method and apparatus, and related product

WO2025185287A8PCT designated stage Publication Date: 2025-10-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/139591
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-06
Filing Date
2024-12-16
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In the prior art, after transcoding video data with video special effects, the quality of the transcoded video data is low, and the user browsing experience is poor.

Method used

By obtaining the image information in the video data and the image similarity between adjacent video frames, it is determined whether the video data includes video special effects. When it is determined that video special effects exist, a first transcoding method is adopted to reduce the amount of video information lost during the transcoding process of the video data, specifically by reducing the values ​​of transcoding parameters such as CRF and QP for transcoding.

Benefits of technology

The quality of transcoded video data is improved, which enhances the user browsing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024139591_02102025_PF_FP_ABST
    Figure CN2024139591_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a video processing method and apparatus, and a related product. The method comprises: acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining an image similarity between adjacent video frames in the video data (S102); on the basis of the image information and the image similarity, determining whether the video data comprises a video special effect (S104); and, if the video data comprises a video special effect, transcoding the video data according to a first transcoding mode, wherein the first transcoding mode is used for reducing the amount of video information lost during the video data transcoding process (S106).
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device and related products

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on and claims priority to a Chinese patent application with Chinese application number 202410256991.3 and application date March 6, 2024. The disclosed content of the Chinese patent application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the field of video processing, and in particular to a video processing method, device, and related products. Background Art

[0004] Video transcoding refers to converting a compressed and encoded video stream into another video stream to achieve format conversion, bit rate adjustment, or media processing of the video data. Media processing can be, for example, definition adjustment. Summary of the Invention

[0005] The embodiments of the present disclosure provide a video processing method, apparatus, and related products.

[0006] In a first aspect, an embodiment of the present disclosure provides a video processing method, including:

[0007] Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0008] determining, based on the image information and the image similarity, whether the video data includes video special effects;

[0009] If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0010] In a second aspect, an embodiment of the present disclosure provides a video processing device, including:

[0011] a first determining unit, configured to acquire video data, determine image information of video frames in the video data in at least one image channel, and determine image similarity between adjacent video frames in the video data;

[0012] a special effects determination unit, configured to determine whether the video data includes a video special effect based on the image information and the image similarity;

[0013] The first transcoding unit is configured to transcode the video data according to a first transcoding method if the video data includes video special effects; the first transcoding method is configured to reduce the amount of video information lost during the transcoding process of the video data.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.

[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method described in the first aspect.

[0017] In a sixth aspect, an embodiment of the present disclosure provides a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in one or more embodiments of the present disclosure or related technologies, the following briefly introduces the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings described below are only some embodiments described in the present disclosure. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0019] FIG1 is a flow chart of a video processing method according to one or more embodiments of the present disclosure;

[0020] FIG2 is a flow chart of a video processing method provided by one or more embodiments of the present disclosure;

[0021] FIG3 is a schematic structural diagram of a video processing device provided by one or more embodiments of the present disclosure;

[0022] FIG4 is a schematic diagram of the structure of an electronic device provided by one or more embodiments of the present disclosure. DETAILED DESCRIPTION

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

[0024] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] Currently, after transcoding video data with video special effects, the quality of the transcoded video data is low, and the user browsing experience is poor.

[0029] The embodiments of the present disclosure provide a video processing method, device and related products, which can transcode video data with video special effects, improve the quality of the transcoded video data, and enhance the user browsing experience.

[0030] In one or more embodiments of the present disclosure, first, video data is acquired, image information of a video frame in the video data in at least one image channel is determined, and image similarity between adjacent video frames in the video data is determined. Then, based on the determined image information and image similarity, it is determined whether the video data includes video special effects. Finally, if it is determined that the video data includes video special effects, the video data is transcoded according to a first transcoding method, which is used to reduce the amount of video information lost during the transcoding process of the video data. It can be seen that through this embodiment, video data with video special effects can be transcoded, and the amount of video information lost during the transcoding process of the video data can be reduced, thereby improving the quality of the transcoded video data and enhancing the user browsing experience.

[0031] The embodiments of the present disclosure provide a video processing method that can transcode video data with video special effects, improve the quality of the transcoded video data, and enhance the user browsing experience.

[0032] FIG1 is a flow chart of a video processing method provided by an embodiment of the present disclosure. As shown in FIG1 , the flow includes:

[0033] Step S102, acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0034] Step S104, judging whether the video data includes video special effects based on the image information and image similarity;

[0035] Step S106: If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0036] In this embodiment, first, video data is acquired, image information of video frames in the video data in at least one image channel is determined, and image similarity between adjacent video frames in the video data is determined. Then, based on the determined image information and image similarity, it is determined whether the video data includes video special effects. Finally, if it is determined that the video data includes video special effects, the video data is transcoded according to a first transcoding method, which is used to reduce the amount of video information lost during the transcoding process. Thus, this embodiment can transcode video data with video special effects, reduce the amount of video information lost during the transcoding process, improve the quality of the transcoded video data, and enhance the user browsing experience.

[0037] The video processing method in this embodiment can be applied on the server side and executed by the server. The server can transcode the video data through the method in this embodiment and send the transcoded video data to the user terminal, thereby realizing the format conversion, bit rate adjustment or media processing of the video data, so that the transcoded video data can be played in the user terminal.

[0038] The method flow in FIG1 is described in detail below.

[0039] In the above step S102, video data is obtained. The video data may be video data to be sent to a user terminal. In this embodiment, there is no limitation on the length, content or type of the video data. Any video data can be transcoded using the method of this embodiment.

[0040] In the above step S102, the image information of the video frame in the video data in at least one image channel is determined. In one embodiment, the video processing method in this embodiment can detect whether the video data includes gradient effects, and the gradient effects include but are not limited to gradient effects for brightness and / or color. The at least one image channel in this step includes one or more channels of the three channels of brightness, chroma and YUV. In this step, the image information of each video frame in the video data in at least one image channel is determined, for example, the value of each video frame in the video data in one or more channels of the three channels of YUV is determined. Among them, the Y channel is the brightness information of the video frame, the U channel and the V channel are the chroma channels of the video frame, U represents the blue chroma component, and V represents the red chroma component.

[0041] In yet another embodiment, the video processing method of this embodiment can detect whether the video data includes layer effects, such as a special effect of a red, blue, or green layer overlaid on the top layer of a video frame. The at least one image channel in this step includes any one of the three RGB channels (Red, Green, and Blue). In this step, image information of each video frame in the video data in at least one image channel is determined, for example, the value of each video frame in the video data in any one of the three RGB channels is determined.

[0042] In step S102, the image similarity between adjacent video frames in the video data is determined. In one embodiment, the image similarity between every two adjacent video frames in the video data can be determined using an SSIM (Structural Similarity Index) algorithm.

[0043] In the above step S104, based on the determined image information and image similarity, it is determined whether the video data includes video special effects. In one embodiment, based on the image information and image similarity, it is determined whether the video data includes video special effects, including:

[0044] Determining whether the video data includes the first video segment and the second video segment based on the image information and the image similarity; wherein the first video segment corresponds to the image channel one-to-one; the image information of the video frames in the first video segment in the corresponding image channel meets the image information requirements corresponding to the corresponding image channel; and the image similarity between adjacent video frames in the second video segment meets the image similarity requirements;

[0045] If the video data includes a first video segment and a second video segment, whether the video data includes a video special effect is determined based on the number of overlapping video frames between the first video segment and the second video segment.

[0046] In this embodiment, first, based on the image information, it is determined whether the video data contains a first video segment. As previously mentioned, the number of image channels may be one or more, and the first video segments may correspond one to one with the image channels. When the number of image channels is one, the number of first video segments is also one. When the number of image channels is more than one, the number of first video segments may also be more than one.

[0047] Each image channel has its own corresponding image information requirements, and the image information of the video frames in the first video clip in the corresponding image channel meets the image information requirements corresponding to the corresponding image channel. For example, for the luminance channel Y channel, in the first video clip corresponding to the Y channel, the luminance value of each video frame is greater than the luminance threshold, and for the chrominance channel U channel, in the first video clip corresponding to the U channel, the chrominance value of each video frame is greater than the chrominance threshold. For another example, when the number of image channels is one, the first video clip can be exemplified as a video clip in which the luminance value of each video frame is greater than a certain value. When the number of image channels is multiple, taking the number of image channels as two as an example, one first video clip can be exemplified as a video clip in which the luminance value of each video frame is greater than a certain value, and another first video clip can be exemplified as a video clip in which the chrominance value of each video frame in the U channel is also greater than a certain value.

[0048] Next, in this embodiment, based on the image similarity, it is determined whether a second video segment exists in the video data. The image similarity between adjacent video frames in the second video segment meets the image similarity requirement. For example, the second video segment is a video segment in which the image similarity between every two adjacent video frames is greater than a threshold. The number of second video segments may be one or more.

[0049] Finally, if the video data includes any first video segment and any second video segment, whether the video data includes video special effects is determined based on the number of overlapping video frames between the first video segment and the second video segment.

[0050] It can be seen that through this embodiment, it is possible to determine whether the video data includes the first video clip and whether it includes the second video clip, and when it is determined that the video data includes any first video clip and any second video clip, it is determined whether the video data includes video special effects based on the number of overlapping video frames between the first video clip and the second video clip, thereby achieving the effect of accurately determining whether the video data includes video special effects.

[0051] In one embodiment, the image information of the video frame in the first video clip in the corresponding image channel meets the image information requirements corresponding to the corresponding image channel, including:

[0052] The value of the image information of each video frame in the first video segment in the corresponding image channel is greater than the first threshold corresponding to the corresponding image channel or is less than the second threshold corresponding to the corresponding image channel.

[0053] In this embodiment, taking the luminance channel Y as an example, in the first video segment corresponding to the Y channel, the luminance value of each video frame is greater than a first threshold, or, in the first video segment corresponding to the Y channel, the luminance value of each video frame is less than a second threshold. In other words, a video segment with particularly high brightness is determined as the first video segment corresponding to the luminance channel, and a video segment with particularly low brightness is determined as the first video segment corresponding to the luminance channel, thereby identifying video segments with particularly high brightness and video segments with particularly low brightness in the video data. The first threshold and the second threshold can be pre-set thresholds.

[0054] In this embodiment, since the value of the image information of each video frame in the first video clip in the corresponding image channel is greater than the first threshold corresponding to the corresponding image channel or is less than the second threshold corresponding to the corresponding image channel, the first video clip with a particularly high value of image information or a particularly low value of image information can be identified, and the first video clip can be identified from two dimensions of high and low values ​​of image information.

[0055] It can be seen that through this embodiment, for each image channel, the video segment in which the value of the image information of each video frame in the image channel is greater than the first threshold corresponding to the image channel or is less than the second threshold corresponding to the image channel can be used as the first video segment corresponding to the image channel, thereby identifying the first video segment corresponding to the image channel from two dimensions of high and low image information values.

[0056] In one embodiment, the image similarity between adjacent video frames in the second video segment meets the image similarity requirement, including:

[0057] The image similarity between every two adjacent video frames in the second video segment is greater than the similarity threshold.

[0058] In this embodiment, in the second video segment, the image similarity between every two adjacent video frames is greater than the similarity threshold, so the second video segment can also be called a strongly correlated video segment. The similarity threshold can be a preset threshold.

[0059] It can be seen that through this embodiment, it is possible to determine whether there is a second video segment in the video data in which the image similarity between every two adjacent video frames is greater than the similarity threshold based on image similarity, thereby providing a basis for determining whether the video data includes video special effects.

[0060] In one embodiment, determining whether the video data includes a video special effect based on the number of overlapping video frames between the first video segment and the second video segment includes:

[0061] If the number of overlapping video frames between the first video segment and the second video segment meets the quantity requirement, it is determined that the video data includes video special effects.

[0062] In this embodiment, according to the previous records, the number of first video clips may be one or more, and the number of second video clips may be one or more. If the number of overlapping video frames between any first video clip in the video data and any second video clip in the video data meets the quantity requirement, it is determined that the video data includes video special effects.

[0063] For example, the image channel includes three YUV channels. Through the previous process, a first video segment corresponding to the U channel and a first video segment corresponding to the V channel are identified in the video data, and a second video segment is identified. If the number of overlapping video frames between the first video segment corresponding to the U channel and the second video segment meets the quantity requirement, then it is determined that the video data includes a video special effect. Alternatively, if the number of overlapping video frames between the first video segment corresponding to the V channel and the second video segment meets the quantity requirement, then it is determined that the video data includes a video special effect. The number of overlapping video frames can be determined based on the sequence numbers of the video frames in the first video segment and the sequence numbers of the video frames in the second video segment. Video frames with the same sequence numbers are overlapping video frames.

[0064] In this embodiment, if the number of overlapping video frames between any first video segment and any second video segment meets the quantity requirement, then the video segments composed of the video frames commonly included by the first video segment and the second video segment have an image similarity between every two adjacent video frames greater than the similarity threshold, and the image information of each video frame in the video segment meets the corresponding image information requirement. Therefore, it is indicated that the video segment has video special effects, and thus it is determined that the video data includes video special effects. If the number of overlapping video frames between any first video segment and any second video segment does not meet the quantity requirement, then it is indicated that there is no video segment in which the image similarity between every two adjacent video frames is greater than the similarity threshold and the image information of each video frame also meets the corresponding image information requirement. Therefore, it is indicated that no video segment in the video data has video special effects, and thus it is determined that the video data does not include video special effects.

[0065] It can be seen that, through this embodiment, it is possible to accurately determine whether the video data includes video special effects based on the number of overlapping video frames between the first video segment and the second video segment in the video data.

[0066] In one embodiment, the quantity requirement includes any one or more of the following:

[0067] The number of overlapping video frames is greater than the threshold;

[0068] The ratio of the number of overlapping video frames to the number of video frames in the first video segment is greater than a first ratio;

[0069] The ratio of the number of overlapping video frames to the number of video frames in the second video segment is greater than the second ratio.

[0070] The first ratio and the second ratio are both preset ratios.

[0071] In this embodiment, in one case, the quantity requirement is that the number of overlapping video frames is greater than the quantity threshold. When the number of overlapping video frames between any first video segment and any second video segment is greater than the quantity threshold, it is determined that the video data includes video special effects.

[0072] In another case, the quantity requirement is that the ratio of the number of overlapping video frames to the number of video frames of the first video clip is greater than the first ratio, and when the ratio of the number of overlapping video frames between any first video clip and any second video clip to the number of video frames of the overlapping first video clip is greater than the first ratio, it is determined that the video data includes video special effects.

[0073] In another case, the quantity requirement is that the ratio of the number of overlapping video frames to the number of video frames of the second video clip is greater than the second ratio. When the ratio of the number of overlapping video frames between any first video clip and any second video clip to the number of video frames of the overlapping second video clip is greater than the second ratio, it is determined that the video data includes video special effects.

[0074] In practical applications, the above three requirements can be combined.

[0075] It can be seen that, through this embodiment, at least one quantity requirement can be set, thereby accurately determining whether the video data includes video special effects.

[0076] Furthermore, in one embodiment, the above method flow further includes:

[0077] After determining that the video data includes the video special effect, a third video segment consisting of overlapping video frames between the first video segment and the second video segment is determined as the video segment where the video special effect is located.

[0078] As can be seen from the above description, when video data includes video special effects, the video data may include one or more first video segments and one or more second video segments, and there may be overlapping video frames between a first video segment and a second video segment in the video data. In this embodiment, a third video segment consisting of overlapping video frames between the first video segment and the second video segment in the video data is determined to be the video segment where the video special effect is located. When there are one or more first video segments and one or more second video segments, the third video segment consisting of overlapping video frames between each first video segment and each second video segment can be determined as the video segment where the video special effect is located.

[0079] In an example, the video data includes two first video clips and one second video clip, the video frame range of one first video clip is 10-20 frames, the video frame range of the other first video clip is 21-26 frames, and the video frame range of the second video clip is 17-27 frames. It can be determined that the number of overlapping video frames between the second video clip and each first video clip is greater than the quantity threshold, the video data includes two video special effects, and the third video clip composed of the video frames that overlap with each first video clip and the second video clip is determined to be the video clip where the video special effect is located, resulting in two third video clips, and the video frame ranges of the two third video clips are 17-20 frames and 21-26 frames respectively.

[0080] In another example, the video data includes two first video clips and two second video clips, the video frame range of one first video clip is 10-20 frames, the video frame range of the other first video clip is 15-25 frames, the video frame range of one second video clip is 17-27 frames, and the video frame range of the other second video clip is 29-35 frames. It can be determined that the number of overlapping video frames between the first second video clip and each first video clip is greater than the quantity threshold, the video data includes two video special effects, and the third video clip composed of the video frames overlapping with each first video clip and the first second video clip is determined to be the video clip where the video special effect is located, resulting in two third video clips with video frame ranges of 17-20 frames and 17-25 frames respectively.

[0081] In another example, the video data includes two first video clips and two second video clips, the video frame range of one first video clip is 10-20 frames, the video frame range of the other first video clip is 30-40 frames, the video frame range of one second video clip is 11-21 frames, and the video frame range of the other second video clip is 29-39 frames. It can be determined that the number of overlapping video frames between the first second video clip and the first first video clip is greater than the number threshold, and the number of overlapping video frames between the second second video clip and the second first video clip is greater than the number threshold. Therefore, the video data includes two video special effects, and the third video clip composed of the overlapping video frames of the first first video clip and the first second video clip is determined to be the video clip where the video special effect is located, and the video frame range of the third video clip is 11-20 frames, and the third video clip composed of the overlapping video frames of the second first video clip and the second second video clip is determined to be the video clip where the video special effect is located, and the video frame range of the third video clip is 30-39 frames.

[0082] It can be seen that through this embodiment, the third video segment composed of overlapping video frames between the first video segment and the second video segment in the video data can be determined as the video segment where the video special effects are located, thereby accurately determining the video segment where the video special effects are located in the video data.

[0083] According to the above description, it can be known that only when the video data includes any first video clip and any second video clip, it can be determined whether the video data includes video special effects. Therefore, in one embodiment, in the above method flow:

[0084] If the video data does not include the first video segment or does not include the second video segment, it is determined that the video data does not include video special effects.

[0085] In this embodiment, if the video data does not include any first video segment or does not include any second video segment, it is determined that the video data does not include video special effects.

[0086] It can be seen that through this embodiment, when the video data does not include any first video clip or any second video clip, it can be determined that the video data does not include video special effects, thereby improving the judgment process of video special effects.

[0087] After determining whether the video data includes video special effects, in the above step S106, if the video data includes video special effects, the video data is transcoded according to the first transcoding method. The first transcoding method is used to reduce the amount of video information lost during the video data transcoding process, thereby improving the quality of the transcoded video data and improving the user browsing experience.

[0088] In one embodiment, transcoding the video data according to a first transcoding method includes:

[0089] Lowering the values ​​of transcoding parameters corresponding to the video data, including: CRF (Constant Rate Factor), constant quality factor and / or QP (Quantization Parameter);

[0090] The video data is transcoded according to the reduced transcoding parameters.

[0091] In this embodiment, CRF and QP are parameters used to measure the amount of video information lost during the video data transcoding process. The lost video information includes at least one of color information, number of pixels, and brightness information. In this embodiment, the value of CRF and / or QP is reduced, and the video data is transcoded according to the reduced value, thereby reducing the amount of video information lost during the video data transcoding process, improving the quality of the transcoded video data, and improving the user browsing experience.

[0092] It can be seen that through this embodiment, when the video data includes video special effects, the value of the transcoding parameter corresponding to the video data can be reduced, and the video data can be transcoded according to the reduced transcoding parameter, thereby reducing the amount of video information lost during the video data transcoding process, improving the quality of the transcoded video data, and improving the user browsing experience.

[0093] In one embodiment, the above method further includes:

[0094] If the video data does not include video special effects, the video data is transcoded according to a second transcoding method, where the second transcoding method is used to transcode the video data based on a pre-configured amount of video information lost during the video data transcoding process.

[0095] In this embodiment, the second transcoding method can transcode the video data based on the pre-configured CRF and QP values, thereby keeping the amount of video information lost during the pre-configured video data transcoding process unchanged, and achieving the effect of standardized transcoding of video data that does not include video special effects.

[0096] It can be seen that through this embodiment, when the video data does not include video special effects, the amount of video information lost during the pre-configured video data transcoding process can be kept unchanged, thereby achieving the effect of standardized transcoding of video data that does not include video special effects.

[0097] In one embodiment, the video special effect includes a gradient special effect, and the at least one image channel includes one or more channels of the three channels of brightness, chrominance, and YUV.

[0098] As previously described, the video processing method in this embodiment can detect whether video data includes gradient effects. Gradient effects include, but are not limited to, gradient effects targeting brightness and / or color, and at least one image channel includes one or more of the three YUV channels of brightness, chrominance, and color. The above process can determine the values ​​of one or more of the three YUV channels for each video frame in the video data.

[0099] It can be seen that, through this embodiment, the effect of detecting the gradient effect based on one or more channels among the three YUV channels can be achieved.

[0100] In one embodiment, the video processing method of this embodiment can detect whether the video data includes a gradient special effect, and at least one image channel includes three RGB channels. In the above process, the value of each video frame in the video data in each of the three RGB channels can be determined. In this embodiment, when the video data includes a first video segment corresponding to each RGB channel and also includes a second video segment, if the number of video frames in the intersection of these four video segments is greater than a quantity threshold, it is determined that the video data includes a gradient special effect; otherwise, it is determined that the video data does not include a gradient special effect.

[0101] FIG2 is a flow chart of a video processing method provided by another embodiment of the present disclosure. As shown in FIG2 , the flow includes:

[0102] Step S202, obtaining video data;

[0103] Step S204, determining image information of a video frame in the video data in at least one YUV image channel, and determining image similarity between adjacent video frames in the video data;

[0104] Step S206: Determine, based on the image information, whether the video data includes the first video clip, the first video clip corresponds to the image channel one-to-one, and the image information of the video frame in the first video clip in the corresponding image channel meets the image information requirements corresponding to the corresponding image channel;

[0105] If the video data includes the first video clip, execute step S208; otherwise, execute step S214;

[0106] Step S208: determining, based on the image similarity, whether the video data includes a second video segment, and whether the image similarity between adjacent video frames in the second video segment meets the image similarity requirement;

[0107] If the video data includes the second video clip, execute step S210; otherwise, execute step S214;

[0108] Step S210, determining whether the number of overlapping video frames between any first video segment and any second video segment meets the quantity requirement;

[0109] If the number of overlapping video frames between any one of the first video segments and any one of the second video segments meets the quantity requirement, executing step S212; otherwise, executing step S214;

[0110] Step S212, determining whether the video data includes video effects;

[0111] Step S214, determining that the video data does not include video effects;

[0112] Step S216: transcoding the video data according to a first transcoding method, where the first transcoding method is used to reduce the amount of video information lost during the transcoding process of the video data;

[0113] Step S218 : transcoding the video data according to a second transcoding method, where the second transcoding method is used to transcode the video data based on a pre-configured amount of video information lost during the video data transcoding process.

[0114] In FIG2 , the action of determining whether the video data includes the first video segment and the action of determining whether the video data includes the second video segment can be performed sequentially or simultaneously, which is not limited here.

[0115] Through this embodiment, it is possible to detect whether video data includes video special effects, perform high-quality transcoding on video data with video special effects, reduce the amount of video information lost during the video data transcoding process, improve the quality of the transcoded video data, and improve the user browsing experience.

[0116] FIG3 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. As shown in FIG3 , the device includes:

[0117] A first determining unit 31 is configured to acquire video data, determine image information of a video frame in the video data in at least one image channel, and determine image similarity between adjacent video frames in the video data;

[0118] a special effects determination unit 32, configured to determine whether the video data includes a video special effect based on the image information and the image similarity;

[0119] The first transcoding unit 33 is configured to transcode the video data according to a first transcoding method if the video data includes video special effects; the first transcoding method is configured to reduce the amount of video information lost during the transcoding process of the video data.

[0120] Optionally, the special effect determination unit 32 is specifically configured to:

[0121] determining, based on the image information and the image similarity, whether the video data includes a first video segment and a second video segment; wherein the first video segment corresponds to the image channel in a one-to-one manner; the image information of the video frames in the first video segment in the corresponding image channel meets the image information requirement corresponding to the corresponding image channel; and the image similarity between adjacent video frames in the second video segment meets the image similarity requirement;

[0122] If the video data includes the first video segment and the second video segment, whether the video data includes video special effects is determined based on the number of overlapping video frames between the first video segment and the second video segment.

[0123] Optionally, the image information of the video frame in the first video clip in the corresponding image channel meets the image information requirement corresponding to the corresponding image channel, including:

[0124] The value of the image information of each video frame in the first video clip in the corresponding image channel is greater than the first threshold corresponding to the corresponding image channel or is less than the second threshold corresponding to the corresponding image channel.

[0125] Optionally, the image similarity between adjacent video frames in the second video segment meets an image similarity requirement, including:

[0126] The image similarity between every two adjacent video frames in the second video segment is greater than a similarity threshold.

[0127] Optionally, the special effect determination unit 32 is further specifically configured to:

[0128] If the number of overlapping video frames between the first video clip and the second video clip meets the quantity requirement, it is determined that the video data includes video special effects.

[0129] Optionally, the quantity requirement includes any one or more of the following:

[0130] The number of overlapping video frames is greater than a number threshold;

[0131] The ratio of the number of overlapping video frames to the number of video frames in the first video segment is greater than a first ratio;

[0132] The ratio of the number of overlapping video frames to the number of video frames in the second video segment is greater than a second ratio.

[0133] Optionally, a second determining unit is further included, which is used to: after determining that the video data includes video special effects, determine a third video segment composed of overlapping video frames between the first video segment and the second video segment as the video segment where the video special effects are located.

[0134] Optionally, the special effect determination unit 32 is further specifically configured to:

[0135] If the video data does not include the first video clip or does not include the second video clip, it is determined that the video data does not include video special effects.

[0136] Optionally, the first transcoding unit 33 is specifically configured to:

[0137] Lowering the value of the transcoding parameter corresponding to the video data, the transcoding parameter including: a constant quality factor CRF and / or a quantization parameter QP;

[0138] The video data is transcoded according to the reduced transcoding parameters.

[0139] Optionally, a second transcoding unit is further included, configured to:

[0140] If the video data does not include video special effects, the video data is transcoded according to a second transcoding method, where the second transcoding method is used to transcode the video data based on a pre-configured amount of video information lost during the video data transcoding process.

[0141] Optionally, the video special effect includes a gradient special effect; and the at least one image channel includes one or more channels of three channels: brightness, chrominance, and YUV.

[0142] The video processing device in the embodiment of the present disclosure can implement each process of the above-mentioned video processing method embodiment and achieve the same effects and functions, which will not be repeated here.

[0143] An embodiment of the present disclosure also provides an electronic device. FIG4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG4 , the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and a memory 402. One or more applications or data may be stored in the memory 402. Among them, the memory 402 may be a temporary storage or a persistent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 401 may be configured to communicate with the memory 402 and execute a series of computer executable instructions in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input or output interfaces 405, one or more keyboards 406, etc.

[0144] In a specific embodiment, the electronic device includes a processor; and a memory configured to store computer-executable instructions, wherein when the computer-executable instructions are executed, the processor implements the following process:

[0145] Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0146] determining, based on the image information and the image similarity, whether the video data includes video special effects;

[0147] If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0148] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned video processing method embodiment and achieve the same effects and functions, which will not be repeated here.

[0149] Another embodiment of the present disclosure further provides a computer-readable storage medium for storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented:

[0150] Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0151] determining, based on the image information and the image similarity, whether the video data includes video special effects;

[0152] If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0153] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned video processing method embodiment and achieve the same effects and functions, which will not be repeated here.

[0154] Another embodiment of the present disclosure further provides a computer program product, the computer program product including a computer program, which implements the following process when executed by a processor:

[0155] Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0156] determining, based on the image information and the image similarity, whether the video data includes video special effects;

[0157] If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0158] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned video processing method embodiment and achieve the same effects and functions, which will not be repeated here.

[0159] Another embodiment of the present disclosure further provides a computer program, which implements the following process when executed by a processor:

[0160] Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data;

[0161] determining, based on the image information and the image similarity, whether the video data includes video special effects;

[0162] If the video data includes video special effects, the video data is transcoded according to a first transcoding method; the first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

[0163] The computer program in the embodiment of the present disclosure can implement each process of the above-mentioned video processing method embodiment and achieve the same effects and functions, which will not be repeated here.

[0164] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0165] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0166] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0167] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0168] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0169] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system, or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0170] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0171] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0173] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0174] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0175] The various embodiments of this disclosure are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.

[0176] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. A video processing method, comprising: Acquiring video data, determining image information of video frames in the video data in at least one image channel, and determining image similarity between adjacent video frames in the video data; determining, based on the image information and the image similarity, whether the video data includes video special effects; If the video data includes video special effects, transcoding the video data according to a first transcoding method; The first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

2. The method according to claim 1, wherein The determining, based on the image information and the image similarity, whether the video data includes video special effects includes: determining, based on the image information and the image similarity, whether the video data includes a first video segment and a second video segment; wherein the first video segment corresponds to the image channel in a one-to-one manner; the image information of the video frames in the first video segment in the corresponding image channel meets the image information requirement corresponding to the corresponding image channel; and the image similarity between adjacent video frames in the second video segment meets the image similarity requirement; If the video data includes the first video segment and the second video segment, whether the video data includes video special effects is determined based on the number of overlapping video frames between the first video segment and the second video segment.

3. The method according to claim 2, wherein: The image information of the video frame in the first video clip in the corresponding image channel meets the image information requirements corresponding to the corresponding image channel, including: The value of the image information of each video frame in the first video clip in the corresponding image channel is greater than the first threshold corresponding to the corresponding image channel or is less than the second threshold corresponding to the corresponding image channel.

4. The method according to claim 2 or 3, wherein: The image similarity between adjacent video frames in the second video segment meets the image similarity requirement, including: The image similarity between every two adjacent video frames in the second video segment is greater than a similarity threshold.

5. The method according to any one of claims 2 to 4, wherein The determining, based on the number of overlapping video frames between the first video clip and the second video clip, whether the video data includes video special effects includes: If the number of overlapping video frames between the first video clip and the second video clip meets the quantity requirement, it is determined that the video data includes video special effects.

6. The method according to claim 5, wherein: The quantity requirements include any one or more of the following: The number of overlapping video frames is greater than a number threshold; The ratio of the number of overlapping video frames to the number of video frames in the first video segment is greater than a first ratio; The ratio of the number of overlapping video frames to the number of video frames in the second video segment is greater than a second ratio.

7. The method according to claim 5 or 6, further comprising: After determining that the video data includes a video special effect, a third video segment consisting of overlapping video frames between the first video segment and the second video segment is determined as the video segment where the video special effect is located.

8. The method according to any one of claims 2 to 7, further comprising: If the video data does not include the first video clip or does not include the second video clip, it is determined that the video data does not include video special effects.

9. The method according to any one of claims 1 to 8, wherein The transcoding the video data according to the first transcoding method includes: Lowering a value of a transcoding parameter corresponding to the video data, the transcoding parameter including at least one of a constant quality factor (CRF) or a quantization parameter (QP); The video data is transcoded according to the reduced transcoding parameters.

10. The method according to any one of claims 1 to 9, further comprising: If the video data does not include video special effects, the video data is transcoded according to a second transcoding method, where the second transcoding method is used to transcode the video data based on a pre-configured amount of video information lost during the video data transcoding process.

11. The method according to any one of claims 1 to 10, wherein The video special effect includes a gradient special effect; the at least one image channel includes one or more channels of the three channels of brightness, chrominance, and YUV.

12. A video processing device, comprising: a first determining unit configured to acquire video data, determine image information of video frames in the video data in at least one image channel, and determine image similarity between adjacent video frames in the video data; a special effects determination unit configured to determine whether the video data includes a video special effect based on the image information and the image similarity; a first transcoding unit configured to transcode the video data according to a first transcoding method if the video data includes video special effects; The first transcoding method is used to reduce the amount of video information lost during the video data transcoding process.

13. An electronic device comprising: processor; as well as, A memory configured to store computer-executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, wherein: The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product, wherein: The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

16. 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 11 are implemented.