PWM frequency adjustment method, electronic device, and readable storage medium

By dynamically adjusting the PWM frequency during interface switching and combining the transition effect, the screen flash and power consumption increase caused by high-frequency PWM dimming is solved, and the display effect and user experience are improved.

WO2025138809A1PCT designated stage expired Publication Date: 2025-07-03HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/109661
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-29
Filing Date
2024-08-02
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In the prior art, when electronic devices use high-frequency PWM dimming to achieve eye protection function, power consumption increases, and changes in PWM frequency lead to screen flashing, affecting display effect and user experience.

Method used

By dynamically adjusting the PWM frequency during the interface switching process, combining interface transition effects, such as transition animation, color gamut changes and brightness changes, masking screen flashes, optimizing display effects and reducing power consumption.

Benefits of technology

It effectively covers up the screen flash, improves the display effect, reduces the power consumption of electronic devices, and increases user viscosity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024109661_03072025_PF_FP_ABST
    Figure CN2024109661_03072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of terminals. Disclosed are a PWM frequency adjustment method, an electronic device, and a readable storage medium. The method comprises: receiving an interface switching operation, which is an operation for triggering an electronic device to switch between a first interface and a second interface; in response to the interface switching operation, the electronic device presenting an interface transition effect corresponding to the interface switching operation; and during the presentation of the interface transition effect, adjusting a PWM frequency, wherein the interface transition effect comprises at least one of a transition animation, a color gamut variation effect, an interface transparency variation effect and a brightness variation effect. By means of an interface transition effect, the present application covers up screen flash, which is brought about by the adjustment of a PWM frequency, of a display screen, thereby improving the display effect of the screen.
Need to check novelty before this filing date? Find Prior Art

Description

PWM frequency adjustment method, electronic device and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 29, 2023, with application number 202311872440.1 and application name “PWM frequency adjustment method, electronic device and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a PWM frequency adjustment method, an electronic device, and a readable storage medium. Background Art

[0003] With the development of terminal technology, users use electronic devices more and more frequently. The display screens of electronic devices usually adopt pulse width modulation (PWM) dimming. In this case, if the PWM frequency is lower than a certain threshold, users are prone to eye fatigue after watching the display screen of the electronic device for a long time. Therefore, the screen eye protection function can usually be achieved by adjusting the PWM frequency.

[0004] At present, in order to realize the eye protection function of the screen, generally, more and more electronic devices adopt high-frequency PWM dimming, that is, the electronic devices can be dimmed through a higher PWM frequency.

[0005] However, since the PWM frequency is always at a high frequency, the power consumption of the electronic device increases. At the same time, if the PWM frequency is adjusted during use of the electronic device, the screen may flicker when the PWM frequency changes greatly, resulting in poor screen display quality.

[0006] Summary of the Invention

[0007] This application provides a PWM frequency adjustment method, electronic device, and readable storage medium, which can be used to solve the problem of screen flickering in a display screen, resulting in poor screen display quality. The technical solution is as follows:

[0008] In a first aspect, a method for adjusting PWM frequency is provided, which is applied to an electronic device having a display screen, the method comprising:

[0009] Receive an interface switching operation, which is an operation that triggers the electronic device to switch between a first interface and a second interface; respond to the interface switching operation, display the interface transition effect corresponding to the interface switching operation; and adjust the PWM frequency of the display screen during the display of the interface transition effect.

[0010] This allows the PWM frequency to be adjusted as the displayed content changes, ensuring the display's eye protection and reducing the electronic device's power consumption. Furthermore, the PWM frequency is adjusted during the display's transitions. This allows the varying effects of these transitions to mask any screen flickering caused by the PWM frequency adjustment, improving the display quality. This flickering is virtually unnoticeable to users, increasing user engagement.

[0011] As an example of the present application, the interface transition effect includes at least one of a transition animation, a color gamut change effect, an interface transparency change effect, and a brightness change effect.

[0012] In this way, by setting different interface transition effects, the richness of interface transitions is improved, and the reliability of covering up screen flicker during interface transitions is improved.

[0013] As an example of the present application, the brightness of the first interface is greater than the brightness of the second interface;

[0014] Based on this, when the electronic device displays the interface transition effect, the operation of adjusting the PWM frequency of the display screen includes:

[0015] When the interface switching operation is the first operation, the PWM frequency of the display screen is increased during the display interface transition effect, and the first operation is an operation that triggers the electronic device to switch from the second interface to the first interface; when the interface switching operation is the second operation, the PWM frequency of the display screen is lowered during the display interface transition effect, and the second operation is an operation that triggers the electronic device to switch from the first interface to the second interface.

[0016] In this way, when the interface displayed on the display screen switches from the first interface to the second interface, the electronic device can display the first transition effect, and in the process of displaying the first transition effect, the PWM frequency can be reduced. That is, since the PWM frequency is reduced when the second interface with reduced display brightness is displayed, the power consumption of the electronic device is reduced. When the interface displayed on the display screen switches from the second interface to the first interface, the electronic device can display the second transition effect, and in the process of displaying the second transition effect, the PWM frequency can be increased. In this way, the purpose of dynamically adjusting the PWM frequency according to the different displayed content is achieved, and since the PWM frequency can be increased, the eye protection function of the electronic device is taken into account. In addition, the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect. In this way, the different effects of the interface transition effect during the display process can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, thereby improving the display effect of the screen.

[0017] As an example of the present application, the second interface is an AOD interface. When the interface switching operation of the electronic device is the second operation, before reducing the PWM frequency of the display screen in the process of displaying the interface transition effect, the type of AOD mode in the electronic device can also be determined. The type of AOD mode includes a global display mode and a local display mode.

[0018] Based on this, when the interface switching operation is the second operation, the operation of reducing the PWM frequency of the display screen during the process of displaying the interface transition effect includes:

[0019] When the interface switching operation is the second operation and the type of the AOD mode is the global display mode, the PWM frequency of the display screen is reduced during the display of the interface transition effect.

[0020] In some embodiments, information related to the settings of the electronic device may be stored in a settings database. Therefore, the electronic device may query the settings database to determine the type of AOD mode from the settings database.

[0021] In this way, by determining the type of the AOD mode, the PWM frequency can be reduced in a more targeted manner, thereby improving the reliability of adjusting the PWM frequency.

[0022] As an example of the present application, the interface switching operation is the second operation; the electronic device includes an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation;

[0023] Based on this, the electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation, including:

[0024] The interface switching module displays a first transition animation from the first interface to the second interface in response to the second operation;

[0025] When the interface switching operation of the electronic device is a second operation that triggers the electronic device to switch from the first interface to the second interface, the operation of reducing the PWM frequency of the display screen during the process of displaying the interface transition effect includes:

[0026] During the process of displaying the first transition animation, the interface switching module sends a frequency reduction instruction to the PWM adjustment module; the PWM adjustment module reduces the PWM frequency in response to the frequency reduction instruction.

[0027] In some embodiments, the interface switching operation is the first operation; the electronic device includes an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation;

[0028] Based on this, the electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation, including:

[0029] The interface switching module displays a second transition effect of switching from the second interface to the first interface in response to the first operation, wherein the second transition effect includes a second transition animation;

[0030] When the interface switching operation is the first operation, the operation of increasing the PWM frequency of the display screen during the display of the interface transition effect by the electronic device includes:

[0031] During the process of displaying the second transition effect, the interface switching module sends a frequency increase instruction to the PWM adjustment module; the PWM adjustment module increases the PWM frequency in response to the frequency increase instruction.

[0032] In this way, the interface switching module can send different frequency adjustment instructions to the PWM adjustment module according to different interface switching operations, thereby improving the reliability and accuracy of adjusting the PWM frequency.

[0033] As an example of the present application, the interface switching operation is the second operation, and the interface transition effect also includes an interface transparency change effect; based on this, the electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation. The operation includes:

[0034] In response to an interface switching operation, ambient light data of the environment in which the electronic device is located is obtained; based on the ambient light data, the display transparency of the interface background of the second interface is determined; the transparency of the interface background of the second interface is set to the display transparency; and the interface transition effect is displayed based on the set interface background.

[0035] In this way, the display transparency is determined by the current ambient light data, and the transparency of the interface background in the second interface is set to the display transparency, which not only ensures the aesthetics of the second interface, but also enables the information in the second interface to be quickly obtained by the user without being attracted by the interface background.

[0036] As an example of the present application, the interface transition effect also includes a color gamut change effect;

[0037] The electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation, including:

[0038] In response to the interface switching operation, if the interface switching operation is a first operation, the color gamut of the display screen is increased; in response to the interface switching operation, if the interface switching operation is a second operation, the color gamut of the display screen is reduced.

[0039] As an example of the present application, the electronic device includes an interface switching module and a color gamut adjustment module;

[0040] Based on this, if the interface switching operation is the first operation, the operation of the electronic device to improve the color gamut of the display screen includes:

[0041] The color gamut adjustment module improves the color gamut of the display screen when receiving the color gamut improvement instruction sent by the interface switching module, and the color gamut improvement instruction is sent by the interface switching module when receiving the first operation;

[0042] If the interface switching operation is the second operation, the operation of the electronic device reducing the color gamut of the display screen includes:

[0043] The color gamut adjustment module reduces the color gamut of the display screen when receiving the color gamut reduction instruction sent by the interface switching module. The color gamut reduction instruction is sent by the interface switching module when receiving the second operation.

[0044] In this way, by performing different operations on the color gamut of the display screen in different scenarios, the color display of the display screen can be more adapted to the displayed image, thereby improving the display effect of the display screen.

[0045] As an example of this application, the interface transition effect also includes a brightness change effect;

[0046] The electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation, including:

[0047] In response to the interface switching operation, if the interface switching operation is a first operation, the brightness of the display screen is increased; in response to the interface switching operation, if the interface switching operation is a second operation, the brightness of the display screen is reduced.

[0048] As an example of the present application, the electronic device includes at least two gamma curves, and each of the at least two gamma curves corresponds to a PWM frequency.

[0049] In this way, by setting different gamma curves, the adjustment of the PWM frequency is made more reliable and smoother.

[0050] As an example of the present application, the second interface is an AOD interface. When the interface switching operation of the electronic device is the second operation, after reducing the PWM frequency of the display screen during the display of the interface transition effect, the AOD interface can also be displayed, and the screen refresh rate of the display screen can be reduced. For example, when the electronic device displays the AOD interface, that is, when the electronic device is statically displayed, the screen refresh rate of the display screen can be reduced to 1Hz.

[0051] In this way, the power consumption of the electronic device is reduced by reducing the screen refresh rate of the display screen.

[0052] As an example of the present application, when the interface switching operation is the first operation, the operation of increasing the PWM frequency of the display screen during the display of the interface transition effect includes:

[0053] When the interface switching operation is the first operation, the PWM frequency is increased from the first frequency to the second frequency during the display of the interface transition effect, and the first frequency is lower than the second frequency;

[0054] When the interface switching operation is the second operation, the operation of reducing the PWM frequency of the display screen during the display of the interface transition effect includes:

[0055] When the interface switching operation is the second operation, the PWM frequency is reduced from the second frequency to the first frequency during the process of displaying the interface transition effect.

[0056] In this way, by setting the first frequency and the second frequency, the electronic device has data support when adjusting the PWM frequency, thereby improving the reliability and accuracy of adjusting the PWM frequency.

[0057] In a second aspect, an electronic device is provided. The electronic device includes a processor and a memory, wherein the memory is configured to store a program that supports the electronic device in executing the PWM frequency adjustment method provided in the first aspect, and to store data related to implementing the PWM frequency adjustment method provided in the first aspect. The processor is configured to execute the program stored in the memory. The electronic device may further include a communication bus configured to establish a connection between the processor and the memory.

[0058] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer executes the PWM frequency adjustment method described in the first aspect.

[0059] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the PWM frequency adjustment method described in the first aspect.

[0060] The technical effects obtained by the above-mentioned second, third and fourth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0062] FIG2 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0063] FIG3 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0064] FIG4 is a block diagram of a software system of an electronic device provided in an embodiment of the present application;

[0065] FIG5 is a flow chart of a PWM frequency adjustment method provided in an embodiment of the present application;

[0066] FIG6 is a pulse diagram corresponding to different PWM frequencies provided in an embodiment of the present application;

[0067] FIG7 is a schematic diagram of brightness change provided by an embodiment of the present application;

[0068] FIG8 is a flow chart of another PWM frequency adjustment method provided in an embodiment of the present application;

[0069] FIG9 is a schematic diagram of a PWM frequency reduction process provided by an embodiment of the present application;

[0070] FIG10 is a schematic diagram of a PWM frequency increase process provided by an embodiment of the present application;

[0071] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0073] It should be understood that the “multiple” mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, words such as “first” and “second” are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not necessarily limit them to be different.

[0074] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0075] With the advancement of terminal technology, users are using electronic devices more frequently, and electronic device displays often utilize PWM dimming. With PWM dimming, the perceived brightness can be adjusted by adjusting the PWM duty cycle. However, adjusting the PWM duty cycle does not change the PWM frequency. If the PWM frequency falls below a certain threshold, users can easily experience eye fatigue after viewing the electronic device display for extended periods of time. Therefore, to provide eye protection, an increasing number of electronic devices are adopting high-frequency PWM dimming, which allows them to dim at a higher PWM frequency. However, maintaining a high PWM frequency increases the power consumption of the electronic device. Furthermore, if the PWM frequency is adjusted during use, large fluctuations in the PWM frequency may cause screen flickering, resulting in poor display quality. This flickering may be noticeable to users, reducing user engagement.

[0076] In order to achieve the screen eye protection function and reduce the power consumption of electronic devices, an embodiment of the present application provides a PWM frequency adjustment method, in which the electronic device can dynamically adjust the PWM frequency according to the display content. For example, in the case where the user needs to stare at the display screen for a long time, such as when the user uses the electronic device to read an e-book, watch a video, etc., the electronic device can increase the PWM frequency to achieve the eye protection effect. In the case where the user does not need to stare at the display screen for a long time, such as when the AOD (Always On Display) interface is displayed, the electronic device can display clock information and power information without displaying other information. The user can quickly obtain the required information by glancing at the display screen. In this case, there is no need to use high-frequency PWM for dimming, and the electronic device can reduce the PWM frequency to reduce the power consumption of the electronic device.

[0077] In addition, in the process of adjusting the PWM frequency, in order to improve the problem of poor display effects caused by screen flickering of the display screen during the PWM adjustment process, the electronic device can dynamically adjust the PWM frequency during the process of displaying the interface transition effect when the interface switching occurs. That is, when the electronic device receives an interface switching operation, it displays the interface transition effect corresponding to the interface switching operation. In the process of displaying the interface transition effect, the electronic device can adjust the PWM frequency. Since the PWM frequency can be adjusted as the displayed content changes, the eye protection function of the display screen is guaranteed and the power consumption of the electronic device is reduced. In addition, the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect. In this way, the different effects of the interface transition effect during the display process can cover up the screen flickering caused by the adjustment of the PWM frequency, thereby improving the display effect of the screen. The user is almost unaware of the occurrence of the screen flicker, thereby improving user stickiness.

[0078] For ease of understanding, before introducing the method provided in the embodiments of the present application in detail, the application scenarios involved in the embodiments of the present application are introduced below.

[0079] Please refer to Figure 1, which is a schematic diagram of an application scenario provided by an embodiment of the present application. In one application scenario, after the user finishes using the mobile phone, the user can trigger the power button to exit the currently displayed interface and enter the screen-off state. Alternatively, after the user finishes using the mobile phone, the user has not used the mobile phone. Then, when the standby time reaches the automatic screen-off time, the mobile phone can automatically exit the currently displayed interface and enter the screen-off state. If the mobile phone is set with an AOD mode, the AOD interface can be displayed after the mobile phone enters the screen-off state. For example, when the mobile phone displays the social application interface S1 of the video application as shown in Figure (a) of Figure 1, if the user presses the power button S2, then referring to Figure (b) of Figure 1, the mobile phone can display the interface transition effect, that is, display the transition animation of the social application interface S1 switching to the AOD interface S3. In the process of displaying the transition animation, the mobile phone can reduce the PWM frequency, such as reducing the PWM frequency from 3840Hz (Hertz) to 1440Hz. Among them, a frame image in the transition animation can be shown as Figure (c) in Figure 1. When the transition animation display is completed, the mobile phone can display the AOD interface S3 as shown in Figure (d) in Figure 1.

[0080] It should be noted that the one-frame image in the interface transition effect in the embodiment of the present application is only an example. The electronic device can display the interface transition effect according to the transition method shown in Figure 1, or it can be displayed in other ways, such as through other preset motion effects. The preset motion effect can be a gradient effect from nothing to something, etc. The embodiment of the present application does not impose any specific restrictions on this.

[0081] Please refer to Figure 2, which is a schematic diagram of another application scenario provided by an embodiment of the present application. In another application scenario, referring to Figure 2 (a), when the mobile phone displays the interface transition effect of switching from the social application interface S1 to the AOD interface S3, the interface transition effect can not only include the transition animation of the interface social application interface S1 switching to the AOD interface S3, but also include the color gamut change effect in the AOD interface S3. Among them, a frame of image A in the interface transition effect can be as shown in Figure 2 (b). Any frame of image B located after the frame of image A can be as shown in Figure 2 (c). In Figure 2 (c), the color gamut of the AOD interface is reduced. When the transition animation display is completed, the mobile phone can display the AOD interface S3 as shown in Figure 2 (d).

[0082] It should be noted that when the mobile phone displays the interface transition effect of switching from the social application interface S1 to the AOD interface S3, the interface transition effect may include not only the transition animation of switching from the social application interface S1 to the AOD interface S3 and the color gamut change effect in the AOD interface S3, but also the effect of reducing the brightness of the display screen and the effect of changing the transparency of the AOD interface. These will not be described one by one in the drawings of the embodiments of this application.

[0083] Please refer to Figure 3. When the mobile phone displays the AOD interface S3 shown in Figure 3 (a), the user touches the mobile phone screen. Referring to Figure 3 (b), the mobile phone can display the interface transition effect, that is, the transition animation of the AOD interface S3 switching to the lock screen interface S4, the display color gamut change effect, and the lock screen wallpaper display transparency change effect. In the process of displaying the interface transition effect, the mobile phone can increase the PWM frequency, such as increasing the PWM frequency from 1440Hz (Hertz) to 3840Hz, and in the process of displaying the interface transition effect, the size of the relevant information in the interface also changes, such as the clock information is enlarged. Among them, a frame image in the interface transition effect can be shown in Figure 3 (c). In Figure 3 (c), the transparency of the AOD interface changes from the original 50% to 40%, and the display color gamut is increased. When the interface transition effect is displayed, the mobile phone can display the lock screen interface S4 shown in Figure 3 (d), in which the transparency of the lock screen wallpaper is 0%. The font size of the clock information in the lock screen interface S4 is significantly larger than that in the AOD interface.

[0084] It should be noted that when the mobile phone displays the AOD interface S3, the user can also trigger the transition effect of the mobile phone displaying the AOD interface S3 to the lock screen interface S4 by pressing the power button S2. This embodiment of the application does not specifically limit this.

[0085] It should be noted that the embodiments of the present application are only described using the application scenarios shown in Figures 1 to 3 above as examples, and do not constitute a limitation on the embodiments of the present application.

[0086] Next, the software system of the electronic device 100 will be described.

[0087] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the present application, the software system of the electronic device 100 is exemplarily described by taking the Android system of the layered architecture as an example.

[0088] FIG4 is a block diagram of a software system of an electronic device 100 provided in an embodiment of the present application. Referring to FIG4 , the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other via software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom, namely, the application layer, the application framework layer, the native layer, the hardware abstraction layer (HAL), and the kernel layer.

[0089] The application layer can include a series of application packages. As shown in Figure 4, the application package can include applications such as camera, calendar, map, video, navigation, Bluetooth, etc.

[0090] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions, such as the interface switching module, power management module (PMS), PWM adjustment module, color gamut adjustment module, and sensor service module (SensorService), as shown in Figure 3.

[0091] As an example, when the second interface is an AOD interface, the interface switching module may be a lock screen application (keyguard), the PWM adjustment module may be a display tube service module (DMS), and the color gamut adjustment module may be a display engine (DE service).

[0092] In some embodiments, the power management module is configured to send a power-off message or a power-on message to the interface switching module upon receiving a user trigger operation on the power button. The interface switching module can be configured to display interface transition effects based on the messages received from the power management module and to send relevant instructions to the PWM adjustment module and the color gamut adjustment module. The PWM adjustment module is configured to increase or decrease the PWM frequency based on the instructions sent by the interface switching module. The color gamut adjustment module is configured to adjust the color gamut of the display screen based on the instructions sent by the interface switching module.

[0093] Next, an example is given in which the power management module sends a power-off message to the lock screen application so that the electronic device switches from the first interface to the AOD interface.

[0094] In some embodiments, upon receiving a user trigger operation on the power button, the power management module sends a power-off message to the interface switching module. Upon receiving the power-off message sent by the power management module, the interface switching module activates the AOD function and sends an AOD display message to the display driver in the kernel layer, which instructs the display driver to drive the display according to the type of AOD mode. After activating the AOD function, the interface switching module can register a callback notification for the display transparency of the lock screen wallpaper (the display transparency can be represented by an alpha value) in the PWM adjustment module and register the subsystem's virtual ambient light sensor in the sensor service module. After completing the registration of the virtual ambient light sensor, the sensor service module sends an ambient light acquisition message to the virtual ambient light sensor, which instructs the virtual ambient light sensor to send the detected ambient light data to the PWM adjustment module. Upon receiving the ambient light data, the PWM adjustment module determines the display transparency of the lock screen wallpaper based on the ambient light data and sends the display transparency to the interface switching module. Upon receiving the display transparency, the interface switching module sets the transparency of the lock screen wallpaper in the AOD interface to the display transparency and displays the interface transition effect from the first application interface to the AOD interface. Among them, when the AOD interface is displayed after the interface transition effect is displayed, the transparency of the lock screen wallpaper in the AOD interface is the display transparency. In the process of displaying the interface transition effect, the interface switching module can also send a frequency reduction instruction to the PWM adjustment module and a color gamut reduction instruction to the color gamut adjustment module. When the PWM adjustment module receives the frequency reduction instruction, it reduces the PWM frequency. When the color gamut adjustment module receives the color gamut reduction instruction sent by the interface switching module, it reduces the color gamut of the display.

[0095] In some embodiments, when the second interface is an AOD interface, while the interface switching module is displaying the interface transition effect, the interface switching module can also terminate the display screen's bright screen animation and magazine wallpaper function, and lock the system.

[0096] In some embodiments, when the interface switching module ends the display of the interface transition effect and displays the AOD interface, the interface switching module can switch the display screen to energy-saving mode, even if the electronic device enters the DOZE state, and hide non-AOD icons (or non-full-screen AOD icons) and layer scaling effects.

[0097] The local layer may include an Accelerated Graphical Port (AGP), which is used to complete PWM frequency adjustment in the PWM adjustment module, and when the interface switching module displays a still image (AOD interface), switch the display screen to TE and reduce the screen refresh rate of the display screen.

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

[0099] As an example, the display driver is used to drive the display screen to display in the AOD mode when receiving the AOD display message sent by the interface switching module.

[0100] In some embodiments, the electronic device further includes a subsystem, which may include a virtual ambient light sensor. The virtual ambient light sensor may send the collected ambient light data to the interface switching module through the HAL layer.

[0101] Based on the execution subject provided by the above embodiment, the PWM frequency adjustment method provided by the embodiment of the present application is introduced below. Please refer to Figure 5, which is a flow chart of a PWM frequency adjustment method according to an exemplary embodiment. As an example and not a limitation, the embodiment of the present application uses the second interface as the AOD interface and takes reducing the PWM frequency as an example for explanation. The method can be executed by the above electronic device, and the electronic device can be implemented through the interaction of multiple modules. The method may include some or all of the following contents:

[0102] Step 501: When the first interface is displayed on the display screen, if the power management module receives a power switching operation, it sends a power off message to the interface switching module.

[0103] It should be noted that the first interface is any interface displayed on the display screen of the electronic device when the display screen is in a bright screen state. For example, the first interface can be the desktop of the electronic device, the application interface of any application, etc. The brightness of the first interface is greater than the brightness of the AOD interface.

[0104] In some embodiments, the power switching operation can be triggered by the user or automatically by the electronic device. For example, when the first interface is displayed on the display screen, the user can press the power button, so that the power management module can receive the power switching operation. Alternatively, when the first interface is displayed on the display screen and the user has not operated the electronic device for a long time, if the time since the user last operated the electronic device reaches a preset time (the standby time of the electronic device reaches a preset time), the electronic device automatically triggers the power switching operation.

[0105] It should be noted that the preset time length can be set by the user or by default by the electronic device. For example, the first preset time length can be 20 seconds, 30 seconds, etc.

[0106] Step 502: upon receiving the power-off message, the interface switching module determines the type of the AOD mode.

[0107] When setting the AOD mode, the user may set the AOD mode type to global display mode or to local display mode. Among them, when the AOD mode type is local display mode, the clock view is displayed in the AOD interface, and the lock screen wallpaper is not displayed (the background in the AOD interface is black). In this case, the brightness of the AOD interface is relatively dark, which reduces the power consumption of the electronic device to a certain extent. Therefore, you can choose to adjust the PWM frequency or not. When the AOD mode type is global display mode, the lock screen wallpaper is displayed with a darker brightness. In this case, in order to reduce the power consumption of the electronic device, it is necessary to adjust the PWM frequency. In addition, when the PWM frequency is adjusted when the local display mode is selected, the PWM frequency adjusted when in the local display mode may be the same as or different from the PWM frequency adjusted when in the global display mode. Therefore, in order to accurately adjust the PWM frequency, the interface switching module can determine the type of AOD mode when receiving the power off message.

[0108] Of course, in order to enable the display driver to drive the display screen to display the AOD interface in a corresponding manner, the interface switching module may also determine the type of the AOD mode.

[0109] In some embodiments, information related to the settings of the electronic device may be stored in a settings database. Therefore, the interface switching module may query the settings database and determine the type of the AOD mode from the settings database.

[0110] Step 503: The interface switching module activates the AOD function and sends an AOD display message to the display driver.

[0111] It should be noted that the AOD display message may carry the type of AOD mode to instruct the display driver to drive the display according to the type of AOD mode. In the embodiment of the present application, the type of AOD mode carried in the AOD display message is the global display mode as an example for description.

[0112] In some embodiments, when the AOD mode is a global display mode, the interface switching module can launch a global AOD service to launch the AOD function. When the AOD mode is a local display mode, the interface switching module can launch an AOD application package (Android application package, APK).

[0113] Step 504: upon receiving the AOD display message, the display driver drives the display screen to display the AOD interface according to the type of the AOD mode.

[0114] It should be noted that, when the type of the AOD mode carried in the AOD display message is the global display mode, the display driver may drive the display screen to display the AOD interface according to the global display mode.

[0115] Step 505: The interface switching module sends a first registration instruction to the PWM adjustment module, and sends a second registration instruction to the sensor service module.

[0116] It should be noted that the first registration instruction is used to register the callback notification of the display transparency of the lock screen wallpaper (the display transparency can be represented by the α value) in the PWM adjustment module, and the second registration instruction is used to register the virtual ambient light sensor in the sensor service module.

[0117] In order to successfully call the alpha value and ambient light data, the interface switching module can instruct the PWM adjustment module to register the callback notification of display transparency and instruct the sensor service module to register the virtual ambient light sensor.

[0118] It should be noted that, in the embodiment of the present application, there is no specific limitation on the order in which the interface switching module executes step 503 and step 505.

[0119] Step 506: The PWM adjustment module registers a callback notification of the display transparency of the lock screen wallpaper.

[0120] Step 507: The sensor service module registers the virtual ambient light sensor and sends an ambient light acquisition message to the registered virtual ambient light sensor.

[0121] It should be noted that the ambient light acquisition message is used to instruct the virtual ambient light sensor to send the detected ambient light data to the PWM adjustment module.

[0122] Step 508: Upon receiving the ambient light acquisition message, the virtual ambient light sensor sends the detected ambient light data to the PWM adjustment module.

[0123] It should be noted that the ambient light data includes light intensity indicating the current environment in which the electronic device is located.

[0124] Step 509: The PWM adjustment module determines the display transparency of the lock screen wallpaper according to the ambient light data.

[0125] As an example, the electronic device may store a correspondence between display transparency and ambient light data. In this way, the PWM adjustment module may determine the display transparency of the lock screen wallpaper from the stored correspondence based on the received ambient light data. The correspondence may be represented by a two-dimensional curve or a table. Alternatively, the electronic device may store a relationship function that indicates the correspondence between ambient light data and display transparency. When the PWM adjustment module receives ambient light data, it may calculate the display transparency of the lock screen wallpaper based on the ambient light data using the relationship function.

[0126] Step 510: The PWM adjustment module sends the display transparency to the interface switching module.

[0127] Since the PWM adjustment module has registered a callback notification of the interface switching module to call back the display transparency, the PWM adjustment module can send the display transparency to the interface switching module.

[0128] Step 511: The interface switching module displays a first transition animation according to the display transparency.

[0129] In some embodiments, the interface switching module sets the transparency of the lock screen wallpaper in the AOD interface to display transparency, and then displays the first transition animation. That is, when an image frame carrying the lock screen wallpaper appears in the first transition animation, the transparency of the lock screen wallpaper in the image frame is display transparency. Alternatively, during the display of the first transition animation, the transparency of the lock screen wallpaper in the AOD interface is set to display transparency. In this case, depending on the timing of setting the display transparency, a scene in which the transparency of the lock screen wallpaper changes may or may not appear in the first transition animation.

[0130] As an example, the first transition animation includes the exit animation of the first interface and the display animation of the AOD interface. If the interface switching module completes the transparency setting of the lock screen wallpaper before displaying the display animation of the AOD interface during the display of the first transition animation, then in the image frame carrying the lock screen wallpaper in the display animation of the AOD interface, the transparency of all lock screen wallpapers is the display transparency. If the interface switching module sets the transparency of the lock screen wallpaper during the display animation of the AOD interface during the display of the first transition animation, then the display animation of the AOD interface includes a scene in which the transparency of the lock screen wallpaper changes.

[0131] In some embodiments, the interface switching module can set the transparency of the lock screen wallpaper and display the first transition animation through a sleep function, and the sleep function can be startGoingToSleep.

[0132] Step 512: During the display of the first transition animation, the interface switching module sends a frequency reduction instruction and a brightness adjustment instruction to the PWM adjustment module, and sends a color gamut reduction instruction to the color gamut adjustment module.

[0133] To reduce power consumption in electronic devices and prevent users from noticing screen flickering during PWM frequency adjustment, the interface switching module can send a frequency reduction instruction and a brightness adjustment instruction to the PWM adjustment module during the first transition animation. This instructs the PWM adjustment module to reduce the PWM frequency and the brightness of the display screen during the first transition animation. At the same time, to implement the AOD function, the interface switching module can also send a color gamut reduction instruction to the color gamut adjustment module.

[0134] Step 513: The PWM adjustment module reduces the PWM frequency from the second frequency to the first frequency when receiving the frequency reduction instruction, and reduces the brightness of the display screen when receiving the brightness reduction instruction.

[0135] It should be noted that the second frequency is greater than the first frequency. The second frequency is the PWM dimming frequency when the display is in the bright screen state, and the first frequency is the PWM dimming frequency when the display is in the AOD mode. For example, the second frequency can be 3840 Hz, and the first frequency can be 1440 Hz, etc. The embodiments of the present application do not impose specific limitations on the first and second frequencies.

[0136] In some embodiments, adjusting the PWM frequency means increasing the number of PWM pulses while maintaining the same duty cycle. For example, the adjustment process can be illustrated in FIG6 . For example, when the PWM duty cycle remains unchanged and the PWM frequency is 3840 Hz, the number of PWM pulses is 32 (the number within one cycle), and when the PWM frequency is 1440 Hz, the number of PWM pulses is 12 (the number within one cycle).

[0137] In some embodiments, in order to implement switching of PWM frequencies, the electronic device may include at least two gamma curves, where each of the at least two gamma curves corresponds to a PWM frequency.

[0138] It should be noted that the more gamma curves an electronic device includes, the smoother the PWM frequency adjustment process by the PWM adjustment module. For example, if the gamma curve corresponding to a first frequency and the gamma curve corresponding to a second frequency include gamma curves corresponding to other frequencies, the PWM adjustment module can sequentially reduce the PWM frequency according to the pulses corresponding to each gamma curve.

[0139] In some embodiments, when the PWM adjustment module receives a brightness reduction instruction, it can reduce the brightness of the display screen by adjusting the PWM duty cycle. Of course, it can also be reduced by other methods, and the embodiments of the present application do not impose specific restrictions on this.

[0140] In order to reflect the brightness change, an embodiment of the present application provides a schematic diagram of adjusting the brightness of the display screen, see Figure 7. In Figure 7, the brightness A corresponding to time T1 is the brightness of the display screen before the brightness is adjusted, and the brightness B corresponding to time T2 is the brightness of the display screen after the brightness is adjusted.

[0141] In some embodiments, after the PWM adjustment module reduces the PWM frequency from the second frequency to the first frequency, it may send a dimming completion message to the AGP.

[0142] Step 514: Upon receiving the color gamut reduction instruction, the color gamut adjustment module reduces the color gamut of the display screen.

[0143] It should be noted that the embodiment of the present application does not impose any specific limitation on the order of executing step 513 and step 514.

[0144] In some embodiments, while displaying the first transition animation, the interface switching module can instruct the PWM adjustment module to reduce the PWM frequency and brightness of the display screen, and instruct the color gamut adjustment module to reduce the color gamut of the display screen. The interface switching module can also terminate the display screen light-up animation and magazine wallpaper, and lock the system. Afterwards, the display screen is switched from the ON() state to the DOZE state, hiding the non-full-screen AOD icon and the layer zoom animation.

[0145] It should be noted that the interface switching module can terminate the display screen lighting effect and magazine wallpaper through the screen off function, which can be screenTurnedOff. The interface switching module can lock the system through the completion function, which can be finishedGoingToSleep. The interface switching module can switch the display from the ON state to the DOZE state through the dreamingStarted function, hiding the non-full-screen AOD icon and layer scaling effect.

[0146] In some embodiments, after the interface switching module completes the display of the first transition effect (including the first transition animation, the display brightness reduction effect, the AOD interface lock screen wallpaper transparency change effect, and the color gamut reduction effect) and the AOD interface display, it can send a display completion message to the AGP. Upon receiving the dimming completion message and the display completion message, the AGP can reduce the screen refresh rate of the display.

[0147] For example, AGP can reduce the screen refresh rate of a display screen to 1 Hz.

[0148] In an embodiment of the present application, when the interface displayed on the display screen switches from the first interface to the AOD interface, the electronic device can display the first transition effect, and in the process of displaying the first transition effect, the PWM frequency can be reduced. That is, since the PWM frequency is reduced when the AOD interface is displayed, the power consumption of the electronic device is reduced. In addition, the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect. In this way, the different effects of the interface transition effect during the display process can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, thereby improving the display effect of the screen.

[0149] Since the electronic device can not only reduce the PWM frequency, but also increase the PWM frequency, for example, when the second interface is the AOD interface and the electronic device switches from the AOD interface to the first interface, the electronic device can increase the PWM frequency. The process of increasing the PWM frequency of the electronic device is similar to the process of reducing the PWM frequency. In this embodiment of the application, the process of multiple modules in the electronic device interacting to increase the PWM frequency is not separately described.

[0150] Based on the above embodiments, the following describes a method for adjusting the PWM frequency of an electronic device using an electronic device as the execution subject. Referring to FIG8 , FIG8 is a flow chart illustrating another method for increasing the PWM frequency according to an exemplary embodiment. The method may include some or all of the following:

[0151] Step 801: Receive an interface switching operation.

[0152] It should be noted that the interface switching operation can be an operation that triggers the electronic device to switch between the first interface and the second interface. That is, the interface switching operation is the first operation that triggers the electronic device to switch from the second interface to the first interface, or the interface switching operation is the second operation that triggers the electronic device to switch from the first interface to the second interface. As an example, the brightness of the first interface can be the same as or different from the brightness of the second interface. For example, when the brightness of the first interface is different from the brightness of the second interface, the brightness of the first interface is greater than the brightness of the second interface.

[0153] From the above, it can be seen that the first interface is any interface displayed on the display screen of the electronic device when the display screen is in the bright screen state. For example, the first interface can be the desktop of the electronic device, the application interface of any application, etc.

[0154] As an example, the first operation can be the operation of the user pressing the power button, or it can be other operations, such as the first operation can be the operation of the user clicking the display screen, or the operation of the user moving the electronic device, the operation of the user looking at the display screen, etc. The embodiments of the present application do not impose specific restrictions on this.

[0155] As an example, the second operation can be the power switching operation in step 501 above, that is, the second operation can be triggered by the user or automatically by the electronic device. For example, when the first interface is displayed on the display screen, the user can press the power button to trigger the second operation, so that the electronic device can receive the second operation. Alternatively, when the first interface is displayed on the display screen and the user has not operated the electronic device for a long time, if the time since the user last operated the electronic device reaches a preset time, the electronic device automatically triggers the second operation.

[0156] Step 802: In response to the interface switching operation, display the interface transition effect corresponding to the interface switching operation.

[0157] It should be noted that the interface transition effect includes at least one of a transition animation, a color gamut change effect, an interface transparency change effect, and a brightness change effect. As can be seen from the above, the interface switching operation may be the first operation or the second operation, and the interface transition effect displayed by the electronic device may be different depending on the interface switching operation.

[0158] Since the interface transition effect includes at least one of transition animation, color gamut change effect, interface transparency change effect and brightness change effect, that is, in response to the interface switching operation, the electronic device displays at least one of the transition animation, color gamut change effect, interface transparency change effect and brightness change effect corresponding to the interface switching operation.

[0159] Exemplarily, when the second interface is an AOD interface and the interface switching operation is the second operation, referring to FIG9 , the electronic device can display the first transition effect of switching from the first interface to the AOD interface. Wherein, when the first transition effect includes a first transition animation, the scene can refer to the scene shown in FIG1 or FIG2 above. When the second interface is an AOD interface and the interface switching operation is the first operation, referring to FIG10 , the electronic device can display the second transition effect of switching from the AOD interface to the first interface. Wherein, when the second transition effect includes a second transition animation, the scene can refer to the scene shown in FIG3 above.

[0160] In some embodiments, the interface switching operation is the second operation, and the interface transition effect includes an interface transparency change effect; thus, the electronic device responds to the interface switching operation, and the operation of displaying the interface transition effect corresponding to the interface switching operation includes: obtaining ambient light data of the environment in which the electronic device is located in response to the interface switching operation; determining the display transparency of the interface background of the second interface based on the ambient light data; displaying the interface transition effect based on the display transparency, and the transparency of the interface background in the second interface is the display transparency.

[0161] Exemplarily, when the second interface is an AOD interface, the background interface of the AOD interface is the lock screen wallpaper.

[0162] As an example, an electronic device displaying an interface transition effect based on display transparency includes: setting the transparency of the interface background of the second interface to display transparency, and displaying the interface transition effect based on the set interface background. That is, in the interface transition effect, the transparency of the interface background of the second interface included in at least one frame of the transition effect is display transparency.

[0163] In some embodiments, the electronic device obtains ambient light data of the environment in which the electronic device is located in response to the interface switching operation; the operation of determining the display transparency of the interface background of the second interface based on the ambient light data can refer to the operations of steps 505 to 509 above, and the embodiments of the present application will not go into details one by one.

[0164] It should be noted that when the second interface is the AOD interface, the transparency of the lock screen wallpaper in the AOD interface may be the same as or different from the transparency of the lock screen wallpaper in the lock screen interface, and usually, the transparency of the lock screen wallpaper in the AOD interface is greater than the transparency of the lock screen wallpaper in the lock screen interface.

[0165] It is worth noting that the display transparency is determined by the current ambient light data, and the transparency of the interface background in the second interface is set to the display transparency. This not only ensures the aesthetics of the second interface, but also enables the information displayed in the second interface to be quickly obtained by the user without being attracted by the interface background.

[0166] In some embodiments, the electronic device may include an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation; thus, when the interface switching operation is the second operation; the electronic device responds to the interface switching operation, and the operation of displaying the interface transition effect corresponding to the interface switching operation includes: the interface switching module responds to the second operation, and displays the first transition animation from the first interface to the second interface.

[0167] As an example, the interface switching module displays the first transition animation for switching from the first interface to the second interface in response to the second operation. The operation can refer to the above steps 502 to 511, which will not be described in detail in the embodiment of the present application.

[0168] In some embodiments, when the interface switching operation is the first operation and the interface transition effect includes a transition animation, the electronic device responds to the interface switching operation and displays the interface transition effect corresponding to the interface switching operation, including: the interface switching module responds to the first operation and displays the second transition animation from the second interface to the first interface.

[0169] In some embodiments, the interface transition effect may include not only transition animation, but also other effects, such as color gamut change effect. Exemplarily, in response to the interface switching operation, the electronic device displays the color gamut change effect according to the color gamut of the first interface and the color gamut of the second interface. Wherein, when the color gamut of the first interface is higher than the color gamut of the second interface, the color gamut of the display screen is lowered; when the color gamut of the first interface is lower than the color gamut of the second interface, the color gamut of the display screen is increased. That is, when the brightness of the first interface is greater than that of the second interface, if the interface switching operation is the first operation, the electronic device can increase the color gamut of the display screen; if the interface switching operation is the second operation, the electronic device can reduce the color gamut of the display screen.

[0170] From the above, it can be seen that the electronic device includes an interface switching module and a color gamut adjustment module. In this way, the color gamut adjustment module can reduce the color gamut of the display screen when it receives a color gamut reduction instruction sent by the interface switching module. The color gamut reduction instruction is sent by the interface switching module when it receives the second operation; the color gamut adjustment module can increase the color gamut of the display screen when it receives a color gamut enhancement instruction sent by the interface switching module. The color gamut enhancement instruction is sent by the interface switching module when it receives the first operation.

[0171] It is worth noting that by performing different operations on the color gamut of the display screen in different scenarios, the color display of the display screen can be more adapted to the displayed image, thereby improving the display effect of the display screen.

[0172] Since the brightness of the first interface may be greater than that of the second interface, or may be the same as that of the second interface, the interface transition effect displayed by the electronic device is different depending on the brightness of the first interface and the brightness of the second interface.

[0173] As an example, if the brightness of the first interface is the same as that of the second interface, the interface transition effect displayed by the electronic device does not include a brightness change effect. If the brightness of the first interface is different from that of the second interface, the transition effect displayed by the electronic device includes a brightness change effect.

[0174] In some embodiments, the brightness of the first interface is greater than the brightness of the second interface, and the transition effect can also include a brightness change effect. Thus, in response to the interface switching operation, if the interface switching operation is the first operation, the brightness of the display screen is increased; in response to the interface switching operation, if the interface switching operation is the second operation, the brightness of the display screen is reduced.

[0175] It is worth noting that by reducing the brightness of the display during the interface transition process, the power consumption of the electronic device is reduced.

[0176] Step 803: During the display interface transition effect display, adjust the PWM frequency of the display screen.

[0177] From the above, it can be seen that the brightness of the first interface may be greater than the brightness of the second interface, or it may be the same as the brightness of the second interface. Depending on the brightness of the first interface and the brightness of the second interface, the electronic device will adjust the PWM frequency of the display screen differently during the process of displaying the interface transition effect.

[0178] In some embodiments, the brightness of the first interface is the same as the brightness of the second interface. In this case, when the electronic device displays the interface transition effect, the operation of adjusting the PWM frequency of the display screen includes: determining the display content of the first interface and the display content of the second interface, and when the display content of the second interface belongs to the specified scene content and the display content of the first interface does not belong to the specified scene content, increasing the PWM frequency. When the display content of the second interface does not belong to the specified scene content and the display content of the first interface belongs to the specified scene content, reducing the PWM frequency. When both the display content of the second interface and the display content of the first interface do not belong to the specified scene content, the PWM frequency is not adjusted. When both the display content of the second interface and the display content of the first interface belong to the specified scene content, the PWM frequency is also not adjusted.

[0179] It should be noted that the designated scene content is content that requires the electronic device to activate the eye protection function, for example, the designated scene content is a video, an article, etc.

[0180] In some embodiments, the brightness of the first interface is greater than the brightness of the second interface. Based on this, if the interface switching operation is the first operation, the PWM frequency of the display screen is increased during the display of the interface transition effect. If the interface switching operation is the second operation, the PWM frequency of the display screen is decreased during the display of the interface transition effect.

[0181] From the above, it can be seen that the electronic device may include an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation. Based on this, when the interface switching operation is the first operation, the operation of the electronic device to increase the PWM frequency of the display screen during the display of the interface transition effect includes: referring to Figure 10, the interface switching module sends a brightness increase instruction to the PWM adjustment module during the display of the second transition animation; referring to Figure 9, the PWM adjustment module responds to the brightness increase instruction and increases the PWM frequency.

[0182] It is worth noting that the interface switching module can send different brightness adjustment instructions to the PWM adjustment module according to different interface switching operations, thereby improving the reliability and accuracy of adjusting the PWM frequency.

[0183] In some embodiments, when the interface switching operation is the first operation, the PWM frequency is increased from the first frequency to the second frequency during the process of displaying the interface transition effect, and the first frequency is lower than the second frequency.

[0184] It should be noted that the first frequency and the second frequency can be pre-set as needed. For example, when the second interface is an AOD interface, the first frequency is the frequency of PWM dimming when the display is in AOD mode, and the second frequency is the frequency of PWM dimming when the display is in the bright screen state. For example, the second frequency can be 3840Hz, and the first frequency can be 1440Hz.

[0185] It is worth noting that, by setting the first frequency and the second frequency, the electronic device has data support when adjusting the PWM frequency, thereby improving the reliability and accuracy of adjusting the PWM frequency.

[0186] In order to implement switching of the PWM frequency, the electronic device may include at least two gamma curves, and each of the at least two gamma curves corresponds to a PWM frequency.

[0187] It should be noted that the more gamma curves an electronic device includes, the smoother the PWM frequency adjustment process of the PWM adjustment module. For example, if the gamma curve corresponding to the first frequency and the gamma curve corresponding to the second frequency include gamma curves corresponding to other frequencies, the PWM adjustment module can sequentially reduce the PWM frequency.

[0188] In some embodiments, after the PWM adjustment module increases the PWM frequency from the first frequency to the second frequency, the PWM adjustment module may send a dimming completion message to the AGP.

[0189] It is worth noting that by setting different gamma curves, the adjustment of PWM frequency is made more reliable and smoother.

[0190] In some embodiments, the second interface is an AOD interface. Based on this, when the electronic device increases the PWM frequency of the display and ends the display of the second transition effect, the electronic device can display the lock screen interface and switch the state of the display from DOZE state to ON state.

[0191] It should be noted that the electronic device can switch the state of the display screen from DOZE state to ON state after the display of the second transition effect is completed, or it can switch the state of the display screen from DOZE state to ON state during the display of the second transition effect. The embodiment of the present application does not impose any specific restrictions on this.

[0192] From the above, it can be seen that the electronic device may include an interface switching module and a PWM adjustment module. Based on this, when the interface switching operation is the second operation, the operation of the electronic device to reduce the PWM frequency of the display screen during the process of displaying the interface transition effect includes: the interface switching module sends a frequency reduction instruction to the PWM adjustment module during the process of displaying the first transition effect; the PWM adjustment module responds to the frequency reduction instruction and reduces the PWM frequency.

[0193] As an example, when the interface switching operation is the second operation, the electronic device reduces the PWM frequency from the second frequency to the first frequency during the process of displaying the interface transition effect.

[0194] In some embodiments, when the interface switching operation is the second operation, before the electronic device reduces the PWM frequency of the display screen while displaying the interface transition effect, the electronic device can also choose whether to reduce the PWM frequency and determine the degree of adjustment of the PWM frequency according to the type of AOD mode.

[0195] As an example, the electronic device may determine the type of AOD mode, which includes a global display mode and a local display mode. Based on this, when the interface switching operation is the second operation, the operation of the electronic device reducing the PWM frequency of the display screen during the display of the interface transition effect includes: when the interface switching operation is the second operation and the type of the AOD mode is the global display mode, reducing the PWM frequency of the display screen during the display of the interface transition effect. When the type of the AOD mode is the local display mode, the PWM frequency of the display screen is not reduced during the display of the interface transition effect.

[0196] When setting the AOD mode, the user may set the AOD mode type to a global display mode or may set the AOD mode type to a local display mode. When the AOD mode type is a local display mode, the clock view is displayed in the AOD interface, and the lock screen wallpaper is not displayed. In this case, the brightness of the display interface is relatively dark, which reduces the power consumption of the electronic device to a certain extent. Therefore, the PWM frequency may be adjusted or not. Normally, the PWM frequency may not be adjusted. When the AOD mode type is a global display mode, the lock screen wallpaper can be displayed at a darker brightness. In this case, in order to reduce the power consumption of the electronic device, the PWM frequency needs to be adjusted. Therefore, in order to determine whether to adjust the PWM frequency, the electronic device can determine the type of AOD mode before reducing the PWM frequency of the display screen during the display interface transition effect.

[0197] In some embodiments, information related to the settings of the electronic device may be stored in a settings database. Therefore, the electronic device may query the settings database to determine the type of AOD mode from the settings database.

[0198] It is worth noting that by determining the type of the AOD mode, the PWM frequency can be reduced in a more targeted manner, thereby improving the reliability of adjusting the PWM frequency.

[0199] In some embodiments, when the AOD mode is a partial display mode, the PWM frequency of the display screen may be selected not to be reduced or the PWM frequency of the display screen may be reduced during the display interface transition effect. When the PWM frequency of the display screen is reduced, the electronic device may reduce the PWM frequency from the second frequency to the first frequency, or reduce the PWM frequency from the second frequency to a third frequency, where the third frequency is less than the first frequency. This embodiment of the present application does not impose any specific restrictions on this.

[0200] In some embodiments, when the second interface is an AOD interface, after the electronic device ends displaying the interface transition effect, the AOD interface can be displayed, and the screen refresh rate of the display can be reduced. For example, when the electronic device displays the AOD interface, that is, when the electronic device is in a static display, the screen refresh rate of the display can be reduced to 1Hz.

[0201] It is worth noting that by reducing the screen refresh rate of the display, the power consumption of the electronic device is reduced.

[0202] In some embodiments, when the second interface is an AOD interface, the electronic device can reduce the PWM frequency and the color gamut and brightness of the display while displaying the first transition effect. The electronic device can also terminate the screen light-up animation and magazine wallpaper, and lock the system. Thereafter, the display is switched from the ON state to the DOZE state, hiding the non-full-screen AOD icon and the layer zoom animation.

[0203] It should be noted that the electronic device can switch the state of the display screen from ON state to DOZE state after the display of the first transition effect is completed, or it can switch the state of the display screen from ON state to DOZE state during the display of the first transition effect. The embodiment of the present application also does not impose specific restrictions on this.

[0204] In an embodiment of the present application, when the brightness of the first interface is greater than that of the second interface, the electronic device can display the first transition effect in the process of switching the interface displayed on the display screen from the first interface to the second interface, and the PWM frequency can be reduced in the process of displaying the first transition effect. That is, since the PWM frequency is reduced when the second interface is displayed, the power consumption of the electronic device is reduced. In the process of switching the interface displayed on the display screen from the second interface to the first interface, the electronic device can display the second transition effect, and the PWM frequency can be increased in the process of displaying the second transition effect. In this way, the purpose of dynamically adjusting the PWM frequency according to the different displayed contents is achieved, and since the PWM frequency can be increased, the eye protection function of the electronic device is taken into account. In addition, the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect. In this way, the different effects of the interface transition effect during the display process can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, thereby improving the display effect of the screen.

[0205] Next, the electronic device involved in the embodiments of the present application is described.

[0206] As an example, the method can be applied to an electronic device with a display screen. By way of example and not limitation, the electronic device may be, but is not limited to, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a mobile phone, a smartwatch, a television, etc., and the embodiments of the present application are not limited thereto.

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

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

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

[0210] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.

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

[0212] In some embodiments, the processor 110 may include one or more interfaces, such as 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.

[0213] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0214] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

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

[0216] Display screen 194 is used to display images, videos, and the like. 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, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 194, where N is an integer greater than one.

[0217] In some embodiments, when the display panel uses OLED, at least one driver circuit is coupled to the light-emitting diode array, and the at least one driver circuit is configured to generate an adaptive pulse width modulation (PWM) signal to control at least one sub-array of multiple sub-arrays of light-emitting diodes. The adaptive PWM signal can be dynamically adjusted.

[0218] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0219] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created by the electronic device during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0220] The electronic device can implement audio functions, such as music playback and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D and the application processor.

[0221] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, the electronic device detects the touch intensity based on pressure sensor 180A. The electronic device can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0222] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the electronic device through reverse motion to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0223] The proximity light sensor 180G may include a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light outward through the light emitting diode. The electronic device uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, the electronic device can determine that there is an object near the electronic device. When insufficient reflected light is detected, it can be determined that there is no object near the electronic device. The electronic device can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0224] The ambient light sensor 180L senses ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 based on the perceived ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking photos. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device is in a pocket to prevent accidental touches.

[0225] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor 180K can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device, at a location different from that of the display screen 194.

[0226] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The electronic device may receive button inputs and generate key signal inputs related to user settings and function control of the electronic device.

[0227] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (such as a coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0228] The above are optional embodiments provided for this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in this application should be included in the scope of protection of this application.

Claims

1. A method for adjusting the PWM frequency, characterized in that, Applied to an electronic device with a display screen, the method includes: Receiving an interface switching operation, which is an operation that triggers the electronic device to switch between a first interface and a second interface; In response to the interface switching operation, presenting an interface transition effect corresponding to the interface switching operation; During the process of presenting the interface transition effect, adjusting the PWM frequency of the display screen.

2. The method according to claim 1, characterized in that The interface transition effect includes at least one of a transition animation, a color gamut change effect, an interface transparency change effect, and a brightness change effect.

3. The method according to claim 1 or 2, characterized in that, The brightness of the first interface is greater than the brightness of the second interface; The adjusting the PWM frequency of the display screen during the process of presenting the interface transition effect includes: When the interface switching operation is a first operation, increasing the PWM frequency of the display screen during the process of presenting the interface transition effect, where the first operation is an operation that triggers the electronic device to switch from the second interface to the first interface; When the interface switching operation is a second operation, decreasing the PWM frequency of the display screen during the process of presenting the interface transition effect, where the second operation is an operation that triggers the electronic device to switch from the first interface to the second interface.

4. The method according to claim 3, wherein The interface switching operation is the second operation; the electronic device includes an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation; The presenting the interface transition effect corresponding to the interface switching operation in response to the interface switching operation includes: The interface switching module presents a first transition animation from the first interface to the second interface in response to the second operation; The decreasing the PWM frequency of the display screen during the process of presenting the interface transition effect when the interface switching operation is a second operation includes: During the process of presenting the first transition animation, the interface switching module sends a frequency decrease instruction to the PWM adjustment module; The PWM adjustment module decreases the PWM frequency in response to the frequency decrease instruction.

5. The method according to claim 3 or 4, characterized in that, The interface switching operation is the second operation, and the interface transition effect further includes an interface transparency change effect; The presenting the interface transition effect corresponding to the interface switching operation in response to the interface switching operation includes: In response to the interface switching operation, obtaining ambient light data of the environment where the electronic device is located; Based on the ambient light data, determining the display transparency of the interface background of the second interface; Setting the transparency of the interface background of the second interface to the display transparency; Presenting the interface transition effect according to the set interface background.

6. The method according to any one of claims 3 to 5, characterized in that The interface transition effect further includes a color gamut change effect; The presenting the interface transition effect corresponding to the interface switching operation in response to the interface switching operation includes: In response to the interface switching operation, if the interface switching operation is the first operation, increasing the color gamut of the display screen; In response to the interface switching operation, if the interface switching operation is the second operation, decreasing the color gamut of the display screen.

7. The method according to any one of claims 3 to 6, characterized in that The interface transition effect further includes a brightness change effect; In response to the interface switching operation, presenting the interface transition effect corresponding to the interface switching operation, including: In response to the interface switching operation, if the interface switching operation is the first operation, increasing the brightness of the display screen; In response to the interface switching operation, if the interface switching operation is the second operation, decreasing the brightness of the display screen.

8. The method according to any one of claims 1-4, characterized in that, The electronic device includes at least two gamma curves, and each gamma curve in the at least two gamma curves corresponds to a PWM frequency.

9. The method according to claim 3, wherein When the interface switching operation is the first operation, increasing the PWM frequency of the display screen during the process of presenting the interface transition effect, including: When the interface switching operation is the first operation, during the process of presenting the interface transition effect, increasing the PWM frequency from a first frequency to a second frequency, where the first frequency is less than the second frequency; When the interface switching operation is the second operation, decreasing the PWM frequency of the display screen during the process of presenting the interface transition effect, including: When the interface switching operation is the second operation, during the process of presenting the interface transition effect, decreasing the PWM frequency from the second frequency to the first frequency.

10. An electronic device, characterized in that, The structure of the electronic device includes a processor and a memory; The memory is used to store a program that supports the electronic device to execute the method described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when it runs on a computer, the computer is caused to execute the method described in any one of claims 1-9.

Citation Information

Patent Citations

  • PWM frequency adjustment method, electronic equipment and readable storage medium

    CN120276794A

  • Mehtod for gradually adjusting screen brightness when switching operating system

    CN101382909A

  • Interface brightness adjusting method, interface brightness adjusting device, and equipment

    CN106710570A

  • Display method, electronic equipment and storage medium

    CN116501210A

  • Screen brightness adjusting method, electronic equipment and computer readable storage medium

    CN117153075A