A splash screen event detection method, electronic device and computer program product

By acquiring continuous frame brightness histogram data of electronic device displays and comparing the similarity between frames, the accuracy problem of electronic device flicker detection is solved, enabling timely identification and classification of flicker events and improving user experience.

CN120472790BActive Publication Date: 2026-05-19HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-16
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Screen flickering issues that may occur during the use of electronic devices can negatively impact user experience, and existing technologies struggle to accurately detect and address them.

Method used

By acquiring the brightness histogram data of N consecutive frames displayed on the screen, comparing the similarity between the baseline frame and the comparison frame, flickering events are detected. The type of flickering event is determined by using brightness feature parameters and pixel ratio, thereby improving detection accuracy.

Benefits of technology

It effectively improves the detection accuracy of splash screen events, can promptly identify and classify splash screen events, reduce false alarms, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472790B_ABST
    Figure CN120472790B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a flash screen event detection method, an electronic device and a computer program product, the method comprising: acquiring brightness histogram data of N consecutive 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 N consecutive frames of display pictures; the comparison frame display picture is one or more frames of display pictures other than the reference frame display picture in the N consecutive frames of display pictures; in the case that a first target frame display picture is detected and there is a second target frame display picture between the first target frame display picture and the reference frame display picture, it is determined that a flash screen event occurs; the detection accuracy of the flash screen event can be effectively improved, and a basis is provided for flash screen event processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method for detecting screen flickering events, an electronic device, and a computer program product. Background Technology

[0002] During use, electronic devices may experience screen flickering due to various reasons, such as system lag, screen brightness issues, inappropriate software configuration, hardware malfunctions, and driver configuration. Screen flickering can impact the user's visual experience and negatively affect the user's experience. Therefore, it is necessary to detect and resolve screen flickering issues in electronic devices promptly. Summary of the Invention

[0003] This application provides a method for detecting screen flickering events, an electronic device, and a computer program product, which can effectively improve the detection accuracy of screen flickering events and provide a basis for handling screen flickering events.

[0004] In a first aspect, embodiments of this application provide a method for detecting screen flickering events, comprising: acquiring luminance histogram data of N consecutive frames of displayed images on a display screen; wherein N is a positive integer greater than or equal to 3; detecting the similarity between a reference frame display image and a comparison frame display image based on the luminance histogram data of the N consecutive frames of displayed images; the comparison frame display image being one or more other frames of displayed images besides the reference frame display image in the N consecutive frames of displayed images; determining that a screen flickering event has occurred when a first target frame display image is detected and a second target frame display image exists between the first target frame display image and the reference frame display image; wherein the first target frame display image is a display image similar to the reference frame display image, and the second target frame display image is a display image dissimilar to the reference frame display image.

[0005] Here, when the electronic device performs screen flicker event detection, it can acquire the brightness histogram data of the display screen for a preset number of frames (N frames), and perform screen flicker event detection based on the brightness histogram data of the display screen for the preset number of frames. The electronic device can acquire the screen information of all the display screens displayed on the screen, which may include brightness histogram data. The brightness histogram data can reflect the distribution of the number of pixels corresponding to each gray level in the brightness channel Y of the display screen in the YUV color mode.

[0006] During the factory testing phase, electronic devices can run the screen flicker event detection function to detect and resolve screen flickering issues. Of course, during user operation, the electronic devices can also run the screen flicker event detection function and report detected flickering events for subsequent system updates and maintenance to address the problem.

[0007] It's understandable that electronic devices can automatically run screen flicker detection during operation, allowing them to monitor for flicker events in real time. Of course, users can also choose whether to enable screen flicker detection based on their specific needs.

[0008] Electronic devices can acquire the currently displayed screen (the current frame) and the N-1 frames preceding it to perform real-time flicker event detection. They can also detect whether flicker events occur during application based on historical display frames.

[0009] After an electronic device is powered on, it can record the brightness histogram data of each displayed screen. For example, it can save the data in an array used to record the brightness histogram data of N frames of the display screen. Based on the first-in-first-out data writing method, the data is written into the array, so that the display data (brightness histogram data) of the real-time display screen and the brightness histogram data of the previous N-1 frames of the display screen are recorded, so as to perform screen flicker event detection in real time.

[0010] The number of comparison frames can be determined based on the similarity comparison results. That is, when making a similarity judgment, the electronic device can select the required number of comparison frames based on the similarity judgment results.

[0011] The aforementioned reference frame display can be the earliest display image among N consecutive frames.

[0012] For example, the first frame is the earliest displayed frame, the second frame is the next frame after the first frame, the third frame is the next frame after the second frame, and so on, with the fifth frame being the next frame after the fourth frame. In this case, the first frame can be determined as the reference frame.

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

[0014] For example, an electronic device can compare the similarity between a first frame and a second frame. If the comparison shows the first and second frames are dissimilar, it can further compare the similarity between the first and third frames. If the first and third frames are similar, it can be determined that there is an abnormal second frame between the first and third frames (i.e., an abnormal frame), thus identifying a screen flickering event (referred to as a three-frame flickering event). In this case, the number of comparison frames is two: the reference frame is compared with the second frame, and then with the third frame.

[0015] Using the first frame as the baseline frame, and assuming that the first frame is dissimilar to the second and third frames, the similarity between the first and fourth frames is further compared. If the first and fourth frames are similar, it can be determined that there are two abnormally displayed frames (the second and third frames) between the first and fourth frames, thus confirming a screen flickering event (referred to as a four-frame flickering event). In this case, the number of comparison frames is three: the baseline frame is compared with the second, third, and fourth frames for similarity assessment.

[0016] Using the first frame as the baseline frame, and assuming that the first frame is dissimilar to the second, third, and fourth frames, a further comparison can be made between the first and fifth frames. If the first and fifth frames are similar, it can be determined that there are three abnormally displayed frames (the second, third, and fourth frames) between the first and fifth frames, thus confirming a screen flickering event. In this case, the number of comparison frames is four: the baseline frame is compared with the second, third, fourth, and fifth frames for similarity assessment.

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

[0018] It should also be noted that if the first frame and the fifth frame are still dissimilar, the brightness histogram data of the next frame (i.e., the sixth frame) can be obtained, the brightness histogram data of the first frame can be discarded, and the second frame can be used as the reference frame for similarity detection. That is, the similarity between the second frame and the third frame can be compared. If the second frame and the third frame are similar, the similarity between the second frame and the fourth frame can be further compared, and so on.

[0019] It is understood that the above is just an example of detecting screen flicker events using N=5, that is, using the brightness histogram data of 5 consecutive frames of display. It is an exemplary description of the process of detecting the similarity between the reference frame display and the non-reference frame display. When the electronic device chooses to use the brightness histogram data of 6 consecutive frames of display, 7 consecutive frames of display, etc., as needed to detect screen flicker events, it can determine whether a screen flicker event has occurred based on the similarity detection method of the above embodiment.

[0020] As can be seen from the above, the embodiments of this application determine the similarity between the reference frame and the comparison frame by using the brightness histogram data of multiple consecutive display screens. When there is a display screen similar to the reference frame and there is a display screen that is not similar to the reference frame, i.e., there is a dissimilar display screen between two similar display screens, the occurrence of a screen flickering event can be determined. This can effectively improve the detection accuracy of screen flickering events and provide a basis for screen flickering event processing.

[0021] In one possible implementation, the similarity between the reference frame and the comparison frame is detected based on the luminance histogram data of N consecutive frames, including:

[0022] Based on the brightness histogram data of the display screen, the brightness feature parameters of the display screen are extracted. The brightness feature parameters include the maximum number of pixels in each grayscale range of the display screen, and the grayscale value corresponding to the maximum number of pixels in each grayscale range.

[0023] Iterate through the brightness characteristic parameters of the reference frame and the comparison frame, and calculate the similarity between the reference frame and the comparison frame.

[0024] In one possible implementation, before extracting the brightness feature parameters of the displayed image based on the brightness histogram data, the following steps are also included:

[0025] The brightness histogram data of the display screen will be 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 will be determined.

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

[0027] In practical applications, the brightness histogram data acquired by the electronic device can be 1 A one-dimensional array of 256 can be transformed into a two-dimensional array by dividing the brightness histogram data of the display screen into a preset number of grayscale intervals. For example, dividing the brightness histogram data corresponding to one frame of the display screen into 8 grayscale intervals will yield 8... 32 two-dimensional data; for example, if the brightness histogram data corresponding to a frame of a display image is divided into 16 grayscale intervals, then 16 can be obtained. A 2D array of 16.

[0028] In one possible implementation, the brightness feature parameters of the reference frame and the comparison frame are traversed to calculate the similarity between the reference frame and the comparison frame, including:

[0029] Iterate through the maximum number of pixels and the corresponding grayscale value of each grayscale interval in the display of the reference frame, and compare it with the maximum number of pixels and the corresponding grayscale value of each grayscale interval in the display of the comparison frame.

[0030] The maximum number of pixels in each grayscale interval of the reference frame is compared with the maximum number of pixels in each grayscale interval of the comparison frame to obtain the maximum pixel count comparison result.

[0031] The grayscale values ​​of the maximum number of pixels in each grayscale interval of the reference frame display are compared with the grayscale values ​​of the maximum number of pixels in each grayscale interval of the comparison frame display to obtain the grayscale value comparison results.

[0032] The similarity judgment result between the reference frame display and the comparison frame display is determined based on the comparison results of the maximum number of pixels and the grayscale value.

[0033] Thus, after obtaining the maximum number of pixels in each grayscale interval of the N consecutively displayed frames, 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 is traversed, and the maximum number of pixels in each grayscale interval of the reference frame is compared with the maximum number of pixels in each grayscale interval of the comparison frame. The grayscale value corresponding to the maximum number of pixels in each grayscale interval of the reference frame is compared with the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame. Thus, the similarity judgment result between the reference frame and the comparison frame is obtained.

[0034] In one possible implementation, the brightness feature parameters of the reference frame and the comparison frame are traversed to calculate the similarity between the reference frame and the comparison frame, including:

[0035] Calculate the absolute value of the difference between the maximum number of pixels in the corresponding grayscale range between the baseline frame and the comparison frame;

[0036] For each grayscale range, determine whether the grayscale value corresponding to the maximum number of pixels in the grayscale range of the reference frame display is consistent with the grayscale value corresponding to the maximum number of pixels in the grayscale range of the comparison frame display.

[0037] When the grayscale values ​​corresponding to the maximum number of pixels in the grayscale range of the reference frame and the comparison frame are the same, the pixel count level of the maximum number of pixels in the grayscale range is determined according to the maximum number of pixels in the grayscale range.

[0038] Determine the first quantity threshold based on the pixel quantity level;

[0039] If the absolute value of the difference between the maximum number of pixels in the grayscale range is greater than the first number threshold, the similarity parameter is increased by a first preset increment.

[0040] If the grayscale values ​​corresponding to the maximum number of pixels in the grayscale range of the reference frame display and the comparison frame display are inconsistent, the maximum number of pixels in the grayscale range is greater than the second quantity threshold, and the absolute value of the grayscale difference is greater than the grayscale threshold, the similarity parameter is increased by the second preset increment.

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

[0042] Each pixel count level has its corresponding first count threshold, and the first count thresholds for different pixel count levels can be the same or different.

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

[0044] In one possible implementation, when it is determined that a screen flickering event has occurred and there are multiple frames of the second target frame displayed between the reference frame and the first target frame, the method further includes:

[0045] Calculate the similarity between any two adjacent frames in the display of the second target frame in a multi-frame display.

[0046] If any two adjacent frames in the multi-frame second target frame display are similar, a screen flickering event is determined to exist.

[0047] In the case where there are multiple second target frame displays between the reference frame and the first target frame display, the similarity between any two adjacent second target frame displays can also be detected. Since the changes in abnormal frame displays are gradual, it can be determined that the differences between any two adjacent second target frame displays are relatively small. Through the similarity judgment method provided in this application embodiment, the similarity between two adjacent second target frame displays can be judged as similar. By comparing whether any two adjacent second target frame displays are similar, non-flicker events can be eliminated, reducing false alarms.

[0048] In one possible implementation, the method further includes: calculating the pixel ratio of the displayed image based on the brightness histogram of the displayed image.

[0049] The pixel ratio of a display screen can be calculated by statistically analyzing the number of pixels corresponding to each gray level. 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 The sum represents the pixel ratio of the displayed image. pixel P represents the weighted sum of the pixels displayed on the screen. pixe This indicates the number of pixels on the display screen of an electronic device.

[0052] Wherein, the pixel-weighted sum sum pixel It can be calculated using Formula 2:

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

[0054] Where P0 represents the number of pixels corresponding to gray level 0, P1 represents the number of pixels corresponding to gray level 1, P 255 This indicates the number of pixels corresponding to grayscale level 255.

[0055] In one possible implementation, after determining that a screen flickering event has occurred, the method further includes:

[0056] Obtain the pixel ratio of the base frame, the pixel ratio of the intermediate frame, and the pixel ratio of the first target frame in the splash screen event;

[0057] The type of screen flicker event is determined based on the pixel ratio of the base frame, the pixel ratio of the intermediate frame, and the pixel ratio of the first target frame.

[0058] The intermediate frame display can be any frame between the reference frame display and the first target frame display, which is the second target frame display.

[0059] Understandably, if the screen flicker event is a three-frame flicker event, the pixel ratio corresponding to these three frames can be obtained. If the screen flicker event includes more than three frames, any one of the intermediate abnormal frames can be selected as the intermediate display frame. For example, for... Figure 10 The four-frame flicker event shown allows you to select either the second or third frame as the intermediate display frame. For example, regarding events like... Figure 11 The five-frame flashing event shown can be used to select the second frame, the third frame, or the fourth frame as the middle frame.

[0060] In practical applications, a value of 1 can be set. A one-dimensional array of 3 is used to store the pixel ratios of the three displayed frames, so as to identify the type of subsequent screen flickering events. By comparing the pixel ratios of the displayed frames, the type of screen flickering event can be determined, that is, whether the screen flickering event is a small flickering event with a relatively small degree of flickering (the first screen flickering event), a large flickering event with a relatively large degree of flickering (the second screen flickering event), or a false alarm.

[0061] In one possible implementation, the type of screen flicker event is determined based on the pixel ratio of the base frame, the pixel ratio of the intermediate frames, and the pixel ratio of the first target frame, including:

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

[0063] In one possible implementation, the type of screen flicker event is determined based on the pixel ratio of the base frame, the pixel ratio of the intermediate frames, and the pixel ratio of the first target frame, including:

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

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

[0066] In a second aspect, embodiments of this application provide an electronic device, one or more processors, and a memory coupled to one or more processors. The memory is used to store computer program code, which includes computer instructions. One or more processors invoke the computer instructions to cause the electronic device to perform the method described in any of the first aspects above.

[0067] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in any of the first aspects above.

[0068] Fourthly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the method as described in any of the first aspects.

[0069] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute any of the methods described in the first aspect.

[0070] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0071] Figure 1 This is a schematic diagram illustrating a screen flickering phenomenon.

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

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

[0074] Figure 4 A schematic diagram illustrating the implementation process of a screen flicker event detection method provided in an embodiment of this application;

[0075] Figure 5 This is a schematic diagram of the display screen of an electronic device in the application scenario involved in the embodiments of this application;

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

[0077] Figure 7 The specific detection process for detecting the reference frame display and the comparison frame display based on the brightness histogram data in the flicker event detection method provided in this application embodiment;

[0078] Figure 8 This is a schematic diagram of the maximum number of pixels and the grayscale value corresponding to the maximum number of pixels in each grayscale region after dividing the brightness histogram data of five consecutive display screens provided in the embodiments of this application into grayscale regions.

[0079] Figure 9 This is a schematic diagram illustrating the specific implementation process of similarity judgment between two display frames in the screen flicker event detection method of this application embodiment;

[0080] Figure 10 A schematic diagram illustrating the processing of data in the first grayscale range of the first frame of the display screen and data in the first grayscale range of the second frame of the display screen, as provided in the embodiments of this application.

[0081] Figure 11 A schematic diagram illustrating the processing of data in the fifth grayscale range of the first frame and data in the fifth grayscale range of the second frame provided in this embodiment of the application;

[0082] Figure 12A schematic diagram illustrating the calculation process of similarity parameters between the corresponding grayscale intervals of the first and second frame display images provided in the embodiments of this application;

[0083] Figure 13 A schematic diagram of a four-frame flashing event display provided in an embodiment of this application;

[0084] Figure 14 A schematic diagram of a five-frame flashing event display provided in an embodiment of this application;

[0085] Figure 15 A schematic diagram illustrating the implementation process of another screen flicker event detection method provided in this application embodiment;

[0086] Figure 16 A schematic diagram illustrating the implementation process of another screen flicker event detection method provided in this application embodiment;

[0087] Figure 17 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

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

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

[0090] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single 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, and c can be single or multiple.

[0091] During use, electronic devices may experience screen flickering due to various reasons, such as system lag, screen brightness issues, inappropriate software configuration, hardware malfunctions, and driver configuration. Screen flickering can impact the user's visual experience and negatively affect the user's experience. Therefore, it is necessary to detect and resolve screen flickering issues in electronic devices promptly.

[0092] In this embodiment, screen flickering refers to the occurrence of abnormal frames when an electronic device displays a continuous image. Due to the persistence of vision in the human eye, gradually changing image frames form a coherent picture in the brain, creating a good viewing experience. Sudden flashing of abnormal image frames in a continuous image can cause visual discomfort, and if abnormal frames suddenly flash while displaying a continuous image, it will create a feeling of disjointedness.

[0093] For example, taking a mobile phone as an electronic device, please refer to... Figure 1 , Figure 1 This is a diagram illustrating a screen flickering event on an electronic device's display interface, such as... Figure 1 As shown, Figure 1 The screen displayed in (a) and Figure 1 The interface shown in (c) is a normally displayed continuous screen. Figure 1 In the interface shown in (b), a half-black screen appears. Figure 1 The screen displayed in (b) is an abnormal frame. The appearance of an abnormal frame will cause the originally continuous screen to feel unsmooth, which will impact the user's vision and affect the user experience.

[0094] Understandably, in screen flickering, the number of abnormal frames appearing in two consecutive frames is not fixed. Figure 1This example only illustrates the case where there is one abnormal frame between two consecutive frames. The number of abnormal frames that appear between two consecutive frames can also be 2, 3, 4, etc. This application does not impose any specific restrictions on this.

[0095] Since screen flickering can impact a user's visual experience and negatively affect their overall experience, accurately detecting screen flickering during use is crucial for subsequent flicker event handling. Therefore, this application provides a screen flicker event detection method, electronic device, and computer program product. By acquiring luminance histogram data from multiple consecutive display frames of the electronic device, and determining the similarity between a reference frame and a comparison frame based on this data, the existence of a screen flicker event can be detected. This effectively improves the accuracy of screen flicker event detection and provides a basis for screen flicker event handling.

[0096] The method for detecting screen flickering events provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. In the following description, specific details such as specific system structures and technologies are presented for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of this application.

[0097] In some embodiments, the execution subject of the above-described screen flicker event detection method can be an electronic device. The aforementioned electronic device can also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device can be a mobile phone, smart TV, wearable device (e.g., smart bracelet, smartwatch, smart glasses), tablet computer, computer with wireless transceiver function, virtual reality (VR) electronic device, augmented reality (AR) electronic device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in transportation safety, and wireless terminal in smart city. The embodiments of this application do not limit the specific technology or specific device form used in the electronic device.

[0098] To better understand the embodiments of this application, the structure of the electronic device of this application is described below:

[0099] Figure 2A schematic diagram of the structure of the electronic device 100 is shown. For example... Figure 2 As 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, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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 is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0101] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0102] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

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

[0104] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0105] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit 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, etc.

[0106] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0107] Electronic device 100 implements audio functions through a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor. Examples include music playback, audio capture, and recording.

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

[0109] Display screen 194 is used to display images, videos, etc. 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 (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, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. In some embodiments, electronic device 100 can acquire display data of the image displayed on the display screen, such as histogram data of the image displayed on the display screen (referred to as the display image).

[0110] Here is an explanation of histograms:

[0111] A histogram is a statistical tool used to understand the distribution of color levels across different channels of an image. The horizontal axis of the histogram represents the 256 color levels from 0 to 255, while the vertical axis represents the number of pixels corresponding to each color level value.

[0112] Histograms include histograms of single color channels, histograms of composite channels, histograms of luminance, and histograms of color.

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

[0114] The aforementioned composite channel histogram refers to a histogram obtained by simply summing the R, G, and B color channels and then counting the number of pixels corresponding to each color level. It can be understood that in the composite channel histogram, the sum of the number of pixels corresponding to all color levels is three times the total number of pixels in the entire image.

[0115] A luminance histogram is a grayscale histogram of the luminance (Y) of an image in the YUV color mode. In the luminance histogram, the sum of the number of pixels corresponding to all grayscale levels is equal to the total number of pixels in the entire image.

[0116] In a luminance histogram, the horizontal axis represents luminance values, corresponding to 0-255 luminance levels (also known as grayscale). A higher luminance value indicates greater brightness. 0 represents the darkest area, pure black, and 255 represents the brightest pure white; the values ​​in between represent different shades of gray. The vertical axis represents the number of pixels corresponding to each luminance value.

[0117] A color histogram can be another form of composite channel histogram. It is created by displaying each of the three color channels using its primary color and then layering them using a color filter blending method to obtain a color level histogram. It's understood that in a color histogram, the total number of pixels corresponding to all color levels is three times the total number of pixels in the entire image.

[0118] In one embodiment of this application, the histogram data of the display screen obtained by the electronic device 100 may specifically refer to the aforementioned 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 luminance histogram data corresponding to each frame of the display screen based on the image information of each frame displayed on the screen. The electronic device 100 can then read the luminance histogram data corresponding to each frame of the display screen from the processor and further perform flicker detection based on the luminance histogram data of multiple consecutive frames of the display screen. The content of flicker detection will be described in subsequent method embodiments and will not be repeated here.

[0120] Understandably, the electronic device 100 can also perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor.

[0121] The electronic device 100 having the above-described hardware structure can employ a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc., in its software system. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the electronic device 100.

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

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

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

[0125] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes predefined functions, such as an 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 consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

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

[0129] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. It can include surface managers, 3D graphics processing libraries, 2D graphics engines, and more.

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

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

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

[0133] The flicker event detection method provided in this application will be illustrated below with reference to the accompanying drawings and through several exemplary embodiments. The methods in the following embodiments can all be implemented in an electronic device having the above-described hardware structure and software architecture. The hardware structure of the electronic device can be as follows: Figure 2 As shown, the software structure block diagram of an electronic device can be as follows: Figure 3 As shown, the embodiments of this application are not limited to this. For ease of explanation, the embodiments of this application all use electronic devices as examples. Figure 2 Take the electronic device shown as an example.

[0134] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the implementation process of screen flicker event detection provided in an embodiment of this application, as shown below. Figure 4 As shown, the above-mentioned screen flickering event detection method may include the following steps:

[0135] S41: Obtain the brightness histogram data of N consecutive frames displayed on the screen.

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

[0137] In this embodiment, the processing chip of the electronic device can extract the brightness histogram data of each display frame shown on the screen. During the operation of the screen flicker event detection function, the electronic device can obtain the brightness histogram data of each display frame displayed on the screen for N consecutive frames extracted by the processing chip. Here, N is a positive integer greater than or equal to 3.

[0138] In some embodiments, when performing screen flicker event detection, the electronic device can acquire luminance histogram data of a preset number of frames (N frames) of displayed images, and perform screen flicker event detection based on the luminance histogram data of the preset number of frames. The preset number of frames can be set according to actual application requirements, and the preset number of frames is greater than 3, meaning the electronic device acquires luminance histogram data of at least 3 consecutively displayed frames. For example, the electronic device can acquire luminance histogram data of 5 frames or 7 frames.

[0139] It should be noted that the continuous multi-frame display in this embodiment does not mean that the content of these multiple display frames is continuous, but rather that these multiple display frames are displayed sequentially on the display screen. The content of the continuous multi-frame display can be continuous or discontinuous. For example, as shown... Figure 5 As shown, the first to fifth frames are displayed sequentially on the display interface. The content of the first frame is continuous with that of the third frame, but the content of the first frame is dissimilar to that of the second frame. The half-black screen displayed in the second frame is an abnormal frame.

[0140] In some embodiments of this application, the screen flickering event detection function can be run during the factory testing phase of the electronic device to detect screen flickering events, facilitating the location, analysis, and resolution of screen flickering problems. Alternatively, the screen flickering event detection function can be run during user operation, and detected screen flickering events can be reported for subsequent system updates and maintenance to address the screen flickering issue.

[0141] It is understood that electronic devices can automatically run screen flicker detection during operation, allowing them to detect the presence of screen flicker events in real time. Of course, users can also choose whether to activate the screen flicker detection function based on their operational needs; this application does not impose specific restrictions on this.

[0142] It is also understandable that electronic devices can acquire the currently displayed screen (the current frame) and the N-1 frames preceding it to perform real-time flicker event detection. They can also detect whether flicker events occur during application based on historical display frames.

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

[0144] S42, detect the similarity between the display of the reference frame and the display of the comparison frame based on the brightness histogram data.

[0145] The aforementioned comparison frame display screen refers to the other frames displayed in the N consecutive frame display screens besides the reference frame display screen. The number of comparison frame display screens can be determined according to the similarity comparison results. That is, when the electronic device performs similarity judgment, it can select the required number of comparison frames according to the similarity judgment results.

[0146] In one embodiment of this application, the aforementioned reference frame display image can be the earliest displayed image among N consecutive display frames. For example, as shown... Figure 6 As shown, Figure 6 The image shows multiple frames of continuous display on the screen. The first frame is the earliest displayed frame, the second frame is the next frame after the first frame, the third frame is the next frame after the second frame, and so on. The fifth frame is the next frame after the fourth frame. The first frame is then determined as the reference frame.

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

[0148] For example, with Figure 6 Taking the displayed screen as an example, Figure 7 This illustration shows the specific detection process of the flicker event detection method provided in this application, which involves detecting the display screen of the reference frame and the display screen of the comparison frame based on the brightness histogram data. Figure 7 As shown in (a), the electronic device can compare the similarity between the first and second displayed frames. Assuming the comparison result shows the first and second frames are dissimilar, it further compares the similarity between the first and third displayed frames. If the first and third frames are similar, it can be determined that there is an abnormal second frame between the first and third frames (i.e., an abnormal frame display), thus identifying a screen flickering event (referred to as a three-frame flickering event). In this case, the number of comparison frames is two: the reference frame is compared with the second frame, and then with the third frame. In this scenario, the electronic device can send relevant image information from the first, second, and third frames to the screen flickering event processing module for processing.

[0149] like Figure 7 As shown in (b), with the first frame as the reference frame, and the first frame dissimilar to the second and third frames, the similarity between the first and fourth frames is further compared. If the first and fourth frames are similar, it can be determined that there are two abnormally displayed frames (the second and third frames) between the first and fourth frames, thus confirming a screen flickering event (referred to as a four-frame flickering event). In this case, the number of comparison frames is three, meaning the reference frame is compared with the second, third, and fourth frames for similarity assessment. In this scenario, the electronic device can send relevant screen information (such as display time, brightness histogram information, associated scenes, etc.) of the first, second, third, and fourth frames to the screen flickering event processing module for processing the four-frame flickering event.

[0150] like Figure 7 As shown in (c), when the first frame is used as the reference frame, and the first frame is dissimilar to the second, third, and fourth frames, the similarity between the first and fifth frames can be further compared. If the first and fifth frames are similar, it can be determined that there are three abnormally displayed frames (the second, third, and fourth frames) between the first and fifth frames, thus confirming a screen flickering event. In this case, the number of comparison frames is four, meaning the reference frame is compared with the second, third, fourth, and fifth frames respectively for similarity judgment. In this case, the electronic device can send relevant screen information of the first, second, third, fourth, and fifth frames to the screen flickering event processing module so that the module can process the five screen flickering events.

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

[0152] It should also be noted that if the first frame and the fifth frame are still dissimilar, the brightness histogram data of the next frame (i.e., the sixth frame) can be obtained, the brightness histogram data of the first frame can be discarded, and the second frame can be used as the reference frame for similarity detection. That is, the similarity between the second frame and the third frame can be compared. If the second frame and the third frame are similar, the similarity between the second frame and the fourth frame can be further compared, and so on.

[0153] It is understood that the above is only an example of detecting screen flicker events by using N=5, that is, the electronic device performs flicker event detection based on the brightness histogram data of 5 consecutive frames of display. It is an exemplary description of the process of detecting the similarity between the reference frame display and the non-reference frame display. When the electronic device selects to perform flicker event detection based on the brightness histogram data of 6 consecutive frames of display, 7 consecutive frames of display, etc., as needed, it can determine whether a flicker event has occurred based on the similarity detection method of the above embodiment. This application will not elaborate further on this.

[0154] It is understandable that the choice of the reference frame can be made according to actual needs. The above example of using the earliest displayed image in N consecutive frames as the reference frame is just one example.

[0155] In this embodiment of the application, the electronic device can determine the similarity between the reference frame display and the comparison frame display by using the brightness histogram data of the display screen.

[0156] In one embodiment of this application, the above-mentioned S42 may specifically include the following steps:

[0157] S421: Extract the brightness feature parameters of the display screen based on the obtained brightness histogram data of the display screen.

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

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

[0160] In practical applications, the brightness histogram data acquired by the electronic device can be 1 A one-dimensional array of 256 can be transformed into a two-dimensional array by dividing the brightness histogram data of the display screen into a preset number of grayscale intervals. For example, dividing the brightness histogram data corresponding to one frame of the display screen into 8 grayscale intervals will yield 8... 32 two-dimensional data; for example, if the brightness histogram data corresponding to a frame of a display image is divided into 16 grayscale intervals, then 16 can be obtained. A 2D array of 16.

[0161] It is understandable that electronic devices can perform the above-mentioned splitting operation on all the acquired multi-frame continuous display images to obtain a two-dimensional array corresponding to each display image.

[0162] After dividing the brightness histogram data into multiple grayscale intervals according to preset grouping rules, 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, such as Figure 8 As shown, assuming the brightness histogram data of each display frame is divided into 8 grayscale intervals, the maximum number of pixels and the grayscale value of the maximum number of pixels are determined in each of the 8 grayscale intervals. Assuming the electronic device acquires 5 consecutively displayed frames, performing grayscale interval division and maximum pixel count extraction operations on each of these 5 frames will yield the following results: Figure 8 The diagram shows the brightness characteristic parameters of the displayed image.

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

[0165] S422: Traverse the brightness characteristic parameters of the reference frame display and the comparison frame display, and calculate the similarity between the reference frame display and the comparison frame display.

[0166] In this embodiment, after obtaining the maximum number of pixels in each grayscale interval of the N consecutively displayed frames 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 is traversed, and the maximum number of pixels in each grayscale interval of the reference frame is compared with the maximum number of pixels in each grayscale interval of the comparison frame. The grayscale value corresponding to the maximum number of pixels in each grayscale interval of the reference frame is compared with the grayscale value corresponding to the maximum number of pixels in each grayscale interval of the comparison frame. Thus, the similarity judgment result between the reference frame and the comparison frame is obtained.

[0167] For example, assuming the brightness histogram data of each display screen 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 screen is compared with the maximum number of pixels in the first grayscale interval (0-31) of the comparison frame display screen; the grayscale value corresponding to the maximum number of pixels in the first grayscale interval (0-31) of the reference frame display screen 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 screen; the maximum number of pixels in the second grayscale interval (32-63) of the reference frame display screen is compared with the maximum number of pixels in the second grayscale interval (32-63) of the comparison frame display screen. The maximum number of pixels in the second grayscale interval (32-63) of the reference frame is compared with the maximum number of pixels in the second grayscale interval (32-63) of the comparison frame. This process is repeated 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.

[0168] After obtaining the comparison results corresponding to each grayscale interval, the similarity between the reference frame display and the comparison frame display can be 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 reference frame display and the comparison frame display can be compared to see if 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 reference frame display and the comparison frame display 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 reference frame display and the comparison frame display exceeds the grayscale threshold, the similarity parameter is increased by a second preset increment.

[0170] By traversing the maximum number of pixels and the corresponding grayscale value in each grayscale interval of the reference frame display, and the maximum number of pixels and the corresponding grayscale value in each grayscale interval of the comparison frame display, the final similarity parameter is calculated. Based on the similarity parameter, the similarity between the reference frame display and the comparison frame display is determined. For example, if the similarity parameter exceeds the similarity threshold, the reference frame display and the comparison frame display are determined to be dissimilar; if the similarity parameter does not exceed the similarity threshold, the reference frame display and the comparison frame display are determined to be similar.

[0171] It is understood 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 this application do not impose specific restrictions on this.

[0172] In some embodiments, to improve the accuracy of similarity judgment, the number of pixels can be divided into levels 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 can be divided into the first pixel level, 20,000 to 500,000 pixels into the second pixel level, 5,000,000 to 1,000,000 pixels into the third pixel level, 1,000,000 to 2,000,000 pixels into the fourth pixel level, and 2,000,000 to 300,000 pixels into the fifth pixel level. Then, different pixel level corresponds to different number thresholds.

[0173] It is understood that the threshold values ​​corresponding to the different pixel count levels mentioned above can be set according to actual application needs, and this application does not impose specific restrictions on this. How the pixel count is categorized can also be set according to actual application needs; the above are merely examples and not limitations. Different categorizations can be made for the display capabilities of different electronic devices, and this application does not impose specific restrictions on this.

[0174] Please see Figure 9 , Figure 9 This illustrates the specific implementation process for similarity determination between two displayed frames. Here, we use... Figure 8 Taking the brightness characteristic parameters of the displayed image as an example, and using the first and second frames of the displayed image as examples, the process of judging the similarity of the displayed images is illustrated. Figure 9 As shown, the similarity judgment process is as follows:

[0175] In S91, the maximum number of pixels in the corresponding grayscale range between the first and second displayed frames 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 displayed frames as an example, the maximum number of pixels in the first grayscale interval of the first frame is 1,797,810, and the maximum number of pixels in the first grayscale interval of the second frame is 24,300. Calculating the absolute value of the difference between the two, we get 177,3510. Therefore, the maximum number of pixels in the first grayscale interval of these two frames is 179,7810, and the absolute value of the difference in the maximum number of pixels is 177,3510. The maximum number of pixels in the second grayscale interval of the first frame is 390, and the maximum number of pixels in the second grayscale interval of the second frame is 1661. Calculating the absolute value of the difference between the two, we get 1271. Therefore, the maximum number of pixels in the second grayscale interval of these two frames is 1661, and the absolute value of the difference in the maximum number of pixels is 1271. And so on, we can obtain the maximum number of pixels and the absolute value of the difference in the maximum number of pixels in the corresponding grayscale intervals of the first and second frames.

[0177] For example, please refer to Figure 10 , Figure 10 Taking the data from the first grayscale range of the first frame and the first grayscale range of the second frame as examples, this paper illustrates the process by which an electronic device determines the maximum number of pixels corresponding to a grayscale range, the absolute value of the difference between the maximum number of pixels, and the grayscale difference threshold. Figure 10 As shown, the electronic device reads the grayscale values ​​index11 and MAX11 corresponding to the maximum number of pixels in the first grayscale interval of the first frame of the display image, and the grayscale values ​​index12 and MAX12 corresponding to the maximum number of pixels in the second grayscale interval of the second frame of the display image. The values ​​read are 0 for index11 and 0 for index12, 1797810 for MAX11 and 24300 for MAX12. Since index11 and index12 are the same, it can be determined that the absolute value of the grayscale difference between the first grayscale intervals of the first and second frames of the display image is 0; the maximum number of pixels maxValue is 1797810 and the absolute value of the difference in the maximum number of pixels absValue is 1773510.

[0178] For another example, please refer to Figure 11 , Figure 11 Taking the data from the fifth grayscale interval of the first frame and the data from the first grayscale interval of the second frame as examples, this paper illustrates the process by which an electronic device determines the maximum number of pixels corresponding to a grayscale interval, the absolute value of the difference between the maximum number of pixels, and the grayscale difference threshold. Figure 11As shown, the electronic device reads the grayscale values ​​index51 and MAX51 corresponding to the maximum number of pixels in the fifth grayscale interval of the first frame, and the grayscale values ​​index52 and MAX52 corresponding to the maximum number of pixels in the second grayscale interval of the second frame. The values ​​read are 154 for index51, 142 for index52, 63720 for MAX51, and 23189 for MAX52. It can be determined that the absolute value of the grayscale difference between the fifth grayscale interval of the first and second frames is 12, and the maximum number of pixels is 63720.

[0179] In S92, compare whether the grayscale values ​​corresponding to the maximum number of pixels in the grayscale range of the first frame and the second frame are consistent. If yes, then execute S93; otherwise, execute S94.

[0180] In S93, the pixel count level is determined based on the maximum number of pixels in the grayscale range, the first number threshold corresponding to the pixel count level is obtained, and it is determined whether the absolute value of the difference between the maximum number of pixels in the grayscale range is greater than the first number threshold.

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

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

[0183] It is understood that each pixel count level has its corresponding first count threshold, and the first count thresholds corresponding to different pixel count levels can be the same or different. This application does not impose any specific restrictions on this.

[0184] In S94, the absolute value of the gray level difference is calculated, and it is determined whether the maximum number of pixels in the gray level range is greater than the 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 gray level difference is greater than the gray level 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 the actual application. For example, if it is set to 1, then when the maximum number of pixels in the grayscale range is greater than the second quantity threshold and the absolute value of the grayscale difference is greater than the grayscale threshold, the similarity parameter between the first frame and the second frame will increment by 1.

[0187] For example, the grayscale value corresponding to the maximum number of pixels in the first grayscale range of the first frame is 0, and the grayscale value corresponding to the maximum number of pixels in the first grayscale range of the second frame is also 0. That is, the grayscale value corresponding to the maximum number of pixels in the first grayscale range of the first frame is consistent with the grayscale value corresponding to the maximum number of pixels in the first grayscale range of the second frame. Therefore, by further comparing the maximum number of pixels in the first grayscale range of the first frame with the maximum number of pixels in the second grayscale range of the second frame, we find that the maximum number of pixels in the first grayscale range of the first and second frames is 1797810, and the absolute value of the difference in the maximum number of pixels is 1773510. Assuming that pixels less than 20,000 are classified as the first pixel count level, pixels from 20,000 to 500,000 are classified as the second pixel count level, and pixels less than 20,000 are classified as the third pixel count level, and pixels from 20,000 to 500,000 are classified as the fourth pixel count level, we can further categorize the second pixel count level into two categories. Dividing pixels from 0000 to 1000000 into the third pixel count range, from 1000000 to 2000000 pixels into the fourth pixel count range, and from 2000000 to 300000 pixels into the fifth pixel count range, we can determine that the maximum pixel count in the first grayscale range is between 1000000 and 2000000 pixels, which falls into the fourth pixel count range. Therefore, we use the first pixel count threshold corresponding to the fourth pixel count range as the comparison threshold for the absolute value of the difference in the maximum pixel count in the first grayscale range. Assuming the first pixel count threshold corresponding to the fourth pixel count range is 70000, comparing 1773510 with 70000, we can determine that 1773510 is greater than 70000, meaning the absolute value of the difference in the maximum pixel count in the first grayscale range is greater than the first pixel count threshold. Therefore, we can increment the similarity parameter by 1.

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

[0189] For example, such as Figure 12 As shown, Figure 12 This illustrates the change in similarity parameters between the grayscale intervals of the first frame and the corresponding grayscale intervals of the second frame. Figure 12 As can be seen, the similarity parameter between the first and second displayed frames calculated through the above steps is 2. Assuming the similarity threshold is 0, it can be determined that the first and second displayed frames are not similar.

[0190] Once it is determined that the first frame and the second frame are not similar, it is possible to further determine whether the first frame and the third frame are similar. The method of determination is the same as the method of determining the similarity between the first frame and the second frame, and will not be repeated here.

[0191] In practical applications, the initial value of the aforementioned similarity parameter can be 0. The aforementioned first preset increment and the aforementioned second preset increment can be the same or different; this application does not impose specific restrictions on this.

[0192] S43, if a first target frame display is detected and a second target frame display exists between the first target frame display and the reference frame display, a screen flickering event is determined to have occurred.

[0193] The first target frame display is a display similar to the reference frame display, and the second target frame display is a display dissimilar to the reference frame display. That is, if a display similar to the reference frame display is detected in a series of consecutive display frames, and there is also a display dissimilar to the reference frame display between the two, then a screen flickering event is determined to have occurred.

[0194] Understandably, in the event of a screen flickering incident, if multiple abnormal frames exist within the flickering event, the display of these abnormal frames on the electronic device's screen will be a gradual transition. For example, such as... Figure 13 In the four-frame flickering event shown, the second and third frames are both abnormal frames, but the change between the second and third frames is gradual. For example... Figure 14 In the five-frame flickering event shown, the second, third, and fourth frames are all abnormal frames, but the changes in the second, third, and fourth frames are gradual.

[0195] Based on this, when there are multiple second target frame displays between the reference frame and the first target frame, the similarity between any two adjacent second target frame displays can also be detected. Since the changes in the abnormal frame displays are gradual, it can be determined that the differences between any two adjacent second target frame displays are relatively small. Using the similarity judgment method provided in this application embodiment, the similarity between two adjacent second target frame displays can be determined as similar. Therefore, the flicker event detection method provided in this application embodiment can also be further described as follows: Figure 15 As shown, with Figure 6 Taking the five-frame display shown as an example, a flickering event detection method provided in one embodiment of this application may include:

[0196] S151: Detect whether the first frame of the displayed image is similar to the second frame of the displayed image. If not, execute S152.

[0197] It is understandable that if the first frame and the second frame are similar, it means that there are no abnormal frames between the first and second frames. After determining whether a flickering event exists, and with the brightness histogram data of the new display frame entering the brightness histogram data array, the brightness histogram data of the first frame is deleted, the second frame is used as the reference frame, and the brightness histogram data of the frame after the fifth frame is obtained. The relevant process for flickering event detection continues with the second frame as the reference frame. This application will not repeat the description of this process.

[0198] S152: Detect whether the first frame and the third frame are similar. If they are, then report a three-frame screen flickering event. If not, then execute S153.

[0199] S153: Detect whether the first frame and the fourth frame are similar. If they are, execute S154; otherwise, execute S155.

[0200] S154: Detect whether the second frame and the third frame are similar. If so, report a four-frame screen flickering event.

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

[0202] S155: Detect whether the first frame and the fifth frame are similar. If so, execute S126.

[0203] In practical applications, if the first frame and the fifth frame are still not similar, the brightness histogram data of the next frame (i.e., the sixth frame) can be obtained, the brightness histogram data of the first frame can be discarded, and the second frame can be used as the reference frame for similarity detection. That is, the similarity between the second frame and the third frame is compared. If the second frame and the third frame are similar, the similarity between the second frame and the fourth frame is further compared, and so on. This application will not repeat the description of this process.

[0204] S156: Detect whether the second frame and the third frame are similar, or detect whether the third frame and the fourth frame are similar. If so, then report a five-frame flickering event.

[0205] It is understandable that if any two adjacent display frames in the three abnormal frames are dissimilar, other situations may occur that are not screen flickering. Therefore, screen flickering events will not be reported to avoid false alarms. In this case, the brightness histogram data of the first to fifth display frames can be discarded, and the display frame after the fifth display frame can be used as the reference frame for subsequent screen flickering event detection. This application will not repeat the description of this process.

[0206] In practical applications, when an electronic device detects a screen flickering event, it can report the event so that the screen flickering event processing module can process it. For details on how the screen flickering event processing module processes the event, please refer to existing screen flickering event processing methods. This application will not elaborate on these methods.

[0207] As can be seen from the above, the flicker event detection method provided in this application embodiment can determine the similarity between the reference frame and the comparison frame based on the brightness histogram data of multiple consecutive display frames. When there is a display frame similar to the reference frame and there is a display frame dissimilar to the reference frame, i.e., there is a dissimilar display frame between two similar display frames, the flicker event is determined to have occurred. This can effectively improve the detection accuracy of flicker events and provide a basis for flicker event processing.

[0208] Please see Figure 16 , Figure 16 This illustration shows a schematic flowchart of a screen flicker event detection method according to another embodiment of this application. In this embodiment, the brightness characteristic parameters of the display screen may further include the pixel ratio of the display screen, such as... Figure 16 As shown, after detecting a screen flickering event, the screen flickering event detection method provided in this application embodiment further includes:

[0209] S161: Calculate the pixel ratio of the displayed screen based on the brightness histogram of the displayed screen.

[0210] The pixel ratio of the displayed image can be calculated by statistically analyzing the number of pixels corresponding to each gray level. Specifically, the pixel ratio of the displayed image can be calculated using Formula 1:

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

[0212] Among them, R pixel The sum represents the pixel ratio of the displayed image. pixel P represents the weighted sum of the pixels displayed on the screen. pixe This indicates the number of pixels on the display screen of an electronic device.

[0213] Wherein, the pixel-weighted sum sum pixel It can be calculated using Formula 2:

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

[0215] Where P0 represents the number of pixels corresponding to gray level 0, P1 represents the number of pixels corresponding to gray level 1, P 255 This indicates the number of pixels corresponding to grayscale level 255.

[0216] S162: Obtain the pixel ratio of the base frame, the pixel ratio of the intermediate frame, and the pixel ratio of the first target frame displayed in the splash screen event.

[0217] The intermediate frame display can be any frame between the reference frame display and the first target frame display, which is the second target frame display.

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

[0219] Understandably, if the screen flicker event is a three-frame flicker event, the pixel ratio corresponding to these three frames can be obtained. If the screen flicker event includes more than three frames, any one of the intermediate abnormal frames can be selected as the intermediate display frame. For example, for... Figure 10 The four-frame flicker event shown allows you to select either the second or third frame as the intermediate display frame. For example, regarding events like... Figure 11 The five-frame flashing event shown can be used to select the second frame, the third frame, or the fourth frame as the middle frame.

[0220] In practical applications, a value of 1 can be set. A one-dimensional array of 3 is used to store the pixel ratios of the three displayed frames, so as to identify the type of subsequent screen flickering events. By comparing the pixel ratios of the displayed frames, the type of screen flickering event can be determined, that is, whether the screen flickering event is a small flickering event with a relatively small degree of flickering (the first screen flickering event), a large flickering event with a relatively large degree of flickering (the second screen flickering event), or a false alarm.

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

[0222] S164: Is the absolute value of the difference between the pixel ratio of the previous frame and the pixel ratio of the intermediate frame greater than the second ratio threshold? If yes, then the screen flickering event is determined to be the first screen flickering event; otherwise, it is determined to be a false alarm event.

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

[0224] S166: Determine whether the absolute value of the difference between the pixel ratio of the previous frame and the pixel ratio of the intermediate frame is greater than the fourth ratio threshold. If yes, then determine the screen flickering event as the second screen flickering event; otherwise, determine it as a false alarm event.

[0225] Understandably, the thresholds for the first ratio and the second ratio of the first splash screen event are quite strict. For example, the first ratio threshold for the first splash screen event is 0.03%, and the second ratio threshold is 30%.

[0226] The thresholds for setting the third and fourth ratios for the second splash screen event are lenient; for example, the third ratio threshold is 3% and the fourth ratio threshold is 40%.

[0227] Assuming the pixel ratio of the previous frame is 45.6%, the pixel ratio of the next frame is 45.8%, and the pixel ratio of the middle frame is 88%, then the absolute value of the difference between the pixel ratios of the previous and next frames is 0.2%, and the absolute value of the difference between the pixel ratios of the previous and middle frames is 42.4%. Since 0.03% < 0.2% < 3% and 42.4% > 40%, it can be determined that this flickering event is the second flickering event, meaning the flickering degree is relatively large.

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

[0229] In this embodiment of the application, if the electronic device determines that a false alarm event exists based on the pixel ratio of the reference frame display, the pixel ratio of the intermediate frame display, and the pixel ratio of the first target frame display, it can filter out the feedback data corresponding to the false alarm event and not feed back the false alarm event, so as to reduce the waste of operating resources.

[0230] It should be noted that the first, second, third, and fourth ratio thresholds mentioned above can be set according to actual application requirements, and the first ratio threshold is lower than the third ratio threshold. It is understood that the settings of these parameters can be related to the number of pixels on the electronic device's display screen.

[0231] As can be seen from the above, the screen flickering event detection method provided in this application embodiment can detect the type of screen flickering event by the pixel ratio of the displayed screen in the screen flickering event, and can filter out false alarm events, thereby further improving the detection accuracy of screen flickering events.

[0232] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the method steps of the examples described in conjunction with the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0233] In some embodiments, the above-mentioned electronic device may include a screen flicker detection module, which executes the screen flicker event detection method provided in any of the above method embodiments to detect screen flicker events.

[0234] This application embodiment can divide the audio channel switching method apparatus into functional modules based on the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0235] Figure 17 This is a schematic diagram of a chip structure provided in an embodiment of this application. Figure 17 As shown, chip 170 includes one or more processors 1701, communication lines 1702, communication interfaces 1703, and memory 1704.

[0236] In some implementations, memory 1704 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.

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

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

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

[0240] In the above embodiments, the instructions stored in the memory for execution by the processor can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.

[0241] This 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, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disk, hard disk, or magnetic tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid-state disk (SSD)).

[0242] This application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. The computer-readable medium may include computer storage media and communication media, and may also include any medium capable of transferring a computer program from one place to another. The storage medium can be any target medium accessible 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 also include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers.

[0244] The above combinations should also be included within the scope of computer-readable media. The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology 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 determined by the scope of the claims.

Claims

1. A method for detecting screen flickering events, characterized in that, include: Obtain the brightness histogram data of N consecutive frames displayed on the screen; where N is a positive integer greater than or equal to 3; Based on the brightness histogram data of the N consecutive frames of display, the similarity between the reference frame display and the comparison frame display is detected; the comparison frame display is one or more other frames of display in the N consecutive frames of display besides the reference frame display. A screen flickering event is determined to have occurred when a first target frame display is detected and a second target frame display exists between the first target frame display and the reference frame display; wherein the first target frame display is a display similar to the reference frame display, and the second target frame display is a display dissimilar to the reference frame display.

2. The method for detecting screen flickering events according to claim 1, characterized in that, The step of detecting the similarity between the reference frame and the comparison frame based on the luminance histogram data of the N consecutive frames of displayed images includes: Based on the brightness histogram data of the display screen, the brightness feature parameters of the display screen are extracted. The brightness feature parameters include the maximum number of pixels in each grayscale interval of the display screen, and the grayscale value corresponding to the maximum number of pixels in each grayscale interval. The similarity between the reference frame display and the comparison frame display is calculated by iterating through the brightness feature parameters of the reference frame display and the comparison frame display.

3. The method for detecting screen flickering events according to claim 2, characterized in that, Before extracting the brightness feature parameters of the display screen based on the brightness histogram data of the display screen, the method further includes: The brightness histogram data of the displayed image 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.

4. The method for detecting screen flickering events according to claim 3, characterized in that, The step of traversing the brightness feature parameters of the reference frame display and the comparison frame display, and calculating the similarity between the reference frame display and the comparison frame display, includes: The maximum number of pixels and the corresponding grayscale value of each grayscale interval in the reference frame display are traversed, and compared with the maximum number of pixels and the corresponding grayscale value of each grayscale interval in the comparison frame display. The maximum number of pixels in each grayscale interval of the reference frame display is compared with the maximum number of pixels in each grayscale interval of the comparison frame display to obtain the maximum number of pixels comparison result. The grayscale values ​​of the maximum number of pixels in each grayscale interval of the reference frame display are compared with the grayscale values ​​of the maximum number of pixels in each grayscale interval of the comparison frame display to obtain the grayscale value comparison results. The similarity judgment result between the reference frame display and the comparison frame display is determined based on the maximum pixel count comparison result and the grayscale value comparison result.

5. The method for detecting screen flickering events according to any one of claims 2 to 4, characterized in that, The step of traversing the brightness feature parameters of the reference frame display and the comparison frame display, and calculating the similarity between the reference frame display and the comparison frame display, includes: Calculate the absolute value of the difference between the maximum number of pixels in the corresponding grayscale interval of the reference frame display and the comparison frame display; For each grayscale range, determine whether the grayscale value corresponding to the maximum number of pixels in the grayscale range of the reference frame display is consistent with the grayscale value corresponding to the maximum number of pixels in the grayscale range of the comparison frame display. If the grayscale value corresponding to the maximum number of pixels in the grayscale interval of the reference frame display screen and the comparison frame display screen is the same, the pixel number level of the maximum number of pixels in the grayscale interval is determined according to the maximum number of pixels in the grayscale interval. A first quantity threshold is determined based on the pixel quantity level; If the absolute value of the difference between the maximum number of pixels in the grayscale range is greater than the first number threshold, the similarity parameter is increased by a first preset increment. If the grayscale value corresponding to the maximum number of pixels in the grayscale interval of the reference frame display screen and the comparison frame display screen is inconsistent, and the maximum number of pixels in the grayscale interval is greater than the second quantity 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. If the similarity parameter is greater than the similarity threshold, it is determined that the display of the reference frame and the display of the comparison frame are not similar.

6. The method for detecting screen flickering events according to any one of claims 1 to 5, characterized in that, If a screen flickering event is determined to have occurred and multiple frames of second target frames exist between the reference frame display and the first target frame display, the method further includes: Calculate the similarity between any two adjacent frames in the multi-frame second target frame display; If any two adjacent frames in the multi-frame second target frame display are similar, a screen flickering event is determined to exist.

7. The method for detecting screen flickering events according to any one of claims 1 to 6, characterized in that, The method further includes: The pixel ratio of the displayed image is calculated based on the brightness histogram of the displayed image.

8. The method for detecting screen flickering events according to claim 7, characterized in that, After determining that a screen flickering event has occurred, the method further includes: Obtain the pixel ratio of the base frame display, the pixel ratio of the intermediate frame display, and the pixel ratio of the first target frame display in the splash screen event; The type of the screen flicker event is determined based on the pixel ratio of the base frame display, the pixel ratio of the intermediate frame display, and the pixel ratio of the first target frame display.

9. The method for detecting screen flickering events according to claim 8, characterized in that, Determining the type of the screen flicker event based on the pixel ratio of the reference frame, the pixel ratio of the intermediate frame, and the pixel ratio of the first target frame includes: If the absolute value of the difference between the pixel ratio of the reference frame display and the pixel ratio of the first target frame display is less than a first ratio threshold, and the difference between the pixel ratio of the reference frame display and the pixel ratio of the intermediate frame display is greater than a second ratio threshold, then the type of the screen flicker event is determined to be a first screen flicker event.

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

11. An electronic device, characterized in that, The device includes a processor and a memory coupled together, the memory being used to store a computer program, which, when executed by the processor, causes the electronic device to perform the method of 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, it causes the electronic device to perform the method as described in any one of claims 1 to 10.

13. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors coupled to a memory for storing computer program instructions, the one or more processors for invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.