PWM frequency adjustment method, electronic equipment and readable storage medium

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

CN120276794APending Publication Date: 2025-07-08HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311872440.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When existing electronic devices use high-frequency PWM frequency dimming, they lead to increased power consumption and may cause screen flashes, affecting the display effect and user experience.

Method used

By dynamically adjusting the PWM frequency during interface switching and covering the screen with the interface transition effect, the eye protection function and power consumption of the display screen are optimized.

Benefits of technology

It effectively reduces the power consumption of electronic devices, improves the display effect, reduces the impact of screen flash on users, and improves user viscosity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276794A_ABST
    Figure CN120276794A_ABST
Patent Text Reader

Abstract

The invention discloses a PWM frequency adjusting method, electronic equipment and a readable storage medium, and belongs to the technical field of terminals, the method comprises the following steps: receiving an interface switching operation, the interface switching operation being an operation of triggering the electronic equipment to switch between a first interface and a second interface; in response to the interface switching operation, the electronic device can display an interface transition effect corresponding to the interface switching operation and adjust the PWM frequency in the process of displaying the interface transition effect, and the interface transition effect comprises at least one of a transition animation, a color gamut change effect, an interface transparency change effect and a brightness change effect. According to the method and the device, the screen flash of the display screen caused by the adjustment of the PWM frequency is covered through the interface transition effect, and the display effect of the screen is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a method for adjusting PWM frequency, an electronic device, and a readable storage medium. Background Art

[0002] 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, then after users view the display screen of the electronic device for a long time, users are prone to eye fatigue. Therefore, usually, the function of protecting eyes on the screen can be achieved by adjusting the PWM frequency.

[0003] Currently, in order to achieve the function of protecting eyes on the screen, generally, more and more electronic devices adopt high-frequency PWM dimming, that is, the electronic device can perform dimming through a higher PWM frequency.

[0004] However, since the PWM frequency has been at a relatively high level, the power consumption of the electronic device has increased. At the same time, if the PWM frequency is adjusted during the use of the electronic device, then in the case of a large change in the PWM frequency, screen flickering may occur, resulting in a poor screen display effect. Summary of the Invention

[0005] This application provides a method for adjusting PWM frequency, an electronic device, and a readable storage medium, which can be used to solve the problem of poor screen display effect caused by screen flickering in the display screen. The technical solutions are as follows:

[0006] In a first aspect, a method for adjusting PWM frequency is provided, which is applied to an electronic device with a display screen. The method includes:

[0007] Receiving an interface switching operation, where the interface switching operation 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; and during the process of presenting the interface transition effect, adjusting the PWM frequency of the display screen.

[0008] In this way, since the PWM frequency can be adjusted as the displayed content changes, the eye protection function of the display screen is ensured, and the power consumption of the electronic device is reduced. In addition, the timing of adjusting the PWM frequency is during the process of presenting the interface transition effect. In this way, different effects during the presentation of the interface transition effect can cover up the screen flickering caused by the adjustment of the PWM frequency, improving the screen display effect. Users can hardly notice the occurrence of this screen flickering, thereby increasing user stickiness.

[0009] 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.

[0010] In this way, by setting different interface transition effects, the richness of the interface transition is improved, and the reliability of masking screen flickering during the interface transition is enhanced.

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

[0012] Based on this, during the process of the electronic device displaying the interface transition effect, the operation of adjusting the PWM frequency of the display screen includes:

[0013] When the interface switching operation is the first operation, the PWM frequency of the display screen is increased during the process of displaying the 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 decreased during the process of displaying the 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.

[0014] In this way, during the process of the interface displayed on the display screen switching from the first interface to the second interface, the electronic device can display the first transition effect, and during the process of displaying the first transition effect, the PWM frequency can be decreased. That is, since the PWM frequency is decreased when the second interface with a lower display brightness is being displayed, the power consumption of the electronic device is reduced. During the process of the interface displayed on the display screen switching from the second interface to the first interface, the electronic device can display the second transition effect, and during 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 different display 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 during the process of displaying the interface transition effect. In this way, different effects during the display process of the interface transition effect can mask the screen flickering caused by the adjustment of the PWM frequency, improving the display effect of the screen.

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

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

[0017] 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 process of presenting the interface transition effect.

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

[0019] In this way, by determining the type of the AOD mode, the PWM frequency can be more specifically reduced, improving the reliability of adjusting the PWM frequency.

[0020] 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.

[0021] Based on this, the operations of the electronic device to present the interface transition effect corresponding to the interface switching operation in response to the interface switching operation include:

[0022] The interface switching module presents a first transition animation from the first interface to the second interface in response to the second operation.

[0023] When the interface switching operation is the second operation that triggers the electronic device to switch from the first interface to the second interface, the operations of the electronic device to reduce the PWM frequency of the display screen during the process of presenting the interface transition effect include:

[0024] During the process of presenting 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.

[0025] 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.

[0026] Based on this, the operations of the electronic device to present the interface transition effect corresponding to the interface switching operation in response to the interface switching operation include:

[0027] The interface switching module presents a second transition effect from the second interface to the first interface in response to the first operation, and the second transition effect includes a second transition animation.

[0028] When the interface switching operation is the first operation, the operations of the electronic device to increase the PWM frequency of the display screen during the process of presenting the interface transition effect include:

[0029] During the process of the interface switching module presenting the second transition effect, it sends a frequency increase instruction to the PWM adjustment module; the PWM adjustment module responds to the frequency increase instruction and increases the PWM frequency.

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

[0031] As an example of this 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 operations for the electronic device to respond to the interface switching operation and present the interface transition effect corresponding to the interface switching operation include:

[0032] In response to the interface switching operation, obtain the ambient light data of the environment where the electronic device is located; according to the ambient light data, determine the display transparency of the interface background of the second interface; set the transparency of the interface background of the second interface to the display transparency; present the interface transition effect according to the set interface background.

[0033] In this way, determining the display transparency through the current ambient light data and setting the transparency of the interface background in the second interface to the display transparency 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.

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

[0035] The operations for the electronic device to respond to the interface switching operation and present the interface transition effect corresponding to the interface switching operation include:

[0036] In response to the interface switching operation, if the interface switching operation is the first operation, increase the color gamut of the display screen; in response to the interface switching operation, if the interface switching operation is the second operation, decrease the color gamut of the display screen.

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

[0038] Based on this, if the interface switching operation is the first operation, the operations for the electronic device to increase the color gamut of the display screen include:

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

[0040] If the interface switching operation is the second operation, the operations for the electronic device to decrease the color gamut of the display screen include:

[0041] 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 screen. The color gamut reduction instruction is sent by the interface switching module when it receives the second operation.

[0042] In this way, different operations on the color gamut of the display screen in different scenarios can make the color display of the display screen more adapted to the displayed picture, improving the display effect of the display screen.

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

[0044] The operations for the electronic device to display the interface transition effect corresponding to the interface switching operation in response to the interface switching operation include:

[0045] 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 decreased.

[0046] As an example of the present application, 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.

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

[0048] As an example of the present application, the second interface is the 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 is reduced. For example, when the electronic device displays the AOD interface, that is, when the electronic device is in static display, the screen refresh rate of the display screen can be reduced to 1Hz.

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

[0050] As an example of the present application, the operations for the electronic device to increase the PWM frequency of the display screen during the display of the interface transition effect when the interface switching operation is the first operation include:

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

[0052] When the interface switching operation of the electronic device is the second operation, the operation of reducing the PWM frequency of the display screen during the process of presenting the interface transition effect includes:

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

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

[0055] In a second aspect, an electronic device is provided. 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 PWM frequency adjustment method provided in the first aspect above, and to store data involved in implementing the PWM frequency adjustment method described in the first aspect above. The processor is configured to execute the program stored in the memory. The electronic device may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.

[0056] In a third aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium, and when it runs on a computer, it causes the computer to execute the PWM frequency adjustment method described in the first aspect above.

[0057] In a fourth aspect, a computer program product containing instructions is provided. When it runs on a computer, it causes the computer to execute the PWM frequency adjustment method described in the first aspect above.

[0058] The technical effects obtained in the second, third, and fourth aspects above are similar to the technical effects obtained by the corresponding technical means in the first aspect above, and will not be elaborated here. Description of the Drawings

[0059] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0060] Figure 2 is a schematic diagram of another application scenario provided by an embodiment of the present application;

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

[0062] Figure 4 is a block diagram of a software system of an electronic device provided by an embodiment of the present application;

[0063] Figure 5It is a flowchart of a method for adjusting the PWM frequency provided by an embodiment of the present application;

[0064] Figure 6 It is a pulse schematic diagram corresponding to different PWM frequencies provided by an embodiment of the present application;

[0065] Figure 7 It is a schematic diagram of brightness change provided by an embodiment of the present application;

[0066] Figure 8 It is a flowchart of another method for adjusting the PWM frequency provided by an embodiment of the present application;

[0067] Figure 9 It is a schematic diagram of the PWM frequency reduction process provided by an embodiment of the present application;

[0068] Figure 10 It is a schematic diagram of the PWM frequency increase process provided by an embodiment of the present application;

[0069] Figure 11 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0070] To make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0071] It should be understood that the "multiple" mentioned in the present application refers to two or more. In the description of the present application, unless otherwise specified, " / " means "or". For example, A / B can represent A or B; herein, "and / or" is only a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to clearly describe the technical solutions of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words such as "first" and "second" do not limit the quantity and execution order, and the words such as "first" and "second" do not necessarily limit to be different.

[0072] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0073] With the development of terminal technology, users use electronic devices more and more frequently. The display screen of an electronic device can usually use PWM dimming. Among them, in the case of using PWM dimming, the brightness value perceived by the human eye can be adjusted by adjusting the duty cycle of PWM. However, when adjusting the duty cycle of PWM, the PWM frequency does not change. If the PWM frequency is lower than a certain threshold, then after the user views the display screen of the electronic device for a long time, the user is prone to eye fatigue. Therefore, in order to achieve the eye protection function, more and more electronic devices adopt high-frequency PWM dimming, that is, the electronic device can perform dimming through a higher PWM frequency. And if the PWM frequency has been at a relatively high frequency, it will lead to an increase in the power consumption of the electronic device. At the same time, if the PWM frequency is adjusted during the use of the electronic device, then in the case of a large change in the PWM frequency, screen flickering may occur, resulting in a poor screen display effect, and the user may perceive the screen flickering, resulting in a decrease in user stickiness.

[0074] In order to achieve the screen eye protection function and reduce the power consumption of the electronic device, the embodiments of this application provide a method for adjusting the PWM frequency. In this method, the electronic device can dynamically adjust the PWM frequency according to the display content. For example, when the user needs to stare at the display screen for a long time, such as when the user uses the electronic device to read e-books, watch videos, etc., the electronic device can increase the PWM frequency to achieve the eye protection effect. When it is not necessary for the user 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 the clock information and battery information and does not display 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.

[0075] In addition, during the process of adjusting the PWM frequency, in order to improve the problem of poor display effect caused by screen flickering of the display screen during the process of adjusting the PWM, the electronic device can dynamically adjust the PWM frequency during the process of interface switching and presenting the interface transition effect. That is, when the electronic device receives an interface switching operation, it presents the interface transition effect corresponding to the interface switching operation. During the process of presenting the interface transition effect, the electronic device can adjust the PWM frequency. Since the PWM frequency can be adjusted according to the change of the displayed content, the eye protection function of the display screen is ensured, and the power consumption of the electronic device is reduced. In addition, the timing of adjusting the PWM frequency is during the process of presenting the interface transition effect. In this way, different effects during the presentation of the interface transition effect can cover up the screen flickering caused by the adjustment of the PWM frequency, improving the display effect of the screen. Users can hardly notice the occurrence of this screen flickering, thus increasing user stickiness.

[0076] For ease of understanding, before introducing the method provided by the embodiments of the present application in detail, the application scenarios involved in the embodiments of the present application will be introduced next.

[0077] Please refer to Figure 1 , Figure 1 which is a schematic diagram of an application scenario provided by the embodiments of the present application. In an 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. Or, after the user finishes using the mobile phone and has not used the mobile phone, then when the standby duration reaches the automatic screen-off duration, the mobile phone can automatically exit the currently displayed interface and enter the screen-off state. If the mobile phone is set with the AOD mode, then after the mobile phone enters the screen-off state, it can display the AOD interface. Exemplarily, when the mobile phone is displaying the social application interface S1 of the video application as shown in Figure 1 Figure (a) below, if the user presses the power button S2, then referring to Figure 1 Figure (b) below, the mobile phone can present the interface transition effect, that is, present the transition animation of switching from the social application interface S1 to the AOD interface S3. During the process of presenting the transition animation, the mobile phone can reduce the PWM frequency, such as reducing the PWM frequency from 3840 Hz (hertz) to 1440 Hz. Among them, one frame of the transition animation can be as shown in Figure 1 Figure (c) below. When the presentation of the transition animation ends, the mobile phone can display the AOD interface S3 as shown in Figure 1 Figure (d) below.

[0078] It should be noted that one frame of the interface transition effect in the embodiments of the present application is only an example, and the electronic device can follow Figure 1The transition effect shown in the transition mode display interface can also be presented in other ways, such as through other preset animation effects. The preset animation effect can be a fade-in effect from nothing, etc. The embodiments of the present application do not make specific limitations on this.

[0079] Please refer to Figure 2 , Figure 2 which is a schematic diagram of another application scenario provided by the embodiments of the present application. In another application scenario, referring to Figure 2 Figure (a) in, during the process of the mobile phone showing the interface transition effect from the social application interface S1 to the AOD interface S3, the interface transition effect can not only include the transition animation from the social application interface S1 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 Figure (b) in. Any frame of image B after this frame of image A can be as shown in Figure 2 Figure (c) in. In Figure 2 Figure (c), the color gamut of the AOD interface decreases. When the transition animation display ends, the mobile phone can display the AOD interface S3 as shown in Figure 2 Figure (d) in.

[0080] It should be noted that during the process of the mobile phone showing the interface transition effect from the social application interface S1 to the AOD interface S3, the interface transition effect can not only include the transition animation from the social application interface S1 to the AOD interface S3, and the color gamut change effect in the AOD interface S3, but also include the effect of the display screen brightness decreasing and the change effect of the transparency of the AOD interface. The drawings in the embodiments of the present application will not be described one by one here.

[0081] Please refer to Figure 3 , when the mobile phone is displaying the AOD interface S3 as shown in Figure 3 Figure (a) in, if the user touches the mobile phone screen, then referring to Figure 3 Figure (b) in, the mobile phone can show the interface transition effect, that is, show the transition animation from the AOD interface S3 to the lock screen interface S4, the color gamut change effect of the display screen, and the change effect of the transparency of the lock screen wallpaper display. During the process of showing this interface transition effect, the mobile phone can increase the PWM frequency, such as increasing the PWM frequency from 1440 Hz (hertz) to 3840 Hz, and during the process of showing 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 of image in the interface transition effect can be as shown in Figure 3 Figure (c) in, this Figure 3In Figure (c), the transparency of the AOD interface has changed from 50% to 40%, and the display screen color gamut has been increased. When the display of the interface transition effect ends, the mobile phone can display the lock screen interface S4 as shown in Figure 3 Figure (d). In this lock screen interface S4, the transparency of the lock screen wallpaper is 0%. The font of the clock information in the lock screen interface S4 is significantly larger than that of the clock information in the AOD interface.

[0082] It should be noted that when the mobile phone displays the AOD interface S3, the user can also trigger the mobile phone to display the transition effect of switching from the AOD interface S3 to the lock screen interface S4 by pressing the power button S2. The embodiments of the present application do not make specific limitations on this.

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

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

[0085] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, the Android system with a layered architecture is taken as an example to exemplarily describe the software system of the electronic device 100.

[0086] Figure 4 is a block diagram of a software system of an electronic device 100 provided by an embodiment of the present application. Refer to Figure 4 , the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom are the application layer, the application framework layer, the native layer (Native layer), the hardware abstraction layer (Hardware Abstraction Layer, HAL), and the kernel layer.

[0087] The application layer may include a series of application packages. As Figure 4 shown, the application packages may include applications such as a camera, a calendar, a map, a video, a navigation, and a Bluetooth.

[0088] The application framework layer provides application programming interfaces (application programming interfaces, APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 3As shown, an interface switching module, a power management module (PMS), a PWM adjustment module, a color gamut adjustment module, and a sensor service module (SensorService).

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

[0090] 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 when receiving a triggering operation of the user on the power button. The interface switching module can be used to display an interface transition effect according to the message sent by the received power management module, and send relevant instructions to the PWM adjustment module and the color gamut adjustment module. The PWM adjustment module is used to increase or decrease the PWM frequency according to the instructions sent by the interface switching module. The color gamut adjustment module is used to adjust the color gamut of the display screen according to the instructions sent by the interface switching module.

[0091] Next, taking the power management module sending a power-off message to the keyguard application to switch the electronic device from the first interface to the AOD interface as an example for illustration.

[0092] In some embodiments, when the power management module receives a trigger operation of the user on the power button, it sends a power-off message to the interface switching module. When the interface switching module receives the power-off message sent by the power management module, it activates the AOD function and sends an AOD display message to the display driver in the kernel layer. The AOD display message is used to instruct the display driver to drive the display according to the type of the 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 a virtual ambient light sensor of the subsystem 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. 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. When the PWM adjustment module receives the ambient light data, it determines the display transparency of the lock screen wallpaper according to the ambient light data and sends the display transparency to the interface switching module. When the interface switching module receives the display transparency, it 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. During the display of the interface transition effect, the interface switching module can also send a frequency reduction instruction to the PWM adjustment module and send 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 screen.

[0093] In some embodiments, when the second interface is the AOD interface, during the display of the interface transition effect by the interface switching module, the interface switching module can also terminate the screen-on animation effect and the magazine wallpaper function of the display screen and lock the system.

[0094] In some embodiments, when the interface switching module finishes the display of the interface transition effect and displays the AOD interface, the interface switching module can switch the display screen to the energy-saving power-saving mode, that is, make the electronic device enter the DOZE state, and hide non-AOD icons (or non-full-screen AOD icons) and the layer scaling animation effect.

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

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

[0097] 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.

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

[0099] Based on the execution subject provided in the above embodiments, the method for adjusting the PWM frequency provided in the embodiments of the present application will be introduced next. Please refer to Figure 5 , Figure 5 is a schematic flowchart of a method for adjusting the PWM frequency shown according to an exemplary embodiment. As an example and not a limitation, in the embodiments of the present application, the second interface is the AOD interface, and the example of reducing the PWM frequency is used for illustration. This method can be executed by the above electronic device, and the electronic device can be implemented through the interaction of multiple modules. This method may include the following parts or all of the content:

[0100] 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.

[0101] It should be noted that the first interface is any interface displayed by the electronic device on the display screen when the display screen is in the lit state. For example, the first interface may be the desktop of the electronic device, the application interface of any application, etc. Among them, the brightness of the first interface is greater than the brightness of the AOD interface.

[0102] In some embodiments, the power switching operation may be triggered by the user or automatically triggered by the electronic device. Exemplarily, 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. Or, when the first interface is displayed on the display screen and the user has not manipulated the electronic device for a long time, if the duration since the user's last manipulation of the electronic device reaches a preset duration (the standby duration of the electronic device reaches the preset duration), the electronic device automatically triggers the power switching operation.

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

[0104] Step 502: When the interface switching module receives a power-off message, it determines the type of AOD mode.

[0105] Since when the user sets the AOD mode, the type of the AOD mode may be set to the global display mode or may be set to the partial display mode. Among them, when the type of the AOD mode is the partial 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 originally relatively dim, which reduces the power consumption of the electronic device to a certain extent. Therefore, it is possible to choose to adjust the PWM frequency or not to adjust the PWM frequency. When the type of the AOD mode is the global display mode, the lock screen wallpaper is displayed with a relatively dim brightness. In this case, in order to reduce the power consumption of the electronic device, the PWM frequency needs to be adjusted. In addition, since when adjusting the PWM frequency in the partial display mode, the PWM frequency adjusted in the partial display mode may be the same as or different from the PWM frequency adjusted in the global display mode. Therefore, in order to accurately adjust the PWM frequency, the interface switching module can determine the type of the AOD mode when receiving the power-off message.

[0106] 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 can also determine the type of the AOD mode.

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

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

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

[0110] In some embodiments, when the type of the AOD mode is the global display mode, the interface switching module can activate the global AOD service to activate the AOD function. When the type of the AOD mode is the partial display mode, the interface switching module can activate the application package (Android application package, APK) of AOD.

[0111] Step 504: When the display driver receives the AOD display message, it drives the display screen to display the AOD interface according to the type of the AOD mode.

[0112] 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 can drive the display screen to display the AOD interface according to the global display mode.

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

[0114] 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.

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

[0116] It should be noted that in the embodiments of the present application, the order of the interface switching module executing steps 503 and 505 is not specifically limited.

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

[0118] 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.

[0119] 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.

[0120] Step 508: When the virtual ambient light sensor receives the ambient light acquisition message, it sends the detected ambient light data to the PWM adjustment module.

[0121] It should be noted that the ambient light data includes the light intensity indicating the environment where the electronic device is currently located.

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

[0123] As an example, the correspondence between the display transparency and the ambient light data can be stored in the electronic device. In this way, the PWM adjustment module can determine the display transparency of the lock screen wallpaper from the stored correspondence according to the received ambient light data. This correspondence can be represented by a two-dimensional curve or a table. Alternatively, a relation function can be stored in the electronic device, which is a function used to indicate the correspondence between the ambient light data and the display transparency. When the PWM adjustment module receives the ambient light data, it can calculate the display transparency of the lock screen wallpaper according to the ambient light data through this relation function.

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

[0125] Since the interface switching module's callback notification for the display transparency is registered in the PWM adjustment module, the PWM adjustment module can send the display transparency to the interface switching module.

[0126] Step 511: The interface switching module presents the first transition animation according to the display transparency.

[0127] In some embodiments, the interface switching module sets the transparency of the lock screen wallpaper in the AOD interface to the display transparency, and then presents the first transition animation. That is, when there is an image frame carrying the lock screen wallpaper in the first transition animation, the transparency of the lock screen wallpaper in this image frame is the display transparency. Alternatively, during the presentation of the first transition animation, the transparency of the lock screen wallpaper in the AOD interface is set to the display transparency. In this case, depending on the timing of setting the display transparency, there may or may not be a scenario where the transparency of the lock screen wallpaper changes in the first transition animation.

[0128] 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 setting of the transparency of the lock screen wallpaper before presenting the display animation of the AOD interface during the presentation of the first transition animation, then in the image frames 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 presentation of the display animation of the AOD interface during the presentation of the first transition animation, then the display animation of the AOD interface includes a scenario where the transparency of the lock screen wallpaper changes.

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

[0130] Step 512: During the process of the interface switching module presenting the first transition animation, it 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.

[0131] To reduce the power consumption of the electronic device and to avoid the user perceiving the screen flicker of the display screen during the process of adjusting the PWM frequency, during the process of the interface switching module presenting the first transition animation, it can send a frequency reduction instruction and a brightness adjustment instruction to the PWM adjustment module to instruct the PWM adjustment module to reduce the PWM frequency and the brightness of the display screen during the process of the interface switching module presenting 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.

[0132] Step 513: When the PWM adjustment module receives the frequency reduction instruction, it reduces the PWM frequency from the second frequency to the first frequency, and when it receives the brightness reduction instruction, it reduces the brightness of the display screen.

[0133] 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 screen is in the lit state, and the first frequency is the PWM dimming frequency when the display screen is in the AOD mode. Exemplarily, the second frequency can be 3840Hz, the first frequency can be 1440Hz, etc. The embodiments of the present application do not make specific limitations on the first frequency and the second frequency.

[0134] In some embodiments, the adjustment of the PWM frequency refers to increasing the pulses of the PWM at the same duty cycle. Exemplarily, the adjustment process can refer to Figure 6 the schematic diagram shown. When the PWM duty cycle does not change and the PWM frequency is 3840Hz, the number of PWM pulses is 32 (the number within one cycle), and when the PWM frequency is 1440Hz, the number of PWM pulses is 12 (the number within one cycle).

[0135] In some embodiments, to achieve the switching of the PWM frequency, the electronic device may include at least two gamma curves, and each gamma curve among the at least two gamma curves corresponds to a PWM frequency.

[0136] It should be noted that the more gamma curves included in the electronic device, the smoother and more fluent the process of the PWM adjustment module adjusting the PWM frequency. For example, between the gamma curve corresponding to the first frequency and the gamma curve corresponding to the second frequency, there are gamma curves corresponding to other frequencies. In this way, the PWM adjustment module can sequentially reduce the PWM frequency according to the pulses corresponding to each gamma curve.

[0137] 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 achieved by other means, and the embodiments of this application do not make specific limitations in this regard.

[0138] To illustrate the brightness change, the embodiments of this application provide a schematic diagram for adjusting the brightness of the display screen. Refer to Figure 7 , in Figure 7 , the brightness A corresponding to the moment T1 is the brightness of the display screen before adjusting the brightness, and the brightness B corresponding to the moment T2 is the brightness of the display screen after adjusting the brightness.

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

[0140] Step 514: When the color gamut adjustment module receives a color gamut reduction instruction, it reduces the color gamut of the display screen.

[0141] It should be noted that the embodiments of this application do not make specific limitations on the execution order of step 513 and step 514.

[0142] In some embodiments, during the process of the interface switching module presenting the first transition animation, it can not only instruct the PWM adjustment module to reduce the PWM frequency and the 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 screen-on animation and magazine wallpaper of the display screen, and lock the system. Then, it switches the display screen from the ON() state to the DOZE state, hiding the non-full-screen AOD icon and the layer scaling animation.

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

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

[0145] Exemplarily, the AGP can reduce the screen refresh rate of the display screen to 1 Hz.

[0146] In the embodiments of the present application, during the process of the interface displayed on the display screen switching from the first interface to the AOD interface, the electronic device can display a first transition effect, and during 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, in this way, the power consumption of the electronic device is reduced. In addition, the timing of adjusting the PWM frequency is during the process of displaying the interface transition effect. In this way, different effects during the display process of this interface transition effect can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, improving the display effect of the screen.

[0147] 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 the electronic device increasing the PWM frequency is similar to the process of reducing the PWM frequency. The embodiments of the present application will not separately introduce the process of the interaction of multiple modules in the electronic device to increase the PWM frequency.

[0148] Based on the above embodiments, next, taking the electronic device as the execution subject, the method for the electronic device to complete the adjustment of the PWM frequency will be introduced. Please refer to Figure 8 , Figure 8 FIG. is a flowchart of another method for increasing the PWM frequency shown according to an exemplary embodiment. The method may include the following parts or all of the content:

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

[0150] It should be noted that the interface switching operation may 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 may be the same as or different from the brightness of the second interface. Exemplarily, 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.

[0151] As can be seen from the above, the first interface is any interface displayed by the electronic device on the display screen when the display screen is in the lit state. For example, the first interface may be the desktop of the electronic device, the application interface of any application program, etc.

[0152] As an example, the first operation can be an operation where the user presses the power button, or it can be other operations. For example, the first operation can be an operation where the user clicks on the display screen, or an operation where the user moves the electronic device, or an operation where the user gazes at the display screen, etc. The embodiments of the present application do not make specific limitations on this.

[0153] 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 triggered by the electronic device. Exemplarily, when the first interface is displayed on the display screen, the user can press the power button to trigger the second operation. In this way, the electronic device can receive the second operation. Or, when the first interface is displayed on the display screen and the user has not manipulated the electronic device for a long time, if the duration since the user's last manipulation of the electronic device reaches a preset duration, the electronic device automatically triggers the second operation.

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

[0155] 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 depending on the different interface switching operations, the interface transition effects displayed by the electronic device are also different.

[0156] Since 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, 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.

[0157] Exemplarily, when the second interface is the AOD interface and the interface switching operation is the second operation, refer to Figure 9 , the electronic device can display the first transition effect from the first interface to the AOD interface. Among them, when the first transition effect includes the first transition animation, this scenario can refer to the above Figure 1 or Figure 2 shown scenarios. When the second interface is the AOD interface and the interface switching operation is the first operation, refer to Figure 10 , the electronic device can display the second transition effect from the AOD interface to the first interface. Among them, when the second transition effect includes the second transition animation, this scenario can refer to the above Figure 3 shown scenarios.

[0158] In some embodiments, the interface switching operation is a second operation, and the interface transition effect includes an interface transparency change effect. Thus, the operation of the electronic device to display 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; determining the display transparency of the interface background of the second interface according to the ambient light data; and displaying the interface transition effect according to the display transparency, where the transparency of the interface background in the second interface is the display transparency.

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

[0160] As an example, the operation of the electronic device to display the interface transition effect according to the display transparency includes: setting the transparency of the interface background in the second interface to the display transparency, and displaying the interface transition effect according to 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 the display transparency.

[0161] In some embodiments, the operation of the electronic device to obtain ambient light data of the environment where the electronic device is located in response to the interface switching operation and determine the display transparency of the interface background of the second interface according to the ambient light data may refer to the operations in step 505-step 509 above, and the embodiments of the present application will not elaborate on this one by one.

[0162] It should be noted that when the second interface is an AOD interface, the transparency of the lock screen wallpaper in the AOD interface and the transparency of the lock screen wallpaper in the lock screen interface may be the same or different, and generally, 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.

[0163] It is worth noting that determining the display transparency through the current ambient light data and setting the transparency of the interface background in the second interface to the display transparency 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 distracted by the interface background.

[0164] 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 a second operation; the operation of the electronic device to display the interface transition effect corresponding to the interface switching operation includes: the interface switching module responds to the second operation and displays a first transition animation from the first interface to the second interface.

[0165] As an example, for the operation of the interface switching module to display the first transition animation from the first interface to the second interface in response to the second operation, reference can be made to the operations in step 502-step 511 above, and the embodiments of the present application will not elaborate on them one by one.

[0166] In some embodiments, when the interface switching operation is the first operation and the interface transition effect includes a transition animation, the operation of the electronic device to display the interface transition effect corresponding to the interface switching operation includes: the interface switching module displays a second transition animation from the second interface to the first interface in response to the first operation.

[0167] In some embodiments, the interface transition effect can not only be a transition animation, but also include other effects, such as a color gamut change effect. Exemplarily, in response to the interface switching operation, the electronic device displays a color gamut change effect according to the color gamut of the first interface and the color gamut of the second interface. Among them, 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 reduced; 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.

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

[0169] It should be noted 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 better adapted to the displayed picture, improving the display effect of the display screen.

[0170] Since the brightness of the first interface may be greater than the brightness of the second interface or may be the same as the brightness of the second interface, according to the brightness of the first interface and the brightness of the second interface, the interface transition effect displayed by the electronic device is also different.

[0171] As an example, when the brightness of the first interface is the same as the brightness of the second interface, the interface transition effect displayed by the electronic device does not include a brightness change effect. When the brightness of the first interface and the brightness of the second interface are different, the transition effect displayed by the electronic device includes a brightness change effect.

[0172] In some embodiments, the brightness of the first interface is greater than that of the second interface, and the transition effect may further include a brightness change effect. Thus, in response to an interface switching operation, if the interface switching operation is the first operation, the brightness of the display screen is increased; in response to an interface switching operation, if the interface switching operation is the second operation, the brightness of the display screen is decreased.

[0173] It should be noted that by reducing the brightness of the display screen during the interface transition, the power consumption of the electronic device is reduced.

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

[0175] As can be seen from the above, 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. According to the brightness of the first interface and the second interface, the operation of adjusting the PWM frequency of the display screen by the electronic device during the process of presenting the interface transition effect is also different.

[0176] In some embodiments, the brightness of the first interface is the same as that of the second interface. In this case, the operation of adjusting the PWM frequency of the display screen by the electronic device during the process of presenting the interface transition effect includes: determining the display content of the first interface and the display content of the second interface. When the display content of the second interface belongs to the specified scenario content and the display content of the first interface does not belong to the specified scenario content, increase the PWM frequency. When the display content of the second interface does not belong to the specified scenario content and the display content of the first interface belongs to the specified scenario content, decrease the PWM frequency. When the display content of the second interface and the display content of the first interface both do not belong to the specified scenario content, do not adjust the PWM frequency. When the display content of the second interface and the display content of the first interface both belong to the specified scenario content, also do not adjust the PWM frequency.

[0177] It should be noted that the specified scenario content is the content that requires the electronic device to activate the eye protection function. For example, the specified scenario content is videos, articles, etc.

[0178] In some embodiments, the brightness of the first interface is greater than that of the second interface. Based on this, when the interface switching operation is the first operation, increase the PWM frequency of the display screen during the process of presenting the interface transition effect. When the interface switching operation is the second operation, decrease the PWM frequency of the display screen during the process of presenting the interface transition effect.

[0179] As described above, 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: Refer to Figure 10 , during the display of the second transition animation, the interface switching module sends a brightness increase instruction to the PWM adjustment module; Refer to Figure 9 , in response to the brightness increase instruction, the PWM adjustment module increases the PWM frequency.

[0180] It should be noted that according to different interface switching operations, the interface switching module can send different brightness adjustment instructions to the PWM adjustment module, thereby improving the reliability and accuracy of adjusting the PWM frequency.

[0181] 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 display of the interface transition effect, and the first frequency is less than the second frequency.

[0182] It should be noted that the first frequency and the second frequency can be set in advance according to requirements. Exemplarily, when the second interface is the AOD interface, the first frequency is the frequency of PWM dimming when the display screen is in the AOD mode, and the second frequency is the frequency of PWM dimming when the display screen is in the lit state. For example, the second frequency can be 3840Hz, and the first frequency can be 1440Hz, etc.

[0183] It should be noted that by setting the first frequency and the second frequency, the electronic device has data support when adjusting the PWM frequency, improving the reliability and accuracy of adjusting the PWM frequency.

[0184] To achieve the switching of the PWM frequency, the electronic device may include at least two gamma curves, and each gamma curve in the at least two gamma curves corresponds to a PWM frequency.

[0185] It should be noted that the more gamma curves included in the electronic device, the smoother the process of the PWM adjustment module adjusting the PWM frequency. For example, between the gamma curve corresponding to the first frequency and the gamma curve corresponding to the second frequency, there are gamma curves corresponding to other frequencies. In this way, the PWM adjustment module can sequentially decrease the PWM frequency.

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

[0187] It should be noted that by setting different gamma curves, the adjustment of the PWM frequency becomes more reliable and smoother.

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

[0189] It should be noted that the electronic device can switch the state of the display screen from the DOZE state to the ON state after finishing showing the second transition effect, or can also switch the state of the display screen from the DOZE state to the ON state during the process of showing the second transition effect. The embodiments of the present application do not make specific limitations on this.

[0190] As can be seen from the above, the electronic device can 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 showing the interface transition effect includes: the interface switching module sends a frequency reduction instruction to the PWM adjustment module during the process of showing the first transition effect; the PWM adjustment module responds to the frequency reduction instruction and reduces the PWM frequency.

[0191] 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 showing the interface transition effect.

[0192] In some embodiments, when the interface switching operation is the second operation, before the electronic device reduces the PWM frequency of the display screen during the process of showing the interface transition effect, the electronic device can also select whether to reduce the PWM frequency according to the type of the AOD mode and determine the degree of adjusting the PWM frequency.

[0193] As an example, the electronic device can determine the type of the AOD mode, and the type of the AOD mode includes the global display mode and the local display mode; 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 showing 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 process of showing 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 process of showing the interface transition effect.

[0194] When the user sets the AOD mode, the type of the AOD mode may be set to the global display mode or the local display mode. Among them, when the type of the AOD mode is the 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 screen interface is originally relatively dim, which reduces the power consumption of the electronic device to a certain extent. Therefore, the PWM frequency can be adjusted or not adjusted. Usually, the PWM frequency can be not adjusted. When the type of the AOD mode is the global display mode, the lock screen wallpaper can be displayed with a relatively dim 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 the AOD mode before reducing the PWM frequency of the display screen during the process of presenting the interface transition effect.

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

[0196] It should be noted that by determining the type of the AOD mode, the reduction of the PWM frequency is more targeted, which improves the reliability of adjusting the PWM frequency.

[0197] In some embodiments, when the type of the AOD mode is the local display mode, during the process of presenting the interface transition effect, the electronic device can choose not to reduce the PWM frequency of the display screen or reduce the PWM frequency of the display screen. When reducing the PWM frequency of the display screen, the electronic device can reduce the PWM frequency from the second frequency to the first frequency, or reduce the PWM frequency from the second frequency to the third frequency, where the third frequency is less than the first frequency. The embodiments of the present application do not make specific limitations on this.

[0198] In some embodiments, when the second interface is the AOD interface, after the electronic device finishes presenting the interface transition effect, it can display the AOD interface and reduce the screen refresh rate of the display screen. 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.

[0199] It should be noted that by reducing the screen refresh rate of the display screen, the power consumption of the electronic device is reduced.

[0200] In some embodiments, when the second interface is the AOD interface, during the process of the electronic device presenting the first transition effect, it can not only reduce the PWM frequency, but also reduce the color gamut and brightness of the display screen. The electronic device can also terminate the screen-on animation and magazine wallpaper of the display screen and lock the system. After that, the display screen is switched from the ON state to the DOZE state, hiding the non-full-screen AOD icon and the layer scaling animation.

[0201] It should be noted that the electronic device can switch the state of the display screen from the ON state to the DOZE state after finishing the presentation of the first transition effect, or can also switch the state of the display screen from the ON state to the DOZE state during the process of presenting the first transition effect. The embodiments of the present application do not make specific limitations on this either.

[0202] In the embodiments of the present application, when the brightness of the first interface is greater than that of the second interface, during the process of the interface displayed on the display screen switching from the first interface to the second interface, the electronic device can present the first transition effect, and during the process of presenting the first transition effect, it can reduce the PWM frequency. That is to say, since the PWM frequency is reduced when the second interface is displayed, in this way, the power consumption of the electronic device is reduced. During the process of the interface displayed on the display screen switching from the second interface to the first interface, the electronic device can present the second transition effect, and during the process of presenting the second transition effect, it can increase the PWM frequency. In this way, the purpose of dynamically adjusting the PWM frequency according to different display 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 during the process of presenting the interface transition effect. In this way, different effects during the presentation of the interface transition effect can cover up the screen flicker caused by the adjustment of the PWM frequency, improving the display effect of the screen.

[0203] Next, the electronic device involved in the embodiments of the present application will be described.

[0204] 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 can be but is not limited to a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a mobile phone, a smart watch, a television, etc. The embodiments of the present application do not make limitations on this.

[0205] Figure 11 is a schematic structural diagram of an electronic device provided by the embodiments of the present application. Refer to Figure 11, 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, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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.

[0206] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0207] 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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0208] Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0209] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses and reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0210] 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.

[0211] 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 the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be provided in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.

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

[0213] The electronic device realizes the display function through the GPU, the display screen 194, the application processor, etc. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0214] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 194, where N is an integer greater than 1.

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

[0216] 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 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0217] The internal memory 121 can be used to store computer-executable program code, and the computer-executable program code includes 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 the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device (such as audio data, phone book, 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 magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

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

[0219] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations with the same touch position but different touch operation intensities can correspond to different operation instructions. For example: When a touch operation with a touch operation intensity less than the pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.

[0220] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of jitter of the electronic device, calculates the distance that the lens module needs to compensate according to the angle, and enables the lens to offset the jitter of the electronic device through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenarios.

[0221] The proximity light sensor 180G can include a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device emits infrared light outward through the light-emitting diode. The electronic device uses the photodiode to detect the 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 that the user holds the electronic device close to the ear for a call, so as to automatically turn off the screen to achieve the purpose of power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the leather case mode and pocket mode.

[0222] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touch.

[0223] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device, at a different position from the display screen 194.

[0224] The keys 190 include a power-on key, a volume key, etc. The keys 190 can be mechanical keys or touch keys. The electronic device can receive key inputs and generate key signal inputs related to the user settings and function control of the electronic device.

[0225] 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 processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.

[0226] The above are the optional embodiments provided by the present application, which are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present 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, wherein 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 the 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: The interface switching module sends a frequency decreasing instruction to the PWM adjustment module during the process of presenting the first transition animation; The PWM adjustment module decreases the PWM frequency in response to the frequency decreasing 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; Determining the display transparency of the interface background of the second interface according to the ambient light data; 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-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-6, characterized in that, The interface transition effect further includes a brightness change effect; Responding to the interface switching operation and presenting the interface transition effect corresponding to the interface switching operation includes: Responding to the interface switching operation, if the interface switching operation is the first operation, increasing the brightness of the display screen; Responding 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 to 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 includes: 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 includes: 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 they run on a computer, cause the computer to execute the method described in any one of claims 1-9.

Citation Information

Cited By

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

    EP4749445A1

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

    WO2025138809A1