Dynamic interface display method and electronic device

By identifying and reducing the frame rate of animation elements that users do not pay attention to, the problem of high power consumption when displaying the user interface is solved, and the dual optimization of interface fluency and power consumption is achieved.

WO2024230288A1PCT designated stage expired Publication Date: 2024-11-14HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/079708
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-06
Filing Date
2024-03-01
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

When the terminal displays the user interface, the high frame rate drawing and rendering of multiple animation elements leads to an increase in power consumption, especially the animation elements that the user does not pay attention to occupy a smaller area but still need to refresh at the default frame rate, resulting in unnecessary power consumption. waste.

Method used

By identifying the first type of animation that users do not pay attention to, reducing their frame rate, using the initial frame rate to display other elements in the target interface, and only displaying the first type of animation at the target frame rate, reducing unnecessary animation drawing and rendering operations. Reduce power consumption.

Benefits of technology

While ensuring the smoothness of the interface and user experience, it reduces the power consumption of the dynamic interface of the electronic device and improves battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079708_14112024_PF_FP_ABST
    Figure CN2024079708_14112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals. Disclosed are a dynamic interface display method and an electronic device. The method comprises: an electronic device displaying elements of a target interface at an initial frame rate; acquiring at least one first type of animation in the target interface; displaying the first type of animation at a target frame rate; and displaying, at the initial frame rate, the elements other than the first type of animation in the target interface, wherein the target interface comprises the first type of animation, and the first type of animation is an animation unrelated to an operation of a user in the target interface; and the target frame rate is less than the initial frame rate. In the present application, by means of reducing the frame rate of a first type of animation, which a user is not concerned about, in a dynamic interface, the frequency of an electronic device in performing a rendering display operation on the drawing of the first type of animation in the dynamic interface, and the power consumption of an electronic device in displaying a dynamic interface is reduced while a user performing a functional operation on the basis of the dynamic interface is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Dynamic interface display method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 6, 2023, with application number 202310508046.3 and invention name “A method for displaying a dynamic interface and an electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of terminal technology, and in particular to a method for displaying a dynamic interface and an electronic device. Background Art

[0003] With the development of terminal technology, the components of the terminal user interface (UI) are becoming increasingly rich. Terminals can provide users with more intuitive information through various elements of the UI. For example, the terminal desktop can include animated elements and non-animated elements. For example, animated elements include dynamic icons, animated components, animated backgrounds, etc., while non-animated elements can include static icons, static components, static backgrounds, etc. For another example, the animated elements in the display interface of some applications (APPs) can include videos, animated components, dynamic backgrounds, etc., while non-animated elements can include pictures, text, static backgrounds, etc.

[0004] When displaying a user interface, the terminal needs to perform drawing operations on both non-animated and animated elements included in the user interface. When the user interface includes animated elements, the terminal needs to draw, render, and display each image frame of the animated element according to the device's default frame rate to achieve the display effect of refreshing and playing the animated elements based on the device's default frame rate.

[0005] However, if the user interface includes multiple animation elements, the terminal needs to draw, render, and display each image frame of each animation element according to the device's default frame rate, resulting in relatively high power consumption of the terminal when displaying the user interface.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a method for displaying a dynamic interface and an electronic device. By reducing the frame rate of a first type of animation in the dynamic interface that the user is not interested in, the frequency of the electronic device's drawing, rendering, and display operations for the first type of animation in the dynamic interface is reduced. This reduces the power consumption of the electronic device when displaying the dynamic interface while not affecting the user's functional operations based on the dynamic interface. To achieve the above objectives, the embodiments of the present application adopt the following technical solutions.

[0008] In a first aspect, a method for displaying a dynamic interface is provided, the method comprising: an electronic device displays elements in a target interface at an initial frame rate, obtains at least one first-class animation in the target interface, displays the first-class animation at a target frame rate, and displays elements in the target interface other than the first-class animation at the initial frame rate.

[0009] The target interface elements include first-class animations, which are animations that are not related to user operations on the target interface. The target frame rate is lower than the initial frame rate, which is the default frame rate of the electronic device.

[0010] Among them, animation elements that are not of high concern to users, or that users will not pay attention to, or that do not affect users' functional operations in the user interface, can be called first-class animations. The first-class animation can also be understood as a non-sensitive animation that is irrelevant to the user's operations in the user interface and is not paid attention to by the user. Optionally, the first-class animation often occupies a smaller area of ​​the user interface, and the first-class animation can also be called a small animation. The position of the first-class animation in the user interface is not fixed, and its position may be located at the edge of the user interface or at the center of the user interface. The second-class animation, which is different from the first-class animation, is the animation element in the user interface other than the first-class animation. The second-class animation is often the animation element that users pay attention to in the user interface, and the user's operations based on the user interface often affect the refresh, play or pause operations of the second-class animation.

[0011] In this application, by identifying the animation elements in the display interface, the first type of animation of the display interface is obtained, thereby determining the frame drop strategy of the first type of animation, reducing the drawing frequency of the first type of animation according to the frame drop strategy, and reducing unnecessary animation drawing of the first type of animation by the electronic device. The reduction process does not affect the drawing of other parts of the screen, thereby achieving the goal of reducing the power consumption of the electronic device in drawing the display interface while ensuring the interface smoothness of the display interface.

[0012] In a possible implementation of the first aspect, the target interface includes multiple first-category animations having different sizes. The electronic device refreshes and displays the multiple first-category animations at a target frame rate of the first-category animation with the largest size.

[0013] In the present application, the electronic device can coordinate multiple first-category animations on a whole frame basis, so that multiple first-category animations can be drawn simultaneously as much as possible. For example, the whole frame coordination can be to determine the target animation with the largest size from multiple first-category animations, and coordinate the frame dropping strategies of other first-category animations based on the frame dropping strategy of the target animation, that is, to apply the frame dropping strategy of the target animation to other first-category animations, and refresh and display multiple first-category animations at the target frame rate of the largest-sized first-category animation, so as to achieve synchronous drawing or non-drawing of all first-category animations, and further reduce the power consumption of the electronic device in displaying the target interface.

[0014] In a possible implementation of the first aspect, the electronic device acquires at least one first-type animation in a target interface, including:

[0015] The electronic device obtains multiple elements in a target interface, wherein the multiple elements include animated elements and non-animated elements. The electronic device obtains the animated elements of the target interface based on a first identifier of each element, wherein the first identifier is used to indicate whether the element has a transformation matrix. Exemplarily, the first identifier of the animated element is a first value, and the first identifier of the non-animated element is a second value. The electronic device obtains at least one first-category animation from the animated elements based on a drawing frequency of the animated elements of the target interface.

[0016] In the present application, the electronic device performs animation recognition of elements based on the first identifiers of all elements in the target interface, and distinguishes animated elements from non-animated elements in the target interface.

[0017] When the first identifier is a first value, it indicates that the element has a transformation matrix, and the transformation matrix has changed, that is, the element is changing. In this case, the non-element is determined to be an animated element. When the first identifier is a second value, it indicates that the element does not have a transformation matrix, or in other words, its transformation matrix has not changed, and the element is determined to be a non-animated element.

[0018] In the present application, based on the first identification of the element, it is possible to accurately determine whether the element is animated or non-animated, thereby providing data support for the next step of extracting animation features from the animation.

[0019] In another possible implementation of the first aspect, the electronic device obtains at least one first-category animation from the animation elements according to a drawing frequency of the animation elements on the target interface, including:

[0020] The electronic device obtains the continuous animation in the animation element according to the drawing frequency of the animation element of the target interface.

[0021] The drawing frequency of the continuous animation is greater than a preset threshold.

[0022] The electronic device obtains at least one first-category animation from the continuous animation in the animation element.

[0023] In the present application, the electronic device can extract animation features based on the drawing frequency of each animation element and determine whether each animation element is a short animation or a continuous animation. For example, the drawing frequency of animation element 1 is that after two drawing cycles of drawing display, no drawing operation is performed, and animation element 1 is only displayed for two cycles. The animation type with the cumulative number of drawing marks 1 being less than the threshold value N is a short animation. Here, the threshold value N can be determined according to the actual situation. For example, N can be a natural number greater than 0, such as 1, 2, 3, 4, 5, etc. For example, short animations can include transition animations, transition animations, and operation-type animations. Animation types with the cumulative number of drawing marks 1 being greater than or equal to the threshold value N are called continuous animations. For example, when N is 5, the drawing frequency of animation element 2 is drawn for 8 consecutive cycles. 8 is greater than 5, and animation element 2 is determined to be a continuous animation that displays 8 cycles.

[0024] In this application, the electronic device distinguishes between continuous animations and short animations based on the drawing frequency of each animation element. Since short animations are short-lived and highly visible to users, and thus cannot reduce drawing operations, this embodiment does not focus on these types of animations. Therefore, the identified short animations can be filtered out, focusing only on continuous animations, thereby further extracting animation features from these continuous animations and subsequently obtaining the first type of animations.

[0025] In another possible implementation of the first aspect, before the electronic device extracts animation features of the animation element based on the drawing frequency of the animation element on the target interface and obtains the continuous animation in the animation element, the method further includes:

[0026] The electronic device obtains a drawing time sequence of N frames of animation elements in a target interface within a preset time period.

[0027] Among them, the drawing time sequence includes the drawing identification value of each animation element in the N-frame target interface. For example, when the drawing identification value is the first value, it indicates that the animation element in the current frame is drawn, and when the drawing identification value is the second value, it indicates that the animation element in the current frame is not drawn.

[0028] The electronic device obtains the drawing frequency of the animation element according to the drawing time sequence of the animation element.

[0029] In this application, the drawing time series includes drawing identification values ​​that indicate whether an element is drawn or not drawn in each period. Based on the drawing time series of each element, the electronic device can obtain the drawing frequency, stop frequency, and other information of each element. This provides data support for the electronic device to extract animation features from continuous animations and further identify the animation type.

[0030] In another possible implementation of the first aspect, the electronic device obtains, within a preset time period, a drawing time sequence of animation elements in a target interface of N frames, including:

[0031] In a preset time period, the electronic device traverses the drawing tree draw tree of each frame target interface.

[0032] The electronic device generates a drawing time sequence of the animation element according to whether the drawing area damage area of ​​each node of the drawing tree of the target interface of each frame is drawn; each node in the drawing tree corresponds to each element in the target interface.

[0033] In this application, the target interface of each frame corresponds to a draw tree. After traversing each draw tree, the electronic device records the drawing results of the damage area of ​​the node whose type is continuous animation. After statistical operations for a preset time period, the drawing time series of each node RenderNode is obtained. The value of the drawing period in the drawing time series is 1, and the value of the non-drawing period in the drawing time series is 0. The electronic device can obtain the drawing frequency, stop frequency, etc. of each element based on the drawing time series of the node corresponding to each element. This provides data support for the electronic device to extract animation features for continuous animation and further identify the animation type.

[0034] In another possible implementation of the first aspect, the electronic device obtains at least one first-category animation from a persistent animation in an animation element, including:

[0035] If the target interface includes multiple animation elements, a continuous animation with a size smaller than a first threshold range is determined as a first type of animation; the multiple animation elements include continuous animation and / or short animation; and the drawing frequency of the short animation is smaller than a preset threshold.

[0036] If the target interface only includes continuous animation, the continuous animation with a size smaller than the second threshold range is determined as the first type of animation; the second threshold range is larger than the first threshold range.

[0037] In this application, if the target interface includes multiple animation elements, that is, if the target interface includes one or more first-category animations, then a persistent animation with a size smaller than the first threshold range {w1, h1} is determined to be a first-category animation. If the target interface only includes persistent animations, then a persistent animation with a size smaller than the second threshold range {w2, h2} is determined to be a first-category animation. The first threshold range is smaller than the second threshold range.

[0038] When the target interface includes multiple animation elements, in order to avoid classifying the animation that the user is interested in as the first type of animation, the first threshold range can be set to be smaller. When the target interface only includes continuous animation, the second threshold range can be set to be larger than the first threshold range.

[0039] In the present application, the first category of animation is determined from the continuous animation based on the size of the animation, which can reduce the error of classifying large-sized animations that attract user attention as the first category of animation.

[0040] In another possible implementation of the first aspect, the electronic device obtains at least one first-category animation from a persistent animation in an animation element, including:

[0041] The continuous animation is classified according to the drawing frequency and the stopping frequency of the continuous animation to obtain the classification result of the continuous animation.

[0042] Among them, the classification results include at least one of continuous drawing animation, continuous pause animation and continuous stop animation. The continuous drawing animation is an animation that is always in a drawing cycle, the continuous pause animation is an animation in which the drawing cycle and the non-drawing cycle appear in a regular alternation, and the continuous stop animation is an animation that is consistently in a non-drawing cycle after a period of drawing cycle.

[0043] In this application, the continuous animation is further identified by type, and a more suitable frame dropping strategy or target frame rate can be formulated based on the different types of continuous animation. For example, if the first type of animation is identified as a drawing pause animation, the drawing frequency and stop frequency of the drawing pause animation can be obtained. Then, based on the drawing frequency and stop frequency of the drawing pause animation, the target frame rate for the drawing pause animation can be determined. The drawing pause animation can be refreshed and displayed at a lower frame rate, thereby reducing the number of drawing operations and lowering the power consumption of the drawing target interface of the electronic device.

[0044] In another possible implementation of the first aspect, the electronic device displays the first type of animation at a target frame rate, including:

[0045] The electronic device determines a target frame rate based on attribute information of the first type of animation; the attribute information includes at least one of a drawing frequency, a stop frequency, a size, and a classification result; and the electronic device displays the first type of animation at the target frame rate.

[0046] In this application, the electronic device determines the target frame rate of the first type of animation based on the drawing frequency, stop frequency, size, and classification result of the first type of animation. In other words, it determines the degree to which the first type of animation should be reduced from the initial frame rate. The reduction ratio of the initial frame rate can be 50%, 70%, 80%, etc.

[0047] In this application, the electronic device determines the target frame rate based on the attribute information of the first type of animation, and can display the first type of animation at a target frame rate that is more suitable for the first type of animation, so as not to cause an overly obvious refresh slowdown experience to the user.

[0048] In another possible implementation of the first aspect, the electronic device determines the target frame rate according to the attribute information of the first type of animation, including:

[0049] If the target interface includes a first-category animation, the target frame rate is determined according to the drawing frequency, stop frequency, size, and classification result of the first-category animation.

[0050] If the target interface includes multiple first-category animations, the target frame rate is determined according to the drawing frequency, stop frequency, size, and classification result of the largest first-category animation among the multiple first-category animations.

[0051] In the present application, if the target interface includes multiple first-category animations, the electronic device determines the target animation with the largest size from the multiple first-category animations, and uses the frame loss strategy of the target animation as a basis to coordinate the frame loss strategies of other first-category animations, that is, the frame loss strategy of the target animation is applied to other first-category animations to achieve synchronous drawing or non-drawing of all first-category animations.

[0052] In this way, the non-drawing periods of all first-type animations are unified, further reducing the power consumption of the electronic device in drawing the target interface.

[0053] In another possible implementation of the first aspect, the target frame rate corresponds to a frame drop strategy, and the electronic device displays the first type of animation at the target frame rate, including:

[0054] The electronic device determines a frame dropping strategy for the first type of animation based on attribute information of the first type of animation; the attribute information includes at least one of a drawing frequency, a stop frequency, a size, a classification result, and a corresponding application; the frame dropping strategy is used to indicate a drawing period and a non-drawing period for the first type of animation.

[0055] The electronic device refreshes and displays the first type of animation based on the drawing period and non-drawing period of the first type of animation.

[0056] In this application, the electronic device determines a frame-dropping strategy for the first-category animation based on the drawing frequency, stopping frequency, size, classification result, and application of the first-category animation. Specifically, the electronic device determines the ratio of the drawing period to the frame-dropping period of the first-category animation. For example, the frame-dropping strategy may include discarding two image frames after drawing one image frame. For example, the frame-dropping strategy may include discarding one image frame after drawing two image frames.

[0057] In this application, the electronic device determines the target frame rate based on the attribute information of the first type of animation, and can display the first type of animation at a target frame rate that is more suitable for the first type of animation, so as not to cause an overly obvious refresh slowdown experience to the user.

[0058] In another possible implementation of the first aspect, the electronic device determines, based on attribute information of the first type of animation, a frame dropping strategy for the first type of animation, including:

[0059] If the application to which the first type of animation belongs is a first type of application, a first frame loss strategy for the first type of animation is determined; in the first frame loss strategy, the ratio of the frame loss period to the total period is greater than the ratio of the drawing period to the total period; and the first type of application is a preset application with low requirements for animation smoothness; if the application to which the first type of animation belongs is a second type of application, a second frame loss strategy for the first type of animation is determined; in the second frame loss strategy, the ratio of the frame loss period to the total period is less than the ratio of the drawing period to the total period; and the first type of application is a preset application with high requirements for animation smoothness.

[0060] Optionally, the electronic device may preset a mapping relationship between each application and an element in the display interface of each application, and classify the applications according to their types. The first type of application may be an application with low requirements for the smoothness of the display interface. When processing the first type of animation of the display interface of the first type of application, the proportion of the frame drop period in its frame drop strategy to the total period may be greater than the proportion of the drawing period to the total period. For example, the frame drop strategy may be to discard two image frames after each image frame is drawn. The second type of application may be an application with high requirements for the smoothness of the display interface. When processing the first type of animation of the display interface of the second type of application, the proportion of the frame drop period in its frame drop strategy to the total period may be less than the proportion of the drawing period to the total period. For example, the frame drop strategy may be to discard one image frame after each two image frames are drawn.

[0061] Optionally, the electronic device can also preset the elements and The mapping relationship between activitiy in the architecture. The frame-dropping strategy of the first type of animation belonging to the first type of activitiy is set so that the ratio of the frame-dropping cycle to the total cycle can be greater than the ratio of the drawing cycle to the total cycle; the frame-dropping strategy of the first type of animation belonging to the second type of activitiy is set so that the ratio of the frame-dropping cycle to the total cycle is less than the ratio of the drawing cycle to the total cycle.

[0062] In this application, a frame dropping strategy for the first type of animation is formulated based on the type of application or activity, which can be more in line with the actual usage scenario, so that even if the first type of animation is refreshed and displayed at a lower frame rate, it will not cause an overly obvious display experience to the user.

[0063] In another possible implementation of the first aspect, the electronic device displays the first type of animation at a target frame rate, including:

[0064] After a preset time period, the electronic device displays the first type of animation at a target frame rate.

[0065] In this application, after the electronic device statistically identifies the animation elements in N frames of the target interface over a preset time period, it displays the first type of animation in the target interface at the target frame rate after the preset time period, and still maintains the initial frame rate to display elements other than the first type of animation, thereby reducing unnecessary animation drawing of the first type of animation by the electronic device, and does not affect the drawing of other parts of the screen during the reduction process, thereby reducing the power consumption of the electronic device in drawing the display interface while ensuring the interface smoothness of the display interface.

[0066] In a second aspect, an electronic device is provided, comprising a memory, a display screen, and one or more processors; the memory and the display screen are coupled to the processor; computer program code is stored in the memory, and the computer program code comprises computer instructions, which, when executed by the processor, enable the electronic device to perform a method as described in any one of the above-mentioned first aspects.

[0067] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is executed on an electronic device, the electronic device can execute any one of the methods in the first aspect.

[0068] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute any one of the methods described in the first aspect.

[0069] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.

[0070] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0072] FIG2 is an example diagram of a mobile phone user interface provided by an embodiment of the present application, in which the first type of animation is a dynamic icon;

[0073] FIG3 is an example diagram of an animation component in which the first type of animation in the user interface of a mobile phone provided by an embodiment of the present application is an animation component;

[0074] FIG4 is a schematic diagram of the home page of a search engine APP for a mobile phone provided in an embodiment of the present application;

[0075] FIG5 is a schematic diagram of a video playback interface of a video APP of a mobile phone provided in an embodiment of the present application;

[0076] FIG6 is a schematic diagram of the main interface of a video APP of a mobile phone provided in an embodiment of the present application;

[0077] FIG7 is a schematic diagram of an application setting interface of a mobile phone provided in an embodiment of the present application;

[0078] FIG8 is a schematic diagram of a navigation interface of a mobile phone map APP provided in an embodiment of the present application;

[0079] FIG9 is a schematic diagram of a mobile phone search interface of an e-commerce mall APP provided in an embodiment of the present application;

[0080] FIG10 is a schematic diagram of another first type of animation in a user interface of a mobile phone provided in an embodiment of the present application;

[0081] FIG11 is a schematic diagram showing a comparison of the frame rate of a “clock” icon of a mobile phone before and after adjustment provided by an embodiment of the present application;

[0082] FIG12 is a schematic diagram of an electronic device architecture provided in an embodiment of the present application;

[0083] FIG13 is a flow chart of an electronic device determining a drawing area for each element in a display interface provided by an embodiment of the present application;

[0084] FIG14 is a flowchart of an electronic device obtaining a first type of animation in a display interface provided by an embodiment of the present application;

[0085] FIG15 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0086] FIG16 is a structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: the situation where A exists alone, A and B exist at the same time, and B exists alone, wherein A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are a kind of "or" relationship.

[0088] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0089] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0090] The implementation of this embodiment is described in detail below with reference to the accompanying drawings.

[0091] The method for displaying a dynamic interface provided in an embodiment of the present application can be applied to electronic devices with display screens, such as portable computers (such as mobile phones), tablet computers, laptop computers, personal computers (PCs), wearable electronic devices (such as smart watches), augmented reality (AR) and virtual reality (VR) devices, and in-vehicle computers, etc. The embodiment of the present application does not impose any restrictions on this.

[0092] Figure 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a radio frequency module 350, a communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display 394, and a subscriber identification module (SIM) card interface 395. The sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.

[0093] The structure shown in the embodiment of the present invention does not limit the electronic device 100. The electronic device 100 may include more or fewer components than shown, or some components may be combined or separated, or arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0094] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0095] The controller is the decision-maker that directs the various components of electronic device 100 to coordinate operations according to instructions. It serves as the nerve center and command center of electronic device 100. Based on instruction opcodes and timing signals, the controller generates operational control signals to control instruction fetching and execution.

[0096] Processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 310 is a high-speed cache memory that can store instructions or data that have just been used or are being recycled by processor 310. If processor 310 needs to use the same instruction or data again, it can directly access the memory. This avoids repeated accesses, reduces processor 310 latency, and thus improves system efficiency.

[0097] In some embodiments, the processor 310 may include an interface. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface.

[0098] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDL) and a serial clock line (SCL). In some embodiments, the processor 310 may include multiple I2C bus lines. The processor 310 may be coupled to the touch sensor 380K, charger, flash, camera 393, etc. via different I2C bus interfaces. For example, the processor 310 may be coupled to the touch sensor 380K via the I2C interface, enabling communication between the processor 310 and the touch sensor 380K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0099] The I2S interface can be used for audio communication. In some embodiments, the processor 310 can include multiple I2S buses. The processor 310 can be coupled to the audio module 370 via the I2S bus to enable communication between the processor 310 and the audio module 370. In some embodiments, the audio module 370 can transmit audio signals to the communication module 360 ​​via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0100] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 370 and the communication module 360 ​​can be coupled via a PCM bus interface. In some embodiments, the audio module 370 can also transmit audio signals to the communication module 360 ​​via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication, and the sampling rates of the two interfaces are different.

[0101] The UART interface is a universal serial data bus used for asynchronous communication. This bus is bidirectional and converts data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 310 and the communication module 360. For example, the processor 310 communicates with the Bluetooth module via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 370 can transmit audio signals to the communication module 360 ​​via the UART interface, enabling the playback of music via Bluetooth headphones.

[0102] The MIPI interface can be used to connect the processor 310 to peripheral devices such as the display screen 394 and the camera 393. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 310 and the camera 393 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 310 and the display screen 394 communicate via the DSI interface to implement the display function of the electronic device 100.

[0103] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 310 to the camera 393, the display 394, the communication module 360, the audio module 370, the sensor module 380, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0104] The USB interface 330 can be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 330 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. It can also be used to connect other electronic devices, such as AR devices.

[0105] The interface connection relationship between the modules shown in the embodiment of the present invention is for illustrative purposes only and does not limit the structure of the electronic device 100. The electronic device 100 may adopt different interface connection methods or a combination of multiple interface connection methods in the embodiment of the present invention.

[0106] The charging management module 340 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 can receive charging input from the wired charger via the USB interface 330. In some wireless charging embodiments, the charging management module 340 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 342, the charging management module 340 can also provide power to the electronic device 100 via the power management module 341.

[0107] The power management module 341 is used to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 and provides power to the processor 310, the internal memory 321, the external memory interface 320, the display 394, the camera 393, and the communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some embodiments, the power management module 341 can also be provided in the processor 310. In some embodiments, the power management module 341 and the charging management module 340 can also be provided in the same device.

[0108] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the radio frequency module 350, the communication module 360, the modem and the baseband processor.

[0109] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, a cellular network antenna can be reused as a wireless local area network diversity antenna. In some embodiments, the antenna can be used in conjunction with a tuning switch.

[0110] The RF module 350 can provide a communication processing module for wireless communication solutions including 2G / 3G / 4G / 5G applied to the electronic device 100. The RF module 350 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The RF module 350 receives electromagnetic waves from the antenna 1, and performs filtering, amplification and other processing on the received electromagnetic waves, and transmits them to the modem for demodulation. The RF module 350 can also amplify the signal modulated by the modem, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the RF module 350 can be set in the processor 310. In some embodiments, at least some functional modules of the RF module 350 can be set in the same device as at least some modules of the processor 310.

[0111] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 370A, a receiver 370B, etc.) or displays an image or video through a display screen 394. In some embodiments, the modem may be an independent device. In some embodiments, the modem may be independent of the processor 310 and be set in the same device as the RF module 350 or other functional modules.

[0112] The communication module 360 ​​can provide a communication processing module for wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the electronic device 100. The communication module 360 ​​can be one or more devices that integrate at least one communication processing module. The communication module 360 ​​receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310. The communication module 360 ​​can also receive the signal to be sent from the processor 310, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0113] In some embodiments, antenna 1 of electronic device 100 is coupled to RF module 350, and antenna 2 is coupled to communication module 360, so that electronic device 100 can communicate with a network and other devices via wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning satellite system (satellite based augmentation systems, SBAS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a Quasi-Zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0114] Electronic device 100 implements display functionality through a GPU, display screen 394, and an application processor. A GPU is a microprocessor for image processing that connects display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or modify display information.

[0115] Display screen 394 is used to display images, videos, etc. Display screen 394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 394, where N is a positive integer greater than one.

[0116] The electronic device 100 can implement a shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen, and an application processor.

[0117] The ISP processes data fed back by camera 393. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 393.

[0118] The camera 393 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 393, where N is a positive integer greater than 1.

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

[0120] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0121] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0122] The external memory interface 320 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 310 via the external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

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

[0124] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 370 , the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.

[0125] The audio module 370 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be provided in the processor 310, or some functional modules of the audio module 370 can be provided in the processor 310.

[0126] The speaker 370A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 370A.

[0127] The receiver 370B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 370B close to the ear to hear the voice.

[0128] The microphone 370C, also known as a "microphone" or "microphone", is used to convert sound signals into audio electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 370C to input the sound signal into the microphone 370C. The electronic device 100 can be provided with at least one microphone 370C. In some embodiments, the electronic device 100 can be provided with two microphones 370C, which can not only collect sound signals but also realize noise reduction function. In some embodiments, the electronic device 100 can also be provided with three, four or more microphones 370C to realize sound signal collection, noise reduction, and identification of sound sources, and realize directional recording function, etc.

[0129] The headphone jack 370D is used to connect a wired headphone. The headphone jack 370D can be a USB interface 330, or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0130] Keys 390 include a power button, a volume button, and the like. Keys 390 may be mechanical keys or touch-sensitive keys. Electronic device 100 receives input from keys 390 and generates key signal input related to user settings and function control of electronic device 100.

[0131] Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Touch operations acting on different areas of the display screen 394 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0132] Indicator 392 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0133] The SIM card interface 395 is used to connect a SIM card. The SIM card can be connected to or removed from the electronic device 100 by inserting it into or removing it from the SIM card interface 395. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 395 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 395 can also be compatible with different types of SIM cards. The SIM card interface 395 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0134] The methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.

[0135] In view of the problems existing in the prior art, a display method of a dynamic interface provided by the present application is described.

[0136] With the development of terminal technology, the components of the terminal user interface (UI) are becoming increasingly rich. Terminals can provide users with more intuitive information through various elements of the user interface. For example, the terminal desktop can include animated elements and non-animated elements. For example, animated elements include dynamic icons, animated components, animated backgrounds, etc., while non-animated elements can include static icons, static components, static backgrounds, etc. For another example, the animated elements in the display interface of some applications (Application, APP) can include videos, animated components, dynamic backgrounds, etc., while non-animated elements can include pictures, text, static backgrounds, etc.

[0137] When displaying a user interface, a terminal needs to perform drawing operations on both non-animated and animated elements included in the user interface. When an animated element is included in the user interface, the terminal needs to draw, render, and display each image frame of the animated element according to the device's default frame rate to achieve the display effect of the terminal updating and playing the animated element based on the device's default frame rate. The frame rate refers to the number of frames the terminal refreshes in one second. It can also be understood as the number of times the graphics processor in an electronic device refreshes the screen per second. The frame rate can also be understood as the image refresh rate. A higher frame rate produces smoother and more realistic animation. The more frames per second, the smoother the displayed motion. For example, a frame rate of 60Hz means the terminal refreshes 60 frames in one second, or one frame every 16.67ms. For example, a frame rate of 90Hz means the terminal refreshes 90 frames in one second, or one frame every 11.11ms. The device's default frame rate is a set value dependent on the electronic device's hardware.

[0138] The user interface of a terminal may be the terminal's desktop, the terminal's system interface, the display interface of an application (APP) included in the terminal, etc. Animated elements of the user interface may include dynamic icons, videos, animated components, animated backgrounds, etc. Non-animated elements of the user interface may include static icons, images, text, etc.

[0139] For example, a dynamic icon can be a clock icon displayed on the terminal desktop. When the display interface includes a clock icon, the terminal draws and plays the clock icon at the device's default frame rate. In the user's visible dimension, the second hand, minute hand, and hour hand of the clock icon are continuously updated and played. A dynamic icon can also be an APP icon with animation effects displayed on the terminal desktop. When the display interface includes an APP icon with animation effects, the terminal draws and plays the APP icon at the device's default frame rate. In the user's visible dimension, the animation effect of the APP icon is continuously updated and played.

[0140] For example, the video can be played on the display interface of a video app or short video app. The terminal draws the played video at the device's default frame rate. In the user's visual dimension, the played video is continuously updated on the terminal's display interface.

[0141] For example, the animation component can be a small animation component displayed on the terminal desktop. For example, the small animation component can be a weather forecast component. The terminal draws and plays the weather forecast component at the device's default frame rate. In the user's visible dimension, the weather forecast component will update the temperature value over time. For example, the small animation component can also be a music player component. The terminal draws and plays the music player component at the device's default frame rate. In the user's visible dimension, the music player component rotates the record image displayed in the component at a certain speed to indicate that music is playing. The animation component can also be an animation component specified in the display interface of the APP. For example, the animation component can be the background music source that scrolls in a video APP or short video APP, the rotating record icon, etc. The animation component can also be an animation component specified in the display interface of the map APP. For example, the animation component can be a speeding reminder component, a construction road condition reminder component, a speed limit reminder component, a lane change reminder component, a road exit reminder, and other reminder animation components in the navigation interface. The terminal draws and plays various reminder animation components at the device's default frame rate. In the user visual dimension, when the user is about to drive to a specified location including a reminder animation component, the terminal displays the corresponding reminder animation component at an adaptive position on the navigation interface. After passing the specified location, the terminal no longer displays the reminder animation component on the navigation interface.

[0142] For example, the animated background can be a dynamic wallpaper on the terminal desktop. Exemplarily, the terminal draws and plays the dynamic wallpaper at the device's default frame rate. In the user's visible dimension, the dynamic wallpaper on the desktop continuously updates and plays its dynamic display effects. For example, the animated background can also be a dynamic wallpaper on the APP's display interface. The terminal draws and plays the dynamic wallpaper at the device's default frame rate. In the user's visible dimension, the dynamic wallpaper on the APP's display interface continuously updates and plays its dynamic display effects.

[0143] When displaying each user interface, the terminal needs to draw, render, and synthesize the animation elements and non-animation elements in the user interface. For non-animation elements, the terminal only needs to draw them once; for animation elements, the terminal needs to draw and render each image frame of the animation element according to the device's default frame rate, and update each image frame of the displayed animation element. If there are many animation elements in the user interface, or some animation elements are animation elements that the user does not pay attention to, the terminal needs to draw, render, and display each image frame of the animation element according to the device's default frame rate for each animation element, which will cause the terminal to consume relatively high power when displaying the user interface.

[0144] In order to reduce the power consumption when the terminal displays the user interface, the drawing of a certain type of animation can be reduced by distinguishing the types of animation elements, thereby reducing the power consumption of the terminal displaying the user interface. For example, by limiting the scene, the animation information of the user interface is obtained, and the animation that is not drawn is determined based on the animation information; or, the animation type is distinguished by the special code flow in the code of a certain type of animation, so that one or more types of animation are not drawn. However, there are often only a few specific types of animations in the limited scene, and the applicability of this method is not high; the method of distinguishing the animation type by code flow is relatively complicated and has relatively low applicability. There are also other existing technologies that reduce the drawing operation of image frames for a certain type of animation or an entire user interface. This method can easily lead to an unsmooth user interface.

[0145] When the terminal displays the user interface, it generally refreshes all the animation elements in the user interface at the device's default frame rate. That is, the frame rate of all animation elements in the user interface is the same. The animation elements in the user interface usually include animation elements that the user pays attention to and animation elements that the user does not pay attention to in order to increase the aesthetics of the user interface. In the case where some animation elements that the user pays attention to need to be refreshed and displayed at a high frame rate, refreshing and displaying animation elements that the user does not pay attention to at the same high frame rate will cause unnecessary power consumption waste. Based on this idea, the present application provides a method for displaying a dynamic interface, which keeps the frame rate of animation elements that the user pays attention to unchanged and reduces the frame rate of animation elements that the user does not pay attention to, so as to ensure the smoothness of the user interface while reducing the power consumption of the user displaying the user interface.

[0146] Specifically, for user interfaces that include animation elements, the terminal reduces the frame rate at which such animation elements are drawn by identifying and screening animation elements that are of little concern to the user, or that the user will not pay attention to, or that will not affect the user's functional operations in the user interface. In particular, during all cycles in which the terminal draws such animation elements based on the default device frame rate, the terminal may choose not to draw such animation elements in certain cycles according to a certain rule, thereby reducing the terminal's operations of drawing, rendering, and synthesizing and displaying such animation elements, thereby reducing the power consumption of the terminal when displaying a user interface that includes such animation elements. At the same time, since animations other than the first category of animations that the user pays attention to are not processed, animations other than the first category of animations in the display interface are still refreshed and displayed at the device's default frame rate, ensuring the smoothness of the user interface and the user's experience.

[0147] In some embodiments, the above-mentioned animation elements that are not of high concern to the user, or that the user will not pay attention to, or that will not affect the user's functional operations in the user interface, can be referred to as first-class animations. The first-class animation can also be understood as a non-sensitive animation that is irrelevant to the user's operation in the user interface and is not paid attention to by the user. Optionally, the first-class animation often occupies a smaller area of ​​the user interface, and the first-class animation can also be called a small animation. The position of the first-class animation in the user interface is not fixed, and its position may be located at the edge of the user interface or at the center of the user interface. It should be noted that no matter where the first-class animation is located, the first-class animation is not the animation that the user pays attention to in the current user interface. Accordingly, the second-class animation, which is different from the first-class animation, is an animation element in the user interface other than the first-class animation. The second-class animation is often the animation element that the user pays attention to in the user interface, and the user's operations based on the user interface often affect the refresh, play or pause operations of the second-class animation.

[0148] This embodiment uses a mobile phone as an example of the terminal to illustrate the first type of animation. Referring to Figure 2, Figure 2 shows an example of a first type of animation being a dynamic icon. The desktop of the mobile phone shown in Figure 2 includes a first type of animation "clock" icon 101. When the mobile phone displays the user interface where the "clock" icon 101 is located, it draws and plays the "clock" icon 101 at the device's default frame rate. In the user's visual dimension, when the terminal displays the desktop including the "clock" icon 101, the second hand, minute hand, and hour hand in the "clock" icon 101 are continuously updated and played. Refer to the enlarged display area on the right side of Figure 2, which shows a schematic diagram of the playback changes of the "clock" icon 101. For example, when the device's default frame rate is 60Hz, the terminal draws, renders, and refreshes an image frame of the "clock" icon with a period of 16.67ms. Except for the "clock" icon, all other elements in the user interface shown in Figure 2 are non-animated elements, and there is no second type of animation.

[0149] Referring to Figure 3, Figure 3 shows an example of a first-category animation being an animation component. The display interface of the short video APP shown in Figure 3 includes a first-category animation "rotating record" component 102, a first-category animation "background music 1" component 103, and a second-category animation "video 1" 104. When the mobile phone displays the display interface of the short video APP, it draws and plays all the animation elements in the display interface at the device's default frame rate. In the user's visual dimension, when the display interface is turned on, the terminal plays "Video 1" 104, while continuously rotating and playing the "rotating record" component 102 and continuously scrolling and playing the "background music 1" component 103. For example, refer to the enlarged display area on the right side of Figure 3, which shows a schematic diagram of the playback changes of the "rotating record" component 102. For example, when the device's default frame rate is 60Hz, the terminal draws, renders, and refreshes the image frames corresponding to the display of "Video 1" 104, the "rotating record" component 102, and the "background music 1" component 103 in a cycle of 16.67ms.

[0150] For example, the example of the first type of animation being an animation component can also be referred to as shown in FIG4 . FIG4 shows a schematic diagram of the home page of a search engine APP. The home page of the search engine APP includes the first type of animation "live" component 105 and other non-animation elements. For example, non-animation elements include news content and news illustrations, etc. When the mobile phone displays the home page of the search engine APP, it draws and plays the "live" component 105 at the device's default frame rate. In the user's visual dimension, when the home page of the search engine APP is displayed, the terminal plays the animation of the "live" component 105. Please refer to the enlarged display area on the right side of FIG4 , which shows a schematic diagram of the playback changes of the "live" component 105. For example, when the device's default frame rate is 60Hz, the terminal draws, renders and refreshes each image frame of the "live" component with a cycle of 16.67ms. When the user pulls down or slides left and right to browse news on the home page of the search engine APP, it will not affect the playback of the "live" component 105.

[0151] For example, an example of the first type of animation being an animation component can also be seen in Figure 5. Figure 5 illustrates a video playback interface for a video app. The video playback interface includes a "Selection" component 106 (currently playing the first type of animation), "Video 1" 107, "Nearby Videos 1 / 2" 108, and other non-animated elements. The currently playing "Selection" component 106 provides the user with a reminder of the currently playing episode and does not interfere with the user's viewing of the main "Video 1" 107. Non-animated elements include video descriptions, recommendations, and a bottom toolbar. When the mobile phone displays the video playback interface, it renders "Video 1" 107, "Nearby Videos 1 / 2" 108, and the currently playing "Selection" component 106 at the device's default frame rate. In the user's visual dimension, when the video playback interface is displayed, the terminal plays "Video 1" 107 and the currently playing "Selection" component 106 simultaneously. When the user clicks "Nearby Videos 1 / 2" 108, the nearby videos 1 / 2 play. Refer to the enlarged display area on the left side of Figure 5, which illustrates the playback changes of the currently playing "Selection" component 106. For example, when the device's default frame rate is 60Hz, the terminal renders and refreshes each image frame of "Video 1" 107, "Surrounding Videos 1 / 2" 108, and the currently playing "Selection" component 106 in a cycle of 16.67ms.

[0152] For example, an example of the first type of animation being an animation component can also be seen in Figure 6. Figure 6 illustrates a schematic diagram of the main interface of a video app. The main interface of the video app includes a first type of animation, a "Search" component 109, recommended videos, and other non-animated elements. The "Search" component 109 provides users with search recommendations for currently popular TV series and does not interfere with the user's browsing of recommended videos. Non-animated elements include video descriptions, recommendation information, and a bottom function bar. When the mobile phone displays the main interface of the video app, it draws and plays recommended video 1 and the "Search" component 109 at the device's default frame rate. In the user's visual dimension, when the main interface of the video app is displayed, the terminal plays recommended video 1 and the "Search" component 109 simultaneously. When the user clicks on recommended videos 2 / 3 / 4 / 5 / 6 / 7, the corresponding recommended video plays. The playback changes of the "Search" component 109 can be seen in the two figures shown in Figure 6. The displayed content in the "Search" component 109 updates from "Hot Drama 1" (see Figure 6(a)) to "Hot Drama 2" (see Figure 6(b)). When the default frame rate of the device is 60 Hz, the terminal draws, renders, and refreshes each image frame of the recommended video 1 and the "search" component 109 in a cycle of 16.67 ms.

[0153] Exemplarily, an example of the first type of animation being an animation component can also be referred to as shown in FIG7 . FIG7 shows a schematic diagram of an application setting interface, which includes a first type of animation "pig" component 110. The "pig" component 110 is used to remind the user to enter certain active interfaces of the current application, and has no other impact on the user's use of other functions of the application setting interface. Referring to the right side of FIG7 , there is a schematic diagram of the update changes of the "pig" component 110. When the default frame rate of the device is 60 Hz, the terminal draws, renders and refreshes each image frame of the "pig" component 110 with a period of 16.67 ms.

[0154] The first type of animation can also be a component that displays a preset time period. For example, refer to Figure 8, which shows a navigation interface diagram of a map app. During navigation, the map app can provide users with construction reminders based on road conditions, such as the construction reminder component 111 shown in Figure 8. In addition, during navigation, the map app can also provide users with speed limit reminders, traffic light countdown reminders, speed measurement reminders, photo taking reminders, and other information based on road conditions. Construction reminders, speed limit reminders, traffic light countdown reminders, speed measurement reminders, photo taking reminders, and other information can all be updated and displayed in the form of animation components when entering the target road, and updated and not displayed after leaving the target road. When the device default frame rate is 60Hz, when displaying these reminder animation components, the terminal draws, renders, and refreshes each image frame of the reminder animation components in a cycle of 16.67ms. The display or non-display of these reminder animation components has no effect on the overall route navigation.

[0155] For example, an example of the first type of animation, which is an animation component, can also be seen in Figure 9. Figure 9 illustrates a mobile search interface for an e-commerce app. The mobile search interface includes search results, which include non-animated elements (such as mobile phone images, product descriptions, detailed descriptions, and prices). When a store is live streaming, the search results also include a "Live" component 112. When the search interface includes a merchant that is live streaming, the "Live" component 112 is rendered and played at the device's default frame rate. The enlarged display area on the right side of Figure 9 illustrates the playback changes of the "Live" component 112. For example, when the device's default frame rate is 60Hz, the terminal renders and refreshes each image frame of the "Live" component 112 in a cycle of 16.67ms. Optionally, when a user browses the search interface, that is, when a user pulls down and swipes on the search interface, the position of the "Live" component 112 will change as the user swipes, but the animation of the "Live" component 112 will not be affected by the user's operation.

[0156] In addition, the first type of animation can also be other components. For example, referring to Figure 10, Figure 10 (a) shows a scanning interface for scanning a QR code. Among them, during the scanning process, the animation of the scan bar 113 sweeping up and down is the first type of animation. The shaded part in Figure 10 (a) is the dynamic shadow effect of the scan bar. The up and down sweeping of the scan bar 113 does not affect the actual scanning operation. Figure 10 (b) shows a schematic diagram of a red envelope interface. Among them, the animation of the "open" component 114 in the red envelope interface gradually flashing from the inside to the outside in a concentric circle at a preset frequency is the first type of animation. The animation of the "open" component 114 does not affect the user's operation of opening the red envelope. Figure 10 (c) shows an e-book page turning interface. The previous page and the next page can be distinguished by the gradient shadow 115 at the page turning point. The animation of the gradient shadow at the page turning point is the first type of animation. The gradient shadow 115 does not affect the user's page turning operation. This embodiment does not limit the specific form of the small animation.

[0157] The first type of animation can be further divided into categories based on how it is displayed.

[0158] For example, the first type of animation includes continuous animation, refer to the "clock" icon 101 shown in Figure 2; the "spinning record" component 102 and the "background music 1" component 103 shown in Figure 3; the "live broadcast" component 105 shown in Figure 4; the "selection" component 106 being played shown in Figure 5; the "search" component 109 shown in Figure 6; the "pig" component 110 shown in Figure 7; the "live broadcast" component 112 shown in Figure 9; the scan bar 113, the "open" component 114, the gradient shadow 115 shown in Figure 10, etc.

[0159] The first type of animation also includes a continuous-pause animation, that is, the animation is displayed in the current display interface for a period of time and then stops displaying.

[0160] The present application provides a method for displaying a dynamic interface by reducing the frame rate of the first type of animation mentioned above, thereby reducing power consumption when displaying a display interface including the first type of animation. Taking the execution subject as an electronic device, which can be a terminal, as an example, the method for displaying a dynamic interface provided in this embodiment includes:

[0161] S201: In response to a first operation by a user, the electronic device displays a target interface at an initial frame rate.

[0162] The target interface includes animation elements, and the animation elements include at least one first-category animation. The first-category animation is an animation that the user does not pay much attention to, or the user will not pay attention to, or will not affect the user's functional operations in the user interface.

[0163] Among them, the user's first operation can be an application opening operation. If the first operation is an application opening operation, the target interface is the home page after opening the application, and the home page of the application includes the first type of animation. The user's first operation can also be an unlocking operation. If the first operation is an unlocking operation, the target interface can be the desktop of the electronic device, and the desktop includes the first type of animation. The user's first operation can also be an application-based operation. For example, if the application is a map application, the first operation can be an opening navigation operation, and the target interface is a navigation map interface, and the navigation map interface includes the first type of animation such as a reminder component; for example, if the application is a video application, the first operation can be a video playback operation, and the target interface is a video playback interface, and the video playback interface includes the first type of animation such as a playback widget; for example, if the application is a communication or payment application, the first operation can be an opening code scanning operation, and the target interface is a code scanning interface, and the code scanning interface includes the first type of animation such as a scan bar; for example, if the application is an e-commerce application, the first operation can be a search operation, and the target interface is a search interface, and the search interface includes the first type of animation such as a store live broadcast widget, etc.

[0164] S202: The electronic device obtains a first type of animation in a target interface, and displays the first type of animation at a target frame rate.

[0165] The target frame rate is lower than the initial frame rate. For example, if the initial frame rate is 60 Hz, the target frame rate can be 30 Hz. That is, when displaying the target interface at the initial frame rate, the electronic device refreshes and displays each image frame of the target interface every 16.67 ms; when displaying the first type of animation at the target frame rate, the electronic device refreshes and displays the first type of animation every 33.33 ms.

[0166] Optionally, if the target interface includes multiple animation elements, the multiple animation elements include a first type of animation and a second type of animation. After the electronic device obtains the first type of animation in the target interface, the electronic device displays the first type of animation at the target frame rate and displays the second type of animation at the initial frame rate.

[0167] In this embodiment, the electronic device only needs to reduce the drawing operations of the first type of animation to reduce the power consumption of the electronic device when drawing the target interface. Therefore, after obtaining the first type of animation, the electronic device displays the first type of animation at a target frame rate lower than the initial frame rate, while still displaying the second type of animation at the initial frame rate to ensure the smoothness of the target interface.

[0168] In some embodiments, the electronic device can also reduce the frame rate by reducing the drawing operations on the first type of animation. For example, when the initial frame rate is 60Hz, the electronic device refreshes each image frame of the target interface every 16.67ms. After the electronic device obtains the first type of animation, it draws the image frame of the first type of animation in the i-th drawing cycle, and then discards the image frame of the first type of animation in the i+n-th cycle. That is, the i+n-th image frame is not drawn in the i+n-th drawing cycle; the i+n+1-th image frame is drawn in the i+n+1-th drawing cycle, and so on. This achieves the effect of reducing the frame rate of the first type of animation, thereby achieving the purpose of having the target frame rate of the first type of animation be less than the initial frame rate.

[0169] In some embodiments, the electronic device may determine the target frame rate or determine to discard image frames i+n of the first-category animation based on information such as the type of the first-category animation, the size of the first-category animation, and the application to which the first-category animation belongs. That is, the percentage by which the electronic device reduces the initial frame rate may be determined based on information such as the type of the first-category animation, the size of the first-category animation, and the application to which the first-category animation belongs. For example, the percentage by which the initial frame rate is reduced may be 50%, 70%, 80%, and so on.

[0170] For example, the first type of animation is the "spinning record" component in a short video app. Since the "spinning record" component is relatively small and has no impact on the user's browsing operations while the user is browsing short videos, the target frame rate of the first type of animation can be adjusted to 70% of the initial frame rate. For example, the first type of animation is the "clock" icon on the desktop. Since the "clock" icon is relatively small and has no impact on the user's browsing operations while the user is using the electronic device desktop, the target frame rate of the first type of animation can be adjusted to 50% of the initial frame rate.

[0171] For example, referring to Figure 11, Figure 11 (a) shows the effect of displaying the "clock" icon at the initial frame rate (before adjusting the frame rate), with the "clock" icon updating every 1 second to display the changes in the second hand, minute hand, and hour hand; Figure 11 (b) shows the effect of displaying the "clock" icon at the target frame rate (after adjusting the frame rate), with the "clock" icon updating every 2 seconds to display the changes in the second hand, minute hand, and hour hand. This reduces the refresh frequency of the "clock" icon, reduces 50% of the operations in the drawing and display process of the "clock" icon, and reduces the power consumption of the electronic device displaying the "clock" icon.

[0172] For example, the first type of animation is the "Selection" component currently playing in a video app. Since the "Selection" component is small in size and does not affect the user's viewing operation during the video, the target frame rate of this first type of animation can be adjusted to 50% of the initial frame rate. The initial frame rate of the "Selection" component is updated every 16.67ms. After the frame rate adjustment, the "Selection" component is refreshed and displayed at the target frame rate, and the "Selection" component is updated every 33.33ms.

[0173] Optionally, the electronic device can obtain the first type of animation in the target interface by performing animation recognition on the target interface to distinguish animation elements from non-animation elements, and then further extract animation features for the animation elements to obtain animation classification including the first type of animation and the second type of animation.

[0174] In conjunction with the architecture of an electronic device, a method for displaying a dynamic interface provided by this embodiment is described. Referring to FIG12 , FIG12 shows a schematic diagram based on the architecture of an electronic device.

[0175] exist In an electronic device of a system architecture, taking the display interface of an APP as an example, the conventional drawing, rendering and display process of the target interface includes: the APP in the application layer responds to the user's first operation, sends a drawing command to the application framework layer, and the application framework layer calls the drawing thread according to the initial frame rate to draw all elements included in the target interface, sends a drawing command to the GPU, and sends the drawing area to the GPU for rendering and synthesis for display.

[0176] The process of determining the drawing area can be seen in Figure 13. Each screen display interface of an electronic device has a corresponding draw tree. The draw tree includes multiple nodes RenderNode, each node representing an element in the display interface. The process of determining the drawing area of ​​each RenderNode (element) includes:

[0177] The electronic device traverses all RenderNode nodes in the draw tree corresponding to the target interface. For each RenderNode, if there is a damage area, the damage area is accumulated to the parent node of the current RenderNode; if the current RenderNode is the parent node, the damage area to be accumulated is merged with the accumulated damage area to obtain the damage area of ​​the parent node.

[0178] Specifically, when obtaining the damage area of ​​each RenderNode, if the RenderNode does not have a transformation matrix, then the damage area of ​​the RenderNode is directly determined to be obtained. For example, the damage area of ​​RenderNode1 is a circular area, and there is no transformation matrix for the circular area when it is rotated, then the damage area of ​​RenderNode1 is a circular area. If the RenderNode has a transformation matrix, then the damage area of ​​the RenderNode is calculated and obtained according to the bounds of the minimum circumscribed circle of the damage area. For example, if the RenderNode has a transformation matrix, then the area where the minimum circumscribed circle of the damage area is located is obtained as the damage area; or, if the RenderNode has a transformation matrix, then the area where the minimum circumscribed matrix of the damage area is located is obtained as the damage area. Exemplarily, the damage area of ​​RenderNode2 is a rectangular area, and there is a transformation matrix for the rectangular area when it is rotated, then the damage area of ​​RenderNode2 is the area where the minimum circumscribed circle of the rectangular area is located.

[0179] The electronic device traverses all RenderNode nodes in the entire draw tree of the target interface, obtains the damage area of ​​the root node of the draw tree of the target interface, and uses it as the rendering area of ​​the GPU.

[0180] The display method of the dynamic interface provided in this embodiment is based on the above-mentioned process of determining the drawing area of ​​each element in the target interface. Referring to Figure 12, a processing module is deployed in the native framework layer to perform animation recognition, animation feature extraction and animation classification on the target interface sent by the application framework layer to obtain the first type of animation in the target interface, and adjust the frame rate of the first type of animation accordingly, and send the adjusted elements of the target interface to the GPU for synthetic display.

[0181] Specifically, when executing animation recognition, animation feature extraction, and animation classification, the processing module may execute the operations of animation recognition, animation feature extraction, and animation classification based on each node in the draw tree of the target interface.

[0182] In some embodiments, the processing module of the electronic device obtains the first type of animation of the target interface based on the draw tree corresponding to the target interface, including:

[0183] Referring to FIG. 14 , the electronic device traverses all RenderNode nodes in the draw tree corresponding to the target interface.

[0184] Optionally, the processing module of the electronic device may traverse all RenderNode nodes in the draw tree corresponding to the target interface using a depth-based recursive algorithm, a breadth-based recursive algorithm, or other methods. Each node has a first identifier, which can be used to indicate whether the transformation matrix of a non-leaf node has changed; alternatively, the first identifier can indicate whether the non-leaf node has a transformation matrix.

[0185] The processing module can identify the animation of the elements represented by the node based on the first identifier of the RenderNode, distinguishing animated elements from non-animated elements in the target interface. If the first identifier is a first value, the non-leaf node is animated; if the first identifier is a second value, the non-leaf node is determined to be a non-animated element. In this embodiment, the processing module focuses on RenderNodes of the animation type and further identifies the elements represented by these RenderNodes of the animation type.

[0186] The processing module further identifies the element represented by the RenderNode and, based on its drawing frequency, determines whether the element represented by the RenderNode is a continuous animation or a short animation. Furthermore, the processing module further extracts animation features from the element represented by the RenderNode to identify the type of continuous animation represented by the element represented by the RenderNode.

[0187] For example, for a leaf node in a draw tree, the processing module of the electronic device can determine whether the leaf node has been drawn based on the damage area of ​​the leaf node. After statistics are collected over a preset time period, the drawing frequency of the damage area of ​​the leaf node can be obtained. Each frame of the target interface corresponds to a draw tree. After traversing each draw tree, the processing module of the electronic device records the drawing results of the damage area of ​​the target node of the animation type. After statistical operations are performed over a preset time period, the drawing time series of each node RenderNode is obtained.

[0188] Optionally, the electronic device needs to determine the animation type of the target interface element based on the drawing time sequence of the elements in multiple frames of the target interface. Therefore, this embodiment requires an identification operation within a preset time period to obtain the drawing time sequence of each RenderNode. Because the response event of some triggered short animations is approximately 500ms, to better obtain the drawing time sequence of such animations, the preset time period can be, for example, 400ms-800ms.

[0189] After the recognition statistics of the preset time period, the processing module of the electronic device can obtain the rendering time sequence of each RenderNode in the N-frame target interface.

[0190] For example, if the drawing time sequence of RenderNode1 is {1,0,0,0,0,0,0,0,0,0,0,0,0,0}, it means that after drawing the image frame of RenderNode1 in the first drawing cycle, no further drawing operations are performed. In this case, the element corresponding to RenderNode1 is considered a non-animated element. For example, if the drawing time sequence of RenderNode2 is {1,0,0,1,0,0,1,0,0,1,0,0,1,0,0}, it means that RenderNode2 draws an image frame every two drawing cycles. The drawing operations have a certain frequency and are continuous. In this case, the element corresponding to RenderNode2 is considered an animated element.

[0191] After statistical operations in a preset time period, the drawing time series of each animation node RenderNode in the draw tree of the target interface of each frame is obtained.

[0192] Furthermore, the processing module can cyclically obtain the drawing time series of each animation-type node RenderNode in the draw tree of the target interface for N frames based on statistics of a preset time period. The processing module further extracts animation features based on the drawing time series of each animation-type node RenderNode to obtain the animation type of each animation.

[0193] In this embodiment, the processing module can extract animation features based on the drawing time sequence of each RenderNode, and determine whether the animation corresponding to the RenderNode is a short animation or a continuous animation. For example, the drawing time sequence of RenderNode3 is {1,1,0,0,0,0,0,0,0,0,0,0,0,0}, which means that after two drawing cycles of drawing display, no drawing operation is performed, that is, the animation corresponding to RenderNode3 is only displayed for two cycles. The animation type with the cumulative number of drawing marks 1 less than the threshold N is a short animation. Here, the threshold N can be determined according to the actual situation. For example, N can be a natural number greater than 0, such as 1, 2, 3, 4, 5, etc. Exemplarily, short animations can include transition animations, transition animations, and operation animations.

[0194] Accordingly, animation types where the cumulative number of draw marks marked as 1 is greater than or equal to the threshold N are called continuous animations. For example, when N is 5, the drawing time sequence of RenderNode4 is {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0}, and the cumulative number of 1s is 8, which is greater than 5. RenderNode4 is determined to be a continuous animation that displays 8 cycles. For example, when N is 5, the drawing time sequence of RenderNode4 is {1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0}, and the cumulative number of 1s is 6, which is greater than 5. RenderNode4 is determined to be a continuous animation that displays 6 drawing cycles.

[0195] Alternatively, the processing module can determine whether the element corresponding to the RenderNode is animated or non-animated based on the ratio of the drawing period to the statistical period in the drawing time series. For example, if the ratio of the drawing period to the statistical period is greater than 40%, it is considered animated; otherwise, it is non-animated. The value of a drawing period in the drawing time series is 1, and the value of a non-drawing period in the drawing time series is 0. Alternatively, if the number of consecutive non-drawing periods in the drawing time series is greater than a threshold M, it can also be considered non-animated; otherwise, it is animated. M can be a natural number greater than 0, such as 6, 7, or 8.

[0196] Because short animations are short-lived, and some are responses to user operations, they draw high user attention and do not reduce drawing operations. This embodiment does not focus on these types of animations. Reducing the frame rate of short animations does not significantly reduce power consumption, so the dynamic interface display method provided in this embodiment focuses on reducing the frame rate of continuous animations.

[0197] In this embodiment, the processing module may further determine the secondary animation type of the continuous animation based on the drawing frequency in the drawing time sequence of the continuous animation. For example, the continuous animation may include a continuous drawing animation, a continuous-pause animation, and a continuous-stop animation. Among them, the continuous drawing animation can be understood as an animation that is drawn continuously. The continuous-pause animation can be understood as an animation that draws for a period of time, pauses without drawing for a period of time, and then draws for a period of time (continuous-pause animation). The continuous-stop animation can be understood as an animation that stops drawing after a period of time. The continuous drawing animation, the continuous-pause animation, and the continuous-stop animation can be distinguished according to the drawing time sequence.

[0198] Exemplarily, after the processing module statistically identifies the animation type of 12 frames of the target interface, the drawing time sequence of RenderNode5 in the draw tree of the target interface can be {1, 0, 0, 1, 0, 0, 1, 0, 0}. Among them, 1 means that the damage area of ​​RenderNode1 is drawn, and 0 means that the damage area of ​​RenderNode1 is not drawn. That is, the animation corresponding to RenderNode5 draws the first frame image in the first drawing cycle, does not draw the second frame image in the second drawing cycle, and does not draw the third frame image in the third drawing cycle. That is, the drawing frequency of RenderNode5 is to draw and display every two cycles. This type of animation can be called a continuous-pause animation.

[0199] Exemplarily, after the processing module statistically identifies the animation type of the target interface of 12 frames, the drawing time sequence of RenderNode6 in the draw tree of the target interface can be {1,1,1,1,1,1,0,0,0,0,0,0}. Among them, 1 means that the damage area of ​​RenderNode6 is drawn, and 0 means that the damage area of ​​RenderNode6 is not drawn. That is, the animation corresponding to RenderNode6 draws images from the first drawing cycle to the sixth drawing cycle, and does not draw images from the seventh drawing cycle to the subsequent drawing cycles. That is, after 6 drawing cycles of drawing and display, RenderNode6 does not perform drawing operations. This type of animation can be called a continuous-stop animation.

[0200] For example, after the processing module statistically identifies the animation type of 12 frames of the target interface, the resulting drawing time sequence for RenderNode7 in the target interface's draw tree can be {1,1,1,1,1,1,1,1,1,1,1}. 1 indicates that the damaged area of ​​RenderNode7 was drawn, and 0 indicates that the damaged area of ​​RenderNode7 was not drawn. In other words, the animation corresponding to RenderNode7 draws images during all drawing cycles. This type of animation is called a continuous drawing animation.

[0201] After the processing module identifies the secondary animation type of the continuous animation, it can obtain information such as the size, drawing frequency, and stopping frequency of each continuous animation to determine the first type of animation in the continuous animation, that is, to determine the non-sensitive animation in the continuous animation that is not of interest to the user.

[0202] Specifically, the process of identifying the first type of animation includes several cases: If the target interface includes multiple continuous animations, continuous animations with a size smaller than the first threshold range {w1, h1} are identified as first type animations. If the target interface includes one continuous animation, continuous animations with a size smaller than the second threshold range {w2, h2} are identified as first type animations. The first threshold range is smaller than the second threshold range.

[0203] When the target interface includes multiple continuous animations, in order to avoid classifying the animation that the user is interested in as the first type of animation, the first threshold range can be set to be smaller. When the target interface includes one continuous animation, the second threshold range can be set to be larger than the first threshold range.

[0204] In this embodiment, the first type of animation is determined from the continuous animation based on the size of the animation, which can reduce the error of classifying large animations that users pay attention to as the first type of animation and prevent the electronic device from misidentifying the first type of animation.

[0205] After the electronic device obtains the first type of animation, it can determine a frame dropping strategy for each first type of animation. The frame dropping strategy is also a strategy for reducing the frame rate of the first type of animation.

[0206] If the target interface includes a first-category animation, a corresponding frame-dropping strategy is determined based on information such as the type and size of the first-category animation. For example, the frame-dropping strategy may include discarding two frames after each frame is drawn. Alternatively, the frame-dropping strategy may include discarding one frame after each frame is drawn.

[0207] In another scenario, the target interface may include multiple first-category animations. After determining the frame-dropping strategy for each first-category animation, the frame-dropping strategies for each first-category animation may differ. For example, consider RenderNode8 and RenderNode9, both of which are first-category animations. RenderNode8's frame-dropping strategy is to discard one frame after drawing each one, while RenderNode9's frame-dropping strategy is to discard two frames after drawing each one.

[0208] In this case, the processing module can coordinate the entire frame of multiple first-category animations so that the multiple first-category animations are not drawn at the same time as much as possible. For example, the entire frame coordination can be that the processing module determines the largest target animation from the multiple first-category animations, and uses the frame dropping strategy of the target animation as a benchmark to coordinate the frame dropping strategies of the other first-category animations. That is, the frame dropping strategy of the target animation is applied to the other first-category animations to achieve synchronous drawing or non-drawing of all first-category animations.

[0209] Optionally, when the processing module determines the frame drop strategy for the first type of animation, the frame drop strategy can also be determined based on the preset configuration management. The configuration management presets the mapping relationship between each application and the elements in the display interface of each application, and classifies the applications according to the type of application. For example, the first type of application can be an application with low requirements for the smoothness of the display interface. When processing the first type of animation of the display interface of the first type of application, the proportion of the frame drop cycle in its frame drop strategy to the total cycle can be greater than the proportion of the drawing cycle to the total cycle. For example, the frame drop strategy can be to discard two image frames after each image frame is drawn. The second type of application can be an application with high requirements for the smoothness of the display interface. When processing the first type of animation of the display interface of the second type of application, the proportion of the frame drop cycle in its frame drop strategy to the total cycle can be less than the proportion of the drawing cycle to the total cycle. For example, the frame drop strategy can be to discard one image frame after each two image frames are drawn.

[0210] Optionally, the configuration management can also preset the elements and The mapping relationship between activities in the architecture. For the first type of animation in the first type of activity, the frame-dropping strategy can set the ratio of the frame-dropping period to the total period to be greater than the ratio of the drawing period to the total period; for the first type of animation in the second type of activity, the frame-dropping strategy can set the ratio of the frame-dropping period to the total period to be less than the ratio of the drawing period to the total period. And so on.

[0211] In this embodiment, the frame dropping strategy for the first type of animation, or the extent of reducing the frame rate of the first type of animation, can be determined according to the type, size, application, and activity of the first type of animation.

[0212] Among them, in combination with the animation drawing process of the electronic device given in Figure 12, for example, in the non-drawing cycle of the first type of animation, the processing module can discard (delete) the RenderNode of the first type of animation in the target interface from the drawtree. In this way, the drawtree sent to the GPU in the current cycle does not include the RenderNode of the first type of animation, that is, the effect of the GPU not drawing the first type of animation in the current cycle is achieved.

[0213] Alternatively, in the non-drawing cycle of the first type of animation, the processing module can add an identifier to the RenderNode of the first type of animation in the target interface to indicate that it is not drawing in the current cycle, and send the draw tree of the target interface marked with the identifier to the GPU. When the GPU obtains a RenderNode with the identifier to indicate that it is not drawing in the current cycle, it does not perform the drawing and rendering operation of the first type of animation corresponding to the RenderNode, that is, it achieves the effect of the GPU not drawing the first type of animation in the current cycle.

[0214] For example, let's take a frame rate of 60Hz and a frame drop strategy of discarding two image frames after drawing each image frame. For example, the first type of animation is the "spinning record" component in a short video app. Originally, it updated and displayed an image frame every 16.67ms. After the "spinning record" component is drawn or not drawn based on the frame drop strategy, the "spinning record" component updates and displays an image frame every 50.01ms. This reduces the refresh frequency of the "spinning record" component, reduces the drawing operations during the drawing and display process of the "spinning record" component, and reduces the power consumption of the electronic device displaying the "spinning record" component.

[0215] For example, the frame drop strategy discards three frames after each frame is drawn. The first type of animation is the "clock" icon on the desktop. Originally, it updated and displayed one frame every 16.67ms. After the "clock" icon was drawn or not drawn based on the frame drop strategy, it updated and displayed one frame every 66.68ms. This reduces the refresh rate of the "clock" icon, reduces the drawing operations during the drawing and display process of the "clock" icon, and reduces the power consumption of the electronic device displaying the "clock" icon.

[0216] For example, the frame-dropping strategy discards five frames after each frame is drawn. The first type of animation is the "Selection" component currently playing in a video app. Originally, it updated and displayed one frame every 16.67ms. After the "Clock" icon was drawn or not drawn based on the frame-dropping strategy, the "Clock" icon updated and displayed one frame every 100.02ms. This reduces the refresh rate of the "Selection" component currently playing, reduces the drawing operations during the drawing and display process of the "Selection" component currently playing, and reduces the power consumption of the electronic device displaying the "Selection" component currently playing.

[0217] The method for displaying dynamic images provided in an embodiment of the present application obtains the first type of animation of the display interface by identifying animation elements in the display interface, thereby determining the frame loss strategy of the first type of animation, reducing the drawing frequency of the first type of animation according to the frame loss strategy, and reducing unnecessary animation drawing of the first type of animation by the electronic device. The drawing of other parts of the screen is not affected during the reduction process, thereby achieving the goal of reducing the power consumption of the electronic device in drawing the display interface while ensuring the interface smoothness of the display interface.

[0218] FIG15 shows a possible structural diagram of an electronic device involved in the above embodiments. The electronic device 1000 shown in FIG15 includes a processor 1001 , a display screen 1002 , and a storage module 1003 .

[0219] Among them, the processor 1001 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. The processor may include an application processor and a baseband processor. It can implement or execute the various exemplary logic blocks, modules and circuits described in conjunction with the contents disclosed in this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The storage module 1003 may be a memory.

[0220] For example, the processor 1001 may be the processor 310 shown in FIG1 ; the display screen 1002 may be the display screen 394 shown in FIG1 ; and the storage module 1003 may be the internal memory 321 shown in FIG1 . The electronic device provided in the embodiment of the present application may be the electronic device 100 shown in FIG1 .

[0221] An embodiment of the present application also provides a chip system (e.g., a system on a chip (SoC)). As shown in Figure 16, the chip system includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 can be interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (e.g., a memory of an electronic device). For another example, the interface circuit 702 can be used to send signals to other devices (e.g., a processor 701 or a camera of an electronic device). Exemplarily, the interface circuit 702 can read an instruction stored in a memory and send the instruction to the processor 701. When the instruction is executed by the processor 701, the electronic device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete components, which is not specifically limited in the embodiment of the present application.

[0222] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the electronic device 100 in the above-mentioned method embodiment.

[0223] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the electronic device 100 in the above method embodiment. For example, the computer may be the above electronic device 100.

[0224] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0225] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0226] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0228] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0229] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for displaying a dynamic interface, It is characterized in that The method comprises: The electronic device displays elements in a target interface at an initial frame rate; the elements in the target interface include a first type of animation, which is an animation that is unrelated to a user's operation on the target interface; The electronic device obtains at least one first type of animation in the target interface, displays the first type of animation at a target frame rate, and displays elements in the target interface except the first type of animation at the initial frame rate; the target frame rate is lower than the initial frame rate.

2. The method according to claim 1, It is characterized in that The target interface includes a plurality of first-category animations; the plurality of first-category animations have different sizes; The electronic device refreshes and displays the multiple first-category animations at a target frame rate of the first-category animation with a maximum size.

3. The method according to claim 1 or 2, It is characterized in that The electronic device acquires at least one first-category animation in the target interface, including: The electronic device acquires a plurality of elements in the target interface; the plurality of elements include animation elements and non-animation elements; the animation elements include a first type of animation; The electronic device identifies the animation element of the target interface according to the first identifier of each element; the first identifier is used to indicate whether the element has a conversion matrix; the first identifier of the animation element is a first value, and the first identifier of the non-animation element is a second value; The electronic device obtains at least one of the first-type animations from the animation elements according to the drawing frequency of the animation elements of the target interface.

4. The method according to claim 3, It is characterized in that The electronic device acquires at least one first-category animation from the animation elements according to the drawing frequency of the animation elements of the target interface, including: The electronic device acquires the continuous animation in the animation element according to the drawing frequency of the target interface; the drawing frequency of the continuous animation is greater than a preset threshold; The electronic device obtains at least one of the first-type animations from the continuous animations in the animation elements.

5. The method according to claim 4, It is characterized in that Before the electronic device acquires the continuous animation according to the drawing frequency of the target interface, the method further includes: The electronic device obtains a drawing time sequence of animation elements in an N-frame target interface within a preset time period; the drawing time sequence includes a drawing identification value of each animation element in the N-frame target interface, wherein when the drawing identification value is a first value, it indicates that the animation element in the current frame is drawn, and when the identification value is a second value, it indicates that the animation element in the current frame is not drawn; The electronic device obtains the drawing frequency of the animation element according to the drawing time sequence of the animation element.

6. The method according to claim 5, It is characterized in that The electronic device obtains a drawing time sequence of animation elements in a target interface of N frames within a preset time period, including: Within the preset time period, the electronic device traverses the drawing tree draw tree of each frame target interface; A drawing time sequence of the animation element is generated according to whether the drawing area damage area of ​​each node of the drawing tree of the target interface of each frame is drawn; each node in the drawing tree corresponds to each element in the target interface.

7. The method according to claim 4, It is characterized in that The electronic device obtains at least one first-category animation from the continuous animation in the animation element, including: If the target interface includes both the continuous animation and the short animation, the size is smaller than the first threshold range. The continuous animation is determined as the first type of animation; the short animation is a type of animation element, and the drawing frequency of the short animation is less than the preset threshold; If the target interface includes the continuous animation, the continuous animation whose size is smaller than a second threshold range is determined as the first type of animation; and the second threshold range is larger than the first threshold range.

8. The method according to claim 4, It is characterized in that The method further comprises: The continuous animation is classified according to the drawing frequency and the stop frequency of the continuous animation to obtain a classification result of the continuous animation; the classification result includes at least one of a continuous drawing animation, a continuous pause animation and a continuous stop animation, the continuous drawing animation is an animation that is always in a drawing cycle, the continuous pause animation is an animation in which a drawing cycle and a non-drawing cycle appear in a regular alternation, and the continuous stop animation is an animation that is consistently in a non-drawing cycle after a period of drawing cycle.

9. The method according to any one of claims 1 to 8, It is characterized in that The electronic device displays the first type of animation at a target frame rate, including: The electronic device determines the target frame rate according to the attribute information of the first type of animation; the attribute information includes at least one of a drawing frequency, a stop frequency, a size, and a classification result; The electronic device displays the first type of animation at the target frame rate.

10. The method according to claim 9, It is characterized in that The electronic device determines the target frame rate according to the attribute information of the first type of animation, including: If the target interface includes a first-category animation, determining the target frame rate according to the drawing frequency, stop frequency, size, and classification result of the first-category animation; If the target interface includes multiple first-category animations, the target frame rate is determined according to the drawing frequency, stop frequency, size, and classification result of the largest first-category animation among the multiple first-category animations.

11. The method according to any one of claims 1 to 10, It is characterized in that The target frame rate corresponds to the frame loss strategy, and the electronic device displays the first type of animation at the target frame rate, including: The electronic device determines a frame dropping strategy for the first type of animation according to attribute information of the first type of animation; the attribute information includes at least one of a drawing frequency, a stop frequency, a size, a classification result, and a corresponding application; the frame dropping strategy is used to indicate a drawing period and a non-drawing period for the first type of animation; The electronic device refreshes and displays the first type of animation based on the drawing period and the non-drawing period of the first type of animation.

12. The method according to any one of claims 1 to 11, It is characterized in that The electronic device determines, according to the attribute information of the first type of animation, a frame dropping strategy of the first type of animation, including: If the application to which the first type of animation belongs is a first type of application, determining a first frame dropping strategy for the first type of animation; in the first frame dropping strategy, a ratio of frame dropping cycles to total cycles is greater than a ratio of drawing cycles to total cycles; and the first type of application is a preset application with low requirements for animation fluency; If the application to which the first type of animation belongs is a second type of application, determine a second frame loss strategy for the first type of animation; in the second frame loss strategy, the proportion of frame loss cycles to the total cycle is smaller than the proportion of drawing cycles to the total cycle; the first type of application is a preset application with high requirements for animation smoothness.

13. An electronic device, It is characterized in that The electronic device includes a display screen, a memory and one or more processors; the display screen and the memory are coupled to the processor; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-12.

14. A computer-readable storage medium, It is characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and device for controlling mobile terminal and mobile terminal

    CN106919402A

  • Display method of playing interface and electronic equipment

    CN114489879A

  • Animation playing method and device, storage medium and electronic equipment

    CN115965718A

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

    CN116048238A

  • Method for displaying multiple windows and electronic device

    WO2022017205A1