WO2023000772A1 - Mode switching method and apparatus, electronic device and chip system - Google Patents

Mode switching method and apparatus, electronic device and chip system Download PDF

Info

Publication number
WO2023000772A1
WO2023000772A1 PCT/CN2022/091651 CN2022091651W WO2023000772A1 WO 2023000772 A1 WO2023000772 A1 WO 2023000772A1 CN 2022091651 W CN2022091651 W CN 2022091651W WO 2023000772 A1 WO2023000772 A1 WO 2023000772A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
refresh rate
software
switching
electronic device
Prior art date
Application number
PCT/CN2022/091651
Other languages
French (fr)
Chinese (zh)
Inventor
周向春
蔡立峰
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2023000772A1 publication Critical patent/WO2023000772A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3265Power saving in display device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Definitions

  • the present application relates to the field of terminal equipment, and in particular to a mode switching method, device, electronic equipment and chip system.
  • the electronic device when the electronic device starts the scheme of intelligently switching the refresh rate, there may be multiple switching of the refresh rate in a short period of time. Frequently switching the refresh rate will increase the power consumption of the electronic device and affect the performance of the electronic device.
  • the present application provides a mode switching method, device, electronic equipment and chip system, which solves the problem of high power consumption of electronic equipment caused by frequent switching of refresh rates.
  • the running time of the second application in the foreground is not longer than the first preset duration, then maintain the first software refresh rate, the first preset duration is the preset duration corresponding to the second application, and the first The software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of images in the display cache of the electronic device;
  • the software refresh rate of the electronic device is switched from the first software refresh rate to the second software refresh rate, and the second software refresh rate
  • the rate is a software refresh rate of the second application.
  • the preset duration of the second application is used as the switching condition of the software refresh rate to control the software refresh rate switching frequency.
  • the method provided by the embodiment of the present application can effectively avoid frequent switching of the software refresh rate in a short period of time, and effectively improve the electronic device's refresh rate. power consumption.
  • the switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration includes :
  • the running time of the second application in the foreground is not longer than the first preset duration, then maintain the third software refresh rate; if the running time of the second application in the foreground is longer than the first preset duration , then switch the software refresh rate of the electronic device from the third software refresh rate to the second software refresh rate.
  • the process of judging the software refresh rate is added.
  • the electronic device When the first software refresh rate is lower than the second software refresh rate, when switching to the second application with a high software refresh rate, the electronic device first switches the software refresh rate to a value between the first software refresh rate and the second software refresh rate.
  • the third software refresh rate between the two rates.
  • the running time of the second application in the foreground reaches the first preset time, it will switch to a higher software refresh rate.
  • the software refresh rate is greatly reduced, thereby effectively reducing the power consumption of electronic equipment.
  • the third software refresh rate is: a preset multiple of the sum of the first software refresh rate and the second software refresh rate, and the preset multiple is A positive number less than 1.
  • the method further includes: The dwell duration, the dwell duration of the second application, the first software refresh rate, the second software refresh rate, and the first preset duration switch the software refresh rate of the electronic device, wherein the first The resident duration of an application is the historical running time of the first application in the foreground after the application switching; the resident duration of the second application is the historical running time of the second application in the foreground after the application switching.
  • the first dwell duration, the second dwell duration, the first software refresh rate, the second software refresh rate, and the first preset Switching the software refresh rate of the electronic device by duration including:
  • the method further includes: for the residence time of the target application, acquiring historical switching data of the target application, the target application being the first application or the The second application: generating the residence time of the target application according to the historical switching data of the target application.
  • the process of judging the residence time of the application is added.
  • the dwell time of the application may be obtained according to historical switching data of the application. Therefore, taking the residence time of the application as the judgment condition for switching the software refresh rate is equivalent to switching the software refresh rate according to the user's habit of using the application.
  • the switching strategy of the software refresh rate can be flexibly adjusted according to the user's usage habits, which effectively improves the adaptability of the method and further improves the user experience.
  • the method further includes: dwell time.
  • the first preset duration is determined by the dwell duration of the second application, and the dwell duration of the second application is The historical running time in the foreground.
  • the preset duration is determined by the residence time of the second application, which is equivalent to determining the software refresh according to the user's historical habit of using the application.
  • the switching frequency of the refresh rate is conducive to improving the applicability of the switching method of the software refresh rate, thereby improving the user experience.
  • the method further includes: if the electronic device is in a dark state and the application running in the foreground is switched from the first application to the second application, then Switching the software refresh rate of the electronic device according to the first preset duration.
  • the electronic device is in the dark state as a start condition for software refresh rate switching, which can effectively avoid the situation of flashing and highlighting and display frame drop caused by switching the software refresh rate in the dark state.
  • an electronic device characterized in that it includes:
  • An application switching unit configured to receive a user operation, and switch the application running in the foreground from the first application to the second application in response to the user operation;
  • the second switching unit is configured to switch the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate if the running time of the second application in the foreground is greater than the first preset duration , the second software refresh rate is the software refresh rate of the second application.
  • an electronic device including a processor, and the processor is configured to run a computer program stored in a memory to implement the method of any one of the first aspects of the present application.
  • a computer-readable storage medium stores a computer program.
  • the computer program is executed by one or more processors, the method of any one of the first aspects of the present application is implemented.
  • an embodiment of the present application provides a computer program product, which, when the computer program product is run on a device, causes the device to execute any one of the methods in the first aspect above.
  • FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • Fig. 2 is a schematic diagram of the screen refresh process provided by the embodiment of the present application.
  • Fig. 3 is a schematic diagram of the Vsync mechanism provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of an application scenario of hardware refresh rate setting provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of the software refresh rate control effect provided by the embodiment of the present application.
  • Fig. 6 is a schematic diagram of the control effect of the software refresh rate provided by another embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application scenario of software refresh rate setting provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an application switching scenario provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a method for switching a software refresh rate provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a scene of switching application interfaces provided by an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of another method for switching the software refresh rate provided by the embodiment of the present application.
  • FIG. 12 is a schematic flowchart of another method for switching the software refresh rate provided by the embodiment of the present application.
  • Fig. 13 is an interactive schematic diagram of the module relationship provided by the embodiment of the present application.
  • Fig. 14 is a schematic diagram of a storage form of inter-application switching data provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of an application switching scenario provided by another embodiment of the present application.
  • references to "one embodiment” or “some embodiments” or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the embodiment of the present application provides a mode switching method, which can be applied to electronic equipment.
  • Electronic devices can be: mobile phones, tablet computers, smart screens, wearable devices, vehicle-mounted devices, smart speakers, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) equipment, notebook computers, super mobile personal computers ( Ultra-mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other electronic devices.
  • augmented reality augmented reality, AR
  • VR virtual reality
  • UMPC Ultra-mobile personal computer
  • PDA personal digital assistant
  • the embodiment of the present application does not limit the specific type of the electronic device.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 is configured to execute the mode switching method in the embodiment of the present application.
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold 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 be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system and at least one application program required by a function (such as a sound playing function, an image playing function, etc.).
  • the storage data area can store data created during the use of the electronic device 100 (such as competition value, wake-up voiceprint, etc.).
  • 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, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • a non-volatile memory such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • At least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith) satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio signals into analog audio signals for output, and also for converting analog audio input into digital audio signals.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "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 called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor 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 may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 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 100 is in the pocket, so as to prevent accidental touch.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • 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 (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to realize functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the display screen of an electronic device displays images at a certain hardware refresh rate.
  • the hardware refresh rate refers to the frequency at which the screen of an electronic device refreshes, which can be understood as the number of frames of images refreshed on the screen per second.
  • the hardware refresh rate is 60Hz, which means that the screen of the electronic device refreshes 60 frames of images per second.
  • Images on the screen are made up of pixels arranged horizontally and vertically.
  • a hardware refresh process refers to the process of refreshing each pixel on the screen once. Taking LCD as an example, the pixels in the LCD are controlled row by row. The pixels in the LCD are controlled row by row from top to bottom by controlling the switches to perform refresh (as shown in (a) in FIG. 2 ). When the last row of pixels of the LCD is refreshed, the screen generates a hardware vertical synchronization (Vsync) signal (a pulse signal) to enable the control switch to perform a new round of refresh control.
  • Vsync hardware vertical synchronization
  • the process of synthesizing a frame of image by the system includes: the application program of the Android system application layer is based on the display parameters of the image to be displayed (such as the image to be displayed) The width, height, position, color, etc. of the interface) draw images; the Surfaceflinger process of the Android system application architecture layer merges and renders the images drawn by the application program, and stores the processed images in the hardware frame buffer (ie, the display buffer).
  • the Display driver at the kernel layer of the Android system sends the latest cached frame image in the hardware frame buffer to the screen for display, and the system starts to synthesize the next frame image. With this cycle, multiple refreshes of the screen image can be completed.
  • the Vsync mechanism means that the hardware Vsync signal is transmitted to the upper-layer drawing executor in the form of a software Vsync signal, so that it can match the working rhythm of the hardware Vsync signal.
  • the DispSync thread in the Surfaceflinger process virtualizes the hardware Vsync signal into two software Vsync signals Vsync-APP signal and Vsync-SF signal with fixed offset; the App EventThread thread in the Surfaceflinger process reports the Vsync-APP signal to Application program; the application program starts to draw the image after receiving the Vsync-APP signal (the texture and polygon of the image are generated by the CPU, and the texture and polygon generated by the CPU are rasterized and synthesized by the GPU); the Surfaceflinger process is received by the SF EventThread thread Vsync-SF signal; after the Surfaceflinger process receives the Vsync-SF signal, it starts to merge and render the image drawn by the application, and stores the processed image in the hardware frame buffer.
  • FIG. 3 is a schematic diagram of the Vsync mechanism provided by the embodiment of the present application.
  • the Display driver program sends the Frame0 image to display, and the system controls the application program to draw the second frame image through the converted Vsync-APP signal (marked as 2 as shown in Figure 3 rectangle), control the Surfaceflinger process to synthesize and render the first frame image through the converted Vsync-SF signal, and store the processed first frame image in the hardware frame buffer.
  • the Display driver sends the Frame1 image to display, and the system controls the application program to draw the third frame image (the rectangle marked 3 as shown in Figure 3) through the converted Vsync-APP signal.
  • the converted Vsync-SF signal controls the Surfaceflinger process to synthesize and render the second frame image, and store the processed second frame image in the hardware frame buffer. And so on.
  • the process of synthesizing frames by the system is coordinated with the process of refreshing the screen hardware through the Vsync mechanism.
  • the screens of electronic devices can support multiple hardware refresh rates, such as 60Hz, 90Hz, 120Hz, 144Hz, and 240Hz.
  • the hardware refresh rate can be manually switched by the user, or the hardware refresh rate can be intelligently switched by the electronic device.
  • the setting interface 10 includes a hardware refresh rate adjustment area 110 .
  • the hardware refresh rate adjustment area 110 includes a selection control 111 and hardware refresh rate selection information 112 .
  • the adjustment control 111 is located at the "60Hz" position of the hardware refresh rate selection information 112, indicating that the current hardware refresh rate of the electronic device is 60Hz.
  • the user can adjust the hardware refresh rate of the electronic device through user operations on the setting interface 10 . For example, when the user slides the adjustment control 111 to the "90Hz" position of the hardware refresh rate selection information 112, the electronic device displays the interface 11 shown in (b) in Figure 4, at this time, the electronic device sets the hardware refresh rate to 90Hz.
  • the electronic device intelligently switches the hardware refresh rate
  • the electronic device can intelligently switch the hardware refresh rate according to user operations.
  • the electronic device when the user operates the screen, switches the hardware refresh rate from a low refresh rate (such as 60Hz) to a high refresh rate (such as 90Hz, 120Hz, etc.); when the user does not operate, the electronic device switches the hardware refresh rate from a high refresh rate Switch to a low refresh rate.
  • Electronic devices can also intelligently switch the hardware refresh rate according to the user's usage time. When the user's use time reaches a preset value, the electronic device switches the hardware refresh rate from a low refresh rate to a high refresh rate.
  • Users can also set different hardware refresh rates for different applications, and the electronic device intelligently switches the hardware refresh rate according to user operations. For example: set a hardware refresh rate of 120Hz for video applications, and set a hardware refresh rate of 60Hz for payment applications. When the user operates a video application, the electronic device switches the hardware refresh rate to 120Hz; when the user operates a payment application, the electronic device switches the hardware refresh rate to 60Hz.
  • the hardware refresh rate can also be set by the developer in the configuration file of the application.
  • the hardware refresh rate of the electronic device can be maintained at a high refresh rate. But this solution comes at the cost of higher power consumption of the electronic equipment.
  • a solution is to reduce the refresh rate of the software. For example: the hardware refresh rate of electronic equipment is maintained at 120Hz, and the software refresh rate is reduced to 60Hz. Implementations can include:
  • the system notifies the application to synthesize images at 60Hz.
  • FIG. 5 is a schematic diagram of the control effect of the software refresh rate provided by the embodiment of the present application.
  • the Display driver still sends Frame0 to the display
  • the system generates a Vsync-APP signal and a Vsync-SF signal
  • the application program draws the second frame image according to the Vsync-APP signal ( As shown in the rectangle labeled 2 in FIG. 5 )
  • the Surfaceflinger process generates the first frame of image according to the Vsync-SF signal, and stores the first frame of image in the hardware frame buffer.
  • the Display driver After the display generates the next hardware Vsync signal, the Display driver sends the Frame1 image to the display. After the display generates the next hardware Vsync signal, the Display driver will still send the Frame1 image to the display, and the system will generate a Vsync-APP signal and a Vsync-SF signal, and the application program will draw the third frame image according to the Vsync-APP signal (such as In the rectangle labeled 3 in FIG. 5 ), the Surfaceflinger process generates a second frame image according to the current Vsync-SF signal, and stores the second frame image in the hardware frame buffer. And so on.
  • the frequency of composite images is controlled by the system side, so that the software refresh rate is reduced to half of the hardware refresh rate.
  • the system notifies the app to synthesize images at 120Hz, and the app synthesizes images at 60Hz (for example, the app synthesizes images every two frames).
  • FIG. 6 it is a schematic diagram of the control effect of the software refresh rate provided by another embodiment of the present application.
  • the Display driver sends the Frame0 image to display
  • the system generates a Vsync-APP signal and a Vsync-SF signal
  • the application program draws the second frame image according to the Vsync-APP signal ( As shown in the rectangle labeled 2 in Figure 6)
  • the Surfaceflinger process generates the first frame of image according to the Vsync-SF signal (as shown in the rectangle labeled 1 in Figure 6), and stores the first frame of image in the hardware frame buffer.
  • the Display driver After the display generates the next hardware Vsync signal, the Display driver sends the Frame1 image to the display, and the system generates a Vsync-APP signal and a Vsync-SF signal. After the display generates the next hardware Vsync signal, the Display driver will still send the Frame1 image to the display, and the system will generate a Vsync-APP signal and a Vsync-SF signal, and the application program will draw the third frame image according to the Vsync-APP signal (such as In the rectangle labeled 3 in FIG. 6 ), the Surfaceflinger process generates the second frame image according to the Vsync-SF signal, and stores the first frame image in the hardware frame buffer. And so on. In this method, the frequency of composite images is controlled by the application side, so that the software refresh rate is reduced to half of the hardware refresh rate.
  • Different software refresh rates can be set for each application or for different types of applications. For example, video applications have high requirements for screen fluency, so a higher software refresh rate can be set for video applications; payment applications have lower requirements for screen fluency, and a lower software refresh rate can be set for payment applications.
  • FIG. 7 is a schematic diagram of an application scenario of software refresh rate setting provided by an embodiment of the present application.
  • the setting interface 20 includes a selection control 201 and software refresh rate selection information 202 .
  • the selection control 201 at the "60Hz" position of the software refresh rate selection information 202 is in the selected state, indicating that the software refresh rate of the current application A is 60Hz.
  • the user can adjust the software refresh rate of the application A through user operations on the setting interface 20 .
  • the electronic device displays an interface 21 as shown in (b) in FIG.
  • the software refresh rate is set to 90Hz.
  • the software refresh rate can be set by the user as shown in Figure 7, or can be set by the developer in the configuration file of the application.
  • the electronic device when the electronic device enables the software refresh rate adjustment mode, can adjust the brightness of the electronic device according to the brightness of the current screen, the brightness of the ambient light, the application type running in the foreground, the user's operation type, and the brightness of the electronic device before the ambient light is dimmed. status and other information, comprehensively judge how to adjust the software refresh rate and hardware refresh rate. For example, when the user operates the electronic device for the first time under low-light adjustment, the electronic device may adjust both the software refresh rate and the hardware refresh rate to a high refresh rate, such as 120 Hz. After a period of time, the electronic device detects that the user has not operated, and can maintain the hardware refresh rate at 120Hz, while reducing the software refresh rate to 60Hz. Alternatively, the electronic device can adjust the software refresh rate to 120Hz when the user watches video in dimmed conditions. When the electronic device detects that the application running in the foreground is communication software, it can adjust the refresh rate of the software to 60 Hz to save power consumption.
  • the software refresh rate is switched, when the electronic device enables the smart refresh rate adjustment and software refresh rate adjustment schemes, there may be situations where the software refresh rate is switched multiple times in a short period of time.
  • FIG. 8 is a schematic diagram of an application switching scenario provided by an embodiment of the present application.
  • the main interface 30 may include a status bar 301 , application icons 302 and a navigation bar 303 .
  • the status bar 301 may include information such as time, WI-FI icon, signal strength, and current remaining power.
  • the application icon 302 may include a video application icon, a payment application icon, a camera application icon, a text message icon, a setting icon, a gallery icon, a phone icon, a browser icon, an email icon, and the like.
  • the navigation bar 303 may include system navigation keys such as a return button 3031, a home screen button 3032, and an outgoing task history button 3033.
  • the main interface is the interface displayed by the electronic device 100 after any user interface detects a user operation acting on the main interface button 3032.
  • the electronic device may display a previous user interface of the current user interface.
  • the electronic device can display the home interface 30 .
  • the electronic device may display the applications that the user has recently opened.
  • the user can enter the application interface through user operations on the main screen interface 30 .
  • the electronic device jumps to the application interface 31 as shown in (b) in FIG. 8 .
  • the application interface 31 may include a search bar 311 and a video preview 312 .
  • the electronic device jumps to the video interface 32 as shown in (c) in FIG. 8 .
  • the video interface 32 may include a video play box 321 and a payment control 322 .
  • the electronic device switches to the payment application and jumps to the payment interface 33 of the payment application as shown in (d) of FIG. 8 .
  • the payment interface 33 may include payment information 331 and a confirmation control 332 .
  • the electronic device performs the payment task, and jumps to the payment completion interface 34 shown in (e) in FIG. 8 after the payment is successful.
  • the payment completion interface 34 may include a payment completion mark 341 and a page jump timing mark 342 .
  • the page jump timing mark 342 displays "automatic jump after 10s".
  • the electronic device switches back to the video application and jumps to the video interface 35 shown in (f) in FIG. 8 .
  • the video interface 35 may include a video playing screen 351 and a video playing control area 352 .
  • the software refresh rate will be increased or maintained at a high refresh rate, such as 120Hz.
  • the electronic device can adjust the software refresh rate to a low refresh rate, such as 60Hz. Therefore, the video application is switched to the payment application first, and then the payment application is switched to the video application. During this process, the software refresh rate was switched twice. Frequent switching of the software refresh rate will have a certain impact on the performance and power consumption of the electronic device, thereby affecting the user experience.
  • an embodiment of the present application provides a method for switching a software refresh rate. The method is introduced below.
  • FIG. 9 it is a schematic flowchart of a method for switching a software refresh rate provided by an embodiment of the present application.
  • the method for switching the software refresh rate may include S901-S903, and the specific steps are as follows.
  • the first application and the second application in this embodiment of the present application may refer to different application programs.
  • the first application may refer to an application currently running in the foreground of the electronic device
  • the second application may refer to a target application to which the electronic device will jump to.
  • the manner in which the electronic device jumps from the first application to the second application can be directly to the second application through the jump window popped up in the first application as shown in the application scenario in the embodiment of FIG. 8 above.
  • the electronic device performs two application jumps.
  • the first application is a video application
  • the second application is a payment application
  • the user directly jumps to the second application by clicking/touching the payment control on the payment interface in the video application.
  • the first application is a payment application
  • the second application is a video application
  • the second application is directly jumped to through the payment completion interface of the payment application.
  • the first application and the second application in the embodiment of the present application may also refer to different functions in the same application.
  • FIG. 10 is a schematic diagram of an application interface switching scenario provided by an embodiment of the present application.
  • the application interface 40 may include an information display area 401 and an information input area 402 .
  • the information input area 402 may include a voice input control 4021 , a text input box 4022 , an emoticon input control 4023 and an option control 4024 .
  • the application interface 41 may include an information display area 411 and a function selection area 412 .
  • the function selection area 412 may include an album control 4121 , a shooting control 4122 , a red packet control 4123 and a video control 4124 .
  • the application interface 42 may include a video display frame 421 , a video display frame 422 and a video hangup control 423 .
  • the video display frame 421 and the video display frame 422 are respectively used to display the video images of the two video users.
  • the software refresh rate required for video chat is higher than that required for text chat, if the electronic device still maintains the software refresh rate for text chat after switching from text chat to video chat, it will affect the clarity of video chat.
  • different software refresh rates may be set for the text chat function and the video chat function in the chat application.
  • the first application is a text chat function in the chat application
  • the second application is a video chat function in the chat application.
  • the electronic device acquires a preset duration (that is, a first preset duration), and starts timing.
  • the preset duration may be preset. For example: setting different preset durations for different applications.
  • the preset duration may also be generated by the electronic device according to the historical data of the user's use of the application.
  • the electronic device acquires historical data from the WMS, then generates inter-application switching data according to the historical data, and stores the inter-application switching data in the database (the storage method is shown in Figure 14), when the software starts to execute
  • the inter-application software refresh rate module obtains inter-application switching data from the database, obtains the residence time of the second application according to the inter-application switching data, and generates a preset time according to the residence time of the second application.
  • the inter-application software refresh rate module obtains inter-application switching data from the database, obtains the residence time of the second application according to the inter-application switching data, and generates a preset time according to the residence time of the second application.
  • the timing in S902 is used to record the cumulative running time of the second application in the foreground after the foreground of the electronic device is switched from the first application to the second application.
  • the electronic device stops timing.
  • the electronic device switches the software refresh rate to the software refresh rate of the second application, the electronic device stops timing.
  • the electronic device switches the software refresh rate according to a preset time period.
  • step 903 may be implemented in the following ways.
  • step 903 may include:
  • the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and stops timing.
  • the electronic device If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the current software refresh rate.
  • Steps 1-1 to 1-3 are applied to the application scenario shown in Figure 8.
  • the application currently used by the user is video software with a high software refresh rate.
  • the electronic device It is possible to start recording the foreground running time of the payment software. If the foreground running time of the payment software reaches a preset duration, the electronic device switches the software refresh rate to the software refresh rate of the payment software. If the foreground running time of the payment software does not exceed the preset duration, the electronic device maintains the software refresh rate of the video software.
  • steps 1-1 to 1-3 are applied to the application scenario shown in Figure 10, and the user is currently using the text in the video application Chatting function
  • the electronic device can communicate and interact with the server of the video application to monitor the accumulated time of the user using the video chatting function. If the accumulative duration of the user using the video chat function reaches a preset duration, the electronic device switches the software refresh rate to the software refresh rate of the video chat function. If the accumulated time of the user using the video chat function does not reach the preset time, the electronic device maintains the software refresh rate of the text chat function.
  • the software refresh rate is switched instead of switching the software refresh rate when the electronic device jumps from the first application to the second application, which avoids the user Frequently switching the software refresh rate when the second application stays for a short time effectively reduces the switching frequency of the software refresh rate, thereby effectively reducing the power consumption of the electronic device.
  • step 903 may include:
  • the software refresh rate is switched according to the first software refresh rate, the second software refresh rate, and the preset duration.
  • the first software refresh rate is the software refresh rate of the first application
  • the second software refresh rate is the software refresh rate of the second application.
  • the first software refresh rate and the second software refresh rate can be judged first, and then the software refresh rate can be switched according to the first software refresh rate and the second software refresh rate, depending on the situation.
  • step 2-1 may include the following steps:
  • the first software refresh rate is equal to the second software refresh rate, perform 2-1-7, that is, there is no need to switch the software refresh rate.
  • the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and executes 2-1-7.
  • the electronic device maintains the current software refresh rate.
  • Steps 2-1-2 to 2-1-3 show the situation that the first software refresh rate is higher than the second software refresh rate.
  • 2-1-2 to 2-1-3 are the same as steps 1-1 to 1-3 in the above-mentioned first implementation mode, for details, please refer to the description of steps 1-1 to 1-3, here No longer.
  • the electronic device switches from the current software refresh rate to the third software refresh rate.
  • the electronic device switches from the third software refresh rate to the second software refresh rate, and executes 2-1-7.
  • the electronic device maintains the third software refresh rate.
  • Steps 2-1-4 to 2-1-6 show the situation that the first software refresh rate is lower than the second software refresh rate.
  • the third software refresh rate in this case can be set to a value between the first software refresh rate and the second software refresh rate.
  • the third software refresh rate (first software refresh rate+second software refresh rate)/M.
  • the above-mentioned third software refresh rate can be applied in the application scenario shown in FIG. 8 .
  • the application currently used by the user is a payment software with a low software refresh rate (assuming that the software refresh rate of the payment software is 60Hz), when the user switches the payment software running in the foreground to a video software (assuming that the software refresh rate of the video software is 120Hz),
  • the electronic device can switch the software refresh rate to 90Hz and start recording the foreground running time of the video software. If the foreground running time of the video software reaches the preset duration, the software refresh rate can be switched to 120Hz for the video software. If the foreground running time of the video software does not exceed the preset duration, the electronic device maintains a software refresh rate of 90 Hz.
  • the above-mentioned third software refresh rate can also be applied in the application scenario shown in FIG.
  • Switch to the video chat function in the chat application (assuming that the software refresh rate of the video chat function is 120Hz), the electronic device can switch the software refresh rate to 75Hz, and start communicating with the server of the chat application to monitor the user's use of video chat The cumulative duration of the function. If the accumulated time of the user using the video chat function reaches a preset time, the electronic device will switch the software refresh rate to 120Hz. If the accumulated time of the user using the video chat function does not reach the preset time, the electronic device will maintain 75Hz.
  • the second implementation is equivalent to adding a process of judging the software refresh rate of the application before step 1-1.
  • the electronic device when the first software refresh rate is lower than the second software refresh rate, when switching to the second application with a high software refresh rate, the electronic device first switches the software refresh rate to a value between the first software refresh rate and the first software refresh rate.
  • the third software refresh rate between the refresh rate and the second software refresh rate when the accumulated time after jumping to the second application reaches the preset time of the second application, then switch to a higher software refresh rate, so that both This ensures a smooth user experience, and at the same time reduces the refresh rate of the software as much as possible, thereby effectively reducing the power consumption of electronic devices.
  • step 903 may include:
  • the dwell duration of the first application and the dwell duration of the second application may be obtained according to historical data of the user using the first application and the second application.
  • the inter-application software refresh rate module obtains the historical data of the user's use of the first application and the second application from the WMS, generates inter-application switching data according to these historical data, and stores them in the storage form shown in Figure 14 in the database.
  • the inter-application software refresh rate module obtains inter-application switching data from the database, and obtains the dwell time of the first application and the dwell time of the second application from the inter-application switching data.
  • the software refresh rate is switched according to the dwell duration of the first application, the dwell duration of the second application, the first software refresh rate, the second software refresh rate, and the preset duration.
  • the duration of the first application and the second application may be judged first, and then the software refresh rate may be switched according to the duration.
  • step 3-2 may include the following steps:
  • the electronic device switches the software refresh rate to the second software refresh rate.
  • the resident duration of the first application is equal to the resident duration of the second application, it can be executed according to 3-2-2 or 3-2-3.
  • the third implementation is equivalent to adding a process of judging the residence time of the application before steps 2-1-1 to 2-1-7 of the second implementation.
  • the residence time of the application may be obtained according to the historical data of the application used by the user. Therefore, taking the residence time of the application as the judgment condition for switching the software refresh rate is equivalent to switching the software refresh rate according to the user's habit of using the application.
  • the switching strategy of the software refresh rate can be flexibly adjusted according to the user's usage habits, which effectively improves the adaptability of the method and further improves the user experience.
  • FIG. 11 is a schematic flowchart of another method for switching a software refresh rate provided by an embodiment of the present application. As shown in Figure 11, the method may include the following steps:
  • the electronic device continues to detect the dark state.
  • the electronic device executes a software refresh rate switching method.
  • the electronic device acquires the preset time duration and starts timing.
  • the electronic device switches the software refresh rate according to a preset time period.
  • S113-S115 are the same as S901-S903, for details, please refer to the description in S901-S903, which will not be repeated here. It should be noted that S115 may adopt any one of the several implementation manners described in S903.
  • the starting condition of the switching method of the software refresh rate is set, that is, when the display screen/environment of the electronic device is detected to be in a dark state, the switching method of the software refresh rate is started .
  • S115 adopts the third implementation method in S903, that is, according to the dwell time of the first application, the dwell time of the second application, the first software refresh rate, and the second software refresh rate Switch the software refresh rate with the preset duration.
  • the dwell time of the application can be obtained according to some relevant data of the dwell time of the application (such as switching data between applications). Therefore, the electronic device needs to preload the data of the dwell time of the application, and then obtain the dwell time of the first application and the dwell time of the second application according to the data of the dwell time of the application. For details, refer to the embodiment shown in FIG. 12 .
  • FIG. 12 it is a schematic flowchart of another software refresh rate switching method provided in the embodiment of the present application. As shown in FIG. 12 , the method may include the following steps:
  • the electronic device executes a software refresh rate switching method.
  • the application residence time data in the embodiment of the present application may be switching data between applications.
  • the inter-application software refresh rate switching module acquires historical data of the user's use of applications from the WMS, and generates inter-application switching data according to the historical data.
  • the application residence time data can be stored in the database in the storage form shown in FIG. 14 .
  • the inter-application software refresh rate module obtains the application residence time data from the database.
  • Step 124 is the same as step 901, for details, refer to the description of S901.
  • the electronic device acquires the preset duration, the dwell duration of the first application, and the dwell duration of the second application, and starts timing.
  • the step of obtaining the preset duration by the electronic device in step 125 is the same as that of S902, and the description in S902 may be referred to for details.
  • the dwell duration of the first application and the dwell duration of the second application in step 125 can be obtained from the application dwell duration data loaded in S123 according to the manner described in 3-1.
  • the electronic device switches the software refresh rate according to a preset time period.
  • S126 adopts the third implementation method in S903. Specifically, S126 may include the following steps:
  • the electronic device switches the software refresh rate to the second software refresh rate.
  • the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and executes 4-9.
  • the electronic device maintains the current software refresh rate.
  • the electronic device switches from the current software refresh rate to the third software refresh rate.
  • the electronic device switches from the third software refresh rate to the second software refresh rate, and executes 4-9.
  • the electronic device maintains the third software refresh rate.
  • Steps 4-1 to 4-9 are the same as steps 3-2-1 to 3-2-3, for details, please refer to the description in steps 3-2-1 to 3-2-3.
  • the application residence time data loaded in S123 in the embodiment of the present application may be inter-application switching data, and the inter-application switching data may be generated by the electronic device according to the historical data of the user using the application.
  • the electronic device can obtain historical data by capturing the background data of the application used by the user.
  • the system includes a window management service (Window Manager Service, WMS), which is responsible for managing the display of all windows in the system (for example, assigning interfaces to windows, managing the display order, size and position, manage window animation, etc.), the status and information of all windows in the system can be obtained through WMS. Since the user will inevitably open/close the window of the application when using the application, the status and information of the application window can be obtained through the WMS to obtain the historical data of the application used by the user.
  • WMS Window Manager Service
  • the electronic device can organize the acquired scattered historical data into orderly inter-application switching data, and use the inter-application switching data as application residence time data.
  • the application residence time data loaded in S123 may be inter-application switching data.
  • the inter-application switching data may include a switch relationship between two applications and a residence time of the application. In this way, after S123 loads the inter-application switching data, S125 may obtain the dwell duration of the first application and the dwell duration of the second application from the inter-application switching data.
  • the software refresh rate switching method described in the embodiment of the present application may be implemented by a functional module.
  • the inter-application software refresh rate module is responsible for realizing the switching method of the software refresh rate.
  • the inter-application software refresh rate module sends a request to the WMS, and the WMS returns the historical data of the user's use of the application to the inter-application software refresh rate module after receiving the request.
  • the inter-application software refresh rate module generates inter-application switching data according to historical data, and stores the inter-application switching data in a database.
  • the inter-application software refresh rate module receives the switching instruction between two applications, it reads and loads the inter-application switching data from the database, and obtains the residence time of the application according to the inter-application switching data.
  • the jump of the application interface occurs in the same application.
  • the WMS is usually responsible for window management when opening/closing the application, and the jumping action of the application interface in the application is usually monitored by the application server. Therefore, in this case, the electronic device can acquire historical data that occurs within the application by communicating and interacting with the server of the application.
  • the historical data may include bidirectional switching data of each application or unidirectional switching data of each application.
  • the two-way switching data of each application may include the switching source application, the switching target application and the switching time of each application, wherein the switching time may include the switching time from the switching source application to the current application, and the switching time from the switching source application to the current application.
  • the cut-out moment when the application is switched to the switching target application For example, suppose that the switching source application of application A is application B, the switching target application is application C, the switch-in time is 10:00:00, and the switch-out time is 10:05:00.
  • the historical data indicates that the user switches from application B to application A at 10:00:00, and switches from application A to application C at 10:05:00.
  • the one-way switching data of each application may include the starting time of each application, the switching target application, and the switch-out time.
  • the start time of application A is 10:00:00
  • the switch target is application B
  • the cut-out time is 10:05:00.
  • the historical data indicates that the user starts using application A at 10:00:00, and switches from application A to application B at 10:05:00.
  • the unidirectional switching data of each application may include the switching source application, switch-in time and switch-out time of each application.
  • the switching source application of application A is B
  • the switch-in time is 10:00:00
  • the switch-out time is 10:05:00.
  • the historical data indicates that the user switched from application B to application A at 10:00:00, and switched out from application A to other applications at 10:05:00.
  • the WMS may store the historical data in a storage space that is communicatively connected to the WMS.
  • the WMS obtains historical data from the storage space and sends the historical data to the inter-application software refresh rate module.
  • the electronic device can periodically update the historical data in the storage space.
  • multiple pieces of historical data that have been stored for a long time are deleted.
  • 100 pieces of historical data can be stored in the storage space.
  • the first 60 pieces of historical data stored will be deleted to free up space for 60 pieces of historical data for the newly acquired historical data to be stored.
  • the process of generating inter-application switching data based on historical data is a process of organizing the scattered record data of users using applications into a data group used to represent the inter-application switching relationship.
  • the generated inter-application switching data may include multiple sets of switching relationships.
  • each group of switching relationships may be a one-way switching relationship.
  • each group of handover relationships may include the handover source application, the handover target application, and the dwell time of the handover target application.
  • the historical data includes: the switching source application of application A is application B, the switching target application is application C, the switch-in time of application A is 10:00:00, and the switch-out time of application A is 10:05 :00.
  • the inter-application switching data generated according to the historical data includes a set of one-way switching relationships, that is, switching from application B to application A, and the residence time of application A is 5 minutes. Since the history data does not include the switching target application and switch-in time of application B, and the switching target application and switch-out time of application C, the switching relationship between application B and application C cannot be generated.
  • each group of handover relationships may include the residence time of the handover source application, the handover target application, and the handover source application.
  • the inter-application switching data generated according to the historical data includes a set of one-way switching relationships, that is, switching from application A to application C, and the dwell time of application A is 5 minutes. Since the switch-out time of application C is not included in the historical data, a switching relationship with respect to application C cannot be generated.
  • each group of switching relationships may be a bidirectional switching relationship.
  • each group of switching relationships may include two applications that are switching source applications/switching target applications and their respective dwell times.
  • the historical data include: when the switching source application is application B and the switching target application is application A, the switch-in time of application A is 10:00:00, and the switch-out time of application A is 10:05:00 ;
  • the switch-in time of application B is 20:00:00;
  • the switch-out time of application B is 20:11:00.
  • the inter-application switching data generated according to the historical data includes a set of bidirectional switching relationships, that is, when switching from application B to application A, the residence time of application A is 5 minutes; when switching from application A to application B, application B The residence time is 11 minutes.
  • S125 acquiring the dwell duration of the first application and the dwell duration of the second application from the inter-application switching data may include: acquiring a switching relationship including the first application and the second application from the inter-application switching data, and then The dwell duration of the first application and the dwell duration of the second application are obtained from the switching relationship.
  • FIG. 14 it is a schematic diagram of a storage form of inter-application switching data provided by an embodiment of the present application.
  • the inter-application switching data may be stored in a spreadsheet (such as a table in Excel or Word, etc.).
  • the attributes of switching data between applications are recorded in the first row of the Excel table (as shown in the figure, "Switching source application”, “Switching target application” and “Switching target application's Dwell time"), each row of data after the first row represents a set of switching relationships.
  • the switching source application is application A
  • the switching target application is application B
  • the dwell time of application B is 2 minutes.
  • each set of switching relationships in the inter-application switching data is a one-way switching relationship.
  • the switching data between applications can also be stored as a directed graph.
  • the directed graph includes vertices, directed edges connected to the vertices, and weights on the directed edges (representing the relationship between the vertices at both ends of the directed edges).
  • the switch source application and the switch target application in the inter-application handover data can be used as vertices in the directed graph, the direction from the handover source application to the handover target application can be used as the direction of the directed edge, and the handover target application in the inter-application handover data
  • the dwell time is used as the weight on the directed edge in the directed graph.
  • each set of switching relationships in the inter-application switching data is a bidirectional switching relationship.
  • the inter-application software refresh rate module acquires historical data from the WMS, it generates a spreadsheet or a directed graph as shown in Figure 14 according to the historical data, and then stores the generated spreadsheet or directed graph in the database middle.
  • the inter-application switching data may be stored in the storage space of the electronic device, or may be stored in a third-party database communicatively connected with the electronic device.
  • the residence time of the switching source application is recorded in minutes.
  • the residence time of the switching source application/switching target application can also be recorded in other time units, such as hours, days, years, months, and so on.
  • the residence time can be unified into the same time unit, or can be stored in different time units. For example, suppose that when switching from application E to application B, the dwell time of application B is 20h, and when switching from application B to application C, the dwell time of application C is 1min. Due to the large difference between the two dwell times, it is cumbersome to convert 1min to hours or 20h to minutes. Therefore, in this case, the dwell duration of application B may be stored as 20h, and the dwell duration of application C may be stored as 1min.
  • the electronic device may regularly update the switching data between applications, and the following update methods may be used:
  • Method 1 The electronic device updates the inter-application switching data every preset update cycle.
  • the inter-application software refresh rate module sends a request to the WMS; WMS returns the historical data in the current storage space to the inter-application software refresh rate module; the inter-application software refresh rate module generates a request based on the received historical data Inter-application switching data, and replace the original inter-application switching data in the database with the newly generated inter-application switching data.
  • the preset update period can be flexibly set.
  • the preset update period is short, the update frequency is high, and the power consumption of the electronic device is also high; when the preset update period is long, the update frequency is low, and the power consumption of the electronic device is also low. Users can set it independently according to their needs.
  • Method 2 The electronic device updates the inter-application switching data once whenever a switching instruction between applications is detected.
  • the inter-application software refresh rate module when the electronic device detects a switching instruction from application A to application B, the inter-application software refresh rate module sends a request to WMS; WMS returns the historical data in the current storage space to the inter-application software refresh rate module; The inter-application software refresh rate module generates inter-application switching data according to the received historical data, and replaces the original inter-application switching data in the database with the newly generated inter-application switching data.
  • the inter-application switching data used is generated based on the user's recent historical data, which can ensure that the software refresh rate switching is closer to the user's recent usage habits.
  • the user may send an update instruction to the electronic device through a user operation.
  • the electronic device updates the inter-application switching data once.
  • Method 4 Update the inter-application switching data according to preset conditions.
  • the preset condition may be that the value range of the historical data has changed.
  • the inter-application switching data may be generated according to the maximum value of the dwell time of the application in the historical data. Assume that the residence time of application B stored in the current database is 1h. If the inter-application software refresh rate module calculates that the maximum dwell time of application B in the current historical data is 2h, then the maximum dwell time of application B has changed (to 2h). The software refresh rate module generates the latest switching data between applications according to the current historical data, and updates the database. If the inter-application software refresh rate module calculates that the maximum dwell time of application B in the current historical data is 0.5h, then the maximum dwell time of application B has not changed (still 1h), and the inter-application software The refresh rate module does not need to update the switching data between applications.
  • the inter-application switching data can timely and accurately reflect the user's habit of using the application, thereby providing an accurate decision-making basis for the switching method of the software refresh rate provided by the embodiment of the present application.
  • the higher the update frequency of switching data between applications the closer the switching method of the software refresh rate is to the user's usage habits, and at the same time, the power consumption of the electronic device is also greater. Therefore, the above-mentioned update method and the preset update cycle in various setting methods can be selected according to actual needs.
  • the vertex 141 representing the application A, the directed edge 144 pointing from the vertex 141 to the vertex 141, and the weight 60 on the directed edge 144 constitute a set of switching relationships
  • both the switching source application and the switching target application in this group of switching relationships are application A.
  • This group of switching relationships indicates that the user switches from application A to application A and stays in application A for 60 minutes.
  • each group of switching relationships in the inter-application switching data may be unidirectional or bidirectional. Therefore, after S123 loads the inter-application switching data, S125 obtains the dwell duration of the first application and the dwell duration of the second application according to the inter-application switching data, which may include the following two situations.
  • the method for acquiring the dwell duration of the first application and the dwell duration of the second application may include: the electronic device acquires the first target relationship and the second target relationship in the inter-application switching data; The dwell duration of the first application and the dwell duration of the second application are obtained from the first target relationship and the second target relationship.
  • the first target relationship means that the switching source application is the first application and the switching target application is the second application.
  • the two-target relationship represents a switching relationship in which the switching source application is the second application and the switching target application is the fourth application.
  • the electronic device determines the resident duration of the switching source application in the first target relationship as the resident duration of the first application; the electronic device determines the resident duration of the switching source application in the second target relationship as the resident duration of the second application.
  • the first target relationship means that the switching source application is the fifth application, the switching target application is the first application, and the second target application is the switching relationship.
  • the relationship represents a switching relationship in which the first application and the switching target application are the second application.
  • the electronic device determines the dwell duration of the switching target application in the first target relationship as the dwell duration of the first application; the electronic device determines the dwell duration of the switching target application in the second target relationship as the dwell duration of the second application.
  • the method for acquiring the dwell duration of the first application and the dwell duration of the second application may include: the electronic device acquires the third target relationship in the inter-application switching data; the electronic device acquires the third target relationship from the third target relationship The dwell duration of the first application and the dwell duration of the second application.
  • the third target relationship indicates that the first application and the second application are switching source applications/switching target applications; the electronic device determines the respective residence time of the two applications in the third target relationship as dwell time and the dwell time of the second application.
  • the first application is A and the second application is B
  • obtaining the residence time of A and the residence time of B from the directed graph shown in (b) in Figure 14 may include: Find the vertex corresponding to A and the vertex corresponding to B in the directed graph, the weight on the directed edge from the vertex corresponding to A to the vertex corresponding to B is the residence time of B, and the vertex corresponding to B points to the vertex corresponding to A
  • the weight on the directed edge of is the residence time of A.
  • the preset duration in S902 may be determined according to the dwell duration of the second application.
  • the residence time of the second application reflects the running time of the second application in the foreground after switching to the second application in the user's historical operation behavior, and the preset duration determines the switching frequency of the software refresh rate.
  • the preset duration is equal to the dwell duration of the second application, it is equivalent to keeping the switching frequency of the software refresh rate consistent with the user's historical habits of using the application; when the preset duration is greater than the dwell duration of the second application, it is equivalent to The switching frequency of the software refresh rate is reduced on the basis of the user's historical habit of using the application; when the preset duration is shorter than the dwell time of the second application, it is equivalent to increasing the software refresh rate based on the user's historical habit of using the application. Switch frequency.
  • the inter-application switching data is regularly updated based on the historical data of the user's use of the application, that is, the residence time of the second application is also updated according to the user's usage habits. Therefore, setting the preset duration according to the residence time of the second application is quite It is used to determine the switching frequency of the software refresh rate according to the user's historical habit of using the application.
  • FIG. 15 is a schematic diagram of an application switching scenario provided by another embodiment of the present application.
  • the application interface 50 may include a search bar 501 , a video preview image 502 and a navigation bar 503 .
  • the navigation bar 503 may include system navigation keys such as a return button 5031, a home screen button 5032, and an outgoing task history button 5033.
  • the main interface button 5032 When the user clicks/touches the main interface button 5032, the electronic device jumps to the main interface 51 as shown in (b) in FIG. 15 .
  • the main interface 51 may include application icons 511 and a navigation bar 512 .
  • the application icons 511 may include a video application icon, a payment application icon, a camera application icon, a text message icon, a setting icon, a gallery icon, a phone icon, a browser icon, an email icon, and the like.
  • the electronic device jumps to the payment interface 52 as shown in (c) in FIG. 15 .
  • the first solution is to generate inter-application switching data of a special application.
  • the desktop is used as a special application.
  • the inter-application software refresh rate switching module obtains the historical data of the user's use of the desktop from the WMS, generates the inter-application switching data corresponding to the desktop according to the desktop historical data, and stores the inter-application switching data It is a directed graph as shown in (b) in Figure 14. It is equivalent to adding the desktop as a special application to the directed graph.
  • the electronic device when jumping from the first application to the desktop, the electronic device confirms whether the software refresh rate needs to be switched to the software refresh rate of the desktop according to the method described in S901-S903 above.
  • the method for obtaining the preset duration in S902 may be to obtain the dwell duration of the desktop from the inter-application switching data, and generate the preset duration according to the dwell duration of the desktop.
  • the electronic device switches the software refresh rate again according to the method described in S901-S903.
  • the update frequency of the inter-application switching data of a special application can be adjusted.
  • the electronic device can periodically update the inter-application switching data.
  • the electronic device can update the inter-application switching data of the common application according to a preset update period; for special applications, the electronic device can update the inter-application switching data of the special application according to a shorter update period, that is, the update frequency is increased.
  • the inter-application software refresh rate module obtains the historical data of the special application from the WMS, generates the inter-application switching data of the special application according to the obtained historical data of the special application, and transfers the newly generated application
  • the inter-application switching data replaces the original inter-application switching data in the database.
  • the directed graph shown in (b) in Figure 14 is equivalent to updating the weights and nodes of the directed edges pointing/pointing out the special application in the directed graph every 1 hour.
  • the application dwell time is obtained based on the inter-app switching data
  • increasing the update frequency of the inter-app switching data of a special application is equivalent to increasing the update frequency of the special application’s dwell time, which can ensure that the obtained special application
  • the residence time can be closer to the user's usage habits.
  • the preset duration can be determined according to the dwell duration of the special application, and the preset duration determines the switching frequency of the software refresh rate. Therefore, by increasing the update frequency of the resident duration of a special application, a reasonable preset duration can be generated, thereby avoiding unnecessary software refresh rate switching process.
  • the dwell time of a special application can be increased.
  • the dwell time of the desktop application obtained from the inter-application switching data is 10s, it can be artificially increased to 30s.
  • the electronic device will switch the software refresh rate to that of the desktop application 10s after jumping to the desktop (assuming that the preset duration is equal to the duration of the desktop application).
  • Software refresh rate after that, the desktop jumps to the payment application, and the electronic device switches the software refresh rate to the software refresh rate of the payment application. During this process, the electronic device needs to switch the software refresh rate twice.
  • the preset duration is determined by the increased residence time of the desktop application of 30s, the switching process of the software refresh rate of the desktop application is avoided, and the electronic device only needs to switch the software refresh rate to the software refresh rate of the payment application, which is reduced once. Switching process.
  • the second solution is to set the dwell time of a special application as a fixed value.
  • the residence time of a special application can be set as a fixed value in advance and stored in the database as shown in FIG. 13 .
  • the inter-application software refresh rate switching module recognizes the jump to the special application when executing S901
  • the inter-application software refresh rate module can execute S902-S903 according to the steps of the special application.
  • the inter-application software refresh rate module obtains a fixed value corresponding to a special application from the database, and generates a preset duration according to the fixed value. If the accumulated time of the electronic device staying in the special application exceeds the fixed value, the electronic device switches to the software refresh rate of the special application. If the accumulated time of the electronic device staying in the special application does not exceed the fixed value, the electronic device maintains the current software refresh rate.
  • the first scheme needs to continuously update data, and the data processing volume of the electronic equipment is relatively large, and the performance requirements of the electronic equipment are relatively high.
  • the second solution has lower requirements on the performance of the electronic equipment.
  • the second solution can be adopted, which does not require special processing of data related to special applications, and does not need to add special applications to switching data between applications, which can effectively reduce the amount of data processing.
  • the software refresh rate switching method based on the historical data of the user's usage habits, inter-application switching data is generated, and the abstract concept of the user's usage of application habits is embodied to represent the inter-application switching relationship The specific data; by dynamically maintaining the switching data between applications, it provides decision-making basis for switching the software refresh rate when switching applications.
  • the software refresh rate switching scheme is formulated for different situations, so that when continuously switching applications, the switching frequency of the software refresh rate is effectively reduced, the probability of frame dropping and freezing is reduced, and the The extra power consumption of electronic devices due to continuous switching of refresh rates improves the battery life of electronic devices while ensuring a smooth visual experience.
  • the foregoing embodiments describe an example in which the mode switching method provided by the embodiments of the present application is applied to software refresh rate switching.
  • the mode switching method provided in the embodiment of the present application is not only applicable to the above software refresh rate switching, but also applicable to other mode switching scenarios. For example: application scenarios such as resolution switching, brightness switching, color depth switching, or color switching.
  • application scenarios such as resolution switching, brightness switching, color depth switching, or color switching.
  • the method for switching these modes is the same as the method for switching the software refresh rate described in the above embodiments, and will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
  • the embodiment of the present application also provides a computer program product, which enables the electronic device to implement the steps in the foregoing method embodiments when the computer program product is run on the electronic device.
  • an integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the computer programs can be stored in a computer-readable storage medium, and the computer programs can be processed When executed by the controller, the steps in the above-mentioned various method embodiments can be realized.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random-access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media.
  • a recording medium e.g., a hard disk, magnetic disk or optical disk, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunication signals
  • software distribution media e.g., software distribution media.
  • computer readable media may not be electrical carrier signals and telecommunication signals under legislation and patent practice.
  • the embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to the memory, and the processor executes the computer program stored in the memory to implement the steps of any method embodiment of the present application.
  • the chip system can be a single chip, or a chip module composed of multiple chips.

Abstract

A mode switching method and apparatus, an electronic device and a chip system, the method comprising: receiving a user operation, and in response to the user operation, switching an application running in the foreground from a first application to a second application; if the running time of the second application in the foreground is not greater than a first preset duration, then maintaining a first software refresh rate, wherein the first preset duration is the preset duration corresponding to the second application, the first software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of an image in a display cache of an electronic device; if the running time of the second application in the foreground is greater than the first preset duration, then switching the software refresh rate of the electronic device from the first software refresh rate to a second software refresh rate, wherein the second software refresh rate is the software refresh rate of the second application. The problem of high power consumption of electronic devices caused by frequently switching the refresh rate is effectively solved.

Description

模式切换方法、装置、电子设备及芯片系统Mode switching method, device, electronic device and chip system
本申请要求于2021年07月23日提交国家知识产权局、申请号为202110843111.9、申请名称为“模式切换方法、装置、电子设备及芯片系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on July 23, 2021, with the application number 202110843111.9 and the application name "Mode switching method, device, electronic equipment and chip system", the entire content of which is incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及终端设备领域,尤其涉及一种模式切换方法、装置、电子设备及芯片系统。The present application relates to the field of terminal equipment, and in particular to a mode switching method, device, electronic equipment and chip system.
背景技术Background technique
随着电子设备智能化程度的提高,越来越多的电子设备支持智能切换刷新率。在智能切换刷新率的方案中,可以为不同的应用或不同类型的应用设置不同的刷新率,电子设备根据用户操作,智能切换刷新率。As the intelligence of electronic devices increases, more and more electronic devices support intelligent switching of refresh rates. In the scheme of intelligently switching the refresh rate, different refresh rates may be set for different applications or different types of applications, and the electronic device intelligently switches the refresh rate according to user operations.
在一些应用场景中,当电子设备开启智能切换刷新率的方案时,可能存在短时间内多次切换刷新率的情况。频繁地切换刷新率将会增加电子设备的功耗,影响电子设备的性能。In some application scenarios, when the electronic device starts the scheme of intelligently switching the refresh rate, there may be multiple switching of the refresh rate in a short period of time. Frequently switching the refresh rate will increase the power consumption of the electronic device and affect the performance of the electronic device.
发明内容Contents of the invention
本申请提供一种模式切换方法、装置、电子设备及芯片系统,解决了频繁切换刷新率导致的电子设备功耗较高的问题。The present application provides a mode switching method, device, electronic equipment and chip system, which solves the problem of high power consumption of electronic equipment caused by frequent switching of refresh rates.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种模式切换方法,其特征在于,应用于电子设备,包括:In the first aspect, a mode switching method is provided, which is characterized in that it is applied to electronic equipment, including:
接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用;receiving a user operation, and switching the application running in the foreground from the first application to the second application in response to the user operation;
若所述第二应用在前台的运行时间不大于第一预设时长,则维持第一软件刷新率,所述第一预设时长为所述第二应用对应的预设时长,所述第一软件刷新率为所述第一应用的软件刷新率,所述软件刷新率为所述电子设备的显示缓存中图像的刷新率;If the running time of the second application in the foreground is not longer than the first preset duration, then maintain the first software refresh rate, the first preset duration is the preset duration corresponding to the second application, and the first The software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of images in the display cache of the electronic device;
若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由第一软件刷新率切换为第二软件刷新率,所述第二软件刷新率为所述第二应用的软件刷新率。If the running time of the second application in the foreground is greater than the first preset duration, the software refresh rate of the electronic device is switched from the first software refresh rate to the second software refresh rate, and the second software refresh rate The rate is a software refresh rate of the second application.
本申请实施例中,电子设备响应用户操作、将前台运行的应用由第一应用跳转到第二应用后,将第二应用的预设时长作为软件刷新率的切换条件,以控制软件刷新率的切换频率。与电子设备由第一应用跳转到第二应用后即切换软件刷新率的方案相比,本申请实施例提供的方法,能够有效避免短时间内频繁地切换软件刷新率,有效提高了电子设备的功耗。In the embodiment of the present application, after the electronic device responds to the user operation and jumps the application running in the foreground from the first application to the second application, the preset duration of the second application is used as the switching condition of the software refresh rate to control the software refresh rate switching frequency. Compared with the solution of switching the software refresh rate after the electronic device jumps from the first application to the second application, the method provided by the embodiment of the present application can effectively avoid frequent switching of the software refresh rate in a short period of time, and effectively improve the electronic device's refresh rate. power consumption.
在第一方面的一种可能的实现方式中,在接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用之后,所述方法还包括:根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率。In a possible implementation manner of the first aspect, after receiving a user operation and switching the application running in the foreground from the first application to the second application in response to the user operation, the method further includes: according to the first The software refresh rate, the second software refresh rate and the first preset duration switch the software refresh rate of the electronic device.
在第一方面的一种可能的实现方式中,所述根据所述第一软件刷新率、所述第二 软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,包括:In a possible implementation manner of the first aspect, the switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration includes :
若所述第一软件刷新率高于所述第二软件刷新率,则判断所述第二应用在前台的运行时间是否大于所述第一预设时长;If the first software refresh rate is higher than the second software refresh rate, then judging whether the running time of the second application in the foreground is greater than the first preset duration;
若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由所述第一软件刷新率切换为所述第二软件刷新率。If the running time of the second application in the foreground is greater than the first preset duration, switching the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate.
在第一方面的一种可能的实现方式中,所述根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,包括:In a possible implementation manner of the first aspect, the switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration includes :
若所述第一软件刷新率低于所述第二软件刷新率,则将所述电子设备的软件刷新率由所述第一软件刷新率切换到第三软件刷新率,所述第三软件刷新率高于所述第一软件刷新率、且低于所述第二软件刷新率;If the first software refresh rate is lower than the second software refresh rate, the software refresh rate of the electronic device is switched from the first software refresh rate to a third software refresh rate, and the third software refresh rate is a rate higher than the first software refresh rate and lower than the second software refresh rate;
若所述第二应用在前台的运行时间不大于所述第一预设时长,则维持所述第三软件刷新率;若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由所述第三软件刷新率切换为所述第二软件刷新率。If the running time of the second application in the foreground is not longer than the first preset duration, then maintain the third software refresh rate; if the running time of the second application in the foreground is longer than the first preset duration , then switch the software refresh rate of the electronic device from the third software refresh rate to the second software refresh rate.
在本申请实施例中,增加了对软件刷新率的判断过程。在第一软件刷新率低于第二软件刷新率的情况下,当切换到高软件刷新率的第二应用,电子设备先将软件刷新率切换至介于第一软件刷新率和第二软件刷新率之间的第三软件刷新率,第二应用在前台的运行时间达到第一预设时长时,再切换至较高的软件刷新率,这样既能保证用户的观感体验较为流畅,同时又尽量地降低了软件刷新率,进而有效降低了电子设备的功耗。In the embodiment of the present application, the process of judging the software refresh rate is added. When the first software refresh rate is lower than the second software refresh rate, when switching to the second application with a high software refresh rate, the electronic device first switches the software refresh rate to a value between the first software refresh rate and the second software refresh rate. The third software refresh rate between the two rates. When the running time of the second application in the foreground reaches the first preset time, it will switch to a higher software refresh rate. The software refresh rate is greatly reduced, thereby effectively reducing the power consumption of electronic equipment.
在第一方面的一种可能的实现方式中,所述第三软件刷新率为:所述第一软件刷新率和所述第二软件刷新率之和的预设倍数,所述预设倍数为小于1的正数。In a possible implementation manner of the first aspect, the third software refresh rate is: a preset multiple of the sum of the first software refresh rate and the second software refresh rate, and the preset multiple is A positive number less than 1.
在第一方面的一种可能的实现方式中,在接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用之后,所述方法还包括:根据第一应用的驻留时长、第二应用的驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,其中,所述第一应用的驻留时长为应用切换后所述第一应用在前台的历史运行时间;所述第二应用的驻留时长为应用切换后所述第二应用在前台的历史运行时间。In a possible implementation manner of the first aspect, after receiving a user operation and switching the application running in the foreground from the first application to the second application in response to the user operation, the method further includes: The dwell duration, the dwell duration of the second application, the first software refresh rate, the second software refresh rate, and the first preset duration switch the software refresh rate of the electronic device, wherein the first The resident duration of an application is the historical running time of the first application in the foreground after the application switching; the resident duration of the second application is the historical running time of the second application in the foreground after the application switching.
在第一方面的一种可能的实现方式中,所述根据第一驻留时长、第二驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,包括:In a possible implementation manner of the first aspect, according to the first dwell duration, the second dwell duration, the first software refresh rate, the second software refresh rate, and the first preset Switching the software refresh rate of the electronic device by duration, including:
若所述第一应用的驻留时长小于所述第二应用的驻留时长,则将所述电子设备的软件刷新率由所述第一软件刷新率切换到所述第二软件刷新率;If the resident duration of the first application is less than the resident duration of the second application, switching the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate;
若所述第一应用的驻留时长大于所述第二应用的驻留时长,则根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率。If the resident duration of the first application is longer than the resident duration of the second application, switch the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration. The software refresh rate of the device.
在第一方面的一种可能的实现方式中,在根据第一应用的驻留时长、第二应用的驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率之前,所述方法还包括:对于目标应用的驻留时长,获取目标应用的历史切换数据,所述目标应用为所述第一应用或所述第二应用;根据所述目标应用的历史切换数据生成所述目标应用的驻留时长。In a possible implementation manner of the first aspect, based on the dwell duration of the first application, the dwell duration of the second application, the first software refresh rate, the second software refresh rate, and the second Before switching the software refresh rate of the electronic device for a preset period of time, the method further includes: for the residence time of the target application, acquiring historical switching data of the target application, the target application being the first application or the The second application: generating the residence time of the target application according to the historical switching data of the target application.
在本申请实施例中,增加了对应用的驻留时长的判断过程。应用的驻留时长可以是根据应用的历史切换数据获得的。因此,将应用的驻留时长作为软件刷新率切换的判断条件,相当于根据用户使用应用的习惯执行软件刷新率的切换。通过这种方法,能够根据用户的使用习惯灵活调整软件刷新率的切换策略,有效提高了方法的适应性,进而提升了用户体验。In the embodiment of the present application, the process of judging the residence time of the application is added. The dwell time of the application may be obtained according to historical switching data of the application. Therefore, taking the residence time of the application as the judgment condition for switching the software refresh rate is equivalent to switching the software refresh rate according to the user's habit of using the application. Through this method, the switching strategy of the software refresh rate can be flexibly adjusted according to the user's usage habits, which effectively improves the adaptability of the method and further improves the user experience.
在第一方面的一种可能的实现方式中,在根据所述目标应用的历史切换数据生成所述目标应用的驻留时长之后,所述方法还包括:按照预设周期更新所述目标应用的驻留时长。In a possible implementation manner of the first aspect, after the dwell duration of the target application is generated according to the historical switching data of the target application, the method further includes: dwell time.
在第一方面的一种可能的实现方式中,所述第一预设时长由所述第二应用的驻留时长确定,所述第二应用的驻留时长为应用切换后所述第二应用在前台的历史运行时间。In a possible implementation manner of the first aspect, the first preset duration is determined by the dwell duration of the second application, and the dwell duration of the second application is The historical running time in the foreground.
在本申请实施例中,由于第二应用的驻留时长可以反映用户使用应用的习惯,因此,由第二应用的驻留时长确定预设时长,相当于根据用户使用应用的历史习惯决定软件刷新率的切换频率,有利于提高软件刷新率的切换方法的适用性,进而提高用户体验度。In the embodiment of this application, since the residence time of the second application can reflect the user's habit of using the application, the preset duration is determined by the residence time of the second application, which is equivalent to determining the software refresh according to the user's historical habit of using the application. The switching frequency of the refresh rate is conducive to improving the applicability of the switching method of the software refresh rate, thereby improving the user experience.
在第一方面的一种可能的实现方式中,所述方法还包括:若所述电子设备处于暗光状态,且前台运行的应用由所述第一应用跳转到所述第二应用,则根据所述第一预设时长切换所述电子设备的软件刷新率。In a possible implementation manner of the first aspect, the method further includes: if the electronic device is in a dark state and the application running in the foreground is switched from the first application to the second application, then Switching the software refresh rate of the electronic device according to the first preset duration.
与电子设备的显示屏/环境处于亮光状态相比,当电子设备的显示屏/环境处于暗光状态时,切换软件刷新率更容易给用户造成闪高亮、显示掉帧的感观体验。在本申请实施例中,将电子设备处于暗光状态作为软件刷新率切换的一个启动条件,能够有效避免暗光状态下由于切换软件刷新率而造成的闪高亮、显示掉帧的情况。Compared with the display/environment of the electronic device in the bright state, when the display/environment of the electronic device is in the dark state, switching the software refresh rate is more likely to cause the user a sensory experience of flickering and display frame drop. In the embodiment of the present application, the electronic device is in the dark state as a start condition for software refresh rate switching, which can effectively avoid the situation of flashing and highlighting and display frame drop caused by switching the software refresh rate in the dark state.
第二方面,提供一种电子设备,其特征在于,包括:In a second aspect, an electronic device is provided, characterized in that it includes:
应用切换单元,用于接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用;An application switching unit, configured to receive a user operation, and switch the application running in the foreground from the first application to the second application in response to the user operation;
第一切换单元,用于若所述第二应用在前台的运行时间不大于第一预设时长,则维持第一软件刷新率,所述第一预设时长为所述第二应用对应的预设时长,所述第一软件刷新率为所述第一应用的软件刷新率,所述软件刷新率为所述电子设备的显示缓存中图像的刷新率;The first switching unit is configured to maintain the first software refresh rate if the running time of the second application in the foreground is not greater than a first preset duration, and the first preset duration is a preset duration corresponding to the second application Set the duration, the first software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of images in the display cache of the electronic device;
第二切换单元,用于若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由第一软件刷新率切换为第二软件刷新率,所述第二软件刷新率为所述第二应用的软件刷新率。The second switching unit is configured to switch the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate if the running time of the second application in the foreground is greater than the first preset duration , the second software refresh rate is the software refresh rate of the second application.
第三方面,提供一种电子设备,包括处理器,处理器用于运行存储器中存储的计算机程序,实现本申请第一方面任一项的方法。In a third aspect, an electronic device is provided, including a processor, and the processor is configured to run a computer program stored in a memory to implement the method of any one of the first aspects of the present application.
第四方面,提供一种芯片系统,包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现本申请第一方面任一项的方法。In a fourth aspect, a chip system is provided, including a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method of any one of the first aspects of the present application.
第五方面,提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被一个或多个处理器执行时实现本申请第一方面任一项的方法。In a fifth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by one or more processors, the method of any one of the first aspects of the present application is implemented.
第六方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在设备 上运行时,使得设备执行上述第一方面中任一项方法。In a sixth aspect, an embodiment of the present application provides a computer program product, which, when the computer program product is run on a device, causes the device to execute any one of the methods in the first aspect above.
可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the above-mentioned second aspect to the sixth aspect, reference can be made to the related description in the above-mentioned first aspect, which will not be repeated here.
附图说明Description of drawings
图1本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图2是本申请实施例提供的屏幕刷新过程的示意图;Fig. 2 is a schematic diagram of the screen refresh process provided by the embodiment of the present application;
图3是本申请实施例提供的Vsync机制的示意图;Fig. 3 is a schematic diagram of the Vsync mechanism provided by the embodiment of the present application;
图4是本申请实施例提供的硬件刷新率设置的应用场景示意图;FIG. 4 is a schematic diagram of an application scenario of hardware refresh rate setting provided by an embodiment of the present application;
图5是本申请实施例提供的软件刷新率控制效果示意图;Fig. 5 is a schematic diagram of the software refresh rate control effect provided by the embodiment of the present application;
图6是本申请另一实施例提供的软件刷新率的控制效果示意图;Fig. 6 is a schematic diagram of the control effect of the software refresh rate provided by another embodiment of the present application;
图7是本申请实施例提供的软件刷新率设置的应用场景示意图;FIG. 7 is a schematic diagram of an application scenario of software refresh rate setting provided by an embodiment of the present application;
图8是本申请实施例提供的应用切换的场景示意图;FIG. 8 is a schematic diagram of an application switching scenario provided by an embodiment of the present application;
图9是本申请实施例提供的软件刷新率的切换方法的流程示意图;FIG. 9 is a schematic flowchart of a method for switching a software refresh rate provided by an embodiment of the present application;
图10是本申请实施例提供的应用界面切换的场景示意图;FIG. 10 is a schematic diagram of a scene of switching application interfaces provided by an embodiment of the present application;
图11是本申请实施例提供的另一种软件刷新率的切换方法的流程示意图;FIG. 11 is a schematic flowchart of another method for switching the software refresh rate provided by the embodiment of the present application;
图12是本申请实施例提供的另一种软件刷新率的切换方法的流程示意图;FIG. 12 is a schematic flowchart of another method for switching the software refresh rate provided by the embodiment of the present application;
图13是本申请实施例提供的模块关系的交互示意图;Fig. 13 is an interactive schematic diagram of the module relationship provided by the embodiment of the present application;
图14是本申请实施例提供的应用间切换数据的存储形式的示意图;Fig. 14 is a schematic diagram of a storage form of inter-application switching data provided by an embodiment of the present application;
图15是本申请另一实施例提供的应用切换的场景示意图。FIG. 15 is a schematic diagram of an application switching scenario provided by another embodiment of the present application.
具体实施方式detailed description
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other Presence or addition of features, wholes, steps, operations, elements, components and/or collections thereof.
还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and/or" describes the association relationship of associated objects, indicating that there may be three types of relationships; for example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone, wherein A and B may be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship.
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification and appended claims of the present application, the terms "first", "second", "third" and so on are only used to distinguish descriptions, and should not be understood as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise.
本申请实施例提供了一种模式切换方法,该方法可以适用于电子设备中。电子设备可以为:手机、平板电脑、智慧屏、可穿戴设备、车载设备、智能音箱、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备。本申请实施例对电子设备的具体类型不作限定。The embodiment of the present application provides a mode switching method, which can be applied to electronic equipment. Electronic devices can be: mobile phones, tablet computers, smart screens, wearable devices, vehicle-mounted devices, smart speakers, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) equipment, notebook computers, super mobile personal computers ( Ultra-mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other electronic devices. The embodiment of the present application does not limit the specific type of the electronic device.
参见图1,是本申请实施例提供的一种电子设备的结构示意图。电子设备100可以包括处理器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等。Referring to FIG. 1 , it is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110用于执行本申请实施例中的模式切换方法。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 is configured to execute the mode switching method in the embodiment of the present application.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, the controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold 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 be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器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)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号。In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现 数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)。存储数据区可存储电子设备100使用过程中所创建的数据(比如竞价值,唤醒声纹等)。The internal memory 121 may be used to store computer-executable program codes including instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 . The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system and at least one application program required by a function (such as a sound playing function, an image playing function, etc.). The storage data area can store data created during the use of the electronic device 100 (such as competition value, wake-up voiceprint, etc.).
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。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, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处 理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith) satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信号转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio signals into analog audio signals for output, and also for converting analog audio input into digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。 Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了监听语音信息,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。例如,麦克风170C 可以用于采集本申请实施例涉及到的语音信息。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can also implement a noise reduction function in addition to listening to voice information. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc. For example, the microphone 170C may be used to collect voice information involved in this embodiment of the present application.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器 180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 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 leather case mode, automatic unlock and lock screen in pocket mode.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "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 called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor 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 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 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 100 is in the pocket, so as to prevent accidental touch.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算, 用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏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)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. 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 (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通 信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
首先介绍本申请实施例涉及的技术背景。Firstly, the technical background involved in the embodiment of the present application is introduced.
电子设备的显示屏以一定的硬件刷新率显示图像。硬件刷新率是指电子设备的屏幕刷新的频率,可以理解为,屏幕每秒刷新图像的帧数。例如:硬件刷新率为60Hz,表示电子设备的屏幕每秒刷新60帧图像。屏幕上的图像由横纵排列的像素组成。一次硬件刷新的过程,是指屏幕中的每个像素进行一次刷新的过程。以LCD为例,LCD中的像素是一行一行控制的。通过控制开关从上到下逐行控制LCD中的像素进行刷新(如图2中的(a)所示)。当LCD最后一行像素刷新完成后,屏幕产生一个硬件垂直同步(Vertical Synchronization,Vsync)信号(一种脉冲信号),以使控制开关进行新一轮的刷新控制。The display screen of an electronic device displays images at a certain hardware refresh rate. The hardware refresh rate refers to the frequency at which the screen of an electronic device refreshes, which can be understood as the number of frames of images refreshed on the screen per second. For example: the hardware refresh rate is 60Hz, which means that the screen of the electronic device refreshes 60 frames of images per second. Images on the screen are made up of pixels arranged horizontally and vertically. A hardware refresh process refers to the process of refreshing each pixel on the screen once. Taking LCD as an example, the pixels in the LCD are controlled row by row. The pixels in the LCD are controlled row by row from top to bottom by controlling the switches to perform refresh (as shown in (a) in FIG. 2 ). When the last row of pixels of the LCD is refreshed, the screen generates a hardware vertical synchronization (Vsync) signal (a pulse signal) to enable the control switch to perform a new round of refresh control.
从系统方面考虑,以Android系统为例,如图2中的(b)所示,系统合成一帧图像的过程包括:Android系统应用层的应用程序根据待显示画面的显示参数(如待显示的界面的宽高、位置、颜色等)绘制图像;Android系统应用架构层的Surfaceflinger进程对应用程序绘制的图像进行合并和渲染后,将处理后的图像存储到硬件帧缓存(即显示缓存)中。当屏幕产生硬件Vsync信号时,Android系统内核层的Display驱动程序将硬件帧缓存中最新缓存的一帧图像送到屏幕显示,而系统则开始合成下一帧图像。以此循环,即可完成屏幕图像的多次刷新。From the perspective of the system, taking the Android system as an example, as shown in (b) in Figure 2, the process of synthesizing a frame of image by the system includes: the application program of the Android system application layer is based on the display parameters of the image to be displayed (such as the image to be displayed) The width, height, position, color, etc. of the interface) draw images; the Surfaceflinger process of the Android system application architecture layer merges and renders the images drawn by the application program, and stores the processed images in the hardware frame buffer (ie, the display buffer). When the screen generates a hardware Vsync signal, the Display driver at the kernel layer of the Android system sends the latest cached frame image in the hardware frame buffer to the screen for display, and the system starts to synthesize the next frame image. With this cycle, multiple refreshes of the screen image can be completed.
下面介绍Vsync机制的工作原理。Vsync机制是指,将硬件Vsync信号通过软件Vsync信号的形式传递给上层的绘制执行者,使其配合硬件Vsync信号的工作节奏。具体的,Surfaceflinger进程中的DispSync线程将硬件Vsync信号虚化为具有固定偏移的两个软件Vsync信号Vsync-APP信号和Vsync-SF信号;Surfaceflinger进程中的App EventThread线程将Vsync-APP信号上报给应用程序;应用程序接收到Vsync-APP信号后开始绘制图像(通过CPU生成图像的纹理和多边形,通过GPU将CPU生成的纹理和多边形进行栅格化和合成处理);Surfaceflinger进程通过SF EventThread线程接收Vsync-SF信号;Surfaceflinger进程接收到Vsync-SF信号后,开始对应用程序绘制的图像进行合并和渲染,并将处理后的图像存储到硬件帧缓存中。The following describes the working principle of the Vsync mechanism. The Vsync mechanism means that the hardware Vsync signal is transmitted to the upper-layer drawing executor in the form of a software Vsync signal, so that it can match the working rhythm of the hardware Vsync signal. Specifically, the DispSync thread in the Surfaceflinger process virtualizes the hardware Vsync signal into two software Vsync signals Vsync-APP signal and Vsync-SF signal with fixed offset; the App EventThread thread in the Surfaceflinger process reports the Vsync-APP signal to Application program; the application program starts to draw the image after receiving the Vsync-APP signal (the texture and polygon of the image are generated by the CPU, and the texture and polygon generated by the CPU are rasterized and synthesized by the GPU); the Surfaceflinger process is received by the SF EventThread thread Vsync-SF signal; after the Surfaceflinger process receives the Vsync-SF signal, it starts to merge and render the image drawn by the application, and stores the processed image in the hardware frame buffer.
示例性的,参见图3,是本申请实施例提供的Vsync机制的示意图。如图3所示,屏幕产生一个硬件Vsync信号后,Display驱动程序将Frame0图像送显,系统通过转换后的Vsync-APP信号控制应用程序绘制第二帧图像(如图3所示的标号为2的矩形)、通过转换后的Vsync-SF信号控制Surfaceflinger进程对第一帧图像进行合成和渲染、并将处理后的第一帧图像存储于硬件帧缓存中。屏幕产生下一个硬件Vsync信号后,Display驱动程序将Frame1图像送显,系统通过转换后的Vsync-APP信号控制应用程序绘制第三帧图像(如图3所示的标号为3的矩形)、通过转换后的Vsync-SF信号控制Surfaceflinger进程对第二帧图像进行合成和渲染、并将处理后的第二帧图像存储于硬件帧缓存中。依次类推。如图3所示,通过Vsync机制使系统合成帧的过程配合屏幕硬件刷新的过程。For example, refer to FIG. 3 , which is a schematic diagram of the Vsync mechanism provided by the embodiment of the present application. As shown in Figure 3, after the screen generates a hardware Vsync signal, the Display driver program sends the Frame0 image to display, and the system controls the application program to draw the second frame image through the converted Vsync-APP signal (marked as 2 as shown in Figure 3 rectangle), control the Surfaceflinger process to synthesize and render the first frame image through the converted Vsync-SF signal, and store the processed first frame image in the hardware frame buffer. After the screen generates the next hardware Vsync signal, the Display driver sends the Frame1 image to display, and the system controls the application program to draw the third frame image (the rectangle marked 3 as shown in Figure 3) through the converted Vsync-APP signal. The converted Vsync-SF signal controls the Surfaceflinger process to synthesize and render the second frame image, and store the processed second frame image in the hardware frame buffer. And so on. As shown in Figure 3, the process of synthesizing frames by the system is coordinated with the process of refreshing the screen hardware through the Vsync mechanism.
目前,电子设备的屏幕可以支持多种硬件刷新率,如60Hz、90Hz、120Hz、144Hz和240Hz等。实际应用中,可以由用户手动切换硬件刷新率,也可以由电子设备智能 切换硬件刷新率。Currently, the screens of electronic devices can support multiple hardware refresh rates, such as 60Hz, 90Hz, 120Hz, 144Hz, and 240Hz. In practical applications, the hardware refresh rate can be manually switched by the user, or the hardware refresh rate can be intelligently switched by the electronic device.
在用户手动切换硬件刷新率的应用场景中,如图4的(a)所示,为硬件刷新率的设置界面10。设置界面10包括硬件刷新率调节区域110。硬件刷新率调节区域110中包括选择控件111和硬件刷新率选择信息112。如设置界面10中所示,调节控件111位于硬件刷新率选择信息112的“60Hz”位置处,表示当前电子设备的硬件刷新率为60Hz。用户可以在设置界面10上通过用户操作调节电子设备的硬件刷新率。例如,当用户滑动调节控件111至硬件刷新率选择信息112的“90Hz”位置处时,电子设备显示如图4中的(b)所示的界面11,此时,电子设备将硬件刷新率设置为90Hz。In the application scenario where the user manually switches the hardware refresh rate, as shown in (a) of FIG. 4 , there is an interface 10 for setting the hardware refresh rate. The setting interface 10 includes a hardware refresh rate adjustment area 110 . The hardware refresh rate adjustment area 110 includes a selection control 111 and hardware refresh rate selection information 112 . As shown in the setting interface 10, the adjustment control 111 is located at the "60Hz" position of the hardware refresh rate selection information 112, indicating that the current hardware refresh rate of the electronic device is 60Hz. The user can adjust the hardware refresh rate of the electronic device through user operations on the setting interface 10 . For example, when the user slides the adjustment control 111 to the "90Hz" position of the hardware refresh rate selection information 112, the electronic device displays the interface 11 shown in (b) in Figure 4, at this time, the electronic device sets the hardware refresh rate to 90Hz.
在电子设备智能切换硬件刷新率的应用场景中,电子设备可以根据用户操作智能切换硬件刷新率。In an application scenario where the electronic device intelligently switches the hardware refresh rate, the electronic device can intelligently switch the hardware refresh rate according to user operations.
例如:当用户操作屏幕时,电子设备将硬件刷新率由低刷新率(如60Hz)切换至高刷新率(如90Hz、120Hz等);当用户无操作时,电子设备将硬件刷新率由高刷新率切换至低刷新率。电子设备还可以根据用户使用时长智能切换硬件刷新率。当用户使用时长达到预设值时,电子设备将硬件刷新率由低刷新率切换至高刷新率。For example: when the user operates the screen, the electronic device switches the hardware refresh rate from a low refresh rate (such as 60Hz) to a high refresh rate (such as 90Hz, 120Hz, etc.); when the user does not operate, the electronic device switches the hardware refresh rate from a high refresh rate Switch to a low refresh rate. Electronic devices can also intelligently switch the hardware refresh rate according to the user's usage time. When the user's use time reaches a preset value, the electronic device switches the hardware refresh rate from a low refresh rate to a high refresh rate.
还可以由用户为不同的应用设置不同的硬件刷新率,电子设备根据用户操作智能切换硬件刷新率。例如:为视频应用设置120Hz的硬件刷新率,为支付应用设置60Hz的硬件刷新率。当用户操作视频应用时,电子设备将硬件刷新率切换至120Hz;当用户操作支付应用时,电子设备将硬件刷新率切换至60Hz。当然,也可以由开发人员在应用的配置文件中设置硬件刷新率。Users can also set different hardware refresh rates for different applications, and the electronic device intelligently switches the hardware refresh rate according to user operations. For example: set a hardware refresh rate of 120Hz for video applications, and set a hardware refresh rate of 60Hz for payment applications. When the user operates a video application, the electronic device switches the hardware refresh rate to 120Hz; when the user operates a payment application, the electronic device switches the hardware refresh rate to 60Hz. Of course, the hardware refresh rate can also be set by the developer in the configuration file of the application.
在硬件刷新率由低到高的切换过程中,用户可能会感觉到闪高亮,这种情况在暗光条件下尤为明显。为了解决该问题,可以将电子设备的硬件刷新率维持在高刷新率。但这种方案的代价是电子设备的功耗较高。为了降低电子设备在高刷新率下的功耗,采用的方案是,降低软件刷新率。例如:电子设备的硬件刷新率维持在120Hz,将软件刷新率降到60Hz。实现方式可以包括:During the switching process of the hardware refresh rate from low to high, the user may feel flickering, which is especially obvious in low-light conditions. In order to solve this problem, the hardware refresh rate of the electronic device can be maintained at a high refresh rate. But this solution comes at the cost of higher power consumption of the electronic equipment. In order to reduce the power consumption of the electronic device at a high refresh rate, a solution is to reduce the refresh rate of the software. For example: the hardware refresh rate of electronic equipment is maintained at 120Hz, and the software refresh rate is reduced to 60Hz. Implementations can include:
1、系统通知应用以60Hz合成图像。1. The system notifies the application to synthesize images at 60Hz.
示例性的,参见图5,是本申请实施例提供的软件刷新率的控制效果示意图。如图5所示,屏幕产生一个硬件Vsync信号后,Display驱动程序仍将Frame0送显,系统产生一个Vsync-APP信号和一个Vsync-SF信号,应用程序根据Vsync-APP信号绘制第二帧图像(如图5中标号为2的矩形),Surfaceflinger进程根据Vsync-SF信号生成第一帧图像、并将第一帧图像存储于硬件帧缓存中。显示屏产生下一个硬件Vsync信号后,Display驱动程序将Frame1图像送显。显示屏产生再下一个硬件Vsync信号后,Display驱动程序仍将Frame1图像送显,系统再产生一个Vsync-APP信号和一个Vsync-SF信号,应用程序根据Vsync-APP信号绘制第三帧图像(如图5中标号为3的矩形),Surfaceflinger进程根据当前的Vsync-SF信号生成第二帧图像、并将第二帧图像存储于硬件帧缓存中。依次类推。上述方式中,通过系统侧控制合成图像的频率,以使软件刷新率降为硬件刷新率的一半。For example, refer to FIG. 5 , which is a schematic diagram of the control effect of the software refresh rate provided by the embodiment of the present application. As shown in Figure 5, after the screen generates a hardware Vsync signal, the Display driver still sends Frame0 to the display, the system generates a Vsync-APP signal and a Vsync-SF signal, and the application program draws the second frame image according to the Vsync-APP signal ( As shown in the rectangle labeled 2 in FIG. 5 ), the Surfaceflinger process generates the first frame of image according to the Vsync-SF signal, and stores the first frame of image in the hardware frame buffer. After the display generates the next hardware Vsync signal, the Display driver sends the Frame1 image to the display. After the display generates the next hardware Vsync signal, the Display driver will still send the Frame1 image to the display, and the system will generate a Vsync-APP signal and a Vsync-SF signal, and the application program will draw the third frame image according to the Vsync-APP signal (such as In the rectangle labeled 3 in FIG. 5 ), the Surfaceflinger process generates a second frame image according to the current Vsync-SF signal, and stores the second frame image in the hardware frame buffer. And so on. In the above method, the frequency of composite images is controlled by the system side, so that the software refresh rate is reduced to half of the hardware refresh rate.
2、系统通知应用以120Hz合成图像,应用以60Hz合成图像(如应用每两帧合成一次图像)。2. The system notifies the app to synthesize images at 120Hz, and the app synthesizes images at 60Hz (for example, the app synthesizes images every two frames).
参见图6,是本申请另一实施例提供的软件刷新率的控制效果示意图。如图6所 示,屏幕产生一个硬件Vsync信号后,Display驱动程序将Frame0图像送显,系统产生一个Vsync-APP信号和一个Vsync-SF信号,应用程序根据Vsync-APP信号绘制第二帧图像(如图6中标号为2的矩形),Surfaceflinger进程根据Vsync-SF信号生成第一帧图像(如图6中标号为1的矩形),并将第一帧图像存储于硬件帧缓存中。显示屏产生下一个硬件Vsync信号后,Display驱动程序将Frame1图像送显,系统再产生一个Vsync-APP信号和一个Vsync-SF信号。显示屏产生再下一个硬件Vsync信号后,Display驱动程序仍将Frame1图像送显,系统再产生一个Vsync-APP信号和一个Vsync-SF信号,应用程序根据Vsync-APP信号绘制第三帧图像(如图6中标号为3的矩形),Surfaceflinger进程根据Vsync-SF信号生成第二帧图像、并将第一帧图像存储于硬件帧缓存中。依次类推。该方式中,通过应用侧控制合成图像的频率,以使软件刷新率降为硬件刷新率的一半。Referring to FIG. 6 , it is a schematic diagram of the control effect of the software refresh rate provided by another embodiment of the present application. As shown in Figure 6, after the screen generates a hardware Vsync signal, the Display driver sends the Frame0 image to display, the system generates a Vsync-APP signal and a Vsync-SF signal, and the application program draws the second frame image according to the Vsync-APP signal ( As shown in the rectangle labeled 2 in Figure 6), the Surfaceflinger process generates the first frame of image according to the Vsync-SF signal (as shown in the rectangle labeled 1 in Figure 6), and stores the first frame of image in the hardware frame buffer. After the display generates the next hardware Vsync signal, the Display driver sends the Frame1 image to the display, and the system generates a Vsync-APP signal and a Vsync-SF signal. After the display generates the next hardware Vsync signal, the Display driver will still send the Frame1 image to the display, and the system will generate a Vsync-APP signal and a Vsync-SF signal, and the application program will draw the third frame image according to the Vsync-APP signal (such as In the rectangle labeled 3 in FIG. 6 ), the Surfaceflinger process generates the second frame image according to the Vsync-SF signal, and stores the first frame image in the hardware frame buffer. And so on. In this method, the frequency of composite images is controlled by the application side, so that the software refresh rate is reduced to half of the hardware refresh rate.
可以为每个应用程序或者不同类型的应用程序设置不同的软件刷新率。例如,视频应用对画面流畅度要求较高,可以为视频应用设置较高的软件刷新率;支付应用对画面流畅度要求较低,可以为支付应用设置较低的软件刷新率。Different software refresh rates can be set for each application or for different types of applications. For example, video applications have high requirements for screen fluency, so a higher software refresh rate can be set for video applications; payment applications have lower requirements for screen fluency, and a lower software refresh rate can be set for payment applications.
示例性的,参见图7,是本申请实施例提供的软件刷新率设置的应用场景示意图。如图7中的(a)所示,为应用A的设置界面20。设置界面20包括选择控件201和软件刷新率选择信息202。如设置界面20中所示,软件刷新率选择信息202的“60Hz”位置处的选择控件201处于被选中状态,表示当前应用A的软件刷新率为60Hz。用户可以在设置界面20上通过用户操作调节应用A的软件刷新率。例如,当用户点击/触碰软件刷新率信息202的“90Hz”位置处的选择控件201时,电子设备显示如图7中的(b)所示的界面21,此时,电子设备将应用A的软件刷新率设置为90Hz。软件刷新率可以如图7所示的由用户设置,也可以由开发人员在应用的配置文件中设置。For example, refer to FIG. 7 , which is a schematic diagram of an application scenario of software refresh rate setting provided by an embodiment of the present application. As shown in (a) of FIG. 7 , it is the setting interface 20 of the application A. The setting interface 20 includes a selection control 201 and software refresh rate selection information 202 . As shown in the setting interface 20, the selection control 201 at the "60Hz" position of the software refresh rate selection information 202 is in the selected state, indicating that the software refresh rate of the current application A is 60Hz. The user can adjust the software refresh rate of the application A through user operations on the setting interface 20 . For example, when the user clicks/touches the selection control 201 at the "90Hz" position of the software refresh rate information 202, the electronic device displays an interface 21 as shown in (b) in FIG. The software refresh rate is set to 90Hz. The software refresh rate can be set by the user as shown in Figure 7, or can be set by the developer in the configuration file of the application.
在另一些实施例中,当电子设备开启软件刷新率调整方式时,电子设备可以根据当前屏幕的亮度,环境光的亮度,前台运行的应用类型,用户的操作类型,环境光变暗前电子设备的状态等信息,综合判断如何调节软件刷新率和硬件刷新率。例如,当用户在暗光调节下首次操作电子设备,电子设备可以把软件刷新率和硬件刷新率都调节到高刷新率,例如120Hz。一段时间后,电子设备检测到用户没有操作,可以维持硬件刷新率在120Hz不变,同时将软件刷新率降为60Hz。或者,当用户在暗光调节下观看视频时,电子设备可以将软件刷新率调整至120Hz。当电子设备检测到前台运行的应用是通讯软件,可以将软件刷新率调整至60Hz,以节省功耗。In some other embodiments, when the electronic device enables the software refresh rate adjustment mode, the electronic device can adjust the brightness of the electronic device according to the brightness of the current screen, the brightness of the ambient light, the application type running in the foreground, the user's operation type, and the brightness of the electronic device before the ambient light is dimmed. status and other information, comprehensively judge how to adjust the software refresh rate and hardware refresh rate. For example, when the user operates the electronic device for the first time under low-light adjustment, the electronic device may adjust both the software refresh rate and the hardware refresh rate to a high refresh rate, such as 120 Hz. After a period of time, the electronic device detects that the user has not operated, and can maintain the hardware refresh rate at 120Hz, while reducing the software refresh rate to 60Hz. Alternatively, the electronic device can adjust the software refresh rate to 120Hz when the user watches video in dimmed conditions. When the electronic device detects that the application running in the foreground is communication software, it can adjust the refresh rate of the software to 60 Hz to save power consumption.
在切换软件刷新率的一些应用场景中,当电子设备开启智能刷新率调整和软件刷新率调整方案时,可能存在短时间内切换多次软件刷新率的情况。In some application scenarios where the software refresh rate is switched, when the electronic device enables the smart refresh rate adjustment and software refresh rate adjustment schemes, there may be situations where the software refresh rate is switched multiple times in a short period of time.
示例性的,参见图8,是本申请实施例提供的应用切换的场景示意图。如图8中的(a)所示,为电子设备的主界面30。主界面30可以包括状态栏301、应用图标302和导航栏303。状态栏301可以包括时间、WI-FI图标、信号强度和当前剩余电量等信息。应用图标302可以包括视频应用图标、支付应用图标、相机应用图标、短信图标、设置图标、图库图标、电话图标、浏览器图标和电子邮件图标等。导航栏303可以包括返回按键3031、主界面(home screen)按键3032和呼出任务历史按键3033等系统导航键。其中,主界面为电子设备100在任何一个用户界面检测到作用于主界面按键 3032的用户操作后显示的界面。当检测到用户点击返回按键3031时,电子设备可显示当前用户界面的上一个用户界面。当检测到用户点击主界面按键3032时,电子设备可显示主界面30。当检测到用户点击呼出任务历史按键3033时,电子设备可显示用户最近打开过的应用。For example, refer to FIG. 8 , which is a schematic diagram of an application switching scenario provided by an embodiment of the present application. As shown in (a) of FIG. 8 , it is the main interface 30 of the electronic device. The main interface 30 may include a status bar 301 , application icons 302 and a navigation bar 303 . The status bar 301 may include information such as time, WI-FI icon, signal strength, and current remaining power. The application icon 302 may include a video application icon, a payment application icon, a camera application icon, a text message icon, a setting icon, a gallery icon, a phone icon, a browser icon, an email icon, and the like. The navigation bar 303 may include system navigation keys such as a return button 3031, a home screen button 3032, and an outgoing task history button 3033. Wherein, the main interface is the interface displayed by the electronic device 100 after any user interface detects a user operation acting on the main interface button 3032. When detecting that the user clicks the return button 3031, the electronic device may display a previous user interface of the current user interface. When detecting that the user clicks the home interface button 3032 , the electronic device can display the home interface 30 . When detecting that the user clicks the call out task history button 3033, the electronic device may display the applications that the user has recently opened.
用户可在主屏幕界面30上通过用户操作进入应用界面。例如,当用户点击主界面30中的视频应用图标时,电子设备跳转到如图8中的(b)所示的应用界面31。应用界面31可以包括搜索栏311和视频预览图312。当用户点击其中一个需要付费的视频预览图312时,电子设备跳转到如图8中的(c)所示的视频界面32。视频界面32可以包括视频播放框321和支付控件322。当用户点击/触碰支付控件322时,电子设备切换到支付应用、并跳转到如图8中的(d)所示的支付应用的支付界面33。支付界面33可以包括支付信息331和确认控件332。当用户点击/触碰确认控件332时,电子设备进行支付任务、并在支付成功后跳转到如图8中的(e)所示的支付完成界面34。支付完成界面34可以包括支付完成标记341和页面跳转计时标记342。如图8中的(e)所示,页面跳转计时标记342中显示“10s后自动跳转”。当计时达到10s时,电子设备切换回视频应用、并跳转到如图8中的(f)所示的视频界面35。视频界面35中可以包括视频播放画面351和视频播放控件区域352。The user can enter the application interface through user operations on the main screen interface 30 . For example, when the user clicks the video application icon in the main interface 30, the electronic device jumps to the application interface 31 as shown in (b) in FIG. 8 . The application interface 31 may include a search bar 311 and a video preview 312 . When the user clicks one of the paid video preview images 312, the electronic device jumps to the video interface 32 as shown in (c) in FIG. 8 . The video interface 32 may include a video play box 321 and a payment control 322 . When the user clicks/touches the payment control 322, the electronic device switches to the payment application and jumps to the payment interface 33 of the payment application as shown in (d) of FIG. 8 . The payment interface 33 may include payment information 331 and a confirmation control 332 . When the user clicks/touches the confirmation control 332, the electronic device performs the payment task, and jumps to the payment completion interface 34 shown in (e) in FIG. 8 after the payment is successful. The payment completion interface 34 may include a payment completion mark 341 and a page jump timing mark 342 . As shown in (e) in FIG. 8 , the page jump timing mark 342 displays "automatic jump after 10s". When the timing reaches 10s, the electronic device switches back to the video application and jumps to the video interface 35 shown in (f) in FIG. 8 . The video interface 35 may include a video playing screen 351 and a video playing control area 352 .
图8所示应用场景中,为了保证用户的使用体验,当检测到用户打开视频应用,会将软件刷新率提高或者维持在高刷新率,例如120Hz。而针对一些画面变化较少的场景,例如支付界面,电子设备可以将软件刷新率调整至低刷新率,例如60Hz。因此,先由视频应用切换到支付应用,再由支付应用切换到视频应用。该过程中,共切换了两次软件刷新率。频繁的切换软件刷新率对电子设备的性能和功耗会产生一定的影响,进而影响用户体验。为了解决上述问题,本申请实施例提供了一种软件刷新率的切换方法。下面对该方法进行介绍。In the application scenario shown in Figure 8, in order to ensure the user experience, when it is detected that the user opens the video application, the software refresh rate will be increased or maintained at a high refresh rate, such as 120Hz. For some scenes with few screen changes, such as the payment interface, the electronic device can adjust the software refresh rate to a low refresh rate, such as 60Hz. Therefore, the video application is switched to the payment application first, and then the payment application is switched to the video application. During this process, the software refresh rate was switched twice. Frequent switching of the software refresh rate will have a certain impact on the performance and power consumption of the electronic device, thereby affecting the user experience. In order to solve the above problem, an embodiment of the present application provides a method for switching a software refresh rate. The method is introduced below.
参见图9,是本申请实施例提供的软件刷新率的切换方法的流程示意图。如图9所示,软件刷新率的切换方法可以包括S901-S903,具体步骤如下所述。Referring to FIG. 9 , it is a schematic flowchart of a method for switching a software refresh rate provided by an embodiment of the present application. As shown in FIG. 9 , the method for switching the software refresh rate may include S901-S903, and the specific steps are as follows.
S901,当检测到由第一应用到第二应用的切换指令时,电子设备由第一应用跳转到第二应用。S901. When detecting a switching instruction from a first application to a second application, the electronic device jumps from the first application to the second application.
本申请实施例中的第一应用和第二应用可以指代不同的应用程序。其中,第一应用可以指代电子设备当前在前台运行的应用,第二应用可以指代电子设备即将跳转到的目标应用。The first application and the second application in this embodiment of the present application may refer to different application programs. Wherein, the first application may refer to an application currently running in the foreground of the electronic device, and the second application may refer to a target application to which the electronic device will jump to.
电子设备由第一应用跳转到第二应用的方式,可以如上述图8实施例中的应用场景所示,通过第一应用中弹出的跳转窗口,直接跳转到第二应用。在图8所示应用场景中,电子设备进行了两次应用跳转。在第一次跳转中,第一应用为视频应用,第二应用为支付应用,通过用户点击/触碰视频应用中支付界面上的支付控件直接跳转到第二应用。在第二次跳转中,第一应用为支付应用,第二应用为视频应用,通过支付应用的支付完成界面直接跳转到第二应用。The manner in which the electronic device jumps from the first application to the second application can be directly to the second application through the jump window popped up in the first application as shown in the application scenario in the embodiment of FIG. 8 above. In the application scenario shown in FIG. 8, the electronic device performs two application jumps. In the first jump, the first application is a video application, and the second application is a payment application, and the user directly jumps to the second application by clicking/touching the payment control on the payment interface in the video application. In the second jump, the first application is a payment application, the second application is a video application, and the second application is directly jumped to through the payment completion interface of the payment application.
实际应用中,可能存在同一应用中的不同功能所需的软件刷新率不同的情况,可以为同一应用的不同功能设置不同的软件刷新率。因此,本申请实施例中的第一应用和第二应用也可以指代同一应用中的不同功能。In practical applications, different software refresh rates may be required for different functions in the same application, and different software refresh rates may be set for different functions of the same application. Therefore, the first application and the second application in the embodiment of the present application may also refer to different functions in the same application.
在一个应用场景中,参见图10,是本申请实施例提供的应用界面切换的场景示意图。如图10中的(a)所示,为聊天应用的应用界面40。应用界面40可以包括信息显示区域401、信息输入区域402。信息输入区域402中可以包括语音输入控件4021、文字输入框4022、表情输入控件4023和选项控件4024。In an application scenario, refer to FIG. 10 , which is a schematic diagram of an application interface switching scenario provided by an embodiment of the present application. As shown in (a) of FIG. 10 , it is an application interface 40 of a chat application. The application interface 40 may include an information display area 401 and an information input area 402 . The information input area 402 may include a voice input control 4021 , a text input box 4022 , an emoticon input control 4023 and an option control 4024 .
当用户点击/触碰选项控件4024时,电子设备跳转到如图10中的(b)所示的应用界面41。应用界面41中可以包括信息显示区域411、功能选择区域412。功能选择区域412中可以包括相册控件4121、拍摄控件4122、红包控件4123和视频控件4124。When the user clicks/touches the option control 4024, the electronic device jumps to the application interface 41 as shown in (b) in FIG. 10 . The application interface 41 may include an information display area 411 and a function selection area 412 . The function selection area 412 may include an album control 4121 , a shooting control 4122 , a red packet control 4123 and a video control 4124 .
当用户点击/触碰视频控件4124时,电子设备跳转到如图10中的(c)所示的视频聊天的应用界面42。应用界面42中可以包括视频显示框421、视频显示框422和视频挂断控件423。其中,视频显示框421和视频显示框422分别用于显示视频双方用户的视频图像。When the user clicks/touches the video control 4124, the electronic device jumps to the video chat application interface 42 as shown in (c) of FIG. 10 . The application interface 42 may include a video display frame 421 , a video display frame 422 and a video hangup control 423 . Wherein, the video display frame 421 and the video display frame 422 are respectively used to display the video images of the two video users.
由于视频聊天所需的软件刷新率高于文字聊天所需的软件刷新率,若由文字聊天转为视频聊天后,电子设备仍维持文字聊天的软件刷新率,将会影响视频聊天的清晰度。这种情况下,可以为聊天应用中的文字聊天功能和视频聊天功能设置不同的软件刷新率。在该应用场景中,第一应用为聊天应用中的文字聊天功能,第二应用为聊天应用中的视频聊天功能。Since the software refresh rate required for video chat is higher than that required for text chat, if the electronic device still maintains the software refresh rate for text chat after switching from text chat to video chat, it will affect the clarity of video chat. In this case, different software refresh rates may be set for the text chat function and the video chat function in the chat application. In this application scenario, the first application is a text chat function in the chat application, and the second application is a video chat function in the chat application.
S902,电子设备获取预设时长(即第一预设时长),并开始计时。S902. The electronic device acquires a preset duration (that is, a first preset duration), and starts timing.
预设时长可以是预先设定的。例如:为不同的应用设定不同的预设时长。The preset duration may be preset. For example: setting different preset durations for different applications.
预设时长还可以是由电子设备根据用户使用应用的历史数据生成的。如图13所示实施例中,电子设备从WMS获取历史数据,然后根据历史数据生成应用间切换数据,将应用间切换数据存储在数据库中(存储方式如图14所示),当开始执行软件刷新率的切换方法时,应用间软件刷新率模块从数据库中获取应用间切换数据,根据应用间切换数据获取第二应用的驻留时长,并根据第二应用的驻留时长生成预设时长。具体内容可参见下述实施例中的描述。The preset duration may also be generated by the electronic device according to the historical data of the user's use of the application. In the embodiment shown in Figure 13, the electronic device acquires historical data from the WMS, then generates inter-application switching data according to the historical data, and stores the inter-application switching data in the database (the storage method is shown in Figure 14), when the software starts to execute In the refresh rate switching method, the inter-application software refresh rate module obtains inter-application switching data from the database, obtains the residence time of the second application according to the inter-application switching data, and generates a preset time according to the residence time of the second application. For specific content, please refer to the description in the following embodiments.
S902中的计时用于记录电子设备的前台由第一应用切换到第二应用后、第二应用在前台运行的累计时长。当电子设备从第二应用跳转到其他应用时,电子设备停止计时。或者,当电子设备将软件刷新率切换至第二应用的软件刷新率时,电子设备停止计时。The timing in S902 is used to record the cumulative running time of the second application in the foreground after the foreground of the electronic device is switched from the first application to the second application. When the electronic device jumps from the second application to other applications, the electronic device stops timing. Or, when the electronic device switches the software refresh rate to the software refresh rate of the second application, the electronic device stops timing.
S903,电子设备根据预设时长进行软件刷新率的切换。S903. The electronic device switches the software refresh rate according to a preset time period.
作为本申请另一个实施例,图9所示的软件刷新率的切换方法中,步骤903可以由以下几种方式实现。As another embodiment of the present application, in the method for switching the software refresh rate shown in FIG. 9 , step 903 may be implemented in the following ways.
第一种实现方式,步骤903可以包括:In the first implementation manner, step 903 may include:
1-1、判断第二应用在前台的运行时间是否达到预设时长。1-1. Determine whether the running time of the second application in the foreground reaches a preset duration.
1-2、若第二应用在前台的运行时间达到预设时长,则电子设备由当前的软件刷新率切换至第二应用的软件刷新率,并停止计时。1-2. If the running time of the second application in the foreground reaches a preset duration, the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and stops timing.
1-3、若第二应用在前台的运行时间未达到预设时长,则电子设备维持当前的软件刷新率。1-3. If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the current software refresh rate.
步骤1-1至1-3应用到如图8所示的应用场景中,用户当前使用的应用是软件刷新率较高的视频软件,当用户将前台运行的视频软件切换为支付软件,电子设备可以 开始记录支付软件的前台运行时间。若支付软件的前台运行时间达到预设时长,则电子设备将软件刷新率切换为支付软件的软件刷新率。若支付软件的前台运行时间未超过预设时长,则电子设备维持视频软件的软件刷新率。Steps 1-1 to 1-3 are applied to the application scenario shown in Figure 8. The application currently used by the user is video software with a high software refresh rate. When the user switches the video software running in the foreground to payment software, the electronic device It is possible to start recording the foreground running time of the payment software. If the foreground running time of the payment software reaches a preset duration, the electronic device switches the software refresh rate to the software refresh rate of the payment software. If the foreground running time of the payment software does not exceed the preset duration, the electronic device maintains the software refresh rate of the video software.
由于应用内的应用界面的跳转动作通常由应用的服务器来监测,因此,步骤1-1至1-3应用到如图10所示的应用场景中,用户当前使用的是视频应用中的文字聊天功能,当用户切换至视频应用中的视频聊天功能,电子设备可以通过与视频应用的服务器进行通信交互、来监测用户使用视频聊天功能的累计时长。若用户使用视频聊天功能的累计时长达到预设时长,则电子设备将软件刷新率切换为视频聊天功能的软件刷新率。若用户使用视频聊天功能的累计时长未达到预设时长,则电子设备维持文字聊天功能的软件刷新率。Since the jump action of the application interface in the application is usually monitored by the application server, steps 1-1 to 1-3 are applied to the application scenario shown in Figure 10, and the user is currently using the text in the video application Chatting function, when the user switches to the video chatting function in the video application, the electronic device can communicate and interact with the server of the video application to monitor the accumulated time of the user using the video chatting function. If the accumulative duration of the user using the video chat function reaches a preset duration, the electronic device switches the software refresh rate to the software refresh rate of the video chat function. If the accumulated time of the user using the video chat function does not reach the preset time, the electronic device maintains the software refresh rate of the text chat function.
上述实现方式中,当第二应用在前台的运行时间达到预设时长时,再切换软件刷新率,而非在电子设备从第一应用跳转到第二应用时切换软件刷新率,避免了用户在第二应用停留时间较短的情况下频繁地切换软件刷新率,有效降低了软件刷新率的切换频率,从而有效降低了电子设备的功耗。In the above implementation, when the running time of the second application in the foreground reaches the preset duration, the software refresh rate is switched instead of switching the software refresh rate when the electronic device jumps from the first application to the second application, which avoids the user Frequently switching the software refresh rate when the second application stays for a short time effectively reduces the switching frequency of the software refresh rate, thereby effectively reducing the power consumption of the electronic device.
第二种实现方式,步骤903可以包括:In the second implementation manner, step 903 may include:
2-1、根据第一软件刷新率、第二软件刷新率、以及预设时长进行软件刷新率的切换。其中,第一软件刷新率为第一应用的软件刷新率,第二软件刷新率为第二应用的软件刷新率。2-1. The software refresh rate is switched according to the first software refresh rate, the second software refresh rate, and the preset duration. Wherein, the first software refresh rate is the software refresh rate of the first application, and the second software refresh rate is the software refresh rate of the second application.
在第二种实现方式中,可以先判断第一软件刷新率和第二软件刷新率的高低,然后根据第一软件刷新率和第二软件刷新率的高低、分情况进行软件刷新率的切换。In the second implementation, the first software refresh rate and the second software refresh rate can be judged first, and then the software refresh rate can be switched according to the first software refresh rate and the second software refresh rate, depending on the situation.
可选的,步骤2-1可以包括以下步骤:Optionally, step 2-1 may include the following steps:
2-1-1、判断第一软件刷新率是否高于第二软件刷新率。2-1-1. Determine whether the refresh rate of the first software is higher than the refresh rate of the second software.
若第一软件刷新率等于第二软件刷新率,则执行2-1-7,即无需切换软件刷新率。If the first software refresh rate is equal to the second software refresh rate, perform 2-1-7, that is, there is no need to switch the software refresh rate.
2-1-2、若第一软件刷新率高于第二软件刷新率,则判断第二应用在前台的运行时间是否达到预设时长。2-1-2. If the refresh rate of the first software is higher than the refresh rate of the second software, it is judged whether the running time of the second application in the foreground reaches the preset duration.
2-1-3、若第二应用在前台的运行时间达到预设时长,则电子设备由当前的软件刷新率切换至第二应用的软件刷新率,并执行2-1-7。2-1-3. If the running time of the second application in the foreground reaches the preset duration, the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and executes 2-1-7.
若第二应用在前台的运行时间未达到预设时长,则电子设备维持当前的软件刷新率。If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the current software refresh rate.
步骤2-1-2至2-1-3所示的为第一软件刷新率高于第二软件刷新率的情况。该情况下,2-1-2至2-1-3与上述第一种实现方式中的步骤1-1到1-3相同,具体可参见步骤1-1到1-3的描述,在此不再赘述。Steps 2-1-2 to 2-1-3 show the situation that the first software refresh rate is higher than the second software refresh rate. In this case, 2-1-2 to 2-1-3 are the same as steps 1-1 to 1-3 in the above-mentioned first implementation mode, for details, please refer to the description of steps 1-1 to 1-3, here No longer.
2-1-4、若第一软件刷新率低于第二软件刷新率,则电子设备由当前的软件刷新率切换至第三软件刷新率。2-1-4. If the first software refresh rate is lower than the second software refresh rate, the electronic device switches from the current software refresh rate to the third software refresh rate.
2-1-5、判断第二应用在前台的运行时间是否达到预设时长。2-1-5. Determine whether the running time of the second application in the foreground reaches a preset duration.
2-1-6、若第二应用在前台的运行时间达到预设时长,则电子设备由第三软件刷新率切换至第二软件刷新率,并执行2-1-7。2-1-6. If the running time of the second application in the foreground reaches the preset duration, the electronic device switches from the third software refresh rate to the second software refresh rate, and executes 2-1-7.
若第二应用在前台的运行时间未达到预设时长,则电子设备维持在第三软件刷新率。If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the third software refresh rate.
2-1-7、停止计时。2-1-7. Stop timing.
步骤2-1-4至2-1-6所示的为第一软件刷新率低于第二软件刷新率的情况。该情况中的第三软件刷新率可以设置为介于第一软件刷新率和第二软件刷新率之间的某个数值。如第三软件刷新率=(第一软件刷新率+第二软件刷新率)/M。示例性的,当M=2时,第三软件刷新率=(第一软件刷新率+第二软件刷新率)/2。Steps 2-1-4 to 2-1-6 show the situation that the first software refresh rate is lower than the second software refresh rate. The third software refresh rate in this case can be set to a value between the first software refresh rate and the second software refresh rate. For example, the third software refresh rate=(first software refresh rate+second software refresh rate)/M. Exemplarily, when M=2, the third software refresh rate=(first software refresh rate+second software refresh rate)/2.
如上所述的第三软件刷新率可以应用在如图8所示的应用场景中。用户当前使用的应用是软件刷新率较低的支付软件(假设支付软件的软件刷新率为60Hz),当用户将前台运行的支付软件切换为视频软件(假设视频软件的软件刷新率为120Hz),电子设备可以将软件刷新率切换至90Hz,并开始记录视频软件的前台运行时间。若视频软件的前台运行时间达到预设时长,则可以将软件刷新率切换为视频软件的软件刷新率120Hz。若视频软件的前台运行时间未超过预设时长,则电子设备维持软件刷新率90Hz。The above-mentioned third software refresh rate can be applied in the application scenario shown in FIG. 8 . The application currently used by the user is a payment software with a low software refresh rate (assuming that the software refresh rate of the payment software is 60Hz), when the user switches the payment software running in the foreground to a video software (assuming that the software refresh rate of the video software is 120Hz), The electronic device can switch the software refresh rate to 90Hz and start recording the foreground running time of the video software. If the foreground running time of the video software reaches the preset duration, the software refresh rate can be switched to 120Hz for the video software. If the foreground running time of the video software does not exceed the preset duration, the electronic device maintains a software refresh rate of 90 Hz.
如上所述的第三软件刷新率还可以应用在如图10所示的应用场景中,用户当前使用的是聊天应用中的文字聊天功能(假设文字聊天功能的软件刷新率为60Hz),当用户切换至聊天应用中的视频聊天功能(假设视频聊天功能的软件刷新率为120Hz),电子设备可以将软件刷新率切换至75Hz,并开始与聊天应用的服务器进行通信交互、以监测用户使用视频聊天功能的累计时长。若用户使用视频聊天功能的累计时长达到预设时长,则电子设备将软件刷新率切换为120Hz。若用户使用视频聊天功能的累计时长未达到预设时长,则电子设备维持75Hz。The above-mentioned third software refresh rate can also be applied in the application scenario shown in FIG. Switch to the video chat function in the chat application (assuming that the software refresh rate of the video chat function is 120Hz), the electronic device can switch the software refresh rate to 75Hz, and start communicating with the server of the chat application to monitor the user's use of video chat The cumulative duration of the function. If the accumulated time of the user using the video chat function reaches a preset time, the electronic device will switch the software refresh rate to 120Hz. If the accumulated time of the user using the video chat function does not reach the preset time, the electronic device will maintain 75Hz.
第二种实现方式,相当于在步骤1-1之前,增加了对应用的软件刷新率的判断过程。通过第二种实现方式,在第一软件刷新率低于第二软件刷新率的情况下,当切换到高软件刷新率的第二应用,电子设备先将软件刷新率切换至介于第一软件刷新率和第二软件刷新率之间的第三软件刷新率,跳转到第二应用后的累计时长达到第二应用的预设时长时,再切换至较高的软件刷新率,这样既能保证用户的观感体验较为流畅,同时又尽量地降低了软件刷新率,进而有效降低了电子设备的功耗。The second implementation is equivalent to adding a process of judging the software refresh rate of the application before step 1-1. Through the second implementation, when the first software refresh rate is lower than the second software refresh rate, when switching to the second application with a high software refresh rate, the electronic device first switches the software refresh rate to a value between the first software refresh rate and the first software refresh rate. The third software refresh rate between the refresh rate and the second software refresh rate, when the accumulated time after jumping to the second application reaches the preset time of the second application, then switch to a higher software refresh rate, so that both This ensures a smooth user experience, and at the same time reduces the refresh rate of the software as much as possible, thereby effectively reducing the power consumption of electronic devices.
第三种实现方式,步骤903可以包括:In a third implementation manner, step 903 may include:
3-1、获取第一应用的驻留时长和第二应用的驻留时长。3-1. Obtain the dwell duration of the first application and the dwell duration of the second application.
第一应用的驻留时长和第二应用的驻留时长可以是根据用户使用第一应用和第二应用的历史数据获取到的。如图13所示,应用间软件刷新率模块从WMS中获取用户使用第一应用和第二应用的历史数据,根据这些历史数据生成应用间切换数据,并以如图14所示的存储形式存储于数据库中。当开始执行软件刷新率的切换方法时,应用间软件刷新率模块从数据库中获取应用间切换数据,从应用间切换数据中获取第一应用的驻留时长和第二应用的驻留时长。具体的应用的驻留时长的获取方法可参见后续实施例中的描述。The dwell duration of the first application and the dwell duration of the second application may be obtained according to historical data of the user using the first application and the second application. As shown in Figure 13, the inter-application software refresh rate module obtains the historical data of the user's use of the first application and the second application from the WMS, generates inter-application switching data according to these historical data, and stores them in the storage form shown in Figure 14 in the database. When starting to execute the software refresh rate switching method, the inter-application software refresh rate module obtains inter-application switching data from the database, and obtains the dwell time of the first application and the dwell time of the second application from the inter-application switching data. For a specific method for acquiring the dwell time of an application, refer to the description in the subsequent embodiments.
3-2、根据第一应用的驻留时长、第二应用的驻留时长、第一软件刷新率、第二软件刷新率、以及预设时长进行软件刷新率的切换。3-2. The software refresh rate is switched according to the dwell duration of the first application, the dwell duration of the second application, the first software refresh rate, the second software refresh rate, and the preset duration.
在第三种实现方式中,可以先判断第一应用的驻留时长和第二应用的驻留时长的时长长短,再根据时长长短分情况进行软件刷新率的切换。In the third implementation manner, the duration of the first application and the second application may be judged first, and then the software refresh rate may be switched according to the duration.
可选的,步骤3-2可以包括以下步骤:Optionally, step 3-2 may include the following steps:
3-2-1、判断第一应用的驻留时长是否大于第二应用的驻留时长。3-2-1. Determine whether the dwell time of the first application is greater than the dwell time of the second application.
3-2-2、若第一应用的驻留时长小于第二应用的驻留时长,则电子设备将软件刷新率切换至第二软件刷新率。3-2-2. If the dwell time of the first application is less than the dwell time of the second application, the electronic device switches the software refresh rate to the second software refresh rate.
3-2-3、若第一应用的驻留时长大于第二应用的驻留时长,则执行步骤2-1-1至2-1-7。3-2-3. If the residence time of the first application is longer than that of the second application, perform steps 2-1-1 to 2-1-7.
若第一应用的驻留时长等于第二应用的驻留时长,可以按照3-2-2执行,也可以按照3-2-3执行。If the resident duration of the first application is equal to the resident duration of the second application, it can be executed according to 3-2-2 or 3-2-3.
第三种实现方式,相当于在第二种实现方式的步骤2-1-1至2-1-7之前,增加了对应用的驻留时长的判断过程。在第三种实现方式中,应用的驻留时长可以是根据用户使用应用的历史数据获得的。因此,将应用的驻留时长作为软件刷新率切换的判断条件,相当于根据用户使用应用的习惯执行软件刷新率的切换。通过这种方法,能够根据用户的使用习惯灵活调整软件刷新率的切换策略,有效提高了方法的适应性,进而提升了用户体验。The third implementation is equivalent to adding a process of judging the residence time of the application before steps 2-1-1 to 2-1-7 of the second implementation. In the third implementation manner, the residence time of the application may be obtained according to the historical data of the application used by the user. Therefore, taking the residence time of the application as the judgment condition for switching the software refresh rate is equivalent to switching the software refresh rate according to the user's habit of using the application. Through this method, the switching strategy of the software refresh rate can be flexibly adjusted according to the user's usage habits, which effectively improves the adaptability of the method and further improves the user experience.
参见图11,图11是本申请实施例提供的另一种软件刷新率的切换方法的流程示意图。如图11所示,该方法可以包括以下步骤:Referring to FIG. 11 , FIG. 11 is a schematic flowchart of another method for switching a software refresh rate provided by an embodiment of the present application. As shown in Figure 11, the method may include the following steps:
S111,判断是否检测到电子设备的显示屏/环境处于暗光状态。S111. Determine whether it is detected that the display screen/environment of the electronic device is in a dark state.
若未检测到电子设备的显示屏/环境处于暗光状态,则电子设备继续检测暗光状态。If it is not detected that the display screen/environment of the electronic device is in a dark state, the electronic device continues to detect the dark state.
S112,若检测到电子设备的显示屏/环境处于暗光状态,则电子设备执行软件刷新率的切换方法。S112. If it is detected that the display screen/environment of the electronic device is in a dark state, the electronic device executes a software refresh rate switching method.
S113,当确定需要切换应用时,电子设备进行应用切换。S113. When it is determined that applications need to be switched, the electronic device performs application switching.
S114,电子设备获取预设时长,并开始计时。S114. The electronic device acquires the preset time duration and starts timing.
S115,电子设备根据预设时长进行软件刷新率的切换。S115, the electronic device switches the software refresh rate according to a preset time period.
上述S113-S115与S901-S903相同,具体可参见S901-S903中的描述,在此不再赘述。需要说明的是,S115可以采用S903所述的几种实现方式中的任意一种。The foregoing S113-S115 are the same as S901-S903, for details, please refer to the description in S901-S903, which will not be repeated here. It should be noted that S115 may adopt any one of the several implementation manners described in S903.
与电子设备的显示屏/环境处于亮光状态相比,当电子设备的显示屏/环境处于暗光状态时,切换软件刷新率更容易给用户造成闪高亮、显示掉帧的感观体验。为了解决该问题,在图11所示实施例中,设置软件刷新率的切换方法的启动条件,即当检测到电子设备的显示屏/环境处于暗光状态时,开始执行软件刷新率的切换方法。通过本申请实施例中的方法,能够有效避免暗光状态下由于切换软件刷新率而造成的闪高亮、显示掉帧的情况。Compared with the display/environment of the electronic device in the bright state, when the display/environment of the electronic device is in the dark state, switching the software refresh rate is more likely to cause the user a sensory experience of flickering and display frame drop. In order to solve this problem, in the embodiment shown in Figure 11, the starting condition of the switching method of the software refresh rate is set, that is, when the display screen/environment of the electronic device is detected to be in a dark state, the switching method of the software refresh rate is started . Through the method in the embodiment of the present application, it is possible to effectively avoid flickering and highlighting and display frame drop caused by switching the software refresh rate in a dark state.
作为本申请的另一个实施例,若S115采用S903中的第三种实现方式,即根据第一应用的驻留时长、第二应用的驻留时长、第一软件刷新率、第二软件刷新率和预设时长进行软件刷新率的切换。如步骤3-1所述,应用的驻留时长可以根据一些相关的应用驻留时长数据(如应用间切换数据)获得。因此,电子设备需要预先加载应用驻留时长数据,然后根据应用驻留时长数据获取第一应用的驻留时长和第二应用的驻留时长。具体可参见图12所示实施例。As another embodiment of this application, if S115 adopts the third implementation method in S903, that is, according to the dwell time of the first application, the dwell time of the second application, the first software refresh rate, and the second software refresh rate Switch the software refresh rate with the preset duration. As described in step 3-1, the dwell time of the application can be obtained according to some relevant data of the dwell time of the application (such as switching data between applications). Therefore, the electronic device needs to preload the data of the dwell time of the application, and then obtain the dwell time of the first application and the dwell time of the second application according to the data of the dwell time of the application. For details, refer to the embodiment shown in FIG. 12 .
参见图12,是本申请实施例提供的另一种软件刷新率的切换方法的流程示意图,如图12所示,该方法可以包括以下步骤:Referring to FIG. 12 , it is a schematic flowchart of another software refresh rate switching method provided in the embodiment of the present application. As shown in FIG. 12 , the method may include the following steps:
S121,判断是否检测到电子设备的显示屏/环境处于暗光状态。S121. Determine whether it is detected that the display screen/environment of the electronic device is in a dark state.
S122,若检测到电子设备的显示屏/环境处于暗光状态,则电子设备执行软件刷新率的切换方法。S122. If it is detected that the display screen/environment of the electronic device is in a dark state, the electronic device executes a software refresh rate switching method.
S123,加载应用驻留时长数据。S123. Load the application residence time data.
本申请实施例中的应用驻留时长数据可以是应用间切换数据。如图13所示,由应用间软件刷新率切换模块从WMS获取用户使用应用的历史数据,根据历史数据生成的应用间切换数据。应用驻留时长数据可以如图14所示的存储形式存储于数据库中。当需要加载应用驻留时长数据时,应用间软件刷新率模块从数据库中获取应用驻留时长数据。The application residence time data in the embodiment of the present application may be switching data between applications. As shown in FIG. 13 , the inter-application software refresh rate switching module acquires historical data of the user's use of applications from the WMS, and generates inter-application switching data according to the historical data. The application residence time data can be stored in the database in the storage form shown in FIG. 14 . When the application residence time data needs to be loaded, the inter-application software refresh rate module obtains the application residence time data from the database.
S124,当确定需要切换应用时,电子设备进行应用切换。S124. When it is determined that applications need to be switched, the electronic device performs application switching.
步骤124与步骤901相同,具体可参照S901的描述。Step 124 is the same as step 901, for details, refer to the description of S901.
S125,电子设备获取预设时长、第一应用的驻留时长和第二应用的驻留时长,并开始计时。S125. The electronic device acquires the preset duration, the dwell duration of the first application, and the dwell duration of the second application, and starts timing.
步骤125中电子设备获取预设时长的步骤与S902相同,具体可参照S902中的描述。步骤125中的第一应用的驻留时长和第二应用的驻留时长可以根据3-1中描述的方式从S123加载的应用驻留时长数据获得。The step of obtaining the preset duration by the electronic device in step 125 is the same as that of S902, and the description in S902 may be referred to for details. The dwell duration of the first application and the dwell duration of the second application in step 125 can be obtained from the application dwell duration data loaded in S123 according to the manner described in 3-1.
S126,电子设备根据预设时长进行软件刷新率的切换。S126. The electronic device switches the software refresh rate according to a preset time period.
在本申请实施例中,S126采用S903中的第三种实现方式,具体的,S126可以包括以下步骤:In the embodiment of the present application, S126 adopts the third implementation method in S903. Specifically, S126 may include the following steps:
4-1、判断第一应用的驻留时长是否大于第二应用的驻留时长。4-1. Determine whether the dwell time of the first application is greater than the dwell time of the second application.
4-2、若第一应用的驻留时长小于第二应用的驻留时长,则电子设备将软件刷新率切换至第二软件刷新率。4-2. If the dwell time of the first application is less than the dwell time of the second application, the electronic device switches the software refresh rate to the second software refresh rate.
4-3、若第一应用的驻留时长大于第二应用的驻留时长,则判断第一软件刷新率是否高于第二软件刷新率。4-3. If the dwell time of the first application is longer than the dwell time of the second application, it is judged whether the refresh rate of the first software is higher than the refresh rate of the second software.
若第一软件刷新率等于第二软件刷新率,则执行4-9,即无需切换软件刷新率。If the first software refresh rate is equal to the second software refresh rate, execute 4-9, that is, there is no need to switch the software refresh rate.
4-4、若第一软件刷新率高于第二软件刷新率,则判断第二应用在前台的运行时间是否达到预设时长。4-4. If the refresh rate of the first software is higher than the refresh rate of the second software, it is judged whether the running time of the second application in the foreground reaches a preset duration.
4-5、若第二应用在前台的运行时间达到预设时长,则电子设备由当前的软件刷新率切换至第二应用的软件刷新率,并执行4-9。4-5. If the running time of the second application in the foreground reaches the preset duration, the electronic device switches from the current software refresh rate to the software refresh rate of the second application, and executes 4-9.
若第二应用在前台的运行时间未达到预设时长,则电子设备维持当前的软件刷新率。If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the current software refresh rate.
4-6、若第一软件刷新率低于第二软件刷新率,则电子设备由当前的软件刷新率切换至第三软件刷新率。4-6. If the first software refresh rate is lower than the second software refresh rate, the electronic device switches from the current software refresh rate to the third software refresh rate.
4-7、判断第二应用在前台的运行时间是否达到预设时长。4-7. Judging whether the running time of the second application in the foreground reaches a preset duration.
4-8、若第二应用在前台的运行时间达到预设时长,则电子设备由第三软件刷新率切换至第二软件刷新率,并执行4-9。4-8. If the running time of the second application in the foreground reaches a preset duration, the electronic device switches from the third software refresh rate to the second software refresh rate, and executes 4-9.
若第二应用在前台的运行时间未达到预设时长,则电子设备维持在第三软件刷新率。If the running time of the second application in the foreground does not reach the preset duration, the electronic device maintains the third software refresh rate.
4-9、停止计时。4-9. Stop timing.
步骤4-1至4-9与步骤3-2-1至3-2-3相同,具体可参见步骤3-2-1至3-2-3中的描述。Steps 4-1 to 4-9 are the same as steps 3-2-1 to 3-2-3, for details, please refer to the description in steps 3-2-1 to 3-2-3.
如上所述,本申请实施例S123中加载的应用驻留时长数据可以是应用间切换数据, 应用间切换数据可以是电子设备根据用户使用应用的历史数据生成的。As mentioned above, the application residence time data loaded in S123 in the embodiment of the present application may be inter-application switching data, and the inter-application switching data may be generated by the electronic device according to the historical data of the user using the application.
示例性的,电子设备可以通过抓取用户使用应用的后台数据的方式来获得历史数据。以Android系统为例,该系统中包括窗口管理服务(Window Manager Service,WMS),这项系统服务负责管理系统中所有窗口的显示(例如,为窗口分配界面,管理各界面的显示顺序、尺寸和位置,管理窗口动画等),通过WMS可以获取系统中所有窗口的状态和信息。由于用户使用应用时,必然会打开/关闭应用的窗口,因此,可以通过WMS获取应用窗口的状态和信息,来获取用户使用应用的历史数据。Exemplarily, the electronic device can obtain historical data by capturing the background data of the application used by the user. Taking the Android system as an example, the system includes a window management service (Window Manager Service, WMS), which is responsible for managing the display of all windows in the system (for example, assigning interfaces to windows, managing the display order, size and position, manage window animation, etc.), the status and information of all windows in the system can be obtained through WMS. Since the user will inevitably open/close the window of the application when using the application, the status and information of the application window can be obtained through the WMS to obtain the historical data of the application used by the user.
为了便于存储和管理,电子设备可以将获取到的零散的历史数据整理为有序的应用间切换数据,将应用间切换数据作为应用驻留时长数据。相应的,S123中加载的应用驻留时长数据可以是应用间切换数据。应用间切换数据中可以包括用于表示两个应用之间的切换关系、以及应用的驻留时长。这样,在S123加载应用间切换数据后,S125可以从应用间切换数据中获取第一应用的驻留时长和第二应用的驻留时长。In order to facilitate storage and management, the electronic device can organize the acquired scattered historical data into orderly inter-application switching data, and use the inter-application switching data as application residence time data. Correspondingly, the application residence time data loaded in S123 may be inter-application switching data. The inter-application switching data may include a switch relationship between two applications and a residence time of the application. In this way, after S123 loads the inter-application switching data, S125 may obtain the dwell duration of the first application and the dwell duration of the second application from the inter-application switching data.
实际应用中,可以由一个功能模块来实现本申请实施例所述的软件刷新率的切换方法。In practical applications, the software refresh rate switching method described in the embodiment of the present application may be implemented by a functional module.
参见图13,是本申请实施例提供的模块关系的交互示意图。如图13所示,应用间软件刷新率模块负责实现软件刷新率的切换方法。在实现过程中,应用间软件刷新率模块向WMS发送请求,WMS接收到请求后、将用户使用应用的历史数据返回给应用间软件刷新率模块。应用间软件刷新率模块根据历史数据生成应用间切换数据,并将应用间切换数据存储到数据库中。当应用间软件刷新率模块接收到两个应用间的切换指令后,从数据库中读取、加载应用间切换数据,并根据应用间切换数据获取应用的驻留时长。Referring to FIG. 13 , it is a schematic diagram of interaction between modules provided by the embodiment of the present application. As shown in FIG. 13 , the inter-application software refresh rate module is responsible for realizing the switching method of the software refresh rate. During the implementation process, the inter-application software refresh rate module sends a request to the WMS, and the WMS returns the historical data of the user's use of the application to the inter-application software refresh rate module after receiving the request. The inter-application software refresh rate module generates inter-application switching data according to historical data, and stores the inter-application switching data in a database. When the inter-application software refresh rate module receives the switching instruction between two applications, it reads and loads the inter-application switching data from the database, and obtains the residence time of the application according to the inter-application switching data.
在图10所示应用场景中,应用界面的跳转发生在同一应用中。WMS通常负责打开/关闭应用时窗口的管理,而发生在应用内的应用界面的跳转动作通常由应用的服务器来监测。因此,在该情况下,电子设备可以通过与应用的服务器进行通信交互,来获取发生在应用内的历史数据。In the application scenario shown in FIG. 10 , the jump of the application interface occurs in the same application. The WMS is usually responsible for window management when opening/closing the application, and the jumping action of the application interface in the application is usually monitored by the application server. Therefore, in this case, the electronic device can acquire historical data that occurs within the application by communicating and interacting with the server of the application.
可选的,历史数据可以包括每个应用的双向切换数据或每个应用的单向切换数据。Optionally, the historical data may include bidirectional switching data of each application or unidirectional switching data of each application.
示例性的,每个应用的双向切换数据可以包括每个应用的切换源应用、切换目标应用和切换时刻,其中,切换时刻可以包括由切换源应用切换到当前应用的切进时刻、以及由当前应用切换到切换目标应用的切出时刻。例如,假设应用A的切换源应用为应用B,切换目标应用为应用C,切进时刻为10:00:00,切出时刻为10:05:00。该历史数据表示,用户在10:00:00由应用B切换至应用A,在10:05:00由应用A切换至应用C。Exemplarily, the two-way switching data of each application may include the switching source application, the switching target application and the switching time of each application, wherein the switching time may include the switching time from the switching source application to the current application, and the switching time from the switching source application to the current application. The cut-out moment when the application is switched to the switching target application. For example, suppose that the switching source application of application A is application B, the switching target application is application C, the switch-in time is 10:00:00, and the switch-out time is 10:05:00. The historical data indicates that the user switches from application B to application A at 10:00:00, and switches from application A to application C at 10:05:00.
示例性的,每个应用的单向切换数据可以包括每个应用的开始使用时间、切换目标应用和切出时刻。例如,假设应用A的开始使用时间为10:00:00,切换目标为应用B,切出时刻为10:05:00。该历史数据表示,用户在10:00:00开始使用应用A,在10:05:00由应用A切换至应用B。Exemplarily, the one-way switching data of each application may include the starting time of each application, the switching target application, and the switch-out time. For example, assume that the start time of application A is 10:00:00, the switch target is application B, and the cut-out time is 10:05:00. The historical data indicates that the user starts using application A at 10:00:00, and switches from application A to application B at 10:05:00.
示例性的,每个应用的单向切换数据可以包括每个应用的切换源应用、切进时刻和切出时刻。例如,假设应用A的切换源应用为B,切进时刻为10:00:00,切出时刻为10:05:00。该历史数据表示,用户在10:00:00由应用B切换至应用A,在10:05:00 由应用A切出至其他应用。Exemplarily, the unidirectional switching data of each application may include the switching source application, switch-in time and switch-out time of each application. For example, assuming that the switching source application of application A is B, the switch-in time is 10:00:00, and the switch-out time is 10:05:00. The historical data indicates that the user switched from application B to application A at 10:00:00, and switched out from application A to other applications at 10:05:00.
继续图13中的示例,WMS获取用户的历史数据后,可以将历史数据存储在与WMS通信连接的存储空间中。当应用间软件刷新率模块向WMS请求数据时,WMS从存储空间中获取历史数据、并将历史数据发送给应用间软件刷新率模块。Continuing with the example in FIG. 13 , after the WMS acquires the user's historical data, it may store the historical data in a storage space that is communicatively connected to the WMS. When the inter-application software refresh rate module requests data from the WMS, the WMS obtains historical data from the storage space and sends the historical data to the inter-application software refresh rate module.
电子设备可以定时更新存储空间中的历史数据。示例性的,当存储空间已满时,剔除存储时间较长的多条历史数据。例如:存储空间内可以存储100条历史数据。当已存入100条历史数据时,将最先存入的60条历史数据删除,腾出60条历史数据的空间,以供新获取的历史数据存入。The electronic device can periodically update the historical data in the storage space. Exemplarily, when the storage space is full, multiple pieces of historical data that have been stored for a long time are deleted. For example: 100 pieces of historical data can be stored in the storage space. When 100 pieces of historical data have been stored, the first 60 pieces of historical data stored will be deleted to free up space for 60 pieces of historical data for the newly acquired historical data to be stored.
根据历史数据生成应用间切换数据的过程,是将用户使用应用的零散记录数据整理为用于表示应用间切换关系的数据组的过程。生成的应用间切换数据可以包括多组切换关系。The process of generating inter-application switching data based on historical data is a process of organizing the scattered record data of users using applications into a data group used to represent the inter-application switching relationship. The generated inter-application switching data may include multiple sets of switching relationships.
可选的,每组切换关系可以为单向的切换关系。Optionally, each group of switching relationships may be a one-way switching relationship.
例如,每组切换关系可以包括切换源应用、切换目标应用和切换目标应用的驻留时长。示例性的,假设历史数据包括:应用A的切换源应用为应用B,切换目标应用为应用C,应用A的切进时刻为10:00:00,以及应用A的切出时刻为10:05:00。根据该历史数据生成的应用间切换数据包括一组单向的切换关系,即由应用B切换到应用A,应用A的驻留时长为5min。由于该历史数据中未包含应用B的切换目标应用和切进时间、以及应用C的切换目标应用和切出时间,因而无法生成关于应用B和应用C的切换关系。For example, each group of handover relationships may include the handover source application, the handover target application, and the dwell time of the handover target application. Exemplarily, it is assumed that the historical data includes: the switching source application of application A is application B, the switching target application is application C, the switch-in time of application A is 10:00:00, and the switch-out time of application A is 10:05 :00. The inter-application switching data generated according to the historical data includes a set of one-way switching relationships, that is, switching from application B to application A, and the residence time of application A is 5 minutes. Since the history data does not include the switching target application and switch-in time of application B, and the switching target application and switch-out time of application C, the switching relationship between application B and application C cannot be generated.
再例如,每组切换关系可以包括切换源应用、切换目标应用和切换源应用的驻留时长。示例性的,采用上述示例中历史数据的假设,根据该历史数据生成的应用间切换数据包括一组单向的切换关系,即由应用A切换到应用C,应用A的驻留时长为5min。由于该历史数据中未包含应用C的切出时间,因而无法生成关于应用C的切换关系。For another example, each group of handover relationships may include the residence time of the handover source application, the handover target application, and the handover source application. Exemplarily, using the assumption of historical data in the above example, the inter-application switching data generated according to the historical data includes a set of one-way switching relationships, that is, switching from application A to application C, and the dwell time of application A is 5 minutes. Since the switch-out time of application C is not included in the historical data, a switching relationship with respect to application C cannot be generated.
可选的,每组切换关系可以为双向的切换关系。Optionally, each group of switching relationships may be a bidirectional switching relationship.
例如,每组切换关系可以包括互为切换源应用/切换目标应用的两个应用以及两个应用各自的驻留时长。示例性的,假设历史数据包括:当切换源应用为应用B、切换目标应用为应用A时,应用A的切进时刻为10:00:00,应用A的切出时刻为10:05:00;当切换源应用为应用A、切换目标应用为应用B时,应用B的切进时刻为20:00:00;应用B的切出时刻为20:11:00。根据该历史数据生成的应用间切换数据包括一组双向的切换关系,即当由应用B切换到应用A时,应用A的驻留时长为5min;当由应用A切换到应用B时,应用B的驻留时长为11min。For example, each group of switching relationships may include two applications that are switching source applications/switching target applications and their respective dwell times. Exemplarily, it is assumed that the historical data include: when the switching source application is application B and the switching target application is application A, the switch-in time of application A is 10:00:00, and the switch-out time of application A is 10:05:00 ; When the switching source application is application A and the switching target application is application B, the switch-in time of application B is 20:00:00; the switch-out time of application B is 20:11:00. The inter-application switching data generated according to the historical data includes a set of bidirectional switching relationships, that is, when switching from application B to application A, the residence time of application A is 5 minutes; when switching from application A to application B, application B The residence time is 11 minutes.
由此,S125从应用间切换数据中获取第一应用的驻留时长和第二应用的驻留时长,可以包括:从应用间切换数据中获取包含第一应用和第二应用的切换关系,再从该切换关系中获取第一应用的驻留时长和第二应用的驻留时长。Thus, S125 acquiring the dwell duration of the first application and the dwell duration of the second application from the inter-application switching data may include: acquiring a switching relationship including the first application and the second application from the inter-application switching data, and then The dwell duration of the first application and the dwell duration of the second application are obtained from the switching relationship.
应用间切换数据有多种存储形式。参见图14,是本申请实施例提供的应用间切换数据的存储形式的示意图。There are various storage forms for switching data between applications. Referring to FIG. 14 , it is a schematic diagram of a storage form of inter-application switching data provided by an embodiment of the present application.
可选的,可以将应用间切换数据存储到电子表格(如Excel或Word中的表格等)中。Optionally, the inter-application switching data may be stored in a spreadsheet (such as a table in Excel or Word, etc.).
如图14中的(a)所示,Excel表中第一行中记录了应用间切换数据的属性(如图 中所示的“切换源应用”、“切换目标应用”和“切换目标应用的驻留时长”),第一行后的每一行数据表示一组切换关系。例如,第二行数据表示的一组切换关系中,切换源应用为应用A,切换目标应用为应用B,应用B的驻留时长为2min。As shown in (a) in Figure 14, the attributes of switching data between applications are recorded in the first row of the Excel table (as shown in the figure, "Switching source application", "Switching target application" and "Switching target application's Dwell time"), each row of data after the first row represents a set of switching relationships. For example, in a set of switching relationships represented by the second row of data, the switching source application is application A, the switching target application is application B, and the dwell time of application B is 2 minutes.
需要说明的是,上述示例只是电子表格的一种形式,并不用于做具体限定。实际应用中,可以按照数据生成时间的先后顺序记录数据,也可以按照切换源应用/切换目标应用的名称中首字母先后顺序记录数据,还可以按照切换目标应用/切换源应用的驻留时长的长短顺序记录数据。该存储形式中,应用间切换数据中每组切换关系为单向的切换关系。It should be noted that the above example is only a form of electronic form and is not intended to be specifically limited. In practical applications, the data can be recorded in the order of the data generation time, or in the order of the first letter of the name of the switching source application/switching target application, or according to the residence time of the switching target application/switching source application. Record data in long and short order. In this storage form, each set of switching relationships in the inter-application switching data is a one-way switching relationship.
可选的,还可以将应用间切换数据存储为一张有向图。有向图中包括顶点、与顶点相连的有向边以及有向边上的权值(表示有向边两端顶点之间的关联关系)。可以将应用间切换数据中的切换源应用和切换目标应用作为有向图中的顶点,将切换源应用到切换目标应用的方向作为有向边的方向,将应用间切换数据中切换目标应用的驻留时长作为有向图中有向边上的权值。Optionally, the switching data between applications can also be stored as a directed graph. The directed graph includes vertices, directed edges connected to the vertices, and weights on the directed edges (representing the relationship between the vertices at both ends of the directed edges). The switch source application and the switch target application in the inter-application handover data can be used as vertices in the directed graph, the direction from the handover source application to the handover target application can be used as the direction of the directed edge, and the handover target application in the inter-application handover data The dwell time is used as the weight on the directed edge in the directed graph.
如图14中的(b)所示,表示应用A的顶点141、表示应用B的顶点142、由顶点141指向顶点142的有向边143、以及有向边143上的权值2这几个要素构成了一组切换关系,该组切换关系表示由应用A切换到应用B、且在应用B的驻留时长为2min。如图14中的(b)所示,应用B和应用E之间不存在有向边,说明应用B和应用E之间未发生切换。该存储形式中,应用间切换数据中每组切换关系为双向的切换关系。As shown in (b) in Figure 14, the vertex 141 representing the application A, the vertex 142 representing the application B, the directed edge 143 from the vertex 141 to the vertex 142, and the weight 2 on the directed edge 143 The elements constitute a set of switching relationships, which means switching from application A to application B and staying in application B for 2 minutes. As shown in (b) in Figure 14, there is no directed edge between application B and application E, indicating that there is no switching between application B and application E. In this storage form, each set of switching relationships in the inter-application switching data is a bidirectional switching relationship.
如图13示例所述,应用间软件刷新率模块从WMS获取历史数据后,根据历史数据生成如图14所述的电子表格或有向图,然后将生成的电子表格或有向图存储在数据库中。应用间切换数据可以存储于电子设备的存储空间中,也可以存储于与电子设备通信连接的第三方数据库中。As shown in the example in Figure 13, after the inter-application software refresh rate module acquires historical data from the WMS, it generates a spreadsheet or a directed graph as shown in Figure 14 according to the historical data, and then stores the generated spreadsheet or directed graph in the database middle. The inter-application switching data may be stored in the storage space of the electronic device, or may be stored in a third-party database communicatively connected with the electronic device.
上述只是应用间切换数据的存储形式的示例,并不用于做具体限定。图14所示示例中,切换源应用的驻留时长是以分钟为单位记录的。实际应用中,切换源应用/切换目标应用的驻留时长还可以其他时间单位进行记录,如小时、天、年、月等。另外,在存储应用间切换数据时,可以将驻留时长统一为相同的时间单位,也可以不同的时间单位进行存储。例如,假设由应用E切换到应用B时,应用B的驻留时长为20h,由应用B切换到应用C时,应用C的驻留时长为1min。由于两个驻留时长的差值较大,如果将1min转换为小时,或者将20h转换为分钟,均较为繁琐。因此,这种情况下,可以将应用B的驻留时长存储为20h,将应用C的驻留时长存储为1min。The above is just an example of a storage form of switching data between applications, and is not intended to be specifically limited. In the example shown in FIG. 14 , the residence time of the switching source application is recorded in minutes. In practical applications, the residence time of the switching source application/switching target application can also be recorded in other time units, such as hours, days, years, months, and so on. In addition, when storing switching data between applications, the residence time can be unified into the same time unit, or can be stored in different time units. For example, suppose that when switching from application E to application B, the dwell time of application B is 20h, and when switching from application B to application C, the dwell time of application C is 1min. Due to the large difference between the two dwell times, it is cumbersome to convert 1min to hours or 20h to minutes. Therefore, in this case, the dwell duration of application B may be stored as 20h, and the dwell duration of application C may be stored as 1min.
在本申请另一个实施例中,电子设备可以定时更新应用间切换数据,可以采用以下几种更新方式:In another embodiment of the present application, the electronic device may regularly update the switching data between applications, and the following update methods may be used:
方式一、每隔预设更新周期,电子设备更新一次应用间切换数据。Method 1: The electronic device updates the inter-application switching data every preset update cycle.
例如:每隔1天,应用间软件刷新率模块向WMS发送一次请求;WMS将当前存储空间中的历史数据返回给应用间软件刷新率模块;应用间软件刷新率模块根据接收到的历史数据生成应用间切换数据,并将新生成的应用间切换数据替换数据库中原有的应用间切换数据。For example: every other day, the inter-application software refresh rate module sends a request to the WMS; WMS returns the historical data in the current storage space to the inter-application software refresh rate module; the inter-application software refresh rate module generates a request based on the received historical data Inter-application switching data, and replace the original inter-application switching data in the database with the newly generated inter-application switching data.
这种方式下,预设更新周期可以灵活设置。当预设更新周期较短时,更新频率较高,电子设备的功耗也较高;当预设更新周期较长时,更新频率较低,电子设备的功 耗也较低。用户可以根据需要自主设定。In this manner, the preset update period can be flexibly set. When the preset update period is short, the update frequency is high, and the power consumption of the electronic device is also high; when the preset update period is long, the update frequency is low, and the power consumption of the electronic device is also low. Users can set it independently according to their needs.
方式二、每当监测到应用间的切换指令时,电子设备更新一次应用间切换数据。Method 2: The electronic device updates the inter-application switching data once whenever a switching instruction between applications is detected.
例如:当电子设备监测到由应用A跳转到应用B的切换指令时,应用间软件刷新率模块向WMS发送一次请求;WMS将当前存储空间中的历史数据返回给应用间软件刷新率模块;应用间软件刷新率模块根据接收到的历史数据生成应用间切换数据,并将新生成的应用间切换数据替换数据库中原有的应用间切换数据。For example: when the electronic device detects a switching instruction from application A to application B, the inter-application software refresh rate module sends a request to WMS; WMS returns the historical data in the current storage space to the inter-application software refresh rate module; The inter-application software refresh rate module generates inter-application switching data according to the received historical data, and replaces the original inter-application switching data in the database with the newly generated inter-application switching data.
这种方式下,每次执行软件刷新率的切换任务时,所采用的应用间切换数据均是根据用户最近的历史数据生成的,能够保证软件刷新率的切换更贴近用户近期的使用习惯。In this way, each time the software refresh rate switching task is executed, the inter-application switching data used is generated based on the user's recent historical data, which can ensure that the software refresh rate switching is closer to the user's recent usage habits.
方式三、手动更新。Method 3: Manual update.
例如:用户可以通过用户操作向电子设备发送更新指令。当监测到更新指令时,电子设备更新一次应用间切换数据。For example: the user may send an update instruction to the electronic device through a user operation. When the update instruction is detected, the electronic device updates the inter-application switching data once.
方式四、根据预设条件更新应用间切换数据。预设条件可以为,历史数据的数值范围发生了变化。Method 4: Update the inter-application switching data according to preset conditions. The preset condition may be that the value range of the historical data has changed.
示例性的,可以根据历史数据中应用的驻留时长的最大值生成应用间切换数据。假设当前数据库中存储的应用B的驻留时长为1h。若应用间软件刷新率模块统计出当前的历史数据中应用B的驻留时长的最大值为2h,则应用B的驻留时长的最大值发生了变化(变为2h),此时,应用间软件刷新率模块根据当前的历史数据生成最新的应用间切换数据,并更新数据库。若应用间软件刷新率模块统计出当前的历史数据中应用B的驻留时长的最大值为0.5h,则应用B的驻留时长的最大值未发生变化(仍为1h),则应用间软件刷新率模块无需更新应用间切换数据。通过定时更新应用间切换数据,能够保证应用间切换数据能够及时地、准确地反映用户使用应用的习惯,进而为本申请实施例提供的软件刷新率的切换方法提供准确的决策依据。应用间切换数据的更新频率越高,软件刷新率的切换方法越贴近用户的使用习惯,同时电子设备的功耗也越大。因此,可以根据实际需要选择上述的更新方式,以及各种设定方式中的预设更新周期。Exemplarily, the inter-application switching data may be generated according to the maximum value of the dwell time of the application in the historical data. Assume that the residence time of application B stored in the current database is 1h. If the inter-application software refresh rate module calculates that the maximum dwell time of application B in the current historical data is 2h, then the maximum dwell time of application B has changed (to 2h). The software refresh rate module generates the latest switching data between applications according to the current historical data, and updates the database. If the inter-application software refresh rate module calculates that the maximum dwell time of application B in the current historical data is 0.5h, then the maximum dwell time of application B has not changed (still 1h), and the inter-application software The refresh rate module does not need to update the switching data between applications. By regularly updating the inter-application switching data, it can be ensured that the inter-application switching data can timely and accurately reflect the user's habit of using the application, thereby providing an accurate decision-making basis for the switching method of the software refresh rate provided by the embodiment of the present application. The higher the update frequency of switching data between applications, the closer the switching method of the software refresh rate is to the user's usage habits, and at the same time, the power consumption of the electronic device is also greater. Therefore, the above-mentioned update method and the preset update cycle in various setting methods can be selected according to actual needs.
在实际应用中,可能出现用户在使用某个应用时更新本应用的情况。电子设备进行应用更新的过程中,可能并未跳转到其他应用,只是应用界面跳转到更新界面;当应用更新完成后,电子设备跳转到该应用更新后的应用界面,更新后的应用的软件刷新率可能也发生了变化。还可能出现如图10所示的应用场景,切换源应用和切换目标应用为同一应用。基于上述情况,更新后的应用间切换数据中可能存在切换源应用和切换目标应用为同一应用的切换关系。如图14中的(b)所示,表示应用A的顶点141、由顶点141指向顶点141的有向边144、以及有向边144上的权值60这几个要素构成了一组切换关系,该组切换关系中切换源应用和切换目标应用均为应用A。该组切换关系表示由应用A跳转到应用A、且在应用A的驻留时长为60min。In actual applications, it may happen that the user updates the application while using the application. During the application update process of the electronic device, it may not jump to other applications, but the application interface jumps to the update interface; after the application update is completed, the electronic device jumps to the updated application interface of the application, and the updated application The software refresh rate may also have changed. An application scenario as shown in FIG. 10 may also occur, where the switching source application and the switching target application are the same application. Based on the above situation, there may be a switching relationship in which the switching source application and the switching target application are the same application in the updated inter-application switching data. As shown in (b) in Figure 14, the vertex 141 representing the application A, the directed edge 144 pointing from the vertex 141 to the vertex 141, and the weight 60 on the directed edge 144 constitute a set of switching relationships , both the switching source application and the switching target application in this group of switching relationships are application A. This group of switching relationships indicates that the user switches from application A to application A and stays in application A for 60 minutes.
作为本申请另一个实施例,如图14示例中所示,应用间切换数据中的每组切换关系可以是单向的,也可以是双向的。由此,在S123加载应用间切换数据后,S125根据应用间切换数据获取第一应用的驻留时长和第二应用的驻留时长,可以包括以下两种情况。As another embodiment of the present application, as shown in the example of FIG. 14 , each group of switching relationships in the inter-application switching data may be unidirectional or bidirectional. Therefore, after S123 loads the inter-application switching data, S125 obtains the dwell duration of the first application and the dwell duration of the second application according to the inter-application switching data, which may include the following two situations.
情况一、应用间切换数据中的每组切换关系为单向的切换关系。Case 1: Each set of switching relationships in the inter-application switching data is a one-way switching relationship.
此种情况下,第一应用的驻留时长和第二应用的驻留时长的获取方式可以包括:电子设备获取应用间切换数据中的第一目标关系和第二目标关系;电子设备分别从第一目标关系和第二目标关系中获取第一应用的驻留时长和第二应用的驻留时长。In this case, the method for acquiring the dwell duration of the first application and the dwell duration of the second application may include: the electronic device acquires the first target relationship and the second target relationship in the inter-application switching data; The dwell duration of the first application and the dwell duration of the second application are obtained from the first target relationship and the second target relationship.
例如:当每组切换关系包括切换源应用、切换目标应用和切换源应用的驻留时长时,第一目标关系表示切换源应用为第一应用、切换目标应用为第二应用的切换关系,第二目标关系表示切换源应用为第二应用、切换目标应用为第四应用的切换关系。电子设备将第一目标关系中切换源应用的驻留时长确定为第一应用的驻留时长;电子设备将第二目标关系中切换源应用的驻留时长确定为第二应用的驻留时长。For example: when each group of switching relationships includes switching source applications, switching target applications, and the residence time of switching source applications, the first target relationship means that the switching source application is the first application and the switching target application is the second application. The two-target relationship represents a switching relationship in which the switching source application is the second application and the switching target application is the fourth application. The electronic device determines the resident duration of the switching source application in the first target relationship as the resident duration of the first application; the electronic device determines the resident duration of the switching source application in the second target relationship as the resident duration of the second application.
当每组切换关系包括切换源应用、切换目标应用和切换目标应用的驻留时长时,第一目标关系表示切换源应用为第五应用、切换目标应用为第一应用的切换关系,第二目标关系表示第一应用、切换目标应用为第二应用的切换关系。电子设备将第一目标关系中切换目标应用的驻留时长确定为第一应用的驻留时长;电子设备将第二目标关系中切换目标应用的驻留时长确定为第二应用的驻留时长。When each set of switching relationships includes the switching source application, switching target application, and the residence time of the switching target application, the first target relationship means that the switching source application is the fifth application, the switching target application is the first application, and the second target application is the switching relationship. The relationship represents a switching relationship in which the first application and the switching target application are the second application. The electronic device determines the dwell duration of the switching target application in the first target relationship as the dwell duration of the first application; the electronic device determines the dwell duration of the switching target application in the second target relationship as the dwell duration of the second application.
示例性的,假设第一应用为A,第二应用为B,从如图14中的(a)所示的电子表格中获取A的驻留时长和B的驻留时长,可以包括:查找电子表格中切换源应用为A、切换目标应用为B的切换关系(如第二行数据),从该切换关系中获取B的驻留时长为2min。但由于电子表格存储的是单向的切换关系,因此,从该切换关系中无法获取A的驻留时长。此时需要确定跳转到A之前的应用。假设电子设备由C跳转到A,再跳转到B,则查找电子表格中切换源应用为C、应用目标应用为A的切换关系(如第8行数据),从该切换关系中获取A的驻留时长为5min。Exemplarily, assuming that the first application is A and the second application is B, obtaining the residence time of A and the residence time of B from the spreadsheet shown in (a) in Figure 14 may include: In the table, the switching source application is A and the switching target application is the switching relationship (such as the second row of data), and the dwell time for obtaining B from the switching relationship is 2 minutes. However, since the spreadsheet stores a one-way switching relationship, the residence time of A cannot be obtained from the switching relationship. At this time, it is necessary to determine the application before jumping to A. Assuming that the electronic device jumps from C to A, and then jumps to B, then look up the switching relationship in the spreadsheet where the switching source application is C and the application target application is A (such as the data in row 8), and obtain A from the switching relationship The dwell time is 5 minutes.
情况二、应用间切换数据中的每组切换关系为双向的切换关系。Case 2: Each set of switching relationships in the inter-application switching data is a bidirectional switching relationship.
此种情况下,第一应用的驻留时长和第二应用的驻留时长的获取方式可以包括:电子设备获取应用间切换数据中的第三目标关系;电子设备从第三目标关系中获取第一应用的驻留时长和第二应用的驻留时长。其中,第三目标关系表示第一应用和第二应用互为切换源应用/切换目标应用的切换关系;电子设备将第三目标关系中两个应用各自的驻留时长分别确定为第一应用的驻留时长和第二应用的驻留时长。In this case, the method for acquiring the dwell duration of the first application and the dwell duration of the second application may include: the electronic device acquires the third target relationship in the inter-application switching data; the electronic device acquires the third target relationship from the third target relationship The dwell duration of the first application and the dwell duration of the second application. Wherein, the third target relationship indicates that the first application and the second application are switching source applications/switching target applications; the electronic device determines the respective residence time of the two applications in the third target relationship as dwell time and the dwell time of the second application.
示例性的,继续假设第一应用为A,第二应用为B,从如图14中的(b)所示的有向图中获取A的驻留时长和B的驻留时长,可以包括:查找有向图中A对应的顶点和B对应的顶点,由A对应的顶点指向B对应的顶点的有向边上的权值为B的驻留时长,由B对应的顶点指向A对应的顶点的有向边上的权值为A的驻留时长。Exemplarily, continue to assume that the first application is A and the second application is B, and obtaining the residence time of A and the residence time of B from the directed graph shown in (b) in Figure 14 may include: Find the vertex corresponding to A and the vertex corresponding to B in the directed graph, the weight on the directed edge from the vertex corresponding to A to the vertex corresponding to B is the residence time of B, and the vertex corresponding to B points to the vertex corresponding to A The weight on the directed edge of is the residence time of A.
作为本申请另一个实施例,基于上述对第一应用的驻留时长和第二应用的驻留时长的获取方式的描述,S902中的预设时长可以根据第二应用的驻留时长确定。As another embodiment of the present application, based on the above description of how to obtain the dwell duration of the first application and the dwell duration of the second application, the preset duration in S902 may be determined according to the dwell duration of the second application.
第二应用的驻留时长反映了用户的历史操作行为中切换至第二应用后、第二应用在前台的运行时间,而预设时长决定了软件刷新率的切换频率。当预设时长等于第二应用的驻留时长时,相当于令软件刷新率的切换频率和用户使用应用的历史习惯保持一致;当预设时长大于第二应用的驻留时长时,相当于在用户使用应用的历史习惯的基础上降低了软件刷新率的切换频率;当预设时长小于第二应用的驻留时长时,相当于在用户使用应用的历史习惯的基础上提高了软件刷新率的切换频率。由于应用间切 换数据是根据用户使用应用的历史数据定期更新的,即第二应用的驻留时长也随着用户的使用习惯更新,因此,根据第二应用的驻留时长设置预设时长,相当于根据用户使用应用的历史习惯来决定软件刷新率的切换频率。通过上述对预设时长的设置方法,能够为不同的用户提供个性化方案,这使得本申请实施例提供的软件刷新率的切换方法具有较高的针对性和适用性。The residence time of the second application reflects the running time of the second application in the foreground after switching to the second application in the user's historical operation behavior, and the preset duration determines the switching frequency of the software refresh rate. When the preset duration is equal to the dwell duration of the second application, it is equivalent to keeping the switching frequency of the software refresh rate consistent with the user's historical habits of using the application; when the preset duration is greater than the dwell duration of the second application, it is equivalent to The switching frequency of the software refresh rate is reduced on the basis of the user's historical habit of using the application; when the preset duration is shorter than the dwell time of the second application, it is equivalent to increasing the software refresh rate based on the user's historical habit of using the application. Switch frequency. Since the inter-application switching data is regularly updated based on the historical data of the user's use of the application, that is, the residence time of the second application is also updated according to the user's usage habits. Therefore, setting the preset duration according to the residence time of the second application is quite It is used to determine the switching frequency of the software refresh rate according to the user's historical habit of using the application. Through the above-mentioned method for setting the preset duration, individualized solutions can be provided for different users, which makes the method for switching the software refresh rate provided by the embodiment of the present application more pertinent and applicable.
在一个应用场景中,参见图15,是本申请另一实施例提供的应用切换的场景示意图。如图15中的(a)所示,为视频应用的应用界面50,应用界面50可以包括搜索栏501、视频预览图502和导航栏503。导航栏503可以包括返回按键5031、主界面(home screen)按键5032和呼出任务历史按键5033等系统导航键。当用户点击/触碰主界面按键5032时,电子设备跳转到如图15中的(b)所示的主界面51。主界面51可以包括应用图标511和导航栏512。应用图标511可以包括视频应用图标、支付应用图标、相机应用图标、短信图标、设置图标、图库图标、电话图标、浏览器图标和电子邮件图标等。当用户点击应用图标511中的支付图标时,电子设备跳转到如图15中的(c)所示的支付界面52。In an application scenario, refer to FIG. 15 , which is a schematic diagram of an application switching scenario provided by another embodiment of the present application. As shown in (a) of FIG. 15 , it is an application interface 50 of a video application, and the application interface 50 may include a search bar 501 , a video preview image 502 and a navigation bar 503 . The navigation bar 503 may include system navigation keys such as a return button 5031, a home screen button 5032, and an outgoing task history button 5033. When the user clicks/touches the main interface button 5032, the electronic device jumps to the main interface 51 as shown in (b) in FIG. 15 . The main interface 51 may include application icons 511 and a navigation bar 512 . The application icons 511 may include a video application icon, a payment application icon, a camera application icon, a text message icon, a setting icon, a gallery icon, a phone icon, a browser icon, an email icon, and the like. When the user clicks the payment icon in the application icon 511, the electronic device jumps to the payment interface 52 as shown in (c) in FIG. 15 .
与图8所示应用场景中、电子设备通过视频应用中的跳转窗口由第一应用(视频应用)直接跳转到第二应用(支付应用)的方式相比,图15所示应用场景中,先由第一应用跳转到桌面,再由桌面跳转到第二应用,增加了一次软件刷新率的切换过程,增加了掉帧的风险。由于应用有退出动效和进入动效,掉帧可能会导致用户感知的动效卡顿。针对上述问题,可以采用以下两种方案。Compared with the way in which the electronic device directly jumps from the first application (video application) to the second application (payment application) through the jump window in the video application in the application scenario shown in Figure 8, in the application scenario shown in Figure 15 , jump from the first application to the desktop first, and then jump from the desktop to the second application, which adds a software refresh rate switching process and increases the risk of frame drop. Since the app has an exit animation and an entry animation, dropped frames may cause user-perceived animation stuttering. To solve the above problems, the following two solutions can be adopted.
第一种方案,生成特殊应用的应用间切换数据。The first solution is to generate inter-application switching data of a special application.
如图15所示应用场景中,将桌面作为特殊应用。通过图13所示的模块交互流程,由应用间软件刷新率切换模块从WMS获取用户使用桌面的历史数据,根据桌面的历史数据生成桌面对应的应用间切换数据,并将该应用间切换数据存储为如图14中的(b)所示的有向图。相当于将桌面作为特殊应用添加到了有向图中。In the application scenario shown in Figure 15, the desktop is used as a special application. Through the module interaction process shown in Figure 13, the inter-application software refresh rate switching module obtains the historical data of the user's use of the desktop from the WMS, generates the inter-application switching data corresponding to the desktop according to the desktop historical data, and stores the inter-application switching data It is a directed graph as shown in (b) in Figure 14. It is equivalent to adding the desktop as a special application to the directed graph.
通过这样的方法,在图15所示应用场景中,当从第一应用跳转到桌面,电子设备根据上述的S901-S903所述的方法确认是否需要将软件刷新率切换至桌面的软件刷新率。其中,S902中的预设时长的获取方式可以是,从应用间切换数据中获取桌面的驻留时长,并根据桌面的驻留时长生成预设时长。当从桌面跳转到第二应用时,电子设备根据S901-S903所述的方法再次进行软件刷新率的切换。Through this method, in the application scenario shown in Figure 15, when jumping from the first application to the desktop, the electronic device confirms whether the software refresh rate needs to be switched to the software refresh rate of the desktop according to the method described in S901-S903 above. . Wherein, the method for obtaining the preset duration in S902 may be to obtain the dwell duration of the desktop from the inter-application switching data, and generate the preset duration according to the dwell duration of the desktop. When jumping from the desktop to the second application, the electronic device switches the software refresh rate again according to the method described in S901-S903.
针对一些使用频率较高的应用,用户每次使用该应用的驻留时长的差异较大,如图15所示的桌面应用。因此,在一些实施例中,可以调整特殊应用的应用间切换数据的更新频率。For some applications with high frequency of use, the duration of the user's stay in the application varies greatly each time, such as the desktop application shown in Figure 15 . Therefore, in some embodiments, the update frequency of the inter-application switching data of a special application can be adjusted.
如上所述,电子设备可以定时更新应用间切换数据。对于普通应用,电子设备可以按照预设更新周期更新普通应用的应用间切换数据;对于特殊应用,电子设备可以按照较短的更新周期更新特殊应用的应用间切换数据,即增加了更新频率。As mentioned above, the electronic device can periodically update the inter-application switching data. For common applications, the electronic device can update the inter-application switching data of the common application according to a preset update period; for special applications, the electronic device can update the inter-application switching data of the special application according to a shorter update period, that is, the update frequency is increased.
示例性的,如图13所示的模块交互示意图,对于普通应用,每隔1天,应用间软件刷新率模块从WMS获取一次普通应用的历史数据,根据获取到的普通应用的历史数据生成普通应用的应用间切换数据,并将新生成的应用间切换数据替换数据库中原有的应用间切换数据。如图14中的(b)所示的有向图,相当于每隔1天更新有向图 中指向/指出普通应用的有向边的权值和节点。对于特殊应用,每隔1个小时,应用间软件刷新率模块从WMS获取一次特殊应用的历史数据,根据获取到的特殊应用的历史数据生成特殊应用的应用间切换数据,并将新生成的应用间切换数据替换数据库中原有的应用间切换数据。如图14中的(b)所示的有向图,相当于每隔1小时更新有向图中指向/指出特殊应用的有向边的权值和节点。Exemplarily, as shown in the schematic diagram of module interaction in Figure 13, for common applications, every other day, the inter-application software refresh rate module obtains the historical data of common applications from WMS once, and generates common The inter-application switching data of the application, and replace the original inter-application switching data in the database with the newly generated inter-application switching data. The directed graph shown in (b) in Figure 14 is equivalent to updating the weights and nodes of the directed edges pointing to/pointing to common applications in the directed graph every other day. For special applications, every hour, the inter-application software refresh rate module obtains the historical data of the special application from the WMS, generates the inter-application switching data of the special application according to the obtained historical data of the special application, and transfers the newly generated application The inter-application switching data replaces the original inter-application switching data in the database. The directed graph shown in (b) in Figure 14 is equivalent to updating the weights and nodes of the directed edges pointing/pointing out the special application in the directed graph every 1 hour.
由于应用驻留时长是根据应用间切换数据获得的,因此,增加特殊应用的应用间切换数据的更新频率,相当于增加了特殊应用的驻留时长的更新频率,这样可以保证获取到的特殊应用的驻留时长能够更贴近用户的使用习惯。进一步的,由某个应用跳转到特殊应用时,如S902所述,预设时长可以根据特殊应用的驻留时长确定,而预设时长决定了软件刷新率的切换频率。因此,通过增加特殊应用的驻留时长的更新频率,能够生成较为合理的预设时长,进而避免不必要的软件刷新率的切换过程。Since the application dwell time is obtained based on the inter-app switching data, increasing the update frequency of the inter-app switching data of a special application is equivalent to increasing the update frequency of the special application’s dwell time, which can ensure that the obtained special application The residence time can be closer to the user's usage habits. Further, when jumping from an application to a special application, as described in S902, the preset duration can be determined according to the dwell duration of the special application, and the preset duration determines the switching frequency of the software refresh rate. Therefore, by increasing the update frequency of the resident duration of a special application, a reasonable preset duration can be generated, thereby avoiding unnecessary software refresh rate switching process.
在另一些实施例中,可以增加特殊应用的驻留时长。In other embodiments, the dwell time of a special application can be increased.
示例性的,假设从应用间切换数据中获取到的桌面应用的驻留时长为10s,可以人为将其增加为30s。如图15所示应用场景中,假设用户由视频应用切换至桌面,在桌面停留15s后,再由桌面切换至支付应用。若以桌面应用的驻留时长为10s确定预设时长,电子设备在跳转至桌面后的10s时(这里假设预设时长等于桌面应用的驻留时长),将软件刷新率切换至桌面应用的软件刷新率;之后由桌面跳转至支付应用,电子设备再将软件刷新率切换至支付应用的软件刷新率。在此过程中,电子设备需要切换两次软件刷新率。若以增加后的桌面应用的驻留时长30s确定预设时长,则避免了桌面应用的软件刷新率的切换过程,电子设备只需将软件刷新率切换至支付应用的软件刷新率,减少了一次切换过程。Exemplarily, assuming that the dwell time of the desktop application obtained from the inter-application switching data is 10s, it can be artificially increased to 30s. In the application scenario shown in Figure 15, suppose the user switches from the video application to the desktop, stays on the desktop for 15 seconds, and then switches from the desktop to the payment application. If the preset duration of the desktop application is determined as 10s, the electronic device will switch the software refresh rate to that of the desktop application 10s after jumping to the desktop (assuming that the preset duration is equal to the duration of the desktop application). Software refresh rate; after that, the desktop jumps to the payment application, and the electronic device switches the software refresh rate to the software refresh rate of the payment application. During this process, the electronic device needs to switch the software refresh rate twice. If the preset duration is determined by the increased residence time of the desktop application of 30s, the switching process of the software refresh rate of the desktop application is avoided, and the electronic device only needs to switch the software refresh rate to the software refresh rate of the payment application, which is reduced once. Switching process.
第二种方案,将特殊应用的驻留时长设置为固定值。The second solution is to set the dwell time of a special application as a fixed value.
可以预先将特殊应用的驻留时长设置为固定值,并存储在如图13所示的数据库中。当应用间软件刷新率切换模块在执行S901时,识别出跳转到特殊应用,则应用间软件刷新率模块在执行S902-S903时可以按照特殊应用的步骤执行。The residence time of a special application can be set as a fixed value in advance and stored in the database as shown in FIG. 13 . When the inter-application software refresh rate switching module recognizes the jump to the special application when executing S901, the inter-application software refresh rate module can execute S902-S903 according to the steps of the special application.
例如,应用间软件刷新率模块从数据库中获取特殊应用对应的固定值,根据该固定值生成预设时长。若电子设备停留在特殊应用的累计时长超过该固定值,电子设备切换至特殊应用的软件刷新率。若电子设备停留在特殊应用的累计时长未超过该固定值,电子设备维持当前的软件刷新率。For example, the inter-application software refresh rate module obtains a fixed value corresponding to a special application from the database, and generates a preset duration according to the fixed value. If the accumulated time of the electronic device staying in the special application exceeds the fixed value, the electronic device switches to the software refresh rate of the special application. If the accumulated time of the electronic device staying in the special application does not exceed the fixed value, the electronic device maintains the current software refresh rate.
对比上述两种方案,第一种方案需要不断更新数据,电子设备的数据处理量较大,对电子设备的性能要求较高。而第二种方案,对电子设备的性能要求较低。针对处理能力较弱的电子设备,可以采用第二种方案,无需对特殊应用的相关数据进行特殊处理,无需将特殊应用添加到应用间切换数据中,可以有效减少数据处理量。Compared with the above two schemes, the first scheme needs to continuously update data, and the data processing volume of the electronic equipment is relatively large, and the performance requirements of the electronic equipment are relatively high. The second solution has lower requirements on the performance of the electronic equipment. For electronic devices with weaker processing capabilities, the second solution can be adopted, which does not require special processing of data related to special applications, and does not need to add special applications to switching data between applications, which can effectively reduce the amount of data processing.
通过本申请实施例提供的软件刷新率的切换方法,基于用户的使用习惯的历史数据,生成应用间切换数据,将用户使用应用的习惯这种抽象的概念具化为用于表示应用间切换关系的具体数据;通过动态维护应用间切换数据,在应用切换时为软件刷新率的切换提供决策依据。另外,上述方法中,为不同的情况分别制定了软件刷新率的切换方案,使得在连续切换应用时,有效减少了软件刷新率的切换频率,降低了掉帧和卡顿的发生概率,降低了电子设备因连续切换刷新率而产生的额外功耗,提高了电 子设备的续航能力,同时保证了流畅的观感体验。Through the software refresh rate switching method provided by the embodiment of the present application, based on the historical data of the user's usage habits, inter-application switching data is generated, and the abstract concept of the user's usage of application habits is embodied to represent the inter-application switching relationship The specific data; by dynamically maintaining the switching data between applications, it provides decision-making basis for switching the software refresh rate when switching applications. In addition, in the above method, the software refresh rate switching scheme is formulated for different situations, so that when continuously switching applications, the switching frequency of the software refresh rate is effectively reduced, the probability of frame dropping and freezing is reduced, and the The extra power consumption of electronic devices due to continuous switching of refresh rates improves the battery life of electronic devices while ensuring a smooth visual experience.
上述实施例描述的是本申请实施例提供的模式切换方法应用于软件刷新率切换的示例。本申请实施例提供的模式切换方法,不仅适用于上述的软件刷新率的切换,还可以适用于其他模式的切换场景。例如:分辨率的切换、亮度的切换、色深的切换或色彩的切换等应用场景。这些模式的切换方法与上述实施例描述的软件刷新率的切换方法的思路相同,在此不再赘述。The foregoing embodiments describe an example in which the mode switching method provided by the embodiments of the present application is applied to software refresh rate switching. The mode switching method provided in the embodiment of the present application is not only applicable to the above software refresh rate switching, but also applicable to other mode switching scenarios. For example: application scenarios such as resolution switching, brightness switching, color depth switching, or color switching. The method for switching these modes is the same as the method for switching the software refresh rate described in the above embodiments, and will not be repeated here.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时可实现上述各个方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
本申请实施例还提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备可实现上述各个方法实施例中的步骤。The embodiment of the present application also provides a computer program product, which enables the electronic device to implement the steps in the foregoing method embodiments when the computer program product is run on the electronic device.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质至少可以包括:能够将计算机程序代码携带到第一设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If an integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above-mentioned embodiments in the present application can be completed by instructing related hardware through computer programs. The computer programs can be stored in a computer-readable storage medium, and the computer programs can be processed When executed by the controller, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random-access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media. Such as U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunication signals under legislation and patent practice.
本申请实施例还提供了一种芯片系统,芯片系统包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现本申请任一方法实施例的步骤。芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。The embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to the memory, and the processor executes the computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip, or a chip module composed of multiple chips.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and method steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still apply to the foregoing embodiments Modifications to the technical solutions recorded, or equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the application, and should be included in this application. within the scope of protection.

Claims (14)

  1. 一种模式切换方法,其特征在于,应用于电子设备,包括:A mode switching method, characterized in that it is applied to electronic equipment, comprising:
    接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用;receiving a user operation, and switching the application running in the foreground from the first application to the second application in response to the user operation;
    若所述第二应用在前台的运行时间不大于第一预设时长,则维持第一软件刷新率,所述第一预设时长为所述第二应用对应的预设时长,所述第一软件刷新率为所述第一应用的软件刷新率,所述软件刷新率为所述电子设备的显示缓存中图像的刷新率;If the running time of the second application in the foreground is not longer than the first preset duration, then maintain the first software refresh rate, the first preset duration is the preset duration corresponding to the second application, and the first The software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of images in the display cache of the electronic device;
    若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由第一软件刷新率切换为第二软件刷新率,所述第二软件刷新率为所述第二应用的软件刷新率。If the running time of the second application in the foreground is greater than the first preset duration, the software refresh rate of the electronic device is switched from the first software refresh rate to the second software refresh rate, and the second software refresh rate The rate is a software refresh rate of the second application.
  2. 根据权利要求1所述的方法,其特征在于,在接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用之后,所述方法还包括:The method according to claim 1, characterized in that, after receiving a user operation and responding to the user operation, after switching the application running in the foreground from the first application to the second application, the method further comprises:
    根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率。Switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,包括:The method according to claim 2, wherein the switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration includes :
    若所述第一软件刷新率高于所述第二软件刷新率,则判断所述第二应用在前台的运行时间是否大于所述第一预设时长;If the first software refresh rate is higher than the second software refresh rate, then judging whether the running time of the second application in the foreground is greater than the first preset duration;
    若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由所述第一软件刷新率切换为所述第二软件刷新率。If the running time of the second application in the foreground is greater than the first preset duration, switching the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate.
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,包括:The method according to claim 2, wherein the switching the software refresh rate of the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration includes :
    若所述第一软件刷新率低于所述第二软件刷新率,则将所述电子设备的软件刷新率由所述第一软件刷新率切换到第三软件刷新率,所述第三软件刷新率高于所述第一软件刷新率、且低于所述第二软件刷新率;If the first software refresh rate is lower than the second software refresh rate, the software refresh rate of the electronic device is switched from the first software refresh rate to a third software refresh rate, and the third software refresh rate is a rate higher than the first software refresh rate and lower than the second software refresh rate;
    若所述第二应用在前台的运行时间不大于所述第一预设时长,则维持所述第三软件刷新率;If the running time of the second application in the foreground is not longer than the first preset duration, maintaining the third software refresh rate;
    若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由所述第三软件刷新率切换为所述第二软件刷新率。If the running time of the second application in the foreground is greater than the first preset duration, switching the software refresh rate of the electronic device from the third software refresh rate to the second software refresh rate.
  5. 根据权利要求4所述的方法,其特征在于,所述第三软件刷新率为:The method according to claim 4, wherein the third software refresh rate is:
    所述第一软件刷新率和所述第二软件刷新率之和的预设倍数,所述预设倍数为小于1的正数。A preset multiple of the sum of the first software refresh rate and the second software refresh rate, where the preset multiple is a positive number less than 1.
  6. 根据权利要求1所述的方法,其特征在于,在接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用之后,所述方法还包括:The method according to claim 1, characterized in that, after receiving a user operation and responding to the user operation, after switching the application running in the foreground from the first application to the second application, the method further comprises:
    根据第一应用的驻留时长、第二应用的驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率,其中,所述第一应用的驻留时长为应用切换后所述第一应用在前台的历史运行时间;所述第二应用的驻留时长为应用切换后所述第二应用在前台的历史运行时间。Switching the software refresh rate of the electronic device according to the dwell time of the first application, the dwell time of the second application, the first software refresh rate, the second software refresh rate and the first preset duration, Wherein, the resident duration of the first application is the historical running time of the first application in the foreground after the application switching; the resident duration of the second application is the historical running time of the second application in the foreground after the application switching time.
  7. 根据权利要求6所述的方法,其特征在于,所述根据第一驻留时长、第二驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子 设备的软件刷新率,包括:The method according to claim 6, wherein the first dwell time, the second dwell time, the first software refresh rate, the second software refresh rate and the first preset Switching the software refresh rate of the electronic device by duration, including:
    若所述第一应用的驻留时长小于所述第二应用的驻留时长,则将所述电子设备的软件刷新率由所述第一软件刷新率切换到所述第二软件刷新率;If the resident duration of the first application is less than the resident duration of the second application, switching the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate;
    若所述第一应用的驻留时长大于所述第二应用的驻留时长,则根据所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率。If the resident duration of the first application is longer than the resident duration of the second application, switch the electronic device according to the first software refresh rate, the second software refresh rate and the first preset duration. The software refresh rate of the device.
  8. 根据权利要求6或7所述的方法,其特征在于,在根据第一应用的驻留时长、第二应用的驻留时长、所述第一软件刷新率、所述第二软件刷新率和所述第一预设时长切换所述电子设备的软件刷新率之前,所述方法还包括:The method according to claim 6 or 7, characterized in that, based on the dwell duration of the first application, the dwell duration of the second application, the first software refresh rate, the second software refresh rate and the Before the first preset duration switches the software refresh rate of the electronic device, the method further includes:
    对于目标应用的驻留时长,获取目标应用的历史切换数据,所述目标应用为所述第一应用或所述第二应用;For the residence time of the target application, acquiring historical switching data of the target application, where the target application is the first application or the second application;
    根据所述目标应用的历史切换数据生成所述目标应用的驻留时长。The residence time of the target application is generated according to the historical switching data of the target application.
  9. 根据权利要求8所述的方法,其特征在于,在根据所述目标应用的历史切换数据生成所述目标应用的驻留时长之后,所述方法还包括:The method according to claim 8, characterized in that, after generating the residence time of the target application according to the historical switching data of the target application, the method further comprises:
    按照预设周期更新所述目标应用的驻留时长。The dwell duration of the target application is updated according to a preset period.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述第一预设时长由所述第二应用的驻留时长确定,所述第二应用的驻留时长为应用切换后所述第二应用在前台的历史运行时间。The method according to any one of claims 1 to 9, wherein the first preset duration is determined by the dwell duration of the second application, and the dwell duration of the second application is The historical running time of the second application in the foreground.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 10, further comprising:
    若所述电子设备处于暗光状态,且前台运行的应用由所述第一应用跳转到所述第二应用,则根据所述第一预设时长切换所述电子设备的软件刷新率。If the electronic device is in a dark state, and the application running in the foreground jumps from the first application to the second application, the software refresh rate of the electronic device is switched according to the first preset duration.
  12. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    应用切换单元,用于接收用户操作,响应所述用户操作,前台运行的应用由第一应用切换至第二应用;An application switching unit, configured to receive a user operation, and switch the application running in the foreground from the first application to the second application in response to the user operation;
    第一切换单元,用于若所述第二应用在前台的运行时间不大于第一预设时长,则维持第一软件刷新率,所述第一预设时长为所述第二应用对应的预设时长,所述第一软件刷新率为所述第一应用的软件刷新率,所述软件刷新率为所述电子设备的显示缓存中图像的刷新率;The first switching unit is configured to maintain the first software refresh rate if the running time of the second application in the foreground is not greater than a first preset duration, and the first preset duration is a preset duration corresponding to the second application Set the duration, the first software refresh rate is the software refresh rate of the first application, and the software refresh rate is the refresh rate of images in the display cache of the electronic device;
    第二切换单元,用于若所述第二应用在前台的运行时间大于所述第一预设时长,则将所述电子设备的软件刷新率由第一软件刷新率切换为第二软件刷新率,所述第二软件刷新率为所述第二应用的软件刷新率。The second switching unit is configured to switch the software refresh rate of the electronic device from the first software refresh rate to the second software refresh rate if the running time of the second application in the foreground is greater than the first preset duration , the second software refresh rate is the software refresh rate of the second application.
  13. 一种电子设备,其特征在于,所述电子设备包括处理器,所述处理器用于运行存储器中存储的计算机程序,以实现如权利要求1至11任一项所述的方法。An electronic device, characterized in that the electronic device includes a processor, and the processor is configured to run a computer program stored in a memory, so as to implement the method according to any one of claims 1 to 11.
  14. 一种芯片系统,其特征在于,所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器用于运行所述存储器中存储的计算机程序,以实现如权利要求1至11任一项所述的方法。A chip system, characterized in that the chip system includes a processor, the processor is coupled to a memory, and the processor is used to run a computer program stored in the memory, so as to implement any one of claims 1 to 11. method described in the item.
PCT/CN2022/091651 2021-07-23 2022-05-09 Mode switching method and apparatus, electronic device and chip system WO2023000772A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110843111.9 2021-07-23
CN202110843111.9A CN113625860B (en) 2021-07-23 2021-07-23 Mode switching method and device, electronic equipment and chip system

Publications (1)

Publication Number Publication Date
WO2023000772A1 true WO2023000772A1 (en) 2023-01-26

Family

ID=78381117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091651 WO2023000772A1 (en) 2021-07-23 2022-05-09 Mode switching method and apparatus, electronic device and chip system

Country Status (2)

Country Link
CN (1) CN113625860B (en)
WO (1) WO2023000772A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113625860B (en) * 2021-07-23 2023-01-31 荣耀终端有限公司 Mode switching method and device, electronic equipment and chip system
WO2023124225A1 (en) * 2021-12-29 2023-07-06 荣耀终端有限公司 Frame rate switching method and apparatus
CN115550708B (en) * 2022-01-07 2023-12-19 荣耀终端有限公司 Data processing method and electronic equipment
CN114724528B (en) * 2022-04-02 2024-03-22 深圳创维-Rgb电子有限公司 Display control method and device of display device, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250085A (en) * 2016-07-29 2016-12-21 北京小米移动软件有限公司 Refresh rate method of adjustment and device
CN110377251A (en) * 2019-06-06 2019-10-25 努比亚技术有限公司 A kind of screen refresh rate method of adjustment, terminal and computer readable storage medium
CN110619860A (en) * 2019-10-15 2019-12-27 Oppo广东移动通信有限公司 Screen refresh rate adjusting method and device, storage medium and electronic equipment
CN112230758A (en) * 2020-11-09 2021-01-15 腾讯科技(深圳)有限公司 Frame rate adjustment method, device, equipment and computer readable storage medium
CN112667340A (en) * 2020-12-31 2021-04-16 努比亚技术有限公司 Screen refresh control method, mobile terminal and computer readable storage medium
US20210201732A1 (en) * 2019-12-31 2021-07-01 Micron Technology, Inc. Intelligent adjustment of screen refresh rate
CN113625860A (en) * 2021-07-23 2021-11-09 荣耀终端有限公司 Mode switching method and device, electronic equipment and chip system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100011669A (en) * 2008-07-25 2010-02-03 (주)메디슨 Method and device for providing customized interface in the ultrasound system
CN111816139B (en) * 2020-06-17 2022-05-17 维沃移动通信有限公司 Screen refresh rate switching method and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250085A (en) * 2016-07-29 2016-12-21 北京小米移动软件有限公司 Refresh rate method of adjustment and device
CN110377251A (en) * 2019-06-06 2019-10-25 努比亚技术有限公司 A kind of screen refresh rate method of adjustment, terminal and computer readable storage medium
CN110619860A (en) * 2019-10-15 2019-12-27 Oppo广东移动通信有限公司 Screen refresh rate adjusting method and device, storage medium and electronic equipment
US20210201732A1 (en) * 2019-12-31 2021-07-01 Micron Technology, Inc. Intelligent adjustment of screen refresh rate
CN112230758A (en) * 2020-11-09 2021-01-15 腾讯科技(深圳)有限公司 Frame rate adjustment method, device, equipment and computer readable storage medium
CN112667340A (en) * 2020-12-31 2021-04-16 努比亚技术有限公司 Screen refresh control method, mobile terminal and computer readable storage medium
CN113625860A (en) * 2021-07-23 2021-11-09 荣耀终端有限公司 Mode switching method and device, electronic equipment and chip system

Also Published As

Publication number Publication date
CN113625860A (en) 2021-11-09
CN113625860B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2021175213A1 (en) Refresh rate switching method and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2023000772A1 (en) Mode switching method and apparatus, electronic device and chip system
KR102577396B1 (en) Recording frame rate control method and related devices
CN114706503A (en) Application display method and electronic equipment
WO2021147396A1 (en) Icon management method and smart terminal
CN113254120B (en) Data processing method and related device
CN112492193B (en) Method and equipment for processing callback stream
WO2023065873A1 (en) Frame rate adjustment method, terminal device, and frame rate adjustment system
WO2022257451A1 (en) Display method, electronic device and computer storage medium
WO2022037726A1 (en) Split-screen display method and electronic device
WO2021104104A1 (en) Energy-efficient display processing method, and apparatus
WO2021190314A1 (en) Sliding response control method and apparatus of touch screen, and electronic device
EP4156158A1 (en) Drive control method and related device
WO2023030168A1 (en) Interface display method and electronic device
CN115686403A (en) Display parameter adjusting method, electronic device, chip and readable storage medium
WO2024066834A1 (en) Vsync signal control method, electronic device, storage medium and chip
CN116048831B (en) Target signal processing method and electronic equipment
EP4236301A1 (en) Frame rate switching method and apparatus
EP4239467A1 (en) Frame rate switching method and device
WO2024067037A1 (en) Service calling method and system, and electronic device
CN115480680A (en) Multi-device cooperative control method, terminal device and computer-readable storage medium
CN114596819A (en) Brightness adjusting method and related device

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: 22844939

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE