Frame rate control method and electronic device

By adjusting the frame rate based on load type and window priority, the problem of resource contention in the focus window in multi-window scenarios is solved, resulting in a better user experience and display effect.

WO2026118760A1PCT designated stage Publication Date: 2026-06-11HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-11-03
Publication Date
2026-06-11

AI Technical Summary

Technical Problem

In multi-process, multi-window scenarios, when electronic devices are under heavy load, low frame rate of focused window operations, high latency of animation effects, and poor frame rate can cause stuttering and affect user experience.

Method used

Electronic devices determine differentiated rendering frame rates based on load type and application window rendering priority. By using a pre-stored correspondence between rendering priority and frame rate under load type, the rendering frame rate of each application window is adjusted to ensure that windows with high user attention receive sufficient resources.

Benefits of technology

By adjusting the frame rate differently, application window lag can be reduced, improving the user experience and display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025132157_11062026_PF_FP_ABST
    Figure CN2025132157_11062026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a frame rate control method and an electronic device. The method comprises: an electronic device determines a load, and then, according to the load of the electronic device, determines a target load type of the electronic device; according to the target load type and rendering priorities of a plurality of application windows and on the basis of a pre-stored correspondence between rendering priorities and rendering frame rates under a plurality of load types, the electronic device determines a rendering frame rate corresponding to each of the plurality of application windows; and the electronic device renders the plurality of application windows according to the rendering frame rate corresponding to each of the plurality of application windows. By means of the solution, an electronic device can determine respective rendering frame rates for different application windows according to the current load condition and rendering priorities of the different application windows, so as to implement differentiated frame rate adjustment for the different application windows, ensuring that application windows of greater user interest can be allocated sufficient rendering resources, thereby ensuring the display effect of the application windows and users' operating experience.
Need to check novelty before this filing date? Find Prior Art

Description

A frame rate control method and electronic device

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411763278.4, filed on December 2, 2024, entitled "A Frame Rate Control Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of terminal technology, and in particular to a frame rate control method and an electronic device. Background Technology

[0004] The display refresh characteristics of electronic devices mainly include drawing frame rate, composite frame rate and screen refresh rate. Among them, the drawing frame rate is the number of frames drawn in 1 second when the electronic device performs drawing. For example, when an application installed in the electronic device calls the drawing service of the electronic device, the drawing service calls the graphics processing unit (GPU), and the number of frames drawn by the GPU in 1 second is the drawing frame rate.

[0005] During operation, electronic devices may encounter scenarios involving multiple processes and windows. When the electronic device is under heavy load, stuttering issues such as low frame rate for focused window operations, high animation latency, and poor frame rate may occur. Currently, when drawing windows for various applications, the electronic device can obtain the expected drawing frame rate of multiple currently running applications and make a unified decision based on the expected drawing frame rate of multiple applications to determine the corresponding drawing frame rate for each application. The electronic device then draws the window of each application based on the determined drawing frame rate.

[0006] When an electronic device displays multiple application windows simultaneously, these windows may obscure each other. If the electronic device continues to refresh the obscured windows according to the system-distributed rendering frame rate, the obscured windows will consume a large amount of resources, resulting in insufficient resources for the window that the user is focusing on, leading to lag and affecting the user experience. Summary of the Invention

[0007] This application provides a frame rate control method and an electronic device for providing a window-level differentiated frame rate adjustment scheme.

[0008] In a first aspect, this application provides a frame rate control method, which can be executed by an electronic device. The electronic device determines the load of the electronic device and determines the target load type of the electronic device based on the load. The electronic device determines the drawing frame rate corresponding to each of the multiple application windows based on the target load type and the drawing priority of multiple application windows, and based on the pre-stored correspondence between drawing priority and drawing frame rate under multiple load types. The electronic device draws the multiple application windows respectively according to the drawing frame rate corresponding to each of the multiple application windows.

[0009] In the above method, the electronic device can determine the rendering frame rate of different application windows according to the current load and the rendering priority of different application windows, thereby realizing differentiated frame rate adjustment for different application windows, ensuring that application windows with high user attention can be allocated sufficient rendering resources, so as to ensure the display effect of application windows and the user's operating experience.

[0010] In one possible design, determining the target load type of the electronic device based on its load includes: determining an adjustment strategy for the load type based on the load of the electronic device; and determining the target load type based on the adjustment strategy and the current load type of the electronic device. This design allows the electronic device to adjust its load type according to its current load, thereby adjusting the rendering frame rate of different application windows based on the current load, balancing computing power, and reducing application window stuttering.

[0011] In one possible design, before determining the rendering frame rate for each application window among the multiple application windows based on the target load type and the rendering priorities of the multiple application windows, and based on a pre-stored correspondence between rendering priorities and rendering frame rates under multiple load types, the method further includes: obtaining the position information of the multiple application windows, and / or the content of each application window among the multiple application windows; and calculating the rendering priority of each application window among the multiple application windows based on the position information of the multiple application windows, and / or the content of each application window. Through this design, the electronic device can determine the rendering priority of application windows based on the position information of the application windows, and / or the content of the application windows. For example, application windows not obscured by other windows have a higher rendering priority; or, for example, application windows whose content includes video have a higher rendering priority. This allows for setting higher rendering priorities for application windows that receive high user attention or contain critical business functions.

[0012] In one possible design, the location information includes the occlusion relationship of the multiple application windows. Calculating the rendering priority of each application window based on its location information includes: determining the visible area parameters of each application window based on the occlusion relationship, whereby the visible area parameters include at least one of the following: visible area screen ratio, window visible area ratio, and maximum rectangular area ratio of the window visible area; and calculating the rendering priority of each application window based on its visible area parameters. Through this design, the rendering priority determined by the electronic device is related to the visible area parameters of the application windows. The rendering priority determined by the visible area parameters of the application windows indicates the likelihood that the application window will be noticed by the user. The more an application window is occluded, the lower the likelihood that the application window will be noticed by the user, and the lower the determined rendering priority. This allows for differentiated management of rendering resources for multiple application windows currently running on the electronic device.

[0013] In one possible design, the location information includes the distance between non-focus windows and the focus window among the multiple application windows. Calculating the rendering priority of each application window based on its location information includes: determining the rendering priority of non-focus windows based on the distance between them; wherein the focus window has the highest priority, and the closer the non-focus windows are to the focus window, the higher their rendering priority. This design allows electronic devices to determine the rendering priority of application windows based on the distance between them. This solution is applicable to large-screen devices. In scenarios where multiple application windows are displayed simultaneously, the focus window receives the most user attention, thus receiving the highest rendering priority. Secondly, non-focus windows closer to the focus window may also receive more user attention. Therefore, while ensuring sufficient rendering resources for the focus window, non-focus windows closer to it can be rendered first, providing more rendering resources for application windows that the user may be more interested in.

[0014] In one possible design, the correspondence between drawing priority and drawing frame rate under the target load type includes the correspondence between multiple drawing priority ranges and multiple drawing frame rates. Determining the drawing frame rate corresponding to each application window among the multiple application windows includes: determining the drawing priority range to which the drawing priority of each application window belongs, and determining the drawing frame rate of each application window to be drawn according to the correspondence between multiple drawing priority ranges and multiple drawing frame rates under the target load type.

[0015] In one possible design, the rendering frame rate corresponding to each rendering priority range under the target load type is a preset value, which is determined based on the device hardware specifications or business scenario of the electronic device. Through this design, the rendering frame rate corresponding to the rendering priority under the target load type can be a value determined according to the device hardware specifications or business scenario, thereby meeting the rendering frame rate requirements of electronic devices with different specifications or under different business scenarios.

[0016] In one possible design, the rendering frame rate corresponding to each rendering priority range under the target load type is related to the application's desired rendering frame rate. With this design, the electronic device can determine the final rendering frame rate for the application window based on the load, the rendering priority of the application window, and the application's desired rendering frame rate, thereby maximizing the satisfaction of different application window requirements for rendering frame rates.

[0017] In one possible design, determining the load of the electronic device includes: determining the single-frame rendering time of the electronic device rendering a single frame of an image, and determining the load based on the single-frame rendering time; or obtaining the load reported by the system-on-a-chip (SOC) in the electronic device. Through this design, this application provides multiple methods for determining the load of an electronic device, thereby enabling flexible acquisition of the current load of the electronic device.

[0018] Secondly, this application provides an electronic device comprising multiple functional modules; the multiple functional modules interact to implement the methods performed by the electronic device in any of the above aspects and their respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0019] Thirdly, this application provides an electronic device including at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes any of the above aspects and the methods executed by the electronic device in its various embodiments.

[0020] Fourthly, this application also provides a computer program product containing instructions that, when the computer program product is run on a computer, cause the computer to perform the method executed by the electronic device in any of the above aspects and embodiments.

[0021] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method executed by the electronic device in any of the above aspects and embodiments.

[0022] Sixthly, this application also provides a chip for reading a computer program stored in a memory and executing the method executed by the electronic device in any of the above aspects and embodiments.

[0023] Seventhly, this application also provides a chip system including a processor for supporting a computer device in implementing the methods executed by electronic devices in any of the above aspects and their embodiments. In one possible design, the chip system further includes a memory for storing programs and data necessary for the computer device. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0024] Figure 1 is a schematic diagram of a method by which an electronic device determines the rendering frame rate of each window in a multi-window system;

[0025] Figure 2 is a schematic diagram of the interface of an electronic device when displaying multiple windows;

[0026] Figure 3 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0027] Figure 4 is a software structure block diagram of an electronic device provided in an embodiment of this application;

[0028] Figure 5 is a schematic diagram of an application window displayed in an electronic device according to an embodiment of this application;

[0029] Figure 6 is a schematic diagram of an electronic device displaying multiple application windows according to an embodiment of this application;

[0030] Figure 7 is a schematic diagram of the architecture of an electronic device provided in an embodiment of this application;

[0031] Figure 8 is a flowchart of a frame rate control method provided in an embodiment of this application;

[0032] Figure 9 is a flowchart of a frame rate control method provided in an embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. In the description of the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.

[0034] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0035] The rendering frame rate of an electronic device is the number of frames rendered within 1 second when the electronic device renders an image frame. For example, when an application installed on an electronic device calls the device's rendering service, the rendering service calls the GPU, and the number of frames the GPU renders within 1 second is the rendering frame rate.

[0036] During operation, electronic devices may encounter scenarios involving multiple processes and windows. When the electronic device is under heavy load, stuttering issues such as low frame rate for focused window operations, high animation latency, and poor frame rate may occur. Currently, when drawing windows for various applications, the electronic device can obtain the expected drawing frame rate of multiple currently running applications and make a unified decision based on the expected drawing frame rate of multiple applications to determine the corresponding drawing frame rate for each application. The electronic device then draws the window of each application based on the determined drawing frame rate.

[0037] In one alternative implementation, when an electronic device runs multiple applications simultaneously, it needs to draw multiple windows for those applications. Different applications can subscribe to a vertical synchronization (VSync) signal from the electronic device's system to enable the electronic device to respond to the application's window drawing requests. Different applications may subscribe to VSync signals at different frequencies. Applications can request a drawing frame rate from the system; this process can be called "voting." After receiving votes from multiple applications, the system can make a unified decision to determine the frequency of the VSync signal distributed to each application window. Thus, different applications can achieve window drawing at different frame rates based on the VSync signal.

[0038] For example, Figure 1 is a schematic diagram of a method for an electronic device to determine the rendering frame rate of each window in a multi-window system. Referring to Figure 1, assuming that there are windows of applications 1-50 in the electronic device that need to be rendered, applications 1-50 each request a rendering frame rate from the system decision module. For example, application 1 votes for a rendering frame rate of 60 frames per second, applications 2-48 vote for a rendering frame rate of 120 frames per second, application 49 votes for a rendering frame rate of 40 frames per second, and application 50 votes for a rendering frame rate of 120 frames per second. After receiving the votes from each application, the system decision module can make a unified decision to determine the rendering frame rate of each application's window. The system VSync distribution module can distribute VSync signals of different frequencies to each application to control the rendering frame rate of different applications' windows. As shown in Figure 1, after the system decision module determines the rendering frame rate of each application's window, the system VSync distribution module distributes VSync signals of different frequencies to each application to control the rendering frame rate of different applications' windows. The nc distribution module can distribute VSync signals to applications 1-50 according to the drawing frame rate of 60 frames per second for application 1, 120 frames per second for applications 2-48, 40 frames per second for application 49, and 120 frames per second for application 50. If the system VSync distribution module sends VSync signals at the highest drawing frame rate of 120 frames per second, sending a Vsync signal approximately once every 8.33ms, and application 1 draws its window at approximately 16.67ms, then application 1 will perform a drawing operation every two Vsync signals received; applications 2-48 draw their windows at approximately 8.33ms, then applications 2-48 will perform a drawing operation every time they receive a Vsync signal; application 49 draws its window at approximately 25ms, then application 49 will perform a drawing operation every three Vsync signals received; and application 50 draws its window at 8.33ms, then application 50 will perform a drawing operation every time it receives a Vsync signal.

[0039] When an electronic device displays multiple application windows simultaneously, these windows may obscure each other. If the electronic device continues to refresh the obscured windows according to the system-distributed rendering frame rate, the obscured windows will consume a large amount of resources, resulting in insufficient resources for the window that the user is focusing on, leading to lag and affecting the user experience.

[0040] For example, Figure 2 is a schematic diagram of an interface when an electronic device displays multiple windows. Referring to Figure 2, taking the electronic device displaying windows of application 1 to application 50 as an example, the window of application 50 is the focus window, and the windows of application 1 to application 49 are completely or largely obscured. However, the electronic device still draws the windows according to the drawing frame rate corresponding to these applications, which consumes a lot of drawing resources, such as a large amount of central processing unit (CPU) / GPU resources. When drawing resources are scarce, application 50 may not be able to obtain enough resources, resulting in a drawing frame rate of less than 120 frames, which will cause window stuttering and affect the user experience.

[0041] To address the above issues, this application provides a frame rate control method, offering a window-level differentiated frame rate adjustment scheme to ensure the display effect of windows of interest to the user. In the frame rate control method provided in this application, the electronic device determines its load, determines its load type based on the load, and determines the drawing frame rate for each of the multiple application windows to be drawn based on the load type, the drawing priorities of multiple application windows to be drawn, and a pre-stored correspondence between drawing priorities and drawing frame rates under different load types. The electronic device then draws the multiple application windows according to their respective drawing frame rates. This scheme allows the electronic device to determine the drawing frame rate of different application windows based on the current load and the drawing priorities of different application windows, thereby achieving differentiated frame rate adjustments for different application windows. This ensures that application windows of high user interest receive sufficient drawing resources, guaranteeing the display effect of the application windows and the user's operating experience.

[0042] The following describes an electronic device and embodiments for using such an electronic device. The electronic device in this application embodiment can be a tablet computer, mobile phone, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wearable device, etc. This application embodiment does not impose any limitations on the specific type of electronic device.

[0043] In some embodiments of this application, the electronic device may also be a portable terminal device that includes other functions such as a personal digital assistant and / or a music player. Exemplary embodiments of the portable terminal device include, but are not limited to, devices equipped with... Or portable terminal devices with other operating systems.

[0044] Figure 3 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. As shown in Figure 3, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0045] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the electronic device 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include 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 processor 110 has recently used or is repeatedly used. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.

[0046] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140, providing power to processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0047] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0048] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0049] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0050] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0051] The display screen 194 is used to display the display interface of an application, such as the display page of an application installed on the electronic device 100. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0052] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0053] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application program. The data storage area may store data generated during the use of electronic device 100 (e.g., captured images, recorded videos, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0054] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external memory card.

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

[0056] The sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.

[0057] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.

[0058] Touch sensor 180C, also known as a "touch panel," can be located on display screen 194. The touch sensor 180C and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180C detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180C may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0059] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button inputs and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, touch operations applied to different applications (such as taking photos, audio playback, etc.) can correspond to different vibration feedback effects. Touch vibration feedback effects can also be customized. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100.

[0060] It is understood that the components shown in Figure 3 do not constitute a specific limitation on the electronic device 100. The electronic device may include more or fewer components than shown, or combine some components, or separate some components, or have different component arrangements. In addition, the combination / connection relationships between the components in Figure 3 can also be adjusted and modified.

[0061] Figure 4 is a software structure block diagram of an electronic device provided in an embodiment of this application. As shown in Figure 4, the software structure of the electronic device can be a layered architecture. For example, the software can be divided into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer (framework, FWK), the runtime and system libraries, and the kernel layer.

[0062] The application layer can include a series of application packages. As shown in Figure 4, the application layer can include camera, settings, skin modules, user interface (UI), third-party applications, etc. Third-party applications can include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, etc.

[0063] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer can include some predefined functions. As shown in Figure 4, the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, and notification manager.

[0064] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots. The content provider stores and retrieves data, making this data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0065] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0066] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).

[0067] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0068] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0069] The runtime includes the core libraries and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.

[0070] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core libraries of the operating system. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0071] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), image processing library, graphics rendering module, VSync management module, etc.

[0072] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0073] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0074] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0075] A 2D graphics engine is a graphics engine for 2D drawing.

[0076] In this embodiment, the graphics rendering module is used to obtain the occlusion relationship of multiple application windows, calculate the distance between the focus window and the non-focus window, and then determine the rendering priority of the application windows. The VSync management module makes unified decisions on the rendering frame rate of multiple application windows and controls the distribution of VSync signals.

[0077] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, and a SOC frequency acquisition module. In this embodiment, the SOC frequency acquisition module is used to acquire frequency information and determine the load of the electronic device based on the acquired frequency information.

[0078] The hardware layer can include various types of sensors, such as accelerometers, gyroscopes, and touch sensors.

[0079] It should be noted that the structures shown in Figures 3 and 4 are merely examples of electronic devices provided in the embodiments of this application, and cannot be used to limit the electronic devices provided in the embodiments of this application. In specific implementations, electronic devices may have more or fewer devices or modules than those shown in Figures 3 or 4.

[0080] The frame rate control method provided in the embodiments of this application is described below.

[0081] In this embodiment, when multiple application windows need to be displayed on an electronic device, the electronic device can draw the application windows based on the drawing frame rate of each application window to update the content displayed in the application windows. When there are multiple application windows on the electronic device, the electronic device can calculate the drawing priority of each application window separately. The higher the drawing priority, the higher the degree of attention the user pays to the application window. Therefore, when the drawing resources are limited, the electronic device can prioritize the drawing frame rate of application windows with higher drawing priorities.

[0082] In this embodiment, the electronic device can obtain the position information of multiple application windows, and / or the content of the application windows determines the drawing priority of each application window. For example, the position information may include the occlusion relationship of multiple application windows, and / or the distance between non-focus windows and focus windows in multiple application windows. The content of the application windows may include at least one of video, animation, or image. When an application window includes video, animation, or image, the drawing priority of that application window is higher. Optionally, the electronic device can also set the drawing priority of application windows including video to be higher than that of application windows including animation, and the drawing priority of application windows including animation to be higher than that of application windows including images.

[0083] In one optional implementation, when the position information of multiple application windows acquired by the electronic device includes the occlusion relationship of the multiple application windows, the electronic device can determine the visible area parameters based on the occlusion relationship of the multiple windows. These visible area parameters may include at least one of the following: window visible screen ratio (WVSR), window visible ratio (WVR), and maximum rectangular area ratio of the window visible area. The electronic device can determine the rendering priority of the application windows based on at least one of these parameters. The above-mentioned visible area parameters are further described below:

[0084] 1. Screen ratio of the visible area of ​​the window

[0085] The screen percentage of an application window's visible area is the ratio between the size of the application window's visible area and the screen size. The visible area of ​​the application window is the region within the application window that is visible to the user. If the application window is obscured by other application windows or components, the unobstructed area is considered the visible area. Electronic devices can obtain the size of the visible area within an application window and calculate its screen percentage based on this size and the screen size. This screen percentage can be any value between 0 and 100.

[0086] For example, Figure 5 is a schematic diagram of an application window displayed in an electronic device according to an embodiment of this application. Referring to Figure 5, window 1 displayed by the electronic device is obscured by windows 2 and 3, and window 2 is obscured by window 3. When the electronic device calculates the screen ratio of the visible area of ​​window 1, the visible area of ​​window 1 is area 1 and area 2 in Figure 5. The electronic device can obtain the area size of area 1 and area 2. The size of the visible area of ​​window 1 is the sum of the areas of area 1 and area 2. The electronic device can calculate the ratio of the size of the visible area to the screen size and use the calculated ratio as the screen ratio of the visible area of ​​window 1.

[0087] 2. Percentage of visible area of ​​window

[0088] The window visible area percentage is the ratio between the size of the application window's visible area and the size of the application window. Electronic devices can obtain the size of the visible area in the application window and the application window size, and calculate the window visible area percentage, which can be any value between 0 and 100.

[0089] For example, referring to Figure 5, when calculating the proportion of the visible area of ​​window 1, the electronic device can obtain the area size of region 1 and region 2 in window 1, the size of the visible area of ​​window 1 and the sum of the areas of region 1 and region 2, and the electronic device can calculate the ratio of the size of the visible area to the size of window 1, and use the calculated ratio as the proportion of the visible area of ​​window 1.

[0090] 3. Percentage of the maximum rectangular area of ​​the window's visible region

[0091] When an application window is obscured by multiple other windows, the visible area of ​​the application window may include multiple rectangles. The area ratio of the largest rectangle in the visible area of ​​the window is the ratio between the size of the largest rectangle in the visible area of ​​the application window and the size of the application window. Electronic devices can obtain the area size of the largest rectangle in the visible area of ​​the application window and the size of the application window, and calculate the area ratio of the largest rectangle in the visible area of ​​the window based on these two values. This area ratio can be any value between 0 and 100.

[0092] For example, referring to Figure 5, when the electronic device calculates the maximum rectangular area ratio of the visible area of ​​window 1, the visible area of ​​window 1 includes region 1 and region 2. The electronic device can obtain the area size of region 1 and region 2 respectively. By comparing the area size of region 1 and region 2, the electronic device can determine that the maximum rectangle in the visible area of ​​window 1 is region 1. Then, the electronic device can calculate the ratio of the size of region 1 to the size of window 1, and use the calculated ratio as the maximum rectangular area ratio of the visible area of ​​window 1.

[0093] In some embodiments of this application, the electronic device can obtain the occlusion relationship of multiple application windows when the occlusion relationship of multiple application windows changes, and calculate the screen ratio of the window's visible area, the window's visible area ratio, and the maximum rectangular area ratio of the window's visible area for each application window. The electronic device can calculate the rendering priority of each application window based on the screen ratio of the window's visible area, the window's visible area ratio, and the maximum rectangular area ratio of the window's visible area according to a preset calculation method. For example, the electronic device can perform a weighted summation of the screen ratio of the window's visible area, the window's visible area ratio, and the maximum rectangular area ratio of the window's visible area. The weight corresponding to each factor can be pre-configured by the system or user-defined, or the weight value of each factor can be determined by the electronic device based on device performance or business scenario. For example, when the electronic device is a large-screen device, the electronic device can set the weight value corresponding to the screen ratio of the window's visible area to be the largest, and the weight values ​​corresponding to other factors to be smaller. Optionally, the electronic device can also determine the rendering priority of application windows based on one of the aforementioned factors. For example, the electronic device can set the weight value of one factor to 1, while setting the weight values ​​of the other factors to 0. This means that when the electronic device sets the weight value of a factor to 0, it can omit the calculation of that factor, thus saving computing power. In this way, the electronic device can flexibly calculate the rendering priority of multiple application windows according to device performance or user needs.

[0094] It should be noted that the embodiments of this application do not limit the way in which the electronic device determines the drawing priority of the application window based on multiple factors. In practice, the electronic device can also calculate the drawing priority in other ways. For example, the electronic device can input at least one of the following into the model: the screen ratio of the window's visible area, the window's visible area ratio, and the ratio of the maximum rectangular area of ​​the window's visible area, and obtain the drawing priority output by the model. Alternatively, the electronic device may have other ways of calculating the drawing priority. The embodiments of this application do not limit this.

[0095] In another optional implementation, when the electronic device acquires the position information of multiple application windows, including the distance between non-focus windows and focus windows within the multiple application windows, the electronic device can also determine the drawing priority of the application windows based on the distance between the non-focus windows and focus windows. Optionally, when the electronic device displays multiple application windows, these multiple application windows include focus windows and non-focus windows. The focus window is the window that is in focus among the multiple windows. Generally, the user pays more attention to the focus window among the multiple windows. When calculating the drawing priority, the electronic device can consider the distance between other non-focus windows and the focus window. In this method, the drawing priority of the focus window is set to the highest priority by default. Optionally, this method is suitable for scenarios where the electronic device is a large-screen device and displays multiple application windows simultaneously. If the multiple application windows do not obstruct each other, or the obstruction is small, the electronic device can calculate the drawing priority of the multiple application windows based on the distance between other non-focus windows and focus windows.

[0096] In one alternative implementation, the electronic device can determine the center point coordinates of the focus window and the center point coordinates of the non-focus window, and determine the distance between the non-focus window and the focus window based on the center point coordinates of the focus window and the center point coordinates of the non-focus window.

[0097] For example, Figure 6 is a schematic diagram of an electronic device displaying multiple application windows according to an embodiment of this application. Referring to Figure 6, when the electronic device displays a focus window 1, a non-focus window 2, and a non-focus window 3 simultaneously, the electronic device can determine the center point coordinates of the focus window 1, the non-focus window 2, and the non-focus window 3 respectively. Taking the calculation of the distance between the non-focus window 2 and the focus window 1 as an example, assuming the center point coordinates of the focus window 1 are (X1, Y1) and the center point coordinates of the non-focus window 2 are (X2, Y2), then the distance D between the non-focus window 2 and the focus window 1 satisfies the following relationship:

[0098] Alternatively, the distance D between non-focal window 2 and focal window 1 satisfies the following relationship: D = (|X2 - X1| + |Y2 - Y1|) / 2

[0099] It should be noted that the above method for calculating the distance between the non-focus window and the focus window is only an example and not a limitation. In practice, electronic devices may also use other calculation methods to determine the parameters used to characterize the distance between the non-focus window and the focus window in order to achieve effects such as reducing the amount of calculation. This application embodiment does not limit this.

[0100] In some examples, the electronic device can determine the rendering priority of the non-focus window based on the distance between the non-focus window and the focus window. For example, when the distance between the non-focus window and the focus window is less than a first threshold, the rendering priority of the non-focus window can satisfy the following relationship: V = a1*D / PPI + b1

[0101] Where V represents the drawing priority of the application window, a1 and b1 are pre-configured parameters, and pixels per inch (PPI) is a unit of pixel density used to represent the number of pixels contained per inch. Optionally, the first threshold, a1, and b1 can be empirical values ​​of a technician; for example, the first threshold can be 3.44, a1 can be -0.11, and b1 can be 1.0038.

[0102] When the distance between the non-focus window and the focus window is greater than the first threshold, the drawing priority of the non-focus window can satisfy the following relationship: V=a2*D / PPI+b2

[0103] Where V represents the drawing priority of the application window, and a2 and b2 are pre-configured parameters. Optionally, the first threshold, a2, and b2 can be empirical values ​​of technicians; for example, the first threshold can be 3.44, a2 can be -0.0315, and b2 can be 0.7429.

[0104] For example, taking an electronic device with a display resolution of 3120*2080 as an example, Table 1 below shows the drawing priority of an application window determined based on the distance between a non-focus window and a focus window, according to an embodiment of this application. Here, dots per inch (DPI) is a unit of measurement for resolution, used to represent the number of dots that can be displayed per inch.

[0105] Table 1 Drawing priority of non-focus windows

[0106] In some implementations, when determining the rendering priority of application windows based on the position information of multiple application windows, the electronic device can also determine the rendering priority of application windows based on at least one of the following: screen ratio of the window's visible area, window's visible area ratio, maximum rectangular area ratio of the window's visible area, and the distance between the non-focus window and the focus window. In this method, after obtaining the distance between the non-focus window and the focus window, the electronic device can normalize the distance between the non-focus window and the focus window, and calculate the rendering priority of each application window based on the normalized distance between the non-focus window and the focus window, the screen ratio of the window's visible area, the window's visible area ratio, and the maximum rectangular area ratio of the window's visible area. The implementation can be referred to the above embodiments, and repeated details will not be repeated.

[0107] In this embodiment of the application, the electronic device can pre-store the correspondence between multiple drawing priority ranges and drawing frame rates. After determining the drawing priority of multiple application windows, the electronic device can determine the drawing frame rate of each application window according to the pre-stored correspondence between multiple drawing priority ranges and drawing frame rates.

[0108] In some optional implementations, the correspondence between multiple pre-stored drawing priority ranges and drawing frame rates in the electronic device may include a preset value for the drawing frame rate corresponding to each drawing priority range. The preset values ​​for the drawing frame rates corresponding to different drawing priority ranges can be determined based on factors such as the device's hardware specifications and business scenarios. For example, if the device's hardware specifications support a drawing frame rate of 120 frames per second, the electronic device can set application windows with higher drawing priorities to draw based on a drawing frame rate of 120 frames per second. The business scenarios of the electronic device may include whether the electronic device is currently plugged in, whether the electronic device is in game mode, and whether the rendering application of the electronic device is running. Optionally, the preset values ​​for the drawing frame rates corresponding to different drawing priority ranges can also be pre-configured by the system or user-defined.

[0109] In other alternative implementations, the drawing frame rate corresponding to each drawing priority range in the pre-stored correspondence between multiple drawing priority ranges and drawing frame rates of the electronic device can be related to the application's expected drawing frame rate. For example, the electronic device can store three drawing priority ranges, where the drawing frame rate corresponding to the higher drawing priority range is the application's expected drawing frame rate, the drawing frame rate corresponding to the medium drawing priority range is half of the application's expected drawing frame rate, and the drawing frame rate corresponding to the lower drawing priority range is 0. If the drawing priority of an application window that is completely obscured by other windows is low, the electronic device can stop drawing for the completely obscured application window and no longer update the content of the application window, thereby saving drawing resources.

[0110] In the frame rate control method provided in this application embodiment, the electronic device can also store the correspondence between different drawing priorities and drawing frame rates under various load types. This allows the electronic device to execute different drawing frame rate control methods for multiple application windows under different load types. In this embodiment, the electronic device can determine its load. Optionally, the electronic device can determine the single-frame drawing time and determine the load based on the single-frame drawing time, or the electronic device can receive the load reported by the system-on-chip (SOC). The electronic device can determine the load type based on the load. For example, the electronic device can pre-store multiple load types from high to low. The higher the load pressure of the electronic device and the higher the load type level, the lower the drawing frame rate under that load type. Optionally, after determining the load, the electronic device can determine a load type adjustment strategy. This adjustment strategy is the method by which the electronic device adjusts the load based on the current load type. For example, Table 2 below shows an example of a load type adjustment strategy provided in this application embodiment.

[0111] Table 2 Load Type Adjustment Strategies

[0112] In one optional implementation, after determining the adjustment strategy, the electronic device can determine the target load type based on the current load type of the electronic device and the adjustment strategy, and determine the drawing frame rate of multiple application windows based on the determined target load type and the pre-stored correspondence between drawing priority and drawing frame rate under different load types. The electronic device can draw multiple application windows respectively according to the drawing frame rate corresponding to each application window in the determined multiple application windows.

[0113] For example, Table 3 below shows an example of the correspondence between drawing priority and drawing frame rate under different load types provided in the embodiments of this application.

[0114] Table 3. Relationship between rendering priority and rendering frame rate under different load types

[0115] Referring to Figure 3, taking the current load type of the electronic device as light (level 1) as an example, if the electronic device determines the adjustment strategy to increase the load type by 2 levels based on the load, then the electronic device can determine that the target load type after adjustment is heavy (level 3). Then, the electronic device can determine the drawing frame rate of each application window according to the drawing priority of multiple application windows based on the correspondence between the drawing priority and the drawing frame rate corresponding to the load type level 3. For example, when the drawing priority of the application window is 0.9, the drawing frame rate of the application window is 30fps. Another example is when the drawing priority of the application window is 0.4, the drawing frame rate of the application window is 30fps. Yet another example is when the drawing priority of the application window is 0.1, the drawing frame rate of the application window is 0fps. At this time, the electronic device stops drawing the application window.

[0116] It should be noted that the drawing frame rates corresponding to each drawing priority range in Table 3 are only examples and not limitations. In practice, the drawing frame rates corresponding to different drawing priority ranges can also be other values, as described in the aforementioned embodiments. These values ​​can also be determined by the electronic device based on factors such as device hardware specifications and business scenarios. Alternatively, the drawing frame rates corresponding to different drawing priority ranges can also be related to the application's expected drawing frame rate. The comparison of the embodiments in this application is not limited.

[0117] Through the frame rate control method provided in the above embodiments, electronic devices can perform differentiated management of the rendering frame rate of multiple application windows, prioritize the rendering frame rate of application windows that are of higher user attention, and adjust the rendering frame rate of different application windows according to the current load, thereby balancing computing power and reducing application window lag issues.

[0118] Based on the above embodiments, Figure 7 is a schematic diagram of the architecture of an electronic device provided in this application embodiment. Referring to Figure 7, the electronic device includes a graphics rendering module 701 and a VSync management module 702. Optionally, it may also include a SOC frequency acquisition module 703. The graphics rendering module 701 is used to acquire the occlusion relationship of multiple application windows, calculate the distance between the focus window and the non-focus window, and thus determine the rendering priority of the application windows. Furthermore, the graphics rendering module 701 can also be used to calculate the rendering time of a single frame, thereby determining the load of the electronic device. The VSync management module 702 is used for unified decision-making on the rendering frame rate of multiple application windows and to control the transmission of VSync signals. The SOC frequency acquisition module 703 is used to acquire frequency information and determine the load based on the acquired frequency information.

[0119] Based on the electronic device architecture shown in Figure 7, Figure 8 is a flowchart of a frame rate control method provided by an embodiment of this application. Referring to Figure 8, the method includes the following steps:

[0120] S801: The electronic device obtains the position information of multiple application windows, and / or the content of each application window.

[0121] Optionally, the position information of multiple application windows may include the occlusion relationship of multiple application windows, and / or the distance between non-focus windows and focus windows in multiple application windows, and the content of each application window may include at least one of video, animation, or image.

[0122] S802: The electronic device determines the drawing priority of each application window based on the position information of multiple application windows and / or the content displayed in each application window.

[0123] Optionally, the electronic device can determine at least one of the following based on the occlusion relationship of multiple windows in the location information: the screen ratio of the window's visible area, the window's visible area ratio, and the ratio of the maximum rectangular area of ​​the window's visible area. The location information may also include the distance between the non-focus window and the focus window. Then, the electronic device can determine the drawing priority of the application window based on at least one of the following: the screen ratio of the window's visible area, the window's visible area ratio, the ratio of the maximum rectangular area of ​​the window's visible area, the distance between the non-focus window and the focus window, or the content of each application window.

[0124] Optionally, S801-S802 can be executed by the graphics rendering module 701 in the electronic device shown in FIG7.

[0125] S803: The electronic device determines the time taken to render a single frame and determines the load based on the time taken to render a single frame; or the electronic device obtains the load reported by the SOC.

[0126] Optionally, the step of determining the time taken to render a single frame can be performed by the graphics rendering module 701 in the electronic device shown in Figure 7, and the load reported by the SOC obtained by the electronic device can be determined by the SOC frequency acquisition module 703 in the electronic device shown in Figure 7.

[0127] S804: The electronic device determines an adjustment strategy based on the load, and determines the target load type after adjustment based on the current load type of the electronic device and the adjustment strategy.

[0128] S805: The electronic device determines the drawing frame rate of multiple application windows based on the target load type and the pre-stored correspondence between drawing priority and drawing frame rate under different load types.

[0129] Optionally, S804-S805 can be executed by the VSync management module 702 in the electronic device shown in Figure 7.

[0130] S806: The electronic device draws multiple application windows according to the drawing frame rate corresponding to each application window among the multiple application window drawing frame rates.

[0131] Alternatively, S806 can be executed by the graphics rendering module 701 in the electronic device shown in FIG7.

[0132] It should be noted that the specific implementation methods of each step in the embodiment shown in Figure 8 can be found in the above embodiments of this application, and repeated details will not be repeated.

[0133] Based on the same concept, this application also provides a frame rate control method, which can be executed by an electronic device. Figure 9 is a flowchart of a frame rate control method provided in this application. Referring to Figure 9, the method includes the following steps:

[0134] S901: The electronic device determines the load of the electronic device and determines the target load type of the electronic device based on the load of the electronic device.

[0135] For example, in the embodiments of this application, the target load type of the electronic device can be any one of heavy, moderate and light.

[0136] Alternatively, the electronic device can determine the load based on the single-frame rendering time, or the electronic device can receive the load reported by the SOC.

[0137] S902: The electronic device determines the drawing frame rate corresponding to each application window in multiple application windows based on the target load type and the drawing priority of multiple application windows, and based on the pre-stored correspondence between drawing priority and drawing frame rate under multiple load types.

[0138] Optionally, in this embodiment of the application, the electronic device can store the correspondence between drawing priority and drawing frame rate under multiple load types. The electronic device can obtain the correspondence between drawing priority and drawing frame rate under the target load type, and then determine the drawing frame rate corresponding to each application window according to the drawing priority of multiple application windows of the current electronic device.

[0139] In one optional implementation, the electronic device can determine the rendering priority of each application window among multiple application windows based on the position information of the multiple application windows and / or the content of each application window. For example, the electronic device can determine the rendering priority of an application window based on at least one of the following: screen ratio of the visible area, window visible area ratio, and maximum rectangular area ratio of the window visible area; or, for another example, the electronic device can determine the rendering priority of an application window based on the distance between a non-focus window and a focus window; or, for yet another example, the electronic device can determine the rendering priority of an application window based on the content of the application window.

[0140] S903: The electronic device draws multiple application windows according to the drawing frame rate corresponding to each application window in the multiple application windows.

[0141] It should be noted that the frame rate control method shown in Figure 9 of this application can be referred to the above embodiments of this application in specific implementation, and repeated parts will not be described again.

[0142] Based on the above embodiments, this application also provides an electronic device, which includes multiple functional modules; the multiple functional modules interact to realize the functions performed by the electronic device in the various methods described in the embodiments of this application. The steps performed by the electronic device in the embodiments shown in FIG8 or FIG9 are executed. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0143] Based on the above embodiments, this application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor performs the functions performed by the electronic device in the various methods described in the embodiments of this application. This includes performing the steps executed by the electronic device in the embodiments shown in FIG8 or FIG9.

[0144] Based on the above embodiments, this application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the methods described in the embodiments of this application.

[0145] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the embodiments of this application.

[0146] Based on the above embodiments, this application also provides a chip for reading computer programs stored in a memory to implement the methods described in the embodiments of this application.

[0147] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the embodiments of this application. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete devices.

[0148] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0150] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0151] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0152] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A frame rate control method characterized by, Applied to electronic devices, the method includes: Determine the load of the electronic device, and determine the target load type of the electronic device based on the load of the electronic device; Based on the target load type and the drawing priority of multiple application windows, and based on the pre-stored correspondence between drawing priority and drawing frame rate under multiple load types, determine the drawing frame rate corresponding to each application window in the multiple application windows; The multiple application windows are drawn according to the drawing frame rate corresponding to each application window.

2. The method of claim 1, wherein, Determining the target load type of the electronic device based on its load includes: A load type adjustment strategy is determined based on the load of the electronic device; The target load type is determined based on the adjustment strategy and the current load type of the electronic device.

3. The method of claim 1 or 2, wherein, Before determining the rendering frame rate for each application window among the multiple application windows based on the target load type and the rendering priorities of the multiple application windows, and based on the pre-stored correspondence between rendering priorities and rendering frame rates under multiple load types, the method further includes: Obtain the position information of the multiple application windows, and / or the content of each application window in the multiple application windows; Based on the position information of the plurality of application windows, and / or the content of each application window, the drawing priority of each application window in the plurality of application windows is calculated.

4. The method of claim 3, wherein, The location information includes the occlusion relationship of the multiple application windows. The step of calculating the rendering priority of each application window based on the location information of the multiple application windows includes: The visible area parameters of each application window in the plurality of application windows are determined based on the occlusion relationship of the plurality of application windows. The visible area parameters include at least one of the following: visible area screen ratio, window visible area ratio, and window visible area maximum rectangular area ratio. The drawing priority of each application window is calculated based on the visible area parameters of each application window among the multiple application windows.

5. The method of claim 3, wherein, The location information includes the distance between the non-focused window and the focus window in the plurality of application windows. The step of calculating the drawing priority of each application window in the plurality of application windows based on the location information includes: The drawing priority of the non-focus windows in the multiple application windows is determined based on the distance between the non-focus windows and the focus window in the multiple application windows; wherein, the focus window in the multiple application windows has the highest priority, and the closer the distance between the non-focus windows and the focus window in the multiple application windows, the higher the drawing priority of the non-focus windows.

6. The method according to any one of claims 1 to 5, wherein, The correspondence between drawing priority and drawing frame rate under the target load type includes multiple drawing priority ranges and multiple drawing frame rates. Determining the drawing frame rate corresponding to each application window among the multiple application windows includes: The drawing priority range to which the drawing priority of each application window belongs is determined, and the drawing frame rate of each application window to be drawn is determined according to the correspondence between multiple drawing priority ranges and multiple drawing frame rates under the target load type.

7. The method of claim 6, wherein, The preset value is determined according to a device hardware specification or a service scenario of the electronic device.

8. The method of claim 6, wherein, The preset value is determined according to a device hardware specification or a service scenario of the electronic device.

9. The method according to any one of claims 1 to 8, wherein, The load of the electronic device is determined, including: The single-frame drawing time of the electronic device for drawing a single-frame image frame is determined, and the load is determined according to the single-frame drawing time; or The load reported by a system on chip (SOC) in the electronic device is acquired.

10. An electronic device, comprising: The at least one processor is coupled with the at least one memory, and is configured to read a computer program stored in the at least one memory, so as to execute the method in any one of claims 1-9.

11. A computer program product comprising instructions, characterized in that, The computer program product, when running on the computer, causes the computer to execute the method in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on the computer, cause the computer to execute the method in any one of claims 1-9.