Animation control method, electronic device, chip system, storage medium, and program product

By defining animation units to play and control animations in multiple windows in parallel, the problem of low flexibility in playing animations on electronic devices is solved, resulting in smoother animation effects and a better user experience.

WO2026061152A1PCT designated stage Publication Date: 2026-03-26HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2026-03-26

AI Technical Summary

Technical Problem

When electronic devices play animations, there is a problem with the inability to control the playback and pause of the animations, resulting in low flexibility and affecting the user experience.

Method used

By defining animation units, the animations of multiple windows can be differentiated and controlled, enabling parallel playback and control. Control commands such as create, start, query, update, cancel, and delete commands are used to improve the flexibility and smoothness of animation control.

Benefits of technology

It improves the flexibility and smoothness of animation playback on electronic devices, enhances the user experience, reduces the burden on system resources, and improves the efficiency and continuity of animation playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025112626_26032026_PF_FP_ABST
    Figure CN2025112626_26032026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of terminals, and provide an animation control method, an electronic device, a chip system, a storage medium, and a program product. The method comprises: creating a corresponding animation unit on the basis of animation parameters of each frame of an animation, so as to distinguish and control animations of a plurality of windows. Moreover, controls such as playback and pausing of the animations of the plurality of windows can be realized by means of control instructions. In this way, the electronic device can play back the animations of the plurality of windows in parallel, thereby improving the flexibility of the electronic device in the process of playing back animations, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Animation control method, electronic device, chip system, storage medium and program product

[0001] The present application claims priority from the Chinese patent application No. 202411316774.5 filed on September 19, 2024, and entitled "Animation control method, electronic device, chip system, storage medium and program product", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of terminals, and in particular to an animation control method, an electronic device, a chip system, a storage medium and a program product. BACKGROUND

[0003] When opening or closing an application, an electronic device can add an animation effect, so that the interface is displayed more smoothly and naturally when changing or switching.

[0004] When playing an animation, some electronic devices can calculate the animation parameters of each frame of the animation, and then send the animation parameters of each frame to a window compositor (SF) at one time.

[0005] However, in some scenarios, when playing an animation, an electronic device can have the problem of being unable to control the playing and pausing of the animation, resulting in low flexibility. SUMMARY

[0006] The embodiments of the present application provide an animation control method, an electronic device, a chip system, a storage medium and a program product, which are applied to the technical field of terminals and can realize parallel playing and controlling of animations of multiple windows and improve user experience.

[0007] In a first aspect, an embodiment of the present application provides an animation control method. The method comprises: in response to a first operation of triggering starting of a first application, playing a first starting animation of the first application; during playing of the first starting animation, receiving a second operation of triggering starting of a second application; in response to the second operation, continuously playing the first starting animation and playing a second starting animation of the second application, wherein the second starting animation is in an upper layer of the first starting animation. In this way, the electronic device can play animations of multiple windows in parallel, improve the flexibility of the electronic device in playing animations, and improve user experience.

[0008] In some implementations of the first aspect, before playing the first start animation of the first application based on the first information, the method further includes: calculating a first animation parameter of the first start animation, the first animation parameter including one or more frames of animation parameters used to play the first start animation. Playing the first start animation of the first application includes: playing the first start animation of the first application based on the first information, wherein the first information includes the first animation identifier, the first animation parameter, and a first instruction, and the first instruction is used to instruct to play the first start animation. In this way, the electronic device can control the playing of the first start animation, improving the flexibility of animation control. Moreover, the first parameter is calculated in advance before the animation is played, which can reduce the burden of real-time calculation, improve the smoothness of animation playing, and enhance the user experience.

[0009] In some implementations of the first aspect, before playing the first start animation of the first application based on the first information, the method further includes: based on a second instruction, locally saving second information, the second information including the first animation identifier and a second animation parameter, the second animation parameter being the same as or different from the first animation parameter. Playing the first start animation of the first application based on the first information includes: based on the first instruction, searching for the locally saved second animation parameter according to the first animation identifier; updating the locally saved second animation parameter in combination with the first animation parameter, and playing the first start animation based on the first animation parameter. In this way, the second animation parameter locally saved by the window compositor can be updated based on the first animation parameter, so that the electronic device can update the animation being played during the playing of the animation, improving the flexibility of the electronic device in playing the animation and enhancing the user experience.

[0010] In some implementations of the first aspect, the second instruction further includes a sub-instruction, and after the first start animation is played, the first animation identifier and the locally saved animation parameter of the first start animation are retained based on the sub-instruction. In this way, the window compositor can retain the first animation identifier and the locally saved animation parameter of the first start animation after the animation is played, which can also be understood as not automatically deleting the local animation unit in the above description, reducing the process of recalculating the animation parameter when the animation is played repeatedly, and thus improving the efficiency of the animation playing.

[0011] With reference to the first aspect, in some implementations of the first aspect, in response to the second operation, continuing to play the first start animation further includes: in response to the second operation, calculating a third animation parameter of the first start animation, the third animation parameter being different from the first animation parameter; based on the third instruction, searching for the animation parameter of the first start animation saved locally according to the first animation identifier; updating the third animation parameter into the animation parameter of the first start animation saved locally, and playing the first start animation based on the third animation parameter. In this way, the electronic device can quickly respond and adjust the animation parameter and adjust the animation playing in the case of frequent user operations, improve the flexibility of the electronic device in the process of playing the animation, and improve the user experience.

[0012] With reference to the first aspect, in some implementations of the first aspect, before calculating the third animation parameter of the first start animation, the method further includes: based on a fourth instruction, obtaining a playing progress of the first start animation; and calculating the third animation parameter of the first start animation includes: based on the playing progress of the first start animation, calculating the third animation parameter of the first start animation. In this way, the electronic device can adjust the animation parameter according to the playing progress of the current animation, and the system resources can be saved without recalculating all the animation parameters, the flexibility of the animation control is improved, and the user experience is improved.

[0013] With reference to the first aspect, in some implementations of the first aspect, the method further includes: during playing the second start animation, receiving a third operation triggering exiting the second application; in response to the third operation, stopping playing the second start animation and playing a third exit animation of the second application. In this way, the electronic device can stop the currently playing animation and play the corresponding exit animation when receiving the triggering exit operation, the continuity of the animation playing can be improved, and the user experience is improved.

[0014] With reference to the first aspect, in some implementations of the first aspect, in response to the third operation, stopping playing the second start animation and playing the third exit animation of the second application includes: in response to the third operation, based on a fifth instruction, stopping playing the second start animation, and based on a first instruction, playing the third exit animation of the second application. In this way, the electronic device can stop the start animation of the application based on the fifth instruction when receiving the operation triggering the exit of the application, and can play the exit animation based on the first instruction, the continuity of the animation playing can be improved, the flexibility of the animation control can be improved, and the user experience is improved.

[0015] With reference to the first aspect, in some implementations of the first aspect, in response to the third operation, stopping playing the second start animation and playing a third exit animation of the second application comprises: in response to the third operation, calculating fourth animation parameters of the third exit animation, the fourth animation parameters comprising one or more frames of animation parameters used for playing the third exit animation; based on the third instruction, searching for animation parameters of the second start animation saved locally according to the second animation identifier; updating the fourth animation parameters into the animation parameters of the second start animation saved locally, and playing the third exit animation based on the fourth animation parameters. In this way, the electronic device can update the playing animation through the third instruction, improve the smoothness of the animation playing, improve the flexibility of the animation control, and enhance the user experience.

[0016] With reference to the first aspect, in some implementations of the first aspect, the animation control method further comprises: based on a sixth instruction related to the first start animation, deleting the related information of the first start animation saved locally. In this way, the electronic device can delete the related information of the locally saved animation through the sixth instruction, reduce the processing burden of the electronic device, and save memory resources.

[0017] With reference to the first aspect, in some implementations of the first aspect, the first animation parameters comprise one or more of the following: a position of an animation window, a size of the animation window, a scaling matrix of the animation, a rotation matrix of the animation, a transparency of the animation, and a color of the animation. By calculating the position, size, scaling matrix, rotation matrix, transparency, and color of the animation window, the accuracy and flexibility of the animation playing and control of the electronic device can be improved, and the user experience can be improved.

[0018] With reference to the first aspect, in some implementations of the first aspect, the first instruction comprises a START instruction, the second instruction comprises a CREAT instruction, the third instruction comprises an UPDATE instruction, the fourth instruction comprises a QUERY instruction, the fifth instruction comprises a CANCEL instruction, and the sixth instruction comprises a DELETE instruction. Based on the first instruction, the second instruction, the third instruction, the fourth instruction, the fifth instruction, and the sixth instruction, the animation of multiple windows can be played and controlled in parallel, the accuracy and flexibility of the animation control can be improved, the animation switching process can be smoother, and the user experience can be enhanced.

[0019] In a second aspect, an embodiment of the present application provides an animation control apparatus. The animation control apparatus can be an electronic device, or a chip or chip system in the electronic device. The animation control apparatus can include a processing unit. The processing unit can be a processor. The apparatus can further include a storage unit, which can be a memory. The storage unit is configured to store instructions. The processing unit is configured to execute the instructions stored in the storage unit, so that the electronic device implements an animation control method described in the first aspect or any possible implementation of the first aspect. When the apparatus is a chip or chip system in the electronic device, the processing unit can be a processor. The processing unit is configured to execute the instructions stored in the storage unit, so that the electronic device implements an animation control method described in the first aspect or any possible implementation of the first aspect. The storage unit can be a storage unit (e.g., a register, a cache, etc.) in the chip, or a storage unit (e.g., a read-only memory, a random access memory, etc.) in the electronic device and located outside the chip.

[0020] In a third aspect, an embodiment of the present application provides an electronic device. The electronic device includes a processor and a memory. The memory is configured to store code instructions. The processor is configured to execute the code instructions to perform the method described in the first aspect or any possible implementation of the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed on a computer, the computer is caused to perform the method described in the first aspect or any possible implementation of the first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program is executed on a computer, the computer is caused to perform the method described in the first aspect or any possible implementation of the first aspect.

[0023] In a sixth aspect, an embodiment of the present application provides a chip or chip system. The chip or chip system includes at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line. The at least one processor is configured to execute a computer program or instructions to perform the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin, or a circuit, etc.

[0024] In a possible implementation, the chip or chip system described in the present application further includes at least one memory. The at least one memory stores instructions. The memory can be a storage unit (e.g., a register, a cache, etc.) in the chip, or a storage unit (e.g., a read-only memory, a random access memory, etc.) of the chip.

[0025] It should be understood that the second aspect to the sixth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation manners are similar, which will not be described again. BRIEF DESCRIPTION OF DRAWINGS

[0026] FIG. 1 shows a schematic diagram of a starting animation of an application;

[0027] FIG. 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0028] FIG. 3 is a software structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0029] FIG. 4 is a schematic diagram of animation control of scenario one provided by an embodiment of the present application;

[0030] FIG. 5 is a flow schematic diagram of a first animation control method provided by an embodiment of the present application;

[0031] FIG. 6 is a schematic diagram of animation control of scenario two provided by an embodiment of the present application;

[0032] FIG. 7 is a flow schematic diagram of a second animation control method provided by an embodiment of the present application;

[0033] FIG. 8 is a schematic diagram of animation control of scenario three provided by an embodiment of the present application;

[0034] FIG. 9 is a flow schematic diagram of a third animation control method provided by an embodiment of the present application;

[0035] FIG. 10 is a flow schematic diagram of a fourth animation control method provided by an embodiment of the present application;

[0036] FIG. 11 is a flow schematic diagram of a fifth animation control method provided by an embodiment of the present application;

[0037] FIG. 12 is a structural schematic diagram of a chip provided by an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to clearly describe the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:

[0039] 1. Window: refers to a visual area of an application on a display screen of an electronic device, which can be used for interaction with a user. The visual area can occupy the entire display screen in a full-screen manner, or occupy part of the display screen in the form of a small window. Illustratively, in response to a user's operation of opening an application, the display screen of the electronic device can display a window of the application.

[0040] 2、Terminology

[0041] In the embodiments of the present application, the terms "first", "second", and the like are used to distinguish between similar or identical items or elements that have substantially the same function and role. For example, the first chip and the second chip are merely used to distinguish between different chips, and do not limit the sequence. Those skilled in the art can understand that the terms "first", "second", and the like do not limit the quantity and execution sequence, and the terms "first", "second", and the like do not necessarily mean different.

[0042] It should be noted that in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate an example, illustration, or description. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design solutions. Rather, the use of the words "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0043] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship between the associated objects is described by "and / or", which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0044] 3、Electronic device

[0045] The electronic device in the embodiments of the present application can also be any form of terminal device. For example, the electronic device can include a mobile phone, a tablet computer, a palm computer, a notebook computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in a future evolved public land mobile network (PLMN), and the like. The embodiments of the present application are not limited thereto.

[0046] By way of example and not limitation, in the embodiments of the present application, the electronic device can also be a wearable device. The wearable device can also be referred to as a wearable smart device, which is a general term for devices that are designed and developed by applying wearable technology to daily wear, such as glasses, gloves, watches, clothing, and shoes. The wearable device is a portable device that is directly worn on the body or integrated into the clothes or accessories of the user. The wearable device is not only a hardware device, but also has powerful functions through software support and data interaction and cloud interaction. The general wearable smart device includes a device with full functions and large size, which can realize complete or partial functions without relying on a smart phone, such as a smart watch or smart glasses, and a device that focuses on a certain application function and needs to be used in cooperation with other devices, such as a smart phone, such as various smart wristbands and smart jewelry for monitoring vital signs.

[0047] In addition, in the embodiments of the present application, the electronic device can also be an electronic device in an Internet of Things (IoT) system. The IoT is an important part of future information technology development, and its main technical feature is to connect objects through communication technology and network, so as to realize the intelligent network of man-machine interconnection and object-object interconnection.

[0048] The electronic device in the embodiments of the present application can also be referred to as a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile terminal, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user device, etc.

[0049] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes central processing unit (CPU), memory management unit (MMU), and memory (also known as main memory) and other hardware. The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system, etc. The application layer includes browsers, address books, word processing software, instant messaging software, etc.

[0050] The electronic device can complete the connection between different interfaces in the interface switching process of the electronic device in the form of playing an animation, so that the interface transition process becomes smooth and natural. For example, the electronic device can play a start-up animation or a closing animation in the window when opening or closing an application program, and the start-up animation or the closing animation can realize the transition between the start-up icon and the full-screen display application program window of the application program.

[0051] Exemplarily, FIG. 1 shows a schematic diagram of a start-up animation of an application program, taking an information application program as an example. As shown in FIG. 1, when the user clicks the information application program in interface A, the electronic device can complete the transition of the information application program from the start-up icon to the full-screen display information application program window by playing the frames of the start-up animation of the information application program in the window in quick succession after responding to the click operation of the user on the start-up icon of the information application program. For example, the four frames of images in the window corresponding to interface B, interface C, interface D, and interface E in FIG. 1 can be the four frames of images in the start-up animation.

[0052] It can be understood that if the electronic device directly displays the corresponding window interface in interface E of FIG. 1 on the display screen, the user will visually feel that the interface conversion is abrupt and lacks continuity.

[0053] In an implementation manner, during the process of playing the animation of the window, the electronic device can calculate the corresponding animation parameters in real time when each frame to be played by the animation initiator, for example, a desktop launcher, and send the animation parameters to the window compositor for composition and display. However, since the animation parameters of each frame need to be calculated and transmitted to the window compositor in real time, when the animation frame rate is high or the system resources of the electronic device are insufficient, the animation parameters may be delayed in the process of calculation or transmission, resulting in image loss and interface freezing during the process of playing the animation, which affects the user experience.

[0054] For example, as shown in the process of playing the start-up animation of the information application program in FIG. 1, if the system resources of the electronic device are insufficient during the calculation or transmission of the C frame image, the start-up animation may not be played or the C frame image may be delayed, causing the process of playing the start-up animation to be interrupted or to lose frames, resulting in unsmooth animation playing and affecting the user experience.

[0055] In another implementation manner, before the electronic device plays the animation of the window, the electronic device can calculate the animation parameters of each frame of the to-be-played animation in advance and send the animation parameters to the window compositor at one time. After receiving the animation parameters of each frame, the window compositor composes the animation parameters of each frame frame by frame and displays the animation parameters on the display screen, thereby realizing the playing of the animation.

[0056] However, since the animation parameters of each frame have been calculated before the animation is played, the animation initiator may not be able to immediately adjust the animation parameters during the process of playing the animation, so that the flexibility of the electronic device in playing the animation is low.

[0057] To solve the above technical problems, an animation control method is provided, which can create corresponding animation units based on the animation parameters of each frame of the animation, thereby distinguishing and controlling the animations of multiple windows, and can also realize the playing and pausing of the animations of the multiple windows through control instructions, realize the parallel playing and controlling of the animations of the multiple windows, improve the flexibility of the electronic device in playing the animation, and improve the user experience.

[0058] FIG. 2 is a structural schematic diagram of an electronic device 200 according to an embodiment of the present application. As shown in FIG. 2, the electronic device 200 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0059] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0060] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP) and a coprocessor (CP), etc. The application processor includes an application program framework layer, a hardware abstraction layer, a kernel layer, etc. of the software architecture adopted by the electronic device 200; the coprocessor includes a sensor hub, etc. Different processing units can be independent devices, or can be integrated in one or more processors. Optionally, the processor 110 can be used to calculate the animation parameters of each frame of the animation.

[0061] In some embodiments, the electronic device 200 can include 1 or N display screens 194, N being a positive integer greater than 1. When the window composer synthesizes the image of each frame based on the animation parameters of each frame, the 1 or N display screens 194 can be used to display the image of each frame of the animation, and the animation effect can be achieved by playing the images of multiple frames quickly and continuously on the display screen.

[0062] The internal memory 121 can be configured to store computer executable program codes including instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created during use of the electronic device, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 110 executes various function applications and data processing of the electronic device by running instructions stored in the internal memory 121 and / or instructions stored in a memory disposed in the processor.

[0063] For example, in an embodiment of the present application, the internal memory 121 can be configured to store an animation unit. When a certain animation is repeatedly played, the animation unit stored in the internal memory 121 can be reused instead of recalculating animation parameters, thereby saving system resources of the electronic device and improving animation play efficiency.

[0064] It should be understood that the connection relationship between the modules shown in FIG. 2 is only illustrative and does not constitute a limitation on the connection relationship between the modules of the electronic device 200. Alternatively, the modules of the electronic device 200 can also adopt a combination of the above-mentioned various connection manners.

[0065] FIG. 3 is a schematic diagram of a software structure of the electronic device 200 according to an embodiment of the present application. As shown in FIG. 3, the layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer.

[0066] The application layer can include a series of application packages. As shown in FIG. 3, the application packages can include information, a desktop launcher, and the like.

[0067] The desktop launcher can calculate animation parameters of animations to be played for each window. Alternatively, in response to a triggering operation of the user on the application A, the desktop launcher can calculate animation parameters of a start-up animation of the application A based on the triggering operation.

[0068] The application framework layer can also be referred to as a Framework layer, which can provide an application programming interface (API) and a programming framework for applications in the application layer. The Framework layer can include some pre-defined functions.

[0069] As shown in FIG. 3, the Framework layer can include a window manager, a window compositor, an activity manager, a resource manager, a notification manager, and the like.

[0070] In an embodiment of the present application, the window manager can be responsible for the management of window programs. The window manager can obtain the size of a display screen, determine whether there is a status bar, a lock screen, a touch screen, a drag screen, a screen capture, and the like. For example, in an embodiment of the present application, the window manager can be used to obtain a trigger operation of a user on an application.

[0071] Upon receiving an animation unit to be played, the window compositor can generate a corresponding image based on the animation parameters of each frame of the animation to be played and display the image on a display screen.

[0072] The specific window manager, window compositor, activity manager, resource manager, and notification manager can refer to related technologies, and thus will not be described here.

[0073] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the control and management of the Android system.

[0074] The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.

[0075] The application layer and the Framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the Framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, and the like.

[0076] The system library can also be referred to as a Native layer, which can include a plurality of function modules. For example: media libraries, function libraries, graphic processing libraries (such as OpenGL ES), and the like.

[0077] HAL is an abstract layer structure between the kernel layer and the Android runtime. The hardware abstraction layer can be a package of hardware drivers, which provides a unified interface for the call of the upper layer application.

[0078] The kernel layer is a layer between hardware and software. The kernel layer can include display drivers, camera drivers, audio drivers, battery drivers, Bluetooth drivers, CPU drivers, USB drivers, and the like.

[0079] It should be noted that the embodiments of the present application are only exemplified by the Android system. In other operating systems (for example, Windows system, real time operate system (RTOS), IOS system, and the like), as long as the functions of the various functional modules are similar to the embodiments of the present application, the scheme of the present application can also be implemented.

[0080] The method of the embodiments of the present application will be described in detail below through specific embodiments. The following embodiments can be combined or implemented independently, and the same or similar concepts or processes can not be described in detail in some embodiments.

[0081] As can be known from the above embodiments, the electronic device can distinguish and manage multiple animations by defining animation units, wherein the animation unit can include one or more of an animation identifier, a control instruction, a window or layer to which the animation belongs, and animation parameters.

[0082] The animation identifier can be used to uniquely identify an animation, so that the electronic device can distinguish multiple animations. The multiple animations can be multiple animations of one window, or multiple animations of different windows. The window or layer to which the animation belongs can indicate the window to which the animation is applied, thereby ensuring that the animation parameters can be correctly applied to the corresponding window or layer. Optionally, the animation identifier can be represented by a number, or can be a string or other data type, which is not limited here.

[0083] Optionally, the animation parameters can be used to indicate parameter information of each frame image in the animation. The parameter information of each frame image can include one or more of the position, size, scaling matrix, rotation matrix, transparency, color, and other attributes of the frame image. The window compositor reads the animation parameters frame by frame, composes and displays the parameter information in the animation parameters, and can realize the playing of the animation by the electronic device.

[0084] The position can be used to indicate the specific coordinates of each frame image in the animation displayed on the screen. For example, in the case of taking the upper left corner of the screen of the electronic device as the origin of the coordinate system, the coordinates of the lower left corner of the image can be taken as the position attribute of the image.

[0085] The size can be used to indicate the width and height of each frame image displayed on the screen, which can be represented in units of pixels.

[0086] The scaling matrix can be used to indicate the scale of transforming the size of the image.

[0087] The rotation matrix can be used to indicate a rotation angle of the image. For example, the rotation angle can indicate an angle of rotation of the image around a point.

[0088] The transparency can be used to indicate a transparency degree of the image.

[0089] The color can be used to represent a color attribute of the image.

[0090] In the embodiments of the present application, the control instruction can be used to control the playing, pausing and the like of the window animation corresponding to the animation unit. For example, the control instruction can include a creation instruction, a start instruction, a query instruction, an update instruction, a cancellation instruction and a deletion instruction and the like. The creation instruction can also be referred to as a CREAT instruction, the start instruction can also be referred to as a START instruction, the query instruction can also be referred to as a QUERY instruction, the update instruction can also be referred to as an UPDATE instruction, the cancellation instruction can also be referred to as a CANCEL instruction, and the deletion instruction can also be referred to as a DELETE instruction.

[0091] For example, for the creation instruction, after the desktop launcher calculates the animation parameters corresponding to the animation, the desktop launcher can send the related information of the animation unit to the window compositor, where the related information of the animation unit can include an animation identifier, a window or a layer to which the animation unit belongs, the creation instruction and the animation parameters and the like. After receiving the creation instruction, the window compositor can establish the animation unit in the local storage space based on the animation identifier and the window or the layer to which the animation unit belongs, and save the animation parameters in the animation unit.

[0092] The local storage space can occupy a part of the storage space in the memory of the electronic device for the window compositor to store the animation units established by the window compositor. Therefore, the animation unit established by the window compositor can also be referred to as a local animation unit.

[0093] For the start instruction, after the desktop launcher calculates the animation parameters corresponding to the animation, the desktop launcher can send the related information of the animation unit to the window compositor, where the related information of the animation unit can include an animation identifier, a window or a layer to which the animation unit belongs, the start instruction and the animation parameters and the like. After receiving the start instruction, the window compositor can first search the local storage space based on the animation identifier to determine whether the corresponding local animation unit exists in the local storage space. If the corresponding animation unit exists in the local storage space, the window compositor can fuse the animation parameters into the existing animation unit in the local storage space, and start playing in the next frame.

[0094] For the query instruction, the desktop launcher can send the animation identifier and the query instruction to the window compositor. After receiving the query instruction, the window compositor can obtain the playing progress of the corresponding animation unit based on the animation identifier, where the playing progress can include the animation parameters corresponding to the currently played frame.

[0095] For the update instruction, the desktop launcher can update the playing animation through the update instruction. For example, after the desktop launcher calculates the new animation parameters of the animation to be updated, the desktop launcher can send the related information of the animation unit to the window compositor, where the related information of the animation unit can include the animation identifier, the update instruction, and the new animation parameters, etc. After the window compositor receives the update instruction, the window compositor can first search for the local animation unit of the animation to be updated based on the animation identifier, and then fuse the new animation parameters with the existing animation parameters in the animation unit to update the local animation unit, so that the window compositor can play the image corresponding to the updated local animation unit in the next frame.

[0096] For example, in some scenarios, the desktop launcher can need to make the playing animation more transparent, and then the desktop launcher can calculate the new animation parameters of the transparency, and send the corresponding animation identifier, update instruction, and new animation parameters of the transparency to the window compositor. After receiving the update instruction, the window compositor can first search for the local animation unit of the animation to be updated according to the animation identifier, and after finding the corresponding local animation unit, the window compositor fuses the new animation parameters of the transparency with the existing animation parameters in the local animation unit to update the transparency in the local animation unit, so that the window compositor can make the image more transparent when playing the next frame of image.

[0097] For the cancel instruction, the desktop launcher can send the animation identifier of the animation to be stopped and the cancel instruction to the window compositor, and the window compositor stops playing the corresponding local animation unit based on the animation identifier after receiving the cancel instruction.

[0098] For the delete instruction, the desktop launcher can send the animation identifier of the animation to be deleted and the delete instruction to the window compositor, and the window compositor can delete the corresponding local animation unit based on the animation identifier after receiving the delete instruction. For example, after the desktop launcher determines that a certain animation is no longer needed to be played, the desktop launcher can send the animation identifier of the animation to be deleted and the delete instruction to the window compositor, and the window compositor can delete the corresponding local animation unit after receiving the corresponding delete instruction, so as to release the system resources occupied by the animation unit and improve the system performance.

[0099] As can be seen from the above embodiments, the electronic device can realize the control of the playing and pausing of the animations of multiple windows by defining the animation unit. The playing and pausing control process of the animations of multiple windows by the electronic device can be different in different scenarios. In order to facilitate understanding, the scenarios that can exist in the animation playing process of the electronic device are introduced as follows.

[0100] Scenario one, the electronic device plays a start-up animation in the window of application A, and the user triggers an operation to exit application A. The start-up animation can also be referred to as an enlargement animation.

[0101] Exemplarily, FIG. 4 is a schematic diagram of animation control in scenario one according to an embodiment of the present application. As shown in FIG. 4, interface A, interface B, and interface C are schematic diagrams of three frames of images in the process of playing the enlargement animation of application A. When the enlargement animation is played to the image shown in interface C, in response to the user triggering the operation to interrupt the playing of the enlargement animation, the electronic device can play the reduction animation shown in interface D, interface E, and interface F. It can be understood that the electronic device can make the user feel the smoothness of the system operation process of the electronic device by playing the reduction animation, thereby improving the user experience.

[0102] For ease of understanding, in the following, the animation initiator is taken as the desktop launcher, and the window animation is taken as the enlargement animation of application A as an example. In combination with FIG. 5, the process in which the electronic device plays the reduction animation in the scenario that the user interrupts the playing of the enlargement animation is introduced from the perspective of the interaction between the desktop launcher and the window compositor. Specifically as follows.

[0103] FIG. 5 is a flowchart of an animation control method 500 according to an embodiment of the present application. The animation control method 500 can be executed by an electronic device. The hardware structure of the electronic device can be as shown in FIG. 2, and the software structure can be as shown in FIG. 3. As shown in FIG. 5, the method 500 includes the following steps.

[0104] S501, in response to the user clicking the icon of application A, the desktop launcher calculates the animation parameters of the enlargement animation.

[0105] The enlargement animation can be the start-up animation of the information application program as shown in FIG. 1, and the window gradually increases during the playing process.

[0106] Optionally, the animation parameters can include one or more combinations of the position, size, scaling matrix, rotation matrix, transparency, color, and other attributes of the image in each frame of the enlargement animation.

[0107] S502, the desktop launcher sends the related information of the animation unit of the enlargement animation to the window compositor.

[0108] The related information of the animation unit of the enlargement animation can include the animation identifier of the enlargement animation, the window or layer to which the enlargement animation belongs, the animation parameters, and the initial instruction. The initial instruction can be a creation instruction or a start-up instruction. The creation instruction and the start-up instruction can be as described above, and will not be described here again.

[0109] Optionally, in the case that the animation unit corresponding to the zoom-in animation does not exist in the local storage space of the window compositor, the desktop launcher can send a creation instruction to the window compositor, so that the window compositor, after receiving the creation instruction, creates the animation unit corresponding to the zoom-in animation based on the animation identifier of the zoom-in animation, the window or layer to which the zoom-in animation belongs, and the animation parameters.

[0110] In the case that the animation unit corresponding to the zoom-in animation exists in the window compositor, the desktop launcher can send a start instruction to the window compositor, so that the window compositor, after receiving the start instruction, finds the local animation unit based on the animation identifier of the zoom-in animation, and fuses the animation parameters of the zoom-in animation into the local animation unit corresponding to the zoom-in animation.

[0111] In some scenarios, the desktop launcher can calculate the animation parameters in advance and preset them to the window compositor after the electronic device is powered on or when the electronic device is idle. After the user clicks the icon of application A, the desktop launcher can send an initial instruction to the window compositor, so as to improve the animation playing efficiency and reduce the possibility of the electronic device freezing during the playing of the animation, thereby improving the user experience.

[0112] S503, after the window compositor receives the related information of the animation unit of the zoom-in animation, the window compositor plays the zoom-in animation.

[0113] It should be understood that, after the window compositor receives the related information of the animation unit of the zoom-in animation, the window compositor can create a local animation unit for the zoom-in animation based on the type of the initial instruction, or update the existing local animation unit of the zoom-in animation.

[0114] Optionally, in the case that the initial instruction is a creation instruction, the window compositor can create a local animation unit for the zoom-in animation based on the animation identifier of the zoom-in animation and the window or layer to which the zoom-in animation belongs, and save the animation parameters in the local animation unit of the zoom-in animation.

[0115] It should be understood that, in the case that the initial instruction is a creation instruction, when the desktop launcher needs to play the zoom-in animation, the desktop launcher can send a start instruction to the window compositor, so that the window compositor plays the zoom-in animation based on the created local animation unit.

[0116] Alternatively, in the case that the initial instruction is a start instruction, the window compositor can find the local animation unit based on the animation identifier of the zoom-in animation, and fuse the animation parameters of the zoom-in animation into the local animation unit to obtain an updated local animation unit. Moreover, the window compositor can start playing the updated local animation unit in the next frame of the animation playing.

[0117] S504, during the playing of the zoom-in animation of application A, in response to a trigger operation of the user interrupting the zoom-in animation, the desktop launcher calculates the animation parameters of the zoom-out animation.

[0118] It can be understood that when the zoom-in animation is played to the image as shown in interface C in FIG. 4, if the user interrupts the playing of the zoom-in animation at this time, the desktop launcher calculates the animation parameters of the zoom-out animation in response to the triggering operation of the user interrupting the zoom-in animation.

[0119] Exemplarily, the desktop launcher can send a query instruction to the window compositor to obtain the playing progress of the current zoom-in animation. Alternatively, the playing progress can be the animation parameters of the frame corresponding to the currently played zoom-in animation, for example, can be the position, size and the like of the current frame. When the desktop launcher obtains the animation parameters of the currently played frame, the animation parameters of the zoom-out animation are calculated based on the animation parameters of the currently played frame. In order to facilitate understanding, the process of the desktop launcher calculating the animation parameters of the zoom-out animation is introduced below.

[0120] It can be understood that the zoom-out animation can be an animation of zooming out from the image of the currently played frame to the icon of application A. Exemplarily, the desktop launcher can determine the total duration and the total number of frames of the zoom-out animation, and obtain the position and size of the currently played image based on the obtained animation parameters of the currently played frame, and obtain the position and size of the icon of application A. Then, the desktop launcher can calculate the position change amount of each frame based on the position of the currently played image and the position of the icon of application A, and calculate the size change amount of each frame of the image based on the size of the currently played image and the size of the icon of application A.

[0121] After the desktop launcher calculates the position change amount and the size change amount of each frame of the zoom-out animation, the animation parameters of the zoom-out animation can be obtained based on the position change amount and the size change amount of each frame of the image.

[0122] S505, the desktop launcher sends the related information of the animation unit of the zoom-out animation to the window compositor.

[0123] The related information of the animation unit of the zoom-out animation can include one or more of the animation identifier of the zoom-out animation, the window or layer to which it belongs, the animation parameters and the control instruction.

[0124] In an implementation manner, the control instruction can be used to make the window compositor playing the zoom-in animation play the zoom-out animation. Therefore, it can be understood that the process of making the window compositor playing the zoom-in animation play the zoom-out animation can be realized by the instruction of stopping playing the zoom-in animation and playing the zoom-out animation, that is, the control instruction can include the instruction of stopping playing the zoom-in animation and the instruction of playing the zoom-out animation.

[0125] The instruction for stopping playing the zoom-in animation can be a cancel instruction, and the instruction for playing the zoom-out animation can be a create instruction and / or a start instruction.

[0126] It can be understood that if the control instruction includes a cancel instruction, the desktop launcher can further send an animation identifier of the zoom-in animation to the window compositor, so that after the window compositor receives the cancel instruction, the window compositor finds a local animation unit of the zoom-in animation based on the animation identifier of the zoom-in animation, and stops playing the zoom-in animation.

[0127] If the control instruction includes a creation instruction or a start instruction, the animation parameter corresponding to the creation instruction or the start instruction is the animation parameter of the zoom-out animation, and it can be understood that the animation parameter of the zoom-out animation calculated in S504.

[0128] It should be noted that the creation instruction or the start instruction of the zoom-out animation can refer to the description of the creation instruction or the start instruction of the zoom-in animation in the foregoing, which will not be described here.

[0129] In another implementation manner, the process of causing the window compositor playing the zoom-in animation to play the zoom-out animation can be implemented by updating the animation parameter of the zoom-in animation, for example, the control instruction can be an update instruction. It can be understood that if the control instruction is the update instruction, the animation parameter can include a scaling matrix.

[0130] For example, after obtaining the total number of frames of the zoom-out animation, the scaling ratio of each frame image can be calculated based on the size of the image of the currently played frame and the size of the application icon, and then the scaling matrix of each frame image of the zoom-out animation can be obtained based on the scaling ratio of each frame image, so as to obtain the animation parameter of the updated zoom-in animation, so that the zoom-in animation is switched to the zoom-out animation.

[0131] S506, after the window compositor receives the related information of the animation unit of the zoom-out animation, the window compositor plays the zoom-out animation.

[0132] After the window compositor receives the related information of the animation unit of the zoom-out animation, if the control instruction includes a cancel instruction and a creation instruction or a start instruction, the window compositor can stop playing the zoom-in animation based on the cancel instruction, and play the animation of the zoom-out animation based on the creation instruction or the start instruction.

[0133] It can be understood that after the window compositor stops playing the zoom-in animation based on the cancel instruction, the local animation unit playing the zoom-out animation can be created or started based on the creation instruction or the start instruction and the animation parameter of the zoom-out animation. It can be understood that the implementation manner of creating or starting the zoom-out animation is similar to the implementation manner of creating or starting the zoom-in animation in S503, which will not be described here.

[0134] Alternatively, if the control instruction is an update instruction, after the window compositor receives the update instruction, the window compositor finds the corresponding local animation unit based on the animation identifier, and fuses the animation parameter of the zoom-out animation with the existing animation parameter in the local animation unit to obtain an updated local animation unit.

[0135] It can be understood that, in the case that the control instruction is a cancel instruction and a create instruction, or in the case that the control instruction is a cancel instruction and a start instruction, the window compositor can realize the playing of the zoom-out animation by playing the animation parameters corresponding to the local animation unit of the zoom-out animation in the next frame. Or, in the case that the control instruction is an update instruction, the window compositor can realize the playing of the zoom-out animation by playing the updated animation parameters corresponding to the local animation unit of the zoom-out animation.

[0136] Exemplarily, after the user triggers the operation of interrupting the zoom-in animation in interface C as shown in FIG. 5, the desktop launcher can calculate the animation parameters of the zoom-out animation, and send the related information of the zoom-out animation to the window compositor, so that the window compositor can play the images of the zoom-out animation shown in interfaces D, E and F as shown in FIG. 5 in sequence after the interrupting triggering operation.

[0137] In the embodiment of the present application, the method 500 can enable the electronic device to quickly switch and play a new animation in the case that the user interrupts the playing of the animation, improve the flexibility of the animation control, and enhance the user experience.

[0138] Scenario two: after playing the start animation of the application A, the electronic device continues to play the initial animation of the application A.

[0139] The start animation can be the zoom-in animation as shown in FIG. 1, which is an animation that gradually enlarges the application A from the icon state to the full-screen state. The initial animation of the application A can be an animation played by the application A after the playing of the start animation, for example, an animation that displays the logo and name of the application A, which is not limited herein.

[0140] Exemplarily, FIG. 6 is a schematic diagram of the animation control in scenario two provided by the embodiment of the present application. As shown in FIG. 6, if the application program started by the user is a browser, after the user clicks the browser icon in interface A as shown in FIG. 6, the electronic device plays the zoom-in animation as shown in interfaces B and C in FIG. 6. When the zoom-in animation is played to interface D as shown in FIG. 6, the electronic device can play the initial animation.

[0141] Next, in combination with FIG. 7, how to make the window compositor control the playing or stopping of the zoom-in animation and the initial animation in the case that the start animation of the application A is played and the initial animation is continued to be played will be introduced, which realizes the control of multiple window animations by the electronic device. Specifically as follows.

[0142] FIG. 7 is a flowchart of an animation control method 700 provided by the embodiment of the present application. The animation control method 700 can be executed by the electronic device, the hardware structure of the electronic device can be as shown in FIG. 2, and the software structure can be as shown in FIG. 3. As shown in FIG. 7, the method 700 includes the following steps:

[0143] S701, in response to an operation of a user clicking an application A icon, the desktop launcher calculates animation parameters of a zoom-in animation.

[0144] S702, the desktop launcher sends information related to animation units of the zoom-in animation to a window compositor.

[0145] S703, after the window compositor receives the information related to the animation units of the zoom-in animation, the window compositor plays the zoom-in animation.

[0146] It should be understood that the embodiments of S701-S703 are similar to the embodiments of S501-S503 described above, and specific reference can be made to the description above, which will not be repeated here.

[0147] S704, the desktop launcher calculates animation parameters of an initial animation.

[0148] It can be understood that the animation parameters of the initial animation are similar to the animation parameters of the zoom-in animation, and can also include a combination of one or more of the positions, sizes, scaling matrices, rotation matrices, transparencies, colors, and other attributes of the images in each frame of the initial animation, which are not limited here.

[0149] S705, the desktop launcher sends information related to animation units of the initial animation to the window compositor.

[0150] The information related to the animation units of the initial animation can include one or more of the animation identifier of the initial animation, the window or layer to which it belongs, the animation parameters, and the control instruction.

[0151] Optionally, the control instruction can be used to make the window compositor playing the zoom-in animation play the initial animation. Therefore, it can be understood that the process of making the window compositor playing the zoom-in animation play the initial animation can be realized by an instruction to stop playing the zoom-in animation and an instruction to play the initial animation, that is, the control instruction B can include an instruction to stop playing the zoom-in animation and an instruction to play the initial animation.

[0152] The instruction to stop playing the zoom-in animation can be a cancel instruction, and the instruction to play the initial animation can be a create instruction or a start instruction.

[0153] It should be noted that the animation parameters corresponding to the create instruction or the start instruction corresponding to the control instruction can be the animation parameters of the initial animation. The create instruction or the start instruction of the initial animation can refer to the description of the create instruction or the start instruction of the zoom-in animation in S503, which will not be repeated here.

[0154] S706, after the window compositor receives the information related to the animation units of the initial animation, the window compositor plays the initial animation.

[0155] After the window compositor receives the related information of the animation unit of the initial animation, the playing of the zoom-in animation can be stopped based on the cancel instruction, and then the animation of the initial animation can be played based on the create instruction or the start instruction. It can be understood that after the window compositor stops playing the zoom-in animation based on the cancel instruction, the local animation unit for playing the initial animation can be created or started based on the create instruction or the start instruction and the animation parameters of the initial animation. It can be understood that the implementation of creating or starting to play the initial animation is similar to the implementation of playing the zoom-in animation in S503, and details are not described herein.

[0156] Optionally, in order to make the switching between the zoom-in animation and the initial animation more natural and smooth, after the window compositor receives the cancel instruction for stopping the zoom-in animation, the window compositor can not immediately stop the playing of the zoom-in animation, but can continue to multicast several frames of images of the zoom-in animation, and gradually reduce the transparency of the zoom-in animation during the process of multicasting the several frames of images of the zoom-in animation, so that the images corresponding to the zoom-in animation are more transparent, and the zoom-in animation and the initial animation can be naturally connected.

[0157] For example, after the electronic device plays to the image shown in interface D in FIG. 6, several frames of images of the zoom-in animation can be played, and the transparency of the images of the zoom-in animation can be gradually reduced, so that the transition between the zoom-in animation and the initial animation is more natural.

[0158] In the embodiment of the present application, through the method 700, after the window compositor receives the related information of the animation unit of the initial animation, the window compositor can control the playing or stopping of the zoom-in animation and the initial animation, the electronic device controls multiple window animations is realized, the flexibility of animation control is improved, and the user experience is enhanced.

[0159] Scenario three, in the process that the electronic device is playing the start animation of the application A, the user triggers the operation of starting the application B.

[0160] Exemplarily, FIG. 8 is a schematic diagram of animation control of scenario three provided by the embodiment of the present application, as shown in FIG. 8, after the user clicks the information application program icon in interface A in FIG. 8, the electronic device plays the zoom-in animation of the information application program, interfaces B and C in FIG. 8 can be schematic diagrams of two frames of images in the process of playing the zoom-in animation of the information application program, when the zoom-in animation is played to the image shown in interface C, the user triggers the operation of starting the telephone application program. At this time, the electronic device can play the zoom-in animation of the telephone application program as shown in interfaces D, E and F in FIG. 8

[0161] For ease of understanding, the following describes how the window compositor controls the playing and stopping of window animations of application A and application B, that is, how the window compositor controls the playing and pausing of multiple window animations, so that the multiple window animations can be played in parallel, in a scenario where the user triggers the operation of starting application B in the process of the electronic device playing the zoom-in animation of application A, in combination with FIG. 9. Specifically as follows.

[0162] FIG. 9 is a flow diagram of an animation control method 900 provided by an embodiment of the present application. The animation control method 900 can be executed by an electronic device, the hardware structure of the electronic device can be as shown in FIG. 2, and the software structure can be as shown in FIG. 3. As shown in FIG. 9, the method 900 includes the following steps:

[0163] S901, in response to the user clicking the icon of application A, the desktop launcher calculates the animation parameters of the zoom-in animation of application A.

[0164] S902, the desktop launcher sends the window compositor the related information of the animation unit of the zoom-in animation of application A.

[0165] S903, after the window compositor receives the related information of the animation unit of the zoom-in animation of application A, the window compositor plays the zoom-in animation of application A.

[0166] It should be understood that the embodiments of S901-S903 are similar to the embodiments of S501-S503, and the description above can be referred to, which will not be repeated here.

[0167] S904, in the process of application A playing the zoom-in animation, in response to the user triggering the operation of starting application B, the desktop launcher calculates the animation parameters of the zoom-in animation of application B.

[0168] It can be understood that when the zoom-in animation of application A is played to the image displayed in interface C as shown in FIG. 8, if the user starts application B at this time, in response to the user triggering the operation of starting application B, the desktop launcher calculates the animation parameters of the zoom-in animation of application B.

[0169] S905, the desktop launcher sends the window compositor the related information of the animation unit of the zoom-in animation of application B.

[0170] The related information of the animation unit of the zoom-in animation of application B can include one or more of the animation identifier, the window or layer to which the zoom-in animation of application B belongs, the animation parameters, and the control instruction.

[0171] It can be understood that the control instruction can be used to make the window compositor playing the zoom-in animation of the application A play the zoom-in animation of the application B, and thus it can be understood that the process of making the window compositor playing the zoom-in animation of the application A play the zoom-in animation of the application B can be implemented by creating an instruction or starting an instruction.

[0172] It should be noted that if the control instruction is a creation instruction or a starting instruction, the animation parameters corresponding to the creation instruction or the starting instruction can be the animation parameters of the zoom-in animation of the application B. The creation instruction or the starting instruction of the zoom-in animation of the application B can refer to the description of the creation instruction or the starting instruction of the zoom-in animation in S503, which will not be described here.

[0173] Optionally, the control instruction can further include a cancel instruction, wherein the cancel instruction can be used to make the window compositor stop playing the zoom-in animation of the application A. If the control instruction further includes the cancel instruction, the desktop launcher can further send the animation identifier of the zoom-in animation of the application A to the window compositor, so that after the window compositor receives the cancel instruction, it finds the corresponding local animation unit based on the animation identifier of the zoom-in animation of the application A and controls it to stop playing the zoom-in animation of the application A.

[0174] S906, after the window compositor receives the related information of the animation unit of the zoom-in animation of the application B, the window compositor plays the zoom-in animation of the application B.

[0175] It should be understood that after the window compositor receives the related information of the animation unit of the zoom-in animation of the application B, if the control instruction is a creation instruction or a starting instruction, a local animation unit can be created for the zoom-in animation based on the animation parameters of the zoom-in animation of the application B, or the existing animation unit of the zoom-in animation can be updated.

[0176] Optionally, in the case where the control instruction is a creation instruction, the window compositor can create a local animation unit of the starting animation of the application B in the local storage space based on the animation identifier of the zoom-in animation of the application B and the window or layer to which it belongs, and save the animation parameters in the local animation unit.

[0177] It should be understood that in the case where the control instruction is a creation instruction, when the desktop launcher needs to play the zoom-in animation of the application B, the desktop launcher can send a starting instruction to the window compositor, so that the window compositor plays the zoom-in animation based on the created animation unit of the zoom-in animation of the application B.

[0178] Or, in the case of the control instruction is a start instruction, the desktop launcher looks for a local animation unit of the zoom-in animation of the application B in the local storage space, after finding the local animation unit of the zoom-in animation of the application B, fuses the animation parameters of the zoom-in animation of the application B into the local animation unit, obtains an updated local animation unit, and the window compositor can start playing the updated local animation unit in the next frame of the animation playing.

[0179] Exemplarily, after the window compositor receives the control instruction, the schematic diagram of the zoom-in animation as shown in interface D, interface E and interface F in FIG. 8 can be played. The animation control method 900 provided by the embodiment of the application can realize the control of playing and pausing of multiple window animations, so that the multiple window animations can be played in parallel, the flexibility of animation control is improved, and the user experience is enhanced.

[0180] It should be understood that FIG. 4, FIG. 6 and FIG. 8 described above are exemplary schematic diagrams, and more or fewer controls or information can be included in the actual interface, and the specific interface does not limit the content included.

[0181] It should be understood that in the embodiment of the application, the electronic device can be in different scenes at different time points, and therefore the implementation manners corresponding to the above three scenes can be used in combination. That is, the method 500, the method 700 and the method 900 shown above can also be implemented separately or in combination. The application does not make a specific limitation in this regard.

[0182] For ease of understanding, the process of controlling multiple animations of the same window and controlling multiple animations of different windows provided by the animation control method of the embodiment of the application will be described below in combination with FIG. 10. The multiple animations of different windows can belong to the same application program or different application programs, which is not limited here. It can be understood that if the multiple animations of different windows belong to the same application program, the control process can correspond to the above-mentioned scenario two, and if the multiple animations of different windows belong to different application programs, the control process can correspond to the above-mentioned scenario three.

[0183] FIG. 10 is a flowchart of an animation control method 1000 provided by an embodiment of the application. The animation control method 1000 can be executed by an electronic device, the hardware structure of the electronic device can be as shown in FIG. 2, and the software structure can be as shown in FIG. 3. As shown in FIG. 10, the method 1000 includes the following steps:

[0184] S1001, the desktop launcher calculates the animation parameters of the window 1.

[0185] Taking that window 1 can play animation 1 and animation 2 as an example, the desktop launcher can calculate the animation parameters of animation 1 and the animation parameters of animation 2 respectively. It can be understood that animation 1 of window 1 can correspond to the zoom-in animation of application A in the embodiment of FIG. 5, and animation 2 of window 1 can correspond to the zoom-out animation of application A in the embodiment of FIG. 5.

[0186] After the animation parameters of window 1 are calculated, the desktop launcher can perform step S1002.

[0187] S1002, the desktop launcher sends the animation parameters to the window compositor.

[0188] For example, taking that the local animation unit of animation 1 is stored in the window compositor and the local animation unit of animation 2 is not stored as an example, when window 1 needs to play animation 1, the desktop launcher can send the animation parameters of animation 1 and the start instruction of animation 1 to the window compositor. The animation parameters of animation 1 can include the animation identifier of animation 1, the window or layer to which animation 1 belongs, and / or the parameter information of each frame image in animation 1, and so on.

[0189] The desktop launcher can also send the animation parameters of animation 2 and the creation instruction of animation 2 to the window compositor. The animation parameters of animation 2 can include the animation identifier of animation 2, the window or layer to which animation 2 belongs, and / or the parameter information of each frame image in animation 2, and so on.

[0190] S1003, the window compositor receives and saves the animation parameters and plays the animation.

[0191] It can be understood that after the window compositor obtains the animation parameters of animation 1, based on the start instruction of animation 1, the window compositor can find the local animation unit that already exists in the local by using the animation identifier, fuse the parameter information of each frame image of animation 1 into the local animation unit, and play animation 1. The process of playing animation 1 of window 1 can refer to the process of playing the zoom-in animation in the embodiment of FIG. 5.

[0192] After the window compositor obtains the animation parameters of animation 2, the window compositor can create the local animation unit of animation 2 in the local storage space based on the creation instruction of animation 2, the animation identifier, and / or the window or layer to which animation 2 belongs, and save the parameter information of each frame image of animation 2 in the local animation unit of animation 2.

[0193] S1004, the desktop launcher updates the animation state of window 1.

[0194] The animation state of the desktop launcher update window 1 can be understood as a state in which the window 1 switches from not playing the animation 2 to needing to play the animation 2. For example, the animation state of the desktop launcher update window 1 can include that, after the user triggers the operation of interrupting the playing of the zoom-in animation in the embodiment of FIG. 5, the desktop launcher can update the animation state, that is, start the playing of the zoom-out animation.

[0195] After the desktop launcher updates the animation state of the window 1, the desktop launcher can perform step S1005.

[0196] S1005, the desktop launcher sends the animation parameters to the window compositor.

[0197] When the window 1 needs to play the animation 2, the desktop launcher can send the animation parameters of the animation 2 and the start instruction of the animation 2 to the window compositor. The animation parameters of the animation 2 can include the animation identifier of the animation 2 and the like. It can be understood that, if the animation parameters of the animation 2 change, the animation parameters of the animation 2 can also include the changed animation parameters.

[0198] S1006, the window compositor receives and saves the animation parameters of the animation 2, and plays the animation 2.

[0199] When the window compositor obtains the animation parameters of the animation 2 and the start instruction of the animation 2, the window compositor can find a local animation unit that already exists locally based on the animation identifier of the animation 2, update the animation parameters of the animation 2, and play the animation 2 based on the start instruction of the animation 2.

[0200] In a possible scenario, after the window compositor obtains the animation parameters of the animation 2, the window compositor can fuse the animation parameters of the animation 1 and the animation parameters of the animation 2. For example, in S706 described above, after the window compositor receives the cancel instruction of stopping the zoom-in animation, the window compositor can not immediately stop the playing of the zoom-in animation, but continue to multicast a few frames of images of the zoom-in animation, and gradually reduce the transparency of the zoom-in animation in the process of multicasting the few frames of images of the zoom-in animation. In this process, the animation parameters of the animation 1 can be fused into the animation parameters of the animation 2.

[0201] In another possible scenario, after the window compositor obtains the animation parameters of the animation 2, the window compositor finds a local animation unit that already exists locally based on the animation identifier of the animation 2, updates the animation parameters of the animation 2, and then plays the animation 2.

[0202] It can be understood that the above S1001-S1006 are operations of the desktop launcher for controlling the playing and pausing of multiple animations of the same window through a control instruction, which can make the connection between multiple animations of the same window more smooth, improve the flexibility of animation control, and enhance the user experience.

[0203] On the other hand, S1007-S1013 below are operations of playing and pausing a plurality of animations of different windows by the desktop launcher through control instructions. Details are as follows.

[0204] S1007, the desktop launcher calculates animation parameters of the window 2.

[0205] Taking that the window 2 can play the animation 3 as an example, the desktop launcher can calculate the animation parameters of the animation 3 of the window 2. It can be understood that the animation 3 can correspond to the magnification animation of the application B in the embodiment of FIG. 9.

[0206] After the animation parameters of the animation 3 are calculated, the desktop launcher can execute step S1008.

[0207] S1008, the desktop launcher sends the animation parameters to the window compositor.

[0208] Exemplarily, taking that the local storage unit of the window compositor stores the animation 3 as an example, when the window 2 needs to play the animation 3, the desktop launcher can send the animation parameters of the animation 3 and the start instruction of the animation 3 to the window compositor. Among them, the animation parameters of the animation 3 can include one or more of the animation identifier of the animation 3, the window or layer to which it belongs, and the parameter information of each frame image in the animation 3.

[0209] S1009, the window compositor receives and saves the animation parameters and plays the animation.

[0210] After the window compositor obtains the animation parameters of the animation 3, based on the start instruction of the animation 3, the window compositor can find the local animation unit that already exists in the local through the animation identifier of the animation 3, and fuse the parameter information of each frame image of the animation 3 into the local animation unit, and play the animation 3. The process of playing the animation 3 of the window 2 can refer to the related description of playing the magnification animation of the application B in the corresponding embodiment of FIG. 9.

[0211] S1010, the desktop launcher updates the animation state of the window 2.

[0212] Among them, the desktop launcher updating the animation state of the window 2 can be understood as that the window 2 switches from the state of playing the animation 3 to the state of playing the animation 4. For example, the desktop launcher updating the animation state of the window 2 can include the state of switching from playing the magnification animation to playing the initial animation in the embodiment of FIG. 7.

[0213] After the desktop launcher updates the animation state of the window 2, the desktop launcher can execute step S1011.

[0214] S1011, the desktop launcher sends the animation parameters to the window compositor.

[0215] When the window 2 switches from the state of playing the animation 3 to the state of playing the animation 4, the desktop launcher can send the animation parameters of the animation 3 and the cancel instruction of the animation 3 to the window compositor, wherein the animation parameters of the animation 3 can include the animation identifier of the animation 3 and the like.

[0216] The desktop launcher can also send the animation parameters of the animation 4 and the start instruction of the animation 4 to the window compositor. The animation parameters of the animation 4 can include the animation identifier of the animation 4 and the like, and it can be understood that if the animation parameters of the animation 4 change, the animation parameters of the animation 4 can also include the changed animation parameters.

[0217] S1012, the desktop launcher receives and saves the animation parameters and plays the animation.

[0218] It can be understood that after the window compositor obtains the animation parameters of the animation 3, based on the cancel instruction of the animation 3, the window compositor can find the local animation unit that already exists locally through the animation identifier, and stop playing the local animation unit of the animation 3.

[0219] When the window compositor obtains the animation parameters of the animation 4 and the start instruction of the animation 4, the window compositor can find the local animation unit that already exists locally based on the animation identifier of the animation 4, update the animation parameters of the animation 4, and play the animation 4 based on the start instruction of the animation 4.

[0220] S1013, the desktop launcher plays the animations of the window 1 and the window 2 until the animations are played to the end.

[0221] That is, after the animation of the window 1 is played to the end, the desktop launcher continues to play the animation of the window 2 until the animation of the window 2 is played to the end.

[0222] FIG. 11 shows an animation control method according to an embodiment of the present application. The method comprises:

[0223] S1101, in response to a first operation of triggering starting a first application, playing a first start animation of the first application.

[0224] The first application can be an application program in the electronic device, for example, an information, telephone, or browser application program. The first operation can be a triggering operation of starting the first application by the user, for example, the first operation can be an operation of the user clicking a first application icon, or the first operation can be an operation of the user giving a voice instruction to open the first application to a voice assistant of the electronic device, which is not limited here. The first start animation can be an animation of transitioning from the first application icon to full-screen display of the first application window, which can be referred to the description of the start animation above, and will not be described here.

[0225] In the embodiments of this application, in response to the user triggering the first operation of starting the first application, the electronic device can play the first start animation of the first application. For example, in response to the user triggering the operation of starting the application A, the electronic device can play the start animation of the application A. For details, reference can be made to the related description of S501-S503 in the corresponding embodiment of FIG. 5, which will not be repeated here.

[0226] S1102, in the process of playing the first start animation, receiving the second operation of triggering the start of the second application.

[0227] In the embodiments of this application, the second application can be an application program other than the first application in the electronic device, and the second operation can be an operation of the user triggering the start of the second application. In the process of playing the first start animation, the user triggers the second operation of starting the second application, for example, the image displayed in interface C in FIG. 8 can be referred to. Wherein, the first application can be an information application program, and the second application can be a telephone application program. When the first start animation is played to the image displayed in interface C, the user triggers the second operation of starting the second application, and the electronic device can receive the second operation of triggering the start of the second application.

[0228] S1103, in response to the second operation, continuing to play the first start animation and playing the second start animation of the second application, wherein the second start animation is in the upper layer of the first start animation.

[0229] Wherein, the second start animation can be an animation of transitioning from the second application icon to the full-screen display of the second application window. For details, reference can be made to the description of the start animation in the foregoing, which will not be repeated here.

[0230] In the embodiments of this application, in response to the user triggering the second operation of starting the second application, the electronic device can continue to play the first start animation and play the second start animation of the second application. It can be understood that when playing the first start animation and the second start animation, the second start animation can be in the upper layer of the first start animation, that is, the second start animation can be overlaid on the first start animation. For example, in response to the second operation, the process of continuing to play the first start animation and playing the second start animation of the second application can refer to the related description of S904-S906 in the corresponding embodiment of FIG. 9, which will not be repeated here.

[0231] In the embodiments of this application, in the process of the electronic device playing the first start animation, in response to the second operation of triggering the start of the second application, the electronic device can continue to play the first start animation and play the second start animation. In this way, the electronic device can play the animations of multiple windows in parallel, improve the flexibility of the electronic device in playing the animations, and improve the user experience.

[0232] Optionally, before playing the first start animation of the first application, the method further includes: calculating a first animation parameter of the first start animation, the first animation parameter including one or more animation parameters used for playing the first start animation. The playing of the first start animation of the first application includes: playing the first start animation of the first application based on the first information, wherein the first information includes the first animation identifier, the first animation parameter, and a first instruction, and the first instruction is used to instruct to play the first start animation.

[0233] The animation parameter can include one or more of the following: a position, a size, a scaling matrix, a rotation matrix, a transparency, a color, and the like of an image. The first animation identifier can be used to uniquely identify the first animation. The first animation identifier can be represented by a number or a string, for example. The first instruction can be used to instruct the window compositor to play the first start animation. The first instruction can be the same as the start instruction described above.

[0234] The first information can correspond to the animation unit described above. The first information can be sent to the window compositor by the desktop launcher.

[0235] The desktop launcher can calculate the first animation parameter, and send the first information, i.e., the first animation identifier, the first animation parameter, and the first instruction, to the window compositor. The window compositor can play the first start animation of the first application based on the first information. The process can be the same as the process described above with reference to S501-S503 in FIG. 5.

[0236] The desktop launcher can calculate the first animation parameter, and send the first information, i.e., the first animation identifier, the first animation parameter, and the first instruction, to the window compositor. The window compositor can play the first start animation of the first application based on the first information. The process can be the same as the process described above with reference to S501-S503 in FIG. 5.

[0237] In the embodiments of the present application, the desktop launcher can calculate the first animation parameter before playing the first start animation of the first application, and send the first animation parameter, the corresponding first animation identifier, and the first instruction to the window compositor for playing. In this way, the electronic device can control the playing of the first start animation, and the flexibility of animation control is improved. Moreover, the first parameter can be calculated in advance before playing the animation, so that the burden of real-time calculation is reduced, the smoothness of animation playing is improved, and the user experience is improved.

[0238] Optionally, based on the corresponding embodiment of FIG. 11, before playing the first start animation of the first application based on the first information, further comprising: based on the second instruction, locally saving the second information, the second information comprising the first animation identifier and the second animation parameter, the second animation parameter being the same as or different from the first animation parameter. Playing the first start animation of the first application based on the first information comprises: based on the first instruction, searching the locally saved second animation parameter according to the first animation identifier; updating the locally saved second animation parameter in combination with the first animation parameter, and playing the first start animation based on the first animation parameter.

[0239] The second animation parameter can comprise one or more animation parameters of the first start animation. Similar to the first animation parameter, the second animation parameter can also be calculated by the desktop launcher. The second instruction can be used to instruct the window compositor to locally save the second information.

[0240] It can be understood that after the desktop launcher calculates the second animation parameter, the desktop launcher can send the second instruction, the first animation identifier and the second animation parameter to the window compositor. After receiving the second instruction, the first animation identifier and the second animation parameter, the window compositor can save the second information locally based on the second instruction. The window compositor locally saving the second information can be understood as the window compositor establishing a local animation unit as described above, that is, the window compositor can create a local animation unit based on the second instruction and the first animation identifier, and save the second animation parameter to the local animation unit.

[0241] The second instruction can be understood as the creation instruction described above, which can be used to instruct the window compositor to create a local animation unit. The first instruction can be understood as the start instruction described above, which can be used to make the window compositor play the animation. It can be understood that the second animation parameter can be the same as or different from the first animation parameter.

[0242] If the second animation parameter is the same as the first animation parameter, it can be understood that the desktop launcher does not update the window animation when playing the animation, and still plays the pre-calculated second animation parameter. If the second animation parameter is different from the first animation parameter, it can be understood that the desktop launcher updates the window animation when playing the animation, and needs to update the pre-calculated second animation parameter based on the first animation parameter.

[0243] In the embodiments of the present application, if the window compositor locally saves the second information, it can be understood that the window compositor has a corresponding local animation unit as described above. After the window compositor receives the first information, it can search the locally stored second animation parameter based on the first animation identifier, and update the locally saved second animation parameter based on the first animation parameter. The process of updating the locally saved second animation parameter based on the first animation parameter can be referred to the description of updating the local animation unit of the window compositor as described above, which will not be described here.

[0244] Further, the window compositor can play the first start-up animation based on the first animation parameter, for example, refer to the related description of S503 in the corresponding embodiment of FIG. 5, which is not repeated here.

[0245] Optionally, if the second animation parameter and the first animation parameter are the same, the locally saved second animation parameter can not be updated, and the first start-up animation can be played based on the second animation parameter, which is not limited here.

[0246] In the embodiments of the present application, the second animation parameter locally saved by the window compositor can be updated based on the first animation parameter, so that the electronic device updates the animation being played in the process of playing the animation, which can improve the flexibility of the electronic device playing the animation and improve the user experience.

[0247] Optionally, based on the corresponding embodiment of FIG. 11, the second instruction further includes a sub-instruction, and after the first start-up animation is played, the first animation identifier and the animation parameter of the locally saved first start-up animation are retained based on the sub-instruction.

[0248] In the embodiments of the present application, the second instruction can further include a sub-instruction, wherein the sub-instruction can be used to instruct the window compositor to retain the first animation identifier and the animation parameter of the locally saved first start-up animation after the first start-up animation is played, which can also be understood as instructing the window compositor not to automatically delete the first animation identifier and the animation parameter of the locally saved first start-up animation after the first start-up animation is played.

[0249] In the embodiments of the present application, the window compositor can not automatically delete the corresponding first animation identifier and the animation parameter of the locally saved first start-up animation after the animation is played, which can also be understood as not automatically deleting the local animation unit in the above, thereby reducing the process of recalculating the animation parameter when the animation is played repeatedly, and thus improving the efficiency of playing the animation.

[0250] Optionally, based on the corresponding embodiment of FIG. 11, in response to the second operation, the first start-up animation is continuously played, and further includes: in response to the second operation, a third animation parameter of the first start-up animation is calculated, the third animation parameter is different from the first animation parameter; based on the third instruction, the animation parameter of the locally saved first start-up animation is searched according to the first animation identifier; the third animation parameter is updated to the animation parameter of the locally saved first start-up animation, and the first start-up animation is played based on the third animation parameter.

[0251] The third instruction can be used to make the window compositor update the playing animation. For example, the window compositor can make the playing first startup animation gradually transparent based on the third instruction. Alternatively, the third instruction can be understood as the update instruction described above, and details can be referred to the description of the third instruction above, which will not be repeated here.

[0252] It can be understood that, in response to the second operation, the desktop launcher can control the window compositor to update the animation effect of the window compositor playing the first startup animation in the process of continuously playing the first startup animation. For example, the first startup animation can be made gradually transparent in the process of the window compositor continuously playing the first startup animation.

[0253] For example, in the specific implementation process, in response to the second operation, the desktop launcher can calculate a third animation parameter of the first startup animation, where the third animation parameter is different from the first animation parameter. For example, the third animation parameter can include an animation parameter for making the first startup animation gradually transparent. After the third animation parameter is calculated, the desktop launcher can send the first animation identifier, the third animation parameter, and the third instruction to the window compositor.

[0254] After the window compositor receives the first animation identifier, the third animation parameter, and the third instruction, the window compositor can search for the animation parameter of the first startup animation saved locally based on the third instruction, which can also be understood as an update instruction, according to the first animation identifier. After the window compositor searches for the animation parameter of the first startup animation saved locally, the window compositor can update the third animation parameter to the animation parameter of the first startup animation saved locally.

[0255] For example, in order to make the first startup animation gradually transparent, the third animation parameter can include a new transparency, and the window compositor can replace the corresponding transparency in the animation parameter of the first startup animation with the new transparency to complete the update operation. Further, the window compositor can play the first startup animation based on the third animation parameter, for example, the window compositor can play the first startup animation that is gradually transparent.

[0256] In the embodiments of this application, the desktop launcher can calculate a third animation parameter for updating the animation in the process of playing the animation, so that the window compositor can update the playing animation based on the third instruction. Based on the third instruction, the electronic device can quickly respond and adjust the animation parameter and adjust the animation playing in the case of frequent user operation, improve the flexibility of the electronic device in the process of playing the animation, and improve the user experience.

[0257] Optionally, based on the corresponding embodiment of FIG. 11, before calculating the third animation parameter of the first startup animation, the method further includes: based on the fourth instruction, obtaining a playing progress of the first startup animation; and calculating the third animation parameter of the first startup animation includes: based on the playing progress of the first startup animation, calculating the third animation parameter of the first startup animation.

[0258] In the embodiments of the present application, the fourth instruction can be used to query the animation playing progress, for example, the fourth instruction can be understood as the query instruction described above. It can be understood that before the desktop startup calculates the third animation parameter for updating the first startup animation, the playing progress of the first startup animation can be obtained first, and then the third animation parameter is calculated based on the current playing progress after the desktop launcher obtains the playing progress. Illustratively, the playing progress of the first startup animation can be the animation parameter of the frame of the currently played first startup animation.

[0259] Illustratively, the desktop launcher can send the first animation identifier and the fourth instruction to the window compositor, and after the window compositor obtains the first animation identifier and the fourth instruction, the window compositor can find the animation parameter of the first startup animation stored locally based on the fourth instruction according to the first animation identifier, and obtain the playing progress of the first startup animation, and then return the playing progress to the desktop launcher.

[0260] Further, the desktop launcher can calculate the third animation parameter based on the playing progress of the first startup animation, wherein the process of calculating the third animation parameter can refer to the related description of S504 in the corresponding embodiment of FIG. 5, which will not be described here.

[0261] In the embodiments of the present application, the third animation parameter can be calculated based on the playing progress of the first startup animation, so that the electronic device can adjust the animation parameter according to the playing progress of the current animation, and the system resources can be saved and the flexibility of animation control can be improved by updating the animation parameter without recalculating all animation parameters, thereby improving the user experience.

[0262] Optionally, based on the corresponding embodiment of FIG. 11, the animation control method further includes: during playing the second startup animation, receiving a third operation triggering exiting the second application; and in response to the third operation, stopping playing the second startup animation and playing a third exit animation of the second application.

[0263] The third operation can be understood as the operation of triggering the second application to stop the second start animation in S504 in the embodiment of FIG. 5, for example, the operation of clicking the back button or closing the second application by the user. The third exit animation can be the transition animation of the second application from the full-screen state to the icon state, or if the second application is in the state of occupying part of the display screen, the third exit animation can be the transition animation of the second application from the state of occupying part of the display screen to the icon state, for example, the zoom-out animation in the above, which will not be described here.

[0264] In the process of playing the second start animation, if the electronic device receives a third operation triggering the second application to exit, the electronic device can stop playing the second start animation and play a third exit animation of the second application. For example, after receiving the third operation, the desktop launcher can send a stop instruction to the window compositor to stop playing the second start animation, and send a creation instruction or a start instruction to play the third exit animation.

[0265] Alternatively, after receiving the third operation, the desktop launcher can send an update instruction to the window compositor to update the second start animation, so as to switch from the second start animation being played to the third exit animation being played. The specific implementation of the process can refer to the related description of S504-S506 in the embodiment of FIG. 5, which will not be described here.

[0266] In the embodiments of the present application, when the electronic device receives a triggering exit operation, the currently playing animation can be stopped and the corresponding exit animation can be played, which can improve the continuity of the animation playing and improve the user experience.

[0267] Optionally, based on the embodiment of FIG. 11, in response to the third operation, the second start animation is stopped and the third exit animation of the second application is played, including: in response to the third operation, based on a fifth instruction, the second start animation is stopped, and based on a first instruction, the third exit animation of the second application is played.

[0268] The fifth instruction can be used to make the window compositor stop playing the animation, for example, which can refer to the related description of the cancel instruction in the above, which will not be described here.

[0269] Optionally, in response to the third operation, the desktop launcher sends, to the window compositor, an animation identifier of the second start animation and a fifth instruction, and after the window compositor receives the animation identifier and the fifth instruction, the window compositor can stop playing the second start animation according to the animation identifier of the second start animation based on the fifth instruction. Moreover, the desktop launcher can calculate animation parameters of a third exit animation, and send the animation parameters of the third animation, the animation identifier, and a first instruction to the window compositor, and after the window compositor receives the animation parameters of the third animation, the animation identifier, and the first instruction, the window compositor can play the third exit animation based on the first instruction. For details, refer to the related description of S504-S506 in the corresponding embodiment of FIG. 5.

[0270] In the embodiments of the present application, when the electronic device receives an operation of triggering exit of an application, the start animation of the application can be stopped based on the fifth instruction, and the exit animation can be played based on the first instruction, which can improve the continuity of animation playing, improve the flexibility of animation control, and enhance the user experience.

[0271] Optionally, based on the corresponding embodiment of FIG. 11, in response to the third operation, the second start animation is stopped from being played, and a third exit animation of the second application is played, including: in response to the third operation, fourth animation parameters of the third exit animation are calculated, the fourth animation parameters including one or more animation parameters used for playing the third exit animation; based on the third instruction, second animation parameters of the second start animation saved locally are searched according to the second animation identifier; the fourth animation parameters are updated into the second animation parameters of the second start animation saved locally, and the third exit animation is played based on the fourth animation parameters.

[0272] In the embodiments of the present application, in response to the third operation, for example, the third operation can be an operation of the user triggering interruption of the second start animation, the desktop launcher can calculate fourth animation parameters of a third exit animation, where the third exit animation can be understood as the shrinking animation in the foregoing, which will not be described herein again. The fourth animation parameters can include one or more animation parameters used for playing the third exit animation. For example, the fourth animation parameters can include the scaling matrix in S505 in the corresponding embodiment of FIG. 5, which will not be described herein again.

[0273] It can be understood that after the desktop launcher calculates the fourth animation parameters, the desktop launcher can send the fourth animation parameters, the second animation identifier, and the third instruction to the window compositor. After the window compositor receives the fourth animation parameters, the second animation identifier, and the third instruction, the window compositor can search, based on the third instruction, the second animation parameters of the second start animation saved locally according to the second animation identifier, and after the second animation parameters of the second start animation are searched, the second animation parameters saved locally can be updated based on the fourth animation parameters, for example, the fourth animation parameters can be fused with the second animation parameters of the second start animation.

[0274] After the animation parameter of the second starting animation is updated, the window compositor can play the third exiting animation based on the fourth animation parameter and the updated animation parameter of the second starting animation. It can be understood that the implementation manner in which the electronic device stops playing the second starting animation and plays the third exiting animation can refer to the related description of playing the zoom-out animation based on the update instruction in S504-S506 in the corresponding embodiment of FIG. 5, and details are not described herein again.

[0275] In the embodiment of the present application, after the electronic device receives the third operation, the playing animation can be updated by the third instruction, for example, the electronic device can switch the playing second starting animation to play the third exiting animation, improve the fluency of animation playing, improve the flexibility of animation control, and can enhance the user experience.

[0276] Optionally, based on the corresponding embodiment of FIG. 11, the animation control method further includes: deleting the related information of the first starting animation saved locally based on the sixth instruction related to the first starting animation.

[0277] The sixth instruction can be used to delete the related information of the animation, for example, it can be understood as the deletion instruction in the above, and details are not described herein again. Exemplarily, the desktop launcher can send the first animation identifier of the first starting animation and the sixth instruction to the window compositor, and after the window compositor receives the first animation identifier and the sixth instruction, the window compositor can delete the related information of the first starting animation saved locally according to the first animation identifier based on the sixth instruction, so as to release the system memory resources occupied by the related information of the first starting animation.

[0278] In the embodiment of the present application, the electronic device can delete the related information of the animation saved locally by the sixth instruction, reduce the processing burden of the electronic device, and save the memory resources.

[0279] Optionally, based on the corresponding embodiment of FIG. 11, the first animation parameter includes one or more of the following: the position of the animation window, the size of the animation window, the scaling matrix of the animation, the rotation matrix of the animation, the transparency of the animation, and the color of the animation.

[0280] The position of the animation window, the size of the animation window, the scaling matrix of the animation, the rotation matrix of the animation, the transparency of the animation, and the color of the animation can refer to the description of the animation parameter in the above, and details are not described herein again. In the embodiment of the present application, by calculating the position, size, scaling matrix, rotation matrix, transparency and color of the animation window and other parameters, the accuracy and flexibility of the animation playing and control of the electronic device can be improved, and the user experience can be improved.

[0281] Optionally, based on the corresponding embodiment of FIG. 11, the first instruction includes a START instruction, the second instruction includes a CREAT instruction, the third instruction includes an UPDATE instruction, the fourth instruction includes a QUERY instruction, the fifth instruction includes a CANCEL instruction, and the sixth instruction includes a DELETE instruction.

[0282] The first instruction, the second instruction, the third instruction, the fourth instruction, the fifth instruction, and the sixth instruction can be specifically referred to the related descriptions of the start instruction, the create instruction, the update instruction, the query instruction, the cancel instruction, and the delete instruction in the foregoing description, which will not be repeated here.

[0283] In the embodiments of the present application, the first instruction, the second instruction, the third instruction, the fourth instruction, the fifth instruction, and the sixth instruction can be used to realize parallel playing and controlling the animations of multiple windows, improve the accuracy and flexibility of animation control, make the animation switching process smoother, and enhance the user experience.

[0284] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose authorization or refusal.

[0285] The above mainly describes the scheme provided by the embodiments of the present application from the method aspect. To realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that the method steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical scheme. The professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0286] The embodiments of the present application can divide the function modules of the device realizing the method according to the above method examples, for example, each function module can be divided according to each function, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware or software function module. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division manner.

[0287] As shown in FIG. 12, a chip structure provided by an embodiment of the present application is shown. The chip 1200 includes one or more (including two) processors 1201, a communication line 1202, a communication interface 1203, and a memory 1204.

[0288] In some embodiments, the memory 1204 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0289] The method described in the above embodiments of the present application can be applied to the processor 1201 or implemented by the processor 1201. The processor 1201 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit or the instruction in the form of software in the processor 1201. The processor 1201 described above can be a general processor (for example, a microprocessor or a conventional processor), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, a discrete gate or transistor logic device, or a discrete hardware component, the processor 1201 can implement or execute the disclosed processing-related methods, steps and logic block diagrams in the embodiments of the present application.

[0290] The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. Among them, the software module can be located in a mature storage medium in the art such as random access memory, read-only memory, programmable read-only memory or electrically erasable programmable read-only memory (EEPROM). The storage medium is located in the memory 1204, and the processor 1201 reads the information in the memory 1204 and combines the hardware to complete the steps of the above method.

[0291] The processor 1201, the memory 1204 and the communication interface 1203 can communicate through the communication line 1202.

[0292] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. Among them, the computer program product can be written in the memory in advance, or downloaded and installed in the memory in the form of software.

[0293] The embodiments of the present application further provide a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from a website, a computer, a server or a data center of one site to a website, a computer, a server or a data center of another site through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (for example, infrared, wireless, microwave, etc.)) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. integrated with one or more available media sets. For example, the available media can include magnetic media (for example, floppy disk, hard disk or magnetic tape), optical media (for example, digital versatile disc (DVD)) or semiconductor media (for example, solid state disk (SSD)) and the like.

[0294] The embodiments of the present application further provide a computer-readable storage medium. The methods described in the above embodiments can be wholly or partially realized by software, hardware, firmware or any combination thereof. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0295] As a possible design, the computer readable medium can include a compact disc read-only memory (CD-ROM), a RAM, a ROM, an EEPROM, or other optical disk storage; the computer readable medium can include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line can also be properly referred to as a computer readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a DSL, or wireless technology (such as infrared, radio, and microwave), the coaxial cable, the optical fiber cable, the twisted pair, the DSL, or the wireless technology (such as infrared, radio, and microwave) is included in the definition of the medium. As used herein, a disk and a disc include a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0296] Embodiments of the present application are described with reference to the flowchart and / or block diagram illustrations of the methods, apparatus (systems) and computer program products according to embodiments of the present application. It is understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing unit or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks.

Claims

1. An animation control method applied to electronic devices, characterized in that, The method comprises: in response to a first operation triggering starting of a first application, playing a first starting animation of the first application; during playing of the first starting animation, receiving a second operation triggering starting of a second application; in response to the second operation, continuing to play the first starting animation and playing a second starting animation of the second application, wherein the second starting animation is on an upper layer of the first starting animation.

2. The method of claim 1, wherein, Before the playing of the first starting animation of the first application, the method further comprises: calculating a first animation parameter of the first starting animation, the first animation parameter comprising one or more animation parameters for playing the first starting animation; the playing of the first starting animation of the first application comprises: based on first information, playing the first starting animation of the first application; wherein the first information comprises a first animation identifier, the first animation parameter and a first instruction, the first instruction being used to instruct playing of the first starting animation.

3. The method of claim 2, wherein, Before the playing of the first starting animation of the first application based on the first information, the method further comprises: based on a second instruction, locally saving second information, the second information comprising the first animation identifier and a second animation parameter, the second animation parameter being the same as or different from the first animation parameter; the playing of the first starting animation of the first application based on the first information comprises: based on the first instruction, searching for the second animation parameter saved locally according to the first animation identifier; updating the second animation parameter saved locally in combination with the first animation parameter, and playing the first starting animation based on the first animation parameter.

4. The method of claim 3, wherein, The second instruction further comprises a sub-instruction, based on the sub-instruction, the first animation identifier and the animation parameter of the first starting animation saved locally are retained after the first starting animation is played.

5. The method according to any one of claims 2-4, characterized in that, The continuing to play the first starting animation in response to the second operation further comprises: in response to the second operation, calculating a third animation parameter of the first starting animation, the third animation parameter being different from the first animation parameter; based on a third instruction, searching for the animation parameter of the first starting animation saved locally according to the first animation identifier; updating the third animation parameter into the animation parameter of the first starting animation saved locally, and playing the first starting animation based on the third animation parameter.

6. The method of claim 5, wherein, Before the calculating of the third animation parameter of the first starting animation, the method further comprises: based on a fourth instruction, obtaining a playing progress of the first starting animation; the calculating of the third animation parameter of the first starting animation comprises: based on the playing progress of the first starting animation, calculating the third animation parameter of the first starting animation.

7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: during playing of the second starting animation, receiving a third operation triggering exiting of the second application; in response to the third operation, stopping playing of the second starting animation and playing a third exiting animation of the second application.

8. The method of claim 7, wherein, The stopping of playing of the second starting animation and the playing of the third exiting animation of the second application in response to the third operation comprises: In response to the third operation, based on fifth instructions, stop playing the second start animation, and based on first instructions, play the third exit animation of the second application.

9. The method of claim 7, wherein, The response to the third operation, stop playing the second start animation, and play the third exit animation of the second application, includes: In response to the third operation, calculate fourth animation parameters of the third exit animation, the fourth animation parameters including one or more frames of animation parameters for playing the third exit animation; Based on third instructions, according to the second animation identifier, search for animation parameters of the second start animation saved locally; Update the fourth animation parameters into the animation parameters of the second start animation saved locally, and play the third exit animation based on the fourth animation parameters.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Based on sixth instructions related to the first start animation, delete related information of the first start animation saved locally.

11. The method according to any one of claims 2-10, characterized in that, The first animation parameters include one or more of the following: position of an animation window, size of an animation window, scaling matrix of an animation, rotation matrix of an animation, transparency of an animation, and color of an animation.

12. The method of claim 10, wherein, The first instructions include START instructions, the second instructions include CREAT instructions, the third instructions include UPDATE instructions, the fourth instructions include QUERY instructions, the fifth instructions include CANCEL instructions, and the sixth instructions include DELETE instructions.

13. An electronic device, comprising: The electronic device includes one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program code including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method of any one of claims 1-12.

14. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method of any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-12.

16. A computer program product, characterised in that, The computer program product includes computer program code that, when executed on an electronic device, causes the electronic device to perform the method of any one of claims 1-12.

Citation Information

Patent Citations

  • Picture-in-picture mode starting method and device and computer readable storage medium

    CN109933386A

  • Animation playing method and device, equipment and storage medium

    CN114943791A

  • Application switching method, projection equipment and computer readable storage medium

    CN115774594A

  • Interface display control method and device, equipment and storage medium

    CN116991527A

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

    CN117130678A

Cited By

  • Animation playing method and apparatus, and electronic device, and computer-readable storage media

    US20260017866A1