Method for refreshing an interface and electronic device
Patent Information
- Application Number
- CN202510180568.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-08-18
AI Technical Summary
但这样的刷新方案却造成了上述动态小view被冗余刷新,从而造成功耗的浪费
[0018] In a sixth aspect, a computer program product is provided, comprising a computer program that, when executed by an electronic device, can implement any of the methods in the first aspect.
Smart Images

Figure CN122593664A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interface refresh technology, and more particularly to a method and electronic device for refreshing an interface. Background Technology
[0002] As interface content becomes increasingly rich and diverse, the types of views contained within a single interface are also increasing. Each view can be designed as a dynamic view or a static view, depending on the requirements of its type. Dynamic views contain content that changes over time through animations or video playback, while static views contain content that does not change over time. When refreshing the interface displayed on electronic devices such as mobile phones and tablets, a default global refresh frame rate is used for periodic refreshes. This is especially true for multi-window display modes such as split-screen mode. To ensure that every interface displayed on the screen simultaneously receives a timely refresh, using the default global refresh frame rate for a global refresh of all displayed elements is more reasonable. However, this refresh scheme results in redundant refreshes of the aforementioned dynamic small views, thus wasting power.
[0003] Therefore, how to reduce the power consumption of interface refresh in scenarios where dynamic mini-views are displayed in the application interface is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] This application provides a method and electronic device for refreshing an interface, which can effectively reduce power consumption in scenarios where dynamic mini-views exist in the application interface.
[0005] In a first aspect, a method for refreshing an interface is provided, the method comprising: displaying a first interface of a first application on the screen of an electronic device, the first interface including a first view, the first view being a dynamic view; during the refreshing of the first interface at a first frame rate, the first view being refreshed at a second frame rate by means of intermittent frame skipping, the second frame rate being less than the first frame rate, the second frame rate being determined based on the animation frame rate of the first view.
[0006] In this technical solution, a frame skipping method is mainly used to refresh dynamic views with low frame rate requirements at a lower frame rate, thereby reducing or avoiding redundant refreshes and lowering power consumption. This frame skipping method can specifically optimize the refresh of dynamic views with low frame rate requirements while meeting overall refresh requirements, showing significant improvement for scenarios with high frame rate requirements such as video views and multi-window display scenarios.
[0007] In conjunction with the first aspect, in some implementations of the first aspect, during the refresh of the first interface at the first frame rate, the first view is refreshed at the second frame rate by intermittent frame skipping. This includes: determining whether the first view meets preset frame skipping conditions, where the preset frame skipping conditions include the size of the determined view being less than or equal to a first preset size threshold and the view having no sensitive animation effects; if the first view meets the preset frame skipping conditions, the first view is refreshed at the second frame rate by intermittent frame skipping; or, if the first view does not meet the preset frame skipping conditions, no frame skipping occurs, and the first view is refreshed along with the first interface at the first frame rate. In this implementation, a judgment of preset frame skipping conditions is set, and only views that meet the frame skipping conditions will be subject to intermittent frame skipping; otherwise, no frame skipping occurs. This effectively meets diverse display scenarios, especially for views with sensitive animation effects. For example, if a user scrolls through comments in a window, the views in that window are not suitable for frame skipping refresh to avoid affecting the user experience. The introduced judgment of frame skipping conditions can effectively avoid such problems.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the first interface includes a second view. The method further includes: during the refresh of the first interface at a first frame rate, the second view is refreshed at a third frame rate through intermittent frame skipping. The third frame rate is lower than the first frame rate and different from the second frame rate. The third frame rate is determined based on the animation frame rate of the second view, which can be a static or dynamic view. In this implementation, different views within the same interface can use different refresh frame rates lower than the global refresh rate (i.e., the first frame rate) for frame skipping. This means the solution in this application is a customized adjustment scheme at the view granularity. Different views do not skip frames indiscriminately, but are adjusted as needed according to their respective animation frame rates, thus making it more accurate.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: in a multi-window display mode, multiple interfaces are simultaneously displayed on the screen, and the first interface is any one of the multiple interfaces; during the period of refreshing the first interface according to the first frame rate, the first view is refreshed according to the second frame rate by means of interval frame skipping, including: during the period of refreshing multiple interfaces according to the first frame rate, the first view is refreshed according to the second frame rate by means of interval frame skipping. In this implementation, when the solution of this application is applied to a multi-window display mode, since some or all interfaces may contain dynamic views with high animation frame rates and / or views with sensitive animation effects when multiple interfaces are displayed simultaneously, electronic devices need to use a global refresh frame rate to globally refresh all interfaces. The solution of this application optimizes the refresh of the first view on this basis, reducing the refresh frame rate of some views and reducing power consumption while ensuring that the refresh requirements of the multi-window display mode are not affected.
[0010] In one example, the multi-window display mode is a split-screen mode, a pop-up mode, or a parallel window (AE) mode. The method further includes: when the multi-window display mode is split-screen, displaying a first interface in the first split-screen window and a second interface in the second split-screen window, the second interface being the running interface of the second application, with multiple interfaces including the first and second interfaces; or, when the multi-window display mode is pop-up, displaying the first application in the pop-up window and the second interface in the full-screen window; or, when the multi-window display mode is pop-up, displaying the first application in the full-screen window and the second interface in the pop-up window, with the first view not obscured by the second interface; or, when the multi-window display mode is AE mode, simultaneously displaying the first interface and the third interface of the first application on the screen, with multiple interfaces including the first and third interfaces. This example refines the different multi-window display modes, specifying which interface can be the first interface and the relative position of the first view.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the frame skipping interval corresponding to the second frame rate is determined based on the multiple relationship between the first frame rate and the animation frame rate of the first view. In this implementation, the target frame rate after skipping is determined based on the multiple relationship between the first frame rate and the animation frame rate of the first view, thus reducing the frame rate more simply and accurately. Furthermore, uniformly spaced frame skipping ensures that the second frame rate is also a fixed frame rate, preventing any impact on visual experience.
[0012] In a second aspect, an apparatus for refreshing an interface is provided, the apparatus comprising a unit consisting of software and / or hardware for performing any of the methods in the first aspect.
[0013] Thirdly, an electronic device is provided, including a memory, one or more processors, and a computer program stored in the memory and executable on the processors, wherein when the one or more processors execute the computer program, the electronic device is enabled to implement any of the methods in the first aspect.
[0014] Fourthly, a chip system is provided, including one or more processors, which are used to read and execute a computer program stored in a memory, such that when the computer program is executed by the processor, the electronic device in which the chip system is located is able to implement any of the methods in the first aspect.
[0015] Optionally, the chip system also includes a memory electrically connected to one or more processors.
[0016] Optionally, the chip system may also include a communication interface.
[0017] Fifthly, a computer-readable storage medium is provided that stores a computer program, which, when executed by an electronic device, can implement any of the methods in the first aspect.
[0018] In a sixth aspect, a computer program product is provided, comprising a computer program that, when executed by an electronic device, can implement any of the methods in the first aspect. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the animation effect of a small dynamic view according to an embodiment of this application.
[0020] Figure 2 This is a diagram illustrating split-screen mode and pop-up mode.
[0021] Figure 3 This is a schematic diagram of the AE mode interaction.
[0022] Figure 4 This is a schematic flowchart of a method for refreshing an interface according to an embodiment of this application.
[0023] Figure 5 This is a schematic diagram illustrating the principle of frame skipping refresh according to an embodiment of this application.
[0024] Figure 6 This is a schematic diagram illustrating another interface refresh process according to an embodiment of this application.
[0025] Figure 7 This is a schematic diagram illustrating a frame-skipping refresh method achieved by drawing a view at intervals according to an embodiment of this application.
[0026] Figure 8This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application will now be described in conjunction with the accompanying drawings.
[0028] Figure 1 This is a schematic diagram of the animation effect of a small dynamic view according to an embodiment of this application. Figure 1 The electronic device in question can be a mobile phone, tablet, laptop, personal computer, smart wearable device, in-vehicle infotainment system, or similar device. This device is capable of running and displaying the interface of an application composed of views and refreshing the interface. In some cases, the electronic device may also support... Figure 2 The scene shown is as shown.
[0029] like Figure 1 As shown in interface 101, assuming a user clicks the icon of application A on the desktop interface of an electronic device, the electronic device responds to the click operation and displays interface 102, which is the initial running interface of application A. It should be understood that there are no limitations on the way application A can be launched in this application; the user can launch it via voice control, by clicking the desktop icon, or by clicking other access interfaces, such as clicking on a background snapshot, etc., which will not be listed here. It should also be understood that application A can be any application, as long as its interface consists of multiple views.
[0030] It's important to note that views can be categorized into dynamic views and static views based on whether they change over time; and into text views, image views, webpage views, video views, file views, link views, etc., based on the type of content they contain. Furthermore, different types of views may include different element types. For example, an image view may include text elements and / or image elements, while a webpage view may include at least one of text elements, image elements, link elements, and video elements. Whether a view is dynamic depends solely on whether it contains elements that change over time. This could be changes in the shape, color, angle, or position of an image (such as a small icon), changes in image content, or changes in text content and / or formatting. These are just a few examples; the key is that the view visually changes over time, without any restrictions on the type of content it contains.
[0031] It should also be understood that, in this application, in some cases, a static view can also be considered a dynamic view with an animation frame rate of zero, and a dynamic view can be considered a dynamic view with an animation frame rate greater than zero. The animation frame rate of a dynamic view is less than or equal to the global refresh frame rate of the electronic device.
[0032] As shown in interface 102, this interface includes various elements such as a search input box, various icons, and display boxes. The interface is composed of numerous small views. View 1 is a dynamic small view labeled "Coins," corresponding to an application service / function. This view contains a function launch control; if the user clicks the control in view 1, they can switch to the corresponding function's interface. View 2 is a dynamic small view labeled "Flash Sale," also corresponding to a service / function. Furthermore, views 3 through 10 are not listed individually, and if the user performs an upward swipe operation in interface 102, they can further browse other views that gradually appear on the screen. It should also be understood that if the electronic device is a computer or laptop controlled by a keyboard and mouse, the user can also achieve the same effect by using the mouse wheel or clicking and dragging the mouse; these are not listed individually.
[0033] After interface 102 is displayed, the animation effects of each view will automatically play on the screen without requiring any user interaction. To illustrate the diversity of animation forms, interface 102 uses the search input box (which is also content contained in a view), view1, view2, view3, view6, and view7 as dynamic views, while other views, such as view4, view5, and view8-view10, can be either static or dynamic views. The functional control area can include some static icons, such as share and favorite. As can be seen from interfaces 102-108, the animation in view1 is that the coin icon flips upwards along the horizontal axis (that is, with the horizontal direction of the screen as the axis). During this process, the front icon "coin" is gradually flipped to the back and hidden, while the back icon "¥" is gradually flipped to the front and fully revealed. In view 2, the alarm clock icon and the text "0.01" flip right along the vertical axis (the screen's vertical direction). During this process, the front icon, "Alarm Clock with 'Flash Sale' and '0.01'," is gradually flipped to the back and hidden, while the rounded rectangle icon on the back, "Buy from 0.01," is gradually flipped to the front and fully revealed. In view 3, the balloon in the upper right corner of the rounded rectangle icon sways left and right. In view 6, the two triangular pyramids rotate clockwise. In view 7, the graphic combination continuously shrinks and moves to the lower left, gradually revealing the next graphic combination. The next graphic combination gradually increases in size and moves towards the center of view 7, reaching its maximum size and then moving to the center. It then continues to shrink and move to the lower left, creating an animation effect where graphic combinations appear from afar and then back again. Different texts, such as "Please Enter," "Recommendation 1," and "Recommendation 2," scroll through the input box. It can be seen that different dynamic views can have different animation effects, and their animation cycles are independent. In some cases, it can also be assumed that view4 is a dynamic view in which a video is continuously playing.
[0034] Interfaces 102-108 are for automatic playback. To better explain the animation effects of different views, arrows are used in interface 103 to mark the movement trajectory of the content contained in different views.
[0035] In traditional solutions, the interface refreshes using the electronic device's default, uniform refresh rate, such as 60 frames per second (fps). Assuming that views 4 and 8 in interface 102 are video views dynamically playing video, this refresh rate is necessary to ensure smooth video display. This means all other views must be refreshed at the same frame rate. However, dynamic views with smaller animations, such as views 1-3 and 6-7, have relatively lower dynamic frame rates, such as only 30 fps or 20 fps, leading to redundant refreshes. For example, if view 1 has an animation frame rate of 30 fps, view 3 has an animation frame rate of 20 fps, and the default refresh rate is 60 Hz (60 fps), the electronic device refreshes 60 times per second. However, view 1 only needs to refresh 30 times to display all frames, and view 3 only needs to refresh 20 times, resulting in redundant refreshes.
[0036] To address the aforementioned issue of redundant refreshes, this application proposes a novel interface refresh scheme. By using intermittent frame skipping, dynamic views with low frame rate requirements are refreshed at a lower frame rate, thereby reducing or avoiding redundant refreshes and lowering power consumption. This frame skipping scheme optimizes the refresh of dynamic views with low frame rate requirements while meeting overall refresh needs, significantly improving performance in scenarios with high frame rate requirements such as video views and multi-window displays. When an interface contains dynamic views with high frame rate requirements, using a lower uniform frame rate would inevitably affect the display of these views, necessitating a higher frame rate. However, this leads to redundant refreshes of dynamic views with lower frame rate requirements. In multi-window display scenarios, such as split-screen mode, pop-up mode, and parallel window (activityembedding, AE) mode, multiple interfaces may run and be displayed on the screen simultaneously, or multiple interfaces of the same application may be displayed simultaneously. Different display interfaces may require different refresh frame rates. Traditional solutions, to ensure sufficient refresh, use a uniform global refresh at a higher default frame rate, resulting in redundant refreshes of dynamic views with low frame rate requirements.
[0037] Figure 2 This is a diagram illustrating split-screen mode and pop-up mode. (Example) Figure 2 (a) and Figure 2 As shown in (b), this is the split-screen mode, which means that multiple windows are displayed simultaneously on the screen of an electronic device in a split-screen manner, with each window corresponding to an application. Figure 2(a) shows an example of a split-screen display on a candybar phone. However, it should be understood that if device A is rotated, it can also be a split-screen display horizontally. Here, we take split-screen #1 as displaying the interface A1 of application A, and split-screen #2 as displaying the interface B1 of application B. Application A could be... Figure 1 Application A, interface A1 can be Figure 1 Interface 102. That is to say, Figure 1 Interfaces 102-108 can be displayed in split-screen #1. Application B can also be any application, such as a shopping app, browser, chat app, etc., without any restrictions. The top bar of the split-screen window can be used to switch the split-screen to full screen.
[0038] In split-screen mode, because some or all of the displayed interfaces in the split-screen windows may have high refresh rate requirements, the traditional solution uses the default global refresh rate to refresh, ensuring that all windows are fully refreshed. This results in redundant refreshes of small dynamic views in the type of interface shown in interface 102. The reasons for redundant refreshes in pop-up mode and AE mode described below are similar, so they will not be explained again below. For example, suppose interface A1 is... Figure 1 The middle interface is 102, so if the user does not perform any operation, Figure 2 In split-screen #1 shown in (a), interfaces 102-108 will automatically play. Assuming the user is watching a video using a video application in split-screen #2 during this period, a global refresh at a lower frame rate (i.e., a full screen refresh) would result in choppy video playback in split-screen #2, affecting the user's visual experience. Conversely, a global refresh at a higher frame rate would cause redundant refreshes of some dynamic views in interface A1. To address this issue, this application's solution uses an interval-skipping frame method to refresh all split-screen windows globally at a suitable higher frame rate, while ensuring that dynamic views in one or more split-screens with lower refresh rate requirements are refreshed at a lower frame rate. Figure 2 The split-screen scenario of device B shown in (b) is similar, and will not be described further for the sake of simplicity.
[0039] Device B is an example of a large-screen device, such as a foldable phone.
[0040] like Figure 2 (c) and Figure 2 The example shown in (d) is a pop-up mode, which displays the interface of another application in a pop-up window within the full-screen display of one application. Figure 2As shown in (c), device A displays application B's interface B1 in full-screen mode, while a pop-up window displays application A's interface A1. For ease of understanding, interface A1 can also be interface 102, meaning interface B1 is displayed in a full-screen window, and interface A1 is displayed in pop-up window #3. Assume the user can click control C to display interface A1 in full-screen mode, which means switching pop-up window #3 to a full-screen window. Figure 2 The same applies to (d), so I will not elaborate further.
[0041] Figure 3 This is a schematic diagram of the After Effects (AE) mode interaction. (For example...) Figure 3 The device D shown is assumed to be a large-screen mobile phone, tablet, or in-vehicle infotainment system. Mask 201 represents the interface A1 of application A displayed on the screen, but it does not occupy the entire screen. Assuming the user clicks control M in interface A1, electronic device D responds to this click by displaying interface 202. As shown in interface 202, both interface A1 and interface A2 of application A are simultaneously displayed on the screen. Figure 1 Application A in the text can be an example of application A here. Figure 1 Interfaces 102-108 in the text can be examples of interface A1 or interface A2 here.
[0042] As shown in interface 203, the screen of device D displays the interface A1 of application A in full screen. Assuming the user clicks control N in interface A1, device D responds to the click operation by displaying interface 204. Interface 204 displays the application Adele interfaces A1 and A3 in AE mode. Figure 1 Interfaces 102-108 can be examples of interfaces A1 or A3 here. Assuming the user rotates device D, device D responds by displaying interface 205 in response to the rotation.
[0043] It should also be noted that although this application mainly targets scenarios where there are multiple views with different refresh rate requirements on the same interface, and reduces the refresh frequency and thus power consumption by skipping frames for some small views with lower refresh rate requirements, in scenarios where images, videos or files are displayed in full screen in an application, the display interface may only contain one view. In this case, if the view is a dynamic view, the solution of this application is still applicable, but it may not be skipped because the view does not meet the requirements for view size in the preset frame skipping conditions.
[0044] from Figure 1 It can be seen that more and more applications are featuring dynamic views with relatively low frame rates, and from... Figure 2 and Figure 3 It can also be seen that the multi-window display modes of electronic devices are becoming more and more diversified. The development of both has led to the increasingly common phenomenon of dynamic views being redundantly refreshed, resulting in wasted power consumption.
[0045] It's important to note that in multi-window display modes, multiple windows will appear on the same screen. Multi-window display modes can include split-screen mode, pop-up mode, After Effects (AE) mode, and other multi-window display modes may appear in the future. In split-screen and pop-up modes, different windows display the interfaces of different applications, and operations on the interfaces of different windows do not affect each other. For example, in a split-screen mode with two separate windows, each window displays the interface of a separate application. When interacting with one window, it will not affect the display of the other window because they are two independently running application windows. However, in AE mode, the two displayed interfaces are parallel, meaning they are two levels of the same application. Therefore, operations on either interface can trigger background responses from the application.
[0046] To address the power consumption waste caused by redundant refreshes of dynamic views, this application proposes a new method for refreshing the interface, which is described below in conjunction with... Figure 4 Please provide an explanation.
[0047] Figure 4 This is a schematic flowchart illustrating a method for refreshing an interface according to an embodiment of this application. The following is a description of... Figure 4 The steps shown are explained below.
[0048] S401. Display a first interface of a first application on the screen of an electronic device, the first interface including a first view.
[0049] The first view is a dynamic view.
[0050] The first interface can include multiple views, which may be static or dynamic, but must include at least one dynamic first view. Interface 102, A1, or A3 mentioned above can be examples of the first interface.
[0051] S402. During the refresh of the first interface according to the first frame rate, the first view is refreshed according to the second frame rate by means of intermittent frame skipping.
[0052] The second frame rate is lower than the first frame rate, and the second frame rate is determined based on the animation frame rate of the first view. The animation frame rate of the first view is lower than the first frame rate.
[0053] When an electronic device refreshes the first screen according to the global refresh frame rate (first frame rate), all views on the first screen, including the first view, will be refreshed according to the first frame rate. However, this application's solution adjusts the refresh frame rate of the first view to a second frame rate by using interval frame skipping. The second frame rate is determined based on its animation frame rate, thereby reducing redundant refreshes and lowering power consumption while still meeting the refresh frame rate requirements.
[0054] In one implementation, during the refresh of the first interface at a first frame rate, the first view is refreshed at a second frame rate through intermittent frame skipping. This includes: determining whether the first view meets preset frame skipping conditions, whereby the preset frame skipping conditions include the view's size being less than or equal to a first preset size threshold and the view having no sensitive animation effects; if the first view meets the preset frame skipping conditions, it is refreshed at the second frame rate through intermittent frame skipping; or, if the first view does not meet the preset frame skipping conditions, no frame skipping occurs, and the first view is refreshed along with the first interface at the first frame rate. This implementation sets a preset frame skipping condition determination; only views that meet the condition are subject to intermittent frame skipping, otherwise no frame skipping occurs. This effectively meets diverse display scenarios, especially for views with sensitive animation effects. For example, if a user scrolls through comments in a window, the view in that window is not suitable for frame skipping refresh to avoid affecting the user experience. The introduced frame skipping condition determination effectively avoids this problem.
[0055] Sensitive motion effects can include translation, rapid scaling, rapid rotation, and other similar effects, without limitation. Sensitive motion effects can also be understood as those requiring a high refresh rate. For example, a user quickly browsing comments by swiping up and down is a sensitive motion effect; similarly, a user zooming in and out of an image might cause the view containing that image to exhibit a sensitive motion effect. Other cases will not be listed individually. It should be understood that video views inherently have a high animation frame rate and rapid image changes; this can also be considered a case of sensitive motion effects. Alternatively, when locking the first view, only views with animation frame rates lower than the first view's frame rate can be selected, thus naturally eliminating the video view and preventing it from becoming the first view in this application.
[0056] The first preset size threshold can be used to represent the area ratio of the display window. When the current display window is a full-screen window, it is the ratio of the size of a single view to the entire full-screen window. When the display window is a split-screen window, pop-up window, or parallel window, it is the ratio of the size of a single view to the display window in which the view is located.
[0057] The first preset size threshold can be set by statistically analyzing the sizes of dynamic views in a large number of common applications (small animations with low frame rates), and then determining the size based on the largest view or the median size of all views in the statistical set. This statistical set includes the sizes of multiple dynamic views from multiple applications being analyzed. This method allows the first preset size threshold to be adapted to most applications, and it only needs to be set uniformly. All applications on the electronic device, and even new applications to be installed in the future, can be judged using this first preset size threshold.
[0058] The first preset size threshold can also be set separately for each application, meaning each application has a corresponding first preset size threshold value. This can be set based on the maximum value in the dynamic view of small animations in all interfaces of that application. This method of setting is more precise, but electronic devices need to store the first preset size threshold for each application, which increases the storage size.
[0059] The first preset size threshold can also be set at the interface level, setting it separately for each interface in each application. That is, each interface in each application corresponds to a value of the first preset size threshold. It can be set according to the maximum value in the dynamic view of the small animation in the interface. This method of setting is more precise, but the electronic device needs to store the first preset size threshold of each interface in each application, which increases the storage size. In addition, when reading, it is necessary to identify which interface is currently displayed before selecting the value of the first preset size threshold corresponding to the current interface.
[0060] In one implementation, the first interface includes a second view. The method further includes: during the refresh of the first interface at a first frame rate, the second view is refreshed at a third frame rate by intermittent frame skipping. The third frame rate is lower than the first frame rate and is different from the second frame rate. The third frame rate is determined based on the animation frame rate of the second view, which can be a static or dynamic view. In this implementation, different views within the same interface can use different refresh frame rates lower than the global refresh rate (i.e., the first frame rate) for frame skipping. This means the proposed solution is a customized adjustment scheme at the view granularity. Different views do not skip frames indiscriminately, but are adjusted as needed according to their respective animation frame rates, thus making it more accurate.
[0061] In this application, the animation frame rate of the first view and the animation frame rate of the second view are both lower than the first frame rate; otherwise, there is no need to adjust them. Views 1-3 and 6-7 mentioned above can be examples of the first or second view, while views 4-5, 8-10, etc., can be examples of the second view.
[0062] In one implementation, the method further includes: in a multi-window display mode, multiple interfaces are simultaneously displayed on the screen, and the first interface is any one of the multiple interfaces; during the refresh of the first interface at a first frame rate, the first view is refreshed at a second frame rate by intermittent frame skipping, including: during the refresh of multiple interfaces at the first frame rate, the first view is refreshed at the second frame rate by intermittent frame skipping. In this implementation, applying the solution of this application to a multi-window display mode, since when multiple interfaces are displayed simultaneously, some or all interfaces may contain dynamic views with high animation frame rates and / or views with sensitive animation effects, electronic devices need to use a global refresh frame rate to globally refresh all interfaces. The solution of this application optimizes the refresh of the first view, reducing the refresh frame rate of some views and lowering power consumption while ensuring that the refresh requirements of the multi-window display mode are not affected.
[0063] In one example, the multi-window display mode is a split-screen mode, a pop-up mode, or a parallel window (AE) mode. The method further includes: when the multi-window display mode is split-screen, displaying a first interface in the first split-screen window and a second interface in the second split-screen window, the second interface being the running interface of the second application, with multiple interfaces including the first and second interfaces; or, when the multi-window display mode is pop-up, displaying the first application in the pop-up window and the second interface in the full-screen window; or, when the multi-window display mode is pop-up, displaying the first application in the full-screen window and the second interface in the pop-up window, with the first view not obscured by the second interface; or, when the multi-window display mode is AE mode, simultaneously displaying the first interface and the third interface of the first application on the screen, with multiple interfaces including the first and third interfaces. This example refines the different multi-window display modes, specifying which interface can be the first interface and the relative position of the first view.
[0064] In one implementation, the frame skipping interval corresponding to the second frame rate is determined based on the multiple relationship between the first frame rate and the animation frame rate of the first view. This implementation uses the multiple relationship between the first frame rate and the animation frame rate of the first view to determine the target frame rate after skipping, thus reducing the frame rate more simply and accurately. Furthermore, evenly spaced frame skipping ensures that the second frame rate is also a fixed frame rate, preventing any impact on visual experience.
[0065] In one example, the first frame rate is M times the animation frame rate of the first view, where M is a real number. The frame skipping interval corresponding to the second frame rate is N, where N is a positive integer obtained by rounding down M. In this example, the refresh frame rate is minimized to the maximum extent, and frame skipping only occurs when N is a positive integer. If the result of rounding down M is not an integer, it means that there is no need for frame skipping.
[0066] The frame skipping interval is N, which means that the frame is refreshed once every N frames following the global refresh frame rate. Or it can be understood as skipping N frames without refreshing before refreshing the next time during the refresh according to the global refresh frame rate.
[0067] It should be understood that when the second view is a dynamic view, the frame skipping can be done in the same way as the first view, so it will not be repeated here. However, when the second view is a static view, the ratio of the first frame rate to the animation frame rate of the second view is infinite. In this case, the second view will skip all frames, meaning the third frame rate will be zero.
[0068] Figure 4 The method described primarily uses interval frame skipping to refresh dynamic views with low frame rate requirements at a lower frame rate, thereby reducing or avoiding redundant refreshes and lowering power consumption. This frame skipping approach optimizes the refresh of dynamic views with low frame rate requirements while meeting overall refresh needs, showing significant improvement for scenarios with high frame rate requirements such as video views and multi-window displays.
[0069] Figure 5 This is a schematic diagram illustrating the principle of frame skipping refresh according to an embodiment of this application. For example... Figure 5 As shown in (a), assuming the electronic device performs a global refresh at a frequency of 60Hz, viewA is included in the frame from frame N to frame N+3. In other words, viewA will be periodically refreshed at a refresh rate of 60fps along with the global refresh. Figure 5 (a) can be seen as an example of a global refresh in the traditional scheme. The large parallelogram represents the entire frame of the interface, and the small parallelogram marked with "A" represents viewA.
[0070] When viewA is a small, dynamic view, if its animation frame rate is low, say 30fps, meaning it only needs to be refreshed at a frequency of 30Hz, then redundant refresh occurs. This application's solution, however, reduces the refresh frame rate of viewA only by using interval frame skipping, ensuring that other views are fully refreshed. Figure 5As shown in (b), in these 4 frames, viewA is refreshed normally in the Nth and N+2nd frames, and skips the refresh (i.e. is not refreshed) in the N+1th and N+3rd frames.
[0071] It should be understood that Figure 5 This is merely an example of frame skipping; there are no numerical limitations. For instance, assuming viewA's animation frame rate is 20fps and the global refresh frame rate is 60fps, then viewA refreshes every two frames on top of the global refresh frame rate. This could mean viewA is refreshed in frames N and N+3, but skips the refresh in frames N+1 and N+2. Another example is that the global refresh frame rate might be 120Hz, etc. Other cases will not be listed individually.
[0072] Figure 6 This is a schematic diagram illustrating another interface refresh execution process according to an embodiment of this application. The application layer's app1 can be any application, such as the aforementioned application A. It should also be understood that for the aforementioned split-screen mode, pop-up mode, etc., multiple applications in the application layer may need to participate in the refresh. Therefore, the application layer can also include multiple applications, and these multiple applications will execute the following process, each optimizing the refresh frame rate of some views within their respective interfaces based on a global refresh. The choreographer module of the framework layer (FWK) is used to control layer drawing, the view root image module (ViewRootImpl) is used to traverse the view tree of the current interface to lock the views that need to be drawn, and the view invalidation module (view-invalidate) is used to decide whether to block (skip) the drawing of the view based on certain judgment conditions. The native layer's graphics compositing service (surfaceflinger) is used to periodically distribute drawing tasks to the app. The application vertical synchronization (vsync) module in the graphics compositing service ( Figure 6 The app-vsync function can respond to drawing requests.
[0073] When a layer or view (one or more) of app1 needs to be drawn, the graphics compositing service periodically sends a drawing command to app1, informing app1 that the graphics or view needs to be drawn. Based on this, app1 sends a drawing request to app-vsync. Then, app-vsync responds to the drawing request by calling the choreographer. The choreographer notifies ViewRootImpl to start the invalidate process of drawing, traversing the view tree. ViewRootImpl locks the view that needs to be drawn by traversing the view tree of the currently displayed interface of app1, thereby triggering the drawing of the view. The view-invalidate module of the framework layer determines whether the current view should be drawn based on the preset frame skipping conditions. For views that meet the preset frame skipping conditions, they are drawn and displayed. For views that do not meet the preset frame skipping conditions, the drawing is skipped and they are not displayed (that is, frame skipping, skipping the drawing of the view in the current frame). Based on the current global refresh frame rate, views that meet the preset frame skipping conditions are drawn by skipping frames at intervals.
[0074] Assuming the current global refresh rate is 60Hz (60fps), and the dynamic view requires a refresh rate of 30fps, then skip one frame at intervals. Figure 7 This is an example of such a situation. Assuming the current global refresh rate is 120fps, and the dynamic view requires a refresh rate of 30fps, then the interval is 3 frames. Other cases will not be listed individually. However, it should be understood that for the latter case, skipping 1 or 2 frames at intervals can both reduce the refresh rate and thus reduce power consumption; it's just that skipping 3 frames at intervals maximizes the reduction of the refresh rate while meeting display requirements.
[0075] Figure 7 This is a schematic diagram illustrating a frame-skipping refresh method achieved by drawing a view at intervals according to an embodiment of this application. Figure 7 For explanations of the relevant modules, please refer to... Figure 6 This will not be elaborated further. For example... Figure 7As shown, assuming a global refresh rate of 60fps (60Hz), a refresh is needed every 16.6 milliseconds, requiring each view in the interface to be drawn once. Starting from millisecond 0, drawing is required at frame N. An app-vsync request is received from SurfaceFlinger. Upon arrival of app-vsync, the choreographer is called, notifying ViewRootImpl to initiate the invalidate process for drawing. View-invalidate checks whether the current view meets the preset frame skipping conditions. If it does, the current view is drawn with frame skipping and the subsequent refresh module is notified; otherwise, the current view is drawn without frame skipping and the subsequent refresh module is notified. Assuming the current view can skip one frame at a time, then... Figure 7 As shown, the drawing process continues at view-invalidate for frames N and N+2, while the drawing process for frames N+1 and N+3 is skipped at view-invalidate, thus ending the drawing process of the current frame of the view. This achieves drawing and refreshing by skipping one frame.
[0076] The methods of the embodiments of this application have been described above with reference to the accompanying drawings. It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially, these steps are not necessarily executed in the order shown in the figures. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps. The apparatus of the embodiments of this application will now be described with reference to the accompanying drawings.
[0077] Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Figure 8 As shown, the electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, a sensor module 980, a display screen 994, etc. The sensor module 980 may include a pressure sensor 980A, a touch sensor 980K, etc.
[0078] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 900. In other embodiments of this application, the electronic device 900 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0079] For example, Figure 8 The processor 910 shown may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0080] The controller can be the nerve center and command center of the electronic device 900. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0081] The processor 910 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. This memory can store instructions or data that the processor 910 has just used or that are used repeatedly. If the processor 910 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.
[0082] The wireless communication function of electronic device 900 can be implemented through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor, and baseband processor.
[0083] Electronic device 900 implements display functions through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 910 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0084] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. In some embodiments, the electronic device 900 may include one or N display screens 994, where N is a positive integer greater than 1.
[0085] The external storage interface 920 can be used to connect an external memory card, such as a secure digital (SD) card, to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 910 through the external storage interface 920 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0086] Internal memory 921 can be used to store computer executable program code, which includes instructions. Processor 910 executes various functional applications and data processing of electronic device 900 by running the instructions stored in internal memory 921. Internal memory 921 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 900 (such as audio data, phonebook, etc.). Furthermore, internal memory 921 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0087] Pressure sensor 980A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 980A can be disposed on display screen 994. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 980A, the capacitance between the electrodes changes. Electronic device 900 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 994, electronic device 900 detects the intensity of the touch operation based on pressure sensor 980A. Electronic device 900 can also calculate the touch position based on the detection signal from pressure sensor 980A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0088] Touch sensor 980K, also known as a "touch panel," can be located on display screen 994. The touch sensor 980K and display screen 994 together form a touchscreen, also known as a "touchscreen." Touch sensor 980K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 994. In some embodiments, touch sensor 980K may also be located on the surface of electronic device 900, in a different position than display screen 994.
[0089] In this application, the pressure sensor 980A can acquire user operations such as clicking the application A icon on the display screen 994. The display screen 994 can display one or more display interfaces, and these display interfaces can include a first interface. The processor 910 can execute relevant instructions to make different views in the first interface refresh at different frame rates, thereby reducing unnecessary refreshes and lowering power consumption without affecting the user experience.
[0090] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0092] This application also provides an electronic device, which includes one or more processors, a memory, and a computer program stored in the memory and executable on the one or more processors. When the one or more processors execute the computer program, the electronic device enables the electronic device to perform the steps in any of the above methods.
[0093] This application also provides a computer-readable storage medium storing a computer program, which, when executed by an electronic device, can implement the steps in the above-described method embodiments.
[0094] Computer-readable storage media can include at least: any entity or device capable of carrying computer program code to a photographic / electronic device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical discs. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0095] This application provides a computer program product, which includes a computer program that, when executed by an electronic device, can implement the steps described in the various method embodiments above. The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form.
[0096] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0097] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0098] In the embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0100] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0101] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0102] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0103] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0104] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for refreshing an interface, characterized in that, include: A first interface of a first application is displayed on the screen of an electronic device, the first interface including a first view, the first view being a dynamic view; During the refresh of the first interface at the first frame rate, the first view is refreshed at the second frame rate by means of intermittent frame skipping. The second frame rate is less than the first frame rate and is determined based on the animation frame rate of the first view.
2. The method according to claim 1, characterized in that, The step of refreshing the first interface at a first frame rate by intermittent frame skipping to refresh the first view at a second frame rate includes: Determine whether the first view meets the preset frame skipping conditions. The preset frame skipping conditions include that the size of the view being determined is less than or equal to a first preset size threshold and that the view has no sensitive animation effects. If the first view meets the preset frame skipping condition, the first view is refreshed according to the second frame rate by skipping frames at intervals; or... If the first view does not meet the preset frame skipping condition, no frame skipping is performed so that the first view is refreshed along with the first interface at the first frame rate.
3. The method according to claim 1 or 2, characterized in that, The first interface includes a second view, and the method further includes: During the refresh of the first interface at the first frame rate, the second view is refreshed at a third frame rate by means of intermittent frame skipping. The third frame rate is less than the first frame rate and is different from the second frame rate. The third frame rate is determined based on the animation frame rate of the second view, which is either a static view or a dynamic view.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In multi-window display mode, multiple interfaces are displayed simultaneously on the screen, and the first interface is any one of the multiple interfaces. The step of refreshing the first interface at a first frame rate by intermittent frame skipping to refresh the first view at a second frame rate includes: During the refresh of the plurality of interfaces at the first frame rate, the first view is refreshed at the second frame rate by means of intermittent frame skipping.
5. The method according to claim 4, characterized in that, The multi-window display mode is split-screen mode, pop-up mode, or parallel window AE mode; The method further includes: When the multi-window display mode is split-screen mode, the first interface is displayed in the first split-screen window, and the second interface is displayed in the second split-screen window. The second interface is the running interface of the second application, and the multiple interfaces include the first interface and the second interface; or, When the multi-window display mode is a pop-up mode, the first application is displayed in the pop-up window, while the second interface is displayed in a full-screen window; or, When the multi-window display mode is pop-up mode, the first application is displayed in a full-screen window, while the second interface is displayed in a pop-up window, and the first view is not obscured by the second interface; or, When the multi-window display mode is AE mode, the first interface of the first application and the third interface of the first application are displayed simultaneously on the screen, and the multiple interfaces include the first interface and the third interface.
6. The method according to any one of claims 1 to 5, wherein the frame skipping interval corresponding to the second frame rate is determined based on the multiple relationship between the first frame rate and the animation frame rate of the first view.
7. An electronic device, characterized in that, The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 6.
8. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 6.