Video type determination method and apparatus

By using frequency domain analysis and two-dimensional DCT transformation, the problems of high cost and low efficiency in video type identification in existing technologies are solved, and efficient and accurate video type judgment is achieved.

CN114510603BActive Publication Date: 2025-12-23SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210173777.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2025-12-23
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

Existing technologies for video type recognition require a large amount of manually labeled data and huge computing resources, resulting in high training costs, low recognition accuracy and efficiency, making them unsuitable for the pre-analysis stage of transcoding systems.

Method used

By acquiring the video frames to be detected and performing frequency distribution analysis in the frequency domain, the video frames are converted from spatial domain signals to frequency domain using two-dimensional DCT transformation. The video type is then determined based on the frequency distribution, avoiding manual data annotation and complex training processes.

Benefits of technology

It achieves efficient and accurate video type identification without requiring a large amount of manually labeled data and huge computing resources, thus improving the accuracy and efficiency of video type identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510603B_ABST
    Figure CN114510603B_ABST
Patent Text Reader

Abstract

The application provides a video type determination method and device, wherein the video type determination method comprises the following steps: obtaining at least one to-be-detected video frame in a to-be-detected video, then determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame; then determining a video type of the to-be-detected video according to the video types corresponding to the at least one to-be-detected video frame. In this case, the to-be-detected video frame is converted from a spatial domain signal to a frequency domain, and the video type corresponding to the to-be-detected video frame is distinguished and judged according to the frequency distribution of the to-be-detected video frame in the frequency domain, so that the video type of the to-be-detected video is determined, the video type of the to-be-detected video can be efficiently and accurately determined without consuming huge computing resources, and the identification accuracy and efficiency of the video type are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a video type determination method. The present application also relates to a video type determination apparatus, a computing device, and a computer readable storage medium. BACKGROUND

[0002] With the rapid development of computer technology, network technology and multimedia technology, people's work and life will involve video in many aspects. Compared with text and pictures, video carries more abundant and expressive information, and thus is more and more concerned and loved by users. Various videos emerge in endlessly, and the video degree is getting higher and higher.

[0003] In the prior art, the video type is often identified and determined by a deep learning method. Specifically, a large amount of manually annotated data is first needed to be obtained, then a deep neural network is constructed or a pre-trained image classification neural network is loaded, and supervised learning is performed on a large amount of labeled data. The deep neural network learned directly performs convolutional transformation and other operations on the image to obtain the probability that the to-be-detected image belongs to a certain category, so as to determine the video type of the to-be-detected video.

[0004] However, the deep learning-based method needs a large amount of manually annotated data, and the accuracy of data label definition, the accuracy of annotation, and the coverage of data are all very high. Therefore, the cost and time consumption of the early data collection work are very large, the accuracy of the label is difficult to guarantee, and in the training and application, the deep neural network needs to consume huge computing power and memory resources, and consumes a long training time. The training cost and deployment cost are very high, the recognition accuracy and efficiency of the video type are difficult to guarantee, and it is not suitable for the pre-analysis stage of the transcoding system. SUMMARY

[0005] Therefore, the embodiments of the present application provide a video type determination method. The present application also relates to a video type determination apparatus, a computing device, and a computer readable storage medium to solve the technical problems of the prior art that need to be highly complex training, and the recognition accuracy and efficiency of the video type are low.

[0006] According to a first aspect of the embodiments of the present application, a video type determination method is provided, comprising:

[0007] obtaining at least one to-be-detected video frame in a to-be-detected video;

[0008] determining a video type corresponding to the target video frame according to the frequency distribution of the target video frame in the frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame;

[0009] According to a video type corresponding to at least one to-be-detected video frame, a video type of the to-be-detected video is determined.

[0010] According to a second aspect of the embodiment of the present application, a video type determination apparatus is provided, comprising:

[0011] An acquisition module is configured to acquire at least one to-be-detected video frame in a to-be-detected video;

[0012] A first determination module is configured to determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame;

[0013] A second determination module is configured to determine a video type of the to-be-detected video according to a video type corresponding to at least one to-be-detected video frame.

[0014] According to a third aspect of the embodiment of the present application, a computing device is provided, comprising:

[0015] A memory and a processor;

[0016] The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions to implement the following method:

[0017] Acquiring at least one to-be-detected video frame in a to-be-detected video;

[0018] Determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame;

[0019] Determining a video type of the to-be-detected video according to a video type corresponding to at least one to-be-detected video frame.

[0020] According to a fourth aspect of the embodiment of the present application, a computer readable storage medium is provided, which stores computer executable instructions, and the computer executable instructions are executed by a processor to implement steps of any video type determination method.

[0021] The video type determination method provided in the application can obtain at least one to-be-detected video frame in a to-be-detected video, and then determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame; then, the video type of the to-be-detected video is determined according to the video types corresponding to the at least one to-be-detected video frame. In this case, the to-be-detected video frame can be obtained from the to-be-detected video, the to-be-detected video frame is converted from a spatial domain signal to a frequency domain through frequency domain transformation, the video type corresponding to the to-be-detected video frame is distinguished and judged according to the frequency distribution of the to-be-detected video frame in the frequency domain, so that the video type of the to-be-detected video is determined, without the need to provide a large amount of artificial labeling data, without the need to perform highly complex training, and without the need to consume huge computing resources, so that the video type of the to-be-detected video can be determined efficiently and accurately, and the recognition accuracy and efficiency of the video type are greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1a is a schematic diagram of a video frame of a presentation type video provided by an embodiment of the application;

[0023] Figure 1b is a schematic diagram of a video frame of a non-presentation type video provided by an embodiment of the application;

[0024] Figure 2 is a flowchart of a video type determination method provided by an embodiment of the application;

[0025] Figure 3a is a low-frequency alternating component coefficient value distribution histogram of a presentation type video provided by an embodiment of the application;

[0026] Figure 3b is a high-frequency alternating component coefficient value distribution histogram of a presentation type video provided by an embodiment of the application;

[0027] Figure 3c is a low-frequency alternating component coefficient value distribution histogram of a non-presentation type video provided by an embodiment of the application;

[0028] Figure 3d is a high-frequency alternating component coefficient value distribution histogram of a non-presentation type video provided by an embodiment of the application

[0029] Figure 4 is a schematic diagram of a video type determination process provided by an embodiment of the application;

[0030] Figure 5 is a structural schematic diagram of a video type determination apparatus provided by an embodiment of the application;

[0031] Figure 6is a structural block diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, and the present application should not be construed as limited to the embodiments described herein. Rather, the scope of the present application is defined by the appended claims.

[0033] The terminology used in this description of one or more embodiments of the application shall not be read to limit the scope of one or more embodiments of the application to features that are described in ca specific manner. Rather, any person skilled in the art can make similar substitutions and / or modifications to the embodiments of the application described herein in order to achieve a like result without departing from the scope of one or more embodiments of the application. It is also noted that the specific reterminology used in this specification has been chosen for purposes of clarity and non-limiting examples only.

[0034] It should be understood that although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used only to distinguish one from another. For example, without departing from the scope of one or more embodiments of the application, a first can be termed a second, and, similarly, a second can be termed a first. As used herein, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" taking into account the context in which the term is used.

[0035] First, the noun terms related to one or more embodiments of the present application are explained.

[0036] DCT: Discrete Cosine Transform, is a transform related to the Fourier transform, it is similar to the discrete Fourier transform, but only uses real numbers. Discrete cosine transform is equivalent to a discrete Fourier transform of about twice its length.

[0037] It should be noted that there are currently a large number of video contents obtained by screen recording of presentation content, such video is mostly found in knowledge subzone, the performance of presentation video in image preprocessing and encoding in transcoding system is significantly different from that of natural video. It is found in practice that when encoding the presentation video, in order to achieve the same subjective visual effect, different encoding parameters from natural video need to be used. Therefore, a method for detecting presentation video is needed, which is used to analyze and detect the presentation video before encoding to determine the appropriate encoding parameters.

[0038] In the prior art, the video type is often identified and determined by a deep learning method. Specifically, a large amount of manually annotated data needs to be acquired first, then a deep neural network is constructed or a pre-trained image classification neural network is loaded, and supervised learning is performed on a large amount of labeled data. The deep neural network learned directly performs convolutional transformation and other operations on the image to obtain the probability that the to-be-detected image belongs to a certain category, so as to determine the video type of the to-be-detected video.

[0039] However, the deep learning-based method requires a large amount of manually annotated data, and the accuracy of data label definition, annotation accuracy, data coverage range and other indicators are very high. Therefore, the cost of the early data collection work is very large, and in the training and application, the deep neural network needs to consume huge computing power and memory resources, and the training cost and deployment cost are very high. The recognition accuracy and efficiency of the video type are difficult to guarantee, and it is not suitable for the pre-analysis stage of the transcoding system.

[0040] Therefore, the embodiments of the present application analyze the presentation video and the non-presentation video, Figure 1a is a schematic diagram of a presentation video frame provided by the embodiments of the present application, Figure 1b is a schematic diagram of a non-presentation video frame provided by the embodiments of the present application, as shown in Figure 1a and 1b It can be found that the presentation video has two typical characteristics compared with the non-presentation video: containing a large number of pure color block areas and containing a large number of text and other symbol contents.

[0041] For these two typical characteristics of the presentation video, the human eye can easily distinguish them. Therefore, a video type determination method is provided in the embodiments of the present application, which uses a traditional signal processing method to identify and detect the video frame features in the to-be-detected video. Specifically, a two-dimensional DCT transformation can be used to convert the video frame from the spatial domain signal to the frequency domain, then the distribution of the frequency of the video frame in the frequency domain is counted, and finally a threshold is set to determine whether the to-be-detected video belongs to the presentation video.

[0042] The video type determination method provided in the application can obtain at least one to-be-detected video frame in a to-be-detected video, then determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame, and then determine the video type of the to-be-detected video according to the video types corresponding to the at least one to-be-detected video frame. In this case, the to-be-detected video frame can be obtained from the to-be-detected video, the to-be-detected video frame is converted from a spatial domain signal to a frequency domain through frequency domain transformation, the video type corresponding to the to-be-detected video frame is distinguished and judged according to the frequency distribution of the to-be-detected video frame in the frequency domain, and thus the video type of the to-be-detected video is determined. Without providing a large amount of artificial labeling data and without performing highly complex training, the video type of the to-be-detected video can be efficiently and accurately determined without consuming huge computing resources, and the recognition accuracy and efficiency of the video type are greatly improved.

[0043] In the application, a video type determination method is provided, and the application also relates to a video type determination device, a computing device, and a computer readable storage medium, which are described in detail in the following embodiments.

[0044] Figure 2 A flowchart of a video type determination method provided by an embodiment of the application is shown, which specifically includes the following steps:

[0045] Step 202: Obtain at least one to-be-detected video frame in a to-be-detected video.

[0046] Specifically, the to-be-detected video can refer to a video that needs to be analyzed and determined for a video type, and the to-be-detected video frame is a video frame extracted from the to-be-detected video. The video type corresponding to the extracted to-be-detected video frame can be used to determine the video type of the to-be-detected video.

[0047] It should be noted that the presentation video has a significant difference from the natural video in image preprocessing and encoding in the transcoding system. It is found in practice that when the presentation video is encoded, different encoding parameters need to be used from the natural video in order to achieve the same subjective visual effect. Therefore, the video type of the video to be encoded can be determined before encoding to determine the appropriate encoding parameters, and the video to be encoded is the to-be-detected video at this time.

[0048] In an optional implementation of the embodiment, at least one to-be-detected video frame in a to-be-detected video is obtained, and the specific implementation process can be as follows:

[0049] The scene detection is performed on the to-be-detected video, and the to-be-detected video is segmented according to the scene detection result to obtain at least one to-be-detected video segment;

[0050] determining a target video segment from the at least one video segment to be detected;

[0051] extracting at least one video frame to be detected from the target video segment according to a set extraction rule.

[0052] It should be noted that a video may include multiple video segments, and different video segments may have different video types. Therefore, scene detection and segmentation can be performed on the video to be detected to obtain at least one video segment to be detected, a target video segment to be analyzed is selected from the at least one video segment to be detected, and at least one video frame to be detected is extracted from the target video segment according to a set extraction rule.

[0053] The target video segment can be any one of the at least one video segment to be detected, and each video segment in the at least one video segment to be detected can be used as a target video segment to extract a video frame to be detected, and thus determine the video type of the target video segment.

[0054] In addition, the set extraction rule can be a rule for extracting a video frame to be detected from a target video segment, such as uniform sampling on a time axis to extract the required at least one video frame to be detected.

[0055] For example, the target video segment is uniformly sampled on a time axis to obtain 5 video frames to be detected.

[0056] In the embodiments of the present application, at least one video frame to be detected can be extracted from the video to be detected, and the video type of the video to be detected can be determined based on the video type corresponding to each extracted video frame to be detected. This method does not require a large amount of manually labeled data, does not require highly complex training, and does not require a large amount of computing resources. Therefore, the video type of the video to be detected can be determined efficiently and accurately, and the recognition accuracy and efficiency of the video type are greatly improved.

[0057] Step 204: determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one video frame to be detected.

[0058] It should be noted that different types of videos have different frequency distributions in the frequency domain, and thus the frequency distribution of the target video frame in the frequency domain can be analyzed to determine the video type corresponding to the target video frame.

[0059] Figure 3a is a low-frequency alternating component coefficient value distribution histogram of a presentation video provided by an embodiment of the present application, Figure 3b is a high-frequency alternating component coefficient value distribution histogram of a presentation video provided by an embodiment of the present application,Figure 3c This application provides a histogram of the low-frequency AC component coefficient distribution for a non-presentation video. Figure 3d This is a histogram showing the distribution of high-frequency AC component coefficients in a non-presentation video, as provided in an embodiment of this application.

[0060] like Figure 3a and 3b The image shown is a presentation video divided into 32x32 image blocks. After DCT transformation of each block, the low-frequency (L) frequency coefficient matrix of all DCT coefficients is calculated. Figure 3a ) and high frequency ( Figure 3b A histogram of the value distribution of the AC component; such as Figure 3c and 3d The figure shows a histogram of the coefficient values ​​for non-presentation videos.

[0061] The probability of the first distribution interval in the histogram represents the probability of a value between 0 and 0.5. The larger the value, the lower the probability of that frequency component having a value, and thus the lower the frequency. For example... Figures 3a-3d As shown, it's clear that presentation-type videos have a large number of zero coefficients in their low-frequency communication components, indicating the presence of numerous solid color areas. Conversely, high-frequency communication components have a large number of non-zero coefficients, suggesting the presence of sharp texture information, i.e., text and other symbols. In contrast, non-presentation-type videos have fewer zero coefficients in their low-frequency communication components and fewer non-zero coefficients in their high-frequency communication components, meaning they have fewer large solid color areas and fewer text and other symbols—a significant difference from presentation-type videos.

[0062] Therefore, in this embodiment, a two-dimensional DCT transform can be used to convert video frames from spatial domain signals to frequency domain signals. Then, the frequency distribution of the video frames in the frequency domain is statistically analyzed. Finally, a threshold is set to distinguish whether the video to be detected belongs to the presentation category. That is, the video type corresponding to the target video frame can be determined based on the frequency distribution of the target video frame in the frequency domain. This eliminates the need for a large amount of manually labeled data, highly complex training, and significant computational resources, thus efficiently and accurately determining the video type of the video to be detected, greatly improving the accuracy and efficiency of video type recognition.

[0063] In one optional implementation of this embodiment, the video type corresponding to the target video frame is determined based on the frequency distribution of the target video frame in the frequency domain. The specific implementation process can be as follows:

[0064] Based on the frequency distribution of the target video frame in the frequency domain, determine the first probability that the target video frame belongs to a solid color region and the second probability that the target video frame contains text symbols.

[0065] According to the first probability and the second probability, it is determined whether the video type corresponding to the target video frame is a presentation type.

[0066] It should be noted that the frequency distribution of different types of video frames in the frequency domain is different. For the video frame of the presentation type, there are a large number of zero coefficients in the low-frequency alternating component, which indicates that there is a large number of color areas in the video frame, and for the high-frequency alternating component, there are a large number of non-zero coefficients, which indicates that the video frame contains a large amount of sharp texture information, that is, symbol content such as text. Therefore, in the embodiment of the application, the first probability that the target video frame belongs to the color area and the second probability that the target video frame contains text symbols can be determined according to the frequency distribution of the target video frame in the frequency domain, and then the first probability and the second probability are used to determine whether the video type corresponding to the target video frame is a presentation type.

[0067] In an optional embodiment of the present embodiment, the first probability that the target video frame belongs to the color area and the second probability that the target video frame contains text symbols are determined according to the frequency distribution of the target video frame in the frequency domain, and the specific implementation process can be as follows:

[0068] The target video frame is divided into a set number of sub-regions;

[0069] The third probability that each sub-region belongs to the color area and the fourth probability that each sub-region contains text symbols are determined;

[0070] According to the third probability and the fourth probability, the first probability that the target video frame belongs to the color area and the second probability that the target video frame contains text symbols are determined.

[0071] Specifically, the set number can be a pre-set number, which is used to identify the number of sub-regions obtained by dividing the target video frame, for example, the set number can be 4, 8, 16, etc.

[0072] It should be noted that the target video frame is divided into a set number of sub-regions, which can be evenly cross-divided into four sub-regions of upper left, upper right, lower left, and lower right, and each sub-region is analyzed and processed in turn.

[0073] In an optional embodiment of the present embodiment, before the target video frame is divided, the target video frame can also be pre-processed, that is, before the target video frame is divided into a set number of sub-regions, it can also include:

[0074] The target video frame is scaled to a third set size;

[0075] The image edge area of the scaled target video frame is removed.

[0076] Specifically, the third set size can refer to a pre-set size, such as a maximum side of 1280. It should be noted that different sizes of target video frames can be normalized to the same size in advance, so as to facilitate subsequent processing such as segmentation, analysis and calculation of the target video frames.

[0077] In actual application, since many videos contain black edges above and below, these black edges have no information content and will affect the detection result, such as movie videos, etc. Therefore, after scaling the target video frame to the third set size, the image edge region of the scaled target video frame can also be removed, that is, the image edge region of the scaled target video frame is cropped, and the cropping size can be set. The remaining part after cropping can be analyzed and detected subsequently to determine the corresponding video type.

[0078] For example, the target video frame can be scaled to an image frame with a maximum side of 1280 pixels in equal proportions, and then the image content of the upper 20% and the lower 20% of the scaled target video frame can be removed. Then the scaled and edge-removed target video frame can be uniformly cross-divided into four sub-regions of upper left, upper right, lower left and lower right, and each sub-region can be analyzed and processed subsequently.

[0079] In an optional implementation of the embodiment, the third probability that each sub-region belongs to a solid color region and the fourth probability that each sub-region contains character symbols are determined, and the specific implementation process can be as follows:

[0080] The i-th sub-region in the set number of sub-regions is read, and the i-th sub-region is divided into at least one image block of a first set size;

[0081] According to the at least one image block, a frequency distribution probability table of the i-th sub-region is determined;

[0082] According to the frequency distribution probability table, the third probability that the i-th sub-region belongs to a solid color region is calculated, and the fourth probability that the i-th sub-region contains character symbols is calculated;

[0083] Let i increase by 1, and return to execute the operation step of reading the i-th sub-region in the set number of sub-regions until i is equal to the set number, to obtain the third probability that each sub-region belongs to a solid color region and the fourth probability that each sub-region contains character symbols.

[0084] Specifically, the i-th sub-region in the set number of sub-regions is read, and initially i is equal to 1. The first set size can refer to a pre-set size, which is used to further divide the i-th sub-region into a plurality of image blocks of a fixed size. The first set size can be set in advance in combination with the size of the sub-region and the number of image blocks required to be cut, such as 32*32.

[0085] It should be noted that after the i-th sub-region is divided into at least one image block of a set size, a frequency domain transformation can be performed on each image block to obtain the frequency distribution of each image block in the frequency domain, thereby obtaining the frequency distribution probability table of the i-th sub-region. Subsequently, the third probability that the i-th sub-region belongs to a solid color region and the fourth probability that the i-th sub-region contains a character symbol can be calculated according to the frequency distribution probability table, and then the next sub-region is read, and the above operation steps are repeatedly executed until the last sub-region is identified, and the third probability that each sub-region belongs to a solid color region and the fourth probability that each sub-region contains a character symbol can be obtained.

[0086] In practical applications, an initial frequency distribution table of a second set size can also be initialized in advance: where i represents the i-th sub-region, c represents the subscript of the frequency coefficient distribution interval, 17 distribution intervals are set, which are [0, 0.5), [0.5, 1.5), [1.5, 2.5), …, [15.5, 16.5), [16.5, +∞), when the coefficient value range falls within which interval, the frequency count of the corresponding interval is incremented by 1; m and n are integers, representing the subscripts of the frequency components of the second set size, the smaller component of m and n represents a low-frequency component, and vice versa. The second set size is the size of the initial frequency distribution table, which is set in advance, such as 8*8.

[0087] In an optional embodiment of the present embodiment, the frequency distribution probability table of the i-th sub-region is determined according to the at least one image block, and the specific implementation process can be as follows:

[0088] The at least one image block is subjected to a frequency domain transformation to obtain a target frequency distribution table corresponding to the at least one image block.

[0089] The frequency distribution probability table of the i-th sub-region is determined according to the target frequency distribution table corresponding to the at least one image block.

[0090] It should be noted that the frequency domain transformation can be performed on each image block to obtain the frequency distribution of each image block in the frequency domain, i.e., the target frequency distribution table, thereby obtaining the frequency distribution probability table of the i-th sub-region.

[0091] In an optional embodiment of the present embodiment, the at least one image block is subjected to a frequency domain transformation to obtain a target frequency distribution table corresponding to the at least one image block, and the specific implementation process can be as follows:

[0092] The j-th image block in the at least one image block is read to obtain a luminance distribution matrix of the j-th image block.

[0093] The luminance distribution matrix is subjected to a discrete cosine transformation to obtain a frequency coefficient matrix of a first set size.

[0094] The first set size frequency coefficient matrix is reduced to a second set size frequency coefficient matrix, and the initial coefficient distribution frequency table is updated according to the second set size frequency coefficient matrix.

[0095] Let j be incremented by 1, and return to perform the operation step of reading the jth image block in the at least one image block until j is equal to the number of the at least one image block, to obtain the target frequency distribution table corresponding to the at least one image block.

[0096] Specifically, the jth image block in the at least one image block is read, and initially, j is 1.

[0097] In actual application, when the first set size frequency coefficient matrix is reduced to the second set size frequency coefficient matrix, the reduction method can adopt the Area algorithm (i.e., the area algorithm), that is, the scaled coefficient is equal to the mean value of the coefficients in the 4*4 domain corresponding to the position before scaling.

[0098] In addition, after obtaining the reduced frequency coefficient matrix of the current jth image block, the initial coefficient distribution frequency table of the corresponding region can be updated. Specifically, the reduced frequency coefficient matrix can be traversed, and it is judged which one of the 17 distribution intervals the coefficient value at m, n falls into, and the frequency of the corresponding position of the frequency table is added by 1.

[0099] It should be noted that after reading the jth image block in the at least one image block, the luminance distribution matrix of the jth image block can be obtained, the discrete cosine transform is performed on the luminance distribution matrix to obtain the first set size frequency coefficient matrix, and then the first set size frequency coefficient matrix is reduced to the second set size frequency coefficient matrix, and the initial coefficient distribution frequency table is updated according to the second set size frequency coefficient matrix. Then the next image block is read, and the above operation steps are repeatedly executed until the last image block is identified, and the target frequency distribution table corresponding to the at least one image block can be obtained.

[0100] Wherein, the discrete cosine transform is performed on the luminance distribution matrix to obtain the first set size frequency coefficient matrix, and the specific implementation process can be as follows:

[0101] The direct current component in the discrete cosine transform result is set to 0, and the alternating current component is taken as an absolute value to obtain the first set size frequency coefficient matrix.

[0102] It should be noted that the coefficient at (0, 0) in the discrete cosine transform result is a direct current component, and other than the coefficient at (0, 0), all are alternating current components. Thus, the direct current component coefficient at (0, 0) in the discrete cosine transform result can be set to 0 first, and then the absolute value of each of the remaining coefficients is divided by 16 to reduce the coefficient range to about 0-20, facilitating subsequent construction of a target frequency distribution table with an interval of 1.

[0103] In an optional implementation of the embodiment, the frequency distribution probability table of the i-th sub-region is determined according to the target frequency distribution table corresponding to the at least one image block, and the specific implementation process can be as follows:

[0104] Each frequency in the target frequency distribution table is divided by the number of the at least one image block to obtain the frequency distribution probability table of the i-th sub-region.

[0105] It should be noted that after all the image blocks in the i-th sub-region are sequentially processed, each frequency in the target frequency distribution table can be divided by the number of image blocks to obtain the frequency distribution probability table of the i-th sub-region. Where i represents the number of the sub-region, c represents the subscript of the 17 distribution intervals of the frequency coefficient, and m and n are integers representing the subscripts of the frequency components of the second set size (for example, 8*8). This indicates the probability that the value range of the m, n coefficient in the 8x8 DCT matrix of all image blocks in the current i-th sub-region falls in the c-th interval, and thus satisfies

[0106] In an optional implementation of the embodiment, the first probability that the target video frame belongs to a solid color region and the second probability that the target video frame contains character symbols are determined according to the third probability and the fourth probability, and the specific implementation process can be as follows:

[0107] The third probability of a set number of sub-regions is fused to obtain the first probability that the target video frame belongs to a solid color region.

[0108] The fourth probability of a set number of sub-regions is fused to obtain the second probability that the target video frame contains character symbols.

[0109] It should be noted that after obtaining the frequency distribution probability table of the i-th sub-region The probability that the i-th sub-region belongs to a solid color region can be calculated as follows: Where, Indicates the probability that the low-frequency component coefficient is zero. The larger this value, the greater the proportion of the solid color region area in the current region, and the more likely it is to belong to a solid color region. The probability that the i-th sub-region contains character symbols is calculated as follows: Where, The value is greater, the greater the possibility that the region contains symbols such as characters. The value can be truncated to 0.5, and then divided by 0.5 to represent the probability of containing character symbols.

[0110] In actual applications, after the third probability that each sub-region belongs to a solid color region is calculated, the third probabilities that each sub-region belongs to a solid color region can be fused to obtain the first probability that the target video frame belongs to a solid color region. After the fourth probability that each sub-region contains character symbols is calculated, the fourth probabilities that each sub-region contains character symbols can be fused to obtain the second probability that the target video frame contains character symbols.

[0111] That is, after each sub-region is analyzed and identified, the probability that each sub-region belongs to a solid color region and the probability that each sub-region contains character symbols can be fused to obtain the probability information of the entire target video frame. Specifically, the probability that the entire target video frame belongs to a solid color region calculated is: The probability that the entire target video frame contains character symbols calculated is:

[0112] In an optional implementation of the embodiment, according to the first probability and the second probability, it is determined whether the video type corresponding to the target video frame is a presentation type. The specific implementation process can be as follows:

[0113] In the case where the first probability is greater than the first solid color probability threshold, it is determined that the video type corresponding to the target video frame is a presentation type.

[0114] In the case where the first probability is less than or equal to the first solid color probability threshold, according to the relationship between the second probability and the first character probability threshold, it is determined whether the video type corresponding to the target video frame is a presentation type.

[0115] It should be noted that the first solid color probability threshold and the first character probability threshold can be pre-set values. The first solid color probability threshold is used to determine whether the probability that the target video frame belongs to a solid color region is large enough, and the first character probability threshold is used to determine whether the probability that the target video frame contains character symbols is large enough. For example, the first solid color probability threshold can be 0.55, and the first character probability threshold can be 0.75.

[0116] In actual application, if the first probability that the target video frame belongs to the solid color region is greater than the first solid color probability threshold, it indicates that the probability that the target video frame belongs to the solid color region is large enough, and it is not necessary to determine the relationship between the second probability that the target video frame contains character symbols and the first character probability threshold, but it is possible to directly determine that the video type corresponding to the target video frame is the presentation type. If the first probability that the target video frame belongs to the solid color region is less than or equal to the first solid color probability threshold, it indicates that the probability that the target video frame belongs to the solid color region is not large enough, and it is possible to continue to determine the video type corresponding to the target video frame according to the relationship between the second probability that the target video frame contains character symbols and the first character probability threshold.

[0117] In an optional implementation of the embodiment, according to the relationship between the second probability and the first character probability threshold, it is determined whether the video type corresponding to the target video frame is the presentation type, and the specific implementation process can be as follows:

[0118] If the second probability is greater than the first character probability threshold, it is determined that the video type corresponding to the target video frame is the presentation type.

[0119] If the second probability is less than or equal to the first character probability threshold, it is determined whether the first probability is greater than the second solid color probability threshold and whether the second probability is greater than the second character probability threshold. If yes, it is determined that the video type corresponding to the target video frame is the presentation type. If no, it is determined that the video type corresponding to the target video frame is the non-presentation type.

[0120] In actual application, the second solid color probability threshold and the second character probability threshold can be preset values. The second solid color probability threshold is used to determine whether the probability that the target video frame belongs to the solid color region is large, and thus the second solid color probability threshold can be less than the first solid color probability threshold. The second character probability threshold is used to determine whether the probability that the target video frame contains character symbols is large, and thus the second character probability threshold can be less than the first character probability threshold. For example, the second solid color probability threshold can be 0.2, and the second character probability threshold can be 0.5.

[0121] It should be noted that, in the case that the second probability that the target video frame contains character symbols is greater than the first character probability threshold, it is determined that the probability that the target video frame contains character symbols is large enough, and it is directly determined that the video type corresponding to the target video frame is the presentation type. In the case that the second probability that the target video frame contains character symbols is less than or equal to the first character probability threshold, it is further determined whether the first probability that the target video frame belongs to the solid color region is greater than the second solid color probability threshold and whether the second probability that the target video frame contains character symbols is greater than the second character probability threshold. If yes, it is determined that both the probability that the target video frame belongs to the solid color region and the probability that the target video frame contains character symbols are large, and it is determined that the video type corresponding to the target video frame is the presentation type. If no, it is determined that both the probability that the target video frame belongs to the solid color region and the probability that the target video frame contains character symbols are small, and it is determined that the video type corresponding to the target video frame is the non-presentation type.

[0122] Step 206: determining the video type of the to-be-detected video according to the video type corresponding to at least one to-be-detected video frame.

[0123] It should be noted that, after the video type corresponding to at least one to-be-detected video frame is determined, the video types corresponding to the to-be-detected video frames can be counted, and the video type of the to-be-detected video is determined.

[0124] In an optional implementation of the embodiment, the video type of the to-be-detected video is determined according to the video type corresponding to at least one to-be-detected video frame, and the specific implementation process can be as follows:

[0125] determining a presentation video frame of the presentation type in the at least one to-be-detected video frame;

[0126] determining the proportion of the presentation video frame in the at least one to-be-detected video frame according to the number of frames of the presentation video frame and the total number of frames of the at least one to-be-detected video frame;

[0127] in the case that the proportion is greater than the proportion threshold, determining that the video type of the target video is the presentation type;

[0128] in the case that the proportion is less than or equal to the proportion threshold, determining that the video type of the target video is the non-presentation type.

[0129] Specifically, the proportion threshold can be a pre-set value for judging the proportion of the number of frames of the to-be-detected video frame of the presentation type in the total number of frames in the at least one to-be-detected video frame, so as to determine whether the presentation video frame accounts for a large proportion in the at least one to-be-detected video frame. For example, the proportion threshold can be 50%, 60%, etc.

[0130] It should be noted that, in the case of the proportion being greater than the proportion threshold, it indicates that the proportion of the presentation video frame in the at least one video frame to be detected is large, and at this time, it can be determined that the video type of the target video is a presentation type; in the case of the proportion being less than or equal to the proportion threshold, it indicates that the proportion of the presentation video frame in the at least one video frame to be detected is small, and at this time, it can be determined that the video type of the target video is a non-presentation type.

[0131] In an example, Figure 4 is a schematic diagram of a video type determination process provided by an embodiment of the present application, as Figure 4 shown, reading a target video frame, scaling the target video frame to a set size, removing the upper and lower edges of the target video frame, uniformly dividing into four sub-regions, judging whether the sub-region is analyzed, if the sub-region is not analyzed, reading the next sub-region and dividing it into 32*32 image blocks, initializing the 8*8 DCT frequency component coefficient distribution frequency table, judging whether the image block is processed, if the image block is not processed, the next 32*32 image block can be read, performing two-dimensional DCT transformation on the image block, setting the DCT direct current component coefficient to zero, taking the absolute value of the alternating current component, reducing the DCT coefficient matrix to an 8*8 matrix, updating the DCT frequency component coefficient distribution frequency table, and returning to execute the operation step of judging whether the image block is processed.

[0132] If the image block is processed, calculate the DCT frequency component coefficient distribution probability table T, calculate the third probability that the sub-region belongs to a pure color region, calculate the fourth probability that the sub-region contains character symbols, and then return to execute the operation step of judging whether the sub-region is analyzed. If the sub-region is analyzed, calculate the first probability that the target video frame belongs to a pure color region, and calculate the second probability that the target video frame contains character symbols.

[0133] Then, judging whether the first probability is greater than 0.5, if yes, determining that the target video frame is a presentation type video frame; if no, further judging whether the second probability is greater than 0.75, if yes, determining that the target video frame is a presentation type video frame, if no, further judging whether the first probability is greater than 0.2 and the second probability is greater than 0.5, if yes, determining that the target video frame is a presentation type video frame, if no, determining that the target video frame is not a presentation type video frame.

[0134] In an optional embodiment of the present embodiment, after determining the video type of the video to be detected according to the video type corresponding to the at least one video frame to be detected, the method further comprises:

[0135] In the case of the video type being a presentation type video, obtaining target encoding parameters corresponding to the presentation type video;

[0136] Encoding the video to be detected according to the target encoding parameters.

[0137] It should be noted that the presentation video contains a large number of pure color areas and character symbols, and therefore different encoding parameters are required for encoding the presentation video to achieve the same subjective visual effect as the non-presentation video. Therefore, in a case where the video type of the to-be-detected video is determined to be a presentation video, the target encoding parameters corresponding to the presentation video can be obtained, and the to-be-detected video is encoded according to the target encoding parameters.

[0138] In actual applications, the encoding parameters corresponding to the presentation video can be pre-stored in the encoding system. In the embodiment of the present application, the frequency distribution of the to-be-detected video in the frequency domain can be analyzed before encoding to determine the video type of the to-be-detected video. In a case where the video type of the to-be-detected video is determined to be a presentation video, the pre-stored target encoding parameters corresponding to the presentation video can be directly obtained, and the to-be-detected video is encoded according to the target encoding parameters. Thus, based on the video characteristics of the presentation video, the encoding parameters are targeted to encode the presentation video, thereby improving the encoding effect.

[0139] The video type determination method provided by the present application can obtain at least one to-be-detected video frame in the to-be-detected video, and then determine the video type corresponding to the target video frame according to the frequency distribution of the target video frame in the frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame. Then, the video type of the to-be-detected video is determined according to the video types corresponding to the at least one to-be-detected video frame. In this case, the to-be-detected video frame can be obtained from the to-be-detected video, and the to-be-detected video frame is transformed from the spatial domain signal to the frequency domain. The video type corresponding to the to-be-detected video frame is distinguished and judged according to the frequency distribution of the to-be-detected video frame in the frequency domain, so as to determine the video type of the to-be-detected video. Without providing a large amount of manually labeled data and without performing highly complex training, the video type of the to-be-detected video can be efficiently and accurately determined without consuming huge computing resources, thereby greatly improving the recognition accuracy and efficiency of the video type.

[0140] Corresponding to the above method embodiments, the present application also provides video type determination device embodiments, Figure 5 A structural schematic diagram of a video type determination device according to an embodiment of the present application is shown. As shown in the figure, Figure 5 The device comprises:

[0141] The obtaining module 502 is configured to obtain at least one to-be-detected video frame in the to-be-detected video.

[0142] The first determining module 504 is configured to determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of at least one to-be-detected video frame.

[0143] The second determining module 506 is configured to determine a video type of the to-be-detected video according to the video type corresponding to the at least one to-be-detected video frame.

[0144] Optionally, the first determining module 504 is further configured to:

[0145] determine a first probability that the target video frame belongs to a pure color region and a second probability that the target video frame contains character symbols according to the frequency distribution of the target video frame in the frequency domain;

[0146] determine whether the video type corresponding to the target video frame is a presentation type according to the first probability and the second probability.

[0147] Optionally, the obtaining module 502 is further configured to:

[0148] perform scene detection on the to-be-detected video, and segment the to-be-detected video according to a scene detection result to obtain at least one to-be-detected video segment;

[0149] determine a target video segment from the at least one to-be-detected video segment;

[0150] extract at least one to-be-detected video frame from the target video segment according to a set extraction rule.

[0151] Optionally, the first determining module 504 is further configured to:

[0152] divide the target video frame into a set number of sub-regions;

[0153] determine a third probability that each sub-region belongs to a pure color region and a fourth probability that each sub-region contains character symbols;

[0154] determine the first probability that the target video frame belongs to the pure color region and the second probability that the target video frame contains the character symbols according to the third probability and the fourth probability.

[0155] Optionally, the first determining module 504 is further configured to:

[0156] read an i-th sub-region in the set number of sub-regions, and divide the i-th sub-region into at least one image block of a first set size;

[0157] determine a frequency distribution probability table of the i-th sub-region according to the at least one image block;

[0158] According to the frequency distribution probability table, a third probability that the ith sub-region belongs to the solid color region is calculated, and a fourth probability that the ith sub-region contains a character symbol is calculated.

[0159] Let i be incremented by 1, and return to execute the operation step of reading the ith sub-region in the set number of sub-regions, until i is equal to the set number, to obtain the third probability that each sub-region belongs to the solid color region and the fourth probability that each sub-region contains a character symbol.

[0160] Optionally, the first determination module 504 is further configured to:

[0161] Perform frequency domain transformation on the at least one image block to obtain a target frequency distribution table corresponding to the at least one image block;

[0162] According to the target frequency distribution table corresponding to the at least one image block, determine the frequency distribution probability table of the ith sub-region.

[0163] Optionally, the first determination module 504 is further configured to:

[0164] Read the jth image block in the at least one image block to obtain a luminance distribution matrix of the jth image block;

[0165] Perform discrete cosine transformation on the luminance distribution matrix to obtain a frequency coefficient matrix of a first set size;

[0166] Downsize the frequency coefficient matrix of the first set size to a frequency coefficient matrix of a second set size, and update the initial coefficient distribution frequency table according to the frequency coefficient matrix of the second set size;

[0167] Let j be incremented by 1, and return to execute the operation step of reading the jth image block in the at least one image block, until j is equal to the number of the at least one image block, to obtain the target frequency distribution table corresponding to the at least one image block.

[0168] Optionally, the first determination module 504 is further configured to:

[0169] Divide each frequency in the target frequency distribution table by the number of the at least one image block to obtain the frequency distribution probability table of the ith sub-region.

[0170] Optionally, the first determination module 504 is further configured to:

[0171] Fuse the third probabilities of the set number of sub-regions to obtain a first probability that the target video frame belongs to the solid color region;

[0172] Fuse the fourth probabilities of the set number of sub-regions to obtain a second probability that the target video frame contains a character symbol.

[0173] Optionally, the first determining module 504 is further configured to:

[0174] In a case where the first probability is greater than the first solid color probability threshold, determining that the video type corresponding to the target video frame is the presentation type.

[0175] In a case where the first probability is less than or equal to the first solid color probability threshold, determining whether the video type corresponding to the target video frame is the presentation type according to a relationship between the second probability and the first character probability threshold.

[0176] Optionally, the first determining module 504 is further configured to:

[0177] In a case where the second probability is greater than the first character probability threshold, determining that the video type corresponding to the target video frame is the presentation type.

[0178] In a case where the second probability is less than or equal to the first character probability threshold, determining whether the first probability is greater than the second solid color probability threshold and whether the second probability is greater than the second character probability threshold, if yes, determining that the video type corresponding to the target video frame is the presentation type, and if no, determining that the video type corresponding to the target video frame is the non-presentation type.

[0179] Optionally, the first determining module 504 is further configured to:

[0180] scaling the target video frame to a third set size;

[0181] removing an image edge area of the scaled target video frame.

[0182] Optionally, the first determining module 504 is further configured to:

[0183] setting a direct current component in the discrete cosine transform result to 0 and taking an absolute value of an alternating current component to obtain a frequency coefficient matrix of a first set size.

[0184] Optionally, the second determining module 506 is further configured to:

[0185] determining a presentation video frame of the at least one to-be-detected video frame in which the video type is the presentation type;

[0186] determining a proportion of the presentation video frame in the at least one to-be-detected video frame according to a frame number of the presentation video frame and a total frame number of the at least one to-be-detected video frame;

[0187] In a case where the proportion is greater than a proportion threshold, determining that the video type of the target video is the presentation type.

[0188] In a case where the proportion is less than or equal to the proportion threshold, determining that the video type of the target video is the non-presentation type.

[0189] Optionally, the apparatus further comprises an encoding module configured to:

[0190] In a case where the video type is a presentation video, obtaining a target encoding parameter corresponding to the presentation video;

[0191] Encoding the to-be-detected video according to the target encoding parameter.

[0192] The video type determination apparatus provided in the present applicationapplicationobtain at least one to-be-detected video frame in a to-be-detected video, and then determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame; thereafter, determine a video type of the to-be-detected video according to the video types corresponding to the at least one to-be-detected video frame. In this case, the to-be-detected video frame can be obtained from the to-be-detected video, the to-be-detected video frame is transformed from a spatial domain signal to a frequency domain, and the video type corresponding to the to-be-detected video frame is distinguished and judged according to the frequency distribution of the to-be-detected video frame in the frequency domain, so as to determine the video type of the to-be-detected video, without the need to provide a large amount of manually labeled data, without the need to perform a highly complex training, and without the need to consume huge computing resources, thereby efficiently and accurately determining the video type of the to-be-detected video, and greatly improving the recognition accuracy and efficiency of the video type.

[0193] The above is a schematic scheme of the video type determination apparatus of the present embodiment. It should be noted that the technical scheme of the video type determination apparatus belongs to the same concept as the technical scheme of the video type determination method described above, and the details of the technical scheme of the video type determination apparatus that are not described in detail can be referred to the description of the technical scheme of the video type determination method.

[0194] Figure 6 A structural block diagram of a computing device according to an embodiment of the present application is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 through a bus 630, and a database 650 is used to save data.

[0195] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 640 can include one or more of any type of network interface (for example, a network interface card (NIC)), such as an IEEE 802.11 wireless local area networks (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, or the like.

[0196] In one embodiment of the present application, the above-mentioned components of the computing device 600, as well as other components not shown in FIG. 6, can be connected to each other by a bus. It should be understood that the computing device structure diagram shown is for the purpose of example only, and is not a limitation on the scope of the present application. Other components can be added or replaced as needed by those skilled in the art. Figure 6 In one embodiment of the present application, the above-mentioned components of the computing device 600, as well as other components not shown in FIG. 6, can be connected to each other by a bus. It should be understood that the computing device structure diagram shown is for the purpose of example only, and is not a limitation on the scope of the present application. Other components can be added or replaced as needed by those skilled in the art. Figure 6 In one embodiment of the present application, the above-mentioned components of the computing device 600, as well as other components not shown in FIG. 6, can be connected to each other by a bus. It should be understood that the computing device structure diagram shown is for the purpose of example only, and is not a limitation on the scope of the present application. Other components can be added or replaced as needed by those skilled in the art.

[0197] The computing device 600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 can also be a mobile or stationary server.

[0198] The processor 620 is configured to execute computer-readable instructions stored in the memory 630 to implement the following method:

[0199] Obtaining at least one to-be-detected video frame in a to-be-detected video;

[0200] According to a frequency distribution of the target video frame in a frequency domain, a video type corresponding to the target video frame is determined, wherein the target video frame is any one of the at least one to-be-detected video frame.

[0201] According to the video type corresponding to the at least one to-be-detected video frame, a video type of the to-be-detected video is determined.

[0202] The above is a schematic solution of the computing device of the embodiment. It should be noted that the technical solution of the computing device and the technical solution of the video type determination method described above belong to the same concept, and the details of the technical solution of the computing device that are not described in detail can be referred to the description of the technical solution of the video type determination method.

[0203] An embodiment of the present application further provides a computer readable storage medium storing computer executable instructions, which are executed by a processor to implement the steps of any video type determination method.

[0204] The above is a schematic solution of the computer readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the video type determination method described above belong to the same concept, and the details of the technical solution of the storage medium that are not described in detail can be referred to the description of the technical solution of the video type determination method.

[0205] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order described in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0206] The computer instructions include computer program codes, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying computer program codes, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0207] It should be noted that, for the aforementioned method embodiments, the sequences of the described actions are not the only ones that can be performed to implement the present application. In some embodiments, the sequences of actions can be performed in different order or simultaneously. In some embodiments, other sequences of actions can be performed, which should be apparent to a person of ordinary skill in the art in light of the teachings of the present application.

[0208] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0209] The preferred embodiments of the present application disclosed above are only used to explain the present application. The alternative embodiments do not describe all the details and limit the present application to the specific embodiments. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and use the present application. The present application is limited by the claims and their full scope and equivalents.

Claims

1. A video type determination method characterized by, The method comprises the following steps: acquiring at least one to-be-detected video frame in a to-be-detected video; determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, wherein the target video frame is any one of the at least one to-be-detected video frame; determining a video type of the to-be-detected video according to a video type corresponding to the at least one to-be-detected video frame; wherein the step of acquiring at least one to-be-detected video frame in a to-be-detected video comprises the following steps: performing scene detection on the to-be-detected video, and segmenting the to-be-detected video according to a scene detection result to obtain at least one to-be-detected video segment; determining a target video segment from the at least one to-be-detected video segment; extracting the at least one to-be-detected video frame from the target video segment according to a set extraction rule; wherein the step of determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain comprises the following steps: determining a first probability that the target video frame belongs to a pure color region and a second probability that the target video frame contains character symbols according to the frequency distribution of the target video frame in the frequency domain; determining whether the video type corresponding to the target video frame is a presentation type according to the first probability and the second probability.

2. The video type determination method according to claim 1, characterized by, The step of determining a first probability that the target video frame belongs to a pure color region and a second probability that the target video frame contains character symbols according to a frequency distribution of the target video frame in a frequency domain comprises the following steps: dividing the target video frame into a set number of sub-regions; determining a third probability that each sub-region belongs to a pure color region and a fourth probability that each sub-region contains character symbols; determining a first probability that the target video frame belongs to a pure color region and a second probability that the target video frame contains character symbols according to the third probability and the fourth probability.

3. The video type determination method according to claim 2, characterized by, The step of determining a third probability that each sub-region belongs to a pure color region and a fourth probability that each sub-region contains character symbols comprises the following steps: reading an i-th sub-region in the set number of sub-regions, and dividing the i-th sub-region into at least one image block of a first set size; determining a frequency distribution probability table of the i-th sub-region according to the at least one image block; calculating a third probability that the i-th sub-region belongs to a pure color region and a fourth probability that the i-th sub-region contains character symbols according to the frequency distribution probability table; incrementing i by 1, and returning to perform the operation step of reading an i-th sub-region in the set number of sub-regions until the i is equal to the set number, to obtain a third probability that each sub-region belongs to a pure color region and a fourth probability that each sub-region contains character symbols.

4. The video type determination method according to claim 3, characterized by, The step of determining a frequency distribution probability table of the i-th sub-region according to the at least one image block comprises the following steps: performing frequency domain transformation on the at least one image block to obtain a target frequency distribution table corresponding to the at least one image block; determining a frequency distribution probability table of the i-th sub-region according to the target frequency distribution table corresponding to the at least one image block.

5. The video type determination method according to claim 4, characterized by, The frequency domain transformation on the at least one image block to obtain a target frequency distribution table corresponding to the at least one image block comprises: reading a jth image block in the at least one image block to obtain a luminance distribution matrix of the jth image block; performing a discrete cosine transformation on the luminance distribution matrix to obtain a frequency coefficient matrix of a first set size; reducing the frequency coefficient matrix of the first set size to a frequency coefficient matrix of a second set size, and updating an initial coefficient distribution frequency table according to the frequency coefficient matrix of the second set size; increasing j by 1, and returning to perform the operation of reading the jth image block in the at least one image block until the j is equal to the number of the at least one image block to obtain the target frequency distribution table corresponding to the at least one image block.

6. The video type determination method according to claim 4, characterized by, The determination of the frequency distribution probability table of the ith sub-region according to the target frequency distribution table corresponding to the at least one image block comprises: dividing each frequency in the target frequency distribution table by the number of the at least one image block to obtain the frequency distribution probability table of the ith sub-region.

7. The video type determination method according to any one of claims 2 to 5, characterized by, The determination of the first probability that the target video frame belongs to a pure color region and the second probability that the target video frame contains character symbols according to the third probability and the fourth probability comprises: fusing the third probabilities of the set number of sub-regions to obtain the first probability that the target video frame belongs to a pure color region; fusing the fourth probabilities of the set number of sub-regions to obtain the second probability that the target video frame contains character symbols.

8. The video type determination method of any of claims 1-5, wherein, The determination of whether the video type corresponding to the target video frame is a presentation type according to the first probability and the second probability comprises: in a case where the first probability is greater than a first pure color probability threshold, determining that the video type corresponding to the target video frame is a presentation type; in a case where the first probability is less than or equal to the first pure color probability threshold, determining whether the video type corresponding to the target video frame is a presentation type according to a relationship between the second probability and a first character probability threshold.

9. The video type determination method according to claim 8, characterized by, The determination of whether the video type corresponding to the target video frame is a presentation type according to the relationship between the second probability and the first character probability threshold comprises: in a case where the second probability is greater than the first character probability threshold, determining that the video type corresponding to the target video frame is a presentation type; in a case where the second probability is less than or equal to the first character probability threshold, determining whether the first probability is greater than a second pure color probability threshold and whether the second probability is greater than a second character probability threshold, if yes, determining that the video type corresponding to the target video frame is a presentation type, and if no, determining that the video type corresponding to the target video frame is a non-presentation type.

10. The video type determination method according to any one of claims 2 to 5, characterized by, Before the division of the target video frame into the set number of sub-regions, the method further comprises: scaling the target video frame to a third set size, and removing an image edge region of the scaled target video frame.

11. The video type determination method of any of claims 1-6, wherein, The determination of the video type of the to-be-detected video according to the video type corresponding to the at least one to-be-detected video frame comprises: determine that the video type of the target video is a non-presentation type. The method further includes, after determining the video type of the target video according to the video type corresponding to the at least one to-be-detected video frame: in a case where the video type is a presentation type video, obtaining a target encoding parameter corresponding to the presentation type video; encoding the to-be-detected video according to the target encoding parameter.

12. The video type determination method of any of claims 1-6, wherein, The method includes: an obtaining module configured to obtain at least one to-be-detected video frame in a to-be-detected video; a first determining module configured to determine a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, the target video frame being any one of the at least one to-be-detected video frame; 13. A video type determining apparatus characterized by comprising: a second determining module configured to determine a video type of the to-be-detected video according to the video type corresponding to the at least one to-be-detected video frame; The obtaining at least one to-be-detected video frame in a to-be-detected video includes: performing scene detection on the to-be-detected video, and segmenting the to-be-detected video according to a scene detection result to obtain at least one to-be-detected video segment; determining a target video segment from the at least one to-be-detected video segment; extracting the at least one to-be-detected video frame from the target video segment according to a set extraction rule; The determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain includes: determining a first probability that the target video frame belongs to a solid color region and a second probability that the target video frame contains text symbols according to the frequency distribution of the target video frame in the frequency domain; determining whether the video type corresponding to the target video frame is a presentation type according to the first probability and the second probability. The method includes: a memory and a processor; The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions to implement the following method:

14. A computing device, comprising: obtaining at least one to-be-detected video frame in a to-be-detected video; determining a video type corresponding to a target video frame according to a frequency distribution of the target video frame in a frequency domain, the target video frame being any one of the at least one to-be-detected video frame; determining a video type of the to-be-detected video according to the video type corresponding to the at least one to-be-detected video frame; The obtaining at least one to-be-detected video frame in a to-be-detected video includes: performing scene detection on the to-be-detected video, and segmenting the to-be-detected video according to a scene detection result to obtain at least one to-be-detected video segment; ​ ​ ​ determining a target video segment from the at least one video segment to be detected; extracting the at least one video frame to be detected from the target video segment according to a set extraction rule; wherein the determining the video type corresponding to the target video frame according to the frequency distribution of the target video frame in the frequency domain comprises: determining a first probability that the target video frame belongs to a pure color region and a second probability that the target video frame contains text symbols according to the frequency distribution of the target video frame in the frequency domain; determining whether the video type corresponding to the target video frame is a presentation type according to the first probability and the second probability.

15. A computer-readable storage medium, characterized in that, A computer program product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the steps of the video type determination method of any one of claims 1 to 12.

16. A computer program product comprising computer instructions, wherein, the computer instructions, when executed by a processor, implement the steps of the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Video processing method and device, medium and equipment

    CN110532983A

  • Video detection method and device, server and storage medium

    CN110659604A