Splash screen event detection method, electronic equipment and computer program product

By obtaining the brightness histogram data of the electronic device display screen, the similarity between the reference frame and the comparison frame is detected, and the accurate detection problem of splash events in electronic devices is solved, and the accuracy and reliability of detection are improved.

CN120472790AActive Publication Date: 2025-08-12HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411451231.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-08-12
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The prior art is difficult to accurately detect splash screen events in electronic devices, affecting the user experience.

Method used

By obtaining the brightness histogram data of the display screen in a continuous N frame, the similarity between the reference frame and the comparison frame is detected, and the occurrence of the splash event is determined.

Benefits of technology

Improve the detection accuracy of splash screen events, provide a reliable basis for subsequent processing, and reduce false alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472790A_ABST
    Figure CN120472790A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a splash screen event detection method, electronic equipment and a computer program product. The method comprises the following steps: acquiring brightness histogram data of continuous N frames of display pictures of a display screen; wherein N is a positive integer greater than or equal to 3; detecting the similarity between a reference frame display picture and a comparison frame display picture according to the brightness histogram data of the continuous N frames of display pictures; the comparison frame display picture is the other one or more frames of display pictures except the reference frame display picture in the continuous N frames of display pictures; when a first target frame display picture is detected and a second target frame display picture exists between the first target frame display picture and a reference frame display picture, determining that a splash screen event occurs; the splash screen event detection accuracy can be effectively improved, and a basis is provided for splash screen event processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a screen flash event detection method, electronic device, and computer program product. Background Art

[0002] During the use of electronic devices, screen flickering may occur due to various reasons, such as screen flickering caused by system freezes, screen display brightness problems, improper software configuration, hardware failures, and driver configuration, etc. Screen flickering will have an impact on the user's vision and affect the user's experience. Therefore, it is necessary to detect screen flickering in electronic devices in a timely manner and solve it in a timely manner. Summary of the Invention

[0003] The embodiments of the present application provide a method for detecting a splash screen event, an electronic device, and a computer program product, which can effectively improve the detection accuracy of a splash screen event and provide a basis for handling the splash screen event.

[0004] In a first aspect, an embodiment of the present application provides a method for detecting a flash screen event, comprising: obtaining brightness histogram data of N consecutive display frames of a display screen; wherein N is a positive integer greater than or equal to 3; detecting the similarity between a reference frame display frame and a comparison frame display frame based on the brightness histogram data of the N consecutive display frames; the comparison frame display frame is one or more display frames other than the reference frame display frame in the N consecutive display frames; when a first target frame display frame is detected and a second target frame display frame exists between the first target frame display frame and the reference frame display frame, determining that a flash screen event has occurred; wherein the first target frame display frame is a display frame similar to the reference frame display frame, and the second target frame display frame is a display frame dissimilar to the reference frame display frame.

[0005] Here, when the electronic device detects a screen flash event, it can obtain brightness histogram data of a preset number of frames (N frames) of the display screen, and perform screen flash event detection based on the brightness histogram data of the display screen of the preset number of frames, wherein the electronic device can obtain picture information of all display pictures displayed on the display screen, and the picture information can include brightness histogram data. The above brightness histogram data can reflect the distribution of the number of pixels corresponding to each gray level under the brightness channel Y of the display picture in the YUV color mode.

[0006] During the factory test phase, electronic devices can run the screen flicker event detection function to detect screen flicker events, making it easier to locate, analyze, and resolve screen flicker issues. Of course, electronic devices can also run the screen flicker event detection function during user use and report detected screen flicker events to facilitate subsequent system updates and maintenance for screen flicker issues.

[0007] It is understandable that the electronic device can automatically run the flash screen event detection function during operation, and the electronic device can detect whether there is a flash screen event in real time. Of course, it is also possible to choose whether to start the flash screen event detection function according to the user's operating needs.

[0008] The electronic device can obtain the display image currently displayed on the display screen (current frame display image) and the N-1 frames display image before the current frame display image to detect screen flicker events in real time. It can also detect whether the content displayed on the display screen of the electronic device has a screen flicker event during the application process based on the historical display images.

[0009] After the electronic device is turned on, it can record the brightness histogram data of each display screen it displays, for example, save it in an array used to record the brightness histogram data of N frames of display screen, and write it into the array based on a first-in-first-out data writing method, so that the display data (brightness histogram data) of the display screen displayed in real time and the brightness histogram data of the previous N-1 frames of display screen are recorded, so as to detect screen flash events in real time.

[0010] The number of comparison frame display images may be determined according to the similarity comparison result. That is, when the electronic device performs similarity judgment, it may select the required number of comparison frames according to the similarity judgment result.

[0011] The reference frame display picture may be the earliest displayed display picture among the consecutive N frame display pictures.

[0012] For example, the first frame display picture is the earliest display picture, the second frame display picture is the next frame display picture of the first frame display picture, the third frame display picture is the next frame display picture of the second frame display picture, and so on. The fifth frame display picture is the next frame display picture of the fourth frame display picture, then the first frame display picture can be determined as the reference frame display picture.

[0013] The electronic device can compare the similarity between the first frame display screen and at least one of the second frame display screen, the third frame display screen, the fourth frame display screen and the fifth frame display screen, and determine whether a screen flash event occurs based on the similarity detection results between the first frame display screen and the second frame display screen, the third frame display screen, the fourth frame display screen and the fifth frame display screen.

[0014] For example, the electronic device can compare the similarity of the first frame display screen and the second frame display screen. Assuming that the comparison result of the electronic device comparing the similarity of the first frame display screen and the second frame display screen is that the first frame display screen and the second frame display screen are not similar, the electronic device further compares the similarity of the first frame display screen and the third frame display screen. If the first frame display screen and the third frame display screen are similar, it can be determined that there is an abnormal display screen of the second frame between the first frame and the third frame (i.e., an abnormal frame display screen), and further it can be determined that a splash screen event has occurred (called a three-frame splash screen event). In this case, the number of comparison frames is 2, i.e., after the similarity judgment of the reference frame display screen and the second frame display screen is performed, the similarity judgment is performed with the third frame display screen.

[0015] In the case where the first display frame is used as the reference frame, and the first display frame is dissimilar to the second display frame, and the first display frame is dissimilar to the third display frame, the first display frame is further compared with the fourth display frame for similarity. If the first display frame and the fourth display frame are similar, it can be determined that there are two abnormally displayed display frames, the second frame and the third frame, between the first and fourth frames, and further, it can be determined that a screen splash event has occurred (referred to as a four-frame screen splash event). In this case, the number of comparison frames is three, that is, the reference frame display frame is judged similar to the second display frame, the third display frame, and the fourth display frame respectively.

[0016] When the first display frame is used as the reference frame, and the first display frame is dissimilar to the second display frame, the first display frame is dissimilar to the third display frame, and the first display frame is dissimilar to the fourth display frame, the first display frame can be further compared with the fifth display frame for similarity. If the first display frame and the fifth display frame are similar, it can be determined that between the first and fifth frames, there are three abnormally displayed display frames, namely the second, third, and fourth frames, and further, it can be determined that a screen flash event has occurred. In this case, the number of comparison frames is 4, that is, the reference frame display frame is judged for similarity with the second, third, fourth, and fifth display frames respectively.

[0017] It should be noted that when the first frame display picture is used as the reference frame display picture and the first frame display picture is similar to the second frame display picture, the second frame display picture can be used as the reference frame display picture to further compare the similarity between the second frame display picture and the third frame display picture, and so on.

[0018] It should also be noted that, when the first frame display picture and the fifth frame display picture are still not similar, the brightness histogram data of the next frame display picture of the fifth frame (i.e., the sixth frame display picture) can be obtained, the brightness histogram data of the first frame display picture can be discarded, and the second frame display picture can be used as the reference frame display picture again to perform similarity detection, that is, compare the similarity of the second frame display picture with the third frame display picture. When the second frame display picture is similar to the third frame display picture, further compare the similarity of the second frame display picture with the fourth frame display picture, and so on.

[0019] It can be understood that the above is just an example of N being 5, that is, the electronic device performs screen flicker event detection based on the brightness histogram data of 5 consecutive frames of display screen, to exemplify the process of detecting the similarity between the reference frame display screen and the non-reference frame display screen. When the electronic device chooses to perform screen flicker event detection based on the brightness histogram data of 6 consecutive frames of display screen, the brightness histogram data of 7 consecutive frames of display screen, etc., as needed, it can determine whether a screen flicker event occurs based on the similarity detection method of the above embodiment.

[0020] From the above, it can be seen that the embodiment of the present application determines the similarity between the reference frame and the comparison frame based on the brightness histogram data of multiple consecutive display screens. When there is a display screen similar to the reference frame display screen and there is a display screen between the two that is dissimilar to the reference frame display screen, that is, there is a dissimilar display screen between two similar display screens, it is determined that a splash screen event has occurred. This can effectively improve the detection accuracy of the splash screen event and provide a basis for the processing of the splash screen event.

[0021] In a possible implementation, detecting similarity between a reference frame display image and a comparison frame display image based on brightness histogram data of N consecutive display frames includes:

[0022] Extracting brightness characteristic parameters of the display image based on the brightness histogram data of the display image, the brightness characteristic parameters including the maximum number of pixels of the display image in each grayscale interval and the grayscale value corresponding to the maximum number of pixels in each grayscale interval;

[0023] The brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture are traversed to calculate the similarity between the reference frame display picture and the comparison frame display picture.

[0024] In a possible implementation, before extracting the display picture brightness characteristic parameters based on the brightness histogram data of the display picture, the method further includes:

[0025] The brightness histogram data of the display screen is divided into multiple grayscale intervals according to a preset grouping rule, and the maximum number of pixels in each grayscale interval and the grayscale value corresponding to the maximum number of pixels are determined.

[0026] For the brightness histogram data of the display screen obtained, the brightness histogram data is divided into multiple grayscale intervals according to preset grouping rules. For example, 256 grayscale values are divided into 8 grayscale intervals. The grayscale value corresponding to the first grayscale interval is 0-31, the grayscale value corresponding to the second grayscale interval is 32-63, the grayscale value corresponding to the third grayscale interval is 64-95, and so on. The grayscale value corresponding to the eighth grayscale interval is 224-255.

[0027] In specific applications, the brightness histogram data obtained by the electronic device can be a one-dimensional array of 1*256. After splitting the brightness histogram data of the display screen into a preset number of grayscale intervals, a two-dimensional array can be obtained. For example, if the brightness histogram data corresponding to a frame of display screen is split into 8 grayscale intervals, 8*32 two-dimensional data can be obtained; for example, if the brightness histogram data corresponding to a frame of display screen is split into 16 grayscale intervals, a 16*16 two-dimensional array can be obtained.

[0028] In a possible implementation, traversing the brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture to calculate the similarity between the reference frame display picture and the comparison frame display picture includes:

[0029] Traversing the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the reference frame display image, and the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame display image;

[0030] Comparing the maximum number of pixels in each grayscale interval of the reference frame display image with the maximum number of pixels in each grayscale interval of the comparison frame display image in the corresponding grayscale interval to obtain a maximum pixel number comparison result;

[0031] Comparing the grayscale value of the maximum number of pixels in each grayscale interval of the reference frame display image with the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame display image in the corresponding grayscale interval to obtain a grayscale value comparison result;

[0032] The similarity judgment result between the reference frame display image and the comparison frame display image is determined according to the maximum pixel number comparison result and the grayscale value comparison result.

[0033] In this way, after obtaining the maximum number of pixels in each grayscale interval of the continuously displayed N frames of display images, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval, by traversing the maximum number of pixels in each grayscale interval of the reference frame display image, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval, the maximum number of pixels in each grayscale interval of the reference frame display image is compared with the maximum number of pixels in each grayscale interval of the comparison frame display image in the corresponding grayscale interval, and the grayscale value corresponding to each maximum number of pixels in the reference frame display image is compared with the grayscale value corresponding to each maximum number of the comparison frame display image in the corresponding grayscale interval, thereby obtaining the similarity judgment result of the reference frame display image and the comparison frame display image.

[0034] In a possible implementation, traversing the brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture to calculate the similarity between the reference frame display picture and the comparison frame display picture includes:

[0035] Calculating the maximum number of pixels and the absolute value of the difference between the maximum number of pixels in the corresponding grayscale intervals of the reference frame display image and the comparison frame display image;

[0036] For each grayscale interval, determining whether the grayscale value corresponding to the maximum number of pixels in the grayscale interval of the reference frame display image is consistent with the grayscale value corresponding to the maximum number of pixels in the grayscale interval of the comparison frame display image;

[0037] When the grayscale values corresponding to the maximum number of pixels in the grayscale intervals corresponding to the reference frame display image and the comparison frame display image are consistent, determining the pixel number level of the maximum number of pixels in the grayscale interval according to the maximum number of pixels corresponding to the grayscale interval;

[0038] Determining a first quantity threshold according to the pixel quantity level;

[0039] When the maximum number of pixels in the grayscale interval is greater than a first number threshold, the similarity parameter is increased by a first preset increment;

[0040] When the grayscale values corresponding to the maximum number of pixels in the grayscale intervals of the reference frame display image and the comparison frame display image are inconsistent, the maximum number of pixels in the grayscale interval is greater than the second number threshold, and the absolute value of the grayscale difference is greater than the grayscale threshold, the similarity parameter is increased by a second preset increment;

[0041] When the similarity parameter is greater than the similarity threshold, it is determined that the reference frame display picture and the comparison frame display picture are not similar.

[0042] Each pixel quantity level has its corresponding first quantity threshold, and the first quantity thresholds corresponding to different pixel quantity levels may be the same or different.

[0043] In this way, by dividing the number of pixels into different levels and setting a corresponding first number threshold for each level of pixel number, the accuracy of display image similarity detection is improved.

[0044] In a possible implementation, when it is determined that a screen flash event occurs and multiple frames of second target frame display pictures exist between the reference frame display picture and the first target frame display picture, the method further includes:

[0045] Calculating the similarity between any two adjacent frames of display pictures in the plurality of frames of second target frame display pictures;

[0046] When any two adjacent display frames in the plurality of second target frame display frames are similar, it is determined that a screen flash event occurs.

[0047] In the case where there are multiple frames of second target frame display pictures between the reference frame and the first target frame display picture, the similarity of any two adjacent frames of display pictures in the multiple frames of second target frame display pictures can also be detected. Since the change of the abnormal frame display picture is gradual, it can be determined that the difference between any two adjacent frames of display pictures in the multiple frames of second target frame display pictures is relatively small. After judging by the similarity judgment method provided in the embodiment of the present application, the similarity of the two adjacent frames of second target frame display pictures can be judged as similar. By comparing whether any two adjacent frames of display pictures in the multiple frames of second target frame display pictures are similar, non-flash screen events can be eliminated and false alarms can be reduced.

[0048] In a possible implementation manner, the method further includes: calculating a pixel ratio of the display picture according to a brightness histogram of the display picture.

[0049] The pixel ratio of the display screen can be calculated by counting the number of pixels corresponding to each grayscale of the display screen. Specifically, the pixel ratio of the display screen can be calculated using Formula 1:

[0050] R pixel =100*sum pixel / (P pixel *255) (1);

[0051] Among them, R pixel Indicates the pixel ratio of the display screen, sum pixel Represents the weighted sum of pixels in the display, P pixe Indicates the number of pixels on the display screen of an electronic device.

[0052] Among them, the weighted sum of pixels is sum pixel It can be calculated by formula 2:

[0053] sum pixel=0*P0+1*P1+…+255*P 255 (2);

[0054] Among them, P0 represents the number of pixels corresponding to grayscale 0, P1 represents the number of pixels corresponding to grayscale 1, and P 255 Indicates the number of pixels corresponding to 255 gray levels.

[0055] In a possible implementation, after determining that a screen splash event occurs, the method further includes:

[0056] Obtaining the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture in the flash screen event;

[0057] The type of the screen flash event is determined according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture.

[0058] The intermediate frame display picture may be any second target frame display picture between the reference frame display picture and the first target frame display picture.

[0059] It is understandable that if the screen flash event is a three-frame screen flash event, the pixel ratio corresponding to the three frames of display images can be obtained. If the screen flash event includes more than three frames of display images, any frame of display image in the middle abnormal frame can be selected as the middle frame display image. For example, for Figure 10 For the four-frame flash screen event shown in FIG, the second frame display picture can be selected as the middle frame display picture, or the third frame display picture can be selected as the middle frame display picture. Figure 11 For the five-frame flash screen event shown, the second frame display picture can be selected as the middle frame display picture, the third frame display picture can be selected as the middle frame display picture, and the fourth frame display picture can be selected as the middle frame display picture.

[0060] In a specific application, a 1*3 one-dimensional array can be set to store the pixel ratios of the three display frames to facilitate subsequent identification of the type of screen flash event. By comparing the pixel ratios of the display frames, the type of screen flash event can be determined, i.e., whether the screen flash event is a small flash event with a relatively small degree of flicker (the first screen flash event), a large flash event with a relatively large degree of flicker (the second screen flash event), or a false alarm.

[0061] In a possible implementation, determining the type of the screen flash event according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture includes:

[0062] When the absolute value of the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the first target frame display screen is less than the first ratio threshold, and the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the intermediate frame display screen is greater than the second ratio threshold, the type of the splash screen event is determined to be a first splash screen event.

[0063] In a possible implementation, determining the type of the screen flash event according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture includes:

[0064] When the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the first target frame display screen is less than the third ratio threshold, and the absolute value of the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the intermediate frame display screen is greater than the fourth ratio threshold, the type of the splash screen event is determined to be a second splash screen event.

[0065] In this way, the category of the screen flash event can be detected by the pixel ratio of the display image in the screen flash event, and false alarm events can be filtered out, which can further improve the detection accuracy of the screen flash event.

[0066] In a second aspect, an embodiment of the present application provides an electronic device, one or more processors, and a memory, wherein the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute any method as described in the first aspect above.

[0067] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes any one of the methods of the first aspect above.

[0068] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute any method as in the first aspect.

[0069] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the above methods in the first aspect.

[0070] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 This is a schematic diagram of a scene of a flash screen phenomenon;

[0072] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0073] Figure 3 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;

[0074] Figure 4 A schematic diagram of an implementation flow of a method for detecting a screen splash event provided in an embodiment of the present application;

[0075] Figure 5 A schematic diagram of a display screen displayed on a display screen of an electronic device in an application scenario involved in an embodiment of the present application;

[0076] Figure 6 A schematic diagram of similarity comparison of multiple frames of display images continuously displayed on a display screen of an electronic device provided in an embodiment of the present application;

[0077] Figure 7 In the screen flash event detection method provided in the embodiment of the present application, a specific detection process of detecting the reference frame display image and the comparison frame display image according to the brightness histogram data;

[0078] Figure 8 Schematic diagram of the maximum number of pixels corresponding to each grayscale region and the grayscale value corresponding to the maximum number of pixels after grayscale region division for the brightness histogram data of five consecutive display images provided in an embodiment of the present application;

[0079] Figure 9 1. A schematic diagram of a specific implementation flow of determining the similarity between two display frames in the screen flash event detection method according to an embodiment of the present application;

[0080] Figure 10 A schematic diagram of a process for processing data of a first grayscale interval of a first frame display image and data of a first grayscale interval of a second frame display image provided by an embodiment of the present application;

[0081] Figure 11 A schematic diagram of a process for processing data in the fifth grayscale interval of a first frame display image and data in the fifth grayscale interval of a second frame display image provided by an embodiment of the present application;

[0082] Figure 12 A schematic diagram of a process for calculating similarity parameters of grayscale intervals corresponding to a first display frame and a second display frame provided in an embodiment of the present application;

[0083] Figure 13 A schematic diagram of a display screen of a four-frame flash screen event provided in an embodiment of the present application;

[0084] Figure 14 A schematic diagram of a display screen of a five-frame flash screen event provided in an embodiment of the present application;

[0085] Figure 15 A schematic diagram of an implementation flow of another method for detecting a screen splash event provided in an embodiment of the present application;

[0086] Figure 16 A schematic diagram of the implementation flow of another method for detecting a screen splash event provided in an embodiment of the present application;

[0087] Figure 17 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0088] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.

[0089] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0090] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0091] During the use of electronic devices, screen flickering may occur due to various reasons, such as screen flickering caused by system freezes, screen display brightness problems, improper software configuration, hardware failures, and driver configuration, etc. Screen flickering will have an impact on the user's vision and affect the user's experience. Therefore, it is necessary to detect screen flickering in electronic devices in a timely manner and solve it in a timely manner.

[0092] In the embodiments of this application, screen flickering refers to the occurrence of abnormal frames when an electronic device displays a continuous image. Due to the persistence of vision of the human eye, gradually changing image frames form a coherent image in the brain, creating a good viewing experience. The sudden flash of abnormal image frames during a continuous image can cause visual discomfort. If an abnormal frame suddenly flashes while displaying a continuous image, it will cause a sense of unsmoothness.

[0093] For example, taking the electronic device as a mobile phone, please refer to Figure 1 , Figure 1 The following is a schematic diagram of a flash screen event that occurs on the display interface of an electronic device. Figure 1 As shown, Figure 1 The screen displayed in (a) and Figure 1 The screen displayed in the interface (c) is a normal continuous screen. Figure 1 In the interface (b), a half-black screen appears. Figure 1 The picture displayed in the interface (b) is an abnormal frame. The appearance of an abnormal frame will cause the original continuous picture to appear unsmooth, causing an impact on the user's vision and affecting the user experience.

[0094] It is understandable that in the screen flicker phenomenon, the number of abnormal frames that appear in two consecutive pictures is not fixed. Figure 1 The case where there is one abnormal frame between two consecutive pictures is merely taken as an example. The number of abnormal frames appearing in two consecutive pictures may also be 2, 3, 4, etc., and this application does not impose any specific limitation on this.

[0095] Since the screen flicker phenomenon can cause visual impact on the user and affect the user's experience, how to accurately detect the screen flickering during user use is very important for the subsequent handling of the screen flicker event. Based on this, the embodiment of the present application provides a screen flicker event detection method, electronic device and computer program product. By obtaining the brightness histogram data of multiple consecutive display screens of the electronic device, the similarity between the reference frame and the comparison frame is determined based on the brightness histogram data of the multiple consecutive display screens, and then the presence of the screen flicker event is detected. This can effectively improve the detection accuracy of the screen flicker event and provide a basis for the handling of the screen flicker event.

[0096] The flash screen event detection method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings. In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiment of the present application.

[0097] In some embodiments, the execution subject of the above-mentioned flash screen event detection method can be an electronic device. The above-mentioned electronic device can also be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device can be a mobile phone, a smart TV, a wearable device (such as a smart bracelet, a smart watch, smart glasses, etc.), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in transportation safety, and a wireless terminal in a smart city. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.

[0098] In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is introduced below:

[0099] Figure 2 1 shows a schematic structural diagram of the electronic device 100. Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0100] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0101] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0102] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0103] In some embodiments, the processor 110 is implemented by a system on chip (SOC), that is, the processor 110 mentioned in some embodiments of the present application may specifically refer to a SOC chip.

[0104] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the instruction or data again, it can retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0105] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0106] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is for illustrative purposes only and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from those in the above embodiments, or a combination of multiple interface connection methods.

[0107] The electronic device 100 implements audio functions such as music playback, audio collection, and recording through the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0108] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0109] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1. In some embodiments, the electronic device 100 can obtain display data of the image displayed on the display screen, for example, it can obtain histogram data of the image displayed on the display screen (referred to as a display image).

[0110] Here, the histogram is explained:

[0111] A histogram is a statistical tool that can be used to understand the distribution of the level values of each channel in an image. The horizontal axis of the histogram represents 256 color levels from 0 to 255, and the vertical axis represents the number of pixels corresponding to each color level.

[0112] The histogram includes the color level histogram of a single color channel, the composite channel histogram, the brightness histogram, and the color histogram.

[0113] For example, for the RGB color model, the color level histogram of a single color channel may be a color level histogram of the R color channel, a color level histogram of the G color channel, and a color level histogram of the B color channel. It is understood that in the color level histogram of a single color channel, the sum of the number of pixels corresponding to all color levels is equal to the number of pixels in the entire image.

[0114] The composite channel histogram is a simple summation of the R, G, and B channels, followed by a count of the number of pixels at each color level. It's understandable that the sum of the number of pixels at all color levels in the composite channel histogram is three times the number of pixels in the entire image.

[0115] The brightness histogram is the grayscale histogram of the brightness Y of an image in the YUV color model. In the brightness histogram, the sum of the number of pixels corresponding to all gray levels is equal to the number of pixels in the entire image.

[0116] In a brightness histogram, the horizontal axis represents brightness, corresponding to brightness values from 0 to 255 (also called grayscale). A higher value represents a higher brightness. 0 represents the darkest area of pure black, 255 represents the brightest pure white, and values in between represent shades of gray. The vertical axis represents the number of pixels corresponding to each brightness value.

[0117] A color histogram is another form of a composite channel histogram. It is a color level histogram obtained by displaying the three color channels in their original colors and then overlaying them using a filter blending method. It is understood that in a color histogram, the sum of the number of pixels corresponding to all the color levels is three times the number of pixels in the entire image.

[0118] In one embodiment of the present application, the histogram data of the display screen obtained by the electronic device 100 may specifically refer to the above-mentioned brightness histogram, that is, the histogram data of the display screen obtained by the electronic device 100 refers to the brightness histogram data of the display screen displayed on the display screen.

[0119] It should also be noted that the processor in the electronic device 100 can output brightness histogram data corresponding to each frame of the display screen based on the image information of each frame of the display screen. The electronic device 100 can then read the brightness histogram data corresponding to each frame of the display screen from the processor and further perform screen flicker detection based on the brightness histogram data of multiple consecutive frames of the display screen. The details of screen flicker detection will be described in subsequent method embodiments and will not be elaborated on here.

[0120] It is understandable that the electronic device 100 can also implement the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0121] The electronic device 100 having the above hardware structure can have a software system that adopts a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system with a layered architecture as an example to exemplify the software structure of the electronic device 100.

[0122] Figure 3 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0123] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: application layer, application framework layer, system layer, HAL layer, and kernel layer, from top to bottom.

[0124] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, video, instant chat, reading, etc.

[0125] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes predefined functions, such as the activity manager, window manager, content provider, view system, resource manager, notification manager, camera service, and face recognition service.

[0126] The system layer includes system libraries, Android runtime, core libraries, and media libraries.

[0127] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0128] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0129] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files from the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection. It may also include a surface manager, a 3D graphics library, a 2D graphics engine, and more.

[0130] In one embodiment of the present application, the HAL layer may include a screen splash detection module.

[0131] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0132] In one embodiment of the present application, the above-mentioned screen flicker detection module can obtain brightness histogram data of the display screen displayed by the display screen driven by the display driver, and then perform screen flicker detection based on the brightness histogram data of multiple consecutive frames of display screen.

[0133] The following will be combined with the accompanying drawings to illustrate the flash screen event detection method provided by the present application through the following exemplary embodiments. The methods in the following embodiments can be implemented in an electronic device with the above hardware structure and software architecture. The hardware structure of the electronic device can be as follows: Figure 2 As shown, the software structure diagram of the electronic device can be as follows Figure 3 As shown, the embodiments of the present application are not limited thereto. For the sake of convenience, the embodiments of the present application are all based on electronic devices. Figure 2 The electronic device shown is taken as an example.

[0134] See also Figure 4 , Figure 4 This is a schematic diagram of the implementation process of the flash screen event detection provided by the embodiment of the present application, such as Figure 4 As shown, the above-mentioned screen splash event detection method may include the following steps:

[0135] S41: Obtaining brightness histogram data of N consecutive frames of display images on the display screen.

[0136] In an embodiment of the present application, the electronic device can obtain picture information of all display images displayed on the display screen. The picture information may include brightness histogram data. The above brightness histogram data can reflect the distribution of the number of pixels corresponding to each gray level under the brightness channel Y of the display image in the YUV color mode.

[0137] In an embodiment of the present application, a processing chip of an electronic device can extract brightness histogram data of each display image displayed on a display screen. During the process of executing the screen flicker event detection function, the electronic device can obtain brightness histogram data of each display image displayed on the display screen for N consecutive frames extracted by the processing chip, where N is a positive integer greater than or equal to 3.

[0138] In some embodiments, when detecting a screen flash event, the electronic device may obtain brightness histogram data of a preset number of frames (N frames) of the display screen, and perform screen flash event detection based on the brightness histogram data of the preset number of frames of the display screen. The number of preset frames can be set according to actual application requirements, and the number of preset frames is greater than 3, that is, the electronic device obtains brightness histogram data of at least 3 frames of display screen continuously displayed on the display screen. For example, the electronic device may obtain brightness histogram data of 5 frames of display screen and obtain brightness histogram data of 7 frames of display screen.

[0139] It should be noted that the continuous multi-frame display screens referred to in the embodiments of the present application do not mean that the display contents of the multiple display screens are continuous, but rather that the multiple display screens are displayed sequentially on the display screen, and the display contents of the continuous multi-frame display screens can be continuous or discontinuous. For example, Figure 5 As shown, the first frame display screen to the fifth frame display screen are displayed sequentially on the display interface, wherein the display content of the first frame display screen and the display content of the third frame display screen are continuous, the display content of the first frame display screen and the display content of the second frame display screen are dissimilar, and the semi-black screen displayed by the second frame display screen is an abnormal frame.

[0140] In some embodiments of the present application, a screen flicker event detection function can be run during the factory testing phase of an electronic device to detect screen flicker events, facilitating the location, analysis, and resolution of screen flicker issues. Of course, the screen flicker event detection function can also be run during user use, and detected screen flicker events can be reported to facilitate subsequent system updates and maintenance for the screen flicker issue.

[0141] It is understood that the electronic device can automatically run the screen flash event detection function during operation, and the electronic device can detect in real time whether there is a screen flash event. Of course, the user can also choose whether to start the screen flash event detection function according to the user's operating needs, and this application does not impose specific restrictions on this.

[0142] It is also understood that the electronic device can obtain the display image currently displayed on the display screen (current frame display image) and the display images N-1 frames before the current frame display image to detect screen flicker events in real time. It is also possible to detect whether the content displayed on the display screen of the electronic device has a screen flicker event during the application process based on the historical display images.

[0143] It is understandable that after the electronic device is turned on, it can record the brightness histogram data of each display screen it displays, for example, save it in an array used to record the brightness histogram data of N frames of display screen, and write it into the array based on the first-in-first-out data writing method, so that the display data (brightness histogram data) of the display screen displayed in real time and the brightness histogram data of the previous N-1 frames of display screen are recorded, so as to perform real-time screen flash event detection.

[0144] S42: Detecting similarity between the reference frame display image and the comparison frame display image based on the brightness histogram data.

[0145] Among them, the above-mentioned comparison frame display screen is the other frame display screens in the continuous N frame display screens except the reference frame display screen. The number of comparison frame display screens can be determined according to the similarity comparison result, that is, when the electronic device performs similarity judgment, it can select the required number of comparison frames according to the similarity judgment result.

[0146] In one embodiment of the present application, the reference frame display image may be the earliest displayed image among the consecutive N frames of display images. Figure 6 As shown, Figure 6 : shows multiple frames of display images displayed continuously on the display screen, wherein the first frame of display image is the earliest displayed display image, the second frame of display image is the next frame of display image of the first frame of display image, the third frame of display image is the next frame of display image of the second frame of display image, and so on. The fifth frame of display image is the next frame of display image of the fourth frame of display image, and the first frame of display image is determined as the reference frame of display image.

[0147] like Figure 6 As shown, the electronic device can compare the similarity between the first frame display picture and at least one of the second frame display picture, the third frame display picture, the fourth frame display picture and the fifth frame display picture, and determine whether a screen flashing event occurs based on the similarity detection results between the first frame display picture and the second frame display picture, the third frame display picture, the fourth frame display picture and the fifth frame display picture.

[0148] For example, Figure 6 Take the display screen shown as an example, Figure 7 FIG. 4 shows a specific detection process of detecting a reference frame display image and a comparison frame display image according to brightness histogram data in a flash screen event detection method provided in an embodiment of the present application, such as Figure 7 As shown in (a), the electronic device can compare the similarity of the first frame display screen and the second frame display screen. Assuming that the comparison result of the electronic device comparing the similarity of the first frame display screen and the second frame display screen is that the first frame display screen and the second frame display screen are not similar, the electronic device further compares the similarity of the first frame display screen and the third frame display screen. When the first frame display screen and the third frame display screen are similar, it can be determined that there is an abnormal display screen of the second frame between the first frame and the third frame (i.e., an abnormal frame display screen), and then it can be determined that a splash screen event has occurred (called a three-frame splash screen event). In this case, the number of comparison frames is 2, that is, after the similarity judgment of the reference frame display screen and the second frame display screen is performed, the similarity judgment is performed with the third frame display screen. In this case, the electronic device can pass the relevant screen information of the first frame display screen, the second frame display screen, and the third frame display screen to the splash screen event processing module so that the splash screen event processing module can process the three-frame splash screen event.

[0149] like Figure 7 As shown in (b), when the first frame display screen is used as the reference frame, and the first frame display screen is not similar to the second frame display screen, and the first frame display screen is not similar to the third frame display screen, the similarity of the first frame display screen and the fourth frame display screen is further compared. When the first frame display screen and the fourth frame display screen are similar, it can be determined that there are two abnormal display screens of the second frame and the third frame between the first frame and the fourth frame, and then it can be determined that a splash screen event has occurred (called a four-frame splash screen event). In this case, the number of comparison frames is 3, that is, the reference frame display screen is judged for similarity with the second frame display screen, the third frame display screen, and the fourth frame display screen respectively. In this case, the electronic device can pass the relevant screen information of the first frame display screen, the second frame display screen, the third frame display screen, and the fourth frame display screen (such as display time, brightness histogram information of the display screen, associated scenes of the display screen, etc.) to the splash screen event processing module so that the splash screen event processing module can process the four-frame splash screen event.

[0150] like Figure 7 As shown in (c), when the first frame display screen is used as the reference frame, and the first frame display screen is not similar to the second frame display screen, the first frame display screen is not similar to the third frame display screen, and the first frame display screen is not similar to the fourth frame display screen, the similarity between the first frame display screen and the fifth frame display screen can be further compared. When the first frame display screen and the fifth frame display screen are similar, it can be determined that there are three abnormal display screens of the second frame, the third frame, and the fourth frame between the first frame and the fifth frame, and thus it can be determined that a splash screen event has occurred. In this case, the number of comparison frames is 4, that is, the reference frame display screen is judged for similarity with the second frame display screen, the third frame display screen, the fourth frame display screen, and the fifth frame display screen respectively. In this case, the electronic device can transmit the relevant screen information of the first frame display screen, the second frame display screen, the third frame display screen, the fourth frame display screen, and the fifth frame display screen to the splash screen event processing module so that the splash screen event processing module can process the five-frame splash screen event.

[0151] It should be noted that when the first frame display picture is used as the reference frame display picture and the first frame display picture is similar to the second frame display picture, the second frame display picture can be used as the reference frame display picture to further compare the similarity between the second frame display picture and the third frame display picture, and so on.

[0152] It should also be noted that, when the first frame display picture and the fifth frame display picture are still not similar, the brightness histogram data of the next frame display picture of the fifth frame (i.e., the sixth frame display picture) can be obtained, the brightness histogram data of the first frame display picture can be discarded, and the second frame display picture can be used as the reference frame display picture again to perform similarity detection, that is, compare the similarity of the second frame display picture with the third frame display picture. When the second frame display picture is similar to the third frame display picture, further compare the similarity of the second frame display picture with the fourth frame display picture, and so on.

[0153] It can be understood that the above is just an example of N being 5, that is, the electronic device performs screen flicker event detection based on the brightness histogram data of 5 consecutive frames of display screen, to exemplify the process of detecting the similarity between the reference frame display screen and the non-reference frame display screen. When the electronic device chooses to perform screen flicker event detection based on the brightness histogram data of 6 consecutive frames of display screen, the brightness histogram data of 7 consecutive frames of display screen, etc., as needed, it can determine whether a screen flicker event occurs based on the similarity detection method of the above embodiment, and this application will not go into details about this.

[0154] It is understandable that the reference frame may be selected according to actual needs, and the above-mentioned use of the earliest displayed image among the consecutive N frames as the reference frame is only an example.

[0155] In an embodiment of the present application, the electronic device may determine the similarity between the reference frame display image and the comparison frame display image through brightness histogram data of the display image.

[0156] In an embodiment of the present application, the above S42 may specifically include the following steps:

[0157] S421: Extracting brightness characteristic parameters of the display image based on the acquired brightness histogram data of the display image.

[0158] In some embodiments, the brightness characteristic parameters of the display image include the maximum number of pixels in each grayscale interval of the display image, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval.

[0159] For the brightness histogram data of the display screen obtained, the brightness histogram data is divided into multiple grayscale intervals according to preset grouping rules. For example, 256 grayscale values are divided into 8 grayscale intervals. The grayscale value corresponding to the first grayscale interval is 0-31, the grayscale value corresponding to the second grayscale interval is 32-63, the grayscale value corresponding to the third grayscale interval is 64-95, and so on. The grayscale value corresponding to the eighth grayscale interval is 224-255.

[0160] In specific applications, the brightness histogram data obtained by the electronic device can be a one-dimensional array of 1*256. After splitting the brightness histogram data of the display screen into a preset number of grayscale intervals, a two-dimensional array can be obtained. For example, if the brightness histogram data corresponding to a frame of display screen is split into 8 grayscale intervals, 8*32 two-dimensional data can be obtained; for example, if the brightness histogram data corresponding to a frame of display screen is split into 16 grayscale intervals, a 16*16 two-dimensional array can be obtained.

[0161] It is understandable that the electronic device can perform the above splitting operation on the acquired multiple frames of continuous display images to obtain a two-dimensional array corresponding to each display image.

[0162] After the brightness histogram data is divided into a plurality of grayscale intervals according to a preset grouping rule, the maximum number of pixels in each grayscale interval and the grayscale value corresponding to the maximum number of pixels are determined.

[0163] For example, Figure 8 As shown in FIG, , it is assumed that the brightness histogram data of each display image is divided into 8 grayscale intervals, and the maximum number of pixels in the 8 grayscale intervals and the grayscale value of the maximum number of pixels are determined respectively. Assuming that the display image obtained by the electronic device is 5 frames of continuous display images, the grayscale interval division and maximum pixel number extraction operations are performed on these 5 frames of display images respectively, and the following can be obtained: Figure 8 Schematic diagram of brightness characteristic parameters of the display screen shown.

[0164] It should be noted that the division of grayscale intervals can be set according to actual application requirements, and this application does not impose any specific restrictions on this.

[0165] S422: traverse the brightness feature parameters of the reference frame display picture and the brightness feature parameters of the comparison frame display picture, and calculate the similarity between the reference frame display picture and the comparison frame display picture.

[0166] In an embodiment of the present application, after obtaining the maximum number of pixels in each grayscale interval of the continuously displayed N frames of display images, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval, by traversing the maximum number of pixels in each grayscale interval of the reference frame display image, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval, the maximum number of pixels in each grayscale interval of the reference frame display image is compared with the maximum number of pixels in each grayscale interval of the comparison frame display image for corresponding grayscale intervals, and the grayscale value corresponding to each maximum number of pixels in the reference frame display image is compared with the grayscale value corresponding to each maximum number of the comparison frame display image for corresponding grayscale intervals, thereby obtaining a similarity judgment result between the reference frame display image and the comparison frame display image.

[0167] For example, assuming that the brightness histogram data of each display image is divided into 8 grayscale intervals, when performing similarity judgment, the maximum number of pixels in the first grayscale interval (0-31) of the reference frame display image is compared with the maximum number of pixels in the first grayscale interval (0-31) of the comparison frame display image, and the grayscale value corresponding to the maximum number of pixels in the first grayscale interval (0-31) of the reference frame display image is compared with the grayscale value corresponding to the maximum number of pixels in the first grayscale interval (0-31) of the comparison frame display image; the maximum number of pixels in the second grayscale interval (32-63) of the reference frame display image is compared with the grayscale value corresponding to the second grayscale interval (32-64) of the comparison frame display image. -63), the grayscale value corresponding to the maximum number of pixels in the second grayscale interval (32-63) of the reference frame display image is compared with the grayscale value corresponding to the maximum number of pixels in the second grayscale interval (32-63) of the comparison frame display image, and so on, until the maximum number of pixels in the eighth grayscale interval (224-255) of the reference frame is compared with the maximum number of pixels in the eighth grayscale interval (224-255) of the comparison frame, and the grayscale value corresponding to the maximum number of pixels in the eighth grayscale interval (224-255) of the reference frame is compared with the grayscale value corresponding to the maximum number of pixels in the eighth grayscale interval (224-255) of the comparison frame.

[0168] After obtaining the comparison results corresponding to each grayscale interval, the similarity between the reference frame display image and the comparison frame display image can be finally determined by combining the comparison results of multiple grayscale intervals (including the maximum pixel comparison result and the grayscale value comparison result).

[0169] In some embodiments, the absolute value of the difference between the maximum number of pixels in each grayscale interval in the base frame display image and the comparison frame display image can be compared to see whether it exceeds a quantity threshold. If the absolute value of the difference between the maximum number of pixels in a certain grayscale interval in the base frame display image and the comparison frame display image exceeds the quantity threshold, the similarity parameter is increased by a first preset increment. If the absolute value of the difference between the grayscale values corresponding to the maximum number of pixels in a certain grayscale interval in the base frame display image and the comparison frame display image exceeds the grayscale threshold, the similarity parameter is increased by a second preset increment.

[0170] By traversing the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the reference frame display image, as well as the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame display image, a final similarity parameter is calculated, and the similarity between the reference frame display image and the comparison frame display image is determined based on the similarity parameter. For example, when the similarity parameter exceeds the similarity threshold, it is determined that the reference frame display image and the comparison frame display image are not similar; when the similarity parameter does not exceed the similarity threshold, it is determined that the reference frame display image and the comparison frame display image are similar.

[0171] It is understandable that the above-mentioned quantity threshold, grayscale threshold, first preset increment, second preset increment, and similarity threshold can be set according to actual application requirements, and the embodiments of the present application do not impose specific limitations on this.

[0172] In some embodiments, in order to improve the accuracy of similarity judgment, the number of pixels can be divided into grades according to the display capability of the electronic device. For example, for an electronic device with a display capability of 3,000,000 pixels, the number of pixels can be divided into 5 levels, for example, less than 20,000 pixels are divided into the first pixel number level, 20,000 pixels to 500,000 pixels are divided into the second pixel number level, 5,000,000 pixels to 1,000,000 pixels are divided into the third pixel number level, 1,000,000 pixels to 2,000,000 pixels are divided into the fourth pixel number level, and 2,000,000 pixels to 300,000 pixels are divided into the fifth pixel number level, and then different pixel number levels correspond to different quantity thresholds.

[0173] It is understood that the number thresholds corresponding to the above-mentioned different pixel number levels can be set according to actual application requirements, and this application does not impose specific restrictions on this. How the number of pixels is divided into different levels can also be set according to actual application requirements. The above is only an example and not a limitation. Different levels can be used according to the display capabilities of different electronic devices, and this application does not impose specific restrictions on this.

[0174] See also Figure 9 , Figure 9 The specific implementation process of the similarity judgment of two frames of display images is shown in FIG. Figure 8 Taking the brightness characteristic parameters of the display picture shown as an example, the first frame display picture and the second frame display picture are taken as examples to illustrate the display picture similarity judgment process. Figure 9 As shown in Figure 2, the similarity judgment process is as follows:

[0175] In S91 , the maximum number of pixels in the grayscale intervals corresponding to the first frame display image and the second frame display image and the absolute value of the difference between the maximum number of pixels are calculated.

[0176] by Figure 8 Taking the histogram data of the five frames of display images shown as an example, the maximum number of pixels in the first grayscale interval of the first frame of display image is 1797810, and the maximum number of pixels in the first grayscale interval of the second frame of display image is 24300. The absolute value of the difference between the two is calculated to be 1773510. The maximum number of pixels in the first grayscale interval of the two frames of display image is 1797810, and the absolute value of the difference between the maximum number of pixels is 1773510; the maximum number of pixels in the second grayscale interval of the first frame of display image is 390, and the maximum number of pixels in the second grayscale interval of the second frame of display image is 1661. The absolute value of the difference between the two is calculated to be 1271. Therefore, the maximum number of pixels in the second grayscale interval of the two frames of display image is 1661, and the absolute value of the difference between the maximum number of pixels is 1271. Similarly, the maximum number of pixels and the absolute value of the difference between the maximum number of pixels in the corresponding grayscale intervals of the first frame of display image and the second frame of display image are obtained.

[0177] For example, see Figure 10 , Figure 10 Taking the data of the first grayscale interval of the first frame display image and the data of the first grayscale interval of the second frame display image as examples, the process of the electronic device determining the maximum number of pixels corresponding to the grayscale interval, the absolute value of the difference between the maximum number of pixels, and the grayscale difference threshold is illustrated. Figure 10 As shown, the electronic device respectively reads the grayscale value index11 corresponding to the maximum number of pixels corresponding to the first grayscale interval of the first frame display image, and the maximum number of pixels MAX11, and the grayscale value index12 corresponding to the maximum number of pixels corresponding to the second grayscale interval of the second frame display image, and the maximum number of pixels MAX12. The value of index11 read is 0, the value of index12 is 0, the value of MAX11 is 1797810, and the value of MAX12 is 24300. Since index11 is consistent with index12, it can be determined that the absolute value of the grayscale difference between the first grayscale interval of the first frame display image and the second frame display image is 0; the maximum number of pixels maxValue is 1797810, and the absolute value of the maximum pixel number difference absValue is 1773510.

[0178] For example, see Figure 11 , Figure 11 Taking the data of the fifth grayscale interval of the first frame display image and the data of the first grayscale interval of the second frame display image as examples, the process of the electronic device determining the maximum number of pixels corresponding to the grayscale interval, the absolute value of the difference between the maximum number of pixels, and the grayscale difference threshold is illustrated. Figure 11As shown, the electronic device respectively reads the grayscale value index51 corresponding to the maximum number of pixels corresponding to the fifth grayscale interval of the first frame display image, the maximum number of pixels MAX51, the grayscale value index52 corresponding to the maximum number of pixels corresponding to the second grayscale interval of the second frame display image, and the maximum number of pixels MAX52. The value of index51 read is 154, the value of index52 is 142, the value of MAX51 is 63720, and the value of MAX52 is 23189. It can be determined that the absolute value of the grayscale difference between the fifth grayscale interval of the first frame display image and the second frame display image is 12; the maximum number of pixels maxValue is 63720.

[0179] In S92 , the grayscale values corresponding to the maximum number of pixels in the corresponding grayscale intervals of the first display frame and the second display frame are compared to determine whether they are consistent. If so, S93 is executed; if not, S94 is executed.

[0180] In S93, the pixel number gear is determined according to the maximum number of pixels in the grayscale interval, the first number threshold corresponding to the pixel number gear is obtained, and it is determined whether the absolute value of the difference between the maximum number of pixels in the grayscale interval is greater than the first number threshold.

[0181] If the absolute value of the maximum pixel number difference is greater than the first number threshold, the similarity parameter is increased by a first preset increment. If the absolute value of the maximum pixel number difference is not greater than the first number threshold, the similarity parameter remains unchanged.

[0182] Assuming that the first preset increment is 1, when the absolute value of the difference in the maximum number of pixels is greater than the first number threshold, the similarity parameter is incremented by 1.

[0183] It is understandable that each pixel quantity level has its corresponding first quantity threshold value, and the first quantity threshold values corresponding to different pixel quantity levels may be the same or different, and this application does not impose any specific restrictions on this.

[0184] In S94 , the absolute value of the grayscale difference is calculated to determine whether the maximum number of pixels in the grayscale interval is greater than a second number threshold. If so, S95 is executed; otherwise, the similarity parameter remains unchanged.

[0185] In S95 , it is determined whether the absolute value of the grayscale difference is greater than the grayscale threshold. If so, the similarity parameter is increased by a second preset increment; otherwise, the similarity parameter remains unchanged.

[0186] The second preset increment can be set according to actual application. For example, if it is set to 1, when the maximum number of pixels in the grayscale interval is greater than the second number threshold and the absolute value of the grayscale difference is greater than the grayscale threshold, the similarity parameter of the first frame display image and the second frame display image is automatically increased by 1.

[0187] For example, the grayscale value corresponding to the maximum number of pixels in the first grayscale interval of the first frame display image is 0, and the grayscale value corresponding to the maximum number of pixels in the first grayscale interval of the second frame display image is also 0, that is, the grayscale value corresponding to the maximum number of pixels in the first grayscale interval of the first frame display image is consistent with the grayscale value corresponding to the maximum number of pixels in the first grayscale interval of the second frame display image. Therefore, by continuing to compare the maximum number of pixels in the first grayscale interval of the first frame display image with the maximum number of pixels in the second grayscale interval of the second frame display image, it is obtained that the maximum number of pixels in the first grayscale interval of the first frame display image and the second frame display image is 1797810, and the absolute value of the difference in the maximum number of pixels is 1773510. Assume that pixels less than 20,000 are divided into the first pixel number gear, pixels from 20,000 to 500,000 are divided into the second pixel number gear, and 500 0000 pixels to 1000000 pixels are divided into the third pixel number gear, 1000000 pixels to 2000000 pixels are divided into the fourth pixel number gear, and 2000000 pixels to 300000 pixels are divided into the fifth pixel number gear. It can be determined that the maximum number of pixels in the first grayscale interval is between 1000000 pixels and 2000000 pixels, that is, it belongs to the fourth pixel number gear. Therefore, the first number threshold corresponding to the fourth pixel number gear is used as the comparison threshold of the absolute value of the maximum pixel number difference in the first grayscale interval. Assuming that the first number threshold corresponding to the fourth pixel number gear is 70000, 1773510 is compared with 70000, and it can be determined that 1773510 is greater than 70000, that is, the absolute value of the maximum pixel number difference in the first grayscale interval is greater than the first number threshold. Therefore, the similarity parameter can be incremented by 1.

[0188] Taking the brightness histogram data of the fifth grayscale interval of the first frame display image and the brightness histogram data of the fifth grayscale interval of the second frame display image as an example, the grayscale value corresponding to the maximum number of pixels in the fifth grayscale interval of the first frame display image is 142, and the grayscale value corresponding to the maximum number of pixels in the fifth grayscale interval of the second frame display image is 154, which are inconsistent. At this time, it is determined that the maximum number of pixels in the fifth grayscale interval of the first frame display image and the fifth grayscale interval of the second frame display image is 63720. Assuming that the second number threshold is 60000, 63720 is greater than 60000, then the maximum number of pixels in the fifth grayscale interval of the first frame display image and the fifth grayscale interval of the second frame display image is greater than the second number threshold. Therefore, the absolute value of the grayscale value difference between the fifth grayscale interval of the first frame display image and the fifth grayscale interval of the second frame display image can be further determined. The absolute value of the grayscale value difference is 12. Assuming that the grayscale threshold is 10, the similarity parameter can be incremented by 1. Similarly, the similarity parameters of 8 grayscale intervals are obtained, and then the similarity parameters of the two frames of display images are obtained. The similarity parameters of the first frame of display image and the second frame of display image are compared with the similarity threshold. If the similarity parameters of the first frame of display image and the second frame of display image are greater than the similarity threshold, it can be determined that the first frame of display image and the second frame of display image are not similar.

[0189] For example, Figure 12 As shown, Figure 12 The figure shows the change process of the similarity parameters between each grayscale interval of the first frame display picture and the corresponding grayscale interval of the second frame display picture. Figure 12 It can be seen that the similarity parameter between the first display frame and the second display frame calculated through the above steps is 2. Assuming that the similarity threshold is 0, it can be determined that the first display frame and the second display frame are not similar.

[0190] When it is determined that the first frame display picture is not similar to the second frame display picture, it is possible to further determine whether the first frame display picture is similar to the third frame display picture. The determination method is the same as the method for determining the similarity between the first frame display picture and the second frame display picture, and this application will not elaborate on it here.

[0191] In a specific application, the initial value of the similarity parameter may be 0. The first preset increment and the second preset increment may be the same or different, and this application does not impose any specific limitation on this.

[0192] S43 : When a first target frame display picture is detected and a second target frame display picture exists between the first target frame display picture and the reference frame display picture, determining that a screen flash event occurs.

[0193] Among them, the first target frame display screen is a display screen similar to the reference frame display screen, and the second target frame display screen is a display screen that is dissimilar to the reference frame display screen. That is, among multiple consecutive display screens, it is detected that there is a display screen similar to the reference frame display screen, and there is also a display screen that is dissimilar to the reference frame display screen between the two, then it is determined that a screen flash event has occurred.

[0194] It is understandable that, in the case of a screen flash event, when there are multiple abnormal frames in the screen flash event, the display screen of the abnormal frames displayed in the display interface of the electronic device will be gradually changed. For example, Figure 13 In the four-frame flash screen event shown, the second and third frames are both abnormal frames, but the changes between the second and third frames are gradual. Figure 14 In the five-frame flash screen event shown, the second frame display picture, the third frame display picture and the fourth frame display picture are all abnormal frame display pictures, but the changes of the second frame display picture, the third frame display picture and the fourth frame display picture are gradual.

[0195] Based on this, in the case where there are multiple frames of second target frame display pictures between the reference frame and the first target frame display picture, the similarity of any two adjacent frames of the multiple frames of second target frame display pictures can also be detected. Since the change of the abnormal frame display picture is gradual, it can be determined that the difference between any two adjacent frames of the multiple frames of second target frame display pictures is relatively small. After the similarity judgment method provided in the embodiment of the present application is used, the similarity of the two adjacent frames of the second target frame display pictures can be judged as similar. Therefore, the flash screen event detection method provided in the embodiment of the present application can also be used as follows. Figure 15 As shown, Figure 6 Taking the five frames of display screen shown as an example, the screen flash event detection method provided in an embodiment of the present application may include:

[0196] S151: Detect whether the first frame display picture is similar to the second frame display picture, if not, execute S152.

[0197] It can be understood that if the first frame display screen is similar to the second frame display screen, it means that there is no abnormal frame between the first frame display screen and the second frame display screen. Then, after determining whether there is a flash screen event, when the brightness histogram data of the new display screen enters the brightness histogram data array, the brightness histogram data of the first frame display screen is deleted, and the second frame display screen is used as the reference frame display screen, and the brightness histogram data of the display screen after the fifth frame is obtained, and the relevant process of flash screen event detection is continued with the second frame display screen as the reference frame display screen. This application does not repeat this process.

[0198] S152: Detect whether the first frame display picture is similar to the third frame display picture. If so, feedback a three-frame flash screen event. If not, execute S153.

[0199] S153: Detect whether the first frame display picture is similar to the fourth frame display picture, if so, execute S154, if not, execute S155.

[0200] S154: Detect whether the second frame display image is similar to the third frame display image, and if so, feedback a four-frame flash screen event.

[0201] It is understandable that if the images of the two abnormal frames in the middle are not similar, other situations may occur instead of screen flicker. Therefore, the screen flicker event will not be reported to avoid false alarms. In this case, the brightness histogram data of the first to fourth display frames can be discarded, and the fifth display frame can be used as the reference frame for subsequent screen flicker event detection. This application does not repeat this process.

[0202] S155: Detect whether the first frame display picture is similar to the fifth frame display picture, if so, execute S126.

[0203] In a specific application, if the first frame display picture is still not similar to the fifth frame display picture, the brightness histogram data of the next frame display picture of the fifth frame (i.e., the sixth frame display picture) can be obtained, the brightness histogram data of the first frame display picture can be discarded, and the second frame display picture can be used as the reference frame display picture again to perform similarity detection, that is, compare the similarity of the second frame display picture with the third frame display picture. When the second frame display picture is similar to the third frame display picture, further compare the similarity of the second frame display picture with the fourth frame display picture, and so on. This application does not repeat this process.

[0204] S156: Detect whether the second frame display picture is similar to the third frame display picture, or detect whether the third frame display picture is similar to the fourth frame display picture. If so, feedback a five-frame flash screen event.

[0205] It is understandable that if any two adjacent display images in the three middle abnormal frames are dissimilar, other situations may occur instead of screen flicker. Therefore, the screen flicker event will not be fed back to avoid false alarms. In this case, the brightness histogram data of the first to fifth display frames can be discarded, and the subsequent screen flicker event detection can be performed using the display frame after the fifth display frame as the reference frame display frame. This application does not repeat this process.

[0206] In specific applications, when an electronic device detects a splash screen event, it can report the splash screen event so that the splash screen event processing module can process the splash screen event. For relevant content about how the splash screen event processing module processes the splash screen event, please refer to the existing splash screen event processing method, which will not be elaborated in this application.

[0207] From the above, it can be seen that the embodiment of the present application provides a method for detecting a flash screen event, which can determine the similarity between the reference frame and the comparison frame based on the brightness histogram data of multiple consecutive display screens. When there is a display screen similar to the reference frame display screen and there is a display screen between the two that is dissimilar to the reference frame display screen, that is, when there is a dissimilar display screen between two similar display screens, it is determined that a flash screen event has occurred, which can effectively improve the detection accuracy of the flash screen event and provide a basis for the processing of the flash screen event.

[0208] See also Figure 16 , Figure 16 FIG. 1 shows a schematic diagram of an implementation flow of a method for detecting a screen flash event provided by another embodiment of the present application. In the embodiment of the present application, the brightness characteristic parameter of the display screen may further include the pixel ratio of the display screen, such as Figure 16 As shown, after detecting a screen splash event, the screen splash event detection method provided in the embodiment of the present application further includes:

[0209] S161: Calculating the pixel ratio of the display image according to the brightness histogram of the display image.

[0210] The pixel ratio of the display screen can be calculated by counting the number of pixels corresponding to each grayscale of the display screen. Specifically, the pixel ratio of the display screen can be calculated using Formula 1:

[0211] R pixel =100*sum pixel / (P pixel *255) (1);

[0212] Among them, R pixel Indicates the pixel ratio of the display screen, sum pixel Represents the weighted sum of pixels in the display, P pixe Indicates the number of pixels on the display screen of an electronic device.

[0213] Among them, the weighted sum of pixels is sum pixel It can be calculated by formula 2:

[0214] sum pixel =0*P0+1*P1+…+255*P 255 (2);

[0215] Among them, P0 represents the number of pixels corresponding to grayscale 0, P1 represents the number of pixels corresponding to grayscale 1, and P 255 Indicates the number of pixels corresponding to 255 gray levels.

[0216] S162: Acquire the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture in the flash screen event.

[0217] The intermediate frame display picture may be any second target frame display picture between the reference frame display picture and the first target frame display picture.

[0218] For ease of description, the reference frame display screen is referred to as the previous frame display screen, and the first target frame display screen is referred to as the next frame display screen. It is understandable that in other implementations, the reference frame display screen may also be referred to as the next frame display screen, and the first target frame display screen may be referred to as the previous frame display screen, and this application does not impose any specific limitations on this.

[0219] It is understandable that if the screen flash event is a three-frame screen flash event, the pixel ratio corresponding to the three frames of display images can be obtained. If the screen flash event includes more than three frames of display images, any frame of display image in the middle abnormal frame can be selected as the middle frame display image. For example, for Figure 10 For the four-frame flash screen event shown in FIG, the second frame display picture can be selected as the middle frame display picture, or the third frame display picture can be selected as the middle frame display picture. Figure 11 For the five-frame flash screen event shown, the second frame display picture can be selected as the middle frame display picture, the third frame display picture can be selected as the middle frame display picture, and the fourth frame display picture can be selected as the middle frame display picture.

[0220] In a specific application, a 1*3 one-dimensional array can be set to store the pixel ratios of the three display frames to facilitate subsequent identification of the type of screen flash event. By comparing the pixel ratios of the display frames, the type of screen flash event can be determined, i.e., whether the screen flash event is a small flash event with a relatively small degree of flicker (the first screen flash event), a large flash event with a relatively large degree of flicker (the second screen flash event), or a false alarm.

[0221] S163: Determine whether the absolute value of the pixel ratio difference between the pixel ratio of the previous frame display picture and the pixel ratio of the next frame display picture is less than a first ratio threshold; if so, execute S134; if not, execute S135.

[0222] S164: Is the absolute value of the pixel ratio difference between the pixel ratio of the previous frame display picture and the pixel ratio of the intermediate frame display picture greater than the second ratio threshold? If so, determine that the splash screen event is the first splash screen event; if not, determine that it is a false alarm event.

[0223] S165: Determine whether the absolute value of the pixel ratio difference between the pixel ratio of the previous frame display picture and the pixel ratio of the next frame display picture is less than a third ratio threshold; if so, execute S136.

[0224] S166: Determine whether the absolute value of the pixel ratio difference between the pixel ratio of the previous frame display picture and the pixel ratio of the intermediate frame display picture is greater than a fourth ratio threshold; if so, determine that the screen flash event is a second screen flash event; if not, determine that it is a false alarm event.

[0225] It is understandable that the setting thresholds of the first ratio threshold and the second ratio threshold of the first screen flash event are relatively strict. For example, the first ratio threshold of the first screen flash event is 0.03%, and the second ratio threshold is 30%.

[0226] The setting thresholds of the third ratio threshold and the fourth ratio threshold of the second screen flash event are loose, for example, the third ratio threshold is 3%, and the fourth ratio threshold is 40%.

[0227] Assuming that the pixel ratio of the display screen of the previous frame is 45.6%, the pixel ratio of the display screen of the next frame is 45.8%, and the pixel ratio of the display screen of the intermediate frame is 88%, then the absolute value of the pixel ratio difference between the pixel ratio of the display screen of the previous frame and the pixel ratio of the display screen of the next frame is 0.2%, and the absolute value of the pixel ratio difference between the pixel ratio of the display screen of the previous frame and the pixel ratio of the display screen of the intermediate frame is 42.4%. Since 0.03%<0.2%<3% and 42.4%>40%, it can be determined that the flash screen event is the second flash screen event, that is, the degree of flicker is relatively large.

[0228] S167: In the case of a false alarm event, filtering the feedback data corresponding to the false alarm event.

[0229] In an embodiment of the present application, if the electronic device determines that a false alarm event exists based on the pixel ratio of the reference frame display screen, the pixel ratio of the intermediate frame display screen, and the pixel ratio of the first target frame display screen, the feedback data corresponding to the false alarm event can be filtered out and the false alarm event will not be fed back to reduce the waste of operating resources.

[0230] It should be noted that the first ratio threshold, the second ratio threshold, the third ratio threshold, and the fourth ratio threshold can be set according to actual application requirements, and the first ratio threshold is smaller than the third ratio threshold. It is understood that the setting of these parameters can be related to the number of pixels of the display screen of the electronic device.

[0231] From the above, it can be seen that the embodiment of the present application provides a method for detecting a flash screen event, which can detect the category of the flash screen event through the pixel ratio of the display image in the flash screen event, and can filter out false alarm events, thereby further improving the detection accuracy of the flash screen event.

[0232] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in a manner of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0233] In some embodiments, the electronic device may include a splash screen detection module, and the splash screen detection module executes the splash screen event detection method provided in any one of the above method embodiments to detect the splash screen event.

[0234] In the embodiment of the present application, the functional modules of the device for the audio channel switching method can be divided according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0235] Figure 17 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 17 As shown, the chip 170 includes one or more (including two) processors 1701 , a communication line 1702 , a communication interface 1703 and a memory 1704 .

[0236] In some embodiments, the memory 1704 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0237] The method described in the above embodiment of the present application can be applied to the processor 1701, or implemented by the processor 1701. The processor 1701 may be an integrated circuit chip with signal processing capabilities. During the implementation process, the steps of the execution method of the above-mentioned first device or second device can be completed by the hardware integrated logic circuit in the processor 1701 or the instructions in the form of software. The above-mentioned processor 1701 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1701 can implement or execute the various methods, steps and logic block diagrams provided in the embodiments of the present application.

[0238] The steps of the method provided in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1704, and the processor 1701 reads the information in the memory 1704 and completes the steps of the above method in combination with its hardware.

[0239] The processor 1701 , the memory 1704 , and the communication interface 1703 can communicate with each other via the communication line 1702 .

[0240] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.

[0241] The present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).

[0242] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part via software, hardware, firmware, or any combination thereof. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one location to another. The storage medium can be any target medium that can be accessed by a computer.

[0243] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using lasers.

[0244] The above combinations should also be included within the scope of computer-readable media. The above are only specific embodiments of this application, but the scope of protection of this application is not limited to them. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for detecting a screen flash event, characterized in that: include: Obtain brightness histogram data of N consecutive frames of display images on the display screen; where N is a positive integer greater than or equal to 3; Detecting similarity between a reference frame display image and a comparison frame display image based on brightness histogram data of the consecutive N frames of display images; the comparison frame display image is one or more frames of display images other than the reference frame display image in the consecutive N frames of display images; When a first target frame display screen is detected and a second target frame display screen exists between the first target frame display screen and the reference frame display screen, it is determined that a flash screen event occurs; wherein the first target frame display screen is a display screen similar to the reference frame display screen, and the second target frame display screen is a display screen dissimilar to the reference frame display screen.

2. The method for detecting a screen flash event according to claim 1, wherein: Detecting the similarity between the reference frame display picture and the comparison frame display picture based on the brightness histogram data of the consecutive N frames of display pictures includes: Extracting brightness characteristic parameters of the display image based on brightness histogram data of the display image, the brightness characteristic parameters including the maximum number of pixels of the display image in each grayscale interval and the grayscale value corresponding to the maximum number of pixels in each grayscale interval; The brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture are traversed to calculate the similarity between the reference frame display picture and the comparison frame display picture.

3. The method for detecting a screen flash event according to claim 2, wherein: Before extracting the display picture brightness characteristic parameter according to the brightness histogram data of the display picture, the method further includes: The brightness histogram data of the display screen is divided into a plurality of grayscale intervals according to a preset grouping rule, and the maximum number of pixels in each grayscale interval and the grayscale value corresponding to the maximum number of pixels are determined.

4. The method for detecting a screen flash event according to claim 3, wherein: The traversing the brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture to calculate the similarity between the reference frame display picture and the comparison frame display picture includes: Traversing the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the reference frame display image, and the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame display image; Comparing the maximum number of pixels in each grayscale interval of the reference frame display image with the maximum number of pixels in each grayscale interval of the comparison frame display image in the corresponding grayscale interval to obtain a maximum pixel number comparison result; Comparing the grayscale values of the maximum number of pixels in each grayscale interval of the reference frame display image with the grayscale values corresponding to the maximum number of pixels in each grayscale interval of the comparison frame display image in corresponding grayscale intervals to obtain a grayscale value comparison result; A similarity judgment result between the reference frame display image and the comparison frame display image is determined according to the maximum pixel number comparison result and the grayscale value comparison result.

5. The method for detecting a screen splash event according to any one of claims 2 to 4, wherein: The traversing the brightness characteristic parameters of the reference frame display picture and the brightness characteristic parameters of the comparison frame display picture to calculate the similarity between the reference frame display picture and the comparison frame display picture includes: Calculating the maximum number of pixels and the absolute value of the difference between the maximum number of pixels in the corresponding grayscale intervals of the reference frame display image and the comparison frame display image; For each grayscale interval, determining whether a grayscale value corresponding to a maximum number of pixels of the reference frame display image in the grayscale interval is consistent with a grayscale value corresponding to a maximum number of pixels of the comparison frame display image in the grayscale interval; When the grayscale values corresponding to the maximum number of pixels in the grayscale intervals corresponding to the reference frame display image and the comparison frame display image are consistent, determining the pixel number level at which the maximum number of pixels in the grayscale interval is located according to the maximum number of pixels corresponding to the grayscale interval; Determining a first quantity threshold according to the pixel quantity level; When the maximum number of pixels in the grayscale interval is greater than the first number threshold, the similarity parameter is increased by a first preset increment; When the grayscale values corresponding to the maximum number of pixels in the grayscale intervals of the reference frame display image and the comparison frame display image are inconsistent, the maximum number of pixels in the grayscale interval is greater than a second number threshold, and the absolute value of the grayscale difference is greater than the grayscale threshold, the similarity parameter is increased by a second preset increment; When the similarity parameter is greater than a similarity threshold, it is determined that the reference frame display picture is not similar to the comparison frame display picture.

6. The method for detecting a screen flash event according to any one of claims 1 to 5, wherein: When it is determined that a screen flash event occurs and there are multiple frames of second target frame display pictures between the reference frame display picture and the first target frame display picture, the method further includes: Calculating the similarity between any two adjacent frames of display pictures in the plurality of frames of second target frame display pictures; When any two adjacent display frames in the plurality of second target frame display frames are similar, it is determined that a screen flash event occurs.

7. The method for detecting a screen splash event according to any one of claims 1 to 6, wherein: The method further comprises: The pixel ratio of the display picture is calculated according to the brightness histogram of the display picture.

8. The method for detecting a screen splash event according to claim 7, wherein: After determining that a screen flash event occurs, the method further includes: Acquire the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture in the flash screen event; The type of the screen flash event is determined according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture.

9. The method for detecting a screen splash event according to claim 8, wherein: The determining the type of the screen splash event according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture includes: When the absolute value of the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the first target frame display screen is less than a first ratio threshold, and the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the intermediate frame display screen is greater than a second ratio threshold, the type of the splash screen event is determined to be a first splash screen event.

10. The method according to claim 9, characterized in that The determining the type of the screen splash event according to the pixel ratio of the reference frame display picture, the pixel ratio of the intermediate frame display picture, and the pixel ratio of the first target frame display picture includes: When the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the first target frame display screen is less than the third ratio threshold, and the absolute value of the pixel ratio difference between the pixel ratio of the reference frame display screen and the pixel ratio of the intermediate frame display screen is greater than the fourth ratio threshold, the type of the splash screen event is determined to be a second splash screen event.

11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the processor and the memory are coupled, and the memory is used to store a computer program. When the processor executes the computer program, the electronic device executes the method according to any one of claims 1 to 10.

12. A computer program product, characterized in that When the computer program product is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 10.

13. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, the processors are coupled to a memory, the memory is used to store computer program instructions, and the one or more processors are used to call computer instructions so that the electronic device executes the method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Video image blurred screen detection method and device, computer equipment and storage medium

    CN109996063A

  • Screen display detection method and device and storage medium

    CN115880202A

  • Blurred screen detection method, device and equipment and storage medium

    CN116245780A

  • Splash screen detection method and splash screen detection device

    CN117156210A

  • Display screen flicker detection

    US20240129637A1