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

By predicting and adjusting the display frame rate, the visual lag caused by insufficient drawing time of electronic devices is solved, the drawing efficiency and fluency of image frames are improved, and more stable screen updates are achieved.

CN118968900AActive Publication Date: 2024-11-15VIVO MOBILE COMM CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the case of abnormal network or complex screen display content, electronic devices may not be able to complete the drawing time of image frames within the drawing time corresponding to the display frame rate, resulting in visual stuttering on the screen display screen.

Method used

By obtaining the drawing time of the drawn image frame, predicting the drawing time of the undrawn image frame, and adjusting the display frame rate to the most appropriate frame rate, to ensure that the drawing of the image frame is completed within the specified time and avoiding the multiplexing of the previous image frame. content.

Benefits of technology

It effectively reduces the phenomenon of visual lag on the screen display screen, improves the drawing efficiency and fluency of image frames, and avoids unnecessary increase in power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968900A_ABST
    Figure CN118968900A_ABST
Patent Text Reader

Abstract

The invention discloses a display frame rate adjusting method and device, electronic equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring M drawing durations, wherein each drawing duration is the drawing duration of an image frame drawn by the electronic equipment; n predicted values are obtained based on the M drawing durations, each predicted value corresponds to a duration range, each duration range corresponds to a display frame rate, each predicted value is used for representing the probability of the first drawing duration in one duration range, the first drawing duration is the drawing duration of the undrawn image frame, and N is smaller than or equal to M; based on the N predicted values, the display frame rate of the electronic equipment is adjusted to be a first display frame rate, and the first display frame rate is the display frame rate corresponding to the duration range corresponding to the maximum predicted value in the N predicted values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 Art

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

[0003] Usually, when the screen of an electronic device displays an image, if the screen display keeps changing, the electronic device cannot reuse the previous image frames and needs to continuously draw new image frames to continuously update the screen display. Among them, the electronic device needs to complete the drawing of the image frame within the drawing time corresponding to the display frame rate. For example, when the display frame rate is 60, the electronic device needs to complete the drawing of an image frame within 16.67ms.

[0004] However, when a network anomaly occurs or the content displayed on the screen is complex, the electronic device may not be able to complete the drawing of the image frame within the drawing time corresponding to the display frame rate. In this case, the electronic device can only reuse the content of the previous image frame, which may cause visual freezes in the screen display. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a display frame rate adjustment method, device, electronic device and storage medium, which can reduce the visual freeze phenomenon of the display screen.

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

[0007] In a second aspect, an embodiment of the present application provides 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 an image frame that has been drawn by the electronic device. The processing module is used to obtain N prediction values ​​based on the M drawing durations acquired by the acquisition module, each prediction value corresponding to a duration range, each duration range corresponding to a display frame rate, and 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 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 prediction values ​​obtained by the processing module, and the first display frame rate is the display frame rate corresponding to the duration range corresponding to the maximum prediction value among the N prediction values.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In a sixth aspect, an embodiment of the present application provides a computer program / program product, wherein the computer program / program product is stored in a storage medium, and the program / program product is executed by at least one processor to implement the method described in the first aspect.

[0012] In an embodiment of the present application, an electronic device obtains M drawing durations, each drawing duration is the drawing duration of an image frame that has been drawn by the electronic device; based on the M drawing durations, N prediction values ​​are obtained, each prediction value corresponds to a duration range, each duration range corresponds to a display frame rate, and 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 an image frame that has not been drawn, N≤M; based on the N prediction values, the display frame rate of the electronic device is adjusted to the first display frame rate, and the first display frame rate is the display frame rate corresponding to the duration range corresponding to the maximum prediction value among the N prediction values. In this solution, the drawing duration of an image frame that has not been drawn is predicted by the drawing duration of an image frame that has been drawn, and then the display frame rate of the electronic device can be adjusted to the most appropriate frame rate to ensure that when the image frame is subsequently drawn, the drawing of the image frame can be completed within the drawing duration corresponding to the display frame rate, so as to avoid the electronic device reusing the content of the previous image frame, thereby reducing the visual freeze phenomenon of the screen display. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is one of the flow charts of a display frame rate adjustment method provided in an embodiment of the present application;

[0014] FIG. 2(A) is one of the schematic diagrams of an example of updating a screen display provided in an embodiment of the present application;

[0015] FIG. 2(B) is a second schematic diagram of an example of updating a screen display provided in an embodiment of the present application;

[0016] Figure 3 This is a third example schematic diagram of updating a screen display provided by an embodiment of the present application;

[0017] Figure 4 This is a second flow chart of a display frame rate adjustment method provided in an embodiment of the present application;

[0018] Figure 5 This is a third flow chart of a display frame rate adjustment method provided in an embodiment of the present application;

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

[0020] FIG. 6(B) is a second schematic diagram of an example of a drawing queue provided in an embodiment of the present application;

[0021] Figure 7 This is a fourth flow chart of a display frame rate adjustment method provided in an embodiment of the present application;

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

[0023] Fig. 9 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0024] Fig.10 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0027] The terms "at least one (item)", "at least one of" and the like in the specification and claims of the present application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "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 (items)" refers to two or more, and its meaning is similar to that of "at least one (item)".

[0028] The following is an explanation of some concepts and / or terms involved in the data transmission method, apparatus, device, communication system and storage medium provided in the embodiments of the present application.

[0029] 1. Display frame rate, usually measured in FPS, refers to the number of static image frames displayed per second in a video or animation. A higher display frame rate usually 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 the electronic device is 60, the electronic device displays 60 image frames per second, that is, the electronic device needs to complete the drawing of one image frame within 16.67 ms.

[0031] Furthermore, since the electronic device needs to continuously draw new image frames to continuously update the screen display when the screen display picture is constantly changing; and when the screen display picture does not change, the electronic device can reuse previous image frames without drawing new image frames. Therefore, the number of static image frames displayed by the electronic device per second may be the same as or different from the number of image frames drawn by the electronic device per second.

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

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

[0034] 3. Display frame rate and screen refresh rate. The refresh rate of the monitor is not equal to the number of frames corresponding to the display frame rate. The number of frames output by the graphics card can be infinitely high, while the refresh rate is restricted by the monitor hardware. Therefore, when the frame rate is lower than the refresh rate, the same image frame may be refreshed several times, which will cause image freezes. When the frame rate is higher than the refresh rate, too many invalid frames will also cause image loss. It is this inequality that causes image tearing and freezes.

[0035] 4. Vsync (vertical synchronization) is a display technology that coordinates the refresh rate of the monitor and the number of frames output by the graphics card. It is used to synchronize the refresh rate and display frame rate to prevent screen tearing and provide smoother graphics display. When Vsync is enabled, the graphics card will wait for the vertical synchronization signal before drawing the image frame. When the signal arrives, the graphics card starts drawing the image frame. If the graphics card has strong performance and has completed the drawing of the image frame before the next vertical synchronization signal arrives, the graphics card will suspend processing and wait for the next vertical synchronization signal to arrive before starting to draw the next image frame. In layman's terms, vertical synchronization is to make the number of frames output by the graphics card per second equal to the refresh rate of the monitor, ensuring that each image frame is displayed when the monitor is ready, that is, each time an 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. On the contrary, turning off vertical synchronization will cause tearing and frame skipping. However, if the speed of application drawing cannot keep up with the speed of screen refresh, there will be a freeze.

[0036] 5. Low Temperature Polycrystalline Oxide (LTPO) screen technology is a new display technology, mainly used for Organic Light Emitting Display (OLED) screens. Since it can flexibly adjust the screen refresh rate according to the needs of the screen display, thereby saving power, it can achieve lower power consumption and higher energy efficiency. In turn, it can provide better battery life and smoother display effects.

[0037] 6. HWUI, HWUI is a component in the system, the full name is Hardware Accelerated 2D Rendering. 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 typesetting and animation effects.

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

[0039] The frame rate adjustment method provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0040] Currently, Vsync technology is usually used to keep the display frame rate and screen refresh rate consistent. For example, if the screen refresh rate is 60Hz, that is, the electronic device refreshes the screen 60 times per second, and refreshes the screen every 16.67ms, then the electronic device will draw image frames at a rate of 60 frames per second, that is, one frame every 16.67ms, that is, each time an image frame is drawn, the electronic device refreshes and displays the image frame, thereby achieving synchronization between the display frame rate and the screen refresh rate.

[0041] However, when a network anomaly occurs or the content displayed on the screen is complex, the electronic device may not be able to complete the drawing of the image frame within the drawing time corresponding to the display frame rate. In this case, the electronic device can only reuse the content of the previous image frame, which may cause visual freezes in the screen display.

[0042] The display frame rate adjustment method in the embodiment of the present application can be applied to the scene of updating the screen display picture and drawing the image frame.

[0043] In the display frame rate adjustment method, device, electronic device and storage medium provided in the embodiments of the present application, the drawing time of the undrawn image frame is predicted by the drawing time of the drawn image frame, so that the display frame rate of the electronic device can be adjusted to the most appropriate frame rate to ensure that when the image frame is subsequently drawn, the drawing of the image frame 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 freeze phenomenon of the screen display.

[0044] The display frame rate adjustment method provided in the embodiment of the present application may be executed by a display frame rate adjustment device, which may be an electronic device, or a functional module or entity in an electronic device. The technical solution provided in the embodiment of the present application is described below using an electronic device as an example.

[0045] The present application embodiment provides a display frame rate adjustment method. Figure 1 A flow chart of a display frame rate adjustment method provided by an embodiment of the present application is shown, and the method can be applied to electronic devices. Figure 1 As shown, the display frame rate adjustment method provided in the embodiment of the present application may include the following steps 201 to 203.

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

[0047] In an embodiment of the present application, each of the M drawing durations is a drawing duration of an image frame drawn by the electronic device.

[0048] In some embodiments of the present application, the above-mentioned drawing duration can be understood as the duration taken by the electronic device to draw one image frame.

[0049] In some embodiments of the present application, when the electronic device detects a change in the screen display, during the process of the screen display changing, it can obtain the drawing time of each image frame among the M image frames drawn by the electronic device, that is, the above-mentioned M drawing times.

[0050] In some embodiments of the present application, the electronic device may obtain the drawing time of an image frame each time an image frame is drawn while the screen display image changes.

[0051] In some embodiments of the present application, when receiving user input on a first object displayed on the screen, the electronic device may update the screen display based on the input, thereby causing the screen display to change.

[0052] In some embodiments of the present application, the first object may include but is not limited to: a page, a control, a window, a list, an application icon, a folder, etc. The embodiments of the present application do not limit this.

[0053] In some embodiments of the present application, the input to the first object includes but is not limited to: the user's touch input to the first object through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or a sliding input, or a click input, or other feasible input. The specific input can be determined according to actual use requirements, and the embodiments of the present application do not limit this.

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

[0055] In some embodiments of the present application, the click input may be a single click input, a double click input, or any number of click inputs, and may also be a long press input or a short press input.

[0056] For example, the electronic device may receive a user's sliding input on a page displayed on the screen, and during the page sliding process, obtain the drawing time of each of the M image frames drawn by the electronic device to obtain the above-mentioned M drawing times.

[0057] In some embodiments of the present application, the M image frames may be continuous image frames or discontinuous image frames, which is not limited in the embodiments of the present application.

[0058] Exemplarily, the electronic device may obtain the drawing duration of one image frame at intervals of one image frame, so as to obtain the drawing durations of M discontinuous image frames.

[0059] For example, the electronic device may not obtain the drawing time of the image frame after drawing the i-th image frame, obtain the drawing time of the image frame after drawing the i+1-th image frame, do not obtain the drawing time of the image frame after drawing the i+2-th image frame, and obtain the drawing time of the image frame after drawing the i+3-th image frame, that is, obtain the drawing time of one image frame every other image frame.

[0060] In some embodiments of the present application, the above step 201 can be specifically implemented by the following step 201a or step 201b.

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

[0062] In an embodiment of the present application, the first input is a hand-sliding input.

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

[0064] In some embodiments of the present application, the above-mentioned hand-following sliding input refers to: when the user performs a sliding input on the screen, the displayed content on the screen slides along with the user's sliding input.

[0065] It can be understood that when the user performs sliding input on the screen, the user's finger does not leave the screen during the sliding process, and the displayed content on the screen can slide accordingly with the sliding direction and sliding speed of the user's finger. This sliding input can be called hand-following sliding input.

[0066] In some embodiments of the present application, the first input includes but is not limited to: a sliding input performed by a user through a touch device such as a finger or a stylus, or a sliding gesture input by the user, or an air sliding input, or other feasible input. The specific input can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

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

[0068] It can be understood that the electronic device can obtain the drawing duration of the image frame actually drawn by the electronic device when the user makes the first input and the displayed content on the screen slides with the user's sliding input, so as to obtain the above-mentioned M drawing durations.

[0069] For example, as shown in FIG2(A), the electronic device displays the address book page 11 of the communication application. Since the contact identifiers of all contacts cannot be displayed in the address book page 11, when the user wants to find the contact "Xiaohong" in the address book page 11, the user can slide the address book page 11 upward, so that the electronic device updates the display content of the address book page 11 as the user slides, that is, the above-mentioned hand sliding input. As shown in FIG2(B), the contact "Xiaohong" is displayed in the address book page 11. In the process of the address book page 11 sliding with the user's sliding input, the electronic device can obtain the drawing time of the M image frames actually drawn.

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

[0071] In an embodiment of the present application, the second input is a hands-off sliding input.

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

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

[0074] It can be understood that after the user performs sliding input on the screen, that is, after the user's finger leaves the screen, the display content on the screen can also perform free sliding or inertial sliding for a period of time according to the sliding direction and sliding speed of the user's sliding input. This sliding input can be called hands-off sliding input.

[0075] In some embodiments of the present application, the second input includes but is not limited to: a sliding input performed by a user through a touch device such as a finger or a stylus, or a sliding gesture input by the user, or an air sliding input, or other feasible input. The specific input can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0076] It should be noted that the above-mentioned hands-free sliding input can be a sliding input performed by a touch device such as a finger or a stylus, or a sliding gesture input by the user, or an air sliding input, or other feasible input. The embodiments of the present application do not limit the hands-free sliding input to input performed by the user through the finger.

[0077] It can be 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 displayed content on the screen stops sliding, so as to obtain the above M drawing durations.

[0078] In some embodiments of the present application, the electronic device may obtain the above-mentioned M drawing durations starting from the end time of the second input until the displayed content on the screen stops sliding, that is, until the screen display stops updating.

[0079] For example, as shown in FIG2(A), when the user wants to find the contact "Xiao Hei" in the address book page 11, if the user remembers that Xiao Hei's contact ID is ranked relatively low in the address book, the user can quickly slide upwards for a distance on the address book page 11, and then take the finger off the screen of the electronic device, so that the address book page 11 slides freely for a distance in the direction and speed of the user's sliding until the sliding stops, i.e., the above-mentioned hands-free sliding input, such as Figure 3As shown, the electronic device displays the content at the bottom of the address book, including the contact ID of the contact "Xiao Hei", so that the electronic device can quickly update the displayed content, so that the user can find the contact ID of the contact "Xiao Hei" as soon as possible. During the free sliding of the address book page 11, the electronic device can obtain the drawing time of the M image frames actually drawn.

[0080] It can be understood that since the difference between the drawing time of the electronic device drawing the image frame during the input process of the first input and the drawing time of the electronic device drawing the image frame after the second input is completed is relatively large, the electronic device can process them separately, that is, during the input process of the first input, M drawing time lengths are obtained to predict the drawing time length of the image frame that has not been drawn during the input process of the first input. After the second input is completed and the displayed content on the screen is still in the process of free sliding, M drawing time lengths are obtained to predict the drawing time length of the image frame that has not been drawn after the second input is completed and before the displayed content on the screen stops sliding.

[0081] In this way, since the electronic device can separately obtain the drawing time of the electronic device drawing the image frame during the input process of the first input and the drawing time of the electronic device drawing the image frame after the second input is completed, and can separately predict the drawing time of the undrawn image frame during the input process of the first input and the drawing time of the undrawn image frame after the second input is completed and before the displayed content on the screen stops sliding, the accuracy of the electronic device's prediction of the drawing time of the undrawn image frame can be improved.

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

[0083] In an embodiment of the present 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: a probability that a first drawing duration is within a duration range, the first drawing duration is a drawing duration of an undrawn image frame, and N≤M.

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

[0085] It can be understood that the electronic device can predict the drawing time of the image frames that have not been drawn by the electronic device based on the drawing time of the M image frames that have been drawn. The larger the prediction value, the higher the probability that the drawing time of the undrawn image frame is within the time range corresponding to the prediction value.

[0086] In some embodiments of the present application, Figure 1 ,like Figure 4As shown, the above step 202 can be specifically implemented through the following step 202a.

[0087] Step 202a: The electronic device calculates a prediction value corresponding to each duration range based on the drawing durations that fall within the N duration ranges among the M drawing durations, to obtain N prediction values.

[0088] In the embodiment of the present application, the above-mentioned N time ranges are time ranges corresponding to N display frame rates preset by the electronic device, and there is no intersection between the N time ranges.

[0089] In some embodiments of the present application, the non-intersection among the N duration ranges may be understood as: the drawing duration in each duration range falling into the N duration ranges is different.

[0090] In some embodiments of the present 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 the present application, the electronic device can construct a preset table based on the time range corresponding to each display frame rate, and the preset table stores the correspondence between the display frame rate and the time range to facilitate subsequent table lookup to determine the display frame rate corresponding to the time range.

[0092] In some embodiments of the present application, the electronic device can calculate the frame rate period of each display frame rate, and then obtain the time length range corresponding to the display frame rate based on the frame rate period of each display frame rate and the frame rate period of a display frame rate lower than the display frame rate.

[0093] Exemplarily, the electronic device may divide 1000 ms by the display frame rate to obtain a frame rate period of the display frame rate.

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

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

[0096] Table 1

[0097]

[0098] Specifically, referring to Table 1, it can be known that the electronic device can use the time range [25, 22.2) between the frame rate period 25ms of the display frame rate "40" and the frame rate period 22.2ms of the display frame rate "45" as the time range corresponding to the display frame rate "40", and establish a corresponding relationship between the display frame rate "40" and the time range [25, 22.2); the time range [22.2, 16.7) between the frame rate period 22.2ms of the display frame rate "45" and the frame rate period 16.7ms of the display frame rate "60" can be used as the time range corresponding to the display frame rate "45", and establish a corresponding relationship between the display frame rate "45" and the time range [22.2, 16.7); the display frame rate can be used. The duration range [16.7, 11.1) between the frame rate period 16.7ms of the display frame rate "60" and the frame rate period 11ms of the display frame rate "90" is taken as the duration range corresponding to the display frame rate "60", and a corresponding relationship between the display frame rate "60" and the duration range [16.7, 11.1) is established; the duration range [11, 8.3) between the frame rate period 11ms of the display frame rate "90" and the frame rate period 9.3ms of the display frame rate "120" is taken as the duration range corresponding to the display frame rate "90", and a corresponding relationship between the display frame rate "90" and the duration range [11, 8.3) is established, thereby constructing the above preset table based on the established corresponding relationship between the frame rate and the duration range.

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

[0100] For example, when the drawing time of an image frame is within the range of 16.7ms to 11.1ms, the display frame rate of "60" is the best frame rate. When the application performance is not good and the drawing time of an image frame is within the range of 25ms to 22.2ms, the display frame rate is switched to "40" frames to ensure a stable display frame rate and a better smooth experience.

[0101] In some embodiments of the present application, after obtaining the above-mentioned M drawing durations, the electronic device can determine the drawing duration within each of the N duration ranges, and calculate the predicted value corresponding to each duration range based on the drawing duration within each duration range to obtain N predicted values.

[0102] Exemplarily, the electronic device may determine N duration ranges corresponding to N display frame rates preset by the electronic device from a preset table, and then determine the drawing duration falling within each duration range.

[0103] In some embodiments of the present application, when none of the M drawing durations falls into at least one duration range among 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 the present application, when there is at least one drawing duration among the M drawing durations that does not fall within any duration range, the electronic device does not further process the at least one drawing duration.

[0105] Example 2: Taking M=10 and N=4 as an example, during the process of updating the screen display, the electronic device can obtain the drawing time of the 10 image frames actually drawn, namely "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, when it is determined that the four duration ranges corresponding to the four display frame rates preset by the electronic device are: 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 that fall 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", so the prediction 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] The drawing times that fall within the duration range [11, 8.3) among the 10 drawing times are "8.94ms" and "10.25ms", so the prediction value corresponding to the duration range [11, 8.3) can be calculated based on "8.94ms" and "10.25ms"; and none of the 10 drawing times fall within the duration range [25, 22.2) and the duration range [22.2, 16.7); "6.56ms", "6.38ms" and "8.08ms" among the 10 drawing times do not fall within any duration range, so the electronic device does not further process them.

[0107] In this way, since the electronic device can determine the drawing time that falls within each time range, the predicted value corresponding to each time range calculated based on the drawing time that falls within each time range can more accurately represent the probability that the drawing time of the undrawn image frame is within the corresponding time range, so that the most appropriate display frame rate can be selected based on the probability, so that when the display frame rate of the electronic device is adjusted to the predicted most appropriate display frame rate and the image frame is drawn based on the drawing time corresponding to the display frame rate, visual freeze in the screen display can be avoided.

[0108] In some embodiments of the present application, the above step 202a can be specifically implemented through the following step 202a1.

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

[0110] In the embodiment of the present application, the first value is 1 / M.

[0111] In the embodiment of the present application, the later the time when the image frame corresponding to a drawing duration is completed, the greater the weight of the drawing duration. Conversely, the earlier the time when the image frame corresponding to a drawing duration is completed, the smaller the weight of the drawing duration.

[0112] It can be understood that, the later the time when the electronic device completes drawing an image frame, the closer the time when the image frame is completed is to the current time, the higher the prediction value of the drawing time corresponding to the image frame for the drawing time of the image frame to be drawn, and therefore the greater the weight of the drawing time corresponding to the image frame; the earlier the time when the electronic device completes drawing an image frame, the farther the time when the image frame is completed is from the current time, the lower the prediction value of the drawing time corresponding to the image frame for the drawing time of the image frame to be drawn, and therefore the smaller the weight of the drawing time corresponding to the image frame.

[0113] In some embodiments of the present application, since the difference in drawing time between similar image frames is small, the closer the moment when an image frame is drawn is to the current moment, the higher the prediction value of the drawing time corresponding to the image frame for the drawing time of the image frame to be drawn.

[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", and then combined with Example 1, in the process of updating the screen display, after the electronic device obtains the drawing time of the 10 image frames actually drawn, if the drawing time of the image frame is arranged in the front according to the rule that the drawing time of the image frame is completed later and the drawing time of the image frame is completed earlier, the drawing time of the 10 image frames is arranged in order as "6.56ms-6.38ms-8.94ms-10.25ms-12.3ms-8.08ms-13.2ms-14.4ms-13.3ms-12.1ms", then "0.1" is used as the weight of the drawing time "6.56ms", "0.3" is used as the weight of the drawing time "6.38ms", "0.5" is used as the weight of the drawing time "8.94ms", "0.7" is used as the weight of the drawing time "10.25ms", "0.9" is used as the weight of the drawing time "12.3ms", "1.1" is used as the weight of the drawing time "8.08ms", "1.3" is used as the weight of the drawing time "13.2ms", "1.5" is used as the weight of the drawing time "14.4ms", "1.7" is used as the weight of the drawing time "13.3ms", and "1.9" is used as the weight of the drawing time "12.1ms". That is, the later the drawing of the image frame is completed, the greater the weight of the corresponding drawing time.

[0115] In some embodiments of the present application, the electronic device may store the obtained M drawing durations into a drawing queue, and the electronic device may determine the weights of the drawing durations based on the order of the drawing durations in the drawing queue.

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

[0117] It can be understood that the closer the drawing duration is to the end of the drawing queue, the earlier the corresponding image frame is completed; and the closer the drawing duration is to the head of the queue, the later the corresponding image frame is completed.

[0118] In some embodiments of the present application, the electronic device may divide M by 1 to obtain the first value, 1 / M, which is a quantitative ratio of a drawing duration to the total drawing duration.

[0119] For example, when the M drawing durations are 10 drawing durations, the electronic device may obtain the first value as 1 / 10.

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

[0121]

[0122] Among them, Z is the predicted value corresponding to the duration range, is the first value, H i is the weight of the i-th drawing duration that falls within the duration range, is the first value.

[0123] Example 4, combined with Example 2, among the 10 drawing durations, the drawing durations that fall within the duration range [16.7, 11.1) are 12.3ms, 13.2ms, 14.4ms, 13.3ms, and 12.1ms; the drawing durations that fall within the duration range [11, 8.3) are 8.94ms and 10.25ms; and none of the 10 drawing durations falls within the duration range [25, 22.2 ) and duration range [22.2, 16.7), and combined with Example 3, after obtaining the weights of 10 drawing durations, the electronic device can calculate the prediction values ​​corresponding to the duration range [16.7, 11.1) and the duration range [11, 8.3) respectively. Specifically, the electronic device can obtain the weights of the 5 drawing durations that fall within the duration range [16.7, 11.1) "0.9, 1.3, 1.5, 1.7, 1.9", and then use M as 1 / 10=0.1, i is 5 as an example, the predicted value corresponding to the duration range [16.7, 11.1) is calculated as: 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 of the two drawing durations "0.5, 0.7" falling within the duration range [11, 8.3) can be obtained, and then taking M as 1 / 10=0.1, i is 2 as an example, the duration range is calculated. The prediction value corresponding to the duration range [11, 8.3) is: 0.1*0.5+0.1*0.7=0.12=12%. Since the 10 drawing durations do not fall into the duration range [25, 22.2) and the duration range [22.2, 16.7), the prediction value corresponding to the duration range [25, 22.2) and the duration range [22.2, 16.7) is 0%, thereby obtaining the prediction values ​​corresponding to the four duration ranges, namely the N prediction values ​​mentioned above.

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

[0125] Step 203: The electronic device adjusts the display frame rate of the electronic device to a first display frame rate based on the N prediction values.

[0126] In the embodiment of the present application, the first display frame rate is a display frame rate corresponding to a time range corresponding to a maximum predicted value among the N predicted values.

[0127] In some embodiments of the present application, after obtaining N prediction values, the electronic device can compare the sizes of the N prediction values, and then use the display frame rate corresponding to the time range corresponding to the maximum prediction value among the N prediction values ​​as the first display frame rate.

[0128] In some embodiments of the present application, after determining the maximum prediction value among N prediction values, the electronic device can search a preset table for a display frame rate corresponding to the time range corresponding to the maximum prediction value, using the time range corresponding to the maximum prediction value as an index, and then adjust the display frame rate of the electronic device to the display frame rate corresponding to the time range corresponding to the maximum prediction value.

[0129] Example 5, taking an electronic device running a communication application and a display frame rate of 40 as an example, combined with Example 4, after the electronic device calculates that the predicted value corresponding to the duration range [16.7, 11.1) is 73%, the predicted value corresponding to the duration range [11, 8.3) is 12%, and the predicted values ​​corresponding to the duration range [25, 22.2) and the duration range [22.2, 16.7) are 0%, the electronic device can determine that the maximum predicted value is 73%, and then the electronic device can use the duration range [16.7, 11.1) as an index to find the display frame rate corresponding to the duration range [16.7, 11.1) corresponding to the maximum predicted value of 73% from Table 1, and then use the display frame rate "60" corresponding to the duration range [16.7, 11.1) corresponding to the maximum predicted value 73% as the first display frame rate, and adjust the display frame rate of the electronic device from "40" to the first display frame rate "60".

[0130] In some embodiments of the present application, the first display frame rate may be a display frame rate corresponding to a time range corresponding to a prediction value greater than or equal to a preset threshold among the N prediction values.

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

[0132] In some embodiments of the present application, when at least two predicted values ​​among N predicted values ​​are greater than or equal to a preset threshold, the electronic device can use the display frame rate corresponding to the time length range corresponding to the maximum predicted value among the at least two predicted values ​​as the first display frame rate.

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

[0134] In this way, since the probability that the drawing time of the undrawn image frame is within the time range corresponding to the first display frame rate is the highest, the display frame rate can be used as the most appropriate display frame rate, and the display frame rate of the electronic device can be switched to the first display frame rate, so that when the image frame is drawn based on the drawing time corresponding to the first display frame rate, visual freeze in the screen display can be avoided.

[0135] In some embodiments of the present application, Figure 1 ,like Figure 5 As shown, the above step 201 can be specifically implemented through the following step 201a.

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

[0137] In the embodiment of the present application, the undrawn image frame is the (i+M)th image frame.

[0138] It can be understood that after the electronic device obtains the drawing time of the i-th image frame to the i+M-1-th image frame that has been drawn and obtains M drawing time, the electronic device can determine the drawing time within each time range that falls within the N time ranges, and then calculate the prediction value corresponding to each time range based on the drawing time within each time range to obtain N prediction values, so as to predict the drawing time of the i+M-th image frame that has not been drawn, and then determine the most appropriate first display frame rate based on the N prediction values, and after adjusting the display frame rate of the electronic device to the first display frame rate, the i+M-th image frame can be drawn based on the drawing time corresponding to the first display frame rate.

[0139] It can be understood that the above-mentioned M drawing durations are not fixed, but are updated in real time. After the electronic device actually completes drawing 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 for drawing i+M image frames, and then based on the drawing durations from the i+1th image frame to the i+Mth image frame that have been drawn, after obtaining M drawing durations, the electronic device can determine the drawing duration within each duration range in the N duration ranges, and then calculate the prediction value corresponding to each duration range based on the drawing duration within each duration range to obtain N prediction values, so as to predict the drawing duration of the i+M+1th image frame that has not been drawn, and then determine the most appropriate display frame rate based on the N prediction values, and after adjusting the display frame rate of the electronic device to the display frame rate, the i+M+1th image frame can be drawn based on the drawing duration corresponding to the display frame rate.

[0140] In some embodiments of the present application, the electronic device may store the drawing duration of an image frame in a drawing queue each time the drawing duration of the image frame is acquired. The drawing queue may store M drawing durations.

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

[0142] It can be understood that the above M drawing durations are data updated in real time. 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 the present application, when the storage capacity of the drawing queue is M drawing data, the drawing data of the iMth frame image can be understood as the last data at the end of the drawing queue.

[0144] Example 6: When drawing an image frame, the electronic device can store the drawing duration of the image frame in the drawing queue 21 in sequence. As shown in FIG6(A), 10 drawing durations are stored in the drawing queue 21. Then, as shown in FIG6(B), when the electronic device completes drawing a new image frame, the electronic device can store the drawing duration "15.3ms" of the new image frame from the head of the queue into the drawing queue 21, and remove the last drawing duration "6.56ms" at the tail of the queue from the drawing queue 21.

[0145] In some embodiments of the present 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 to the greatest extent 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, so that the electronic device can only reuse the content of the previous image frame, thereby avoiding visual freezes in the screen display.

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

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

[0149] In an embodiment of the present application, the second display frame rate is the display frame rate of the electronic device when the screen display image starts to be updated.

[0150] In some embodiments of the present application, when the screen display begins to update, the electronic device has not adjusted the display frame rate, so the above-mentioned second display frame rate can also be understood as the display frame rate of the electronic device before adjusting the display frame rate.

[0151] It can be understood that after the screen stops sliding, the electronic device can adjust the display frame rate of the electronic device to the initial display frame rate.

[0152] In some embodiments of the present 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 display stops updating, the screen can directly reuse the display content of the previous image frame without drawing a new image frame. Therefore, constantly predicting the drawing time of the undrawn image frame will increase the power consumption of the electronic device.

[0154] In this way, since the electronic device can adjust the display frame rate of the electronic device to the initial display frame rate when the screen display stops updating, the power consumption of the electronic device can be saved and the use time of the electronic device can be extended when the initial display frame rate is low. Furthermore, since the electronic device does not need to predict the drawing time of the undrawn image frame after the screen display stops updating, there is no need to dynamically adjust the display frame rate of the electronic device, thus saving the power consumption of the electronic device.

[0155] In the frame rate adjustment method provided in the embodiment of the present application, the drawing time of the undrawn image frame is predicted by the drawing time of the drawn image frame, and the display frame rate of the electronic device can be adjusted to the most appropriate frame rate to ensure that when the image frame is subsequently drawn, the drawing of the image frame 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 freeze phenomenon of the screen display.

[0156] In an embodiment of the present 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 times, so that the screen display is smoother when the screen display is updated, and the screen has better tracking performance under user operation.

[0157] In an embodiment of the present application, when the first display frame rate is lower than the second display frame rate, the display frame rate of the electronic device is lowered based on M drawing durations, so that the power consumption of the electronic device can be reduced during the process of updating the screen display.

[0158] It should be noted that the above-mentioned method embodiments, or various possible implementation methods in each method embodiment, can be executed separately, or, under the premise that there is no contradiction, can also be executed in combination with each other. The specific implementation can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0159] It should be noted that the display frame rate adjustment method provided in the embodiment of the present application can be executed by a display frame rate adjustment device. In the embodiment of the present application, the display frame rate adjustment device executing the display frame rate adjustment method is taken as an example to illustrate the display frame rate adjustment device provided in the embodiment of the present application.

[0160] Figure 8 FIG. 2 shows a possible structural diagram of a display frame rate adjustment device involved in an embodiment of the present application. 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 of which is the drawing duration of an image frame drawn by the electronic device.

[0162] The processing module 72 is used to obtain N prediction values ​​based on the M drawing durations obtained by the obtaining module 71, each prediction value corresponds to a duration range, each duration range corresponds to a display frame rate, and each prediction value is used to represent: a probability that the first drawing duration is within a duration range, the first drawing duration is the drawing duration of an image frame that has not been drawn, 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 prediction values ​​processed by the processing module 72. The first display frame rate is a display frame rate corresponding to the time range corresponding to the maximum prediction value among the N prediction values.

[0164] An embodiment of the present application provides a display frame rate adjustment device, which predicts the drawing time of an undrawn image frame by the drawing time of an already drawn image frame, and then can adjust the display frame rate of the display frame rate adjustment device to the most appropriate frame rate to ensure that when the image frame is subsequently drawn, the drawing of the image frame can be completed within the drawing time corresponding to the display frame rate, avoiding the display frame rate adjustment device from reusing the content of the previous image frame, thereby reducing the visual freeze phenomenon of the screen display.

[0165] In a possible implementation, the processing module 72 is specifically used to calculate the prediction value corresponding to each duration range based on the drawing durations that fall into N duration ranges among the M drawing durations, so as to obtain N prediction values; wherein the N duration ranges are duration ranges corresponding to N display frame rates preset by the electronic device, and there is no intersection between the N duration ranges.

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

[0167] In a possible implementation, the acquisition module 71 is specifically configured to:

[0168] In the process of receiving the first input, M drawing durations are obtained, where the first input is a hand-following sliding input;

[0169] or,

[0170] After receiving the second input, M drawing durations are obtained, where the second input is a hands-off sliding input;

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

[0172] In one possible implementation, the adjustment module 73 is also used to adjust the display frame rate of the electronic device to a first display frame rate based on N prediction values, and then 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 the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, a super mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0174] The display frame rate adjustment device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0175] The display frame rate adjustment device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0176] Alternatively, if Fig. 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

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

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

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

[0180] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0181] The processor 110 is used to obtain M drawing durations, each drawing duration is the drawing duration of an image frame drawn by the electronic device; and based on the M drawing durations, obtain N prediction values, each prediction value corresponds to a duration range, each duration range corresponds to a display frame rate, and each prediction value is used to characterize: the probability that a first drawing duration is within a duration range, the first drawing duration is 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 the first display frame rate, the first display frame rate being the display frame rate corresponding to the duration range corresponding to the maximum prediction value among the N prediction values.

[0182] An embodiment of the present application provides an electronic device, which predicts the drawing time of an undrawn image frame by the drawing time of an already drawn image frame, and then can adjust the display frame rate of the electronic device to the most appropriate frame rate to ensure that when the image frame is subsequently drawn, the drawing of the image frame 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 freeze phenomenon of the screen display.

[0183] In some embodiments of the present application, the processor 110 is specifically used to calculate the prediction value corresponding to each duration range based on the drawing durations falling into N duration ranges among the M drawing durations, so as to obtain N prediction 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 intersection between the N duration ranges.

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

[0185] In some embodiments of the present application, the processor 110 is specifically configured to:

[0186] In the process of receiving the first input, M drawing durations are obtained, where the first input is a hand-following sliding input;

[0187] or,

[0188] After receiving the second input, M drawing durations are obtained, where the second input is a hands-off sliding input;

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

[0190] In some embodiments of the present application, the processor 110 is further used to adjust the display frame rate of the electronic device to a first display frame rate based on N prediction values, and then adjust the display frame rate of the electronic device to a second display frame rate after the screen display stops updating, the second display frame rate being the display frame rate of the electronic device when the screen display starts updating.

[0191] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0192] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.

[0193] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: 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 keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

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

[0195] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.

[0196] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0198] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0199] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0200] An embodiment of the present application provides a computer program / program product, which is stored in a storage medium. The program / program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0201] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0203] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A display frame rate adjustment method, It is characterized in that The method comprises: Obtain M drawing durations, each drawing duration being the drawing duration of an image frame drawn by the electronic device; Based on the M drawing durations, N prediction values ​​are obtained, each prediction value corresponds to a duration range, each duration range corresponds to a display frame rate, and each prediction value is used to represent: a probability that a first drawing duration is within a duration range, the first drawing duration is a drawing duration of an image frame that has not been drawn, 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 a display frame rate corresponding to a time range corresponding to a maximum predicted value among the N predicted values.

2. The method according to claim 1, It is characterized in that The obtaining N prediction values ​​based on the M drawing durations includes: Based on the drawing durations that fall within the N duration ranges among the M drawing durations, calculating a prediction value corresponding to each duration range to obtain the N prediction values; The N time ranges are time ranges corresponding to N display frame rates preset by the electronic device, and there is no intersection between the N time ranges.

3. The method according to claim 2, It is characterized in that The calculating, based on the drawing durations falling within the N duration ranges among the M drawing durations, a prediction value corresponding to each duration range includes: Calculate a prediction value corresponding to each duration range based on the first value and the weight of each drawing duration falling within each duration range; The later the time when the image frame corresponding to a drawing duration is completed is, the greater the weight of the drawing duration is, and the first value is 1 / M.

4. The method according to claim 1, It is characterized in that The obtaining of M drawing durations includes: In the process of receiving the first input, the M drawing durations are obtained, where the first input is a hand-following sliding input; or, After receiving the second input, the M drawing durations are obtained, where the second input is a hands-off sliding input; The first input or the second input is used to trigger the electronic device to update a screen display.

5. The method according to claim 4, It is 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 picture stops updating, the display frame rate of the electronic device is adjusted to a second display frame rate, where the second display frame rate is the display frame rate of the electronic device when the screen display picture starts updating.

6. A display frame rate adjustment device, It is characterized in that The device comprises: an acquisition module, a processing module and an adjustment module; The acquisition module is used to acquire M drawing durations, each of which is the drawing duration of an image frame drawn by the electronic device; The processing module is used to obtain N prediction values ​​based on the M drawing durations obtained by the obtaining module, each prediction value corresponds to a duration range, each duration range corresponds to a display frame rate, and each prediction value is used to represent: a probability that a first drawing duration is within a duration range, the first drawing duration is a drawing duration of an image frame that has not been drawn, 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 prediction values ​​obtained by the processing module, wherein the first display frame rate is a display frame rate corresponding to a time range corresponding to a maximum prediction value among the N prediction values.

7. The device according to claim 6, It is characterized in that The processing module is specifically configured to calculate a prediction value corresponding to each duration range based on the drawing durations falling within the N duration ranges among the M drawing durations, so as to obtain the N prediction values; The N time ranges are time ranges corresponding to N display frame rates preset by the electronic device, and there is no intersection between the N time ranges.

8. The device according to claim 7, It is characterized in that The processing module is specifically configured to calculate a prediction value corresponding to each duration range based on the first value and a weight of each drawing duration falling within each duration range; The later the time when the image frame corresponding to a drawing duration is completed is, the greater the weight of the drawing duration is, and the first value is 1 / M.

9. The device according to claim 6, It is characterized in that The acquisition module is specifically used for: In the process of receiving the first input, the M drawing durations are obtained, where the first input is a hand-following sliding input; or, After receiving the second input, the M drawing durations are obtained, where the second input is a hands-off sliding input; The first input or the second input is used to trigger the electronic device to update a screen display.

10. The device according to claim 9, It is characterized in that The adjustment module is also used 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 the N predicted values ​​and after the screen display image stops updating, wherein the second display frame rate is the display frame rate of the electronic device when the screen display image starts updating.

11. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the display frame rate adjustment method as described in any one of claims 1 to 5 are implemented.

12. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the display frame rate adjustment method according to any one of claims 1 to 5 are implemented.

13. A computer program product, It is 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 according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Terminal control method and device, storage medium and electronic equipment

    CN112130940A

  • Frame rate adjustment method and device of display screen, terminal and storage medium

    CN113050906A

  • Picture rendering method and device and storage medium

    CN115797529A

  • Method, device and non-transitory computer-readable medium for control of refresh frequency of display unit

    IN201714042340A

  • Method and device for image display

    JP1999231854A