Abnormal black screen detection method and device, electronic equipment and terminal

By extracting and filtering image frames from videos and identifying black screen types based on brightness values ​​and timestamps, the problem of difficulty in distinguishing black screen types in the prior art is solved, and efficient and accurate black screen detection is achieved.

CN119031125APending Publication Date: 2024-11-26BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411266394.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing black screen detection methods cannot distinguish between artificially added transition effects and abnormal factors, resulting in false detection and manual secondary detection, which consumes a lot of manpower and time.

Method used

By extracting the first and second image frames from the video, a candidate time period for suspected black screen is determined based on the brightness value and the timestamp, and a third image frame is filtered out from the second image frame, and the time stamp of the third image frame and Brightness value identifies the black screen type.

Benefits of technology

It improves the efficiency and accuracy of black screen detection, and can objectively, quickly and effectively distinguish abnormal black screens from transition black screens, reducing the need for manual detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031125A_ABST
    Figure CN119031125A_ABST
Patent Text Reader

Abstract

The invention provides an abnormal black screen detection method and device, electronic equipment and a terminal, and relates to the technical field of video detection. According to the specific implementation scheme, the method comprises the steps of extracting a first image frame from a video, and obtaining one or more candidate time periods of a suspected blank screen according to a brightness value of the first image frame; extracting a second image frame from the video, wherein the extraction time interval of the first image frame is greater than the extraction time interval of the second image frame; determining a third image frame from the second image frames according to the timestamps of the second image frames and the candidate time periods; and identifying the black screen type of the video according to the timestamp and the brightness value of the third image frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video detection technology, and in particular to a method, device, electronic device and terminal for detecting an abnormal black screen. Background Art

[0002] During the process of video editing, encoding, and playback, a black screen may appear on the video screen. The types of black screens are divided into artificially added black screen transition effects and black screens caused by abnormal factors. Black screens caused by abnormal factors will affect the presentation of video content and the user's viewing experience.

[0003] Although some current black screen detection methods can detect images or video clips with black screens, they are unable to distinguish the types of black screens. Black screens caused by transition effects are often mistakenly detected as black screens caused by abnormal factors. Ultimately, manual secondary detection is required to determine the black screen caused by abnormal factors, which consumes a lot of manpower and time. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device and terminal for detecting an abnormal black screen.

[0005] According to one aspect of the present disclosure, a method for detecting an abnormal black screen is provided, including: extracting a first image frame from a video, and obtaining one or more candidate time periods of suspected black screens based on a brightness value of the first image frame; extracting a second image frame from the video, wherein the extraction time interval of the first image frame is greater than the extraction time interval of the second image frame; determining a third image frame from the second image frame based on a timestamp of the second image frame and the candidate time periods; and identifying the black screen type of the video based on the timestamp and brightness value of the third image frame.

[0006] According to another aspect of the present disclosure, a device for detecting an abnormal black screen is provided, including: a first frame extraction module, used to extract a first image frame from a video, and obtain one or more candidate time periods of suspected black screens according to a brightness value of the first image frame; a second frame extraction module, used to extract a second image frame from the video, wherein the extraction time interval of the first image frame is greater than the extraction time interval of the second image frame; a determination module, used to determine a third image frame from the second image frame according to a timestamp of the second image frame and the candidate time period; and an identification module, used to identify the type of black screen of the video according to the timestamp and brightness value of the third image frame.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor and a memory; wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the abnormal black screen detection method described in the above-mentioned embodiment.

[0008] According to another aspect of the present disclosure, a terminal is provided, and the terminal includes the electronic device described in the embodiment of the first aspect above.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the abnormal black screen detection method described in the above-mentioned first embodiment is implemented.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 A flowchart of a method for detecting an abnormal black screen provided by an embodiment of the present disclosure;

[0013] Figure 2 A schematic diagram of a flow chart of another abnormal black screen detection method provided by an embodiment of the present disclosure;

[0014] Figure 3 A schematic diagram of a flow chart of another abnormal black screen detection method provided by an embodiment of the present disclosure;

[0015] Figure 4 A schematic diagram of a flow chart of another abnormal black screen detection method provided by an embodiment of the present disclosure;

[0016] Figure 5 A changing trend diagram of an abnormal black screen provided in an embodiment of the present disclosure;

[0017] Figure 6 A changing trend diagram of a transition to a black screen provided in an embodiment of the present disclosure;

[0018] Figure 7 A schematic diagram of a flow chart of another abnormal black screen detection method provided by an embodiment of the present disclosure;

[0019] Figure 8 A schematic diagram of a process for detecting a black screen type provided in an embodiment of the present disclosure;

[0020] Fig. 9A schematic diagram of the structure of an abnormal black screen detection device provided in an embodiment of the present disclosure;

[0021] Fig.10 The present invention is a block diagram of an electronic device for implementing the abnormal black screen detection method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0023] Image processing is a technique that uses computers to analyze images to achieve the desired results. It is also called image processing. Image processing generally refers to digital image processing. A digital image is a large two-dimensional array obtained by shooting with industrial cameras, video cameras, scanners and other equipment. The elements of the array are called pixels, and their values ​​are called grayscale values. Image processing technology generally includes three parts: image compression, enhancement and restoration, matching, description and recognition.

[0024] Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to the use of cameras and computers to replace human eyes to identify, track and measure targets, and further perform image processing so that the computer processes the images into images that are more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain "information" from images or multidimensional data. The information here refers to information defined by Shannon that can be used to help make a "decision". Because perception can be seen as extracting information from sensory signals, computer vision can also be seen as a science that studies how to make artificial systems "perceive" from images or multidimensional data.

[0025] In the embodiment of the present disclosure, a video reading tool can be used to read the video to be detected for abnormal black screen, and the video can be decoded by the video reading tool to obtain image frames where black screen may appear, and the image frames can be detected for abnormal black screen.

[0026] The video decoding formats include but are not limited to: (1) H.264 / AVC (Advanced Video Coding), the video decoder is libx264; (2) H.265 / HEVC (High Efficiency Video Coding), the video decoder is libx265; (3) VP8 (Video Coding Format by Google), the video decoder is libvpx; (4) VP9 (Successor to VP8), the video decoder is libvpx-vp9; (5) AV1 (AOMedia Video 1), the video decoder is libaom-av1; (6) MPEG-2 (Moving Picture Experts Group Phase 2), the video decoder is mpeg2video; (7) MPEG-4 (Moving Picture Experts Group Phase 4), the video decoder is mpeg4; (8) Theora (Free and Open Video Codec), the video decoder is libtheora; ProRes (AppleProRes), the video decoder is prores; (10) DNxHD (Digital Nonlinear Extensible High Definition), the video decoder is dnxhd; (11) WMV (Windows Media Video), the video decoder is wmv2; (12) FLV1 (Flash Video), the video decoder is flv; (13) MJPEG (Motion JPEG), the video decoder is mjpeg.

[0027] The audio decoding formats include but are not limited to: (1) AAC (Advanced Audio Coding), the audio decoder is aac; (2) MP3 (MPEG-1 Audio Layer 3), the audio decoder is libmp3lame; (3) Vorbis (Ogg Vorbis), the audio decoder is libvorbis; (4) Opus (Audio Codec), the audio decoder is libopus; (5) FLAC (Free Lossless Audio Codec), the audio decoder is flac; (6) ALAC (Apple Lossless Audio Code), the audio decoder is alac; (7) AC3 (Audio Codec 3), the audio decoder is ac3; (8) WMA (Windows Media Audio), the audio decoder is wmav2; (9) WAV (Waveform Audio File Format), the audio decoder is the built-in WAV decoder; (10) AMR (Adaptive Audio File Format), the audio decoder is the built-in WAV decoder; Multi-Rate) encoder: the audio decoder is libopencore_amrnb (NB) and libopencore_amrwb (WB); (11) PCM (Pulse Code Modulation), the audio decoder is pcm_s16le, pcm_s24le, etc.

[0028] In the video encoding and decoding process, the basic process is as follows: in the encoder, a frame of image is divided into blocks, intra-frame prediction or inter-frame prediction is used for the current block to generate the prediction block of the current block, the original block of the current block minus the prediction block to obtain the residual block, the residual block is transformed and quantized to obtain the quantization coefficient matrix, and the quantization coefficient matrix is ​​entropy encoded and output to the bitstream. In the decoder, intra-frame prediction or inter-frame prediction is used for the current block to generate the prediction block of the current block, on the other hand, the bitstream is decoded to obtain the quantization coefficient matrix, the quantization coefficient matrix is ​​inversely quantized and inversely transformed to obtain the residual block, and the prediction block and the residual block are added to obtain the reconstructed block. The reconstructed blocks constitute the reconstructed image, and the reconstructed image is loop-filtered based on the image or block to obtain the decoded image. The encoder also needs similar operations as the decoder to obtain the decoded image. The decoded image can be used as a reference frame for inter-frame prediction for subsequent frames. The block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information determined by the encoder need to be output to the bitstream if necessary; then the decoder determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information as the encoder by parsing and analyzing the existing information, thereby ensuring that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder. The decoded image obtained by the encoder is also usually called a reconstructed image. The current block can be divided into prediction units during prediction, and the current block can be divided into transformation units during transformation. The division of prediction units and transformation units can be different. The above is the basic process of the video encoder and decoder under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized. The embodiment of the present application is applicable to the basic process under the block-based hybrid coding framework, but is not limited to the framework and process.

[0029] At present, the common video coding and decoding standards all adopt the block-based hybrid coding framework. Each frame in the video image is divided into square LCUs of the same size (such as 128×128, 64×64, etc.), and each LCU can also be divided into rectangular CUs according to rules; and CUs may also be divided into smaller PUs, TUs, etc. Specifically, the coding framework may include steps such as prediction, transform, quantization, entropy coding, and in-loop filtering. Among them, prediction can be divided into intra-frame prediction and inter-frame prediction, and inter-frame prediction can include motion estimation and motion compensation. Since there is a strong correlation between adjacent pixels in a frame of a video image, the use of intra-frame prediction in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, since there is also a strong similarity between adjacent frames in a video image, the use of inter-frame prediction in video coding and decoding technology can eliminate the temporal redundancy between adjacent frames, thereby improving the coding and decoding efficiency.

[0030] Videos are composed of multiple images. In order to make the video look smooth, each second of video contains dozens or even hundreds of frames, such as 24 frames per second, 30 frames per second, 50 frames per second, 60 frames per second or 120 frames per second. Therefore, there is a lot of temporal redundancy in the video, or in other words, there is a lot of temporal correlation in the video. Inter-frame prediction uses this temporal correlation to improve compression efficiency. Inter-frame prediction often uses "motion" to exploit temporal correlation. A very simple "motion" model is that an object is at a certain position on the image corresponding to a certain moment, and after a certain period of time, it moves to another position on the image corresponding to the current moment. This is the most basic and commonly used translation motion in video coding and decoding. Inter-frame prediction uses motion information to represent "motion". Basic motion information includes the information of the reference frame and the information of the MV; the reference frame can also be understood as the reference picture. The codec determines the reference frame / reference picture based on the information of the reference frame / reference picture, and determines the coordinates of the reference block based on the information of the MV and the coordinates of the current block. The reference block is determined by the coordinates of the reference block in the reference picture. Using a determined reference block as a prediction block is the most basic prediction method for inter-frame prediction.

[0031] The following describes the abnormal black screen detection method, device and electronic device of the embodiments of the present disclosure with reference to the accompanying drawings.

[0032] Figure 1 A flowchart of a method for detecting an abnormal black screen provided in an embodiment of the present disclosure is provided.

[0033] like Figure 1 As shown, the abnormal black screen detection method may include:

[0034] S101, extracting a first image frame from a video, and obtaining one or more candidate time periods of suspected black screen according to a brightness value of the first image frame.

[0035] It should be noted that the execution subject of the abnormal black screen detection method in the embodiment of the present disclosure may be a hardware device with data processing capabilities and / or the necessary software required to drive the hardware device to work. Optionally, the execution subject may include a user terminal and other smart devices. Optionally, the user terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, etc. The embodiment of the present disclosure is not specifically limited.

[0036] In some implementations, a video with a black screen is obtained, and an extraction time interval for extracting a first image frame is predetermined, and an image frame of the video is extracted according to the extraction time interval as the first image frame. Further, a brightness value of the first image frame is calculated, and one or more candidate time periods of suspected black screens in the video are determined based on the brightness value.

[0037] Optionally, by converting the first image frame into a grayscale image and determining the grayscale value of each pixel in the grayscale image, an average value of the grayscale values ​​can be calculated as the brightness value of the first image frame.

[0038] Furthermore, the first image frame whose brightness value is less than the brightness threshold can be used as an image frame suspected of a black screen, and the timestamp of the image frame suspected of a black screen can be obtained, and adjacent timestamps can be aggregated into time periods to obtain one or more candidate time periods of the suspected black screen.

[0039] For example, assume that the extraction time interval of the first image frame is 1 frame every 30 milliseconds, and the first image frames are frame 1, frame 2, frame 3, frame 4, frame 5, and frame 6, wherein the brightness value of frame 3 is greater than the brightness threshold, then frame 1, frame 2, frame 4, frame 5, and frame 6 are image frames suspected of being black screens, wherein the timestamp of frame 1 is 00:15:04, the timestamp of frame 2 is 00:15:34, the timestamp of frame 4 is 00:20:34, the timestamp of frame 5 is 00:19:23, and the timestamp of frame 6 is 00:19:53, then the candidate time periods for the suspected black screen are 00:15:04-00:15:34, and 00:19:23-00:19:51.

[0040] S102, extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame.

[0041] In some implementations, an extraction time interval for extracting a first image frame and an extraction time interval for extracting a second image frame are predetermined, and the extraction time interval of the first image frame is greater than the extraction time interval of the second image frame, and the second image frame is extracted from the video according to the extraction time interval of the second image frame.

[0042] Optionally, a video frame extraction tool may be used to extract the first image frame and the second image frame from the video.

[0043] For example, assuming that the first image frame is extracted every 30 milliseconds, and the second image frame is extracted every 10 milliseconds, the timestamp of the second image frame may be: 00:15:04, 00:15:14, 00:15:24, 00:15:34, etc.

[0044] S103: Determine a third image frame from the second image frame according to the timestamp of the second image frame and the candidate time period.

[0045] In some implementations, the second image frames may be screened based on the timestamp of the second image frame and the candidate time period, and the second image frames that meet the screening conditions may be used as the third image frames. Optionally, the length of the candidate time period may be increased, and the timestamp being within the increased candidate time period may be used as satisfying the screening conditions.

[0046] That is, by determining whether the timestamp of the second image frame is within the increased candidate time period, the third image frame can be determined from the second image frame. If the timestamp of the second image frame is within the increased candidate time period, the second image frame is used as the third image frame.

[0047] For example, the candidate time periods determined according to the brightness value and timestamp of the first image frame are: 00:15:04-00:15:34, and 00:19:23-00:19:51. The timestamps of the second image frame are: 00:15:04, 00:15:14, 00:15:24, 00:15:34, 00:15:44, 00:15:54, 00:16:04, 00:16:14.

[0048] For the candidate time period 00:15:04-00:15:34, its time length is increased, and the increased candidate time period is 00:14:54-00:15:44, and then the second image frames with timestamps in the range of 00:14:54-00:15:44: 00:15:04, 00:15:14, 00:15:24, 00:15:34, 00:15:44 are used as the third image frame.

[0049] S104: Identify the black screen type of the video according to the timestamp and brightness value of the third image frame.

[0050] In some implementations, the changing trend of the brightness value can be determined based on the timestamp and brightness value of the third image frame, and a reference changing trend of different black screen types can be obtained. By comparing whether the changing trend is the same as the reference changing trend, the black screen type of the video can be determined.

[0051] Optionally, the video black screen type includes: abnormal black screen and transition black screen. The abnormal black screen refers to a black screen caused by video file damage, player problems, hardware acceleration settings, driver problems, etc.; the transition black screen refers to an artificially added black screen transition effect.

[0052] That is to say, if the changing trend of the brightness value is the same as the reference changing trend corresponding to the abnormal black screen, the black screen type of the video is determined to be an abnormal black screen; if the changing trend of the brightness value is the same as the reference changing trend corresponding to the transition black screen, the black screen type of the video is determined to be a transition black screen. Optionally, a mapping relationship between a timestamp and a brightness value can be established based on a rectangular coordinate system, and the changing trend of the brightness value can be determined based on the mapping relationship. For example, the timestamp can be used as the horizontal axis and the brightness value can be used as the vertical axis to establish a mapping relationship between the timestamp and the brightness value.

[0053] According to the abnormal black screen detection method provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted according to different extraction time intervals, and one or more candidate time periods of suspected black screen are determined according to the brightness value of the first image frame. Then, based on the timestamp and candidate time period of the second image frame, the third image frame suspected of black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, the type of black screen of the video can be determined. The present disclosure determines the candidate time period of suspected black screen by extracting the first image frame of the video, and can accurately locate the third image frame suspected of black screen according to the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. Determining the type of black screen according to the changing trend of the brightness value can objectively, quickly and effectively detect whether the video has an abnormal black screen.

[0054] Figure 2A flowchart of a method for detecting an abnormal black screen provided in an embodiment of the present disclosure is provided.

[0055] like Figure 2 As shown, the abnormal black screen detection method may include:

[0056] S201, extracting a first image frame from a video, and obtaining a brightness value of a valid area in the first image frame.

[0057] It is understandable that the effective area generally refers to the area containing useful information such as actual objects, textures, colors, etc., after invalid pixels (such as black borders, background noise, etc.) are removed from the image.

[0058] Optionally, the first image frame can be converted into a grayscale image, and the effective area in the grayscale image is determined, and the grayscale value of each pixel in the effective area is obtained, and the brightness value of the effective area in the first image frame is obtained by calculating the average value of the grayscale values.

[0059] S202: Determine, from the first image frame, a fourth image frame whose brightness value is less than a brightness threshold.

[0060] In some implementations, the brightness threshold can be determined based on the brightness range of the black screen. For example, if the brightness range of the black screen is from 0 to 10, 10 can be used as the brightness threshold. Further, the fourth image frame can be determined by comparing the brightness value of the first image frame with the brightness threshold.

[0061] Optionally, if the brightness value of the first image frame is less than a brightness threshold, the first image frame is used as the fourth image frame.

[0062] S203: Acquire a candidate time period according to the timestamp of the fourth image frame.

[0063] In some implementations, the timestamps of the fourth image frame may be merged to obtain a candidate time period. Optionally, in order to simplify data and improve data processing efficiency, the timestamps of the fourth image frame may be grouped, wherein the timestamps in each group are continuous, and the timestamps in the group are merged to obtain a candidate time period corresponding to the group.

[0064] S204, extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame.

[0065] S205 : Determine a third image frame from the second image frame according to the timestamp of the second image frame and the candidate time period.

[0066] S206: Identify the black screen type of the video according to the timestamp and brightness value of the third image frame.

[0067] The relevant contents of steps S204-S206 can be found in the above embodiment and will not be repeated here.

[0068] According to the abnormal black screen detection method provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted at different extraction time intervals, and the brightness value of the effective area of ​​the first image frame is obtained. The first image frame is screened based on the brightness threshold to obtain a fourth image frame, and one or more candidate time periods of suspected black screens are determined based on the timestamp of the fourth image frame. Then, based on the timestamp and candidate time periods of the second image frame, a third image frame suspected of a black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, the type of black screen of the video can be determined. The present disclosure extracts the first image frame of the video to determine the candidate time period of the suspected black screen, and can accurately locate the third image frame suspected of a black screen based on the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. The type of black screen is determined based on the changing trend of the brightness value, and whether the video has an abnormal black screen can be objectively, quickly and effectively detected.

[0069] Figure 3 A flowchart of a method for detecting an abnormal black screen provided in an embodiment of the present disclosure is provided.

[0070] like Figure 3 As shown, the abnormal black screen detection method may include:

[0071] S301, extracting a first image frame from a video, and obtaining one or more candidate time periods of suspected black screen according to a brightness value of the first image frame.

[0072] S302, extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame.

[0073] The relevant contents of steps S301 - S302 can be found in the above embodiment and will not be described again here.

[0074] S303, determining the adjustment time amount, and obtaining a screening time range corresponding to the candidate time period according to the endpoint time of the candidate time period and the adjustment time amount.

[0075] S304: Select a second image frame whose timestamp is within the screening time range as the third image frame where a black screen appears.

[0076] In some implementations, by determining the adjustment time amount and obtaining the screening time range corresponding to the candidate time period based on the endpoint time and the adjustment time amount of the candidate time period, and then using the second image frame whose timestamp is within the screening time range as the third image frame, the image frame where the black screen appears can be accurately located.

[0077] Optionally, for any candidate time period, the adjustment time amount can be added to the endpoint time of the candidate time period to obtain a screening time range corresponding to the candidate time period, so as to increase the length of the screening time range and avoid the third image frame of the black screen failing to fall within the candidate time period due to the large extraction time interval, thereby improving the accuracy of screening the third image frame.

[0078] In some implementations, the candidate time periods may be sorted in chronological order, and the screening time ranges corresponding to the candidate time periods may be polled in sequence to determine whether the second image frame is within the screening time range. That is, for the extracted second image frame i, starting from the first candidate time period, if the timestamp of the second image frame i is not within the screening time range corresponding to the polled candidate time period, the next candidate time period is polled, where i is a natural number greater than or equal to 1.

[0079] Optionally, in response to the timestamp of the second image frame being within one of the screening time ranges, further downward polling is stopped and the second image frame i is determined to be the third image frame; in response to the second image frame i not being within any time range, the second image frame i is discarded.

[0080] S305: Identify the black screen type of the video according to the timestamp and brightness value of the third image frame.

[0081] The relevant contents of step S305 can be found in the above embodiment and will not be described again here.

[0082] According to the abnormal black screen detection method provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted according to different extraction time intervals, and one or more candidate time periods of suspected black screen are determined according to the brightness value of the first image frame. Then, by generating a screening time range and screening the second image frame, a third image frame suspected of black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, the type of black screen of the video can be determined. The present disclosure determines the candidate time period of suspected black screen by extracting the first image frame of the video, and can accurately locate the third image frame suspected of black screen according to the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. Determining the black screen type according to the changing trend of the brightness value can objectively, quickly and effectively detect whether the video has an abnormal black screen.

[0083] Figure 4 A flowchart of a method for detecting an abnormal black screen provided in an embodiment of the present disclosure is provided.

[0084] like Figure 4 As shown, the abnormal black screen detection method may include:

[0085] S401, extracting a first image frame from a video, and obtaining one or more candidate time periods of suspected black screen according to a brightness value of the first image frame.

[0086] S402, extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame.

[0087] S403 : Determine a third image frame from the second image frame according to the timestamp of the second image frame and the candidate time period.

[0088] The relevant contents of steps S401 - S403 can be found in the above embodiment and will not be described again here.

[0089] S404, using the timestamp of the image frame as the first coordinate axis and the brightness value of the image frame as the second coordinate axis, establishing a mapping relationship between the timestamp and the brightness value of the third image frame, and generating a change trend graph.

[0090] In some implementations, the timestamp of the image frame can be used as the first coordinate axis, and the brightness value of the image frame can be used as the second coordinate axis to establish a rectangular coordinate system. The timestamp and brightness value of the third image frame can be written into the rectangular coordinate system to obtain a mapping relationship between the timestamp and the brightness value, thereby generating a change trend graph.

[0091] S405: Identify the black screen type of the video according to the change trend graph.

[0092] Optionally, the video black screen types include: abnormal black screen and transition black screen. By determining the change trend of the brightness value corresponding to different black screen types over time, and comparing the change trend graph with the change trend of different black screen types, the target black screen type of the video is determined, and the black screen type can be accurately identified, avoiding the detection of transition black screen, and improving the efficiency of detecting abnormal black screen.

[0093] That is to say, in response to the change trend graph being consistent with the first change trend of the brightness value of the abnormal black screen over time, the target black screen type of the video is determined to be an abnormal black screen; in response to the change trend graph being consistent with the second change trend of the brightness value of the transition black screen over time, the target black screen type of the video is determined to be a transition black screen.

[0094] For example, Figure 5 The change trend diagram of abnormal black screen is shown in the figure, where T represents the timestamp and L represents the brightness value. The first change trend is that the brightness value suddenly drops at time T1, resulting in a black screen, and then suddenly increases at time T2 after the black screen. Figure 6 The change trend diagram of the transition to black screen is shown in the figure, where T represents the timestamp and L represents the brightness value. The second change trend is that the brightness value slowly decreases at time T1, resulting in a black screen, and then slowly increases at time T2 after the black screen. Figure 5If the change trend graph is the same as Figure 6 If they are the same, it means the black screen type is a transition black screen.

[0095] In some implementations, in order to locate the abnormal black screen and take corresponding measures to solve the abnormal black screen, after determining that the target black screen type of the video is the abnormal black screen, the target time period of the abnormal black screen can be determined according to the timestamp of the third image frame, and the black screen in the target time period can be troubleshooted to ensure normal video playback.

[0096] Optionally, based on the screening time range in which the third image frame is located, the candidate time period corresponding to the screening time range can be determined as the target time period. By determining the first screening time range in which the timestamp of the third image frame is located, the first candidate time period associated with the first screening time range can be determined, and the first candidate time period is determined as the target time period of the abnormal black screen.

[0097] In some implementations, in order to reduce the computational complexity of data processing and avoid the impact of transition black screen on abnormal black screen detection, after determining that the target black screen type of the video is a transition black screen, the third image frame in the cache can be cleared, and the second image frame can continue to be extracted from the video until the video meets the abnormal black screen detection end conditions.

[0098] Optionally, the detection end condition may be that there is no abnormal black screen in the video. Optionally, the detection end condition may also be the end of the video. Optionally, the detection end condition may also be the target time period when all abnormal black screens have been extracted.

[0099] According to the abnormal black screen detection method provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted according to different extraction time intervals, and one or more candidate time periods of suspected black screen are determined according to the brightness value of the first image frame. Then, based on the timestamp and candidate time period of the second image frame, the third image frame suspected of black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, a change trend graph is generated, and according to the change trend of different black screen types, the black screen type of the video can be determined. The present disclosure determines the candidate time period of suspected black screen by extracting the first image frame of the video, and can accurately locate the third image frame suspected of black screen according to the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. Determining the black screen type according to the change trend of the brightness value can objectively, quickly and effectively detect whether the video has an abnormal black screen.

[0100] Figure 7 A flowchart of a method for detecting an abnormal black screen provided in an embodiment of the present disclosure is provided.

[0101] like Figure 7As shown, the abnormal black screen detection method may include:

[0102] S701, extracting a first image frame from a video, and obtaining a brightness value of a valid area in the first image frame.

[0103] S702: Determine, from the first image frame, a fourth image frame whose brightness value is less than a brightness threshold.

[0104] S703: Obtain a candidate time period of a suspected black screen according to the timestamp of the fourth image frame.

[0105] S704, extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame.

[0106] S705 , generating a screening time range based on the candidate time periods, and selecting a second image frame whose timestamp is within the screening time range as a third image frame where a black screen appears.

[0107] S706 , using the timestamp of the image frame as the first coordinate axis and the brightness value of the image frame as the second coordinate axis, establish a mapping relationship between the timestamp and the brightness value of the third image frame to generate a change trend graph.

[0108] S707, determining the change trend of the brightness values ​​corresponding to different black screen types over time.

[0109] S708: In response to the change trend graph conforming to the first change trend of the brightness value of the abnormal black screen over time, determine that the target black screen type of the video is an abnormal black screen.

[0110] S709: In response to the change trend graph conforming to the second change trend of the brightness value of the transition black screen over time, determine that the target black screen type of the video is the transition black screen.

[0111] The relevant contents of steps S701-S709 can be found in the above embodiment and will not be repeated here.

[0112] According to the abnormal black screen detection method provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted according to different extraction time intervals, and one or more candidate time periods of suspected black screen are determined according to the brightness value of the first image frame. Then, based on the timestamp and candidate time period of the second image frame, the third image frame suspected of black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, the type of black screen of the video can be determined. The present disclosure determines the candidate time period of suspected black screen by extracting the first image frame of the video, and can accurately locate the third image frame suspected of black screen according to the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. Determining the type of black screen according to the changing trend of the brightness value can objectively, quickly and effectively detect whether the video has an abnormal black screen.

[0113] Figure 8 The figure shows a schematic diagram of the process of detecting the black screen type. Figure 8 As shown, step 801 extracts the first image frame of the video according to the extraction time interval D1, and calculates the brightness value L of the effective area in the first image frame. Step 802 selects the fourth image frame whose L is lower than the brightness threshold Lt from the first image frame, and saves the timestamp and L of the fourth image frame to the list M1. Step 803 aggregates the adjacent timestamps in the list M1 as candidate time periods, and saves the candidate time periods to the list M2.

[0114] Step 804, extract the second image frame of the video according to the extraction time interval D2; wherein D2 is less than D1, ensuring that the frame extraction is more detailed. Step 805, determine whether the timestamp of the second image frame meets the condition P1; wherein the condition P1 indicates that it is within the screening time range, then the screening time range indicates: take the first candidate time period in M2, add the time length of Td before and after the candidate time period, and record it as Tp, determine whether the timestamp of the second image frame is within the range of Tp, if it is greater than the end time of Tp, delete the candidate time period and continue to the next candidate time period. If the condition P1 is met, go to step 806, take the second image frame within the range of Tp as the third image frame, and save the timestamp and brightness value L of the third image frame to list M3.

[0115] Step 807, determine whether M3 satisfies condition P2, where condition P2 means: draw a graph with the timestamp and brightness value in M3 as horizontal and vertical coordinates respectively to obtain a change trend graph of the third image frame. If the change trend graph is as follows: Figure 5 As shown in the figure, the brightness value L suddenly drops near a certain time T1 and suddenly increases at a subsequent time T2, which means that the target black screen type of the video is an abnormal black screen, that is, it meets condition P2; if the change trend diagram is as follows Figure 6 As shown, the brightness value L slowly decreases near a certain moment T1 and slowly increases at a subsequent moment T2, which means that the target black screen type of the video is a transition black screen, that is, condition P2 is not met. If condition P2 is met, step 808 is entered to determine the target time period of the abnormal black screen. Otherwise, step 809 is entered to clear the list M3, continue to extract frames and determine whether conditions P1 and P2 are met. Finally, step 810 is entered to save all target time periods determined as abnormal black screens as the final result.

[0116] Corresponding to the abnormal black screen detection methods provided in the above-mentioned embodiments, an embodiment of the present disclosure also provides an abnormal black screen detection device. Since the abnormal black screen detection device provided in the embodiment of the present disclosure corresponds to the abnormal black screen detection methods provided in the above-mentioned embodiments, the implementation methods of the above-mentioned abnormal black screen detection methods are also applicable to the abnormal black screen detection device provided in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.

[0117] Fig. 9 A schematic diagram of the structure of an abnormal black screen detection device provided in an embodiment of the present disclosure.

[0118] like Fig. 9 As shown, the abnormal black screen detection device 900 of the embodiment of the present disclosure includes a first frame extraction module 901, a second frame extraction module 902, a determination module 903 and an identification module 904.

[0119] A first frame extraction module 901 is used to extract a first image frame from a video, and obtain one or more candidate time periods of suspected black screen according to a brightness value of the first image frame;

[0120] A second frame extraction module 902, configured to extract a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame;

[0121] A determination module 903, configured to determine a third image frame from the second image frame according to a timestamp of the second image frame and the candidate time period;

[0122] The identification module 904 is used to identify the black screen type of the video according to the timestamp and brightness value of the third image frame.

[0123] In one embodiment of the present disclosure, the first frame extraction module 901 is further used to: obtain the brightness value of the valid area in the first image frame; determine a fourth image frame whose brightness value is less than a brightness threshold from the first image frame; and obtain the candidate time period according to the timestamp of the fourth image frame.

[0124] In one embodiment of the present disclosure, the first frame extraction module 901 is further used to: group the timestamps of the fourth image frame, wherein the timestamps in each group are continuous; and merge the timestamps in the groups to obtain candidate time periods corresponding to the groups.

[0125] In one embodiment of the present disclosure, the determination module 903 is also used to: determine the adjustment time amount, and obtain the filtering time range corresponding to the candidate time period based on the endpoint time of the candidate time period and the adjustment time amount; select the second image frame whose timestamp is within the filtering time range as the third image frame where the black screen appears.

[0126] In one embodiment of the present disclosure, the determination module 903 is further used to: for the extracted second image frame i, starting from the first candidate time period, if the timestamp of the second image frame i is not within the screening time range corresponding to the polled candidate time period, continue to poll the next candidate time period, where i is a natural number greater than or equal to 1; in response to the timestamp of the second image frame being within one of the screening time ranges, stop polling downward and determine that the second image frame i is the third image frame; in response to the second image frame i not being within any time range, discard the second image frame i.

[0127] In one embodiment of the present disclosure, the identification module 904 is also used to: use the timestamp of the image frame as the first coordinate axis and the brightness value of the image frame as the second coordinate axis, establish a mapping relationship between the timestamp and the brightness value of the third image frame, and generate the change trend graph; determine the change trend of the brightness value corresponding to different black screen types over time; compare the change trend graph with the change trends of different black screen types to determine the target black screen type of the video.

[0128] In one embodiment of the present disclosure, the identification module 904 is also used to: in response to the change trend graph conforming to the first change trend of the brightness value of the abnormal black screen over time, determine that the target black screen type of the video is an abnormal black screen, and / or, clear the third image frame in the cache, and continue to extract the second image frame from the video until the video meets the detection end condition of the abnormal black screen; in response to the change trend graph conforming to the second change trend of the brightness value of the transition black screen over time, determine that the target black screen type of the video is a transition black screen.

[0129] In one embodiment of the present disclosure, the identification module 904 is also used to: determine a first screening time range in which the timestamp of the third image frame is located; determine a first candidate time period associated with the first screening time range; and determine that the first candidate time period is a target time period for an abnormal black screen.

[0130] According to the abnormal black screen detection device provided by the embodiment of the present disclosure, the first image frame and the second image frame of the video are extracted according to different extraction time intervals, and one or more candidate time periods of suspected black screens are determined according to the brightness value of the first image frame. Then, based on the timestamp and candidate time period of the second image frame, a third image frame suspected of a black screen can be screened out from the second image frame. Further, according to the timestamp and brightness value of the third image frame, the type of black screen of the video can be determined. The present disclosure determines the candidate time period of the suspected black screen by extracting the first image frame of the video, and can accurately locate the third image frame suspected of a black screen according to the extracted second image frame, thereby improving the efficiency and accuracy of black screen detection. The type of black screen is determined according to the changing trend of the brightness value, so as to objectively, quickly and effectively detect whether the video has an abnormal black screen.

[0131] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0132] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a terminal and a computer program product.

[0133] Fig.10 A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0134] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program / instruction stored in a read-only memory (ROM) 1002 or a computer program / instruction loaded from a storage unit 1006 to a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0135] A number of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, etc.; an output unit 1007 such as various types of displays, speakers, etc.; a storage unit 1008 such as a disk, an optical disk, etc.; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0136] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as the detection method of an abnormal black screen. For example, in some embodiments, the detection method of an abnormal black screen may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1006. In some embodiments, part or all of the computer program / instructions may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program / instructions are loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the detection method of the abnormal black screen described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the abnormal black screen detection method in any other appropriate manner (eg, by means of firmware).

[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs / instructions that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0138] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0139] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0141] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0142] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs / instructions running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0143] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in the disclosure can be achieved, and this document does not limit them here.

[0144] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for detecting an abnormal black screen, wherein: The method comprises: Extracting a first image frame from the video, and obtaining one or more candidate time periods of suspected black screen according to a brightness value of the first image frame; Extracting a second image frame from the video, wherein a time interval for extracting the first image frame is greater than a time interval for extracting the second image frame; determining a third image frame from the second image frame according to a timestamp of the second image frame and the candidate time period; The black screen type of the video is identified according to the timestamp and brightness value of the third image frame.

2. The method according to claim 1, wherein: The obtaining, according to the brightness value of the first image frame, one or more candidate time periods of suspected black screen includes: Acquire a brightness value of a valid area in the first image frame; Determine, from the first image frame, a fourth image frame whose brightness value is less than a brightness threshold; The candidate time period is acquired according to the timestamp of the fourth image frame.

3. The method according to claim 2, wherein: The acquiring the candidate time period according to the timestamp of the fourth image frame includes: Grouping the timestamps of the fourth image frame, wherein the timestamps in each group are continuous; The timestamps in the groups are merged to obtain a candidate time period corresponding to the groups.

4. The method according to claim 1, wherein: The step of determining a third image frame from the second image frame according to the timestamp of the second image frame and the candidate time period includes: Determine an adjustment time amount, and obtain a screening time range corresponding to the candidate time period according to the endpoint time of the candidate time period and the adjustment time amount; The second image frame whose timestamp is within the screening time range is selected as the third image frame where the black screen appears.

5. The method according to claim 4, wherein: The selecting the second image frame whose timestamp is within the screening time range as the third image frame where the black screen appears includes: For the extracted second image frame i, starting from the first candidate time period, if the timestamp of the second image frame i is not within the screening time range corresponding to the polled candidate time period, continue to poll the next candidate time period, where i is a natural number greater than or equal to 1; In response to the timestamp of the second image frame being within one of the screening time ranges, stopping further downward polling and determining that the second image frame i is the third image frame; In response to the second image frame i not being within any time range, the second image frame i is discarded.

6. The method according to claim 1, wherein: The step of identifying the black screen type of the video according to the timestamp and the brightness value of the third image frame includes: Taking the timestamp of the image frame as the first coordinate axis and the brightness value of the image frame as the second coordinate axis, a mapping relationship between the timestamp and the brightness value of the third image frame is established to generate the change trend graph; Determine the change trend of brightness values ​​corresponding to different black screen types over time; The change trend graph is compared with the change trends of different black screen types to determine the target black screen type of the video.

7. The method according to claim 6, wherein: Determining the target black screen type of the video includes: In response to the change trend graph conforming to the first change trend of the brightness value of the abnormal black screen over time, determining that the target black screen type of the video is an abnormal black screen, and / or clearing the third image frame in the cache, and continuing to extract the second image frame from the video until the video meets the abnormal black screen detection end condition; In response to the change trend graph being consistent with a second change trend of the brightness value of the transition black screen over time, it is determined that the target black screen type of the video is a transition black screen.

8. The method according to claim 7, wherein: After determining that the target black screen type of the video is an abnormal black screen, the method further includes: Determine a first screening time range in which the timestamp of the third image frame is located; Determine a first candidate time period associated with the first screening time range; Determine the first candidate time period as a target time period for abnormal black screen.

9. A device for detecting abnormal black screen, wherein: The device comprises: A first frame extraction module, used to extract a first image frame from the video, and obtain one or more candidate time periods of suspected black screen according to the brightness value of the first image frame; A second frame extraction module, used for extracting a second image frame from the video, wherein the extraction time interval of the first image frame is greater than the extraction time interval of the second image frame; a determination module, configured to determine a third image frame from the second image frame according to a timestamp of the second image frame and the candidate time period; An identification module is used to identify the black screen type of the video according to the timestamp and brightness value of the third image frame.

10. The device according to claim 9, wherein: The first frame extraction module is further used for: Acquire a brightness value of a valid area in the first image frame; Determine, from the first image frame, a fourth image frame whose brightness value is less than a brightness threshold; The candidate time period is acquired according to the timestamp of the fourth image frame.

11. The device according to claim 10, wherein: The first frame extraction module is further used for: Grouping the timestamps of the fourth image frame, wherein the timestamps in each group are continuous; The timestamps in the groups are merged to obtain a candidate time period corresponding to the groups.

12. The device according to claim 9, wherein: The determining module is further used for: Determine an adjustment time amount, and obtain a screening time range corresponding to the candidate time period according to the endpoint time of the candidate time period and the adjustment time amount; The second image frame whose timestamp is within the screening time range is selected as the third image frame where the black screen appears.

13. The device according to claim 12, wherein: The determining module is further used for: For the extracted second image frame i, starting from the first candidate time period, if the timestamp of the second image frame i is not within the screening time range corresponding to the polled candidate time period, continue to poll the next candidate time period, where i is a natural number greater than or equal to 1; In response to the timestamp of the second image frame being within one of the screening time ranges, stopping further downward polling and determining that the second image frame i is the third image frame; In response to the second image frame i not being within any time range, the second image frame i is discarded.

14. The device according to claim 9, wherein: The identification module is further used for: Taking the timestamp of the image frame as the first coordinate axis and the brightness value of the image frame as the second coordinate axis, a mapping relationship between the timestamp and the brightness value of the third image frame is established to generate the change trend graph; Determine the change trend of brightness values ​​corresponding to different black screen types over time; The change trend graph is compared with the change trends of different black screen types to determine the target black screen type of the video.

15. The device according to claim 14, wherein: The identification module is further used for: In response to the change trend graph conforming to the first change trend of the brightness value of the abnormal black screen over time, determining that the target black screen type of the video is an abnormal black screen, and / or clearing the third image frame in the cache, and continuing to extract the second image frame from the video until the video meets the abnormal black screen detection end condition; In response to the change trend graph being consistent with a second change trend of the brightness value of the transition black screen over time, it is determined that the target black screen type of the video is a transition black screen.

16. The device according to claim 15, wherein: The identification module is further used for: Determine a first screening time range in which the timestamp of the third image frame is located; Determine a first candidate time period associated with the first screening time range; Determine the first candidate time period as a target time period for abnormal black screen.

17. An electronic device, characterized in that: including a processor and a memory; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method according to any one of claims 1 to 8.

18. A terminal, characterized in that: Comprising the electronic device as claimed in claim 17.

19. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.