WO2025138809A1 - Pwm频率的调整方法、电子设备及可读存储介质 - Google Patents

Pwm频率的调整方法、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2025138809A1
WO2025138809A1 PCT/CN2024/109661 CN2024109661W WO2025138809A1 WO 2025138809 A1 WO2025138809 A1 WO 2025138809A1 CN 2024109661 W CN2024109661 W CN 2024109661W WO 2025138809 A1 WO2025138809 A1 WO 2025138809A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
electronic device
switching operation
display
transition effect
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/109661
Other languages
English (en)
French (fr)
Inventor
胡大帅
周健
张凯亮
崔闯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202480045677.9A priority Critical patent/CN121532752A/zh
Publication of WO2025138809A1 publication Critical patent/WO2025138809A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels

Definitions

  • a method for adjusting a PWM frequency is provided, which is applied to an electronic device having a display screen, and the method comprises:
  • an interface switching operation which is an operation that triggers an electronic device to switch between a first interface and a second interface; in response to the interface switching operation, display an interface transition effect corresponding to the interface switching operation; and in the process of displaying the interface transition effect, adjust the PWM frequency of the display screen.
  • the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect.
  • the different effects of the interface transition effect during the display process can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, thereby improving the display effect of the screen. Users can hardly notice the occurrence of the screen flicker, thereby improving user stickiness.
  • 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.
  • the brightness of the first interface is greater than the brightness of the second interface
  • the PWM frequency can be reduced in a more targeted manner, thereby improving the reliability of adjusting the PWM frequency.
  • the interface switching operation is the second operation;
  • the electronic device includes an interface switching module and a PWM adjustment module, and the interface transition effect includes a transition animation;
  • the operation of increasing the PWM frequency of the display screen by the electronic device during the process of displaying the interface transition effect includes:
  • the interface switching module sends a frequency increase instruction to the PWM adjustment module; the PWM adjustment module increases the PWM frequency in response to the frequency increase instruction.
  • ambient light data of the environment in which the electronic device is located is obtained; based on the ambient light data, the display transparency of the interface background of the second interface is determined; the transparency of the interface background of the second interface is set to the display transparency; and the interface transition effect is displayed based on the set interface background.
  • the interface transition effect also includes a color gamut change effect
  • the electronic device includes an interface switching module and a color gamut adjustment module
  • the operation of the electronic device to reduce the color gamut of the display screen includes:
  • the color gamut adjustment module reduces the color gamut of the display screen when receiving the color gamut reduction instruction sent by the interface switching module.
  • the color gamut reduction instruction is sent by the interface switching module when receiving the second operation.
  • the interface transition effect also includes a brightness change effect
  • the interface switching operation In response to the interface switching operation, if the interface switching operation is a first operation, the brightness of the display screen is increased; in response to the interface switching operation, if the interface switching operation is a second operation, the brightness of the display screen is reduced.
  • the second interface is an AOD interface.
  • the electronic device can display the AOD interface and reduce the screen refresh rate of the display screen after reducing the PWM frequency of the display screen during the display interface transition effect.
  • the screen refresh rate of the display screen can be reduced to 1Hz.
  • the power consumption of the electronic device is reduced by reducing the screen refresh rate of the display screen.
  • FIG8 is a flow chart of another PWM frequency adjustment method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of a PWM frequency reduction process provided by an embodiment of the present application.
  • FIG10 is a schematic diagram of a PWM frequency increase process provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • references to "one embodiment” or “some embodiments” etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean “one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
  • the terms “including”, “comprising”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized in other ways.
  • PWM dimming the brightness value felt by the human eye can be adjusted by adjusting the duty cycle of PWM.
  • the duty cycle of PWM is adjusted, the PWM frequency will not change. If the PWM frequency is lower than a certain threshold, the user is prone to eye fatigue after watching the display screen of the electronic device for a long time. Therefore, in order to achieve the eye protection function, more and more electronic devices use high-frequency PWM dimming, that is, electronic devices can dim at a higher PWM frequency. However, the PWM frequency has been at a higher frequency, which will increase the power consumption of the electronic device.
  • an embodiment of the present application provides a method for adjusting the PWM frequency, in which the electronic device can dynamically adjust the PWM frequency according to the display content. For example, in the case where the user needs to stare at the display screen for a long time, such as when the user uses the electronic device to read e-books, watch videos, etc., the electronic device can increase the PWM frequency to achieve the eye protection effect. In the case where the user does not need to stare at the display screen for a long time, such as when the AOD (Always On Display) interface is displayed, the electronic device can display clock information and power information, 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.
  • AOD Always On Display
  • the electronic device can display the interface transition effect when the interface is switched.
  • the PWM frequency is dynamically adjusted. That is, when the electronic device receives an interface switching operation, it displays the interface transition effect corresponding to the interface switching operation.
  • the electronic device can adjust the PWM frequency. Since the PWM frequency can be adjusted as the displayed content changes, the eye protection function of the display is guaranteed and the power consumption of the electronic device is reduced.
  • the timing of adjusting the PWM frequency is in the process of displaying the interface transition effect.
  • the different effects of the interface transition effect during the display process can cover up the screen flicker caused by the adjustment of the PWM frequency of the display screen, thereby improving the display effect of the screen.
  • the user is almost unaware of the occurrence of the screen flicker, thereby increasing user stickiness.
  • Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the user can trigger the power button to exit the currently displayed interface and enter the screen-off state.
  • the user has not used the mobile phone. Then, when the standby time reaches the automatic screen-off time, the mobile phone can automatically exit the currently displayed interface and enter the screen-off state. If the mobile phone is set with an AOD mode, the AOD interface can be displayed after the mobile phone enters the screen-off state.
  • the mobile phone when the mobile phone displays the social application interface S1 of the video application as shown in Figure (a) of Figure 1, if the user presses the power button S2, then refer to Figure (b) of Figure 1, the mobile phone can display the interface transition effect, that is, display the transition animation of the social application interface S1 switching to the AOD interface S3.
  • the mobile phone can reduce the PWM frequency, such as reducing the PWM frequency from 3840Hz (Hertz) to 1440Hz.
  • a frame image in the transition animation can be shown as Figure (c) in Figure 1.
  • the mobile phone can display the AOD interface S3 as shown in Figure (d) in Figure 1.
  • a frame of image in the interface transition effect in the embodiment of the present application is only an example.
  • the electronic device can display the interface transition effect according to the transition method shown in Figure 1, or it can be displayed in other ways, such as through other preset motion effects.
  • the preset motion effect can be a gradual change effect from nothing to something, etc.
  • the embodiment of the present application does not impose any specific restrictions on this.
  • the mobile phone displays the AOD interface S3 shown in Figure 3 (a)
  • the user touches the mobile phone screen then refer to Figure 3 (b).
  • the mobile phone can display the interface transition effect, that is, the transition animation of the AOD interface S3 switching to the lock screen interface S4, the display color gamut change effect, and the lock screen wallpaper display transparency.
  • the mobile phone can increase the PWM frequency, such as increasing the PWM frequency from 1440Hz (Hertz) to 3840Hz, and in the process of displaying the interface transition effect, the size of the relevant information in the interface also changes, such as the enlargement of the clock information.
  • a frame of image in the interface transition effect can be shown as Figure (c) in Figure 3.
  • the user can also trigger the transition effect of the mobile phone displaying the AOD interface S3 to switch to the lock screen interface S4 by pressing the power button S2.
  • This embodiment of the application does not specifically limit this.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software system of the electronic device 100.
  • FIG4 is a block diagram of a software system of an electronic device 100 provided in an embodiment of the present application.
  • the layered architecture divides the software into several layers, each layer having a clear role and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system is divided into multiple layers, from top to bottom, namely, the application layer, the application framework layer, the native layer, the hardware abstraction layer (HAL), and the kernel layer.
  • the application layer may include a series of application packages. As shown in FIG4 , the application package may include applications such as camera, calendar, map, video, navigation, and Bluetooth.
  • the interface switching module may be a lock screen application (keyguard)
  • the PWM adjustment module may be a display tube service module (DMS)
  • the color gamut adjustment module may be a display engine (DE service).
  • the power management module is used to send a power off message or a power on message to the interface switching module when receiving a trigger operation of the power button by the user.
  • the interface switching module can be used to display the 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.
  • the power management module sends a power-off message to the lock screen application so that the electronic device switches from the first interface to the AOD interface.
  • 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, and 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.
  • 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.
  • 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 of switching 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.
  • the interface switching module can also send a frequency reduction instruction to the PWM adjustment module and a color gamut reduction instruction to the color gamut adjustment module.
  • the PWM adjustment module receives the frequency reduction instruction, it reduces the PWM frequency.
  • 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 interface switching module when the second interface is an AOD interface, while the interface switching module is displaying the interface transition effect, the interface switching module can also terminate the display screen light-up animation and magazine wallpaper function, and lock the system.
  • the interface switching module when the interface switching module ends the display of the interface transition effect and displays the AOD interface, the interface switching module can switch the display screen to an energy-saving mode, even if the electronic device enters the DOZE state, and hide non-AOD icons (or non-full-screen AOD icons) and layer scaling effects.
  • the local layer may include an accelerated graphics port (AGP), which is used to complete PWM frequency adjustment in the PWM adjustment module, and when the interface switching module displays a still picture (AOD interface), switch the display screen to TE and reduce the screen refresh rate of the display screen.
  • AGP accelerated graphics port
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • 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.
  • the electronic device further includes a subsystem, which may include a virtual ambient light sensor.
  • the virtual ambient light sensor may send the collected ambient light data to the interface switching module through the HAL layer.
  • the PWM frequency adjustment method provided by the embodiment of the present application is introduced below.
  • Figure 5 is a flow chart of a PWM frequency adjustment method according to an exemplary embodiment.
  • the embodiment of the present application takes the second interface as the AOD interface, and takes the reduction of the PWM frequency as an example for explanation.
  • the method can be executed by the above electronic device, and the electronic device can be implemented through the interaction of multiple modules.
  • the method may include some or all of the following contents:
  • Step 501 When the first interface is displayed on the display screen, if the power management module receives a power switch operation, a power-off message is sent to the interface switching module.
  • the first interface is any interface displayed on the display screen of the electronic device when the display screen is in a bright screen state, for example, the first interface can be the desktop of the electronic device, the application interface of any application, etc.
  • the brightness of the first interface is greater than the brightness of the AOD interface.
  • the power switching operation can be triggered by the user or automatically by the electronic device.
  • the user can press the power button, so that the power management module can receive the power switching operation.
  • the electronic device automatically triggers the power switching operation.
  • the preset time length may be set by the user or by default by the electronic device.
  • the first preset time length may be 20 seconds, 30 seconds, etc.
  • Step 502 upon receiving the power off message, the interface switching module determines the type of the AOD mode.
  • the user may set the type of the AOD mode to a global display mode or a local display mode.
  • the type of the AOD mode is a local display mode
  • the clock view is displayed in the AOD interface
  • the lock screen wallpaper is not displayed (the background in the AOD interface is black).
  • the brightness of the AOD interface is relatively dark, which reduces the power consumption of the electronic device to a certain extent. Therefore, you can choose to adjust the PWM frequency or not.
  • the type of the AOD mode is a global display mode
  • the lock screen wallpaper is displayed with a darker brightness. In this case, in order to reduce the power consumption of the electronic device, the PWM frequency needs to be adjusted.
  • the PWM frequency adjusted when in the local display mode may be the same as the PWM frequency adjusted when in the global display mode, or it may be different. 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.
  • the AOD display message may carry the type of AOD mode to instruct the display driver to drive the display according to the type of AOD mode.
  • the type of AOD mode carried in the AOD display message is a global display mode as an example for description.
  • the interface switching module can pull up the global AOD service to pull up the AOD function.
  • the interface switching module can pull up the AOD application package (Android application package, APK).
  • Step 504 upon receiving the AOD display message, the display driver drives the display screen to display the AOD interface according to the type of the AOD mode.
  • the display driver can drive the display screen to display the AOD interface according to the global display mode.
  • Step 505 The interface switching module sends a first registration instruction to the PWM adjustment module, and sends a second registration instruction to the sensor service module.
  • 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
  • the second registration instruction is used to register the virtual ambient light sensor in the sensor service module.
  • the interface switching module can instruct the PWM adjustment module to register a callback notification of display transparency, and instruct the sensor service module to register a virtual ambient light sensor.
  • Step 506 The PWM adjustment module registers a callback notification of the display transparency of the lock screen wallpaper.
  • the second frequency is greater than the first frequency
  • the second frequency is the PWM dimming frequency when the display screen is in the bright screen state
  • the first frequency is the PWM dimming frequency when the display screen is in the AOD mode.
  • the second frequency can be 3840 Hz
  • the first frequency can be 1440 Hz, etc., and the embodiment of the present application does not specifically limit the first frequency and the second frequency.
  • 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.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
  • the electronic device implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.
  • the electronic device may include 1 or N display screens 194, N is an integer greater than 1.
  • 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 multiple sub-arrays of light-emitting diodes, and the adaptive PWM signal can be dynamically adjusted.
  • PWM pulse width modulation
  • 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 implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the electronic device can implement audio functions, such as music playing and recording, through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D and the application processor.
  • audio functions such as music playing and recording
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A can be set on the display screen 194.
  • the capacitive pressure sensor can be a parallel plate including at least two conductive materials.
  • the electronic device determines the intensity of the pressure based on the change in capacitance.
  • a touch operation acts on the display screen 194
  • the electronic device detects the touch operation intensity according to the pressure sensor 180A.
  • the electronic device can also calculate the touch position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than a pressure threshold acts on a short message application icon, an 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 a short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device.
  • the angular velocity of the electronic device around three axes i.e., x, y, and z axes
  • the gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the proximity light sensor 180G may include a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device emits infrared light outward through the light emitting diode.
  • the electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, the electronic device can determine that there is an object near the electronic device. When insufficient reflected light is detected, it can be determined that the electronic device is There is no object near the device.
  • the electronic device can use the proximity light sensor 180G to detect that the user holds the electronic device close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in the leather case mode and pocket mode to automatically unlock and lock the screen.
  • 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 perceived 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 a pocket to prevent accidental touch.
  • the touch sensor 180K is also called a "touch panel”.
  • the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor 180K can pass 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.
  • the touch sensor 180K can also be set on the surface of the electronic device, which is different from the position of the display screen 194.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 can be a mechanical key or a touch key.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (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 available media integrated.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state drive (SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本申请公开了一种PWM频率的调整方法、电子设备及可读存储介质,属于终端技术领域,该方法包括:接收界面切换操作,界面切换操作是触发电子设备在第一界面和第二界面之间进行切换的操作;响应于界面切换操作,电子设备可以展示界面切换操作对应的界面转场效果,并在展示界面转场效果的过程中,调整PWM频率,其中,界面转场效果包括转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个。本申请通过界面转场效果掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。

Description

PWM频率的调整方法、电子设备及可读存储介质
本申请要求于2023年12月29日提交到国家知识产权局、申请号为202311872440.1、申请名称为“PWM频率的调整方法、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,具体地,涉及一种PWM频率的调整方法、电子设备及可读存储介质。
背景技术
随着终端技术的发展,用户使用电子设备的频率越来越高,电子设备的显示屏通常采用脉冲宽度调制(Pulse width modulation,PWM)调光,该种情况下,若PWM频率低于一定的阈值,那么在用户长时间观看电子设备显示屏后,用户容易产生眼疲劳,因此,通常可以通过调整PWM频率的方式来实现屏幕护眼的功能。
目前,为了实现屏幕护眼的功能,通常情况下,越来越多的电子设备采用高频率PWM调光,即电子设备可以通过较高的PWM频率进行调光。
但是,由于PWM频率一直处于较高的频率,导致电子设备的功耗增加。同时,如果在使用电子设备过程中对PWM频率进行调节,那么在PWM频率变化较大的情况下,可能会出现屏闪,导致屏幕显示效果差。
发明内容
本申请提供了一种PWM频率的调整方法、电子设备及可读存储介质,可以用于解决显示屏中发生屏闪,导致屏幕显示效果差的问题。所述技术方案如下:
第一方面,提供了一种PWM频率的调整方法,应用于具有显示屏的电子设备中,该方法包括:
接收界面切换操作,该界面切换操作是触发电子设备在第一界面和第二界面之间进行切换的操作;响应于界面切换操作,展示界面切换操作对应的界面转场效果;在展示界面转场效果的过程中,调整显示屏的PWM频率。
如此,由于可以随着显示内容的变化调整PWM频率,从而保证了显示屏的护眼功能,且降低了电子设备的功耗。另外,调整PWM频率的时机处于展示界面转场效果的过程中,如此,该界面转场效果在展示过程中不同的效果可以掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。用户几乎察觉不到该屏闪的发生,从而提高了用户粘度。
作为本申请的一个示例,界面转场效果包括转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个。
如此,通过设置不同的界面转场效果,从而提升了界面转场的丰富性,以及提升了界面转场过程中掩盖屏闪的可靠性。
作为本申请的一个示例,第一界面的亮度大于第二界面的亮度;
基于此,电子设备在展示界面转场效果的过程中,调整显示屏的PWM频率的操作包括:
在界面切换操作是第一操作的情况下,在展示界面转场效果的过程中调高显示屏的PWM频率,第一操作是触发电子设备从第二界面切换至第一界面的操作;在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率,第二操作是触发电子设备从第一界面切换至第二界面的操作。
如此,在显示屏显示的界面由第一界面切换至第二界面的过程中,电子设备可以展示第一转场效果,且在展示第一转场效果的过程中,可以降低PWM频率。也即是,由于在显示亮度降低的第二界面的情况下,PWM频率降低,如此,降低了电子设备的功耗。在显示屏显示的界面由第二界面切换至第一界面的过程中,电子设备可以展示第二转场效果,且在展示第二转场效果的过程中,可以调高PWM频率,如此,实现了根据显示内容不同动态调整PWM频率的目的,且由于能够调高PWM频率,兼顾了电子设备的护眼功能。另外,调整PWM频率的时机处于展示界面转场效果的过程中,如此,该界面转场效果在展示过程中不同的效果可以掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。
作为本申请的一个示例,第二界面为AOD界面,电子设备在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率之前,还可以确定电子设备中的AOD模式的类型,该AOD模式的类型包括全局显示模式和局部显示模式。
基于此,电子设备在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率的操作包括:
在界面切换操作是第二操作,且AOD模式的类型是全局显示模式的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率。
在一些实施例中,与电子设备的设置相关的信息可以存储至设置数据库中,因此,电子设备可以查询设置数据库,从设置数据库中确定AOD模式的类型。
如此,通过确定AOD模式的类型,从而更有针对性的进行PWM频率的降低,提升了调整PWM频率的可靠性。
作为本申请的一个示例,界面切换操作是第二操作;电子设备中包括界面切换模块和PWM调整模块,且界面转场效果包括转场动画;
基于此,电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:
界面切换模块响应于第二操作,展示由第一界面切换至第二界面的第一转场动画;
电子设备在界面切换操作是触发电子设备从第一界面切换至第二界面的第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率的操作包括:
界面切换模块在展示第一转场动画的过程中,向PWM调整模块发送频率降低指令;PWM调整模块响应于频率降低指令,降低PWM频率。
在一些实施例中,界面切换操作是第一操作;电子设备中包括界面切换模块和PWM调整模块,且界面转场效果包括转场动画;
基于此,电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果 的操作包括:
界面切换模块响应于第一操作,展示由第二界面切换至第一界面的第二转场效果,第二转场效果中包括第二转场动画;
在界面切换操作是第一操作的情况下,电子设备在展示界面转场效果的过程中调高显示屏的PWM频率的操作包括:
界面切换模块在展示第二转场效果的过程中,向PWM调整模块发送频率调高指令;PWM调整模块响应于频率调高指令,调高PWM频率。
如此,界面切换模块根据界面切换操作的不同,可以向PWM调整模块发送不同的频率调节指令,从而提升了调整PWM频率的可靠性和准确性。
作为本申请的一个示例,界面切换操作是第二操作,界面转场效果还包括界面透明度变化效果;基于此,电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:
响应于界面切换操作,获取电子设备所处环境的环境光数据;根据环境光数据,确定第二界面的界面背景的显示透明度;将第二界面的界面背景的透明度设置为显示透明度;根据设置后的界面背景展示界面转场效果。
如此,通过当前环境光数据确定显示透明度,并将第二界面中的界面背景的透明度设置为显示透明度,不仅保证了第二界面的美观性,也使得第二界面中的信息能够被用户快速获取而不会被界面背景吸引注意力。
作为本申请的一个示例,所述界面转场效果还包括色域变化效果;
电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:
响应于所述界面切换操作,若界面切换操作是第一操作,则提升显示屏的色域;响应于所述界面切换操作,若界面切换操作是第二操作,则降低显示屏的色域。
作为本申请的一个示例,电子设备中包括界面切换模块和色域调整模块;
基于此,若界面切换操作是第一操作,则电子设备提升显示屏的色域的操作包括:
色域调整模块在接收到界面切换模块发送的色域提升指令的情况下,提升显示屏的色域,色域提升指令为界面切换模块在接收到第一操作的情况下发送;
若界面切换操作是第二操作,则电子设备降低显示屏的色域的操作包括:
色域调整模块在接收到界面切换模块发送的色域降低指令的情况下,降低显示屏的色域,色域降低指令为界面切换模块在接收到第二操作的情况下发送。
如此,通过不同的场景对显示屏的色域进行不同的操作,可以使得显示屏的色彩显示与所显示的画面更适配,提升了显示屏的显示效果。
作为本申请的一个示例,界面转场效果还包括亮度变化效果;
电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:
响应于界面切换操作,若界面切换操作是第一操作,则提高显示屏的亮度;响应于界面切换操作,若界面切换操作是第二操作,则降低显示屏的亮度。
作为本申请的一个示例,电子设备中包括至少两条gamma曲线,至少两条gamma曲线中每条gamma曲线与一个PWM频率对应。
如此,通过设置不同的gamma曲线,使得对PWM频率的调节更可靠也更平滑。
作为本申请的一个示例,第二界面为AOD界面,电子设备在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率之后,还可以显示AOD界面,并降低显示屏的屏幕刷新率。比如,电子设备显示AOD界面的情况下,即电子设备静态显示的情况下,可以将显示屏的屏幕刷新率降低为1Hz。
如此,通过降低显示屏的屏幕刷新率,从而降低了电子设备的功耗。
作为本申请的一个示例,电子设备在界面切换操作是第一操作的情况下,在展示界面转场效果的过程中调高显示屏的PWM频率的操作包括:
在界面切换操作是第一操作的情况下,在展示界面转场效果的过程中将PWM频率由第一频率调高至第二频率,第一频率小于第二频率;
电子设备在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率的操作包括:
在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中将PWM频率由第二频率降低至第一频率。
如此,通过设置第一频率和第二频率,使得电子设备在调整PWM频率时具有数据支持,提高了调整PWM频率的可靠性和准确性。
第二方面,提供了一种电子设备,所述电子设备的结构中包括处理器和存储器,所述存储器用于存储支持电子设备执行上述第一方面所提供的PWM频率的调整方法的程序,以及存储用于实现上述第一方面所述的PWM频率的调整方法所涉及的数据。所述处理器被配置为用于执行所述存储器中存储的程序。所述电子设备还可以包括通信总线,所述通信总线用于在所述处理器与所述存储器之间建立连接。
第三方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的PWM频率的调整方法。
第四方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的PWM频率的调整方法。
上述第二方面、第三方面和第四方面所获得的技术效果与上述第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
附图说明
图1是本申请实施例提供的一种应用场景的示意图;
图2是本申请实施例提供的另一种应用场景的示意图;
图3是本申请实施例提供的另一种应用场景的示意图;
图4是本申请实施例提供的一种电子设备的软件系统的框图;
图5是本申请实施例提供的一种PWM频率的调整方法的流程图;
图6是本申请实施例提供的一种不同PWM频率对应的脉冲示意图;
图7是本申请实施例提供的一种亮度变化示意图;
图8是本申请实施例提供的另一种PWM频率的调整方法的流程图;
图9是本申请实施例提供的一种PWM频率降低过程示意图;
图10是本申请实施例提供的一种PWM频率调高过程示意图;
图11是本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。
应当理解的是,本申请提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,比如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,比如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
随着终端技术的发展,用户使用电子设备的频率越来越高,电子设备的显示屏通常可以使用PWM调光。其中,在采用PWM调光的情况下,可以通过调整PWM的占空比,实现调节人眼感受到的亮度值。但是,在调整PWM的占空比的情况下,PWM频率是不会发生变化的,如果PWM频率低于一定的阈值,那么在用户长时间观看电子设备显示屏后,用户容易产生眼疲劳。因此,为了实现护眼功能,越来越多的电子设备采用高频率PWM调光,即电子设备可以通过较高的PWM频率进行调光。而PWM频率一直处于较高的频率,将会导致电子设备的功耗增加。同时,如果在使用电子设备过程中对PWM频率进行调节,那么在PWM频率变化较大的情况下,可能会出现屏闪,导致屏幕显示效果差,且用户可能会察觉该屏闪,导致用户粘度降低。
为了实现屏幕护眼功能和降低电子设备的功耗,本申请实施例提供了一种PWM频率的调整方法,该方法中,电子设备可以根据显示内容动态调整PWM频率。比如,在用户需要长时间盯着显示屏的情况下,如在用户使用电子设备读电子书、看视频等的情况下,电子设备可以调高PWM频率,以达到护眼效果。在无需用户长时间盯着显示屏的情况下,如在显示AOD(Always On Display)界面的情况下,电子设备可以显示时钟信息和电量信息,且不显示其他信息,用户瞥一眼显示屏即可快速获取需要的信息,该种情况下,无需使用高频PWM进行调光,电子设备可以降低PWM频率,以降低电子设备的功耗。
另外,在调整PWM频率的过程中,为了改善调整PWM的过程中,因显示屏的屏闪导致的显示效果差的问题,电子设备可以在发生界面切换而展示界面转场效果的 过程中,动态调整PWM频率。也即是,电子设备在接收到界面切换操作的情况下,展示界面切换操作对应的界面转场效果,在展示界面转场效果的过程中,电子设备可以调整PWM频率。由于可以随着显示内容的变化调整PWM频率从而保证了显示屏的护眼功能,且降低了电子设备的功耗。另外,调整PWM频率的时机处于展示界面转场效果的过程中,如此,该界面转场效果在展示过程中不同的效果可以掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。用户几乎察觉不到该屏闪的发生,从而提高了用户粘度。
为了便于理解,在对本申请实施例提供的方法进行详细介绍之前,接下来对本申请实施例涉及的应用场景进行介绍。
请参考图1,图1为本申请实施例提供的一种应用场景的示意图,在一种应用场景中,用户在结束使用手机后,可以触发电源键,以退出当前显示的界面,并进入熄屏状态。或者,在用户结束使用手机后,用户一直未使用手机,那么在待机时长达到自动熄屏时长的情况下,手机可以自动退出当前显示的界面,并进入熄屏状态。如果手机设置有AOD模式,那么在手机进入熄屏状态后,可以显示AOD界面。示例性地,手机在显示如图1中的(a)图所示的视频应用程序的社交应用界面S1的情况下,若用户按压电源键S2,则参见图1中的(b)图,手机可以展示界面转场效果,即展示社交应用界面S1切换至AOD界面S3的转场动画,在展示转场动画的过程中,手机可以降低PWM频率,如将PWM频率由3840Hz(赫兹)降低至1440Hz。其中,该转场动画中一帧图像可以如图1中的(c)图所示,在转场动画展示结束的情况下,手机可以显示如图1中的(d)图所示的AOD界面S3。
需要说明的是,本申请实施例中界面转场效果中一帧图像仅为示例,电子设备可以按照图1所示的转场方式展示界面转场效果,也可以通过其他方式,如通过其他预设动效效果进行展示,该预设动效效果可以是从无到有的渐变效果等,本申请实施例对此不作具体限制。
请参考图2,图2为本申请实施例提供的另一种应用场景的示意图,在另一种应用场景中,参见图2中的(a)图,手机在展示社交应用界面S1切换至AOD界面S3的界面转场效果的过程中,该界面转场效果不仅可以包括界面社交应用界面S1切换至AOD界面S3的转场动画,还可以包括AOD界面S3中的色域变化效果。其中,界面转场效果中一帧图像A可以如图2中的(b)图所示。位于该一帧图像A之后任意一帧图像B可以如图2中的(c)图所示,在图2中的(c)图中,AOD界面的色域降低。在转场动画展示结束的情况下,手机可以显示如图2中的(d)图所示的AOD界面S3。
需要说明的是,手机在展示社交应用界面S1切换至AOD界面S3的界面转场效果的过程中,该界面转场效果不仅可以包括界面社交应用界面S1切换至AOD界面S3的转场动画,以及AOD界面S3中的色域变化效果,还可以包括显示屏亮度降低的效果以及AOD界面的透明度的变化效果。本申请实施例附图中不再一一进行说明。
请参考图3,手机在显示如图3中的(a)图所示的AOD界面S3的情况下,用户触碰手机屏幕,则参见图3中的(b)图,手机可以展示界面转场效果,即展示AOD界面S3切换至锁屏界面S4的转场动画、显示屏色域变化效果以及锁屏壁纸显示透明 度的变化效果。在展示该界面转场效果的过程中,手机可以调高PWM频率,如将PWM频率由1440Hz(赫兹)调高至3840Hz,且在展示界面转场效果的过程中,界面中相关信息的大小也发生了变化,如时钟信息放大。其中,界面转场效果中一帧图像可以如图3中的(c)图所示,该图3中的(c)图中,AOD界面的透明度由原来的50%变为了40%,显示屏色域调高。在界面转场效果展示结束的情况下,手机可以显示如图3中的(d)图所示的锁屏界面S4,该锁屏界面S4中,锁屏壁纸的透明度为0%。锁屏界面S4中的时钟信息的字体明显大于AOD界面中时钟信息的字体。
需要说明的是,在手机显示AOD界面S3的情况下,用户还可以通过按压电源键S2的方式触发手机展示AOD界面S3切换至锁屏界面S4的转场效果。本申请实施例对此不作具体限定。
需要说明的是,本申请实施例仅以上述图1-图3所示的应用场景为例进行说明,并不对本申请实施例构成限定。
接下来对电子设备100的软件系统予以说明。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的安卓(Android)系统为例,对电子设备100的软件系统进行示例性说明。
图4是本申请实施例提供的一种电子设备100的软件系统的框图。参见图4,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为多层,从上至下分别为应用程序层,应用程序框架层,本次层(Native层)、硬件抽象层(Hardware Abstraction Layer,HAL),以及内核层。
应用程序层可以包括一系列应用程序包。如图4所示,应用程序包可以包括相机,日历,地图,视频,导航,蓝牙等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图3所示,界面切换模块、电源管理模块(PMS)、PWM调整模块、色域调整模块和传感器服务模块(SensorService)。
作为一个示例,在第二界面为AOD界面的情况下,该界面切换模块可以为锁屏应用(keyguard),该PWM调整模块可以为显示管服务模块(DMS),色域调整模块可以为显示引擎(DE service)。
在一些实施例中,电源管理模块用于在接收到用户对电源键的触发操作的情况下,向界面切换模块发送电源关闭消息或电源开启消息。界面切换模块可以用于根据接收的电源管理模块发送的消息,展示界面转场效果,并向PWM调整模块和色域调整模块发送相关指令。PWM调整模块用于根据界面切换模块发送的指令,调高PWM频率或降低PWM频率。色域调整模块用于根据界面切换模块发送的指令,调整显示屏的色域。
接下来,以电源管理模块向锁屏应用发送电源关闭消息,以使电子设备由第一界面切换至AOD界面为例进行说明。
在一些实施例中,电源管理模块在接收到用户对电源键的触发操作的情况下,向界面切换模块发送电源关闭消息。界面切换模块在接收到电源管理模块发送的电源关闭消息的情况下,拉起AOD功能,并向内核层中的显示驱动发送AOD显示消息,该AOD显示消息用于指示显示驱动按照AOD模式的类型驱动显示。界面切换模块在拉起AOD功能后可以在PWM调整模块中注册锁屏壁纸的显示透明度(该显示透明度可以通过α值表示)的回调通知,并在传感器服务模块中注册子系统的虚拟环境光传感器。传感器服务模块在完成虚拟环境光传感器的注册后向虚拟环境光传感器发送环境光获取消息,该环境光获取消息用于指示虚拟环境光传感器将检测到的环境光数据发送至PWM调整模块。PWM调整模块在接收到环境光数据的情况下,根据环境光数据,确定锁屏壁纸的显示透明度,并将显示透明度发送至界面切换模块。界面切换模块在接收到显示透明度的情况下,设置AOD界面中锁屏壁纸的透明度为显示透明度,并展示由第一应用界面切换至AOD界面的界面转场效果。其中,界面转场效果展示结束后显示AOD界面的情况下,该AOD界面中锁屏壁纸的透明度为显示透明度。在展示界面转场效果的过程中,界面切换模块还可以向PWM调整模块发送频率降低指令,并向色域调整模块发送色域降低指令。PWM调整模块在接收到频率降低指令的情况下,降低PWM频率。色域调整模块在接收到界面切换模块发送的色域降低指令的情况下,降低显示屏的色域。
在一些实施例中,在第二界面为AOD界面的情况下,在界面切换模块展示界面转场效果的过程中,界面切换模块还可以终止显示屏的亮屏动效和杂志壁纸功能,并对系统进行上锁。
在一些实施例中,在界面切换模块结束界面转场效果的展示,并显示AOD界面的情况下,界面切换模块可以将显示屏切换至节能省电模式,即使电子设备进入DOZE状态,并隐藏非AOD图标(或者非全屏AOD图标)和图层缩放动效。
本地层中可以包括加速图形接口(Accelerate Graphical Port,AGP),AGP用于在PWM调整模块完成PWM频率调整,且在界面切换模块显示静止画面(AOD界面)的情况下,将显示屏切换至TE,并降低显示屏的屏幕刷新率。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
作为一个示例,显示驱动用于在接收到界面切换模块发送的AOD显示消息的情况下,驱动显示屏按照AOD模式进行显示。
在一些实施例中,电子设备中还包括子系统,子系统中可以包括虚拟环境光传感器,虚拟环境光传感器可以将采集到的环境光数据通过HAL层发送至界面切换模块。
基于上述实施例提供的执行主体,接下来对本申请实施例提供的PWM频率的调整方法进行介绍。请参考图5,图5是根据一示例性示出的一种PWM频率的调整方法流程示意图,作为示例而非限定,本申请实施例以第二界面为AOD界面,且以降低PWM频率为例进行说明,该方法可以由上述电子设备执行,电子设备可以通过多个模块交互实现,该方法可以包括如下部分或者全部内容:
步骤501:在显示屏中显示第一界面的情况下,若电源管理模块接收到电源切换 操作,则向界面切换模块发送电源关闭消息。
需要说明的是,第一界面为显示屏处于亮屏状态的情况下,电子设备在显示屏中显示的任意一个界面,比如,该第一界面可以是电子设备的桌面、任意一个应用程序的应用界面等。其中,第一界面的亮度大于AOD界面的亮度。
在一些实施例中,电源切换操作可以是用户触发,也可以是电子设备自动触发。示例性地,在显示屏中显示第一界面的情况下,用户可以按压电源键,如此,电源管理模块可以接收到电源切换操作。或者,在显示屏显示第一界面,且用户长时间未操控电子设备的情况下,若离用户最后一次操控电子设备的时长达到预设时长(电子设备的待机时长达到预设时长),则电子设备自动触发电源切换操作。
需要说明的是,该预设时长可以是用户自主设置的,也可以是电子设备默认设置的,比如,该第一预设时长可以为20秒、30秒等。
步骤502:界面切换模块在接收到电源关闭消息的情况下,确定AOD模式的类型。
由于用户在设置AOD模式的情况下,可能会设置AOD模式的类型为全局显示模式,也可能会设置AOD模式的类型为局部显示模式。其中,在AOD模式的类型是局部显示模式的情况下,AOD界面中显示时钟视图,且锁屏壁纸并不会显示(AOD界面中的背景为黑色),该种情况下,AOD界面的亮度原本就比较暗,在一定程度上降低了电子设备的功耗,因此,可以选择调整PWM频率也可以选择不调整PWM频率。而AOD模式的类型是全局显示模式的情况下,锁屏壁纸是以较暗的亮度显示,该种情况下,为了降低电子设备功耗,需要调整PWM频率。另外,由于选择局部显示模式时调整PWM频率的情况下,处于局部显示模式时所调整的PWM频率与处于全局显示模式时所调整PWM频率有可能相同,也可能不相同。因此,为了准确地调整PWM频率,界面切换模块在接收到电源关闭消息的情况下,可以确定AOD模式的类型。
当然,为了使显示驱动通过对应方式驱动显示屏显示AOD界面,界面切换模块也可以确定AOD模式的类型。
在一些实施例中,与电子设备的设置有关的信息可以存储至设置数据库中,因此,界面切换模块可以查询设置数据库,从设置数据库中确定AOD模式的类型。
步骤503:界面切换模块拉起AOD功能,并向显示驱动发送AOD显示消息。
需要说明的是,该AOD显示消息中可以携带AOD模式的类型,以指示显示驱动按照AOD模式的类型驱动显示。本申请实施例中以AOD显示消息中携带的AOD模式的类型是全局显示模式为例进行说明。
在一些实施例中,在AOD模式的类型为全局显示模式的情况下,界面切换模块可以拉起全局AOD服务以拉起AOD功能。在AOD模式的类型为局部显示模式的情况下,界面切换模块可以拉起AOD的应用程序包(Android application package,APK)。
步骤504:显示驱动在接收到AOD显示消息的情况下,驱动显示屏按照AOD模式的类型显示AOD界面。
需要说明的是,在AOD显示消息中携带的AOD模式的类型为全局显示模式的情况下,显示驱动可以驱动显示屏按照全局显示模式显示AOD界面。
步骤505:界面切换模块向PWM调整模块发送第一注册指令,并向传感器服务模块发送第二注册指令。
需要说明的是,第一注册指令用于在PWM调整模块中注册锁屏壁纸的显示透明度(该显示透明度可以通过α值表示)的回调通知,第二注册指令用于在传感器服务模块中注册虚拟环境光传感器。
为了顺利调用α值以及环境光数据,界面切换模块可以指示PWM调整模块注册显示透明度的回调通知,并指示传感器服务模块注册虚拟环境光传感器。
需要说明的是,本申请实施例中对界面切换模块执行步骤503和步骤505的顺序并不作具体限制。
步骤506:PWM调整模块注册锁屏壁纸的显示透明度的回调通知。
步骤507:传感器服务模块注册虚拟环境光传感器,并向所注册的虚拟环境光传感器发送环境光获取消息。
需要说明的是,该环境光获取消息用于指示虚拟环境光传感器将检测到的环境光数据发送至PWM调整模块。
步骤508:虚拟环境光传感器在接收到环境光获取消息的情况下,向PWM调整模块发送检测到的环境光数据。
需要说明的是,环境光数据中包括指示电子设备当前所处环境的光强度。
步骤509:PWM调整模块根据环境光数据,确定锁屏壁纸的显示透明度。
作为一个示例,电子设备中可以存储显示透明度与环境光数据之间的对应关系,如此,PWM调整模块可以根据接收到的环境光数据,从存储的对应关系中确定锁屏壁纸的显示透明度,该对应关系可以通过二维曲线表示,也可以通过表格表示。或者,电子设备中可以存储关系函数,该关系函数用于指示环境光数据与显示透明度之间的对应关系的函数,PWM调整模块在接收到环境光数据的情况下,可以根据该环境光数据通过该关系函数计算锁屏壁纸的显示透明度。
步骤510:PWM调整模块向界面切换模块发送显示透明度。
由于PWM调整模块中注册有界面切换模块回调显示透明度的回调通知,因此,PWM调整模块可以将显示透明度发送至界面切换模块。
步骤511:界面切换模块根据显示透明度,展示第一转场动画。
在一些实施例中,界面切换模块将AOD界面中的锁屏壁纸的透明度设置为显示透明度,然后展示第一转场动画,即第一转场动画中出现携带锁屏壁纸的图像帧的情况下,该图像帧中锁屏壁纸的透明度为显示透明度。或者,在展示第一转场动画过程中,将AOD界面中的锁屏壁纸的透明度设置为显示透明度,该种情况下,根据设置显示透明度的时机不同,第一转场动画中可能会出现锁屏壁纸的透明度发生变化的场景,也可能不会出现。
作为一个示例,第一转场动画包括第一界面的退出动画和AOD界面的显示动画,若界面切换模块在展示第一转场动画的过程中,在展示AOD界面的显示动画之前完成锁屏壁纸的透明度设置,那么AOD界面的显示动画中携带锁屏壁纸的图像帧中,所有锁屏壁纸的透明度为显示透明度。若界面切换模块在展示第一转场动画的过程中,在展示AOD界面的显示动画的过程中设置锁屏壁纸的透明度,那么AOD界面的显示动画中包括锁屏壁纸透明度发生变化的场景。
在一些实施例中,界面切换模块可以通过睡眠函数设置锁屏壁纸的透明度以及展 示第一转场动画,该睡眠函数可以为startGoingToSleep。
步骤512:界面切换模块在展示第一转场动画的过程中,向PWM调整模块发送频率降低指令和亮度调节指令,并向色域调整模块发送色域降低指令。
为了降低电子设备功耗,也为了避免用户察觉调整PWM频率过程中显示屏发生的屏闪,界面切换模块在展示第一转场动画的过程中,可以向PWM调整模块发送频率降低指令和亮度调节指令,以指示PWM调整模块在界面切换模块展示第一转场动画的过程中降低PWM频率,并降低显示屏的亮度。同时,为了实现AOD功能,界面切换模块还可以向色域调整模块发送色域降低指令。
步骤513:PWM调整模块在接收到频率降低指令的情况下,将PWM频率由第二频率降低至第一频率,并在接收到亮度降低指令的情况下,降低显示屏的亮度。
需要说明的是,第二频率大于第一频率,第二频率为显示屏处于亮屏状态下的PWM调光频率,第一频率为显示屏处于AOD模式下的PWM调光频率。示例性地,该第二频率可以为3840Hz,第一频率可以为1440Hz等,本申请实施例对第一频率和第二频率并不做具体限制。
在一些实施例中,对PWM频率调整是指相同占空比下,增加PWM的脉冲。示例性地,该调整过程可以参考图6所示的示意图,PWM占空比未发生变化,PWM频率为3840Hz的情况下,PWM脉冲个数为32个(一个周期内的个数),PWM频率为1440Hz的情况下,PWM脉冲个数为12个(一个周期内的个数)。
在一些实施例中,为了实现PWM频率的切换,电子设备中可以包括至少两条gamma曲线,至少两条gamma曲线中每条gamma曲线与一个PWM频率对应。
需要说明的是,电子设备中包括的gamma曲线越多,PWM调整模块调整PWM频率的过程越平滑流畅。比如,第一频率对应的gamma曲线和第二频率gamma曲线之间包括其他频率对应的gamma曲线,如此,PWM调整模块可以按照每条gamma曲线对应脉冲依次降低PWM频率。
在一些实施例中,PWM调整模块在接收到亮度降低指令的情况下,可以通过调整PWM占空比的方式降低显示屏的亮度,当然也可以通过其他方式,本申请实施例对此不作具体限制。
为了体现亮度变化,本申请实施例提供了一种调整显示屏亮度的示意图,参见图7,在图7中,T1时刻对应的亮度A为调整亮度前显示屏的亮度,T2时刻对应的亮度B为调整亮度后显示屏的亮度。
在一些实施例中,PWM调整模块将PWM频率由第二频率降低至第一频率之后,可以将调光完成消息发送给AGP。
步骤514:色域调整模块在接收到色域降低指令的情况下,降低显示屏的色域。
需要说明的是,本申请实施例对执行步骤513和步骤514的顺序并不作具体限制。
在一些实施例中,界面切换模块在展示第一转场动画的过程中,不仅可以指示PWM调整模块降低PWM频率和显示屏的亮度,并指示色域调整模块降低显示屏的色域。界面切换模块还可以终止显示屏的亮屏动效和杂志壁纸,并给系统上锁。之后,将显示屏由ON()状态切换为DOZE状态,隐藏非全屏AOD图标和图层缩放动效。
需要说明的是,界面切换模块可以通过屏幕关闭函数终止显示屏的亮屏动效和杂 志壁纸,该屏幕关闭函数可以为screenTurnedOff。界面切换模块可以通过完成函数给系统上锁,该完成函数可以为finishedGoingToSleep。界面切换模块可以通过dreamingStarted函数将显示屏由ON状态切换为DOZE状态,隐藏非全屏AOD图标和图层缩放动效。
在一些实施例中,界面切换模块在完成第一转场效果(包括上述第一转场动画、显示屏亮度降低效果、AOD界面的锁屏壁纸透明度变化效果以及色域降低效果)的展示和AOD界面显示之后,可以向AGP发送显示完成消息。AGP在接收到调光完成消息和显示完成消息的情况下,可以降低显示屏的屏幕刷新率。
示例性地,AGP可以将显示屏的屏幕刷新率降低至1Hz。
在本申请实施例中,在显示屏显示的界面由第一界面切换至AOD界面的过程中,电子设备可以展示第一转场效果,且在展示第一转场效果的过程中,可以降低PWM频率。也即是,由于在显示AOD界面的情况下,PWM频率降低,如此,降低了电子设备的功耗。另外,调整PWM频率的时机处于展示界面转场效果的过程中,如此,该界面转场效果在展示过程中不同的效果可以掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。
由于电子设备不仅可以降低PWM频率,电子设备还可以调高PWM频率,比如,在第二界面为AOD界面,且电子设备在由AOD界面切换至第一界面的情况下,电子设备可以调高PWM频率。电子设备调高PWM频率的过程和降低PWM频率的过程相似,本申请实施例不再单独对电子设备中的多个模块交互以调高PWM频率的流程进行介绍。
在上述实施例的基础上,接下来以电子设备为执行主体,对电子设备完成PWM频率的调整方法进行介绍。请参见图8,图8是根据一示例性实施例示出的另一种PWM频率的调高方法的流程示意图,该方法可以包括如下部分或者全部内容:
步骤801:接收界面切换操作。
需要说明的是,界面切换操作可以是触发电子设备在第一界面和第二界面之间进行切换的操作。也即是,界面切换操作是触发电子设备从第二界面切换至第一界面的第一操作,或者,界面切换操作是触发电子设备从第一界面切换至第二界面的第二操作。作为一个示例,第一界面的亮度可以与第二界面的亮度相同,也可以不同,示例性地,在第一界面的亮度与第二界面的亮度不相同的情况下,该第一界面的亮度大于第二界面的亮度。
由上述可知,第一界面为显示屏处于亮屏状态的情况下,电子设备在显示屏中显示的任意一个界面,比如,该第一界面可以是电子设备的桌面、任意一个应用程序的应用界面等。
作为一个示例,第一操作可以是用户按压电源键的操作,也可以是其他操作,如第一操作可以为用户点击显示屏的操作、或者为用户挪动电子设备的操作、用户注视显示屏的操作等,本申请实施例对此不作具体限制。
作为一个示例,第二操作可以是上述步骤501中的电源切换操作,即第二操作可以是用户触发,也可以是电子设备自动触发。示例性地,在显示屏中显示第一界面的 情况下,用户可以按压电源键,以触发第二操作,如此,电子设备可以接收到第二操作。或者,在显示屏显示第一界面,且在用户长时间未操控电子设备的情况下,若离用户最后一次操控电子设备的时长达到预设时长,则电子设备自动触发第二操作。
步骤802:响应于界面切换操作,展示界面切换操作对应的界面转场效果。
需要说明的是,界面转场效果包括转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个。由上述可知,界面切换操作可能是第一操作,也可能是第二操作,且根据界面切换操作的不同,电子设备展示的界面转场效果也不同。
由于界面转场效果包括转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个,也即是,响应于界面切换操作,电子设备展示界面切换操作对应的转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个。
示例性地,在第二界面为AOD界面,且界面切换操作是第二操作的情况下,参见图9,电子设备可以展示由第一界面切换至AOD界面的第一转场效果。其中,在第一转场效果中包括第一转场动画的情况下,该场景可以参考上述图1或图2所示的场景。在第二界面为AOD界面,且界面切换操作是第一操作的情况下,参见图10,电子设备可以展示由AOD界面切换至第一界面的第二转场效果。其中,在第二转场效果中包括第二转场动画的情况下,该场景可以参考上述图3所示的场景。
在一些实施例中,界面切换操作是第二操作,界面转场效果包括界面透明度变化效果;如此,电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:响应于界面切换操作,获取电子设备所处环境的环境光数据;根据环境光数据,确定第二界面的界面背景的显示透明度;根据显示透明度展示界面转场效果,该第二界面中界面背景的透明度为显示透明度。
示例性地,在第二界面为AOD界面的情况下,AOD界面的背景界面即为锁屏壁纸。
作为一个示例,电子设备根据显示透明度展示界面转场效果的操作包括:将第二界面中界面背景的透明度设置为显示透明度,根据设置后的界面背景展示界面转场效果。也即是,界面转场效果中,至少一帧转场效果中包括的第二界面的界面背景的透明度为显示透明度。
在一些实施例中,电子设备响应于界面切换操作,获取电子设备所处环境的环境光数据;根据环境光数据,确定第二界面的界面背景的显示透明度的操作可以参考上述步骤505-步骤509的操作,本申请实施例对此不再进行一一赘述。
需要说明的是,在第二界面为AOD界面的情况下,AOD界面中的锁屏壁纸的透明度与锁屏界面中锁屏壁纸的透明度可以相同,也可以不相同,且通常情况下,AOD界面中的锁屏壁纸的透明度大于锁屏界面中锁屏壁纸的透明度。
值得说明的是,通过当前环境光数据确定显示透明度,并将第二界面中的界面背景的透明度设置为显示透明度,不仅保证了第二界面的美观性,也使得第二界面中显示的信息能够被用户快速获取而不会被界面背景吸引注意力。
在一些实施例中,电子设备可以包括界面切换模块和PWM调整模块,且界面转场效果包括转场动画;如此,在界面切换操作是第二操作的情况下;电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:界面切换模块响 应于第二操作,展示由第一界面切换至第二界面的第一转场动画。
作为一个示例,界面切换模块响应于第二操作,展示由第一界面切换至第二界面的第一转场动画的操作可以参考上述步骤502-步骤511的操作,本申请实施例对此不再进行一一赘述。
在一些实施例中,在界面切换操作是第一操作且界面转场效果包括转场动画的情况下,电子设备响应于界面切换操作,展示界面切换操作对应的界面转场效果的操作包括:界面切换模块响应于第一操作,展示由第二界面切换至第一界面的第二转场动画。
在一些实施例中,界面转场效果不仅可以转场动画,还可以包括其他效果,如还可以包括色域变化效果。示例性地,响应于界面切换操作,电子设备根据第一界面的色域和第二界面的色域,展示色域变化效果。其中,在第一界面色域高于第二界面的色域的情况下,降低显示屏的色域;在第一界面的色域低于第二界面的色域的情况下,提升显示屏的色域。也即是,在第一界面的亮度大于第二界面的情况下,若界面切换操作是第一操作,则电子设备可以提升显示屏的色域;若界面切换操作是第二操作,则电子设备可以降低显示屏的色域。
由上述可知,电子设备中包括界面切换模块和色域调整模块,如此,色域调整模块在接收到界面切换模块发送的色域降低指令的情况下,可以降低显示屏的色域,该色域降低指令为界面切换模块在接收到第二操作的情况下发送;色域调整模块在接收到界面切换模块发送的色域提升指令的情况下,提升显示屏的色域,该色域提升指令为界面切换模块在接收到第一操作的情况下发送。
值得说明的是,通过不同的场景对显示屏的色域进行不同的操作,可以使得显示屏的色彩显示与所显示的画面更适配,提升了显示屏的显示效果。
由于第一界面的亮度可能大于第二界面的亮度,也可能与第二界面的亮度相同,根据第一界面的亮度和第二界面的亮度,电子设备展示的界面转场效果也不同。
作为一个示例,在第一界面的亮度与第二界面的亮度相同的情况下,电子设备展示的界面转场效果中不包括亮度变化效果。在第一界面的亮度和第二界面的亮度不相同的情况下,电子设备展示的转场效果包括亮度变化效果。
在一些实施例中,第一界面的亮度大于第二界面的亮度,且转场效果还可以包括亮度变化效果,如此,响应于界面切换操作,若界面切换操作是第一操作,则提高显示屏的亮度;响应于界面切换操作,若界面切换操作是第二操作,则降低显示屏的亮度。
值得说明的是,通过在界面转场过程中降低显示屏亮度,从而降低了电子设备的功耗。
步骤803:在展示界面转场效果的过程中,调整显示屏的PWM频率。
由上述可知,第一界面的亮度可能大于第二界面的亮度,也可能与第二界面的亮度相同,根据第一界面的亮度和第二界面的亮度,电子设备在展示界面转场效果的过程中,调整显示屏的PWM频率的操作也不相同。
在一些实施例中,第一界面的亮度与第二界面的亮度相同,该种情况下,电子设备在展示界面转场效果的过程中,调整显示屏的PWM频率的操作包括:确定第一界 面的显示内容和第二界面的显示内容,在第二界面的显示内容属于指定场景内容,且第一界面的显示内容不属于指定场景内容的情况下,调高PWM频率。在第二界面的显示内容不属于指定场景内容且第一界面的显示内容属于指定场景内容的情况下,降低PWM频率。在第二界面的显示内容和第一界面的显示内容均不属于指定场景内容的情况下,不调整PWM频率。在第二界面的显示内容和第一界面的显示内容均属于指定场景内容的情况下,同样不调整PWM频率。
需要说明的是,指定场景内容为需要电子设备启动护眼功能的内容,比如,该指定场景内容为视频、文章等。
在一些实施例中,第一界面的亮度大于第二界面的亮度,基于此,在界面切换操作是第一操作的情况下,在展示界面转场效果的过程中调高显示屏的PWM频率。在界面切换操作是第二操作的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率。
由上述可知,电子设备可以包括界面切换模块和PWM调整模块,界面转场效果包括转场动画,基于此,在界面切换操作是第一操作的情况下,电子设备在展示界面转场效果的过程中调高显示屏的PWM频率的操作包括:参见图10,界面切换模块在展示第二转场动画的过程中,向PWM调整模块发送亮度调高指令;参见图9,PWM调整模块响应于亮度调高指令,调高PWM频率。
值得说明的是,界面切换模块根据界面切换操作的不同,可以向PWM调整模块发送不同的亮度调节指令,从而提升了调整PWM频率的可靠性和准确性。
在一些实施例中,在界面切换操作是第一操作的情况下,在展示界面转场效果的过程中将PWM频率由第一频率调高至第二频率,该第一频率小于第二频率。
需要说明的是,第一频率和第二频率可以根据需求预先进行设置,示例性地,在第二界面为AOD界面的情况下,第一频率为显示屏处于AOD模式下进行PWM调光的频率,第二频率为显示屏处于亮屏状态下进行PWM调光的频率。比如,该第二频率可以为3840Hz,第一频率可以为1440Hz等。
值得说明的是,通过设置第一频率和第二频率,使得电子设备在调整PWM频率时具有数据支持,提高了调整PWM频率的可靠性和准确性。
为了实现PWM频率的切换,电子设备中可以包括至少两条gamma曲线,至少两条gamma曲线中每条gamma曲线与一个PWM频率对应。
需要说明的是,电子设备中包括的gamma曲线越多,PWM调整模块调整PWM频率的过程更加平滑流畅。比如,第一频率对应的gamma曲线和第二频率gamma曲线之间包括其他频率对应的gamma曲线,如此,PWM调整模块可以依次降低PWM频率。
在一些实施例中,PWM调整模块将PWM频率由第一频率调高至第二频率之后,可以将调光完成消息发送给AGP。
值得说明的是,通过设置不同的gamma曲线,使得对PWM频率的调节更可靠也更平滑。
在一些实施例中,第二界面为AOD界面,基于此,电子设备在调高显示屏的PWM频率,且结束第二转场效果的展示的情况下,电子设备可以显示锁屏界面,并将显示 屏的状态由DOZE状态切换为ON状态。
需要说明的是,电子设备可以是在结束第二转场效果的展示后,将显示屏的状态由DOZE状态切换为ON状态,也可以是在展示第二转场效果的过程中,将显示屏的状态由DOZE状态切换为ON状态,本申请实施例对此不作具体限制。
由上述可知,电子设备可以包括界面切换模块和PWM调整模块,基于此,在界面切换操作是第二操作的情况下,电子设备在展示界面转场效果的过程中降低显示屏的PWM频率的操作包括:界面切换模块在展示第一转场效果的过程中,向PWM调整模块发送频率降低指令;PWM调整模块响应于频率降低指令,降低PWM频率。
作为一个示例,在界面切换操作是第二操作的情况下,电子设备在展示界面转场效果的过程中将PWM频率由第二频率降低至第一频率。
在一些实施例中,在界面切换操作是第二操作的情况下,电子设备在展示界面转场效果的过程中降低显示屏的PWM频率之前,电子设备还可以根据AOD模式的类型选择是否降低PWM频率,以及确定调整PWM频率的程度。
作为一个示例,电子设备可以确定AOD模式的类型,该AOD模式的类型包括全局显示模式和局部显示模式;基于此,在界面切换操作是第二操作的情况下,电子设备在展示界面转场效果的过程中降低显示屏的PWM频率的操作包括:在界面切换操作是第二操作,且AOD模式的类型是全局显示模式的情况下,在展示界面转场效果的过程中降低显示屏的PWM频率。在AOD模式的类型是局部显示模式的情况下,在展示界面转场效果的过程中不降低显示屏的PWM频率。
由于用户在设置AOD模式的情况下,可能会设置AOD模式的类型全局显示模式也可能设置AOD模式的类型为局部显示模式,其中,在AOD模式的类型是局部显示模式的情况下,AOD界面中显示时钟视图,锁屏壁纸并不会显示,该种情况下,显示屏界面的亮度原本就比较暗,在一定程度上的降低了电子设备的功耗,因此,可以调整PWM频率也可以不调整PWM频率,通常情况下,可以不调整法PWM频率。而AOD模式的类型是全局显示模式的情况下,锁屏壁纸可以以较暗的亮度显示,该种情况下,为了降低电子设备功耗,需要调整PWM频率。因此,为了确定是否调整PWM频率,电子设备在展示界面转场效果的过程中降低显示屏的PWM频率之前,可以确定AOD模式的类型。
在一些实施例中,与电子设备的设置相关的信息可以存储至设置数据库中,因此,电子设备可以查询设置数据库,从设置数据库中确定AOD模式的类型。
值得说明的是,通过确定AOD模式的类型,从而更有针对性的进行PWM频率的降低,提升了调整PWM频率的可靠性。
在一些实施例中,在AOD模式的类型是局部显示模式的情况下,在展示界面转场效果的过程中可以选择不降低显示屏的PWM频率,也可以降低显示屏的PWM频率。在降低显示屏的PWM频率的情况下,电子设备可以将PWM频率由第二频率降低至第一频率,或者,将PWM频率从第二频率降低为第三频率,第三频率小于第一频率。本申请实施例对此不作具体限制。
在一些实施例中,在第二界面为AOD界面的情况下,电子设备结束界面转场效果的展示后,可以显示AOD界面,并降低显示屏的屏幕刷新率。比如,电子设备显 示AOD界面的情况下,即电子设备静态显示的情况下,可以将显示屏的屏幕刷新率降低为1Hz。
值得说明的是,通过降低显示屏的屏幕刷新率,从而降低了电子设备的功耗。
在一些实施例中,在第二界面为AOD界面的情况下,电子设备在展示第一转场效果的过程中,不仅可以降低PWM频率,并降低显示屏的色域和亮度。电子设备还可以终止显示屏的亮屏动效和杂志壁纸,并给系统上锁。之后,将显示屏由ON状态切换为DOZE状态,隐藏非全屏AOD图标和图层缩放动效。
需要说明的是,电子设备可以是在结束第一转场效果的展示后,将显示屏的状态由ON状态切换为DOZE状态,也可以是在展示第一转场效果的过程中,将显示屏的状态由ON状态切换为DOZE状态,本申请实施例对此同样不作具体限制。
在本申请实施例中,在第一界面的亮度大于第二界面的情况下,在显示屏显示的界面由第一界面切换至第二界面的过程中,电子设备可以展示第一转场效果,且在展示第一转场效果的过程中,可以降低PWM频率。也即是,由于在显示第二界面的情况下,PWM频率降低,如此,降低了电子设备的功耗。在显示屏显示的界面由第二界面切换至第一界面的过程中,电子设备可以展示第二转场效果,且在展示第二转场效果的过程中,可以调高PWM频率,如此,实现了根据显示内容不同动态调整PWM频率的目的,且由于能够调高PWM频率,兼顾了电子设备的护眼功能。另外,调整PWM频率的时机处于展示界面转场效果的过程中,如此,该界面转场效果在展示过程中不同的效果可以掩盖显示屏因PWM频率的调整而带来的屏闪,提升了屏幕的显示效果。
接下来,对本申请实施例涉及的电子设备予以说明。
作为一个示例,该方法可以应用于具有显示屏的电子设备中。作为示例而非限定,电子设备可以是但不限于平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、车载设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、手机、智能手表、电视等,本申请实施例对此不作限定。
图11是本申请实施例提供的一种电子设备的结构示意图。参见图11,电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部 件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,比如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口,如可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N 为大于1的整数。
在一些实施例中,显示面板采用OLED的情况下,至少一个驱动器电路藕接到发光二极管阵列,至少一个驱动器电路被配置为生成自适应脉冲宽度调制(PWM)信号以控制发光二极管的多个子阵列中的至少一个子阵列,自适应PWM信号可以动态调整。
外部存储器接口120可以用于连接外部存储卡,比如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。比如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,计算机可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,来执行电子设备的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备在使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,比如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D以及应用处理器等实现音频功能,比如音乐播放,录音等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备根据压力传感器180A检测触摸操作强度。电子设备也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。比如:当有触摸操作强度小于压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
接近光传感器180G可以包括发光二极管(LED)和光检测器,比如光电二极管。发光二极管可以是红外发光二极管。电子设备通过发光二极管向外发射红外光。电子设备使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,电子设备可以确定电子设备附近有物体。当检测到不充分的反射光时,可以确定电子设 备附近没有物体。电子设备可以利用接近光传感器180G检测用户手持电子设备贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备是否在口袋里,以防误触。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键,也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,比如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(比如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(比如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(比如:软盘、硬盘、磁带)、光介质(比如:数字通用光盘(Digital Versatile Disc,DVD))或半导体介质(比如:固态硬盘(Solid State Disk,SSD))等。
以上所述为本申请提供的可选实施例,并不用以限制本申请,凡在本申请的揭露的技术范围之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (11)

  1. 一种PWM频率的调整方法,其特征在于,应用于具有显示屏的电子设备中,所述方法包括:
    接收界面切换操作,所述界面切换操作是触发所述电子设备在第一界面和第二界面之间进行切换的操作;
    响应于所述界面切换操作,展示所述界面切换操作对应的界面转场效果;
    在展示所述界面转场效果的过程中,调整所述显示屏的PWM频率。
  2. 如权利要求1所述的方法,其特征在于,所述界面转场效果包括转场动画、色域变化效果、界面透明度变化效果和亮度变化效果中的至少一个。
  3. 如权利要求1或2所述的方法,其特征在于,所述第一界面的亮度大于所述第二界面的亮度;
    所述在展示所述界面转场效果的过程中,调整所述显示屏的PWM频率,包括:
    在所述界面切换操作是第一操作的情况下,在展示所述界面转场效果的过程中调高所述显示屏的PWM频率,所述第一操作是触发所述电子设备从所述第二界面切换至所述第一界面的操作;
    在所述界面切换操作是第二操作的情况下,在展示所述界面转场效果的过程中降低所述显示屏的PWM频率,所述第二操作是触发所述电子设备从所述第一界面切换至所述第二界面的操作。
  4. 如权利要求3所述的方法,其特征在于,所述界面切换操作是所述第二操作;所述电子设备中包括界面切换模块和PWM调整模块,且所述界面转场效果包括转场动画;
    所述响应于所述界面切换操作,展示所述界面切换操作对应的界面转场效果,包括:
    所述界面切换模块响应于所述第二操作,展示由所述第一界面切换至所述第二界面的第一转场动画;
    所述在所述界面切换操作是第二操作的情况下,在展示所述界面转场效果的过程中降低所述显示屏的PWM频率,包括:
    所述界面切换模块在展示所述第一转场动画的过程中,向所述PWM调整模块发送频率降低指令;
    所述PWM调整模块响应于所述频率降低指令,降低所述PWM频率。
  5. 如权利要求3或4所述的方法,其特征在于,所述界面切换操作是所述第二操作,所述界面转场效果还包括界面透明度变化效果;
    所述响应于所述界面切换操作,展示所述界面切换操作对应的界面转场效果,包括:
    响应于所述界面切换操作,获取所述电子设备所处环境的环境光数据;
    根据所述环境光数据,确定所述第二界面的界面背景的显示透明度;
    将所述第二界面的界面背景的透明度设置为所述显示透明度;
    根据设置后的界面背景展示所述界面转场效果。
  6. 如权利要求3-5中任一项所述的方法,其特征在于,所述界面转场效果还包括色域变化效果;
    所述响应于所述界面切换操作,展示所述界面切换操作对应的界面转场效果,包括:
    响应于所述界面切换操作,若所述界面切换操作是所述第一操作,则提升所述显示屏的色域;
    响应于所述界面切换操作,若所述界面切换操作是所述第二操作,则降低所述显示屏的色域。
  7. 如权利要求3-6中任一项所述的方法,其特征在于,所述界面转场效果还包括亮度变化效果;
    所述响应于所述界面切换操作,展示所述界面切换操作对应的界面转场效果,包括:
    响应于所述界面切换操作,若所述界面切换操作是所述第一操作,则提高所述显示屏的亮度;
    响应于所述界面切换操作,若所述界面切换操作是所述第二操作,则降低所述显示屏的亮度。
  8. 如权利要求1-4中任一项所述的方法,其特征在于,所述电子设备中包括至少两条gamma曲线,所述至少两条gamma曲线中每条gamma曲线与一个PWM频率对应。
  9. 如权利要求3所述的方法,其特征在于,所述在所述界面切换操作是第一操作的情况下,在展示所述界面转场效果的过程中调高所述显示屏的PWM频率,包括:
    在所述界面切换操作是所述第一操作的情况下,在展示所述界面转场效果的过程中将所述PWM频率由第一频率调高至第二频率,所述第一频率小于所述第二频率;
    所述在所述界面切换操作是第二操作的情况下,在展示所述界面转场效果的过程中降低所述显示屏的PWM频率,包括:
    在所述界面切换操作是所述第二操作的情况下,在展示所述界面转场效果的过程中将所述PWM频率由所述第二频率降低至所述第一频率。
  10. 一种电子设备,其特征在于,所述电子设备的结构中包括处理器和存储器;
    所述存储器用于存储支持所述电子设备执行如权利要求1-9任意一项所述的方法的程序。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-9任意一项所述的方法。
PCT/CN2024/109661 2023-12-29 2024-08-02 Pwm频率的调整方法、电子设备及可读存储介质 Pending WO2025138809A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202480045677.9A CN121532752A (zh) 2023-12-29 2024-08-02 Pwm频率的调整方法、电子设备及可读存储介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311872440.1 2023-12-29
CN202311872440.1A CN120276794A (zh) 2023-12-29 2023-12-29 Pwm频率的调整方法、电子设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2025138809A1 true WO2025138809A1 (zh) 2025-07-03

Family

ID=96218688

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/109661 Pending WO2025138809A1 (zh) 2023-12-29 2024-08-02 Pwm频率的调整方法、电子设备及可读存储介质

Country Status (2)

Country Link
CN (2) CN120276794A (zh)
WO (1) WO2025138809A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382909A (zh) * 2007-09-05 2009-03-11 宏达国际电子股份有限公司 在操作系统切换时逐步调整屏幕亮度的方法及电子装置
WO2009074106A1 (en) * 2007-12-07 2009-06-18 Shenzhen Huawei Communication Technologies Co., Ltd. Method, device and terminal for regulating brightness of lcd on terminal equipment
CN106710570A (zh) * 2016-12-05 2017-05-24 乐视控股(北京)有限公司 界面亮度调整方法、装置及设备
CN116501210A (zh) * 2022-01-10 2023-07-28 荣耀终端有限公司 一种显示方法、电子设备及存储介质
CN117153075A (zh) * 2022-05-30 2023-12-01 荣耀终端有限公司 屏幕亮度调节方法、电子设备及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382909A (zh) * 2007-09-05 2009-03-11 宏达国际电子股份有限公司 在操作系统切换时逐步调整屏幕亮度的方法及电子装置
WO2009074106A1 (en) * 2007-12-07 2009-06-18 Shenzhen Huawei Communication Technologies Co., Ltd. Method, device and terminal for regulating brightness of lcd on terminal equipment
CN106710570A (zh) * 2016-12-05 2017-05-24 乐视控股(北京)有限公司 界面亮度调整方法、装置及设备
CN116501210A (zh) * 2022-01-10 2023-07-28 荣耀终端有限公司 一种显示方法、电子设备及存储介质
CN117153075A (zh) * 2022-05-30 2023-12-01 荣耀终端有限公司 屏幕亮度调节方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN121532752A (zh) 2026-02-13
CN120276794A (zh) 2025-07-08

Similar Documents

Publication Publication Date Title
KR102681594B1 (ko) 주파수 별로 다르게 설정된 주파수 동작 사이클에 기반한 디스플레이 구동 방법 및 장치
CN112825232B (zh) 一种补偿方法及电子设备
WO2020192362A1 (zh) 一种光传感器状态控制方法及电子设备
CN114596819B (zh) 亮度调节方法及相关装置
CN111263002A (zh) 一种显示方法和电子设备
CN116033056A (zh) 折叠屏的折叠角度检测方法、装置及可读存储介质
CN115361468B (zh) 屏幕旋转时的显示优化方法、设备及存储介质
CN117707320A (zh) 控制熄屏显示的方法、电子设备及存储介质
CN116684725A (zh) 应用界面的布局方法、装置、电子设备、存储介质及芯片
CN117707319A (zh) 控制熄屏显示的方法、电子设备及存储介质
CN114422686B (zh) 参数调整方法及相关装置
CN107968939B (zh) 显示画面的处理方法、装置、存储介质及电子装置
CN117129085B (zh) 环境光的检测方法、电子设备及可读存储介质
CN116033051A (zh) 折叠屏的折叠角度检测方法、装置及可读存储介质
CN118262681B (zh) 屏幕控制方法、电子设备、芯片系统及可读存储介质
CN116339877A (zh) 跨系统运行应用程序的方法及电子设备
WO2024001490A1 (zh) 窗口的显示方法、电子设备和计算机可读存储介质
WO2024152910A1 (zh) 一种录像方法以及电子设备
CN121532752A (zh) Pwm频率的调整方法、电子设备及可读存储介质
WO2023160209A1 (zh) 帧数据显示方法、电子设备及存储介质
CN116719587A (zh) 屏幕显示方法、电子设备及计算机可读存储介质
CN119271280B (zh) 亮屏处理方法、装置、芯片、电子设备及介质
CN118567467B (zh) 熄屏显示的控制方法、芯片系统、设备及可读存储介质
US20260052206A1 (en) Always on display control method, electronic device, and storage medium
US20260056594A1 (en) Always On Display Control Method, Electronic Device, and Storage Medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24909763

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024909763

Country of ref document: EP