Dynamic interface display method and electronic equipment

By identifying and reducing the frame rate of animation elements that users do not pay attention to, and displaying other elements in combination with the initial frame rate, the problem of high power consumption when displaying multi-animation elements interfaces is solved, and the power consumption reduction and interface fluency are achieved.

CN118921423AActive Publication Date: 2024-11-08HONOR DEVICE CO LTD

Patent Information

Application Number
CN202310508046.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

When the terminal displays the user interface, especially an interface containing multiple animation elements, the power consumption is high, because it is necessary to frequently draw, render and display animation elements according to the device's default frame rate, resulting in increased battery consumption and heat generation.

Method used

By identifying the first type of animation that users do not pay attention to, reducing their frame rate, reducing the animation drawing frequency, and using the initial frame rate to display other elements in the target interface, realizing the display method of dynamic interface, reducing the power consumption of electronic devices, and ensuring the interface Fluency.

Benefits of technology

It effectively reduces the power consumption of electronic devices when displaying dynamic interfaces, reduces unnecessary animation drawing operations, maintains the smoothness of the interface and user experience, and improves the battery life of the terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921423A_ABST
    Figure CN118921423A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic interface display method and electronic equipment, and relates to the technical field of terminals, and the method comprises the following steps: the electronic equipment displays elements of 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 the first-class animation at the target frame rate; and displaying elements except the first type of animation in the target interface at the initial frame rate. Wherein the target interface comprises a first type of animations, and the first type of animations are animations irrelevant to the operation of the user on the target interface. The target frame rate is lower than the initial frame rate. According to the method, the frame rate of the first type of animation which is not concerned by the user in the dynamic interface is reduced, so that the frequency of drawing, rendering and displaying the first type of animation in the dynamic interface by the electronic equipment is reduced, and the power consumption of displaying the dynamic interface by the electronic equipment is reduced while functional operation of the user based on the dynamic interface is not influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of terminal technology, the components of the user interface (UI) of the terminal are becoming more and more abundant, and the terminal can provide users with more intuitive information through various elements of the user interface. For example, the desktop of the terminal may include animation elements and non-animation elements, such as animation elements including dynamic icons, animation components, animation backgrounds, etc., and non-animation elements may include static icons, static components, static backgrounds, etc. For another example, the animation elements in the display interface of some applications (APP) may include videos, animation components, dynamic backgrounds, etc., and non-animation elements may include pictures, text, static backgrounds, etc.

[0003] When the terminal displays the user interface, it needs to perform drawing operations on the non-animation elements and animation elements included in the user interface. When the user interface includes animation elements, the terminal needs to draw, render, and display each image frame of the animation elements according to the device default frame rate to achieve the display effect of refreshing and playing the animation elements based on the device default frame rate.

[0004] 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 default frame rate, resulting in relatively high power consumption of the terminal when displaying the user interface. Summary of the invention

[0005] The embodiment of the present application provides a method for displaying a dynamic interface and an electronic device, which reduces the frame rate of the first type of animation that the user does not pay attention to in the dynamic interface, thereby reducing the frequency of the drawing, rendering and display operations of the electronic device on the first type of animation in the dynamic interface, and reducing the power consumption of the electronic device displaying the dynamic interface without affecting the user's functional operations based on the dynamic interface. To achieve the above purpose, the embodiment of the present application adopts the following technical solution.

[0006] 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 except the first-class animation at the initial frame rate.

[0007] The target interface elements include first-class animations, which are animations that are irrelevant to the user's operation 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.

[0008] Among them, animation elements that are not of high concern to users, or that users will not pay attention to, or that will not affect users' functional operations in the user interface, can be called first-category animations. The first-category 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-category animation often occupies a smaller area of ​​the user interface, and the first-category animation can also be called a small animation. The position of the first-category 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-category animation, which is different from the first-category animation, is an animation element in the user interface other than the first-category animation. The second-category 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-category animation.

[0009] In the present application, the first type of animation of the display interface is obtained by identifying the animation elements in the display interface, thereby determining the frame drop strategy of the first type of animation, and reducing the drawing frequency of the first type of animation according to the frame drop strategy, thereby 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 reducing the power consumption of the electronic device in drawing the display interface while ensuring the smoothness of the display interface.

[0010] In a possible implementation of the first aspect, the target interface includes multiple first-category animations, and the multiple 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 the largest size.

[0011] In the present application, the electronic device can coordinate multiple first-category animations in the whole frame, so that multiple first-category animations can be drawn at the same time as much as possible. Exemplarily, the whole frame coordination can be to determine the target animation with the largest size from multiple first-category animations, and use the frame loss strategy of the target animation as a benchmark to coordinate the frame loss strategies of other first-category animations, that is, apply the frame loss strategy of the target animation to other first-category animations, refresh and display multiple first-category animations at the target frame rate of the first-category animation with the largest size, and achieve synchronous drawing or non-drawing of all first-category animations, thereby further reducing the power consumption of the electronic device displaying the target interface.

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

[0013] The electronic device obtains multiple elements in a target interface, wherein the multiple elements include animation elements and non-animation elements. The electronic device obtains the animation elements of the target interface according to the first identifier of each element, wherein the first identifier is used to characterize whether the element has a transformation matrix. Exemplarily, 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 first-category animation from the animation elements according to the drawing frequency of the animation elements of the target interface.

[0014] In the present application, the electronic device performs animation recognition of elements according to the first identifiers of all elements in the target interface, and distinguishes the animation elements from the non-animation elements in the target interface.

[0015] When the first identifier is the first value, it means 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 animation element. When the first identifier is the second value, it means 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-animation element.

[0016] 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.

[0017] In another possible implementation manner of the first aspect, the electronic device acquires at least one first-category animation from the animation element according to the drawing frequency of the animation element of the target interface, including:

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

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

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

[0021] In the present application, the electronic device can extract animation features according to 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 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. Exemplarily, short animations may include transition animations, transition animations, and operation animations. Animation types with a cumulative number of drawing marks 1 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, and 8 is greater than 5, so animation element 2 is determined to be a continuous animation that displays 8 cycles.

[0022] In this application, the electronic device distinguishes between continuous animation and short animation according to the drawing frequency of each animation element. Since short animation has a short duration and high user attention, it cannot reduce the drawing operation. Therefore, this embodiment does not pay attention to this type of animation. Therefore, the identified short animation can be filtered out and only the continuous animation can be paid attention to, so as to further extract animation features for the continuous animation and obtain the subsequent first type of animation.

[0023] In another possible implementation manner of the first aspect, before the electronic device extracts animation features of the animation elements according to the drawing frequency of the animation elements of the target interface and obtains the continuous animation in the animation elements, the method further includes:

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

[0025] 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 represents that the animation element in the current frame is drawn, and when the drawing identification value is the second value, it represents that the animation element in the current frame is not drawn.

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

[0027] In this application, the drawing time series includes drawing identification values ​​used to characterize whether an element is drawn or not drawn in each cycle. The electronic device can obtain the drawing frequency, stop frequency, etc. of each element according to the drawing time series of each element. This provides data support for the electronic device to extract animation features for continuous animation and further identify the animation type.

[0028] 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:

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

[0030] 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.

[0031] In the present 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 over 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.

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

[0033] If the target interface includes multiple animation elements, a continuous animation whose size is 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.

[0034] If the target interface includes only continuous animations, the continuous animations whose sizes are smaller than the second threshold range are determined as first-type animations; and the second threshold range is larger than the first threshold range.

[0035] In the present application, if the target interface includes multiple animation elements, that is, the target interface includes one or more first-class animations, a continuous animation whose size is smaller than the first threshold range {w1, h1} is determined as a first-class animation. If the target interface only includes continuous animations, a continuous animation whose size is smaller than the second threshold range {w2, h2} is determined as a first-class animation. The first threshold range is smaller than the second threshold range.

[0036] In the case where the target interface includes multiple animation elements, in order to avoid classifying the animation that the user is concerned about 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 larger than the first threshold range.

[0037] In the present application, 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 the animation with large size and user attention as the first type of animation.

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

[0039] The continuous animation is classified according to the drawing frequency and the stopping frequency of the continuous animation, and the classification result of the continuous animation is obtained.

[0040] 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 regularly alternately, and the continuous stop animation is an animation that is consistently in a non-drawing cycle after a period of drawing cycle.

[0041] In this application, the continuous animation is further identified in type, and a frame loss strategy or target frame rate that is more suitable for different types of continuous animation 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, and then the target frame rate for the drawing pause animation can be determined based on the drawing frequency and stop frequency of the drawing pause animation, and the drawing pause animation can be refreshed and displayed at a lower frame rate, thereby reducing the number of drawing operations and reducing the power consumption of the drawing target interface of the electronic device.

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

[0043] The electronic device determines a target frame rate 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, and a classification result; and the electronic device displays the first type of animation at the target frame rate.

[0044] In this application, the electronic device determines the target frame rate of the first type of animation according to the drawing frequency, stop frequency, size, and classification result of the first type of animation, that is, determines the degree of reduction of the first type of animation from the initial frame rate. The reduction ratio of the initial frame rate can be 50%, 70%, 80%, etc.

[0045] In the present application, the electronic device determines the target frame rate according to 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 slow refresh experience to the user.

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

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

[0048] 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.

[0049] 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 coordinates the frame dropping strategies of other first-category animations based on the frame dropping strategy of the target animation, that is, the frame dropping strategy of the target animation is applied to other first-category animations to achieve synchronous drawing or non-drawing of all first-category animations.

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

[0051] In another possible implementation manner 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:

[0052] The electronic device determines a frame dropping strategy for the first type of animation based on 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, a classification result, and a corresponding application; the frame dropping strategy is used to indicate a drawing cycle and a non-drawing cycle for the first type of animation.

[0053] 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.

[0054] In the present application, the electronic device determines the frame dropping strategy of the first type of animation according to the drawing frequency, stop frequency, size, classification result, application, etc. of the first type of animation, that is, determines the ratio of the drawing period to the frame dropping period of the first type of animation. For example, the frame dropping strategy may be to discard two image frames after drawing one image frame. For example, the frame dropping strategy may be to discard one image frame after drawing two image frames.

[0055] In the present application, the electronic device determines the target frame rate according to 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 slow refresh experience to the user.

[0056] In another possible implementation manner of the first aspect, the electronic device determines a frame dropping strategy for the first type of animation according to attribute information of the first type of animation, including:

[0057] 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 proportion of frame loss cycles to the total cycle is greater than the proportion of drawing cycles to the total cycle; 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, a second frame loss strategy for the first type of animation is determined; in the second frame loss strategy, the proportion of frame loss cycles to the total cycle is less than the proportion of drawing cycles to the total cycle; the first type of application is a preset application with high requirements for animation fluency.

[0058] 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 the type of application. 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 loss period in its frame loss strategy to the total period may be greater than the proportion of the drawing period to the total period. For example, the frame loss 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 loss period in its frame loss strategy to the total period may be less than the proportion of the drawing period to the total period. For example, the frame loss strategy may be to discard one image frame after each two image frames are drawn.

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

[0060] In the present application, a frame dropping strategy for the first type of animation is formulated based on the type of application or activity, so that the frame dropping strategy for the first type of animation 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.

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

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

[0063] In the present application, after the electronic device has statistically identified 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 without affecting 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.

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

[0065] According to a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on an electronic device, the electronic device can execute any one of the methods according to the first aspect.

[0066] According to 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 according to the first aspect.

[0067] 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.

[0068] 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

[0069] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0070] Figure 2 An example diagram of a mobile phone user interface in which the first type of animation is a dynamic icon provided in an embodiment of the present application;

[0071] Figure 3 An example diagram of a first type of animation in a user interface of a mobile phone provided in an embodiment of the present application, where the animation component is an animation component;

[0072] Figure 4 A schematic diagram of the home page of a search engine APP for a mobile phone provided in an embodiment of the present application;

[0073] Figure 5 A schematic diagram of a video playback interface of a video APP of a mobile phone provided in an embodiment of the present application;

[0074] Figure 6 A schematic diagram of the main interface of a video APP for a mobile phone provided in an embodiment of the present application;

[0075] Figure 7 A schematic diagram of an application setting interface of a mobile phone provided in an embodiment of the present application;

[0076] Figure 8 A schematic diagram of a navigation interface of a mobile phone map APP provided in an embodiment of the present application;

[0077] Fig. 9 A schematic diagram of a mobile phone search interface of an e-commerce mall APP for a mobile phone provided in an embodiment of the present application;

[0078] Fig.10 A schematic diagram of other first-category animations in a user interface of a mobile phone provided in an embodiment of the present application;

[0079] Fig.11 A schematic diagram showing the comparison of the frame rate of a "clock" icon of a mobile phone before and after adjustment provided in an embodiment of the present application;

[0080] Fig.12 A schematic diagram of an electronic device architecture provided in an embodiment of the present application;

[0081] Fig.13 A flowchart of an electronic device determining a drawing area of ​​each element in a display interface provided by an embodiment of the present application;

[0082] Fig.14 A flowchart of an electronic device obtaining a first type of animation in a display interface provided by an embodiment of the present application;

[0083] Fig.15 A structural diagram of an electronic device provided in an embodiment of the present application;

[0084] Fig.16 A chip system structure diagram provided for an embodiment of the present application. DETAILED DESCRIPTION

[0085] 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 to the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include such expressions 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: A exists alone, A and B exist at the same time, and B exists alone, where 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.

[0086] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear 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 other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0087] In the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

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

[0089] A 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 vehicle-mounted computers. The embodiment of the present application does not impose any restrictions on this.

[0090] Figure 1 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 screen 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.

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

[0092] 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 processor (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). Different processing units may be independent devices or integrated into one or more processors.

[0093] The controller can be a decision maker that directs the various components of the electronic device 100 to work in coordination according to the instructions. It is the nerve center and command center of the electronic device 100. The controller generates an operation control signal according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0094] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a high-speed cache memory, which can store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0095] 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, etc.

[0096] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDL) and a serial clock line (SCL). In some embodiments, the processor 310 may include multiple groups of I2C buses. The processor 310 may be coupled to the touch sensor 380K, the charger, the flash, the camera 393, etc. through different I2C bus interfaces. For example: the processor 310 may be coupled to the touch sensor 380K through the I2C interface, so that the processor 310 communicates with the touch sensor 380K through the I2C bus interface to realize the touch function of the electronic device 100.

[0097] The I2S interface can be used for audio communication. In some embodiments, the processor 310 can include multiple groups of I2S buses. The processor 310 can be coupled to the audio module 370 via the I2S bus to achieve communication between the processor 310 and the audio module 370. In some embodiments, the audio module 370 can transmit an audio signal to the communication module 360 ​​via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0098] 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 to realize 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.

[0099] The UART interface is a universal serial data bus for asynchronous communication. The bus is a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 310 and the communication module 360. For example, the processor 310 communicates with the Bluetooth module through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 370 can transmit an audio signal to the communication module 360 ​​through the UART interface to implement the function of playing music through a Bluetooth headset.

[0100] The MIPI interface can be used to connect the processor 310 with peripheral devices such as the display screen 394 and the camera 393. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 310 and the camera 393 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 310 and the display screen 394 communicate via the DSI interface to realize the display function of the electronic device 100.

[0101] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 310 with the camera 393, the display screen 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.

[0102] The USB interface 330 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 330 may be used to connect a charger to charge the electronic device 100, or may be used to transmit data between the electronic device 100 and a peripheral device. The USB interface 330 may also be used to connect headphones to play audio through the headphones. The USB interface 330 may also be used to connect other electronic devices, such as AR devices, etc.

[0103] The interface connection relationship between the modules shown in the embodiment of the present invention is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. The electronic device 100 may adopt different interface connection methods in the embodiment of the present invention, or a combination of multiple interface connection methods.

[0104] The charging management module 340 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 may receive charging input from a wired charger through the USB interface 330. In some wireless charging embodiments, the charging management module 340 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 340 is charging the battery 342, it may also power the electronic device 100 through the power management module 341.

[0105] 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 supplies power to the processor 310, the internal memory 321, the external memory interface 320, the display screen 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 number, battery health status (leakage, impedance), etc. In some embodiments, the power management module 341 can also be set in the processor 310. In some embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.

[0106] 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.

[0107] 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 the utilization of antennas. 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 combination with a tuning switch.

[0108] The RF module 350 can provide a communication processing module for wireless communication solutions including 2G / 3G / 4G / 5G, etc., 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 of the functional modules of the RF module 350 can be set in the processor 310. In some embodiments, at least some of the functional modules of the RF module 350 can be set in the same device as at least some of the modules of the processor 310.

[0109] 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 the low-frequency baseband signal is processed by the baseband processor, it 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 arranged in the same device as the RF module 350 or other functional modules.

[0110] 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 (IR), etc., which are applied to the electronic device 100. The communication module 360 ​​can be one or more devices integrating at least one communication processing module. The communication module 360 ​​receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 310. The communication module 360 ​​can also receive the signal to be sent from the processor 310, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0111] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the RF module 350, and the antenna 2 is coupled to the communication module 360, so that the electronic device 100 can communicate with the network and other devices through 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 satellite positioning 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).

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

[0113] The display screen 394 is used to display images, videos, etc. The 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 or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 394, where N is a positive integer greater than 1.

[0114] The electronic device 100 can realize the shooting function through ISP, camera 393, video codec, GPU, display screen and application processor.

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

[0116] 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 to be converted 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.

[0117] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0118] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0119] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0120] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0121] 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 may 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 may 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.

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

[0123] 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 signal. The audio module 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be arranged in the processor 310, or some functional modules of the audio module 370 can be arranged in the processor 310.

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

[0125] The receiver 370B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 370B close to the human ear.

[0126] Microphone 370C, also called "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 make a sound by putting his mouth close to microphone 370C to input the sound signal into 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 the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

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

[0128] The key 390 includes a power key, a volume key, etc. The key 390 may be a mechanical key or a touch key. The electronic device 100 receives the key 390 input and generates a key signal input related to the user settings and function control of the electronic device 100.

[0129] 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.

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

[0131] The SIM card interface 395 is used to connect the SIM. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 395 or pulling it out 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.

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

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

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

[0135] When the terminal displays the user interface, it is necessary to perform drawing operations on the non-animation elements and animation elements included in the user interface. When the user interface includes animation elements, the terminal needs to draw, render, and display each image frame of the animation elements according to the device default frame rate to achieve the display effect of the terminal updating and playing the animation elements based on the device default frame rate. Among them, the frame rate refers to the number of frames that the terminal refreshes the image in 1 second, which can also be understood as the number of times the graphics processor in the electronic device refreshes the screen per second. The frame rate can also be understood as the refresh rate of the image. A high frame rate can obtain smoother and more realistic animations. The more frames per second, the smoother the displayed action will be. For example, a frame rate of 60Hz means that the terminal refreshes 60 frames of images in 1 second, that is, one image frame is refreshed every 16.67ms. Exemplarily, a frame rate of 90Hz means that the terminal refreshes 90 frames of images in 1 second, that is, one image frame is refreshed every 11.11ms. The default frame rate of the device is related to the hardware of the electronic device and is a set value.

[0136] The user interface of the terminal may be the desktop of the terminal, the system interface of the terminal, the display interface of the application (APP) included in the terminal, etc. Among them, the animation elements of the user interface may include dynamic icons, videos, animation components, animation backgrounds, etc. The non-animation elements of the user interface may include static icons, pictures, text, etc.

[0137] For example, the 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, and the second hand, minute hand, and hour hand of the clock icon are continuously updated and played in the user's visible dimension. The 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, and the animation effect of the APP icon is continuously updated and played in the user's visible dimension.

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

[0139] For example, the animation component can be a small animation component displayed on the terminal desktop. Exemplarily, the small animation component can be a weather forecast component. The terminal draws and plays the weather forecast component at the device default frame rate. In the user visible dimension, the weather forecast component will update the temperature value over time. Exemplarily, the small animation component can also be a music player component. The terminal draws and plays the music player component at the device default frame rate. In the user visible dimension, the music player component rotates the record picture 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 a background music source that scrolls in a video APP or a short video APP, a 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, etc. reminder animation components of the navigation interface. The terminal draws and plays various reminder animation components at the device default frame rate. In the user visible 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 of the navigation interface. After passing the specified location, the terminal no longer displays the reminder animation component on the navigation interface.

[0140] 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 default frame rate, and in the user's visible dimension, the dynamic wallpaper on the desktop continuously updates and plays its dynamic display effect. For example, the animated background can also be a dynamic wallpaper on the display interface of the APP. The terminal draws and plays the dynamic wallpaper at the device default frame rate, and in the user's visible dimension, the dynamic wallpaper on the display interface of the APP continuously updates and plays its dynamic display effect.

[0141] 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 elements according to the device's default frame rate, and update each image frame of the displayed animation elements. If there are many animation elements in the user interface, or some animation elements are not of interest to the user, the terminal needs to draw, render, and display each image frame of the animation elements according to the device's default frame rate, which will cause the terminal to consume relatively high power when displaying the user interface.

[0142] 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 according to the animation information; or, the animation type is distinguished by a special code flow in the code for a certain type of animation, so that one or more types of animations are not drawn. However, there are often only a few specific types of animations in a limited scene, and the applicability of this method is not high; the method of distinguishing animation types 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 is likely to cause the user interface to be unsmooth.

[0143] When the terminal displays the user interface, it generally refreshes all the animation elements in the user interface at the device 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 the 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 the animation elements that the user pays attention to unchanged, and reduces the frame rate of the 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.

[0144] Specifically, for user interfaces that include animation elements, by identifying and screening animation elements that are not of high concern to users, or that users will not pay attention to, or that will not affect the user's functional operations in the user interface, the terminal's drawing frame rate for such animation elements is reduced. Among them, in all cycles of such animation elements drawn by the terminal 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 drawing, rendering, and synthetic display operations for such animation elements, thereby reducing the power consumption of the terminal when displaying a user interface including such animation elements. At the same time, since animations other than the first type of animations that users pay attention to are not processed, animations other than the first type of animations in the display interface are still refreshed and displayed at the device default frame rate, ensuring the smoothness of the user interface and the user experience.

[0145] 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 the first type of animation. The first type of 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 type of animation often occupies a smaller area of ​​the user interface, and the first type of animation can also be referred to as a small animation. The position of the first type of 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 type of animation is located, the first type of animation is not the animation that the user pays attention to in the current user interface. Accordingly, the second type of animation, which is different from the first type of animation, is an animation element in the user interface other than the first type of animation. The second type of animation is often an animation element that the user pays attention to in the user interface, and the user's operation based on the user interface often affects the refresh, play or pause operation of the second type of animation.

[0146] This embodiment uses a mobile phone as an example to illustrate the first type of animation. Figure 2 , Figure 2 An example of the first type of animation is a dynamic icon. Figure 2 The desktop of the mobile phone shown includes a first type of animated "clock" icon 101. When the mobile phone displays the user interface where the "clock" icon 101 is located, the "clock" icon 101 is drawn and played at the device default frame rate. In the user's visible dimension, when the terminal displays the desktop including the "clock" icon 101, the second hand, minute hand, and hour hand of the "clock" icon 101 are continuously updated and played. Figure 2 The right side magnified display area shows the playback change of the "clock" icon 101. For example, when the default frame rate of the device is 60 Hz, the terminal draws, renders and refreshes an image frame of the "clock" icon in a cycle of 16.67 ms. Figure 2 The UI shown has non-animated elements except for the Clock icon, with no secondary animation.

[0147] refer to Figure 3 , Figure 3 An example of a first-class animation is given as an animation component. Figure 3 The display interface of the short video APP shown includes a first-class animation "rotating record" component 102, a first-class animation "background music 1" component 103, and a second-class animation "video 1" 104. When the mobile phone displays the display interface of the short video APP, all the animation elements in the display interface are drawn and played at the device's default frame rate. In the user's visible 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, you can refer to Figure 3The enlarged display area on the right shows the playback changes of the "spinning record" component 102. For example, when the default frame rate of the device is 60 Hz, the terminal draws, renders and refreshes the image frames corresponding to the "video 1" 104, the "spinning record" component 102 and the "background music 1" component 103 in a cycle of 16.67 ms.

[0148] For example, the first type of animation is an example of an animation component. Figure 4 shown. Figure 4 A schematic diagram of the home page of a search engine APP is given. The home page of the search engine APP includes a first-class animated "live broadcast" component 105 and other non-animated elements. For example, non-animated 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 broadcast" component 105 at the device's default frame rate. In the user's visible dimension, when the home page of the search engine APP is displayed, the terminal plays the animation of the "live broadcast" component 105. Please refer to Figure 4 The enlarged display area on the right shows the playback changes of the "Live" component 105. For example, when the default frame rate of the device is 60Hz, the terminal draws, renders and refreshes each image frame of the "Live" component in a cycle of 16.67ms. When the user pulls down or slides left and right on the home page of the search engine APP to browse news, it will not affect the playback of the "Live" component 105.

[0149] For example, the first type of animation is an example of an animation component. Figure 5 shown. Figure 5 A schematic diagram of a video playback interface of a video APP is given. The video playback interface includes the "Selection" component 106, "Video 1" 107, "Surrounding Videos 1 / 2" 108 and other non-animation elements of the first type of animation being played. Among them, the "Selection" component 106 being played is used to provide users with prompts of the currently playing episodes, and does not affect the user's viewing of the main "Video 1" 107. Non-animation elements include video description content, recommendation information, bottom function bar, etc. When the mobile phone displays the video playback interface, it draws and plays "Video 1" 107, "Surrounding Videos 1 / 2" 108 and the "Selection" component 106 being played at the device's default frame rate. In the user's visible dimension, when the video playback interface is displayed, the terminal plays "Video 1" 107 and plays the "Selection" component 106 being played at the same time; when the user clicks "Surrounding Videos 1 / 2" 108, the surrounding videos 1 / 2 are played. Please refer to Figure 5The enlarged display area on the left shows the playback changes of the "Selection" component 106 being played. For example, when the default frame rate of the device is 60 Hz, the terminal draws, renders and refreshes each image frame of "Video 1" 107, "Surrounding Video 1 / 2" 108 and the "Selection" component 106 being played in a cycle of 16.67 ms.

[0150] For example, the first type of animation is an example of an animation component. Figure 6 shown. Figure 6 A schematic diagram of the main interface of a video APP is given. The main interface of the video APP includes a first-class animated "search" component 109, recommended videos, and other non-animation elements. Among them, the "search" component 109 is used to provide users with search recommendations for currently popular dramas, and does not affect users' browsing of recommended videos. Non-animation elements include video description content, recommendation information, bottom function bar, etc. When the mobile phone displays the main interface of the video APP, it draws and plays the recommended video 1 and the "search" component 109 at the device's default frame rate. In the user's visible dimension, when the main interface of the video APP is displayed, the terminal plays the recommended video 1 and the "search" component 109 at the same time; when the user clicks on the recommended video 2 / 3 / 4 / 5 / 6 / 7, the corresponding recommended video is played. Among them, the playback changes of the "search" component 109 can be referred to. Figure 6 In the two figures given, the display content of the "search" component 109 is composed of "hot drama 1" (reference Figure 6 (a)) is updated to "Popular Drama 2" (reference 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.

[0151] For example, the first type of animation is an example of an animation component. Figure 7 shown. Figure 7 A schematic diagram of an application setting interface is provided, in which a first type of animated "pig" component 110 is included. The "pig" component 110 is used to remind the user to enter certain activity interfaces of the current application, and has no other impact on the user's use of other functions of the application setting interface. Figure 7 The right side shows the update change 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 in a cycle of 16.67 ms.

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

[0153] For example, the first type of animation is an example of an animation component. Fig. 9 shown. Fig. 9 A schematic diagram of a mobile phone search interface for an e-commerce mall application is given. The mobile phone search interface includes search results, which include non-animated elements (mobile phone pictures, mobile phone product descriptions, detailed descriptions, prices, etc.). When a store is live streaming, the search results also include a "live streaming" component 112. When the search interface includes a merchant that is live streaming, the "live streaming" component 112 is drawn and played at the device's default frame rate. For reference Fig. 9 The enlarged display area on the right shows the playback changes of the "Live" component 112. For example, when the default frame rate of the device is 60Hz, the terminal draws, renders and refreshes each image frame of the "Live" component 112 in a cycle of 16.67ms. Optionally, when the user browses the search interface, that is, when the user performs a pull-down sliding operation on the search interface, the position of the "Live" component 112 will slide and change with the user's sliding operation, but the animation of the "Live" component 112 will not be affected by the user's operation.

[0154] In addition, the first type of animation can also be other components. For example, refer to Fig.10 As shown, Fig.10 (a) shows a scanning interface for scanning a two-dimensional code. In the scanning process, the animation of the scanning bar 113 sweeping up and down is the first type of animation. Fig.10 The shaded portion in (a) is the dynamic shadow effect of the scanning bar. The scanning bar 113 sweeping up and down does not affect the actual scanning operation. Fig.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 flashing gradually from the inside to the outside of the 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. Fig.10(c) shows an e-book page turning interface, where the previous page and the next page can be distinguished by a gradient shadow 115, and the animation of the page turning by the gradient shadow is a first type of animation, and the gradient shadow 115 will not affect the user's page turning operation. This embodiment does not limit the specific form of the small animation.

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

[0156] For example, the first type of animation includes continuous animation, see Figure 2 The “clock” icon 101 is shown; Figure 3 The "spinning record" component 102 and the "background music 1" component 103 are shown; Figure 4 The "live broadcast" component 105 shown; Figure 5 The "Selection" component 106 shown being played; Figure 6 The "Search" component 109 shown; Figure 7 The "piggy" assembly 110 is shown; Fig. 9 The “live broadcast” component 112 is shown; Fig.10 The scanning bar 113, "on" component 114, gradient shadow 115, etc. shown in FIG.

[0157] The first type of animation also includes continuous-pause animation, that is, the animation is displayed in the current display interface for a period of time and then stops displaying. Figure 8 The construction reminder component 111 and the like are shown.

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

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

[0160] 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.

[0161] 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 the application is opened, 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 a navigation opening 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 a 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 electronic mall 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 widget, etc.

[0162] 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.

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

[0164] 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.

[0165] In this embodiment, the electronic device only needs to reduce the drawing operation of the first type of animation to reduce the power consumption of the electronic device in drawing the target interface. Therefore, after acquiring 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, and still displays the second type of animation at the initial frame rate to ensure the smoothness of the target interface.

[0166] 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 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. To achieve the effect of reducing the frame rate of the first type of animation, so as to obtain the purpose of the target frame rate of the first type of animation being less than the initial frame rate.

[0167] In some embodiments, the electronic device may determine the target frame rate or determine to discard the i+n image frames of the first type of animation based on information such as the type of the first type of animation, the size of the first type of animation, the application to which the first type of animation belongs, etc. That is, the ratio of the electronic device to reduce the initial frame rate may be determined based on information such as the type of the first type of animation, the size of the first type of animation, the application to which the first type of animation belongs, etc. Exemplarily, the reduction ratio of the initial frame rate may be 50%, 70%, 80%, etc.

[0168] For example, the first type of animation is the "spinning record" component in the short video APP. Since the size of the "spinning record" component is small and has no impact on the user's browsing operation when the user is browsing the short video, 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 small and has no impact on the user when 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.

[0169] For example, refer to Fig.11 As shown, Fig.11 (a) shows the effect of displaying the "clock" icon at the initial frame rate (before adjusting the frame rate). The "clock" icon updates every 1 second to show the changes of the second hand, minute hand, and hour hand. Fig.11 (b) is the effect of displaying the "clock" icon at the target frame rate (after adjusting the frame rate). The "clock" icon updates the second hand, minute hand, and hour hand every 2 seconds. 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.

[0170] For example, the first type of animation is the "Selection" component being played in the video APP. Since the size of the "Selection" component being played is small and has no impact on the user's viewing operation during the user's video viewing, the target frame rate of the first type of animation can be adjusted to 50% of the initial frame rate. The initial frame rate of the "Selection" component being played is updated and displayed every 16.67ms. After adjusting the frame rate, the "Selection" component being played is refreshed and displayed at the target frame rate, and the "Selection" component being played is updated and displayed every 33.33ms.

[0171] 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 classifications including the first type of animation and the second type of animation.

[0172] In combination with the architecture of the electronic device, a method for displaying a dynamic interface provided by this embodiment is described. Fig.12 , Fig.12 A schematic diagram based on the electronic device architecture is given.

[0173] 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 at the application layer responds to the user's first operation, sends a drawing command to the application framework layer, the application framework layer calls the drawing thread at 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.

[0174] The process of determining the drawing area can be referred to Fig.13 As shown. Each screen display interface of the electronic device has a corresponding drawing tree draw tree. The draw tree includes multiple nodes RenderNode, each node represents an element in the display interface. The process of determining the drawing area of ​​each RenderNode (element) includes:

[0175] 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 in the drawing 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.

[0176] Specifically, when obtaining the damage area of ​​each RenderNode, if the RenderNode does not have a transformation matrix, then it is directly determined to obtain the damage area of ​​the RenderNode. For example, the damage area of ​​RenderNode1 is a circular area, and there is no transformation matrix when the circular area is rotated, then the damage area of ​​RenderNode1 is a circular area. If the RenderNode has a transformation matrix, 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, 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, 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 when the rectangular area is rotated, then the damage area of ​​RenderNode2 is the area where the minimum circumscribed circle of the rectangular area is located.

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

[0178] The method for displaying a dynamic interface provided in this embodiment is based on the process of determining the drawing area of ​​each element in the target interface, referring to Fig.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.

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

[0180] 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:

[0181] refer to Fig.14 , the electronic device traverses all RenderNode nodes in the draw tree corresponding to the target interface.

[0182] Optionally, the processing module of the electronic device can traverse all RenderNode nodes in the draw tree corresponding to the target interface by a deep recursive algorithm, a breadth recursive algorithm, etc. Each node has a first identifier, which can be used to indicate whether the transformation matrix of the non-leaf node has changed; or, the first identifier can indicate whether the non-leaf node has a transformation matrix.

[0183] The processing module can perform animation recognition of the node representation element according to the first identifier of the node RenderNode, and distinguish the animation elements from the non-animation elements in the target interface. If the first identifier is the first value, it means that the non-leaf node is an animation. If the first identifier is the second value, it is determined that the non-leaf node is a non-animation element. In this embodiment, the processing module focuses on the RenderNode of the animation type, and further identifies the elements represented by the RenderNode of the animation type.

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

[0185] Exemplarily, for a leaf node in a draw tree, the processing module of the electronic device can determine whether the leaf node is drawn by the damage area of ​​the leaf node. After statistics for a preset time, 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 for a preset time period, the drawing time series of each node RenderNode is obtained.

[0186] Optionally, the electronic device needs to determine the animation type of the element in the target interface according to the drawing time sequence of the elements in the multi-frame target interface. Therefore, this embodiment needs to obtain the drawing time sequence of each RenderNode through the identification operation of the preset time period. Since the response event of some triggered short-time animations is about 500ms, in order to better obtain the drawing time sequence of this type of animation, illustratively, the preset time period can be 400ms-800ms.

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

[0188] For example, the drawing time sequence of RenderNode1 is {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, which means that after drawing the image frame of RenderNode1 in the first drawing cycle, no more drawing operations are performed, and the element corresponding to RenderNode1 is considered to be a non-animation element. For example, the drawing time sequence of RenderNode2 is {1,0,0,1,0,0,1,0,0,1,0,0,1,0,0}, which means that RenderNode2 draws an image frame in every two drawing cycles, and the drawing actions have a certain frequency regularity and are continuous, and the element corresponding to RenderNode2 is considered to be an animation element.

[0189] 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.

[0190] Furthermore, the processing module can cyclically obtain the drawing time sequence of each RenderNode of the animation type in the drawtree of the target interface of N frames under the statistics of the preset time period. The processing module further extracts animation features based on the drawing time sequence of each RenderNode of the animation type to obtain the animation type of each animation.

[0191] In this embodiment, the processing module can extract animation features according to 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,0}, which means that after two drawing cycles of drawing display, the drawing operation is no longer 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.

[0192] Correspondingly, the animation type whose cumulative number of drawing identifiers is 1 is greater than or equal to the threshold N is called a continuous animation. 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, so 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, so RenderNode4 is determined to be a continuous animation that displays 6 drawing cycles.

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

[0194] Since short animations last for a short time, some short animations are response animations to user operations, which last for a short time and attract a lot of attention from users, and cannot reduce drawing operations, this embodiment does not focus on such animations. Reducing the frame rate of short animations does not significantly reduce power consumption, so the display method of the dynamic interface provided in this embodiment focuses on reducing the frame rate of continuous animations.

[0195] In this embodiment, further, the processing module can also 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 can 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 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. According to the drawing time sequence, continuous drawing animation, continuous-pause animation, and continuous stop animation can be distinguished.

[0196] 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,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 of image in the first drawing cycle, does not draw the second frame of image in the second drawing cycle, and does not draw the third frame of 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.

[0197] Exemplarily, after the processing module statistically identifies the animation type of 12 frames of the target interface, 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. In other words, 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, RenderNode6 does not perform drawing operations after 6 drawing cycles of drawing and display. This type of animation can be called a continuous-stop animation.

[0198] Exemplarily, after the processing module statistically identifies the animation type of 12 frames of the target interface, the drawing time sequence of RenderNode7 in the draw tree of the target interface can be {1,1,1,1,1,1,1,1,1,1,1,1}. Among them, 1 means that the damage area of ​​RenderNode7 is drawn, and 0 means that the damage area of ​​RenderNode7 is not drawn. That is, the animation corresponding to RenderNode7 draws images in all drawing cycles. This type of animation can be called a continuous drawing animation.

[0199] After the processing module identifies the secondary animation type of the continuous animation, it can obtain the size, drawing frequency, stop frequency and other information of each continuous animation to determine the first type of animation in the continuous animation, that is, determine the non-sensitive animation in the continuous animation that is not paid attention to by the user.

[0200] Specifically, the process of identifying the first type of animation includes several situations: if the target interface includes multiple continuous animations, the continuous animations whose size is smaller than the first threshold range {w1, h1} are determined as the first type of animation. If the target interface includes one continuous animation, the continuous animation whose size is smaller than the second threshold range {w2, h2} is determined as the first type of animation. The first threshold range is smaller than the second threshold range.

[0201] When the target interface includes multiple continuous animations, in order to avoid classifying the animation that the user is concerned about 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.

[0202] 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-sized animations that users pay attention to as the first type of animation and prevent the electronic device from misidentifying the first type of animation.

[0203] After the electronic device acquires the first type of animation, a frame dropping strategy for each first type of animation may be determined. The frame dropping strategy is also a strategy for reducing the frame rate of the first type of animation.

[0204] If the target interface includes a first type of animation, the corresponding frame dropping strategy is determined according to the type, size and other information of the first type of animation. For example, the frame dropping strategy may be to drop two image frames after drawing each image frame. Alternatively, the frame dropping strategy may be to drop one image frame after drawing each image frame.

[0205] In another case, the target interface may include multiple first-category animations. After determining the frame dropping strategy of each first-category animation, the frame dropping strategies of each first-category animation may be different. For example, RenderNode8 and RenderNode9 are both first-category animations. The frame dropping strategy of RenderNode8 is to discard one image frame after drawing one image frame; the frame dropping strategy of RenderNode9 is to discard two image frames after drawing one image frame.

[0206] In this case, the processing module can coordinate the entire frames of multiple first-category animations so that multiple first-category animations are not drawn at the same time as much as possible. Exemplarily, the entire frame coordination can be that the processing module determines the target animation with the largest size from multiple first-category animations, and coordinates the frame dropping strategies of other first-category animations based on the frame dropping strategy of the target animation, that is, the frame dropping strategy of the target animation is applied to other first-category animations to achieve synchronous drawing or non-drawing of all first-category animations.

[0207] Optionally, when the processing module determines the frame loss strategy for the first type of animation, the frame loss 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. Exemplarily, 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 loss period in its frame loss strategy to the total period may be greater than the proportion of the drawing period to the total period. For example, the frame loss strategy may be to discard two image frames after drawing each image frame. 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 loss period in its frame loss strategy to the total period may be less than the proportion of the drawing period to the total period. For example, the frame loss strategy may be to discard one image frame after drawing each two image frames.

[0208] Optionally, the configuration management can also preset the elements and The mapping relationship of activitiy in the architecture. The frame loss strategy of the first type of animation belonging to the first type of activitiy is set so that the ratio of the frame loss cycle to the total cycle can be greater than the ratio of the drawing cycle to the total cycle; the frame loss strategy of the first type of animation belonging to the second type of activitiy is set so that the ratio of the frame loss cycle to the total cycle is less than the ratio of the drawing cycle to the total cycle. And so on.

[0209] 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, activity, etc. of the first type of animation.

[0210] Among them, combined Fig.12 In the process of animation drawing of a given electronic device, 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 draw tree, so that the draw tree 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.

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

[0212] Exemplarily, the frame rate is 60Hz, and the frame dropping strategy is to discard two image frames after drawing each image frame. For example, the first type of animation is the "spinning record" component in the short video APP, which originally updates and displays an image frame every 16.67ms. After the "spinning record" component is drawn or not drawn based on the frame dropping strategy, the "spinning record" component updates and displays an image frame every 50.01ms. In this way, the refresh frequency of the "spinning record" component is reduced, the drawing operations in the drawing and display process of the "spinning record" component are reduced, and the power consumption of the electronic device displaying the "spinning record" component is reduced.

[0213] For example, the frame dropping strategy is to discard three image frames after drawing each image frame. The first type of animation is the "clock" icon on the desktop, which originally updates and displays an image frame every 16.67ms. After the "clock" icon is drawn or not drawn based on the frame dropping strategy, the "clock" icon updates and displays an image frame every 66.68ms. This reduces the refresh frequency 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.

[0214] For example, the frame dropping strategy is to discard five image frames after drawing each image frame. The first type of animation is the "Selection" component that is being played in the video APP. It originally updates and displays an image frame every 16.67ms. After the "clock" icon is drawn or not drawn based on the frame dropping strategy, the "clock" icon updates and displays an image frame every 100.02ms. This reduces the refresh frequency of the "Selection" component that is being played, reduces the drawing operations during the drawing and display process of the "Selection" component that is being played, and reduces the power consumption of the electronic device displaying the "Selection" component that is being played.

[0215] The method for displaying dynamic images provided in the embodiment of the present application obtains the first type of animation of the display interface by identifying the animation elements in the display interface, thereby determining the frame dropping strategy of the first type of animation, and reducing the drawing frequency of the first type of animation according to the frame dropping strategy, 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.

[0216] Fig.15 A possible structural diagram of the electronic device involved in the above embodiments is shown. Fig.15 The electronic device 1000 shown includes a processor 1001 , a display screen 1002 , and a storage module 1003 .

[0217] 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 devices, transistor logic devices, hardware components or any combination thereof. The processor may include an application processor and a baseband processor. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of 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.

[0218] For example, the processor 1001 may be Figure 1 The processor 310 shown; the display screen 1002 can be as shown Figure 1 The display screen 394 shown; the storage module 1003 can be as follows Figure 1 The internal memory 321 shown. The electronic device provided in the embodiment of the present application can be Figure 1 An electronic device 100 is shown.

[0219] The present application also provides a chip system (eg, a system on a chip (SoC)), such as Fig.16 As shown, 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 by lines. For example, the interface circuit 702 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 702 can be used to send signals to other devices (such as a processor 701 or a camera of an electronic device). Exemplarily, the interface circuit 702 can read instructions stored in the memory and send the instructions to the processor 701. When the instruction is executed by the processor 701, the electronic device can perform the various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0220] 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 each function or step executed by the electronic device 100 in the above-mentioned method embodiment.

[0221] The embodiment of the present application further 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.

[0222] 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.

[0223] In the several embodiments provided in the present 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 only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, 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.

[0224] The units described as separate components may or may not be physically separated, 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 different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0225] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0226] 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0227] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for displaying a dynamic interface, 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, 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, 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, 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, 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, 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: In the preset time period, the electronic device traverses the drawing tree drawtree 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, 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 continuous animation whose size is smaller than the first threshold range 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 smaller 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, 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, 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, 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, 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, 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, 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, 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

  • Adaptive picture refresh rate adjustment method and device thereof

    CN108206018A

  • Display screen frame rate control method and device and storage medium

    CN113741676A

  • Method for Displaying Plurality of Windows and Electronic Device

    US20230305864A1

Cited By

  • Display method, electronic equipment and storage medium

    CN120455586A

  • Display method for loading animation and related equipment

    CN121616732A