Refresh rate switching method and related device

CN121368752APending Publication Date: 2026-01-20HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480037119.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-11
Filing Date
2024-07-24
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

When electronic devices slide to display related content, maintaining a high refresh rate leads to high power consumption, and it is difficult to effectively adjust the refresh rate to meet the display fluency needs of different sliding speeds.

Method used

Dynamically adjust the refresh rate of the display by detecting the real-time speed of the sliding operation. When the sliding speed is high, the refresh rate is higher; when the sliding speed is low, the refresh rate is lower. The specific method includes switching different refresh rates at different speed stages of the sliding operation and setting a preset duration when necessary to reduce the number of refresh rate switching times.

Benefits of technology

It realizes dynamic adjustment of the refresh rate at different sliding speeds, meeting the display fluency requirements when sliding speed is high, and reducing power consumption when sliding speed is low.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121368752A_ABST
    Figure CN121368752A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a refresh rate switching method and a related device, and is applied to the technical field of terminals. The method comprises the following steps: displaying an application interface of a first application at a first refresh rate; detecting a sliding operation of a user on the application interface; refreshing an application interface of the first application based on the sliding operation; wherein under the condition that the sliding speed of the sliding operation is the first speed, the refresh rate of the display screen is the second refresh rate; when the sliding speed is the second speed, the refresh rate of the display screen is a third refresh rate; the first speed is less than the second speed and the second refresh rate is less than the third refresh rate. In this way, the refresh rate is adjusted in real time according to the sliding operation, and the display fluency requirement when the sliding speed is high can be met; and the power consumption when the sliding speed is low can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Refresh rate switching method and related device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on September 11, 2023, with application number 202311170463.8 and application name “Refresh rate switching method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a refresh rate switching method and related devices. Background Art

[0003] Currently, users can access a wide range of content on electronic device displays. When there's a lot of content, the display can't display all of it at once. Users can use swiping to control the display, allowing it to display relevant content. However, when swiping, electronic devices maintain a high refresh rate, which increases power consumption.

[0004] Summary of the Invention

[0005] The present invention provides a refresh rate switching method and related apparatus for use in the field of terminal technology. The refresh rate of an electronic device is adjusted based on the real-time speed of a sliding operation; when the real-time speed is high, the refresh rate is high; when the real-time speed is low, the refresh rate is low. This real-time adjustment of the refresh rate can meet the display smoothness requirements when the real-time speed is high, and can also reduce power consumption when the real-time speed is low.

[0006] In a first aspect, embodiments of the present application provide a refresh rate switching method. The method includes: displaying an application interface of a first application at a first refresh rate; detecting a user sliding operation on the application interface; and refreshing the application interface of the first application based on the sliding operation; wherein, when the sliding speed of the sliding operation is a first speed, the refresh rate of the display screen is a second refresh rate; when the sliding speed is a second speed, the refresh rate of the display screen is a third refresh rate; the first speed is less than the second speed, and the second refresh rate is less than the third refresh rate.

[0007] When the sliding speed is high, the refresh rate is high; when the sliding speed is low, the refresh rate is low. In this way, adjusting the refresh rate in real time can meet the display smoothness requirements when the sliding speed is high, and can also reduce power consumption when the sliding speed is low.

[0008] Optionally, refreshing the application interface of the first application based on the sliding operation includes: determining a first target refresh rate corresponding to the sliding speed based on the sliding speed; and refreshing the application interface of the first application at the first target refresh rate on the display screen.

[0009] In this way, the instantaneous speed of the sliding operation is calculated to adjust the refresh rate, and the refresh rate matches the instantaneous speed, thereby improving the user experience.

[0010] Optionally, before determining the first target refresh rate, the method further includes: detecting multiple move events corresponding to the sliding operation; and determining the sliding speed based on position information and time information of the multiple move events.

[0011] In this way, the sliding speed of the non-hand-off sliding is determined according to the input event (report point) corresponding to the sliding operation, which can accurately reflect the changes in the sliding operation and then accurately adjust the refresh rate.

[0012] Optionally, determining the sliding speed based on the location information and time information of multiple move events includes: determining a first speed based on the location information and time information of M move events detected in a first time period; determining a second speed based on the location information and time information of N move events detected in a second time period; M and N are both integers greater than a preset threshold; and the time interval between the last moment in the first time period and the last moment in the second time period is greater than a preset duration. The location information may be the coordinates corresponding to the move event. The time information may be the moment of the detected move event.

[0013] The preset threshold can be 10, 5, or any value, which is not limited here.

[0014] In this way, there is a certain time interval between the two refresh rate adjustments, which can reduce the number of refresh rate switching times and reduce the frequent switching of refresh rates.

[0015] Optionally, when the second refresh rate is a first value, the preset duration is the first duration; when the second refresh rate is a second value, the preset duration is the second duration; wherein the first value is greater than the second value, and the first duration is greater than the second duration.

[0016] In this way, the refresh rate is adjusted by slowly decreasing and quickly increasing. When the refresh rate is low, the electronic device can promptly increase the refresh rate to meet the display smoothness requirements; when the refresh rate is high, the refresh rate can be slowly reduced to reduce the power consumption of the electronic device.

[0017] Optionally, the method further includes: when a down event corresponding to the sliding operation is detected, displaying the application interface of the first application at a fourth refresh rate.

[0018] The fourth refresh rate may be a pre-set refresh rate, for example, 60 Hz, 90 Hz, etc., which is not limited here.

[0019] In this way, after receiving the user operation, the refresh rate is adjusted to a higher rate to facilitate subsequent display based on the user operation and improve the smoothness of the display.

[0020] Optionally, an up event corresponding to the sliding operation is detected; a second target refresh rate is determined based on a speed corresponding to the up event; and the display screen refreshes the application interface of the first application at the second target refresh rate.

[0021] In this way, after the sliding operation stops, the refresh rate is adjusted according to the speed corresponding to the up event.

[0022] Optionally, when the speed corresponding to the up event is less than or equal to the speed threshold, the display screen refreshes the application interface at a first refresh rate; when the speed corresponding to the up event is greater than the speed threshold, the display screen refreshes the application interface at a fifth refresh rate, and the fifth refresh rate corresponds to the speed of the up event.

[0023] The speed threshold may correspond to the second threshold described below.

[0024] In this way, when the speed of the up event is high, the hand-off sliding begins; when the speed of the up event is low, the sliding stops.

[0025] Optionally, the speed corresponding to the up event is greater than the speed threshold; when the speed corresponding to the up event is the third speed, the fifth refresh rate is the first value; when the speed corresponding to the up event is the fourth speed, the fifth refresh rate is the second value; the third speed is less than the fourth speed, and the first value is less than or equal to the second value.

[0026] In this way, the higher the speed corresponding to the up event, the higher the fifth refresh rate, which meets the smoothness requirement of the display when sliding with the hand off.

[0027] Optionally, the first application includes: system applications and third-party applications.

[0028] System applications include desktop applications. Third-party applications include video applications, chat applications, map applications, etc.

[0029] In a second aspect, an embodiment of the present application proposes a refresh rate switching method. The method includes: displaying an application interface of a first application at a first refresh rate; detecting a user's sliding operation on the application interface; when a down event corresponding to the sliding operation is detected, switching the refresh rate of the display screen from the first refresh rate to the second refresh rate, and displaying the application interface of the first application at the second refresh rate; when multiple move events corresponding to the sliding operation are detected, switching the refresh rate of the display screen from the second refresh rate to the third refresh rate, and displaying the application interface of the first application at the third refresh rate; when the sliding speed is detected to be the second speed, switching the refresh rate of the display screen from the third refresh rate to the fourth refresh rate, and displaying the application interface of the first application at the fourth refresh rate; when an up event corresponding to the sliding operation is detected, switching the refresh rate of the display screen from the fourth refresh rate to the fifth refresh rate, and displaying the application interface of the first application at the fifth refresh rate.

[0030] Among them, when the first speed is lower than the second speed, the third refresh rate is lower than the fourth refresh rate; when the first speed is higher than the second speed, the third refresh rate is higher than the fourth refresh rate.

[0031] The refresh rate is adjusted in real time based on the speed of the slide operation. When the slide speed is high, the refresh rate is high; when the slide speed is low, the refresh rate is low. This real-time refresh rate adjustment can meet the display smoothness requirements at high slide speeds and reduce power consumption at low slide speeds.

[0032] Optionally, the speed corresponding to the up event is less than or equal to the speed threshold, and the fifth refresh rate is the same as the first refresh rate.

[0033] In this way, sliding stops when the speed corresponding to the up event is low, and the refresh rate before and after the sliding operation remains consistent.

[0034] Optionally, the speed corresponding to the up event is greater than the speed threshold; when the speed corresponding to the up event is the third speed, the fifth refresh rate is the first value; when the speed corresponding to the up event is the fourth speed, the fifth refresh rate is the second value; the third speed is less than the fourth speed, and the first value is less than or equal to the second value.

[0035] In this way, when the speed of the up event is high, the hand-off sliding is started, and the speed is consistent with the hand-off sliding. The higher the speed corresponding to the up event, the higher the fifth refresh rate is, which meets the smoothness requirements of the display when the hand is off.

[0036] Optionally, the sliding operation corresponds to multiple move events, and the method also includes: determining that the speed of the sliding operation is a first speed based on the position information and time information corresponding to the first move event, and the position information and time information corresponding to the move event before the first move event; wherein, the first move event is a move event corresponding to when it is detected that the type of the sliding operation is sliding, or a move event after it is detected that the type of the sliding operation is sliding.

[0037] In this way, when the electronic device detects that the user operation is sliding, it determines the sliding speed of the non-hand-off sliding according to the input event (report point) corresponding to the sliding operation and accurately adjusts the refresh rate.

[0038] Optionally, the speed of the sliding operation is determined to be a second speed based on the position information and time information corresponding to the second move event, and the position information and time information corresponding to the move event before the second move event; the time interval between the second move event and the first move event is greater than a preset duration.

[0039] In this way, there is a certain time interval between the two refresh rate adjustments, which can reduce the number of refresh rate switching times and reduce the frequent switching of refresh rates.

[0040] Optionally, the first move event is a move event corresponding to when a sliding operation is detected as the user operation, or a move event after a sliding operation is detected as the user operation; the second move event is a move event after a preset time length of the first move event.

[0041] Optionally, when the third refresh rate is a first value, the preset duration is the first duration; when the third refresh rate is a second value, the preset duration is the second duration; wherein, the first value is greater than the second value, and the first duration is greater than the second duration.

[0042] In this way, the refresh rate is adjusted by slowly decreasing and quickly increasing. When the refresh rate is low, the electronic device can promptly increase the refresh rate to meet the display smoothness requirements; when the refresh rate is high, the refresh rate can be slowly reduced to reduce the power consumption of the electronic device.

[0043] Optionally, the first refresh rate is 10 Hz, the second refresh rate is 60 Hz, the third refresh rate is 120 Hz, the fourth refresh rate is 60 Hz, and the fifth refresh rate is 40 Hz.

[0044] Optionally, the first speed is in a first speed range, and the second speed is in a second speed range; the first speed range is different from the second speed range, and the third refresh rate is less than the fourth refresh rate.

[0045] In this way, it is convenient to confirm the refresh rate according to the speed, and the implementation is simple.

[0046] Optionally, the first application includes: system applications and third-party applications.

[0047] In a third aspect, an embodiment of the present application provides an electronic device, which may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device may be a mobile phone, a smart TV, a wearable device, a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.

[0048] The electronic device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method of the first aspect or the method of the second aspect.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of the first aspect or the method of the second aspect.

[0050] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, it enables the computer to execute the method of the first aspect or the method of the second aspect.

[0051] In a sixth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect or the method of the second aspect.

[0052] It should be understood that the third to sixth aspects of the present application correspond to the technical solutions of the first or second aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] FIG1A is a schematic diagram of a sliding operation detected by an electronic device in one possible design;

[0054] FIG1B is a schematic diagram of a click operation detected by an electronic device in a possible design;

[0055] FIG2 is a schematic diagram of a software framework of an electronic device provided in an embodiment of the present application;

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

[0057] FIG4 is a schematic flow chart of a refresh rate switching method provided in an embodiment of the present application;

[0058] FIG5 is a schematic diagram of a sliding operation detected by an electronic device according to an embodiment of the present application;

[0059] FIG6 is a schematic flow chart of a refresh rate switching method provided in an embodiment of the present application;

[0060] FIG7 is a schematic diagram of the interaction between internal modules in a sliding operation scenario provided by an embodiment of the present application;

[0061] FIG8A is a schematic diagram of a sliding operation detected by an electronic device according to an embodiment of the present application;

[0062] FIG8B is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application;

[0063] FIG9 is a schematic diagram of interaction between internal modules provided in an embodiment of the present application;

[0064] FIG10 is a schematic diagram of a click operation detected by an electronic device according to an embodiment of the present application;

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

[0066] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0067] 1. Frame: This refers to the smallest unit of a single image in an interface display. A frame can be thought of as a still image. Displaying multiple frames in rapid succession can create the illusion of motion. Frame rate refers to the number of frames that refresh an image in one second. It can also be understood as the number of times a graphics processor in an electronic device refreshes the image per second. A higher frame rate results in smoother and more realistic animation. The more frames per second, the smoother the displayed motion.

[0068] It should be noted that before the interface displays a frame, it usually needs to go through processes such as drawing, rendering, and synthesis.

[0069] 2. Frame drawing: refers to the image drawing of the display interface. The display interface can be composed of one or more views. Each view can be drawn by the visual control of the view system. Each view is composed of subviews. A subview corresponds to a small widget in the view. For example, a subview corresponds to a symbol in the image view.

[0070] 3. Frame rendering: This is to shade the drawn view or add 3D effects, etc. For example, 3D effects can be lighting effects, shadow effects, and texture effects.

[0071] 4. Frame synthesis: It is the process of synthesizing multiple or more rendered views into a display interface.

[0072] 5. Hands-on sliding: refers to the sliding display based on the sliding operation on the interface of the electronic device.

[0073] For example, in applications such as Settings and Headlines, the interface displays a list layout, and non-hands-off sliding refers to the process of displaying the interface based on the user's finger sliding.

[0074] It is understandable that when the interface includes a list control, the interface displays a list layout, which is a list interface. The list control can be a listview or a recyleview, and the embodiment of the present application does not limit the list control.

[0075] 6. Other terms

[0076] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.

[0077] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0078] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0079] In the embodiments of the present application, "at..." can mean the instant a certain situation occurs, or a period of time after a certain situation occurs, and the embodiments of the present application do not specifically limit this. In addition, the interface of the electronic device provided in the embodiments of the present application is only an example, and the interface can also include more or less content.

[0080] 7. Electronic devices

[0081] The electronic device of the embodiment of the present application may be in any form. For example, the electronic device may include a handheld device with a display function, a vehicle-mounted device, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, electronic devices in 5G networks or future evolved public land mobile communication networks (PLMNs). The electronic devices in the network (PLMN) are not limited to this in the embodiments of the present application.

[0082] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0083] In addition, in the embodiment of the present application, the electronic device can also be an electronic device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0084] The electronic device in the embodiments of the present application may also be referred to as: electronic device, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0085] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0086] Currently, users can browse various types of content on the display screens of electronic devices. When there is a lot of content, the display screen cannot display all of it at once. Users can use swiping operations to control the display screen to slide and display related content.

[0087] In a possible design, when the electronic device receives a sliding operation or a click operation, the electronic device will adjust from a lower refresh rate to a higher refresh rate. For example, taking the electronic device display setting interface as an example, when the electronic device receives a sliding operation, the electronic device refreshes the display at a frequency of 120Hz.

[0088] It should be noted that the types of input events detected by electronic devices include: press (down), move (move), and lift (up). A down event is the first time the electronic device detects a press during a user operation. A move event is an input event that detects a press other than the first time a press is detected. An up event is an input event when the electronic device detects that the press has ceased.

[0089] When an electronic device receives a user's slide operation, the input events detected include: a down event, a series of move events, and an up event. When an electronic device receives a user's click operation, the input events detected include: a down event and an up event; when an electronic device receives a user's click operation, the input events detected include: a move event.

[0090] For example, Figure 1A is a schematic diagram of a sliding operation detected by an electronic device. As shown in Figure 1A, when the electronic device receives the sliding operation, the electronic device displays the interface corresponding to the sliding operation based on 120Hz.

[0091] Specifically, when the electronic device receives a down event, it adjusts the refresh rate to 120Hz. When the electronic device receives a move event, it continues to refresh the display at 120Hz until it receives an up event. After the up event, the display of the electronic device is related to the subsequent displayed content and is not limited here.

[0092] As shown in Figure 1A, the electronic device refreshes its display at a higher refresh rate after receiving a down event. For example, during a non-hands-off swipe, the electronic device's refresh rate is independent of the speed corresponding to the move event and always refreshes the display at a higher refresh rate. However, this results in higher power consumption for the electronic device.

[0093] Since a click operation is similar to a slide operation, in a possible design, the electronic device will also refresh the display at a higher refresh rate when receiving a click operation.

[0094] For example, FIG1B is a schematic diagram of a click operation detected by an electronic device. As shown in FIG1B , when the electronic device receives a click operation, the electronic device displays the interface corresponding to the click operation based on 120Hz. As can be seen from FIG1B , compared to the sliding operation shown in FIG1A , the click operation includes fewer move events. In some embodiments, the click operation may not include a move event.

[0095] Because click operations are similar to sliding operations, when the electronic device receives a down event, it adjusts the refresh rate to 120Hz; when the electronic device receives a move event, it continues to refresh the display at 120Hz until it receives an up event. After the up event, the display of the electronic device is related to the subsequent displayed content and is not limited here. In Figure 1B, after receiving the down event, the electronic device refreshes the display at a higher refresh rate. However, this will increase the power consumption of the electronic device.

[0096] As can be seen from Figures 1A and 1B, the electronic device will refresh the display at a higher refresh rate after receiving a down event. For example, during a non-hands-off swipe, the electronic device's refresh rate is independent of the speed corresponding to the move event and is refreshed at a higher refresh rate, resulting in high power consumption.

[0097] In view of this, embodiments of the present application provide a refresh rate switching method and related apparatus. The method determines the real-time speed of a non-hands-off sliding operation based on the input event (report point) corresponding to the sliding operation, and adjusts the refresh rate of the electronic device based on the real-time speed. When the real-time speed is high, the refresh rate is high; when the real-time speed is low, the refresh rate is low. In this way, adjusting the refresh rate in real time can meet the display smoothness requirements when the real-time speed is high, and can also reduce power consumption when the real-time speed is low.

[0098] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, some embodiments may not be described in detail.

[0099] For ease of understanding, the software architecture and application scenarios of the electronic device provided in the embodiments of the present application are described below with reference to the accompanying drawings.

[0100] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0101] For example, Figure 2 is a schematic diagram of the software framework of an electronic device provided in an embodiment of the present application. As shown in Figure 2, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0102] The application layer can include a series of application packages. As shown in Figure 2, the application package can include applications such as phone, email, calendar, camera, etc.

[0103] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0104] As shown in FIG2 , the application framework layer may include an input system (input dispatcher), an activity manager, a location manager, a notification manager, an activity manager, an image synthesis system (surface flinger), and a view system, etc.

[0105] The input system is used to manage input device programs. For example, the input system can determine input operations such as mouse clicks, keyboard inputs, and touch slides. In embodiments of the present application, the input system is also used to determine the refresh rate based on the real-time speed corresponding to the slide operation and transmit this refresh rate to the image synthesis system to adjust the refresh rate of the electronic device.

[0106] The Activity Manager is used to manage the lifecycle of each application and the navigation back function. It is responsible for creating the Android main thread and maintaining the lifecycle of each application.

[0107] The location manager is used to provide location services to applications, including querying the last known location, registering and unregistering from periodic location updates, etc.

[0108] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0109] The Activity Manager Service (AMS) manages the lifecycle of each application and the navigation back function. It is responsible for creating the Android main thread and maintaining the lifecycle of each application.

[0110] The image synthesis system controls image synthesis and generates vertical synchronization (Vsync) signals. The image synthesis system includes a synthesis thread, a Vsync thread, and a queue buffer thread. The synthesis thread is awakened by the Vsync signal to perform synthesis. The Vsync thread generates the next Vsync signal based on the Vsync signal request. The queue buffer thread stores buffers, generates Vsync signal requests, and wakes up the synthesis thread.

[0111] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0112] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0113] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0114] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0115] The system library can include multiple functional modules, such as the image rendering library, image synthesis library, function library, media library, and input processing library. The image rendering library is used for rendering 2D or 3D images. The image synthesis library is used for synthesizing 2D or 3D images.

[0116] In a possible implementation, the application renders the image using the image rendering library, and then sends the rendered image to the cache queue of the image compositing system. Whenever a Vsync signal arrives, the image compositing system (e.g., a surface flinger) sequentially retrieves a frame of image to be synthesized from the cache queue, and then performs image synthesis using the image compositing library.

[0117] The function library provides macros, type definitions, string operation functions, mathematical calculation functions, and input and output functions used in the C language.

[0118] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0119] The input processing library is a library used to process input devices, which can implement mouse, keyboard and touch input processing, etc.

[0120] The kernel layer is the layer between hardware and software. It includes at least the touch panel (TP) driver, display driver, Bluetooth driver, Wi-Fi driver, keyboard driver, shared memory driver, and camera driver. Hardware can include audio devices, Bluetooth devices, camera devices, sensor devices, and more.

[0121] The following describes the workflow of the software and hardware of the electronic device 100 by way of example, in conjunction with the scenario of application startup or interface switching within an application.

[0122] When the touch sensor in the touch panel receives a touch operation, the kernel layer processes the touch operation into an original input event (including touch coordinates, touch force, timestamp of the touch operation, and other information). The original input event is stored in the kernel layer. The kernel layer reports the original input event to the input system of the application framework layer through the input processing library. The input system of the application framework layer parses the information of the original input event (including: operation type, timestamp, and reporting point position, etc.) and determines the focus application based on the current focus, and sends the parsed information to the focus application. The focus can be the touch point in a touch operation or the click position in a mouse click operation. The focus application is the application running in the foreground of the electronic device or the application corresponding to the touch position in the touch operation. The focus application determines the control corresponding to the original input event based on the parsed information of the original input event (for example, the reporting point position).

[0123] Taking the touch operation as a touch sliding operation, and the control corresponding to the touch sliding operation as the list control of the WeChat application as an example, the WeChat application calls the image rendering library in the system library through the view system of the application framework layer to draw and render the image. The WeChat application sends the drawn and rendered image to the cache queue of the image synthesis system. The image synthesis library in the system library synthesizes the drawn and rendered image in the image synthesis system into the WeChat interface. The image synthesis system uses the display driver of the kernel layer to make the screen (display) display the corresponding interface of the WeChat application.

[0124] The application scenarios provided by the embodiments of the present application are described below with reference to the accompanying drawings. FIG3 is a schematic diagram of the application scenarios provided by the embodiments of the present application.

[0125] The electronic device can receive a user's upward or downward swipe operation in the interface of a social application shown in FIG3 a, or in the interface of a settings application shown in FIG3 b, or in the document interface shown in FIG3 c, or in the product browsing interface shown in FIG3 d, etc. The electronic device can also receive a user's left or right swipe operation in the interface shown in FIG3 e, or in the e-book interface shown in FIG3 f, etc. When the electronic device receives a user's swipe operation, the electronic device performs frame drawing, rendering, synthesis, and other processes based on the swipe operation to display the content corresponding to the swipe operation.

[0126] It is understood that the interfaces of the social application, settings application, and document interface shown in Figure 3 are merely examples, and the method of the embodiments of the present application can also be applied to scenarios where an electronic device displays the interface of a news application, a video application, or any other slidable interface (page) in an app. Slidable interfaces may include list interfaces or other types of interfaces, which are not limited here.

[0127] The refresh rate switching method provided by the embodiment of the present application is described below in conjunction with Figures 4 to 10. For example, Figure 4 is a flow chart of a refresh rate switching method provided by the embodiment of the present application. As shown in Figure 4, the method includes:

[0128] S401: The electronic device displays an application interface of a first application at a first refresh rate.

[0129] The first application is an application with a slidable display interface, such as a social application, a settings application, a news application, a video application, etc. The specific type and name of the first application are not limited in this embodiment of the application. The first refresh rate can be 10Hz, 30Hz, or any other value, which is not limited here.

[0130] S402: The electronic device detects a sliding operation performed by the user on the application interface.

[0131] S403: Refresh the application interface of the first application based on the sliding operation.

[0132] When the sliding speed of the sliding operation is high, the refresh rate of the display screen is increased; when the sliding speed of the sliding operation is low, the refresh rate of the display screen is decreased.

[0133] In some embodiments, the electronic device determines a first target refresh rate corresponding to the sliding speed based on the sliding speed of the sliding operation.

[0134] In an embodiment of the present application, when the sliding speed of the sliding operation is a first speed, the application interface is refreshed and displayed at the first value; when the sliding speed is a second speed, the application interface is refreshed and displayed at the second value. If the first speed is less than the second speed, the first value is less than the second value. If the first speed is greater than the second speed, the first value is greater than or equal to the second value. In some embodiments, the electronic device is pre-set with a correspondence between speed and refresh rate. The electronic device can confirm the adjusted refresh rate based on this correspondence and the sliding speed of the sliding operation.

[0135] In some other embodiments, the electronic device is pre-set with a correspondence between the speed intervals and the refresh rate. The electronic device can confirm the adjusted refresh rate based on the correspondence and the sliding speed of the sliding operation.

[0136] For example, the correspondence between the speed range and the refresh rate can be shown in Table 1. When the sliding speed is greater than or equal to 480 pixels / s, the refresh rate is adjusted to 120 Hz; when the sliding speed is greater than or equal to 240 pixels / s and less than 480 pixels / s, the refresh rate is adjusted to 90 Hz; when the sliding speed is greater than or equal to 90 pixels / s and less than 240 pixels / s, the refresh rate is adjusted to 6 Hz; when the sliding speed is greater than or equal to 60 pixels / s and less than 90 pixels / s, the refresh rate is adjusted to 40 Hz; when the sliding speed is less than 60 pixels / s, the refresh rate is adjusted to 30 Hz.

[0137] Table 1 Correspondence table

[0138] It can be understood that the correspondence shown in Table 1 is only an example, and the embodiment of the present application does not limit the correspondence between the speed range and the refresh rate.

[0139] This allows electronic devices to adjust their refresh rates in real time based on the speed of a sliding operation. At slower speeds, a lower refresh rate is used to refresh the display, reducing power consumption. At higher speeds, a higher refresh rate is used to refresh the display, improving display smoothness and enhancing the user experience.

[0140] For example, Figure 5 is a schematic diagram of a sliding operation detected by an electronic device according to an embodiment of the present application. As shown in Figure 5, when the electronic device receives the sliding operation, the electronic device displays an interface based on the speed corresponding to the move event.

[0141] Specifically, when the electronic device receives a down event, it adjusts the refresh rate to 60Hz. When the electronic device receives a move event, it adjusts the refresh rate based on the speed corresponding to the move event until it receives an up event. When the speed corresponding to the move event is high, the refresh rate is high; when the speed corresponding to the move event is low, the refresh rate is low. After the up event, the electronic device adjusts the refresh rate based on the speed corresponding to the up event.

[0142] Compared to the sliding operation diagram shown in Figure 1A, the sliding operation diagram shown in Figure 5 shows that the electronic device can adjust the refresh rate based on the real-time speed corresponding to the sliding operation. When the speed corresponding to the move event is high, the refresh rate is high to meet the display smoothness requirements; when the speed corresponding to the move event is low, the refresh rate is low to reduce power consumption.

[0143] Optionally, before determining the first target refresh rate, the method further includes: the electronic device detecting multiple move events corresponding to the sliding operation; and determining the sliding speed based on position information and time information of the multiple move events.

[0144] In this embodiment of the present application, the sliding speed of a sliding operation refers to the speed corresponding to the most recent input event. For example, if the Bth input event is received at 100ms and the B+Cth input events are received at 200ms, the sliding speed of the sliding operation at 100ms is the speed corresponding to the Bth input event; the sliding speed of the sliding operation at 200ms is the speed corresponding to the B+Cth input events.

[0145] In an embodiment of the present application, the electronic device can obtain the relationship between position and time by processing the position information and time information of multiple input events; and obtain the speed corresponding to the most recent input event through the relationship between position and time.

[0146] In some embodiments, the electronic device may perform fitting processing on the time and position of input events received within a period of time to obtain a quadratic polynomial formula (y=ax2+bx+c); y represents the position, x represents the time interval from the last input event; and the speed corresponding to the last input event is b.

[0147] For example, taking a time period of 100ms as an example, the electronic device receives the Bth input event at 100ms and the B+Cth input events at 200ms. The electronic device can fit the positions, times, etc. of the Bth to B+Cth input events detected from 100ms to 200ms to obtain a fitted quadratic polynomial formula (y=ax²+bx+c), where y represents the position and x represents the time interval from the B+Cth input events. The speed corresponding to the B+Cth input events is b.

[0148] In other embodiments, the electronic device may perform fitting processing on the time and position of a preset number of input events to obtain a quadratic polynomial formula (y=ax2+bx+c); y represents the position, x represents the time interval with the last input event; and the speed corresponding to the last input event is b.

[0149] For example, taking the preset number M as an example, the electronic device receives the B+Cth input event in 200ms; the electronic device can fit the position, time, etc. of the B+1th input event to the B+Cth input event to obtain the fitted quadratic polynomial formula (y=ax2+bx+c), where y represents the position and x represents the time interval with the B+Cth input event. The speed corresponding to the B+Cth input event is b. The embodiment of the present application does not limit the calculation process of the speed corresponding to the input event.

[0150] Based on the above embodiment, when the electronic device adjusts the refresh rate of the electronic device based on the sliding speed of the sliding operation, a time interval is set between any two refresh rate adjustments.

[0151] Optionally, the electronic device determines a sliding speed based on the location information and time information of multiple move events, including: the electronic device determines a first speed based on the location information and time information of M move events detected in a first time period; the electronic device determines a second speed based on the location information and time information of N move events detected in a second time period; M and N are both integers greater than a preset threshold; and the time interval between the last moment in the first time period and the last moment in the second time period is greater than a preset duration. When the sliding speed of the sliding operation is the first speed, the refresh rate of the display screen is the second refresh rate; when the sliding speed is the second speed, the refresh rate of the display screen is the third refresh rate.

[0152] The preset threshold value can be 10, 5, or any value, which is not limited here.

[0153] In this way, there is a certain time interval between the two refresh rate adjustments, which can reduce the number of refresh rate switching times and reduce the frequent switching of refresh rates.

[0154] In some embodiments, when the electronic device detects that the type of user operation is a slide, the electronic device adjusts the refresh rate of the display screen to a second refresh rate based on the speed corresponding to the first move event; the first move event is a move event corresponding to when the electronic device detects that the user operation is a slide, or a move event corresponding after the electronic device detects that the user operation is a slide;

[0155] After adjusting to the preset duration of the second refresh rate, the refresh rate of the display screen is adjusted to the third refresh rate based on the speed corresponding to the second move event; the second move event is the most recent move event detected by the electronic device when it is adjusted to the preset duration of the second refresh rate.

[0156] In this way, there is a certain time interval between the two refresh rate adjustments, which can reduce the number of refresh rate switching times and reduce the frequent switching of refresh rates.

[0157] In some embodiments, the speed corresponding to the first move event is not the speed corresponding to the electronic device before detecting that the user operation type is a slide. In this way, when the refresh rates are different, switching the refresh rate can reduce the number of refresh rate switches and reduce the lag caused by refresh rate switching.

[0158] In some embodiments, the electronic device can achieve the preset duration through a timer. For example, after confirming the refresh rate, the electronic device is provided with a timer. When the timer expires, the refresh rate is confirmed again.

[0159] In other embodiments, after confirming the refresh rate, the electronic device records the time corresponding to the confirmation of the refresh rate; if the difference between the current time and the time is less than a preset time period, no processing is performed; if the difference between the current time and the time is greater than or equal to the preset time period, the refresh rate is confirmed again and the time corresponding to the confirmation of the refresh rate is updated. The embodiments of the present application do not specifically limit the method for reconfirming the refresh rate.

[0160] In some embodiments, the preset duration corresponds to the second refresh rate. When the second refresh rate is higher, the preset duration is longer; when the second refresh rate is lower, the preset duration is shorter. For example, when the second refresh rate is a first value, the preset duration is greater than or equal to when the second refresh rate is a second value; wherein the first value is greater than the second value.

[0161] In this way, the refresh rate is adjusted by slowly decreasing and quickly increasing. When the refresh rate is low, the electronic device can promptly increase the refresh rate to meet the display smoothness requirements; when the refresh rate is high, the refresh rate can be slowly reduced to reduce the power consumption of the electronic device.

[0162] In an embodiment of the present application, the electronic device can confirm the preset duration based on the second refresh rate and the corresponding relationship between the refresh rate and the preset duration. Exemplarily, the electronic device is pre-set with a corresponding relationship between the refresh rate and the preset duration. The electronic device can confirm the preset duration based on the corresponding relationship.

[0163] For example, the correspondence between the refresh rate and the preset duration can be shown in Table 2. When the refresh rate is adjusted to 120 Hz, the preset duration is 200 ms; when the refresh rate is adjusted to 90 Hz, the preset duration is 200 ms; when the refresh rate is adjusted to 60 Hz, the preset duration is 100 ms; when the refresh rate is adjusted to 40 Hz, the preset duration is 50 ms; when the refresh rate is adjusted to 30 Hz, the preset duration is 50 ms.

[0164] Table 2 Correspondence table

[0165] It can be understood that the correspondence shown in Table 2 is only an example, and the embodiment of the present application does not limit the correspondence between the refresh rate and the preset time length.

[0166] Based on the above embodiment, before detecting a sliding operation of the user on the application interface, the method further includes: when detecting that the input event is a down event, displaying the application interface at a fourth refresh rate.

[0167] The fourth refresh rate can be 60Hz, 90Hz, or any value, which is not limited here.

[0168] The fourth refresh rate is a preset refresh rate.

[0169] It is understandable that the refresh rate of the interface displayed by the electronic device may be low when no user operation is received. After receiving the user operation, it is adjusted to a higher refresh rate to facilitate subsequent display based on the user operation and improve the smoothness of the display.

[0170] Based on the above embodiment, after the sliding operation ends, the electronic device can confirm whether it enters the hand-off sliding based on the sliding speed at the end of the sliding operation.

[0171] Specifically, when the speed corresponding to the up event corresponding to the sliding operation is greater than the second threshold, the application interface of the first application is refreshed and displayed at the fifth refresh rate. The fifth refresh rate corresponds to the speed corresponding to the up event. When the speed corresponding to the up event corresponding to the sliding operation is less than or equal to the second threshold, the application interface of the first application is refreshed and displayed at the first refresh rate.

[0172] The fifth refresh rate corresponds to the speed corresponding to the up event. This means that if the speed corresponding to the up event is the third speed, the fifth refresh rate is the first value; if the speed corresponding to the up event is the fourth speed, the fifth refresh rate is the second value; and if the third speed is less than the fourth speed, the first value is less than or equal to the second value. Thus, the higher the speed corresponding to the up event, the higher the fifth refresh rate, ensuring smooth display when the user releases the hand.

[0173] The electronic device can process the location and time information of the up event, as well as the location and time information of the A move events preceding the up event, to determine the speed corresponding to the up event. A is an arbitrary positive integer. The speed corresponding to the up event is calculated in a similar manner to the speed corresponding to the move event described above and will not be further described here.

[0174] The second threshold may be 100 pixels / s or any other value, which is not limited in the embodiment of the present application.

[0175] In some embodiments, the electronic device may determine the sliding speed during the off-hand slide based on the speed corresponding to the up event and the speed curve corresponding to the off-hand slide, and then adjust the refresh rate of the electronic device based on the sliding speed during the off-hand slide.

[0176] In this way, when the speed corresponding to the up event is high, the hand-off sliding is started; when the speed corresponding to the up event is low, the sliding is stopped.

[0177] Based on the above embodiment, the electronic device further stores an application list. When the application corresponding to the user operation is an application in the application list, the electronic device uses the above method to adjust the refresh rate in real time based on the user operation. When the application corresponding to the user operation is not an application in the application list, the electronic device refreshes the display at a higher refresh rate upon receiving the user operation.

[0178] For example, FIG6 is a flow chart of a refresh rate switching method provided in an embodiment of the present application. As shown in FIG6 , the method includes:

[0179] S601: The electronic device displays an application interface of a first application at a first refresh rate.

[0180] S602: In response to a user operation, the electronic device detects multiple input events corresponding to the user operation.

[0181] S603: The electronic device receives a down event and displays the interface of the first application at the fourth refresh rate.

[0182] S604: When the distance between the coordinates of the move event received by the electronic device and the coordinates of the down event is greater than a first threshold, the electronic device determines that the user operation is a sliding operation.

[0183] The distance in the embodiments of the present application refers to the distance in the sliding direction. Taking the vertical sliding up and down as an example, the distance between the coordinates of the move event and the coordinates of the down event refers to the distance between the coordinates of the move event and the coordinates of the down event in the vertical direction; taking the horizontal sliding left and right as an example, the distance between the coordinates of the move event and the coordinates of the down event refers to the distance between the coordinates of the move event and the coordinates of the down event in the horizontal direction. The embodiments of the present application do not specifically limit the sliding direction.

[0184] S605: The electronic device adjusts the refresh rate based on the sliding speed of the sliding operation.

[0185] The specific execution process of S605 can refer to the above corresponding description and will not be repeated here.

[0186] S606: When the distance between the coordinates of the move event received by the electronic device and the coordinates of the down event is less than a first threshold, the electronic device does not adjust the refresh rate.

[0187] S607: When the electronic device receives the up event, the electronic device adjusts the refresh rate based on the control corresponding to the position operated by the user.

[0188] When the electronic device receives an up event, the distance between the coordinates of the move event and the coordinates of the down event is less than the first threshold, and the electronic device adjusts the refresh rate based on the control corresponding to the position of the user operation.

[0189] In this way, after receiving a sliding operation, the electronic device can adjust the refresh rate based on the sliding speed of the sliding operation to reduce the power consumption of the electronic device; and does not adjust the refresh rate when receiving a click operation to reduce the power consumption of the electronic device.

[0190] The following describes the interaction process between the internal modules of the electronic device in different user operations with reference to Figures 7 to 10. Figures 7 to 8B illustrate the interaction process corresponding to a sliding operation; Figures 9 and 10 illustrate the interaction process corresponding to a clicking operation.

[0191] For example, Figure 7 is a schematic diagram of the interaction between internal modules in a sliding operation scenario provided by an embodiment of the present application. Taking an electronic device including a touch panel (TP), an input system, and an image synthesis system as an example, as shown in Figure 7, the refresh rate switching process includes: the electronic device receives a user operation while displaying a list interface at a first refresh rate.

[0192] S701: The touch panel (TP) collects information corresponding to user operations and transmits raw input events to the input system. The raw input events include touch coordinates, touch force, touch operation timestamp, and other information.

[0193] The frequency at which the touch panel (TP) collects information corresponding to user operations can be referred to as the touch sampling rate. The touch sampling rate can be a preset sampling frequency. The touch panel (TP) transmits raw input events to the input system at the touch sampling rate. The touch sampling rate can be 300 times / second, 120 times / second, or any other arbitrary value, and is not limited in the embodiments of the present application.

[0194] S702: When the input system receives (detects) the first original input event, it parses the first original input event to obtain a down event.

[0195] In some embodiments, after receiving the down event, the input system clears the relevant parameters corresponding to the last user operation and / or configures the relevant flag bit. In this way, the interference of the parameters of the last operation can be eliminated, reducing the misidentification of the current operation.

[0196] Related flags include but are not limited to: a flag for indicating the operation type, a flag for indicating the current refresh rate, a flag for determining the refresh rate adjustment, etc.

[0197] Exemplary flags for indicating the operation type include click and move; flags for indicating the current refresh rate include boost; and flags for indicating refresh rate adjustment include first checked and last check time. First checked indicates whether the refresh rate is switched for the first time. Last check time indicates the time of the last refresh rate switch.

[0198] In some embodiments, boost is used to indicate that the current refresh rate is higher or lower. For example, boost = false is used to indicate that the current refresh rate is lower; boost = true is used to indicate that the current refresh rate is higher. In other embodiments, boost is used to indicate the specific value of the current refresh rate. For example, boost = 60 is used to indicate that the current refresh rate is 60 Hz; boost = 90 is used to indicate that the current refresh rate is 90 Hz. This embodiment of the present application is not limited to this.

[0199] Because the input system cannot distinguish between click and slide operations when detecting a down event, the electronic device defaults to a click operation. The corresponding values ​​of each flag bit are: click = true; move = false; boost = false; first checked = false; last check time = 0.

[0200] For example, taking the schematic diagram corresponding to the sliding operation shown in FIG8A as an example, the electronic device receives a down event at time t1, and the values ​​corresponding to the flags are: click=true; move=false; boost=false; first checked=false; and last check time=0.

[0201] In some embodiments, upon receiving the down event, the input system transmits a message indicating the fourth refresh rate to the image composition system. Adaptively, the image composition system controls the electronic device to switch from the first refresh rate to the fourth refresh rate.

[0202] S703: When receiving the second original input event, the input system parses the second original input event to obtain a move event.

[0203] S704: When the distance between the coordinates corresponding to the move event and the coordinates corresponding to the down event is greater than a first threshold, the input system confirms that the user operation is a sliding operation.

[0204] The first threshold may be 24 pixels, 30 pixels, or any other value. The embodiment of the present application does not limit the specific value of the first threshold.

[0205] It can be understood that when the distance between the coordinates corresponding to the move event and the coordinates corresponding to the down event is less than or equal to the first threshold, the values ​​corresponding to the respective flag bits remain unchanged.

[0206] When the input system confirms that the user operation is a sliding operation, the values ​​corresponding to each flag bit are: click = false; move = true; boost = false; first checked = false; last check time = 0.

[0207] For example, using the schematic diagram corresponding to a sliding operation shown in Figure 8A as an example, the electronic device receives a down event at time t1 and, after time t1, receives a move event. The coordinates corresponding to the move event received at time t2 are less than or equal to the first threshold, and the electronic device confirms at time t2 that the user operation is a click operation. The values ​​corresponding to each flag bit remain unchanged: click = true; move = false; boost = false; first checked = false; last check time = 0.

[0208] At time t3, the distance between the coordinates corresponding to the move event received and the coordinates corresponding to the down event is greater than the first threshold, and the electronic device determines at time t3 that the user operation is a sliding operation. The flag indicating the operation type changes, for example, click = false; move = true.

[0209] S705: After confirming that the user operation is a sliding operation, the input system determines a second refresh rate based on the speed corresponding to the first move event.

[0210] Adaptively, after the input system confirms the second refresh rate, the values ​​corresponding to each flag bit are: click = false; move = true; boost = true; first checked = true; last check time = the time corresponding to the first move event.

[0211] In the embodiment of the present application, the first move event may be a move event corresponding to confirming that the user operation is a sliding operation, or may be a move event detected after confirming that the user operation is a sliding operation.

[0212] In a possible implementation method one, the electronic device calculates and confirms the speed corresponding to the move event corresponding to the user operation as a sliding operation, and calculates the speed corresponding to the corresponding move event detected after the user operation is a sliding operation, until the refresh rate corresponding to the speed corresponding to the move event is different from the first refresh rate.

[0213] For example, using the schematic diagram corresponding to a sliding operation shown in FIG8A as an example, before time t3, the refresh rate of the electronic device is 60 Hz. At time t3, the electronic device determines that the user operation is a sliding operation, calculates the speed corresponding to the move event received at time t3 as 500 pixels / s, and determines the refresh rate to be 120 Hz based on the speed corresponding to the move event.

[0214] Accordingly, the flag bits indicating the current refresh rate and the flag bits indicating the refresh rate adjustment change, for example, boost = true; first checked = true; last check time = t3.

[0215] It can be understood that if the electronic device calculates that the speed corresponding to the move event received at time t3 is 200 pixels, and the refresh rate confirmed by the move event at time t3 is 60 Hz; then the electronic device calculates the speed corresponding to the move event received at time t4 until it confirms that the refresh rate is not 60 Hz based on the speed corresponding to the move event.

[0216] In a second possible implementation, the electronic device adjusts the refresh rate based on the speed corresponding to the move event corresponding to the sliding operation confirmed to be the user operation.

[0217] For example, taking the schematic diagram corresponding to the sliding operation shown in Figure 8A as an example, the electronic device confirms that the user operation is a sliding operation at time t3, and the electronic device calculates that the speed corresponding to the move event received at time t3 is 500 pixels / s, and confirms that the refresh rate is 120Hz based on the speed corresponding to the move event.

[0218] In a third possible implementation, the electronic device adjusts the refresh rate based on a speed corresponding to a move event detected after confirming that the user operation is a sliding operation.

[0219] For example, taking the schematic diagram corresponding to the sliding operation shown in FIG8A as an example, the electronic device confirms that the user operation is a sliding operation at time t3, calculates the speed corresponding to the move event received at time t4, and determines the refresh rate based on the speed.

[0220] S706: The input system transmits a message indicating the second refresh rate to the image synthesis system.

[0221] Adaptively, the image synthesis system controls the refresh rate of the electronic device to a second refresh rate.

[0222] In some embodiments, the image synthesis system generates a Vsync signal according to a period duration corresponding to the second refresh rate to control the time intervals of drawing, rendering, synthesis, display, and other processes.

[0223] S707: When the first duration after S605 arrives, the input system determines the third refresh rate based on the speed corresponding to the second move event. The first duration corresponds to the second refresh rate.

[0224] It is understandable that after the input system confirms the second refresh rate, the values ​​corresponding to the flags are: click=false; move=true; boost=true; first checked=true; last check time=the time corresponding to the second move event.

[0225] The correspondence between the second refresh rate and the first duration can be referred to the above corresponding description, which will not be repeated here.

[0226] The second move event is the move event closest to the first duration after S705 obtained before the first duration after S705, which can also be understood as the most recent move event.

[0227] For example, using the schematic diagram corresponding to the sliding operation shown in FIG8A as an example, the electronic device adjusts the refresh rate to 120 Hz at time t3. When the preset duration at time t3 expires, the second move event is a move event detected by the electronic device at time t6. The electronic device calculates the speed corresponding to the move event at time t6 as 200 pixels / s and determines the refresh rate to be 60 Hz based on the speed corresponding to the move event at time t6.

[0228] Accordingly, the flag indicating the current refresh rate and the flag indicating the refresh rate adjustment change, for example, boost = false; first checked = true; last check time = t6.

[0229] S708: The input system transmits a message indicating the third refresh rate to the image synthesis system.

[0230] Adaptively, the image synthesis system controls the electronic device to switch from the second refresh rate to the third refresh rate.

[0231] In some embodiments, the image synthesis system generates a Vsync signal according to a period duration corresponding to the third refresh rate to control the time intervals of drawing, rendering, synthesis, display, and other processes.

[0232] It should be noted that if the second refresh rate is the same as the third refresh rate, the electronic device may not execute S708 or 7608.

[0233] In some embodiments, the image composition system generates a Vsync signal based on a third refresh rate.

[0234] S709 : The input system analyzes the third original input event within the second time period after S707 and detects an up event.

[0235] For example, taking the schematic diagram corresponding to the sliding operation shown in FIG8A as an example, the electronic device adjusts the refresh rate to 60 Hz, detects an up event before the preset duration at time t6, and calculates the speed corresponding to the up event.

[0236] S710: When the speed corresponding to the up event is less than the second threshold, the input system transmits a message indicating a first refresh rate to the image synthesis system.

[0237] Adaptively, the image synthesis system controls the electronic device to switch from the third refresh rate to the first refresh rate.

[0238] S711. After receiving the up event, the input system clears the relevant parameters corresponding to the user operation.

[0239] Related parameters include but are not limited to: the above flags, coordinates corresponding to the down event, coordinates corresponding to the move event, coordinates corresponding to the up event, etc.

[0240] It can be understood that when the speed corresponding to the up event is greater than or equal to the second threshold, the electronic device subsequently determines the fifth refresh rate based on the speed curve and the speed corresponding to the up event.

[0241] For example, taking the speed corresponding to the up event as 80 pixels / s, the fifth refresh rate is 40 Hz. The relationship between the speed and the fifth refresh rate can be referred to the above corresponding description, which will not be repeated here.

[0242] In this way, the electronic device can adjust its refresh rate based on the move event. When the sliding speed corresponding to the sliding operation is slow, the refresh rate is reduced to reduce power consumption; when the sliding speed corresponding to the sliding operation is fast, the refresh rate is increased to ensure smooth sliding display and improve the user experience. In addition, clearing the corresponding flag in S711 can reduce interference with subsequent user operation judgment and reduce the risk of misidentification.

[0243] For example, Figure 8B is a schematic diagram of an interface corresponding to the sliding operation shown in Figure 8A provided by an embodiment of the present application. Take the example of an electronic device receiving a user's sliding operation when displaying a settings interface.

[0244] The interface shown in a in Figure 8B is a settings interface. Before time t1, the electronic device refreshes the settings interface at a frequency of 10 Hz without receiving any user operation.

[0245] At time t1, the electronic device detects a down event corresponding to the user's sliding operation and adjusts the refresh rate of the display screen to 60 Hz. After time t1, the display screen refreshes the display setting interface at a frequency of 60 Hz (as shown in b in FIG8B ).

[0246] From time t1 to time t3, the display refreshes the display setting interface at a frequency of 60 Hz.

[0247] At time t3, the electronic device determines that the user operation is a slide and begins calculating the speed corresponding to the move event. The electronic device calculates the speed corresponding to the move event to be 500 pixels / s and adjusts the refresh rate of the display to 120 Hz.

[0248] After time t3, the display screen refreshes the display setting interface at a frequency of 120 Hz (as shown in c in FIG8B ).

[0249] From time t3 to time t6, the display refreshes the display setting interface at a frequency of 120 Hz.

[0250] At time t6, the preset duration is reached, and the speed corresponding to the move event obtained by the electronic device is 200 pixels / s, and the refresh rate of the display is adjusted to 60Hz.

[0251] After time t6, the display screen refreshes the display setting interface at a frequency of 60 Hz (as shown in d in FIG8B ).

[0252] From time t6 to time t8, the display refreshes the display setting interface at a frequency of 60 Hz.

[0253] At time t8, the electronic device detects an up event corresponding to the user's sliding operation and obtains a speed of 80 pixels / s, which is greater than the speed threshold. The refresh rate of the display is adjusted to 40 Hz (as shown in e in FIG8B ). The speed threshold may be the second threshold described above.

[0254] Subsequently, the terminal device displays the hand-off sliding process and adjusts the refresh rate. The above embodiment describes the refresh rate switching in the sliding scene. The method provided in the embodiment of the present application can also be applied to the scene corresponding to the click operation.

[0255] For example, Figure 9 is a schematic diagram of the interaction between internal modules provided in an embodiment of the present application. Taking an electronic device including a touch panel (TP), an input system, an image synthesis system, and an application as an example, as shown in Figure 9, the refresh rate switching process includes: the electronic device receives a user operation while displaying a list interface at a first refresh rate.

[0256] S901: The touch panel (TP) collects information corresponding to user operations and transmits raw input events to the input system. The raw input events include touch coordinates, touch force, touch operation timestamp, and other information.

[0257] S902: When receiving (detecting) the first original input event, the input system parses the first original input event to obtain a down event.

[0258] In some embodiments, after receiving the down event, the input system clears the relevant parameters corresponding to the last user operation and / or configures the relevant flag bits.

[0259] The relevant flags can be found in the above descriptions and will not be further elaborated here. Because the input system cannot distinguish between a click and a slide when detecting a down event, the electronic device defaults to a click. The corresponding values ​​for each flag are: click = true; move = false; boost = false; first checked = false; and last check time = 0.

[0260] In some embodiments, upon receiving the down event, the input system transmits a message indicating the fourth refresh rate to the image composition system. Adaptively, the image composition system controls the electronic device to switch from the first refresh rate to the fourth refresh rate.

[0261] S903: When receiving the second original input event, the input system parses the second original input event to obtain a move event.

[0262] When the distance between the coordinates corresponding to the move event and the coordinates corresponding to the down event is less than or equal to the first threshold, the input system does not process the event and the flags remain unchanged. The first threshold can be described above and will not be repeated here.

[0263] For example, taking the schematic diagram corresponding to the sliding operation shown in Figure 10 as an example, the electronic device receives a down event at time t1 and, after time t1, receives a move event. The coordinates corresponding to the move event received at time t2 are less than or equal to the first threshold, and the electronic device confirms at time t2 that the user operation is a click operation. The values ​​corresponding to each flag bit remain unchanged: click = true; move = false; boost = false; first checked = false; last check time = 0.

[0264] S904: When receiving the third original input event, the input system parses the third original input event to obtain an up event.

[0265] It can be understood that since the distance between the coordinates corresponding to the up event and the coordinates corresponding to the down event is less than the first threshold, the user operation is a click operation. After the up event, the values ​​corresponding to each flag are: click = true; move = false; boost = false; first check = false; last check time = 0;

[0266] For example, taking the schematic diagram corresponding to the sliding operation shown in Figure 10 as an example, the electronic device receives a down event at time t1, and after time t1, receives a move event. The distance between the coordinates corresponding to the move event received at time t2 and time t3 and the coordinates corresponding to the down event is less than or equal to the first threshold. The electronic device confirms that the user operation is a click operation at time t2 and time t3, and does not switch the refresh rate. After time t4, an up event is received. The electronic device confirms that the user operation is a click operation and does not switch the refresh rate.

[0267] S905: The input system transmits a message indicating a click operation to the application, where the message includes the coordinates corresponding to the up event.

[0268] S906 . The application determines the fifth refresh rate corresponding to the subsequent display based on the coordinates corresponding to the up event.

[0269] Taking the coordinates corresponding to the up event as an example of indicating video playback, the fifth refresh rate can be 60Hz; taking the coordinates corresponding to the up event as an example of indicating entering a game application, the fifth refresh rate can be 120Hz; taking the coordinates corresponding to the up event as an example of indicating exiting a game application, the fifth refresh rate can be 90Hz. This embodiment of the application does not limit the fifth refresh rate confirmed by the application.

[0270] S907: The application transmits a message indicating the fifth refresh rate to the image synthesis system.

[0271] Adaptively, the image synthesis system controls the electronic device to switch from the first refresh rate to the fifth refresh rate.

[0272] In some embodiments, the image synthesis system generates a Vsync signal according to a period duration corresponding to the fifth refresh rate to control the time intervals of drawing, rendering, synthesis, display, and other processes.

[0273] It should be noted that if the first refresh rate is the same as the fifth refresh rate, the electronic device may execute S907 or may not execute S907.

[0274] In this way, when receiving a click operation, the electronic device maintains a lower refresh rate to reduce power consumption. After the click operation, the subsequent display and refresh rate are determined based on the position corresponding to the click operation.

[0275] The method provided in the embodiments of the present application has been described above. The apparatus for performing the above method provided in the embodiments of the present application is described below. Those skilled in the art will appreciate that the method and apparatus can be combined and referenced with each other, and the relevant apparatus provided in the embodiments of the present application can perform the steps in the above method.

[0276] The refresh rate switching method provided in the embodiment of the present application can be applied to electronic devices with display functions. The electronic device includes an electronic device. The specific device form of the electronic device can refer to the above related description and will not be repeated here.

[0277] An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the above method.

[0278] For example, FIG11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG11, the electronic device includes: the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195, etc. 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, a bone conduction sensor 180M, etc.

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

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

[0281] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

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

[0283] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0284] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0285] In addition, on top of the above components, the device also runs an operating system, such as the iOS operating system, the Android operating system, or the Windows operating system. Applications can be installed and run on the operating system.

[0286] The software system of the electronic device can adopt a layered architecture, event-driven architecture, micro-kernel architecture, microservice architecture, or cloud architecture, etc., which will not be described here.

[0287] The present embodiment provides a chip. The chip includes a processor configured to invoke a computer program stored in a memory to execute the technical solution of the above embodiment. The implementation principles and technical effects are similar to those of the above-mentioned related embodiments and will not be further described here.

[0288] The present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above method is implemented.

[0289] The methods described in the above embodiments can be implemented in whole or in part through software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0290] In one possible implementation, computer-readable media may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium designed to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave are used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and optical disk as used herein include optical disk, laser disk, optical disk, digital versatile disk (DVD), floppy disk and Blu-ray disk, where disks generally reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0291] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0292] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processing unit of general-purpose computer, special-purpose computer, embedded processing machine or other programmable device to produce a machine, so that the instruction executed by the processing unit of computer or other programmable data processing device produces the device for realizing the function specified in one flow chart flow or multiple flows and / or one block or multiple blocks of block diagram.

[0293] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0294] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A refresh rate switching method, characterized in that: The method is applied to an electronic device, the electronic device includes a display screen and is installed with a first application, and the method includes: Displaying the application interface of the first application at a first refresh rate; Detecting a user's sliding operation on the application interface; Refreshing the application interface of the first application based on the sliding operation; Wherein, when the sliding speed of the sliding operation is the first speed, the refresh rate of the display screen is the second refresh rate; when the sliding speed is the second speed, the refresh rate of the display screen is the third refresh rate; The first speed is less than the second speed, and the second refresh rate is less than or equal to the third refresh rate.

2. The method according to claim 1, characterized in that The refreshing of the application interface of the first application based on the sliding operation includes: Based on the sliding speed, determining a first target refresh rate corresponding to the sliding speed; The display screen refreshes the application interface of the first application at the first target refresh rate.

3. The method according to claim 2, characterized in that Before determining the first target refresh rate, the method further includes: Detecting multiple move events corresponding to the sliding operation; The sliding speed is determined based on the position information and time information of the plurality of move events.

4. The method according to claim 3, characterized in that The determining the sliding speed based on the position information and time information of the plurality of move events includes: Determine the first speed based on position information and time information of M move events detected in a first time period; Determining the second speed based on position information and time information of N move events detected within a second time period; Wherein, both M and N are integers greater than a preset threshold; and the time interval between the last moment in the first time period and the last moment in the second time period is greater than a preset duration.

5. The method according to claim 4, characterized in that When the second refresh rate is a first value, the preset duration is a first duration; When the second refresh rate is a second value, the preset duration is a second duration; The first value is greater than the second value, and the first duration is greater than the second duration.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When a down event corresponding to the sliding operation is detected, the application interface of the first application is displayed at a fourth refresh rate.

7. The method according to any one of claims 1 to 6, characterized in that An up event corresponding to the sliding operation is detected; Determine a second target refresh rate based on the speed corresponding to the up event; The display screen refreshes the application interface of the first application at the second target refresh rate.

8. The method according to claim 7, characterized in that When the speed corresponding to the up event is less than or equal to the speed threshold, the display screen refreshes and displays the application interface of the first application at a first refresh rate; When the speed corresponding to the up event is greater than the speed threshold, the display screen refreshes and displays the application interface of the first application at a fifth refresh rate, where the fifth refresh rate corresponds to the speed corresponding to the up event.

9. A refresh rate switching method, characterized in that: The method is applied to an electronic device, the electronic device includes a display screen and is installed with a first application, and the method includes: Displaying the application interface of the first application at a first refresh rate; Detecting a user's sliding operation on the application interface; When a down event corresponding to the sliding operation is detected, switching the refresh rate of the display screen from the first refresh rate to a second refresh rate, and displaying the application interface of the first application at the second refresh rate; When it is detected that the sliding speed corresponding to the sliding operation is the first speed, switching the refresh rate of the display screen from the second refresh rate to a third refresh rate, and displaying the application interface of the first application at the third refresh rate; When it is detected that the sliding speed is the second speed, switching the refresh rate of the display screen from the third refresh rate to the fourth refresh rate, and displaying the application interface of the first application at the fourth refresh rate, wherein when the first speed is less than the second speed, the third refresh rate is less than the fourth refresh rate, and when the first speed is greater than the second speed, the third refresh rate is greater than the fourth refresh rate; When an up event corresponding to the sliding operation is detected, the refresh rate of the display screen is switched from the fourth refresh rate to the fifth refresh rate, and the application interface of the first application is displayed at the fifth refresh rate.

10. The method according to claim 9, characterized in that The speed corresponding to the up event is less than or equal to a speed threshold, and the fifth refresh rate is the same as the first refresh rate.

11. The method according to claim 9, characterized in that The speed corresponding to the up event is greater than the speed threshold; When the speed corresponding to the up event is the third speed, the fifth refresh rate is the first value; When the speed corresponding to the up event is the fourth speed, the fifth refresh rate is the second value; The third speed is lower than the fourth speed, and the first value is lower than or equal to the second value.

12. The method according to any one of claims 9 to 11, characterized in that: The sliding operation corresponds to a plurality of move events, and the method further includes: Determining a speed of the sliding operation as a first speed based on position information and time information corresponding to the first move event, and position information and time information corresponding to a move event before the first move event; The first move event is a move event corresponding to when it is detected that the type of the sliding operation is sliding, or a move event after it is detected that the type of the sliding operation is sliding.

13. The method according to claim 12, characterized in that The method further comprises: Determining the speed of the sliding operation as a second speed based on the position information and time information corresponding to the second move event, and the position information and time information corresponding to the move event before the second move event; The time interval between the second move event and the first move event is greater than a preset duration.

14. The method according to any one of claims 9 to 13, characterized in that: When the third refresh rate is the first value, the preset duration is the first duration; When the third refresh rate is the second value, the preset duration is the second duration; The first value is greater than the second value, and the first duration is greater than the second duration.

15. The method according to any one of claims 9 to 14, characterized in that: The first refresh rate is 10 Hz, the second refresh rate is 60 Hz, the third refresh rate is 120 Hz, the fourth refresh rate is 60 Hz, and the fifth refresh rate is 40 Hz.

16. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 8, or executes the method according to any one of claims 9 to 15.

17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented, or the method according to any one of claims 9 to 15 is implemented.

18. A computer program product, characterized in that The method comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 8, or to execute the method according to any one of claims 9 to 15.