Display frame rate adjustment method and device, electronic equipment and storage medium

CN118968900BActive Publication Date: 2026-10-30VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411015496.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2026-10-30
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

[0004]然而,在网络出现异常或屏幕显示的内容较为复杂的情况下,可能会出现电子设备在显示帧率对应的绘制时长内无法完成图像帧的绘制的情况,这种情况下,电子设备只能复用上一个图像帧的内容,从而使得屏幕的显示画面可能出现视觉卡顿的现象

Benefits of technology

[0010]第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968900B_ABST
    Figure CN118968900B_ABST
Patent Text Reader

Abstract

The application discloses a display frame rate adjusting method and device, electronic equipment and storage medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring M drawing durations, each drawing duration being the drawing duration of an image frame that has been drawn by the electronic equipment; obtaining N prediction values based on the M drawing durations, each prediction value corresponding to a time range, each time range corresponding to a display frame rate, and each prediction value being used for representing the probability that a first drawing duration is within a time range, the first drawing duration being the drawing duration of an image frame that has not been drawn, and N being less than M; and adjusting the display frame rate of the electronic equipment to a first display frame rate based on the N prediction values, the first display frame rate being the display frame rate corresponding to the time range corresponding to the maximum prediction value in the N prediction values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and specifically relates to a display frame rate adjustment method, device, electronic device and storage medium. Background Technology

[0002] Display frame rate is typically measured in frames per second (FPS), representing the number of static image frames displayed by an electronic device per second. Currently, electronic devices can select a fixed display frame rate for different applications. For example, when an electronic device is running a communication application, the display frame rate can be 60, meaning the electronic device displays 60 image frames per second.

[0003] Typically, when an electronic device displays an image, if the displayed image changes continuously, the device cannot reuse previous image frames and needs to continuously draw new image frames to update the screen display. Specifically, the electronic device needs to complete the drawing of an image frame within the drawing time corresponding to the display frame rate. For example, with a display frame rate of 60, the electronic device needs to complete the drawing of one image frame within 16.67ms.

[0004] However, in cases of network anomalies or when the content displayed on the screen is complex, electronic devices may be unable to complete the rendering of image frames within the rendering time corresponding to the display frame rate. In such cases, the electronic device can only reuse the content of the previous image frame, which may cause visual stuttering on the screen. Summary of the Invention

[0005] The purpose of this application is to provide a display frame rate adjustment method, apparatus, electronic device, and storage medium that can reduce visual stuttering in the screen display.

[0006] In a first aspect, embodiments of this application provide a display frame rate adjustment method, the method comprising: obtaining M drawing durations, each drawing duration being the drawing duration of an image frame already drawn by the electronic device; obtaining N prediction values ​​based on the M drawing durations, each prediction value corresponding to a duration range, each duration range corresponding to a display frame rate, each prediction value being used to characterize: the probability that a first drawing duration falls within a duration range, the first drawing duration being the drawing duration of an undrawn image frame, N≤M; and adjusting the display frame rate of the electronic device to a first display frame rate based on the N prediction values, the first display frame rate being the display frame rate corresponding to the duration range corresponding to the largest prediction value among the N prediction values.

[0007] Secondly, embodiments of this application provide a display frame rate adjustment device, which includes: an acquisition module, a processing module, and an adjustment module. The acquisition module is used to acquire M drawing durations, each drawing duration being the drawing duration of one image frame already drawn by the electronic device. The processing module is used to obtain N predicted values ​​based on the M drawing durations acquired by the acquisition module, each predicted value corresponding to a duration range, each duration range corresponding to a display frame rate, and each predicted value representing: the probability that a first drawing duration falls within a duration range, where the first drawing duration is the drawing duration of an undrawn image frame, and N ≤ M. The adjustment module is used to adjust the display frame rate of the electronic device to a first display frame rate based on the N predicted values ​​obtained by the processing module, where the first display frame rate is the display frame rate corresponding to the duration range corresponding to the largest predicted value among the N predicted values.

[0008] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0009] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0010] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0011] In a sixth aspect, embodiments of this application provide a computer program / program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.

[0012] In this embodiment, the electronic device acquires M rendering durations, each rendering duration being the rendering duration of an image frame already rendered by the electronic device. Based on the M rendering durations, N prediction values ​​are obtained, each prediction value corresponding to a duration range, and each duration range corresponding to a display frame rate. Each prediction value is used to characterize: the probability that the first rendering duration falls within a duration range, where the first rendering duration is the rendering duration of an unrendered image frame, and N≤M. Based on the N prediction values, the display frame rate of the electronic device is adjusted to a first display frame rate, where the first display frame rate is the display frame rate corresponding to the duration range of the largest prediction value among the N prediction values. In this scheme, the rendering duration of unrendered image frames is predicted using the rendering duration of already rendered image frames, thereby adjusting the display frame rate of the electronic device to the most suitable frame rate. This ensures that when subsequent image frames are rendered, the rendering of the image frames can be completed within the rendering duration corresponding to the display frame rate, avoiding the electronic device reusing the content of the previous image frame, thus reducing visual stuttering on the screen. Attached Figure Description

[0013] Figure 1 This is one of the flowcharts illustrating a display frame rate adjustment method provided in an embodiment of this application;

[0014] Figure 2(A) is one of the schematic diagrams of an example of updating the screen display provided in the embodiments of this application;

[0015] Figure 2(B) is a second schematic diagram of an example of updating the screen display provided in the embodiments of this application;

[0016] Figure 3 This is the third example of an embodiment of updating the screen display provided in this application;

[0017] Figure 4 This is a second schematic flowchart of a display frame rate adjustment method provided in an embodiment of this application;

[0018] Figure 5 This is the third flowchart illustrating a display frame rate adjustment method provided in this application embodiment;

[0019] Figure 6(A) is one of the schematic diagrams of an example of drawing a queue provided in an embodiment of this application;

[0020] Figure 6(B) is a second example of a queue drawing provided in the embodiments of this application;

[0021] Figure 7 This is the fourth flowchart illustrating a display frame rate adjustment method provided in this application embodiment;

[0022] Figure 8This is a schematic diagram of the structure of a display frame rate adjustment device provided in an embodiment of this application;

[0023] Figure 9 This is one of the hardware structure diagrams of an electronic device provided in the embodiments of this application;

[0024] Figure 10 This is a second schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0027] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, "at least one of a, b, and c" can mean "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."

[0028] The following explains some concepts and / or terms involved in the data transmission methods, apparatus, devices, communication systems, and storage media provided in the embodiments of this application.

[0029] 1. Display frame rate, usually measured in FPS, refers to the number of still images displayed per second in a video or animation. A higher display frame rate generally means smoother animation or video effects. In games and video playback, a high display frame rate can provide a better visual experience and smoother dynamic effects.

[0030] For example, when the display frame rate of an electronic device is 60, the electronic device displays 60 image frames per second, which means that the electronic device needs to complete the drawing of one image frame within 16.67ms.

[0031] Furthermore, since electronic devices need to continuously draw new image frames to update the screen display when the screen display is constantly changing, and can reuse previous image frames when the screen display is not changing, the number of static image frames displayed per second by electronic devices and the number of image frames drawn per second by electronic devices can be the same or different.

[0032] 2. Screen refresh rate is the number of times the screen can refresh per second, which depends on the monitor (screen).

[0033] For example, when the screen refresh rate is 60Hz, the screen refreshes 60 times per second.

[0034] 3. Display Frame Rate and Screen Refresh Rate: The monitor's refresh rate and the corresponding number of frames are not equal. The graphics card can output an infinitely high number of frames, while the refresh rate is limited by the monitor's hardware. Therefore, when the frame rate is lower than the refresh rate, the same image frame may be refreshed several times, causing image stuttering. Conversely, when the frame rate is higher than the refresh rate, too many invalid frames will also cause image loss. This asymmetry causes screen tearing, stuttering, and other phenomena.

[0035] 4. Vsync (Vertical Synchronization) is a display technology that coordinates the monitor's refresh rate and the graphics card's output frame rate. It synchronizes the refresh rate and display frame rate to prevent screen tearing and provide smoother graphics. When Vsync is enabled, the graphics card waits for a vertical synchronization signal before drawing an image frame. When this signal arrives, the graphics card begins drawing the image frame. If the graphics card is powerful enough that it has already completed drawing the image frame before the next vertical synchronization signal arrives, the graphics card will pause processing and wait for the next vertical synchronization signal to arrive before starting to draw the next image frame. In simpler terms, vertical synchronization ensures that the number of frames output per second by the graphics card equals the monitor's refresh rate, ensuring that each image frame is displayed when the monitor is ready. That is, after each image frame is drawn, the monitor refreshes once to display the newly drawn image frame on the screen. Vertical synchronization is used to prevent screen tearing; conversely, disabling vertical synchronization will result in tearing and frame skipping. However, if the application's drawing speed cannot keep up with the screen's refresh rate, stuttering will also occur.

[0036] 5. Low Temperature Polycrystalline Oxide (LTPO) screen technology is a new type of display technology primarily used in Organic Light Emitting Display (OLED) screens. Because it can flexibly adjust the screen refresh rate according to the needs of the displayed image, thus saving power, it can achieve lower power consumption and higher energy efficiency. This, in turn, provides better battery life and a smoother display effect.

[0037] 6. HWUI, short for Hardware Accelerated 2D Rendering, is a component in the system. It is a hardware acceleration component used for graphics rendering. HWUI uses hardware acceleration technology to speed up the rendering of 2D graphics and text, including image drawing, text layout, and animation effects.

[0038] 7. A queue is a data structure used to store and manage data elements. It typically follows the First-In-First-Out (FIFO) principle, meaning that the element that enters the queue first will be taken out first.

[0039] The frame rate adjustment method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0040] Currently, Vsync technology is commonly used to keep the display frame rate and screen refresh rate consistent. For example, if the screen refresh rate is 60Hz, meaning the electronic device refreshes the screen 60 times per second, or once every 16.67ms, then the electronic device will draw image frames at a rate of 60 frames per second, that is, draw one frame every 16.67ms. In other words, after each image frame is drawn, the electronic device refreshes the display once to show that image frame, thereby keeping the display frame rate synchronized with the screen refresh rate.

[0041] However, in cases of network anomalies or when the content displayed on the screen is complex, electronic devices may be unable to complete the rendering of image frames within the rendering time corresponding to the display frame rate. In such cases, the electronic device can only reuse the content of the previous image frame, which may cause visual stuttering on the screen.

[0042] The display frame rate adjustment method in this application embodiment can be applied to scenarios where the screen display is updated, such as scenarios where image frames are drawn.

[0043] In the display frame rate adjustment method, apparatus, electronic device and storage medium provided in the embodiments of this application, the rendering time of unrendered image frames is predicted by the rendering time of already rendered image frames, thereby adjusting the display frame rate of the electronic device to the most suitable frame rate. This ensures that when subsequent image frames are rendered, the rendering of the image frames can be completed within the rendering time corresponding to the display frame rate, avoiding the electronic device from reusing the content of the previous image frame, thereby reducing the visual stuttering phenomenon in the screen display.

[0044] The execution subject of the display frame rate adjustment method provided in this application embodiment can be a display frame rate adjustment device, which can be an electronic device, or a functional module or entity within an electronic device. The following uses an electronic device as an example to illustrate the technical solution provided in this application embodiment.

[0045] This application provides a method for adjusting the display frame rate. Figure 1 A flowchart illustrating a display frame rate adjustment method provided in an embodiment of this application is shown. This method can be applied to electronic devices. Figure 1 As shown, the display frame rate adjustment method provided in this application embodiment may include the following steps 201 to 203.

[0046] Step 201: The electronic device obtains M drawing durations.

[0047] In the embodiments of this application, each of the above M drawing durations is the drawing duration of one image frame already drawn by the electronic device.

[0048] In some embodiments of this application, the above-mentioned drawing time can be understood as the time taken for an electronic device to draw an image frame.

[0049] In some embodiments of this application, when the electronic device detects a change in the screen display, it can obtain the rendering duration of each of the M image frames already rendered by the electronic device during the process of the screen display changing, i.e., the aforementioned M rendering durations.

[0050] In some embodiments of this application, the electronic device can obtain the rendering time of each image frame as it is rendered during the process of changes in the screen display.

[0051] In some embodiments of this application, when the electronic device receives input from a user on a first object displayed on the screen, it updates the screen display based on the input, thereby causing the screen display to change.

[0052] In some embodiments of this application, the first object mentioned above may include, but is not limited to, pages, controls, windows, lists, application icons, folders, etc. This application does not limit this aspect.

[0053] In some embodiments of this application, the input to the first object includes, but is not limited to: touch input by the user to the first object using a touch device such as a finger or stylus, or voice commands input by the user, or specific gestures input by the user, or swipe input, or click input, or other feasible input methods. The specific input can be determined according to actual usage needs, and this application does not limit this.

[0054] In some embodiments of this application, the specific gesture mentioned above can be any one of a single-click gesture, a swipe gesture, a drag gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, or a double-tap gesture.

[0055] In some embodiments of this application, the above-mentioned click input can be single-click input, double-click input, or any number of clicks, or it can be long-press input or short-press input.

[0056] For example, an electronic device can receive the user's swiping input on the page displayed on the screen. During the page swiping process, the device can obtain the drawing time of each of the M image frames drawn by the electronic device to obtain the aforementioned M drawing times.

[0057] In some embodiments of this application, the aforementioned M image frames may be consecutive image frames or non-consecutive image frames. This application does not limit this aspect.

[0058] For example, an electronic device can obtain the rendering duration of an image frame at intervals of one image frame to obtain the rendering duration of M discontinuous image frames.

[0059] For example, an electronic device may not obtain the drawing duration of an image frame after drawing the i-th image frame, but may obtain the drawing duration of an image frame after drawing the (i+1)-th image frame, and may not obtain the drawing duration of an image frame after drawing the (i+2)-th image frame, but may obtain the drawing duration of an image frame after drawing the (i+3)-th image frame. That is, the drawing duration of an image frame is obtained every other image frame.

[0060] In some embodiments of this application, step 201 can be implemented by step 201a or step 201b as described below.

[0061] Step 201a: During the process of receiving the first input, the electronic device acquires M drawing durations.

[0062] In the embodiments of this application, the first input is a sliding input.

[0063] In the embodiments of this application, the first input is used to trigger the electronic device to update the screen display.

[0064] In some embodiments of this application, the above-mentioned swipe input refers to input where the displayed content on the screen slides along with the user's swipe input when the user performs swipe input on the screen.

[0065] It is understandable that when a user swipes on the screen, their finger does not leave the screen during the swipe, and the displayed content on the screen can slide in the corresponding direction and speed of the user's finger swipe. This type of swipe input can be called swipe-based input.

[0066] In some embodiments of this application, the aforementioned first input includes, but is not limited to: swiping input performed by the user using a touch device such as a finger or stylus, or a swiping gesture input by the user, or air swipe input, or other feasible input methods. The specific method can be determined according to actual usage needs, and this application does not limit this.

[0067] It should be noted that the above-mentioned swipe input can be swipe input performed by a touch device such as a finger or stylus, or a swipe gesture input by the user, or an air swipe input, or other feasible input. This application embodiment does not limit swipe input to input performed by the user through a finger.

[0068] It is understandable that the electronic device can obtain the drawing time of the image frame actually drawn by the electronic device during the process of the user making the first input and the content displayed on the screen sliding with the user's swipe input, so as to obtain the above M drawing times.

[0069] For example, as shown in Figure 2(A), the electronic device displays the contact page 11 of a communication application. Since the contact page 11 cannot display the contact identifiers of all contacts, when a user wants to find the contact "Xiao Hong" on the contact page 11, the user can swipe up on the contact page 11. The electronic device then updates the display content of the contact page 11 as the user swipes, i.e., following the swipe input, as shown in Figure 2(B), where the contact "Xiao Hong" is displayed on the contact page 11. During the process of the contact page 11 swiping as the user swipes, the electronic device can obtain the rendering time of the M image frames actually drawn.

[0070] Step 201b: After receiving the second input, the electronic device acquires M drawing durations.

[0071] In the embodiments of this application, the second input is a hands-free sliding input.

[0072] In the embodiments of this application, the second input is used to trigger the electronic device to update the screen display.

[0073] In some embodiments of this application, the aforementioned hands-free swipe input means that after the user completes swipe input on the screen, the displayed content on the screen will continue to slide freely for a distance according to the direction and speed of the user's swipe until the swipe input stops.

[0074] It is understandable that when a user swipes on the screen to input, that is, after the user's finger leaves the screen, the content displayed on the screen can still slide freely or inertially for a period of time according to the direction and speed of the swipe input. This kind of swipe input can be called hands-free swipe input.

[0075] In some embodiments of this application, the aforementioned second input includes, but is not limited to: swiping input performed by the user using a touch device such as a finger or stylus, or a swiping gesture input by the user, or air swipe input, or other feasible input methods. The specific method can be determined according to actual usage needs, and this application does not limit this.

[0076] It should be noted that the above-mentioned hands-free swipe input can be swipe input performed by touch devices such as fingers or styluses, or swipe gestures input by the user, or air swipe input, or other feasible input methods. The embodiments of this application do not limit hands-free swipe input to input performed by the user with their fingers.

[0077] It is understood that the electronic device can obtain the drawing duration of the image frame actually drawn by the electronic device after the user's second input is completed and before the content displayed on the screen stops scrolling, so as to obtain the above M drawing durations.

[0078] In some embodiments of this application, the electronic device can acquire the above-mentioned M drawing durations from the end time of the second input until the content displayed on the screen stops scrolling, that is, until the screen display stops updating.

[0079] For example, as shown in Figure 2(A), when a user wants to find the contact "Xiao Hei" in the contacts page 11, if the user remembers that Xiao Hei's contact ID is sorted relatively late in the contacts list, the user can quickly swipe up a short distance on the contacts page 11, and then remove their finger from the screen of the electronic device. This allows the contacts page 11 to freely slide a distance according to the direction and speed of the user's swipe, until the swipe stops. This is the aforementioned hands-free swipe input. Figure 3As shown, the electronic device displays the content at the bottom of the address book, including the contact icon for the contact "Xiao Hei." This allows the electronic device to quickly update the displayed content, making it easier for users to find the contact icon for "Xiao Hei" as soon as possible. During free scrolling on the address book page 11, the electronic device can obtain the rendering time of the M actual image frames drawn.

[0080] It is understandable that, since the difference between the rendering time of the image frame by the electronic device during the first input process and the rendering time of the image frame by the electronic device after the second input is completed is large, the electronic device can process them separately. That is, during the first input process, M rendering times are obtained to predict the rendering time of the image frames that were not rendered during the first input process. After the second input is completed and while the displayed content on the screen is still freely sliding, M rendering times are obtained to predict the rendering time of the image frames that were not rendered before the displayed content on the screen stops sliding after the second input is completed.

[0081] Thus, since the electronic device can separately acquire the drawing time of the image frame drawn by the electronic device during the first input process and the drawing time of the image frame drawn by the electronic device after the second input is completed, it can separately predict the drawing time of the undrawn image frame during the first input process and the drawing time of the undrawn image frame before the content displayed on the screen stops sliding after the second input is completed. Therefore, the accuracy of the electronic device in predicting the drawing time of the undrawn image frame can be improved.

[0082] Step 202: The electronic device obtains N predicted values ​​based on M drawing durations.

[0083] In the embodiments of this application, each of the N predicted values ​​corresponds to a duration range, each duration range corresponds to a display frame rate, and each predicted value is used to characterize: the probability that the first drawing duration is within a duration range, the first drawing duration is the drawing duration of the undrawn image frame, and N≤M.

[0084] It can be understood that when a predicted value is used to characterize the probability that the first drawing duration falls within a certain duration range, that duration range is the duration range corresponding to that predicted value.

[0085] It is understandable that electronic devices can predict the rendering time of unrendered image frames based on the rendering time of the M already rendered image frames. The larger the prediction value, the higher the probability that the rendering time of the unrendered image frame is within the time range corresponding to the prediction value.

[0086] In some embodiments of this application, combined with Figure 1 ,like Figure 4As shown, step 202 above can be specifically implemented through step 202a below.

[0087] Step 202a: The electronic device calculates the predicted value corresponding to each of the N time ranges within the M drawing durations, and obtains N predicted values.

[0088] In the embodiments of this application, the above-mentioned N duration ranges are the duration ranges corresponding to the N display frame rates preset by the electronic device, and there is no overlap between the N duration ranges.

[0089] In some embodiments of this application, the absence of overlap among the N time ranges can be understood as: the drawing duration within each of the N time ranges is different.

[0090] In some embodiments of this application, the electronic device may pre-set N display frame rates, calculate the duration range corresponding to each display frame rate, and then save the calculation results.

[0091] In some embodiments of this application, the electronic device can construct a preset table based on the duration range corresponding to each display frame rate. The preset table stores the correspondence between display frame rates and duration ranges to facilitate subsequent table lookup to determine the display frame rate corresponding to the duration range.

[0092] In some embodiments of this application, the electronic device can calculate the frame rate period for each display frame rate, and then obtain the duration range corresponding to the display frame rate based on the frame rate period for each display frame rate and the frame rate period for display frame rates lower than that display frame rate.

[0093] For example, an electronic device can divide 1000ms by the display frame rate to obtain the frame rate period of the display frame rate.

[0094] Example 1: Taking N=4 as an example, when the electronic device is preset with N display frame rates of "40, 45, 60 and 90", the electronic device can calculate the frame rate period of display frame rate "40" as: 25ms (1000ms divided by 40 equals 25ms); the frame rate period of display frame rate "45" as: 22.2ms (1000ms divided by 45 equals 22.2ms); the frame rate period of display frame rate "60" as: 16.7ms (1000ms divided by 60 equals 16.7ms); the frame rate period of display frame rate "90" as: 11ms (1000ms divided by 90 equals 11ms); and the frame rate period of display frame rate "120" as: 8.3ms (1000ms divided by 120 equals 8.3ms).

[0095] Then, a preset table can be constructed based on the frame rate period calculated above, such as Table 1 below.

[0096] Table 1

[0097]

[0098] Specifically, referring to Table 1, the electronic device can use the duration range [25, 22.2) between the frame rate period of 25ms for display frame rate "40" and the frame rate period of 22.2ms for display frame rate "45" as the duration range corresponding to display frame rate "40", and establish a correspondence between display frame rate "40" and duration range [25, 22.2); it can use the duration range [22.2, 16.7) between the frame rate period of 22.2ms for display frame rate "45" and the frame rate period of 16.7ms for display frame rate "60" as the duration range corresponding to display frame rate "45", and establish a correspondence between display frame rate "45" and duration range [22.2, 16.7 ...5, 22.2), between the frame rate period of 25ms for display frame rate "40" and the frame rate period of 22.2ms for display frame rate "60" as the duration range corresponding to display frame rate "45", and establish a correspondence between display frame rate "45" and duration range [22.2, 16.7); it can use the duration range [25, 22.2), between the frame rate period of 25ms for display frame rate "40" and the frame rate period of 22.2ms for display frame rate "60" as the duration range corresponding to display frame rate "45", and establish a correspondence between display frame rate "45" and duration range [22.2, 16.7); it can use the duration range [25, 22.2), between the frame rate The duration range [16.7, 11.1) between the frame rate period of 16.7ms for display frame rate "60" and the frame rate period of 11ms for display frame rate "90" is used as the duration range corresponding to display frame rate "60", and a correspondence is established between display frame rate "60" and duration range [16.7, 11.1). Similarly, the duration range [11, 8.3) between the frame rate period of 11ms for display frame rate "90" and the frame rate period of 9.3ms for display frame rate "120" can be used as the duration range corresponding to display frame rate "90", and a correspondence is established between display frame rate "90" and duration range [11, 8.3). Based on the established correspondence between frame rate and duration range, the above preset table is constructed.

[0099] In some embodiments of this application, when the rendering duration of an image frame is within a certain duration range, the display frame rate corresponding to that duration range is the optimal frame rate level.

[0100] For example, when the rendering time of an image frame is in the range of 16.7ms to 11.1ms, a display frame rate of "60" is the optimal frame rate setting. When the application's performance is poor, and the rendering time of an image frame is in the range of 25ms to 22.2ms, switching to a display frame rate of "40" can ensure a stable display frame rate and a smoother experience.

[0101] In some embodiments of this application, after obtaining the above M drawing durations, the electronic device can determine the drawing duration falling into each of the N duration ranges, and calculate the predicted value corresponding to each duration range based on the drawing duration falling into each duration range, thereby obtaining N predicted values.

[0102] For example, the electronic device can determine the N duration ranges corresponding to the N display frame rates preset by the electronic device from a preset table, and then determine the drawing duration that falls within each duration range.

[0103] In some embodiments of this application, when none of the M drawing durations fall into at least one of the N duration ranges, at least one duration range is empty, and the prediction value corresponding to each duration range in the at least one duration range is 0%.

[0104] In some embodiments of this application, when at least one of the M drawing durations does not fall within any duration range, the electronic device does not perform any further processing on at least one drawing duration.

[0105] Example 2, with M=10 and N=4, during the screen display update process, the electronic device can obtain the drawing time of the 10 actual drawn image frames: "6.56ms", "6.38ms", "8.94ms", "10.25ms", "12.3ms", "8.08ms", "13.2ms", "14.4ms", "13.3ms", and "12.1ms". Then, referring to Table 1 above, when the four duration ranges corresponding to the four display frame rates preset by the electronic device are determined to be: duration range [25, 22.2), duration range [22.2, 16.7), duration range [16.7, 11.1), and duration range [11, 8.3), the electronic device can further determine that the drawing durations falling within the duration range [16.7, 11.1] among the 10 drawing durations are "12.3ms", "13.2ms", "14.4ms", "13.3ms", and "12.1ms". Therefore, the predicted value corresponding to the duration range [16.7, 11.1] can be calculated based on "12.3ms", "13.2ms", "14.4ms", "13.3ms", and "12.1ms".

[0106] Of the 10 drawing durations, the durations "8.94ms" and "10.25ms" fall within the duration range [11, 8.3). Therefore, the predicted value corresponding to the duration range [11, 8.3) can be calculated based on "8.94ms" and "10.25ms". Furthermore, none of the 10 drawing durations fall within the duration ranges [25, 22.2) and [22.2, 16.7). The durations "6.56ms", "6.38ms", and "8.08ms" do not fall within any duration range, so the electronic device does not perform further processing on them.

[0107] Thus, since the electronic device can determine the rendering duration falling within each time range, the predicted value calculated based on the rendering duration falling within each time range can more accurately represent the probability that the rendering duration of the unrendered image frame falls within the corresponding time range. Based on this probability, the most suitable display frame rate can be selected, so that when the display frame rate of the electronic device is adjusted to the predicted most suitable display frame rate, and the image frame is rendered based on the rendering duration corresponding to the display frame rate, visual stuttering of the screen display can be avoided.

[0108] In some embodiments of this application, step 202a can be specifically implemented by step 202a1 as described below.

[0109] Step 202a1: The electronic device calculates the predicted value corresponding to each time range based on the first value and the weight of each drawing duration falling within each time range.

[0110] In the embodiments of this application, the first value mentioned above is 1 / M.

[0111] In the embodiments of this application, the later the drawing of an image frame corresponding to a drawing duration is completed, the greater the weight of a drawing duration; conversely, the earlier the drawing of an image frame corresponding to a drawing duration is completed, the smaller the weight of a drawing duration.

[0112] It is understandable that the later an electronic device completes drawing an image frame, the closer that time is to the current time, and the higher the predictive value of the drawing time of that image frame for the drawing of other image frames, thus giving it a greater weight. Conversely, the earlier an electronic device completes drawing an image frame, the further away that time is from the current time, and the lower the predictive value of the drawing time of that image frame for the drawing of other image frames, thus giving it a smaller weight.

[0113] In some embodiments of this application, since the difference in rendering time between adjacent image frames is small, the closer the time when an image frame is completed is to the current time, the higher the predictive value of the rendering time of the image frame to be rendered.

[0114] Example 3, taking M=10 as an example, the electronic device can pre-set 10 weights as "0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.9". Then, combining with Example 1, during the screen display update process, after the electronic device obtains the drawing time of the 10 actually drawn image frames, if the drawing time of the image frames is arranged according to the rule that the later the image frames are drawn, the earlier the drawing time is arranged, the drawing time of the 10 image frames is arranged in the following order: "6.56ms-6.38ms-8.94ms-10.25ms-12.3ms-8.08ms-13.2ms-14.4ms-13.3ms-12.1ms". Then, the drawing time of the 10 image frames can be... The weights assigned to the following timeframes are: 0.1 for 6.56ms, 0.3 for 6.38ms, 0.5 for 8.94ms, 0.7 for 10.25ms, 0.9 for 12.3ms, 1.1 for 8.08ms, 1.3 for 13.2ms, 1.5 for 14.4ms, 1.7 for 13.3ms, and 1.9 for 12.1ms. In other words, the later the image frame is completed, the greater the weight of its corresponding rendering time.

[0115] In some embodiments of this application, the electronic device can store the acquired M drawing durations into a drawing queue, and the electronic device can determine the weight of the drawing duration based on the order of the drawing durations in the drawing queue.

[0116] In some embodiments of this application, the closer the drawing duration is to the end of the drawing queue, the lower its weight; the closer the drawing duration is to the beginning of the drawing queue, the higher its weight.

[0117] It is understandable that the closer the rendering duration is to the end of the rendering queue, the earlier the corresponding image frame was rendered; conversely, the closer the rendering duration is to the head of the rendering queue, the later the corresponding image frame was rendered.

[0118] In some embodiments of this application, the electronic device can divide M by 1 to obtain the first value mentioned above, 1 / M, which is a percentage of a drawing time in the total drawing time.

[0119] For example, when M drawing times are 10 drawing times, the electronic device can obtain the first value mentioned above as 1 / 10.

[0120] In some embodiments of this application, the electronic device can calculate the predicted value corresponding to each time range based on a first numerical value and the weight of each drawing duration falling within each time range, as shown in Formula 1:

[0121]

[0122] Where Z is the predicted value corresponding to the time range. H is the first value. i The weight for the i-th drawing duration falling within the duration range. It is the first value.

[0123] Example 4, combining with Example 2, among the 10 determined drawing durations, the drawing durations falling within the duration range [16.7, 11.1) are "12.3ms", "13.2ms", "14.4ms", "13.3ms", and "12.1ms", and the drawing durations falling within the duration range [11, 8.3) are "8.94ms" and "10.25ms". None of the 10 drawing durations fall within the duration range [25, 22.2ms]. Given the time range [22.2, 16.7) and, in conjunction with Example 3, the weights of the 10 drawing durations are obtained. The electronic device can then calculate the predicted values ​​corresponding to the time ranges [16.7, 11.1) and [11, 8.3). Specifically, the electronic device can obtain the weights of the 5 drawing durations falling within the time range [16.7, 11.1) as "0.9, 1.3, 1.5, 1.7, 1.9", and then set M as... Taking 1 / 10 = 0.1 and i = 5 as an example, the predicted value corresponding to the time range [16.7, 11.1) is: 0.1*0.9 + 0.1*1.3 + 0.1*1.5 + 0.1*1.7 + 0.1*1.9 = 0.73 = 73%; the weights "0.5, 0.7" of the two drawing times falling within the time range [11, 8.3) can be obtained. Then, taking M = 1 / 10 = 0.1 and i = 2 as an example, the time range is calculated. The predicted value corresponding to the range [11, 8.3) is: 0.1*0.5+0.1*0.7=0.12=12%. Since none of the 10 drawing durations fall within the duration ranges [25, 22.2) and [22.2, 16.7), the predicted value corresponding to the duration ranges [25, 22.2) and [22.2, 16.7) is 0%. Thus, the predicted values ​​corresponding to the four duration ranges are obtained, which are the above N predicted values.

[0124] Thus, since the electronic device can calculate the predicted value corresponding to each time range based on the weight of the drawing time falling within each time range, it can more accurately represent the probability that the drawing time of the undrawn image frame is within the corresponding time range. Based on this probability, the most suitable display frame rate can be selected, so that when the display frame rate of the electronic device is adjusted to the most suitable predicted display frame rate and the image frame is drawn based on the drawing time corresponding to the display frame rate, visual stuttering of the screen display can be avoided.

[0125] Step 203: Based on N predicted values, the electronic device adjusts its display frame rate to the first display frame rate.

[0126] In the embodiments of this application, the first display frame rate is the display frame rate corresponding to the duration range of the largest predicted value among N predicted values.

[0127] In some embodiments of this application, after obtaining N predicted values, the electronic device can compare the size of the N predicted values, and then use the display frame rate corresponding to the duration range of the largest predicted value among the N predicted values ​​as the first display frame rate.

[0128] In some embodiments of this application, after determining the maximum predicted value among N predicted values, the electronic device can look up the display frame rate corresponding to the duration range corresponding to the maximum predicted value from a preset table, using the duration range corresponding to the maximum predicted value as an index, and then adjust the display frame rate of the electronic device to the display frame rate corresponding to the duration range corresponding to the maximum predicted value.

[0129] Example 5: Taking an electronic device running a communication application with a display frame rate of 40 as an example, and combining with Example 4, after the electronic device calculates that the predicted value for the duration range [16.7, 11.1) is 73%, the predicted value for the duration range [11, 8.3) is 12%, and the predicted values ​​for the duration ranges [25, 22.2) and [22.2, 16.7) are 0%, the electronic device can determine that the maximum predicted value is 73%. Then, the electronic device can look up the display frame rate corresponding to the duration range [16.7, 11.1) corresponding to the maximum predicted value of 73% from Table 1, using the duration range [16.7, 11.1) as the index. Then, the display frame rate "60" corresponding to the duration range [16.7, 11.1) corresponding to the maximum predicted value of 73% is used as the first display frame rate, and the display frame rate of the electronic device is adjusted from "40" to the first display frame rate "60".

[0130] In some embodiments of this application, the first display frame rate can be the display frame rate corresponding to the duration range of the predicted value that is greater than or equal to a preset threshold among N predicted values.

[0131] In some embodiments of this application, after obtaining N predicted values, the electronic device can determine whether each predicted value is greater than or equal to a preset threshold, and then use the display frame rate corresponding to the duration range of the predicted value that is greater than or equal to the preset threshold as the first display frame rate.

[0132] In some embodiments of this application, when at least two of the N predicted values ​​are greater than or equal to a preset threshold, the electronic device may use the display frame rate corresponding to the duration range of the largest of the at least two predicted values ​​as the first display frame rate.

[0133] In some embodiments of this application, when there is no predicted value greater than or equal to a preset threshold among the N predicted values, the electronic device may not adjust the display frame rate. That is, when the probability of the drawing duration of the undrawn image frame being within each duration range is relatively low, the electronic device may not adjust the display frame rate to avoid increasing power consumption by switching the display frame rate back and forth.

[0134] Since the probability of the drawing time of the undrawn image frame being within the time range corresponding to the first display frame rate is the highest, the display frame rate can be used as the most suitable display frame rate, and the display frame rate of the electronic device can be switched to the first display frame rate. Thus, when drawing image frames based on the drawing time corresponding to the first display frame rate, visual stuttering of the screen display can be avoided.

[0135] In some embodiments of this application, combined with Figure 1 ,like Figure 5 As shown, step 201 above can be implemented through step 201a below.

[0136] Step 201a: The electronic device obtains the drawing duration from the i-th image frame to the (i+M-1)-th image frame already drawn by the electronic device, and obtains M drawing durations.

[0137] In the embodiments of this application, the above-mentioned undrawn image frame is the (i+M)th image frame.

[0138] It can be understood that after the electronic device obtains the rendering duration of the i-th to i+M-1-th image frames, and obtains M rendering durations, the electronic device can determine the rendering duration within each of the N duration ranges. Then, based on the rendering duration within each duration range, it calculates the prediction value corresponding to each duration range, obtaining N prediction values ​​to predict the rendering duration of the un-rendered i+M-th image frame. Then, based on the N prediction values, it determines the most suitable first display frame rate, and after adjusting the display frame rate of the electronic device to the first display frame rate, it can render the i+M-th image frame based on the rendering duration corresponding to the first display frame rate.

[0139] It is understandable that the aforementioned M drawing durations are not fixed but updated in real time. After the electronic device actually draws i+M image frames based on the drawing duration corresponding to the adjusted first display frame rate, the electronic device can obtain the drawing duration of drawing i+M image frames. Then, based on the drawing durations of the (i+1)th to (i+M)th image frames that have already been drawn, after obtaining the M drawing durations, the electronic device can determine the drawing duration within each of the N duration ranges. Then, based on the drawing durations falling within each duration range, it calculates the prediction value corresponding to each duration range, obtaining N prediction values ​​to predict the drawing duration of the undrawn (i+M+1)th image frame. Then, based on the N prediction values, it determines the most suitable display frame rate and adjusts the display frame rate of the electronic device to this display frame rate. After that, it can draw the (i+M+1)th image frame based on the drawing duration corresponding to this display frame rate.

[0140] In some embodiments of this application, the electronic device may store the drawing duration of each image frame into a drawing queue when it acquires the drawing duration of the image frame. The drawing queue may store M drawing durations.

[0141] In some embodiments of this application, when the drawing duration of the i-th image frame is obtained, the electronic device can store the drawing duration of the i-th image frame in the drawing queue and remove the drawing duration of the iM-th image frame from the drawing queue.

[0142] It is understandable that the above M drawing durations are real-time updated data. When a new drawing duration enters the drawing queue from the head of the queue, the last drawing duration at the tail of the drawing queue is removed from the drawing queue.

[0143] In some embodiments of this application, when the storage capacity of the above-mentioned drawing queue is M drawing data, the drawing data of the iMth frame image can be understood as the last data at the tail of the drawing queue.

[0144] Example 6: When an electronic device is drawing an image frame, it can sequentially store the drawing duration of the image frame into drawing queue 21, as shown in Figure 6(A). Drawing queue 21 stores 10 drawing durations. Then, as shown in Figure 6(B), when the electronic device finishes drawing a new image frame, it can store the drawing duration of the new image frame "15.3ms" from the head of the queue into drawing queue 21, and remove the last drawing duration "6.56ms" from the tail of the queue.

[0145] In some embodiments of this application, each time a new drawing duration is stored in the drawing queue, that is, each time the drawing duration in the drawing queue is updated, the electronic device can predict the drawing duration of an undrawn image frame based on the M drawing durations in the drawing queue, so as to adjust the display frame rate of the electronic device based on the prediction result.

[0146] In this way, since the electronic device can obtain the drawing time of the drawn image frame in real time, and then predict the drawing time of the undrawn image frame based on the drawing time, and then select a display frame rate that is most suitable for the drawing time of the undrawn image frame based on the prediction result, it can avoid the situation where the electronic device fails to complete the drawing of the image frame within the drawing time corresponding to the display frame rate, and the electronic device can only reuse the content of the previous image frame, thereby avoiding visual stuttering of the screen display.

[0147] In some embodiments of this application, combined with Figure 1 ,like Figure 7 As shown, after step 203 above, the frame rate adjustment method provided in this application embodiment further includes step 301 as follows.

[0148] Step 301: After the screen display stops updating, the electronic device adjusts its display frame rate to the second display frame rate.

[0149] In the embodiments of this application, the second display frame rate is the display frame rate of the electronic device when the screen display begins to update.

[0150] In some embodiments of this application, when the screen display begins to update, the electronic device has not yet adjusted the display frame rate. Therefore, the aforementioned second display frame rate can also be understood as the display frame rate of the electronic device before the display frame rate is adjusted.

[0151] It is understandable that after the screen stops scrolling, the electronic device can adjust its display frame rate back to the initial display frame rate.

[0152] In some embodiments of this application, after the screen display stops updating, the electronic device still uses the initial fixed display frame rate, and there is no need to dynamically adjust the display frame rate of the electronic device.

[0153] It is understandable that after the screen stops updating, the screen can directly reuse the display content of the previous image frame without drawing a new image frame. Therefore, continuously predicting the drawing time of undrawn image frames will actually increase the power consumption of electronic devices.

[0154] Thus, when the screen stops updating, the electronic device can adjust its display frame rate back to the initial frame rate. This saves power and extends the device's lifespan, especially when the initial frame rate is low. Furthermore, since the electronic device no longer needs to predict the rendering time of unrendered frames after the screen stops updating, it doesn't need to dynamically adjust its frame rate, further saving power.

[0155] In the frame rate adjustment method provided in this application embodiment, the drawing time of undrawn image frames is predicted by the drawing time of already drawn image frames, thereby adjusting the display frame rate of the electronic device to the most suitable frame rate. This ensures that when drawing subsequent image frames, the drawing of the image frames can be completed within the drawing time corresponding to the display frame rate, avoiding the electronic device from reusing the content of the previous image frame, thereby reducing the visual stuttering phenomenon in the screen display.

[0156] In this embodiment of the application, when the first display frame rate is greater than the second display frame rate, the display frame rate of the electronic device is increased based on M drawing durations, which can make the screen display smoother when the screen display is updated, and the screen responsiveness under user operation is better.

[0157] In this embodiment of the application, when the first display frame rate is less than the second display frame rate, the display frame rate of the electronic device is reduced based on M drawing durations, which can reduce the power consumption of the electronic device during the screen display update process.

[0158] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there are no contradictions, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.

[0159] It should be noted that the display frame rate adjustment method provided in this application embodiment can be executed by a display frame rate adjustment device. This application embodiment uses the execution of the display frame rate adjustment method by a display frame rate adjustment device as an example to illustrate the display frame rate adjustment device provided in this application embodiment.

[0160] Figure 8 A schematic diagram of a possible structure of the display frame rate adjustment device involved in an embodiment of this application is shown. For example... Figure 8 As shown, the display frame rate adjustment device 70 may include: an acquisition module 71, a processing module 72, and an adjustment module 73.

[0161] The acquisition module 71 is used to acquire M drawing durations, each drawing duration being the drawing duration of one image frame already drawn by the electronic device.

[0162] The processing module 72 is used to obtain N predicted values ​​based on the M drawing durations obtained by the acquisition module 71. Each predicted value corresponds to a duration range, and each duration range corresponds to a display frame rate. Each predicted value is used to characterize: the probability that the first drawing duration is within a duration range. The first drawing duration is the drawing duration of the undrawn image frame, and N≤M.

[0163] The adjustment module 73 is used to adjust the display frame rate of the electronic device to a first display frame rate based on the N predicted values ​​processed by the processing module 72. The first display frame rate is the display frame rate corresponding to the duration range of the largest predicted value among the N predicted values.

[0164] This application provides a display frame rate adjustment device that predicts the rendering time of unrendered image frames based on the rendering time of already rendered image frames. This allows the display frame rate of the device to be adjusted to the most suitable frame rate, ensuring that subsequent image frames can be rendered within the rendering time corresponding to the display frame rate. This avoids the display frame rate adjustment device reusing the content of the previous image frame, thereby reducing visual stuttering on the screen.

[0165] In one possible implementation, the processing module 72 is specifically used to calculate the predicted value corresponding to each of the N duration ranges based on the M durations that fall within the N duration ranges, and obtain N predicted values; wherein, the N duration ranges are the duration ranges corresponding to the N display frame rates preset by the electronic device, and there is no overlap between the N duration ranges.

[0166] In one possible implementation, the processing module 72 is specifically used to calculate the predicted value corresponding to each time range based on the first value and the weight of each drawing duration falling within each time range; wherein, the later the drawing of the image frame corresponding to a drawing duration is completed, the greater the weight of a drawing duration, and the first value is 1 / M.

[0167] In one possible implementation, module 71 is specifically used for:

[0168] During the process of receiving the first input, M drawing durations are obtained, where the first input is the swipe input.

[0169] or,

[0170] After receiving the second input, obtain M drawing durations, where the second input is the off-hand swipe input;

[0171] The first or second input is used to trigger the electronic device to update the screen display.

[0172] In one possible implementation, the adjustment module 73 is further configured to, after adjusting the display frame rate of the electronic device to a first display frame rate based on N predicted values, adjust the display frame rate of the electronic device to a second display frame rate after the screen display stops updating, wherein the second display frame rate is the display frame rate of the electronic device when the screen display starts updating.

[0173] The display frame rate adjustment device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0174] The display frame rate adjustment device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0175] The display frame rate adjustment device provided in this application embodiment can realize the various processes implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0176] Optionally, such as Figure 9 As shown, this application embodiment also provides an electronic device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. When the program or instructions are executed by the processor 901, they implement the various steps of the above method embodiments and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0177] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0178] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0179] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.

[0180] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0181] The processor 110 is configured to acquire M drawing durations, each drawing duration being the drawing duration of one image frame already drawn by the electronic device; and based on the M drawing durations, obtain N prediction values, each prediction value corresponding to a duration range, each duration range corresponding to a display frame rate, each prediction value representing: the probability that the first drawing duration falls within a duration range, the first drawing duration being the drawing duration of an undrawn image frame, N≤M; and based on the N prediction values, adjust the display frame rate of the electronic device to a first display frame rate, the first display frame rate being the display frame rate corresponding to the duration range of the largest prediction value among the N prediction values.

[0182] This application provides an electronic device that predicts the rendering time of unrendered image frames based on the rendering time of already rendered image frames. This allows the electronic device to adjust its display frame rate to the most suitable frame rate, ensuring that subsequent image frames can be rendered within the rendering time corresponding to the display frame rate. This avoids the electronic device reusing the content of the previous image frame, thereby reducing visual stuttering on the screen.

[0183] In some embodiments of this application, the processor 110 is specifically used to calculate the predicted value corresponding to each of the N duration ranges based on the M durations that fall within the N duration ranges, thereby obtaining N predicted values; wherein, the N duration ranges are the duration ranges corresponding to the N display frame rates preset by the electronic device, and there is no overlap between the N duration ranges.

[0184] In some embodiments of this application, the processor 110 is specifically used to calculate the predicted value corresponding to each time range based on a first value and the weight of each drawing duration falling within each time range; wherein, the later the drawing of the image frame corresponding to a drawing duration is completed, the greater the weight of a drawing duration, and the first value is 1 / M.

[0185] In some embodiments of this application, the processor 110 is specifically used for:

[0186] During the process of receiving the first input, M drawing durations are obtained, where the first input is the swipe input.

[0187] or,

[0188] After receiving the second input, obtain M drawing durations, where the second input is the off-hand swipe input;

[0189] The first or second input is used to trigger the electronic device to update the screen display.

[0190] In some embodiments of this application, the processor 110 is further configured to adjust the display frame rate of the electronic device to a second display frame rate after adjusting the display frame rate of the electronic device to a first display frame rate based on N predicted values ​​and after the screen display stops updating, wherein the second display frame rate is the display frame rate of the electronic device when the screen display starts updating.

[0191] The electronic device provided in this application embodiment can implement the various processes implemented in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0192] For details on the beneficial effects of the various implementation methods in this embodiment, please refer to the beneficial effects of the corresponding implementation methods in the above method embodiments. To avoid repetition, these will not be repeated here.

[0193] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0194] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0195] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.

[0196] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0197] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0198] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0199] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0200] This application provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0201] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0203] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for adjusting display frame rate, characterized in that, The method includes: Get M drawing durations, where each drawing duration is the drawing duration of one image frame already drawn by the electronic device; Based on the M drawing durations, N prediction values ​​are obtained. Each prediction value corresponds to a duration range, and each duration range corresponds to a display frame rate. Each prediction value is used to characterize: the probability that the first drawing duration falls within a duration range, where the first drawing duration is the drawing duration of the undrawn image frame, and N≤M; Based on the N predicted values, the display frame rate of the electronic device is adjusted to a first display frame rate, where the first display frame rate is the display frame rate corresponding to the duration range of the largest predicted value among the N predicted values. The N predicted values ​​obtained based on the M drawing durations include: Based on the M drawing durations, the drawing durations that fall within N duration ranges are calculated, and the predicted value corresponding to each duration range is obtained to obtain the N predicted values; wherein, the N duration ranges are the duration ranges corresponding to the N display frame rates preset by the electronic device, and there is no overlap between the N duration ranges; The step of calculating the predicted value for each of the M drawing durations that fall within N duration ranges includes: For each of the N time ranges, the first value and the weight of each drawing duration falling within a time range are weighted and summed to obtain the predicted value corresponding to the time range, thereby obtaining the predicted value corresponding to each time range; wherein, the later the time when the image frame corresponding to a drawing duration is completed, the greater the weight of the drawing duration, and the first value is 1 / M.

2. The method according to claim 1, characterized in that, The acquisition of M rendering durations includes: During the process of receiving the first input, the M drawing durations are obtained, where the first input is a swipe input. or, After receiving the second input, the M drawing durations are obtained, where the second input is a hands-free swipe input; The first input or the second input is used to trigger the electronic device to update the screen display.

3. The method according to claim 2, characterized in that, After adjusting the display frame rate of the electronic device to the first display frame rate based on the N predicted values, the method further includes: After the screen display stops updating, the display frame rate of the electronic device is adjusted to a second display frame rate, which is the display frame rate of the electronic device when the screen display starts updating.

4. A display frame rate adjustment device, characterized in that, The device includes: an acquisition module, a processing module, and an adjustment module; The acquisition module is used to acquire M drawing durations, each drawing duration being the drawing duration of one image frame already drawn by the electronic device; The processing module is used to obtain N prediction values ​​based on the M drawing durations obtained by the acquisition module. Each prediction value corresponds to a duration range, and each duration range corresponds to a display frame rate. Each prediction value is used to characterize the probability that the first drawing duration is within a duration range. The first drawing duration is the drawing duration of the undrawn image frame, and N≤M. The adjustment module is used to adjust the display frame rate of the electronic device to a first display frame rate based on the N predicted values ​​obtained by the processing module. The first display frame rate is the display frame rate corresponding to the duration range of the largest predicted value among the N predicted values. Specifically, the processing module is used to calculate the predicted value corresponding to each of the N duration ranges based on the M durations that fall within the N duration ranges, thereby obtaining the N predicted values; wherein the N duration ranges are the duration ranges corresponding to the N display frame rates preset by the electronic device, and there is no overlap between the N duration ranges; Specifically, the processing module is used to perform a weighted summation of a first value and the weight of each drawing duration falling within a time range for each of the N time ranges, to obtain the predicted value corresponding to the time range, thereby obtaining the predicted value corresponding to each time range; wherein, the later the drawing of the image frame corresponding to a drawing duration is completed, the greater the weight of the drawing duration, and the first value is 1 / M.

5. The apparatus according to claim 4, characterized in that, The acquisition module is specifically used for: During the process of receiving the first input, the M drawing durations are obtained, where the first input is a swipe input. or, After receiving the second input, the M drawing durations are obtained, where the second input is a hands-free swipe input; The first input or the second input is used to trigger the electronic device to update the screen display.

6. The apparatus according to claim 5, characterized in that, The adjustment module is further configured to, after adjusting the display frame rate of the electronic device to a first display frame rate based on the N predicted values, adjust the display frame rate of the electronic device to a second display frame rate after the screen display stops updating, wherein the second display frame rate is the display frame rate of the electronic device when the screen display starts updating.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the display frame rate adjustment method as described in any one of claims 1-3.

8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the display frame rate adjustment method as described in any one of claims 1-3.

9. A computer program product, characterized in that, The computer program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the display frame rate adjustment method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method and device for image display

    JP1999231854A

  • Image display controller and image display control method

    JP2012002952A