Stroboscopic processing method, apparatus and electronic device
Patent Information
- Application Number
- CN202510401117.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-03-31
AI Technical Summary
但这种方法局限的很大,如在图2所示场景下,即用户使用前置摄像头拍照时的情况下这种方法无法解决频闪问题,若在前置摄像头周边额外安装专业的去频闪传感器,会增加设备成本
Smart Images

Figure CN120014995B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a flicker processing method, apparatus and electronic device. Background Technology
[0002] With the widespread use of mobile phones, computers, and other electronic devices, people are spending increasingly more time in front of electronic screens in their studies, work, and daily lives. However, in actual use, the luminous flux of ambient light sources often fluctuates at a certain frequency, causing a flickering phenomenon where the brightness of the ambient light source changes rapidly. This results in users seeing alternating bright and dark stripes when viewing the screen content, reducing viewing quality. Prolonged exposure to flickering screens can also cause eye strain, vision damage, and other health problems.
[0003] To improve the above problems, such as Figure 1 As shown, current methods typically rely on the ambient light level sensed by a rear optical sensor to dynamically adjust the screen brightness to mitigate flicker. However, this method has significant limitations, such as in... Figure 2 In the scenario shown, where the user is taking a photo with the front-facing camera, this method cannot solve the flicker problem. Installing a professional flicker-eliminating sensor around the front-facing camera would increase the equipment cost. Summary of the Invention
[0004] In view of the above problems, this application provides the following technical solution:
[0005] The first aspect of this application provides a flicker processing method applied to an electronic device, the method comprising:
[0006] At a target time, at least one set of target data is acquired by the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; one set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen;
[0007] Determine the second energy intensity corresponding to the target refresh rate and the target brightness;
[0008] Based on the target refresh rate and the second energy intensity, the ambient light flicker frequency of the environment in which the target screen is located at the target time is determined from the at least one set of target data.
[0009] Optionally, determining the second energy intensity corresponding to the target refresh rate and the target brightness includes any of the following:
[0010] Query the correspondence between different combinations of refresh rates and brightness of the target screen in the electronic device and different energy intensities, and determine the second energy intensity corresponding to the target refresh rate and the target brightness;
[0011] The target refresh rate and the target brightness are input into a trained machine learning model for analysis to predict the second energy intensity corresponding to the target refresh rate and the target brightness;
[0012] The machine learning model is used to analyze the energy intensity of the screen light signal detected by the target sensor at different refresh rates and brightness levels in the electronic device under no ambient light conditions.
[0013] Optionally, determining the ambient light flicker frequency of the environment in which the target screen is located at the target time from the at least one set of target data based on the target refresh rate and the second energy intensity includes:
[0014] The target refresh rate and the second energy intensity are compared with each set of target data to obtain the corresponding comparison results;
[0015] Based on the comparison results, the ambient light flicker frequency of the environment in which the target screen is located at the target time is determined from the signal frequencies.
[0016] Optionally, determining the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequencies based on the comparison result includes:
[0017] If the number of the at least one signal frequency is one and is the same as the target refresh rate, and the first energy intensity is greater than the second energy intensity, the signal frequency is determined to be the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0018] Optionally, determining the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequencies based on the comparison result includes:
[0019] Based on the comparison results, candidate data that differs from the target refresh rate and the second energy intensity are determined from multiple sets of target data;
[0020] If the candidate data is a set, the signal frequency in the candidate data is determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0021] If there are multiple sets of candidate data, the first energy intensity of each of the multiple sets of candidate data is compared, and the signal frequency of the group with the largest first energy intensity is determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0022] Optionally, the method further includes:
[0023] In the image acquisition mode of the electronic device, the target exposure time of the image acquisition device of the electronic device is determined according to the ambient light flicker frequency; the target exposure time is an integer multiple of the ambient light flicker period, and the ambient light flicker period is determined according to the ambient light flicker frequency;
[0024] Adjust the configuration parameters of the image acquisition device according to the target exposure time.
[0025] Optionally, the machine learning model is trained at least in the following ways:
[0026] In the absence of ambient light, the refresh rate and brightness of the target screen in the electronic device are adjusted to obtain the actual energy intensity of the corresponding screen light signal detected by the target sensor;
[0027] The refresh rate and brightness of the target screen obtained from each adjustment are input into the initial machine learning model for analysis to obtain the corresponding predicted energy intensity;
[0028] The machine learning model is obtained by adjusting the parameters of the initial machine learning model by reducing the prediction loss between the predicted energy intensity and the corresponding actual energy intensity.
[0029] Optionally, the process of obtaining the correspondence includes any of the following:
[0030] In the absence of ambient light, the refresh rate and brightness of the target screen in the electronic device are gradually adjusted to obtain the energy intensity of the corresponding screen light signal detected by the target sensor, so as to establish the correspondence.
[0031] Based on a machine learning model, the energy intensity corresponding to each combination of different refresh rates and different brightness of the target screen in the electronic device is determined, so as to establish the corresponding relationship.
[0032] A second aspect of this application provides a flicker processing device for use in electronic devices, the device comprising:
[0033] The first acquisition module is used to acquire at least one set of target data based on the light signal detected by the target sensor of the electronic device at a target time, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen;
[0034] The first determining module is used to determine the second energy intensity corresponding to the target refresh rate and the target brightness;
[0035] The second determining module is used to determine the ambient light flicker frequency of the environment in which the target screen is located at the target time from the at least one set of target data, based on the target screen refresh rate and the second energy intensity.
[0036] A third aspect of this application provides an electronic device comprising at least one target sensor, at least one memory, and at least one processor, wherein:
[0037] The target sensor is disposed below the target screen of the electronic device and is used to detect light signals, process the light signals, and obtain at least one set of target data; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency;
[0038] The memory is used to store multiple computer instructions;
[0039] The processor is used to load and execute the computer instructions to perform the following steps:
[0040] At a target time, at least one set of target data is acquired by the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; one set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen;
[0041] Determine the second energy intensity corresponding to the target refresh rate and the target brightness;
[0042] Based on the target screen refresh rate and the second energy intensity, the ambient light flicker frequency of the environment in which the target screen is located at the target time is determined from the at least one set of target data. Attached Figure Description
[0043] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0044] Figure 1 This is a schematic diagram illustrating a scenario where strobe processing is performed based on optical sensors surrounding the rear camera.
[0045] Figure 2 This is a schematic diagram illustrating the strobe effect when using a front-facing camera for shooting.
[0046] Figure 3 This is a schematic diagram illustrating an application scenario for a flicker processing method provided in the embodiments of this application;
[0047] Figure 4 This is a schematic diagram of an optional hardware structure for an electronic device applicable to the flicker processing method proposed in the embodiments of this application;
[0048] Figure 5 This is a flowchart illustrating a flicker processing method provided in Embodiment 1 of this application;
[0049] Figure 6 This is a flowchart illustrating a flicker processing method provided in Embodiment 2 of this application;
[0050] Figure 7 A schematic diagram showing the correspondence between different combinations of refresh rates and brightness of the target screen in an electronic device and different energy intensities in a flicker processing method provided in an embodiment of this application.
[0051] Figure 8 A schematic diagram of target data detected by a target sensor in a stroboscopic processing method provided in this application embodiment;
[0052] Figure 9 This is a flowchart illustrating a flicker processing method provided in Embodiment 3 of this application;
[0053] Figure 10 This is a schematic diagram of the structure of a strobe processing device proposed in an embodiment of this application. Detailed Implementation
[0054] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. The embodiments of this application are described below with reference to the accompanying drawings. It will be understood by those skilled in the art that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0055] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0056] To address the aforementioned issues, this application provides a novel flicker reduction method that eliminates the need for additional flicker-reduction sensors around the front-facing camera (or other cameras without optical sensors) of the electronic device. Instead, it directly reuses the existing under-screen sensor located beneath the target screen. Figure 3 In the application scenario shown, since each set of target data in the actual light signal detected by the target sensor includes the signal frequency and energy intensity of ambient light, as well as the signal frequency and energy intensity of target screen light, the flicker processing method proposed in this application is executed in a timely manner to quickly remove the signal frequency and energy intensity of target screen light detected by the target sensor, eliminating the influence of screen light on the target sensor. This accurately obtains the ambient light flicker frequency of the environment in which the target screen is located, so that appropriate measures can be taken to eliminate flicker in the future, preventing users from seeing alternating bright and dark stripes on the target screen, improving the user experience of the electronic device, and enhancing the reliability of the flicker processing results. In addition, since the original target sensor of the electronic device is used directly, and no additional sensor is installed near the camera, the processing process is simplified and the equipment cost is reduced. The flicker processing method proposed in this application and its application in electronic devices will be described in detail below with reference to the accompanying drawings.
[0057] Reference Figure 4This is a schematic diagram of an optional hardware structure for an electronic device applicable to the flicker processing method proposed in the embodiments of this application. The electronic device may include terminal devices with screens such as smartphones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, edge devices, robots, smart medical / transportation equipment, etc. Figure 4 As shown, the electronic device may include: at least one target sensor 41, at least one memory 42, and at least one processor 43, wherein:
[0058] At least one target sensor 41, at least one memory 42, and at least one processor 43 can communicate via a bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be categorized as an address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a line with a double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0059] The target sensor 41 can be disposed below the target screen of the electronic device to detect light signals, process the light signals, and obtain at least one set of target data; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency. For example, the detected energy intensity (i.e., luminous intensity) corresponding to 60Hz (signal frequency) includes 15 nits, and the energy intensity corresponding to 100Hz includes 20 nits, etc.
[0060] In typical scenarios where users interact with electronic devices, the target sensor, located below the target screen, detects not only ambient light but also the target screen backlight (the light source beneath the screen). This backlight is reflected by the glass above the screen, and the reflected light passes through the screen and is detected by the target sensor. It should be understood that if the location of the target screen's light source changes, the path of the light being detected by the target sensor may also change, and is not limited to the screen backlighting method described in this embodiment.
[0061] In this embodiment, if the electronic device includes multiple screens, a target sensor disposed below each screen has the aforementioned detection function. To avoid interference, a screen in a display state (such as a screen on display outputting content) can be designated as the target screen. The target sensor located below the target screen is then controlled to enter a working state, and the aforementioned detection function is implemented to achieve the flicker processing method proposed in this embodiment. Screens in a non-display state (such as a screen-off state) can be used as non-target sensors. In this case, the non-target sensors are in a non-working state and do not need to perform the aforementioned detection function, so that the subsequent flicker processing method is not adversely affected by the data output by such target sensors.
[0062] The memory 42 can be used to store multiple computer instructions for implementing the strobe processing method proposed in the embodiments of this application; the processor 43 can load and execute the computer instructions stored in the memory 42 to implement each step of the strobe processing method proposed in the embodiments of this application. The implementation process can be referred to the description of the corresponding part of the method embodiments below.
[0063] In this embodiment, the memory 42 may include storage media such as a floppy disk, USB flash drive, portable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk. The processor 43 may include any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), digital signal processor (DSP), application-specific integrated circuit (ASIC), or field-programmable gate array (FPGA).
[0064] It should be understood that, Figure 4 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than Figure 4 The more or fewer components shown, or combinations of certain components, may also include, for example, a microphone, a speaker, other sensors (such as temperature sensors, pressure sensors, gravity sensors, and speed sensors), an antenna, a power module, radio frequency components, external ports, and other input / output components, which can be determined according to the processing function requirements. This application will not provide detailed examples of each of these components.
[0065] The flicker processing method proposed in this application will be described below, such as... Figure 5 The flowchart shown in Embodiment 1 of this application illustrates a flicker processing method. Figure 5 As shown, this frequency method can be applied to electronic devices, such as... Figure 5 As shown, the flicker processing method proposed at this time may include:
[0066] Step S51: At the target time, acquire at least one set of target data of the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time;
[0067] In this embodiment of the application, the target time can be any time, such as the current time or a specified historical time. The target screen can be any screen in the electronic device that is in a display state. It may be one or more of the multiple screens contained in the electronic device. These multiple screens can be independent screens or screens corresponding to different display areas divided by a screen. If the screen is a flexible screen, after the screen is deformed, the part of the screen that will continue to display content can be determined as the target screen.
[0068] To avoid adding additional components, this application can directly reuse the target sensor of an electronic device to detect the signal frequency and energy intensity of the optical signal. This includes the refresh rate (i.e., signal frequency) and corresponding energy intensity of both the external light source and the target screen's screen light source. To eliminate the influence of the screen light source on the target sensor's detection results, the target refresh rate and brightness of the target screen at the target time can be read. This allows for querying the refresh rate and energy intensity of the target screen light source at the target time when the target screen is at that target refresh rate, thus removing the influence of the target screen light source on the target sensor's detection results.
[0069] Specifically, for each set of target data actually detected by the target sensor at the target time, it can be frequency domain data, such as a signal frequency and the first energy intensity of the optical signal (which may include a mixed optical signal of external ambient light signal and target screen light signal) at that signal frequency. The signal frequencies of different sets of target data are different, and the signal frequency includes at least the target refresh rate of the target screen.
[0070] Step S52: Determine the second energy intensity corresponding to the target refresh rate and target brightness;
[0071] In this embodiment, the signal frequency and energy intensity of the target screen light signal collected by the target sensor can be determined in advance through experiments or reasoning calculations when the target screen of the electronic device is at the target refresh rate and target brightness in the absence of ambient light. The signal frequency is the target refresh rate of the target screen at the target moment, and the energy intensity can be recorded as the second energy intensity. It should be noted that for different models of electronic devices, even if the target screen is at the same refresh rate and high brightness, the second energy intensity that the target sensor can collect will be different in the absence of ambient light. This application does not limit the value of the second energy intensity or the method of obtaining it.
[0072] Step S53: Based on the target refresh rate and the second energy intensity, determine the ambient light flicker frequency of the environment in which the target screen is located at the target time from at least one set of target data.
[0073] Following the above analysis, this application can compare the target refresh rate with the signal frequencies in each target data set. After determining a set of target data containing the target refresh rate, the first energy intensity and the second energy intensity in the target data are compared to determine whether the target data contains the signal frequency and energy intensity of ambient light. If it does, the second energy intensity of the target screen light can be removed from the target data to obtain the signal frequency and energy intensity of the ambient light at the target time, thereby determining the ambient light flicker frequency. If it does not contain the ambient light, the target data set is data of the target screen light. In this case, the target sensor will also detect other sets of target data, which are ambient light data, from which the ambient light flicker frequency can be determined.
[0074] In summary, this application reuses an existing target sensor below the target screen of an electronic device to detect at least one set of target data of light signals at a target time, determines a second energy intensity corresponding to the target refresh rate and target brightness of the target screen at the target time, and then determines the ambient light flicker frequency of the environment in which the target screen is located at the target time by comparing the target refresh rate and the second energy intensity with the target data. This is used to accurately eliminate flicker, prevent users from seeing alternating bright and dark stripes on the target screen, improve the user experience of the electronic device, and enhance the reliability of the flicker processing results. Furthermore, it eliminates the need for additional sensors in the electronic device, simplifying the processing and reducing equipment costs.
[0075] Reference Figure 6 This is a flowchart illustrating a flicker processing method provided in Embodiment 2 of this application. Figure 6 As shown, the flicker processing method may include:
[0076] Step S61: At the target time, acquire at least one set of target data of the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time;
[0077] Step S62: Query the correspondence between different combinations of refresh rates and brightness of the target screen and different energy intensities, and determine the second energy intensity corresponding to the target refresh rate and target brightness.
[0078] In this embodiment, under conditions of no ambient light and only target screen light, the refresh rate and brightness of the target screen are adjusted. After each adjustment, the signal frequency and energy intensity (i.e., the second energy intensity) detected by the target sensor are acquired to determine the second energy intensity corresponding to the combination of refresh rate and brightness. This allows recording the correspondence between different combinations of refresh rate and brightness and different energy intensities of the target screen, which can be represented graphically, such as... Figure 7 As shown; it can also be recorded in a table, and the corresponding rules can be analyzed to represent the correspondence, so that the second energy intensity corresponding to the target refresh rate and target brightness can be directly queried from it later. This application does not restrict the storage method and acquisition method of the correspondence.
[0079] Therefore, regarding the above correspondence, even in the absence of ambient light, the refresh rate and brightness of the target screen in the electronic device can be gradually adjusted to obtain the energy intensity of the corresponding screen light signal detected by the target sensor, thereby establishing the above correspondence. Figure 7 As shown, the adjusted refresh rate and brightness values for the target screen include, but are not limited to, those shown below. Figure 7 The values shown.
[0080] In another possible implementation, this application can also use a machine learning model to determine the energy intensity corresponding to various combinations of different refresh rates and brightness levels of the target screen in the electronic device, thereby establishing the aforementioned correspondence. The machine learning model can be an artificial intelligence model, such as a fully connected neural network, convolutional neural network, or random forest algorithm. This machine learning model can fit the correspondence between various refresh rates and brightness levels of the target screen and the energy intensity (e.g., amplitude value in the frequency domain) obtained by Fourier transforming the target screen's light signal. The fitted refresh rate and brightness values of the target screen include, but are not limited to, the values of each. Figure 7 The values shown.
[0081] Step S63: Compare the target refresh rate and the second energy intensity with the target data of each group to obtain the corresponding comparison results;
[0082] Based on the above analysis, and referring to Figure 3In the application scenario described above, in order to determine the ambient light flicker frequency at the target time, after knowing the second energy intensity corresponding to the refresh rate and brightness of the target screen at the target time, it can be compared with the signal frequency and first energy intensity in each set of target data actually detected by the target sensor. Based on the comparison results, the ambient light flicker frequency of the environment in which the target screen is located at the target time can be determined from each signal frequency detected by the target sensor.
[0083] In one possible implementation, if at least one signal frequency is present and matches the target refresh rate, it indicates that the target screen's light signal has the same signal frequency as the ambient light signal. In this case, the target screen captures the same phase (bright or dark) of both the ambient light source and the target screen's light source each time it refreshes, resulting in noticeable flickering perceived by the human eye. At this time, the target sensor detects a set of target data at the target moment, the first energy intensity of which is obtained by superimposing the energy intensities of the two light signals, making the first energy intensity detected by the target sensor greater than the second energy intensity. In this case, the detected signal frequency can be determined as the ambient light flicker frequency (i.e., the flicker of the external light source) of the environment in which the target screen is located at the target moment. Subtracting the second energy intensity from the first energy intensity yields the energy intensity of the ambient light signal, which can then be used to eliminate flickering. This application does not limit the flicker elimination method.
[0084] Based on the above analysis, in practical applications, since the refresh rate of the target screen is usually continuously changing, even if the refresh rate of the target screen is consistent with the ambient light flicker frequency at a given moment, it may become inconsistent with the ambient light flicker frequency at the next moment or several moments later. This causes the target screen to display images with different brightness levels in each refresh cycle, resulting in flickering perceived by the user. In this case, the target sensor actually detects multiple sets of target data at the corresponding moment, including at least the refresh rate and second energy intensity of the target screen at that moment. In addition, it may also include at least one set of target data for the ambient light source. Based on the comparison results, the ambient light flicker frequency can be determined according to the method described in the following steps.
[0085] Step S64: Based on the comparison results, candidate data that differs from the target refresh rate and the second energy intensity are determined from multiple sets of target data.
[0086] Step S65: If the candidate data is a set, the signal frequency in the candidate data is determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0087] Step S66: If there are multiple groups of candidate data, compare the first energy intensities of each group of candidate data, and determine the signal frequency of the group with the largest first energy intensity as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0088] Following the above analysis, by comparing the target refresh rate and second energy intensity with each set of target data, other sets of target data besides the set of target data for the target screen light source are determined as candidate data for the ambient light source. If the current ambient light source is a relatively fixed single light source, a set of candidate data may be obtained, and the signal frequencies contained in this set can be directly determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time. If the current ambient light source is multiple complex light sources, or if environmental entities reflect the ambient light source, and the reflected light enters the target screen, the target sensor can also sense the signal frequencies and energy intensities of the ambient light source and the reflected light, such as... Figure 8 As shown.
[0089] Therefore, when there are multiple sets of candidate data, the first energy intensity contained in each set of candidate data for the ambient light source can be compared, and the signal frequency with the largest first energy intensity can be determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time. For example... Figure 8 As shown, assuming the refresh rate of the target screen at the target time is 60Hz and the second energy intensity is 150, it can be eliminated from the multiple sets of target data detected by the target sensor. From the remaining multiple sets of candidate data, a set of candidate data with a signal frequency of 100Hz and a first energy intensity of 230nit is selected as shown in Figure 8 to determine the ambient light flicker parameters of the ambient light source, so as to reliably eliminate flicker.
[0090] In some embodiments, in the image acquisition mode of the electronic device (such as a scenario where a camera is used to take a picture), the target exposure time of the image acquisition device of the electronic device can be determined based on the ambient light flicker frequency at the target time. The configuration parameters of the image acquisition device can then be adjusted according to the target exposure time to eliminate flicker. The target exposure time is an integer multiple of the ambient light flicker period, which can be determined based on the ambient light flicker frequency.
[0091] It should be noted that, regarding methods for eliminating flicker, in addition to adjusting the exposure time as described above, the frame rate of the camera can also be adjusted based on the ambient light flicker frequency at the target time, so that the exposure time of each frame matches the flicker period of the light source. This ensures brightness consistency between consecutive frames and avoids scrolling flicker stripes. Alternatively, flicker can be reduced by adjusting the refresh rate of the target screen. For example, DC dimming can be used to reduce flicker when the target screen is at high brightness, while increasing the PWM (Pulse Width Modulation) frequency can reduce the visibility of flicker when the target screen is at low brightness. Furthermore, software algorithms can be used to predict and compensate for the impact of flicker to reduce its visual effect. This application does not limit the implementation method for eliminating flicker.
[0092] In some embodiments, this application can train a machine learning model to analyze the energy intensity of the screen light signal detected by the target sensor at different refresh rates and different brightness levels of the target screen in the absence of ambient light in an electronic device. In this way, after determining the target refresh rate and target brightness of the target screen at the target time, the target refresh rate and target brightness can be input into the machine learning model for analysis to predict the second energy intensity corresponding to the target refresh rate and target brightness.
[0093] Based on this, such as Figure 9 The diagram shown is a flowchart of a flicker processing method provided in Embodiment 3 of this application. This embodiment can describe an optional training method for the machine learning model used to predict the second energy intensity in the flicker processing method described above, such as... Figure 9 As shown, this optional training method may include, but is not limited to, the following steps:
[0094] Step S91: In the absence of ambient light, adjust the refresh rate and brightness of the target screen in the electronic device to obtain the actual energy intensity of the corresponding screen light signal detected by the target sensor.
[0095] Step S92: Input the refresh rate and brightness of the target screen obtained from each adjustment into the initial machine learning model for analysis to obtain the corresponding predicted energy intensity;
[0096] Step S93: By reducing the prediction loss between the predicted energy intensity and the corresponding actual energy intensity, the parameters of the initial machine learning model are adjusted to obtain the machine learning model.
[0097] In this embodiment, the implementation method of step S91 can be obtained through experimental testing as described above, and the implementation process will not be detailed here. This embodiment can associate and store the refresh rate and brightness obtained from each adjustment of the target screen with the actual energy intensity of the detected screen light signal as a set of sample data. This actual energy intensity can then be used as a label. Multiple sets of sample data are obtained in this way. The refresh rate and brightness of the target screen are input into the initial machine learning model for fitting analysis to obtain the corresponding predicted energy intensity, i.e., the intensity after the predicted FFT. Then, a loss function can be used to calculate the prediction loss between the predicted energy intensity and the corresponding actual energy intensity. Based on this prediction loss, the parameters of the initial machine learning model are adjusted until the training iterations reach a specified number, or the prediction loss converges. The finally trained machine learning model is used as a machine learning model for analyzing the energy intensity of the screen light signal detected by the target sensor at different refresh rates and brightness levels in electronic devices under conditions of no ambient light.
[0098] The above describes a flicker processing method provided by the embodiments of this application. The following will describe the apparatus for performing the above flicker processing method.
[0099] Reference Figure 10 This is a schematic diagram of the structure of a flicker processing device according to an embodiment of this application. This flicker processing device can be applied to electronic devices as described above, such as... Figure 10 As shown, the strobe processing device may include:
[0100] The first acquisition module 101 is used to acquire at least one set of target data based on the light signal detected by the target sensor of the electronic device at a target time, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen;
[0101] The first determining module 102 is used to determine the second energy intensity corresponding to the target refresh rate and the target brightness;
[0102] The second determining module 103 is used to determine the ambient light flicker frequency of the environment in which the target screen is located at the target time from the at least one set of target data, based on the target screen refresh rate and the second energy intensity.
[0103] In one possible implementation, the first determining module 102 described above may include:
[0104] The query unit is used to query the correspondence between different combinations of refresh rates and brightness of the target screen in the electronic device and different energy intensities, and to determine the second energy intensity corresponding to the target refresh rate and the target brightness.
[0105] Alternatively, the prediction unit is used to input the target refresh rate and the target brightness into a trained machine learning model for analysis, and predict the second energy intensity corresponding to the target refresh rate and the target brightness;
[0106] The machine learning model is used to analyze the energy intensity of the screen light signal detected by the target sensor at different refresh rates and brightness levels in the electronic device under no ambient light conditions.
[0107] Optionally, the unit for obtaining the above correspondence may include:
[0108] An energy intensity acquisition subunit is used to gradually adjust the refresh rate and brightness of the target screen in the electronic device in the absence of ambient light, acquire the energy intensity of the corresponding screen light signal detected by the target sensor, and establish the correspondence.
[0109] The energy intensity determination subunit is used to determine the energy intensity corresponding to each combination of different refresh rates and different brightness of the target screen in the electronic device based on a machine learning model, so as to establish the correspondence.
[0110] In one possible implementation, the second determining module 103 described above may include:
[0111] The comparison unit is used to compare the target refresh rate and the second energy intensity with each set of target data to obtain the corresponding comparison results;
[0112] The first determining unit is used to determine, based on the comparison result, the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequency.
[0113] Optionally, the first determining unit may include:
[0114] A first determining subunit is configured to determine the signal frequency as the ambient light flicker frequency of the environment in which the target screen is located at the target time if the number of the at least one signal frequency is one and is the same as the target refresh rate, and the first energy intensity is greater than the second energy intensity.
[0115] The second determining subunit is used to determine, based on the comparison results, candidate data that is different from the target refresh rate and the second energy intensity from multiple sets of target data;
[0116] The third determining subunit is used to determine the signal frequency in the candidate data as the ambient light flicker frequency of the environment in which the target screen is located at the target time if the candidate data is a set.
[0117] The fourth determining subunit is used to compare the first energy intensity of each of the multiple groups of candidate data if there are multiple groups of candidate data, and determine the signal frequency of the group with the largest first energy intensity as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
[0118] In some embodiments, the above-mentioned strobe processing apparatus may further include:
[0119] The third determining module is used to determine the target exposure time of the image acquisition device of the electronic device based on the ambient light flicker frequency in the image acquisition mode of the electronic device; the target exposure time is an integer multiple of the ambient light flicker period, and the ambient light flicker period is determined based on the ambient light flicker frequency;
[0120] An adjustment module is used to adjust the configuration parameters of the image acquisition device according to the target exposure time.
[0121] Optionally, the model training module used to train the machine learning model may also include:
[0122] The first acquisition unit is used to adjust the refresh rate and brightness of the target screen in the electronic device in the absence of ambient light, and acquire the actual energy intensity of the corresponding screen light signal detected by the target sensor.
[0123] The analysis unit is used to input the refresh rate and brightness of the target screen obtained from each adjustment into the initial machine learning model for analysis, and obtain the corresponding predicted energy intensity.
[0124] The parameter adjustment unit is used to adjust the parameters of the initial machine learning model by reducing the prediction loss between the predicted energy intensity and the corresponding actual energy intensity, thereby obtaining the machine learning model.
[0125] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the flicker processing methods provided in this application.
[0126] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the flicker processing methods provided in this application.
[0127] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0128] Based on the above description of the embodiments, the implementation can be carried out entirely or partially by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, training device, or data center to another website, computer, training device, 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 can be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0129] Furthermore, the various embodiments in this specification are described in a progressive or parallel manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, electronic devices, products, and media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant details can be found in the method section.
Claims
1. A flicker processing method, applied to an electronic device, the method comprising: At a target time, at least one set of target data is acquired by the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; one set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen; Determine the second energy intensity corresponding to the target refresh rate and the target brightness; The target refresh rate and the second energy intensity are compared with each set of target data to obtain the corresponding comparison results; Based on the comparison results, the ambient light flicker frequency of the environment in which the target screen is located at the target time is determined from the signal frequencies.
2. The method according to claim 1, wherein determining the second energy intensity corresponding to the target refresh rate and the target brightness includes any one of the following: Query the correspondence between different combinations of refresh rates and brightness of the target screen in the electronic device and different energy intensities, and determine the second energy intensity corresponding to the target refresh rate and the target brightness; The target refresh rate and the target brightness are input into a trained machine learning model for analysis to predict the second energy intensity corresponding to the target refresh rate and the target brightness; in, The machine learning model is used to analyze the energy intensity of the screen light signal detected by the target sensor at different refresh rates and brightness levels in the electronic device under no ambient light conditions.
3. The method according to claim 1, wherein determining the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequencies based on the comparison result comprises: If the number of the at least one signal frequency is one and is the same as the target refresh rate, and the first energy intensity is greater than the second energy intensity, the signal frequency is determined to be the ambient light flicker frequency of the environment in which the target screen is located at the target time.
4. The method according to claim 1, wherein determining the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequencies based on the comparison result comprises: Based on the comparison results, candidate data that differs from the target refresh rate and the second energy intensity are determined from multiple sets of target data; If the candidate data is a set, the signal frequency in the candidate data is determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time. If there are multiple sets of candidate data, the first energy intensity of each of the multiple sets of candidate data is compared, and the signal frequency of the group with the largest first energy intensity is determined as the ambient light flicker frequency of the environment in which the target screen is located at the target time.
5. The method according to any one of claims 1-4, further comprising: In the image acquisition mode of the electronic device, the target exposure time of the image acquisition device of the electronic device is determined based on the ambient light flicker frequency; The target exposure time is an integer multiple of the ambient light flicker period, and the ambient light flicker period is determined based on the ambient light flicker frequency; Adjust the configuration parameters of the image acquisition device according to the target exposure time.
6. The method according to claim 2, wherein the machine learning model is trained at least in the following ways: In the absence of ambient light, the refresh rate and brightness of the target screen in the electronic device are adjusted to obtain the actual energy intensity of the corresponding screen light signal detected by the target sensor; The refresh rate and brightness of the target screen obtained from each adjustment are input into the initial machine learning model for analysis to obtain the corresponding predicted energy intensity; By reducing the prediction loss between the predicted energy intensity and the corresponding actual energy intensity, the parameters of the initial machine learning model are adjusted to obtain the machine learning model.
7. The method according to claim 2, wherein the process of obtaining the correspondence includes any one of the following: In the absence of ambient light, the refresh rate and brightness of the target screen in the electronic device are gradually adjusted to obtain the energy intensity of the corresponding screen light signal detected by the target sensor, so as to establish the correspondence. Based on a machine learning model, the energy intensity corresponding to each combination of different refresh rates and different brightness of the target screen in the electronic device is determined, so as to establish the correspondence.
8. A flicker processing device, applied to an electronic device, the device comprising: The first acquisition module is used to acquire at least one set of target data based on the light signal detected by the target sensor of the electronic device at a target time, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen; The first determining module is used to determine the second energy intensity corresponding to the target refresh rate and the target brightness; The second determining module is used to compare the target refresh rate and the second energy intensity with each set of target data to obtain the corresponding comparison results; based on the comparison results, it determines the ambient light flicker frequency of the environment in which the target screen is located at the target time from the signal frequency.
9. An electronic device comprising at least one target sensor, at least one memory, and at least one processor, wherein: The target sensor is disposed below the target screen of the electronic device and is used to detect light signals, process the light signals, and obtain at least one set of target data; the set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency; The memory is used to store multiple computer instructions; The processor is used to load and execute the computer instructions to perform the following steps: At a target time, at least one set of target data is acquired by the electronic device based on the light signal detected by the target sensor, as well as the target refresh rate and target brightness of the target screen in the electronic device at the same time; one set of target data includes a signal frequency and a first energy intensity of the light signal at the signal frequency, and the target sensor is disposed below the target screen; Determine the second energy intensity corresponding to the target refresh rate and the target brightness; The target refresh rate and the second energy intensity are compared with each set of target data to obtain the corresponding comparison results; based on the comparison results, the ambient light flicker frequency of the environment in which the target screen is located at the target time is determined from the signal frequency.
Citation Information
Patent Citations
Ambient light detection method and device, electronic equipment and storage medium
CN111486950A
Stroboscopic frequency information detection method and device, and stroboscopic suppression method and device
CN113280913A