Image frame processing method and related apparatus

By generating a drawing signal in the electronic device and then judging the load, if the drawing is not completed, the system switches to a more powerful computing platform to draw the image frame. This solves the problem of frame dropping during electronic device display refresh, achieving faster image frame drawing and reducing frame dropping.

WO2026051894A1PCT designated stage Publication Date: 2026-03-12HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

When electronic devices refresh their displays, they fail to acquire new image frames in a timely manner, resulting in frame drops.

Method used

After generating the drawing signal, it is determined whether the image frame has been drawn within a certain time period. If it has not been drawn, it switches to a stronger computing power to continue drawing, including switching to a stronger computing power when the load exceeds the current capacity.

Benefits of technology

It reduces or avoids frame dropping, improving the speed and efficiency of image frame rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025118356_12032026_PF_FP_ABST
    Figure CN2025118356_12032026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are an image frame processing method and a related apparatus. In the method, an electronic device generates a drawing signal, and the electronic device then starts to draw an image frame A; then, the electronic device may determine whether the drawing of the image frame A has been completed within a duration a after the generation of the drawing signal; if the drawing of the image frame A has not been completed, it indicates that a frame loss phenomenon may occur in the electronic device; and next, the electronic device may use a stronger computing capability to continue drawing the image frame A, wherein the duration may be set to be less than or equal to a signal period. In this way, the electronic device can complete the drawing of the image frame A more quickly, reduce the duration of the frame loss phenomenon caused by the drawing of the image frame A, and may even avoid the frame loss phenomenon.
Need to check novelty before this filing date? Find Prior Art

Description

Method for processing image frame and related device

[0001] The present application claims priority to the Chinese patent application No. 202411241511.2, filed on September 4, 2024, and entitled "Method for processing image frame and related device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of terminal, and in particular, to a method for processing image frame and related device. BACKGROUND

[0003] An electronic device can draw an image frame, and then refresh the image displayed in the display screen. However, when the electronic device needs to refresh the display, if the new image frame has not been obtained, the electronic device can only refresh the old image frame. Thus, the frame loss phenomenon occurs.

[0004] How to reduce or even avoid the frame loss phenomenon is a problem to be solved in the field. SUMMARY

[0005] The present application provides a method for processing image frame and related device, which can complete the drawing of the image frame faster, reduce the duration of the frame loss phenomenon caused by drawing the image frame, and even avoid the frame loss phenomenon.

[0006] In a first aspect, the present application provides a method for processing image frame, which is applied to an electronic device, and the method comprises: the electronic device generates a first drawing signal; the electronic device starts to draw a first image frame by using a first computing capability; within a first duration after the generation of the first drawing signal, the electronic device does not complete the drawing of the first image frame; and the electronic device switches to continue to draw the first image frame by using a second computing capability, wherein the second computing capability is stronger than the first computing capability.

[0007] In this way, the electronic device can complete the drawing of the image frame faster, reduce the duration of the frame loss phenomenon caused by drawing the image frame, and even avoid the frame loss phenomenon.

[0008] In combination with the first aspect, in some implementations, after the first duration, before the electronic device switches to draw the first image frame by using the second computing capability, the method further comprises: the electronic device determines that a first load exceeds the first computing capability, wherein the first load comprises a load of the electronic device when drawing the first image frame.

[0009] Thus, the electronic device can subsequently switch to the second computing capability to perform the task based on a switching rule that the first load slightly exceeds the currently used computing capability.

[0010] In some implementations of the first aspect, the second computing capability is greater than or equal to the first load.

[0011] Since the computing capability provided by the electronic device is greater than the task load, the electronic device can normally perform the task. Thus, the electronic device can provide the second computing capability for drawing the first image frame to ensure normal operation.

[0012] In some implementations of the first aspect, after the first time duration, before the electronic device switches to drawing the first image frame by the second computing capability, the method further includes: the electronic device determines that the sum of the first load and a virtual load exceeds the first computing capability, the smaller the first computing capability, the greater the virtual load, and the first load includes a load of the electronic device when drawing the first image frame.

[0013] Thus, in this case, the electronic device cannot switch to the stronger computing capability based on the first load. The electronic device can add a virtual load to it. Thus, the electronic device can subsequently switch to the second computing capability to perform the task based on a switching rule that the first load slightly exceeds the currently used computing capability.

[0014] In some implementations of the first aspect, the second computing capability is greater than or equal to the sum of the first load and the virtual load.

[0015] Since the computing capability provided by the electronic device is greater than the task load, the electronic device can normally perform the task. Thus, the electronic device can provide the second computing capability for drawing the first image frame to ensure normal operation.

[0016] In some implementations of the first aspect, the first load is a load of the electronic device for drawing the first image frame per unit time, and after the electronic device starts drawing the first image frame by the first computing capability, the method further includes: the electronic device determines the first load according to a load within a second time duration for drawing the first image frame, the second time duration includes a plurality of unit times, and an end point of the second time duration is after an end point of the first time duration.

[0017] In the embodiments of the present application, the electronic device has adjusted the window size of the WALT algorithm at the end point of the first time length. That is, the end point of the second time length should be after the end point of the first time length. In this way, the electronic device can predict the first load through the WALT algorithm.

[0018] In combination with the first aspect, in some implementations, the unit time is less than a first threshold. In this way, the electronic device can obtain the first load faster.

[0019] In combination with the first aspect, in some implementations, the stronger the first computing capability is, the longer the second time length is. In this way, it can not only reduce the waste of computing resources, but also obtain the first load faster to a certain extent.

[0020] In combination with the first aspect, in some implementations, if the first computing capability is the computing capability provided by a large core at a frequency point greater than a second threshold, the unit time is 16 ms; if the first computing capability is the computing capability provided by the large core at a frequency point less than or equal to the second threshold, the unit time is 12 ms; if the first computing capability is the computing capability provided by a medium core, the unit time is 8 ms; if the first computing capability is the computing capability provided by a small core, the unit time is 4 ms, wherein the computing capability provided by the large core is stronger than the computing capability provided by the medium core, and the computing capability provided by the medium core is stronger than the computing capability provided by the small core.

[0021] In combination with the first aspect, in some implementations, if the first computing capability is the computing capability provided by a large core at a frequency point less than or equal to a second threshold, the second computing capability is the computing capability provided by the large core at a frequency point greater than the second threshold; if the first computing capability is the computing capability provided by a medium core, the second computing capability is the computing capability provided by the large core; if the first computing capability is the computing capability provided by a small core, the second computing capability is the computing capability provided by the large core or the medium core, wherein the computing capability provided by the large core is stronger than the computing capability provided by the medium core, and the computing capability provided by the medium core is stronger than the computing capability provided by the small core.

[0022] In combination with the first aspect, in some implementations, the first time length is less than or equal to the time length for the electronic device to display one frame of image. In this way, the electronic device can determine that if the time length for drawing the first frame of image exceeds the first time length, the electronic device will appear frame loss phenomenon based on the principle of drawing and displaying the frame of image.

[0023] In some implementations of the first aspect, after the electronic device switches to continue rendering the first image frame by the second computing capability, the method further includes: the electronic device generating a second rendering signal; the electronic device starting to render a second image frame by the second computing capability; and if the second computing capability exceeds the value of the second load by more than a third threshold, the electronic device switches to continue rendering the second image frame by the first computing capability, wherein the first computing capability is greater than or equal to the second load, and the second load is a load of the electronic device when rendering the second image frame.

[0024] In this way, the electronic device can detect whether the rendering time exceeds the first time during the rendering of each image frame, and determine whether to implement the image frame processing method provided in the embodiments of the present application.

[0025] In a second aspect, the present application provides an electronic device, which includes a memory, a processor, and computer instructions stored in the memory, and the processor executes the computer program to implement the method of the first aspect or any of the implementations of the first aspect.

[0026] In a third aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect or any of the implementations of the first aspect.

[0027] In a fourth aspect, the embodiments of the present application provide a computer program product, which includes computer instructions, and the computer instructions are executed by a processor to implement the method of the first aspect or any of the implementations of the first aspect.

[0028] The beneficial effects of the second aspect to the fourth aspect can refer to the beneficial effects of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0029] FIGS. 1A-1D are schematic diagrams of several application scenarios of the image frame processing method provided in the embodiments of the present application;

[0030] FIG. 2 is a flowchart of an image frame processing method provided in the embodiments of the present application;

[0031] FIG. 3 is a schematic diagram of the task load of an electronic device from time a to time b;

[0032] FIG. 4 is a schematic diagram of the hardware structure of an electronic device provided in the embodiments of the present application;

[0033] FIG. 5 is a schematic diagram of the software structure of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0035] Hereinafter, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two.

[0036] Some concepts related to the embodiments of the present application are introduced below.

[0037] The drawing signal refers to a signal for triggering the electronic device to start drawing a new image frame through the central processing unit (CPU). The electronic device can respond to the drawing signal and start drawing the image frame when the CPU is idle.

[0038] The vertical synchronization signal (i.e. VSYNC signal) refers to a hardware signal for triggering the electronic device to refresh the image displayed on the display screen. It is a periodic discrete signal, and the signal period thereof can be determined by the frame rate of the display screen of the electronic device, for example, the signal period of the VSYNC signal can be the inverse of the frame rate of the display screen. For example, the frame rate of the display screen of the electronic device can be any value of 60 hertz (Hz), 70 Hz, 75 Hz, 80 Hz, 90 Hz or 120 Hz, etc. Taking the frame rate of the display screen as 60 Hz as an example, the above signal period is 1 / 60 = 0.01667 seconds (s) = 16.667 milliseconds (ms).

[0039] In some implementations, the drawing signal is obtained based on the VSYNC signal, and the two have the same period and consistent phase. However, in actual operation, there can be a certain phase error between the drawing signal and the VSYNC signal due to various factors (such as processing performance).

[0040] System load refers to the average load in a computer system, including: CPU load, disk I / O load, network I / O load. System load is used to reflect the overall workload of the system. CPU load refers to the average number of tasks using and waiting to use the CPU within a period of time. CPU load is used to reflect the workload of the CPU.

[0041] Task load refers to the computing resources required to perform the task. For example, the load of rendering an image frame can refer to the computing resources required by the electronic device when rendering the image frame. The load of rendering an image frame can be determined according to the complexity of the material provided by the application and the operation complexity obtained by the electronic device before rendering the image frame. Among them, the material complexity includes the size of the graphics primitive and the size of the texture, and the operation complexity includes the specific operation steps that need to be performed in the rendering process. The greater the material complexity and / or operation complexity, the greater the load of rendering the image frame. That is, the load of rendering an image frame is determined by the content contained in this frame of image frame and the effect to be achieved.

[0042] Computing power, also known as computing power, refers to the amount of computing tasks that can be completed by the computing unit (such as CPU, etc.) in the electronic device within a unit of time. The measurement standard of computing power can include one or more of the following: computing speed, energy consumption, precision, parallelism, etc. For example, commonly used measurement standards include: floating point operations per second (FLOPS), intrusion prevention system (IPS), and transactions per second (TPS). Among them, FLOPS is used to measure the computing power of high-performance computing, such as supercomputers and CPUs. IPS is used to measure the processing speed of the CPU. TPS is used to evaluate the performance of the data block server. Based on the strength of the computing power, the computing power can be divided into basic computing power, intelligent computing power and supercomputing power. Among them, the basic computing power is mostly used for general computing, such as mobile computing and Internet of Things. Intelligent computing power can be based on AI chips and mostly used for training and inference of artificial intelligence. Supercomputing power is provided by high-performance computing clusters and mostly used for computing in the field of cutting-edge science.

[0043] In some implementations, the task load can be measured by computing power. For example, after the electronic device obtains the task load, it can determine how much computing power is required to complete the task.

[0044] CPU frequency refers to the clock frequency of the CPU internal core. Generally, the electronic device should work based on the CPU frequency. The CPU frequency can be understood as the operation speed of the CPU. The higher the CPU frequency, the faster the operation speed of the CPU. The unit of the CPU frequency is GHz, which can represent the number of pulse signals generated per second. For example, the CPU frequency is 3.0 GHz, etc. In some implementations, the electronic device can adjust the CPU frequency.

[0045] CPU running frequency refers to the actual working frequency of the electronic device that may change considering the CPU load and temperature and other factors on the basis of setting the CPU frequency.

[0046] Small core, medium core and large core refer to different performance CPU cores. A plurality of independent cores can be integrated on the same multi-core processor, and each core can independently execute tasks. Such a multi-core processor can be used to balance the computing performance and energy consumption. Some multi-core processors can include 16 or even more core quantities.

[0047] Among them, the small core, also known as the energy-efficient core, has a relatively low computing power, which can be used to process low-load tasks, such as daily applications, web browsing, etc. For example, the small core frequency is relatively low, generally between 1 GHz and 2 GHz.

[0048] The medium core, also known as the performance core, has a higher computing power than the small core and a lower computing power than the large core, which can be used to process medium-load tasks, such as multi-task operations, etc. For example, the medium core frequency is generally between 2 GHz and 3 GHz.

[0049] The large core, also known as the high-performance core, has a relatively high computing power, which can be used to process high-load tasks, such as large games, complex scientific calculations, etc. For example, the medium core frequency is generally above 3 GHz, and can even reach 5 GHz or higher. In the embodiments of the present application, the specific values of the above-mentioned frequencies are only exemplary and are not limited thereto.

[0050] In some implementations, in the case where the cores of the CPU are not explicitly distinguished as large, medium and small cores, the CPU frequency generally refers to the frequency of the whole CPU. In the case where the cores of the CPU are distinguished as large, medium and small cores, the concept of CPU frequency is generally not used to represent, and the large core frequency can be used to represent the frequency of the large core in the CPU, the medium core frequency can be used to represent the frequency of the medium core in the CPU, and the small core frequency can be used to represent the frequency of the small core in the CPU. Similarly, the large core frequency, the medium core frequency and the small core frequency can also be adjusted.

[0051] The Windows Assist Load Tracing (WALT) algorithm is a computing method for monitoring and optimizing load, which can be used in task scheduling, task migration, system load balancing, etc. The WALT algorithm can predict the load of subsequent tasks by calculating the load of tasks that have been executed or partially executed. Specifically, the WALT algorithm can divide time into multiple windows, and the length of each window is usually set to 20 ms. Then, the WALT algorithm can count the load of tasks in each of the multiple (e.g., 5) windows closest to the current time, and then predict the load size of subsequent tasks based on the multiple loads.

[0052] In the embodiments of the present application, the task load is directly obtained from the historical task load, and the task load is determined / calculated / obtained by predicting the future task load through the WALT algorithm.

[0053] In some cases, when the CPU of the electronic device receives the drawing signal, if the CPU load is too large at this time, the CPU cannot start drawing a new image frame immediately in response to the drawing signal, and needs to start drawing a new image frame after a period of time after receiving the drawing signal. This is because the CPU is currently processing some tasks, and needs to wait until these tasks are completed before starting to draw a new image frame. This will cause the electronic device to not have obtained a new image frame when generating the VSYNC signal, and cannot refresh and display a new image frame, but can only repeatedly refresh and display the previous image frame. That is, the electronic device displays the same image frame in two signal periods. In a more serious case, if the CPU load is larger, it can cause the electronic device to display the same image frame in subsequent multiple signal periods. In this way, frame loss phenomenon can occur.

[0054] In other cases, when the CPU of the electronic device receives the drawing signal, the CPU can start drawing a new image frame immediately in response to the drawing signal, but the CPU takes too long to draw the new image frame. This is because the load of drawing an image frame is large, and a lot of computing power is needed, but the current CPU can not provide the corresponding computing power, resulting in a long drawing time. This will also cause the electronic device to not have obtained a new image frame when generating the VSYNC signal, and cannot refresh and display a new image frame, but can only repeatedly refresh and display the previous image frame. In a more serious case, if the load of drawing an image frame is larger, it can cause the electronic device to display the same image frame in subsequent multiple signal periods. In this way, frame loss phenomenon can also occur. In some implementations, the above two situations can also occur simultaneously, in which case the duration of frame loss can be longer.

[0055] To reduce the occurrence of the above problems, embodiments of the present application provide a method for processing an image frame. In the method, an electronic device generates a drawing signal, and then the electronic device starts to draw an image frame A. Then, the electronic device can determine whether the drawing of the image frame A is completed within a time duration a after the generation of the drawing signal. If not, it means that the electronic device can have a frame loss phenomenon. Next, the electronic device can continue to draw the image frame A using stronger computing power. The time duration can be set to be less than or equal to a signal period.

[0056] In this way, the electronic device can complete the drawing of the image frame A faster, reduce the time duration of the frame loss phenomenon caused by drawing the image frame A, and even avoid the frame loss phenomenon.

[0057] The following describes several application scenarios of the method for processing an image frame provided by embodiments of the present application. Scenario one is a scenario in which the drawing of an image frame is completed within a preset time, and scenarios two, three and four respectively show several scenarios in which the drawing of an image frame is not completed within a preset time. The time duration a refers to a time duration after the generation of a drawing signal, and the time duration b refers to a time duration after the end of the time duration a. The time duration a is set on the premise that the electronic device can normally refresh and display an (i+1)th image. For example, the time duration a can be set to be less than or equal to a signal period. The time duration b can be set to be greater than a signal period.

[0058] Scenario one: the drawing of the (i+1)th image is completed within the time duration a.

[0059] Referring to FIG. 1A, after the drawing of an ith image is completed, the electronic device generates a drawing signal. In (a) of FIG. 1A, the electronic device can draw the (i+1)th image immediately in response to the drawing signal. In (b) of FIG. 1A, the electronic device can draw the (i+1)th image after an interval time duration m1 in response to the drawing signal. The electronic device detects that the drawing of the (i+1)th image is completed within the time duration a after the generation of the drawing signal. In this way, the electronic device can obtain the (i+1)th image before the generation of a VSYNC signal, and refresh and display the (i+1)th image when the VSYNC signal is generated. Therefore, in scenario one, the frame loss phenomenon caused by drawing the (i+1)th image generally does not occur.

[0060] Scenario two: the drawing of the (i+1)th image is not completed within the time duration a, and the drawing of the (i+1)th image is started within the time duration a.

[0061] Referring to FIG. 1B, after completing the drawing of the i-th frame image, the electronic device generates a drawing signal. In (a) of FIG. 1B, the electronic device can draw the (i+1)-th frame image immediately in response to the drawing signal. In (b) of FIG. 1B, the electronic device can draw the (i+1)-th frame image after a time duration m2 in response to the drawing signal. The electronic device detects that the electronic device does not complete the drawing of the (i+1)-th frame image within a time duration a after the generation of the drawing signal. In this way, the electronic device has not acquired the (i+1)-th frame image at the time of generation of the VSYNC signal, and can only repeatedly refresh the display of the i-th frame image. Therefore, under scenario two, the phenomenon of frame loss due to the drawing of the (i+1)-th frame image can occur.

[0062] Scenario three: the drawing of the (i+1)-th frame image is not completed within the time duration a, and the drawing of the (i+1)-th frame image is started within the time duration b.

[0063] Referring to FIG. 1C, after completing the drawing of the i-th frame image, the electronic device generates a drawing signal. The electronic device can draw the (i+1)-th frame image in response to the drawing signal. The electronic device detects that the electronic device does not complete the drawing of the (i+1)-th frame image within a time duration a after the generation of the drawing signal. Furthermore, the electronic device does not start the drawing of the (i+1)-th frame image within a time duration b after the time duration a. In this way, the electronic device has not acquired the (i+1)-th frame image at the time of generation of the VSYNC signal, and can only repeatedly refresh the display of the i-th frame image. Therefore, under scenario three, the phenomenon of frame loss due to the drawing of the (i+1)-th frame image can occur.

[0064] Scenario four: the drawing of the (i+1)-th frame image is not completed within the time duration a, and the drawing of the (i+1)-th frame image is not started after the time duration b.

[0065] Referring to FIG. 1D, after completing the drawing of the i-th frame image, the electronic device generates a drawing signal. The electronic device can draw the (i+1)-th frame image in response to the drawing signal. The electronic device detects that the electronic device does not complete the drawing of the (i+1)-th frame image within a time duration a after the generation of the drawing signal. Furthermore, the electronic device does not start the drawing of the (i+1)-th frame image within a time duration b after the time duration a. Alternatively, the electronic device detects that the electronic device does not complete the drawing of the (i+1)-th frame image within a time duration a after the generation of the drawing signal. Furthermore, the electronic device does not request the drawing of the (i+1)-th frame image. In this case, it can be considered that the electronic device will not perform the task of drawing images subsequently. For example, the electronic device is powered off or shut down, or the drawing process of the electronic device is abnormal. Therefore, under scenario four, the phenomenon of frame loss due to the drawing of the (i+1)-th frame image generally does not occur.

[0066] Based on the above description of the multiple scenarios, the method for processing image frames provided in the embodiments of the present application can reduce the phenomenon of frame loss under scenario two and scenario three to a certain extent.

[0067] The following introduces a flow of a method for processing image frames provided by an embodiment of the present application.

[0068] FIG. 2 exemplarily shows a flow diagram of a method for processing image frames provided by an embodiment of the present application. The method comprises:

[0069] S201, the electronic device generates a first drawing signal.

[0070] The first drawing signal can be obtained based on a vertical synchronization signal. The first drawing signal is generated when the electronic device has completed drawing of a previous image frame, that is, the first drawing signal is used to trigger drawing of a new image frame. Moreover, the drawing signal is not used to trigger drawing of a specific image frame, but is used to trigger the CPU to draw, and which image frame is drawn is determined by information of the image frame obtained by the CPU.

[0071] After the electronic device performs S201, it can perform S202.

[0072] S202, the electronic device starts drawing a first image frame by using a first computing capability.

[0073] The first computing capability refers to a computing capability allocated by the electronic device for drawing the first image frame. That is, the electronic device currently considers that it is appropriate to allocate the first computing capability for drawing the first image frame and that the drawing can be completed in time.

[0074] In some implementations, after the first drawing signal is generated, the electronic device can start drawing the first image frame in response to the first drawing signal. Specifically, if the CPU is idle when the first drawing signal is generated and can provide the first computing capability, the electronic device can start drawing the first image frame immediately after the first drawing signal is generated. If the CPU is busy when the first drawing signal is generated and cannot provide the first computing capability, the electronic device can start drawing the first image frame after a time interval after the first drawing signal is generated.

[0075] After the electronic device performs S202, it can perform S203.

[0076] S203, the electronic device determines that drawing of the first image frame is not completed within a first time interval after the first drawing signal is generated.

[0077] The first time interval is set by the electronic device. The electronic device considers that if the drawing of the first image frame can be completed within the first time interval, a frame loss phenomenon caused by drawing of the first image frame generally does not occur. Exemplarily, the first time interval can be set to be less than or equal to one signal period.

[0078] In some implementations, after the electronic device performs S203, it can be determined that, after the first time duration, if the electronic device continues to draw the first image frame by using the first computing capability, frame loss phenomenon caused by drawing the first image frame can occur. In order to reduce the time duration in which the frame loss phenomenon occurs, the electronic device can continue to draw the first image frame by using higher computing capability by implementing the image frame processing method provided in the embodiments of the present application.

[0079] After the electronic device performs S203, it can perform S204.

[0080] S204, the electronic device determines the first load when drawing the first image frame.

[0081] Specifically, the above step S204 specifically includes the following steps:

[0082] S204-1, the electronic device determines the first CPU core corresponding to the first computing capability and the first CPU frequency point.

[0083] In some implementations, the CPU in the electronic device involved in the embodiments of the present application is multi-core. Therefore, the electronic device can determine that, when performing S202, the first computing capability used by the electronic device is provided by the first CPU core with the first CPU frequency point. If the first CPU core is not the core with the strongest computing capability that the electronic device can provide, and / or the first CPU frequency point is not the highest frequency point that the electronic device can provide, it indicates that the electronic device has not used the highest computing capability to draw the first image frame at this time.

[0084] S204-2, the electronic device determines the size of the first window in the WALT algorithm based on the first CPU core and the first CPU frequency point.

[0085] Before S204-1, the electronic device sets different first window sizes used in the WALT algorithm for different first CPU cores and / or first CPU frequency points. This is because the window size of the WALT algorithm affects the speed of obtaining the task load exceeding a certain threshold. The smaller the window, the faster the load of drawing the image frame exceeding a certain threshold is obtained.

[0086] The following describes why the window size of the WALT algorithm affects the speed of obtaining the task load exceeding a certain threshold based on FIG. 3.

[0087] FIG. 3 exemplarily shows a schematic diagram of the task load of the electronic device from time a to time b. Time b is the time of 5 windows after time a.

[0088] Referring to FIG. 3, the task load before time a is a1, and the task load after time a is a2. Here, the load is measured by the computing power. For example, when the task is to draw an image frame, the load of the electronic device for drawing an image frame before time a is a1, and the load of the electronic device for drawing an image frame after time a is a2. Wherein, a1 is less than a2.

[0089] The electronic device can obtain the task load of each of the 5 windows in the first group at time a, obtain the task load of each of the 5 windows in the second group at one window after time a, obtain the task load of each of the 5 windows in the third group at two windows after time a, obtain the task load of each of the 5 windows in the fourth group at three windows after time a, obtain the task load of each of the 5 windows in the fifth group at four windows after time a, and obtain the task load of each of the 5 windows in the sixth group at five windows after time a.

[0090] Wherein, the task load of the first group of 5 windows is a1, and the task load predicted based on the task load of the first group is a3.

[0091] The task load of the first 4 windows in the second group is a1, and the task load of the last 1 window is a2. The task load predicted based on the task load of the second group is a4.

[0092] The task load of the first 3 windows in the third group is a1, and the task load of the last 2 windows is a2. The task load predicted based on the task load of the third group is a5.

[0093] The task load of the first 2 windows in the fourth group is a1, and the task load of the last 3 windows is a2. The task load predicted based on the task load of the fourth group is a6.

[0094] The task load of the first 1 window in the fifth group is a1, and the task load of the last 4 windows is a2. The task load predicted based on the task load of the fifth group is a7.

[0095] The task load of the first 1 window in the fifth group is a1, and the task load of the last 4 windows is a2. The task load predicted based on the task load of the fifth group is a7.

[0096] In the embodiments of the present application, the values of the above-mentioned task loads are only exemplary, and other values representing small task loads and large task loads are also possible, which are not limited.

[0097] In some implementations, the size of the window affects the speed at which the electronic device obtains a task load that exceeds a threshold value through the WALT algorithm. For example, Table 1 illustrates the time and size of the task load obtained by the electronic device when the window size in FIG. 3 is 20 ms.

[0098] Table 1

[0099] Table 2 illustrates the time and size of the task load obtained by the electronic device when the window size in FIG. 3 is 8 ms.

[0100] Table 2

[0101] As shown in Tables 1 and 2, assuming that the electronic device is configured to switch to performing a task by using stronger computing power when the calculated task load is greater than or equal to a5. When the window size is set to 20 ms, the electronic device needs to calculate the task load with a size of a5 at 40 ms after the time instant a, that is, after the task load suddenly increases, and then the electronic device can perform the task by using stronger computing power. When the window size is set to 8 ms, the electronic device needs to calculate the task load with a size of a5 at 16 ms after the time instant a, that is, after the task load suddenly increases, and then the electronic device can perform the task by using stronger computing power. That is, the latter is 24 ms faster than the former in performing the task by using stronger computing power. Therefore, based on the foregoing description, the smaller the window, the faster the electronic device can perform the task by using stronger computing power.

[0102] However, the smaller the window, the higher the frequency at which the electronic device calculates the task load. For example, when the window size is set to 20 ms, the electronic device calculates the task load every 20 ms; and when the window size is set to 8 ms, the electronic device calculates the task load every 8 ms. The higher the frequency at which the electronic device calculates the task load, the more computing resources are consumed. Therefore, in the embodiments of the present application, instead of simply reducing the size of the window, different first window sizes are set according to the size of the currently used computing power. In this way, the resources consumed for calculating the task load can be reduced, and the task load that exceeds a threshold value can be obtained as quickly as possible.

[0103] In the embodiments of the present application, the foregoing description of the WALT algorithm is merely used to explain the principle of the WALT algorithm, and does not mean that the WALT algorithm is calculated based only on the foregoing description. The task load counted for each window is not limited to being measured by computing power, and can also be measured by other parameters. Furthermore, the manner of predicting the task load by using the historically counted task load is not limited to the average value, and can also have other calculation manners, which are not limited herein.

[0104] In the embodiments of the present application, the stronger the first computing capability is, the larger the first window set by the electronic device is; the weaker the first computing capability is, the smaller the first window set by the electronic device is. This is because: the first computing capability is capable of meeting the electronic device to normally perform a task before the task load suddenly increases. The stronger the first computing capability is, the larger the historical task load counted by the electronic device is, and the shorter the time for the electronic device to obtain the task load exceeding a certain threshold value through the WALT algorithm is. For example, the task load before time a is a9, and the task load after time a is a2. Then, the task load calculated by the electronic device 20 ms after time a is a10. Wherein, a9 is greater than a4 and less than a5. a10 is greater than a5 and less than a6. Compared with the case that the task load before time a is a1 and the task load after time a is a2, the stronger computing capability is used to perform the task 20 ms faster. If the shorter time (for example, 20 ms after time a) for obtaining the task load is further shortened, the speed of switching to the stronger computing capability will not be significantly improved, but the consumption of computing resources may be caused. Therefore, the electronic device is set to: the stronger the first computing capability is, the larger the first window is; the weaker the first computing capability is, the smaller the first window is.

[0105] Specifically, when the first CPU core is a large core, and the first CPU frequency point is the maximum frequency point that the first CPU core can provide, the electronic device can set the size of the first window to 16 ms. When the first CPU core is a large core, and the first CPU frequency point is not the maximum frequency point that the first CPU core can provide, the electronic device can set the size of the first window to 12 ms. When the first CPU core is a medium core, the electronic device can set the size of the first window to 12 ms. The electronic device can set the size of the first window to 8 ms. When the first CPU core is a small core, the electronic device can set the size of the first window to 4 ms.

[0106] In the embodiments of the present application, the above-mentioned manner of setting the size of the first window based on which core the first CPU core is specifically only exemplarily illustrates, and there can be more ways to set the size of the first window, which is not limited.

[0107] S204-3, the electronic device determines the first load based on the WALT algorithm using the first window.

[0108] In some implementations, after S204-3 is performed, the electronic device can determine the size of the first window. The electronic device can calculate the first load through the WALT algorithm based on the first window.

[0109] In the embodiments of the present application, after performing S204-2, the electronic device calculates the first load every interval of a single first window until the drawing of the first image frame is completed.

[0110] S205, the electronic device determines whether the first load is greater than the first computing capacity.

[0111] In some implementations, the electronic device can determine the size of the first computing capacity every time the first load is calculated. That is, S204 and S205 described above can be performed multiple times.

[0112] In the embodiments of the present application, the purpose of the electronic device calculating the first load is to draw the first image frame using a computing capacity stronger than the first computing capacity. In the field, the electronic device usually sets a switching rule for switching computing capacity, and the switching rule includes: in the case that the calculated load slightly exceeds the currently used computing capacity, the stronger computing capacity can be switched to perform the task. In order to be able to switch to a stronger computing capacity, the electronic device meets the above rule or creates some conditions to meet the above switching rule.

[0113] In some implementations, if the electronic device determines that the first load is greater than the first computing capacity, it means that the electronic device has met the rule of switching to an updated computing capacity at this time. That is, the purpose of calculating the first load has been achieved, and the electronic device can directly perform S207-1 after determining that the first load is greater than the first computing capacity.

[0114] For example, the electronic device determines that the first load is greater than the first computing capacity can occur in scenario two shown in (a) of FIG. 1B. Specifically, (a) of FIG. 1B is a scenario in which the load of the electronic device drawing the first image frame is large and cannot complete the drawing of the first image frame in the first time length.

[0115] Optionally, S205 can also be: the electronic device determines whether the value of the first load exceeding the first computing capacity is greater than a certain threshold. This is because the switching rule can also include: only in the case that the calculated load exceeds the value of the currently used computing capacity greater than a certain threshold, the stronger computing capacity can be switched to perform the task. At this time, after performing the optional S205, if it is determined that the value of the first load exceeding the first computing capacity is greater than a certain threshold, S207-1 can be performed.

[0116] S207-1, the electronic device determines the second computing capacity required based on the size of the first load.

[0117] In some embodiments, after the electronic device determines that the first load is greater than the first computing capability, the second computing capability required can be determined. In this case, the second computing capability is stronger than the first computing capability. For example, when the first CPU core is a large core, and the first CPU frequency point is not the maximum frequency point that the first CPU core can provide, the second computing capability can be the computing capability provided by the large core at the maximum frequency point. When the first CPU core is a medium core, the second computing capability can be the computing capability provided by the large core. When the first CPU core is a small core, the second computing capability can be the computing capability provided by the large core or the medium core.

[0118] In some embodiments, after the electronic device determines that the first load is greater than the first computing capability, the size of the specific second computing capability can be determined.

[0119] Specifically, after performing S203, when the first load is greater than the first computing capability for the first time, the electronic device can determine the size of the first load (referred to as the first load a) that is greater than the first computing capability for the first time, and determine that the minimum computing capability that meets the first load a is the second computing capability.

[0120] After performing S203, when the sizes of the first loads calculated for two consecutive times are not very different, and both are greater than the first computing capability, that is, when the difference between the first load calculated for the M-1th time and the first load calculated for the Mth time is less than a certain threshold or tends to 0, and both are greater than the first computing capability, it indicates that the first load calculated by the electronic device is stable at this time, and the value of the first load will not change much. Therefore, it can be determined that the minimum computing capability that meets the first load calculated for the Mth time is the second computing capability.

[0121] In the embodiments of the present application, the above-mentioned manner in which the electronic device determines the second computing capability required based on the first load is only exemplary, and other more ways of determining the second computing capability can also be included, which are not limited herein.

[0122] After performing S207-1, the electronic device can perform S208.

[0123] In some embodiments, if the electronic device determines that the first load is less than the first computing capability, it indicates that the electronic device does not meet the rule of switching to the updated computing capability at this time. That is, the purpose of the electronic device to calculate the first load has not been achieved. In order for the electronic device to continue to draw the first image frame using the computing capability stronger than the first computing capability, the electronic device needs to create some conditions to meet the switching rule. Therefore, after determining that the first load is less than the first computing capability, the electronic device needs to perform S206.

[0124] For example, the electronic device determines that the first load is less than the first computing capability. This can occur in scenario two shown in (b) of FIG. 1B. Specifically, (b) of FIG. 1B is a scenario in which the electronic device starts to draw the first image frame late and thus cannot complete drawing of the first image frame within the first time length.

[0125] Optionally, S205 can also be that the electronic device determines whether the value by which the first load exceeds the first computing capability is greater than a threshold. This is because the switching rule can also include that the electronic device switches to the stronger computing capability to perform the task only when the value by which the calculated load exceeds the currently used computing capability is greater than a threshold. After S205 is performed, if it is determined that the value by which the first load exceeds the first computing capability is less than or equal to a threshold, S206 can be performed.

[0126] S206: The electronic device sets a virtual load such that the sum of the first load and the virtual load exceeds the first computing capability.

[0127] In some implementations, when the first load is less than the first computing capability, the electronic device can add a virtual load for drawing the first image frame. The virtual load mentioned herein is different from the task load and is a virtual value that has no actual meaning. The virtual load is only to make the electronic device believe that the computing capability for drawing the first image frame needs to be the sum of the first load and the virtual load, and does not affect the load of the electronic device for drawing the first image frame.

[0128] Specifically, after S203 is performed, when the first load calculated for the previous N times is less than the first computing capability, it can be determined that the first load calculated subsequently by the electronic device will probably be less than the first computing capability, and thus S206 can be performed after the first load is calculated for the Nth time. The value of N is a positive integer not greater than 5.

[0129] The electronic device can also perform S206 after S203 is performed, when the first load calculated for two consecutive times has no great difference and is less than the first computing capability, that is, when the difference between the first load calculated for the M-1th time and the first load calculated for the Mth time is less than a threshold or tends to 0, and both are less than the first computing capability. It can be determined that the first load calculated by the electronic device is stable at this time, and the value of the first load will not change greatly, and thus S206 can be performed after the first load is calculated for the Mth time. In the embodiments of the present application, the time at which the electronic device sets the virtual load is only illustrative, and other times can also be included, which are not limited herein.

[0130] In some implementations, the stronger the first computing capability, the smaller the virtual load set by the electronic device; the weaker the first computing capability, the larger the virtual load set by the electronic device. This is a strategy set in consideration of subsequent determination of computing capability after switching. The first computing capability is capable of meeting the normal execution of tasks of the electronic device. The stronger the first computing capability, the larger the historical task load counted by the electronic device, and the larger the first load calculated. Then, in order to switch to the same stronger computing capability, the larger the first load corresponds to the smaller virtual load. That is, the larger the first load only needs to correspond to a smaller virtual load to meet the requirement of the electronic device switching to the stronger computing capability.

[0131] Specifically, when the first CPU core is a large core, and the first CPU frequency point is not the maximum frequency point that the first CPU core can provide, the electronic device can assign a larger value to the virtual load. When the first CPU core is a medium core, the electronic device can assign a medium value to the virtual load. When the first CPU core is a small core, the electronic device can assign a smaller value to the virtual load.

[0132] Optionally, when S205 is: the electronic device determines whether the value of the first load exceeding the first computing capability is greater than a certain threshold. S206 can also be: the electronic device sets the virtual load such that the sum of the first load and the virtual load exceeding the value of the first computing capability is greater than a certain threshold. Similarly, this is because the electronic device's switching computing capability rule can also include: only in the case where the electronic device considers that the current task load exceeds the value of the currently used computing capability by more than a certain threshold, can the computing capability be switched to a stronger one to execute tasks.

[0133] After the electronic device performs S206, the electronic device can perform S207-2.

[0134] S207-2, the electronic device determines the required second computing capability based on the sum of the first load and the virtual load.

[0135] In some implementations, after the electronic device determines that the sum of the first load and the virtual load is greater than the first computing capability, the required second computing capability can be determined. The second computing capability is stronger than the first computing capability.

[0136] For example, when the first CPU core is a large core, and the first CPU frequency point is not the maximum frequency point that the first CPU core can provide, the second computing capability can be the computing capability provided by the large core at the maximum frequency point. When the first CPU core is a medium core, the second computing capability can be the computing capability provided by the large core. When the first CPU core is a small core, the second computing capability can be the computing capability provided by the large core or the medium core.

[0137] In some implementations, the electronic device can determine the value of the specific second computing capability.

[0138] Specifically, after performing S203, the electronic device can determine the size of the sum of the first load and the virtual load (referred to as sum load a), and determine that the minimum computing capability that satisfies the sum load a can provide is the second computing capability.

[0139] In the embodiments of the present application, the manner in which the electronic device determines the required second computing capability is only illustrative, and other more ways of determining the second computing capability can also be included, which are not limited herein.

[0140] After performing S207-2, the electronic device can perform S208.

[0141] S208, the electronic device switches to continue rendering the first image frame by the second computing capability, wherein the second computing capability is stronger than the first computing capability.

[0142] In some implementations, after obtaining the size of the required second computing capability, the electronic device can switch to continue rendering the first image frame by the second computing capability. It is worth noting that in the above S207-1 and the above S207-2, the electronic device can determine that the electronic device can currently provide the second computing capability for rendering the first image frame at the same time as determining the size of the second computing capability, that is, before S208, the core with the second computing capability in the electronic device is in an idle state.

[0143] In a possible implementation, after performing the above S203, the electronic device can directly perform S208. Specifically, after determining that the rendering of the first image frame is not completed within the first time period after generating the first rendering signal, the electronic device can directly switch to use a stronger computing capability, i.e., the second computing capability, to continue rendering the first image frame. The manner in which the electronic device obtains the size of the second computing capability can be the specific steps included in the dashed box in FIG. 2. Among them, the dashed box includes: S204 to S207-1 or S207-2. Specifically, the dashed box includes: the electronic device determines the size of the second computing capability by calculating the first load. The manner in which the electronic device obtains the size of the second computing capability can also be other methods, for example, without calculating the first load, directly providing a computing capability stronger than the first computing capability for rendering the first image frame. In the embodiments of the present application, the manner of obtaining the size of the second computing capability is not limited.

[0144] In this way, the second computing capability is stronger than the first computing capability, so that the time spent by the electronic device in drawing the first image frame can be reduced. For example, if the electronic device continues to draw the first image frame by using only the first computing capability, the time spent can be 5 signal periods. If the electronic device draws the first image frame by using the first computing capability first and then draws the first image frame by using the second computing capability, the time spent can be only 2 signal periods. In this way, the former can need to repeatedly display the last image frame for 5 signal periods before displaying the first image frame on the display screen. The latter can only need to repeatedly display the last image frame for 2 signal periods before displaying the first image frame on the display screen. The last image frame mentioned herein refers to the image frame that the electronic device has just finished drawing before drawing the first image frame.

[0145] Implementing the above method can enable the electronic device to switch to drawing the first image frame by using the stronger computing capability more quickly by reducing the size of the window in the WLAT algorithm and / or setting the virtual load in a certain way. In this way, the electronic device can complete the drawing of the first image frame more quickly, reduce the duration of the frame loss phenomenon caused by drawing the first image frame, and even avoid the frame loss phenomenon.

[0146] In a possible implementation, after performing S203, when the electronic device acquires the first load for the first time, the electronic device does not need to determine whether the first load is greater than the first computing capability or whether the first load is always less than the first computing capability. The electronic device can directly set the first virtual load such that the sum of the first virtual load and the first load is equal to the maximum computing capability that the electronic device can provide. In this way, after generating the first drawing signal, the electronic device can switch to the maximum computing capability to continue drawing the first image frame after a time interval of the sum of the first time duration and the single first window size.

[0147] In a possible implementation, after performing S205, if the electronic device determines that the first load is greater than the first computing capability, the electronic device does not need to acquire the second computing capability based on the size of the first load. Instead, the electronic device can set the second computing capability to be the maximum computing capability that the electronic device can provide.

[0148] In some implementations, after performing S208, the electronic device can generate a second drawing signal, and the electronic device can start drawing a second image frame by using the second computing capability.

[0149] If the electronic device has completed the rendering of the second image frame within the first time duration after the second rendering signal is generated, it indicates that there will be no frame loss phenomenon caused by rendering the second image frame. Therefore, during the rendering of the second image frame, the electronic device can determine the second load during the rendering of the second image frame at a normal speed. Here, each window size in the WALT algorithm used to determine the second load is 20 ms by default.

[0150] If the second calculation capability exceeds the value of the second load by more than the third threshold, it indicates that the current use of the second calculation capability to render the second image frame may waste CPU resources, and the electronic device can switch to continue rendering the second image frame by the first calculation capability. Moreover, in order to avoid frame loss, the first calculation capability here should be greater than or equal to the second load. The switching calculation capability rule set by the electronic device can also include: in the case where the current calculation capability used by the electronic device exceeds the value of the calculated current task load by more than the third threshold, the task can be switched to a weaker calculation capability to prevent resource waste. The third threshold is the threshold for switching to a weaker calculation capability set by the electronic device.

[0151] If the second load exceeds the value of the second calculation capability by more than the fourth threshold, it indicates that the current use of the second calculation capability to render the second image frame may prolong the completion of rendering the second image frame, and the electronic device can switch to the third calculation capability to continue rendering the second image frame. Moreover, the third calculation capability is stronger than the second calculation capability. The switching calculation capability rule set by the electronic device can also include: in the case where the calculated load exceeds the value of the currently used calculation capability by more than the fourth threshold, the task can be switched to a stronger calculation capability. The third threshold is the threshold for switching to a stronger calculation capability set by the electronic device.

[0152] If the second calculation capability exceeds the value of the second load by less than or equal to the third threshold, or the second load exceeds the value of the second calculation capability by less than or equal to the fourth threshold, it indicates that the current use of the second calculation capability to render the second image frame is appropriate, and the electronic device can continue to render the second image frame by the second calculation capability.

[0153] It is worth noting that the time of switching the calculation capability used for rendering the task can be located in the process of rendering the second image frame, or it can be located after the rendering of the second image frame is completed, which depends on the time taken by the electronic device to calculate the second load to meet the above conditions.

[0154] If the electronic device does not complete the rendering of the second image frame within the first time length after the second rendering signal is generated, it indicates that the frame loss phenomenon caused by rendering the second image frame is likely to occur. Therefore, during the rendering of the second image frame, the electronic device can determine the third load during the rendering of the second image frame at a faster speed. How to determine the third load and how to adjust the computing power used for rendering the second image frame can refer to the related content of S204 to S208 described above, and will not be described here.

[0155] In the embodiments of the present application, the strong computing power is equivalent to the large computing power, and the weak computing power is equivalent to the small computing power.

[0156] In the embodiments of the present application, the sum of the time lengths of the plurality of (for example, 5) first windows before the electronic device calculates the first load can be referred to as a second time length, and the first window can be referred to as a unit time. The window size of the default WALT algorithm can be referred to as a first threshold value. The running of the large core at the highest frequency can be referred to as the running of the large core at a frequency greater than a second threshold value.

[0157] In some implementations, the tasks performed by the electronic device involved in the image frame processing method provided by the embodiments of the present application are not limited to the tasks performed in the rendering thread, but can also include tasks performed in a compositor thread, tasks performed in a rendering thread, and other tasks related to rendering images.

[0158] In a possible implementation, the second computing power and the first computing power not only refer to the computing power provided by the CPU in the electronic device, but also refer to the computing power provided by a graphics processing unit (GPU), the computing power provided by a double data rate (DDR), and the computing power provided by an input / output (I / O). For example, the computing power provided by the GPU can include the computing power provided by the GPU. The computing power provided by the DDR includes the transmission capability and the storage capability provided by the DDR. The computing power provided by the I / O can include the transmission capability provided by the I / O. In the embodiments of the present application, the above-mentioned provided computing power is only exemplary, and the specific parameters contained in each device determine the specific computing power provided, which is not limited.

[0159] FIG. 4 shows a structural schematic diagram of the electronic device 100.

[0160] The embodiments will be described below with the electronic device 100 as an example. It should be understood that the electronic device 100 shown in FIG. 4 is only an example, and the electronic device 100 can have more or fewer components than those shown in FIG. 4, can combine two or more components, or can have a different configuration of components. The various components shown in FIG. 4 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0161] For example, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, and the embodiments of the present application do not limit the specific type of the electronic device 100.

[0162] The electronic device 100 can 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 headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

[0164] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0165] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of instruction fetching and instruction execution.

[0166] The memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0167] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can 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, etc.

[0168] In some implementations, the processor 110 can be configured to start rendering the first image frame by using a first computing capability. The processor 110 can be further configured to determine whether the rendering of the first image frame is completed within a first time duration after generating the first rendering signal. The processor 110 can be further configured to calculate a first load by using a WALT algorithm of the first window. The processor 110 can be further configured to determine a second computing capability according to a size of the first load. The processor 110 can be further configured to determine the second computing capability according to a sum of the size of the first load and a size of a virtual load. The processor 110 can be further configured to switch to continue rendering the first image frame by using the second computing capability.

[0169] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a limitation on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.

[0170] The charging management module 140 is configured to receive a charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device through the power management module 141.

[0171] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0172] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.

[0173] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the 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 combination with a tuning switch.

[0174] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.

[0175] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.

[0176] The wireless communication module 160 can provide a wireless communication solution including a wireless local area network (WLAN) (e.g., a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification thereon, and radiate the signal as an electromagnetic wave via the antenna 2.

[0177] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can 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 technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

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

[0179] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a microled, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0180] The electronic device 100 can implement a photographing function through an ISP, the camera 193, a video codec, a GPU, the display screen 194, and an application processor.

[0181] The ISP is configured to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0182] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. 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 transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0183] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0184] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0185] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0186] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.

[0187] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0188] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

[0189] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functional modules of the audio module 170 can be disposed in the processor 110.

[0190] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0191] The receiver 170B, also referred to as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice through the receiver 170B by placing the receiver 170B close to the ear.

[0192] The microphone 170C, also referred to as a "microphone", "sound transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound through the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, and can also identify the source of the sound, realize the function of directional recording, etc.

[0193] The earphone interface 170D is configured to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0194] The pressure sensor 180A is configured to sense a pressure signal, and can convert the pressure signal into an electrical signal.

[0195] The gyroscope sensor 180B can be configured to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y and z axes) can be determined through the gyroscope sensor 180B.

[0196] The barometric pressure sensor 180C is used to measure barometric pressure. In some embodiments, the electronic device 100 calculates altitude based on the barometric pressure value measured by the barometric pressure sensor 180C, and assists in positioning and navigation.

[0197] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect opening and closing of a flip cover using the magnetic sensor 180D.

[0198] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (typically, three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the electronic device posture, and applied to screen rotation, pedometer, etc.

[0199] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing when shooting a scene.

[0200] The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.

[0201] The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the display screen 194 brightness according to the sensed ambient light brightness.

[0202] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint shooting, fingerprint answering calls, etc.

[0203] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 performs temperature processing strategies using the temperature detected by the temperature sensor 180J.

[0204] The touch sensor 180K is also called a "touch panel".

[0205] The bone conduction sensor 180M can obtain vibration signals.

[0206] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key. It can also be a touch key. The electronic device 100 can receive key input, and generate key signal input related to user settings and function control of the electronic device 100.

[0207] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompt, and also for touch vibration feedback.

[0208] The indicator 192 can be an indicator light, which can be used to indicate the charging status, the power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0209] The SIM card interface 195 is used to connect a SIM card.

[0210] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0211] FIG. 5 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0212] The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0213] The application layer can include a series of application packages.

[0214] As shown in FIG. 5, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0215] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0216] As shown in FIG. 5, the application framework layer includes a UI thread. The UI thread is a thread running in the CPU of the electronic device. The UI thread is used to respond to the drawing signal immediately after the drawing signal is generated, and start drawing the first image frame or start drawing the first image frame after a period of time.

[0217] The application framework layer can also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0218] The window manager is used to manage the window program. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc.

[0219] The content provider stores and retrieves data and makes the data accessible to applications. The data can include videos, images, audio, dialed and received phone calls, browsing history and bookmarks, phone book, etc.

[0220] The view system includes visual controls, such as controls that display text, controls that display pictures, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.

[0221] The telephony manager is used to provide the communication function of the electronic device 100. For example, management of call status (including call connection, call hang-up, etc.).

[0222] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0223] The notification manager enables applications to display notification information in the status bar, which can be used to convey messages of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, a message reminder, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or a scrolling text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, etc.

[0224] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0225] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0226] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0227] The system library can include a plurality of functional modules. For example: surface manager, media library, three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.

[0228] The surface manager is configured to manage the display subsystem and provide a fusion of 2D and 3D layers for multiple applications.

[0229] The media library supports playback and recording of a plurality of commonly used audio, video formats, and static image files. The media library can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.

[0230] The three-dimensional graphics processing library is configured to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing.

[0231] The 2D graphics engine is a drawing engine for 2D drawing.

[0232] The kernel layer includes a frame loss detection module, a scheduling module, and a load prediction module. The load prediction module includes a virtual load strategy and a WALT algorithm. The hardware layer includes a CPU.

[0233] In the embodiments of the present application, the frame loss detection module is configured to determine whether the drawing of the first image frame is completed within a first time duration after the generation of the drawing signal. If not, the frame loss detection module can send a first signal to the scheduling decision module, the first signal being configured to inform the scheduling module that the first window in the WALT algorithm needs to be adjusted. If yes, it means that the electronic device can not have the frame loss phenomenon, and the frame loss detection module does not send the first signal to the scheduling decision module. It is worth noting that the frame loss detection module will determine whether the drawing of the corresponding image frame is completed within the first time duration after the generation of each drawing signal.

[0234] The scheduling module is configured to determine the first CPU core and the first CPU frequency point corresponding to the first computing capability used for drawing the first image frame within a third time duration after receiving the first signal. The scheduling module is also configured to determine the size of the adjusted first window and send first information to the load prediction module, the first information including the size of the adjusted first window and the size of the first computing capability. It is worth noting that if the scheduling module cannot determine the first CPU core and the first CPU frequency point corresponding to the first computing capability used for drawing the first image frame within the third time duration after receiving the first signal, it means that the electronic device can not perform the image drawing task in the future.

[0235] The load prediction module is configured to adjust the size of the first window in the WALT algorithm after receiving the first information. The load prediction module is also configured to calculate the first load based on the WALT algorithm. The load prediction module is also configured to determine the size relationship between the first load and the first computing capability, and set a virtual load. The load prediction module is also configured to send the first load, or the sum of the first load and the virtual load, to the scheduling module.

[0236] After receiving the first load, or the sum of the first load and the virtual load, the scheduling module determines the second computing power required by the electronic device to subsequently draw the first image frame. The scheduling module may send a second signal to the CPU, which instructs the CPU to switch to the second computing power to draw the first image frame.

[0237] The following describes, with reference to Figure 5, the specific process of using the image frame processing method provided in the embodiments of this application in the above-mentioned scenarios one to four.

[0238] In scenario one:

[0239] When the UI thread receives the drawing signal, it begins drawing image frame A.

[0240] The frame drop detection module determines that image frame A has been drawn within the first time period after the drawing signal is generated.

[0241] The frame loss detection module will not send the first signal to the scheduling module, at which point the image frame processing method of this embodiment ends. The subsequent scheduling module and load prediction module will not perform the above functions.

[0242] In scenarios two and three:

[0243] When the UI thread receives the drawing signal, it begins drawing image frame A.

[0244] The frame loss detection module determines that image frame A has not been drawn within the first time period after the drawing signal is generated, and sends the first signal to the scheduling module.

[0245] After receiving the first signal, the scheduling module determines that the first computing power used to draw the first image frame corresponds to the first CPU core and the first CPU frequency. Specifically, in scenario two, the scheduling module can determine the first CPU core and the first CPU frequency upon receiving the first signal. In scenario three, the scheduling module determines the first CPU core and the first CPU frequency within the third time interval after receiving the first signal.

[0246] Then, the scheduling module determines the size of the adjusted first window based on the first CPU core and the first CPU frequency, and sends the first information to the load prediction module.

[0247] After receiving the first information, the load prediction module adjusts the size of the first window in the WALT algorithm. Then, the load prediction module calculates the first load using the WALT algorithm and determines whether to set up virtual load based on the relationship between the first load and the first computing capacity. Afterward, the load prediction module sends the first load, or the sum of the first load and the virtual load, to the scheduling module.

[0248] The scheduling module determines the second computing capability required for subsequent drawing of the first image frame based on the first load, or the sum of the first load and the virtual load, and sends a second signal to the CPU.

[0249] In scenario four:

[0250] The UI thread receives the drawing signal and starts drawing the image frame A.

[0251] The frame loss detection module determines that the drawing of the image frame A has not been completed within a first time duration after the drawing signal is generated, and sends a first signal to the scheduling module.

[0252] The scheduling module fails to determine the first CPU core and the first CPU frequency within a third time duration after receiving the first signal, and the image frame processing method of the embodiment ends. Subsequently, the scheduling module and the load prediction module also do not perform the above functions.

[0253] An electronic device is provided in an embodiment of the present application, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the method for displaying a notification.

[0254] An embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0255] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program runs on a computer, the computer program causes the computer to implement the steps in the above method embodiments.

[0256] An embodiment of the present application further provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit is configured to receive code instructions and transmit the code instructions to the processing circuit. The processing circuit is configured to run the code instructions to cause the chip system to implement the steps in any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.

[0257] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of processing image frames, characterized by, The method is applied to an electronic device, and the method comprises: The electronic device generates a first rendering signal; The electronic device starts rendering a first image frame by a first computing capability; Within a first time length after the generation of the first rendering signal, the electronic device does not complete the rendering of the first image frame; The electronic device switches to continue rendering the first image frame by a second computing capability, wherein the second computing capability is stronger than the first computing capability.

2. The method of claim 1, wherein, After the first time length, before the electronic device switches to render the first image frame by the second computing capability, the method further comprises: The electronic device determines that a first load exceeds the first computing capability, wherein the first load comprises a load of the electronic device when rendering the first image frame.

3. The method of claim 2, wherein, The second computing capability is greater than or equal to the first load.

4. The method of claim 1, wherein, After the first time length, before the electronic device switches to render the first image frame by the second computing capability, the method further comprises: The electronic device determines that a sum of a first load and a virtual load exceeds the first computing capability, wherein the smaller the first computing capability is, the larger the virtual load is, and the first load comprises a load of the electronic device when rendering the first image frame.

5. The method of claim 4, wherein, The second computing capability is greater than or equal to the sum of the first load and the virtual load.

6. The method according to any one of claims 2-5, characterized in that, The first load is a load of the electronic device for rendering the first image frame in a unit time, and after the electronic device starts rendering the first image frame by the first computing capability, the method further comprises: The electronic device determines the first load according to a load in a second time length for rendering the first image frame, wherein the second time length comprises a plurality of unit times, and an end point of the second time length is after an end point of the first time length.

7. The method of claim 6, wherein, The unit time is less than a first threshold.

8. The method according to claim 6 or 7, characterized in that, The stronger the first computing capability is, the longer the second time length is.

9. The method of any one of claims 6-8, wherein, if the first computing capability is a computing capability provided by a large core at a frequency point greater than a second threshold, the unit time is 16 ms; if the first computing capability is a computing capability provided by the large core at a frequency point less than or equal to the second threshold, the unit time is 12 ms; if the first computing capability is a computing capability provided by a medium core, the unit time is 8 ms; if the first computing capability is a computing capability provided by a small core, the unit time is 4 ms, wherein the computing capability provided by the large core is stronger than the computing capability provided by the medium core, and the computing capability provided by the medium core is stronger than the computing capability provided by the small core.

10. The method of any one of claims 1-9, wherein, if the first computing capability is a computing capability provided by a large core at a frequency point less than or equal to a second threshold, the second computing capability is a computing capability provided by the large core at a frequency point greater than the second threshold; if the first computing capability is a computing capability provided by a medium core, the second computing capability is a computing capability provided by the large core; If the first computing capability is a computing capability provided by a small core, the second computing capability is a computing capability provided by the large core or the medium core, wherein the large core provides a stronger computing capability than the medium core, and the medium core provides a stronger computing capability than the small core.

11. The method of any one of claims 1-10, wherein, The first time length is less than or equal to a time length for the electronic device to display a frame of image.

12. The method of any one of claims 1-11, wherein, After the electronic device switches to continue drawing the first image frame by the second computing capability, the method further includes: The electronic device generates a second drawing signal; The electronic device starts drawing a second image frame by the second computing capability; If the second computing capability exceeds a second load by a value greater than a third threshold, the electronic device switches to continue drawing the second image frame by the first computing capability, wherein the first computing capability is greater than or equal to the second load, and the second load is a load of the electronic device when drawing the second image frame.

13. An electronic device, comprising: The electronic device includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the method of any one of claims 1-12.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-12.

15. A computer program product, characterised in that, The computer program product includes computer instructions, and the computer instructions are executed by the processor to implement the method of any one of claims 1-12.

Citation Information

Patent Citations

  • Central processor frequency control method and related device

    CN111338838A

  • Frequency adjustment method and apparatus applied to terminal, and electronic device

    CN112789651A

  • Parameter adjusting method and electronic equipment

    CN116704087A

  • Image display method, and electronic devices

    WO2023185636A1