Animation switching method and device, and storage medium

By optimizing the sequence of vertical synchronization signal requests and business logic operations in the terminal's animation switching thread, the problem of freezing and frame dropping when opening or exiting the application is solved, improving the user experience.

CN113703937BActive Publication Date: 2024-09-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110903673.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-06
Publication Date
2024-09-03
Estimated Expiration
2041-08-06

AI Technical Summary

Technical Problem

Existing terminals are prone to freezes and frame drops when opening or exiting applications, especially for terminals with low hardware configurations, which affects the user experience.

Method used

By starting the animation switching thread when a trigger operation is detected, and executing business logic operations after sending a vertical synchronization signal request, inter-process communication and resource management are optimized, reducing resource occupation of the central processor, and avoiding business logic corresponding to the animation switching thread. Delays caused by operations.

Benefits of technology

It effectively reduces the lag and frame drop rate when the terminal opens or exits the application, improves the user experience, and reduces the resource usage of the central processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113703937B
    Figure CN113703937B
Patent Text Reader

Abstract

The present disclosure provides an animation switching method, device, and storage medium. The method includes: in response to detecting a trigger operation, determining to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application; after sending a request message for requesting a vertical synchronization vsync signal, executing a business logic operation corresponding to the animation switching thread; after terminating the animation switching based on the business logic operation result, displaying the interface after the animation switching. The present disclosure can reduce the problems of terminal freeze and frame drop when opening or exiting an application, reduce the resource occupation of the central processor, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to an animation switching method and device, and a storage medium. Background Art

[0002] Currently, users can open an application by clicking on its icon, or exit the application through gesture animation to return to the desktop. However, during the above process, freezes and frame drops often occur, especially for terminals with low hardware configurations, where freezes and frame drops are more serious. Summary of the invention

[0003] In view of this, the present application discloses an animation switching method, device, and storage medium, which can reduce the terminal's freeze and frame drop rate when opening or exiting an application, reduce the resource usage of the central processing unit, and improve the user experience.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an animation switching method, the method being applied to a terminal, the method comprising:

[0005] In response to detecting a trigger operation, determining to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application;

[0006] After sending a request message for requesting a vertical synchronization vsync signal, executing a business logic operation corresponding to the animation switching thread;

[0007] After the animation switching ends based on the business logic operation results, the interface after the animation switching is displayed.

[0008] Optionally, when executing the business logic operation corresponding to the animation switching thread, the method further includes:

[0009] In response to determining to process a request message corresponding to a target thread, raising the priority of the target thread in the second process, the target thread being a thread for performing inter-process communication between a first process and the second process, the first process at least including the switching animation thread, and the second process being a process for performing screen synthesis;

[0010] In response to determining that the target thread is completed, restoring the priority of the target thread in the second process.

[0011] Optionally, when executing the business logic operation corresponding to the animation switching thread, the method further includes at least one of the following:

[0012] Do not execute business logic corresponding to threads unrelated to animation switching; and / or,

[0013] Do not wait for the execution results of threads not related to animation switching.

[0014] Optionally, before displaying the interface after the animation switching, the method further includes:

[0015] The target action is not performed; or,

[0016] Change the operation timing of the target operation;

[0017] The target operation includes an operation of grabbing CPU resources with the animation switching thread.

[0018] Optionally, the operation timing of changing the target operation includes:

[0019] The operation timing of the target operation is changed to before the specified timing, and the specified timing is the timing for determining to start executing the animation switching thread corresponding to the trigger operation.

[0020] Optionally, the target operation includes at least one of the following:

[0021] Object allocation operations related to memory allocation;

[0022] animation file manipulation; and / or,

[0023] The inter-process communication operation is performed between a first process and a third process, wherein the first process at least includes the switching animation thread, and the third process is a process unrelated to the animation switching.

[0024] According to a second aspect of an embodiment of the present disclosure, there is provided an animation switching device, the device being applied to a terminal, the device comprising:

[0025] A determination module is configured to, in response to detecting a trigger operation, determine to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application;

[0026] An execution module, configured to execute a business logic operation corresponding to the animation switching thread after sending a request message for requesting a vertical synchronization vsync signal;

[0027] The display module is configured to display the interface after the animation switching ends based on the business logic operation result.

[0028] Optionally, the device further comprises:

[0029] a priority changing module configured to, when executing the business logic operation corresponding to the animation switching thread, in response to determining to process a request message corresponding to a target thread, increase the priority of the target thread in the second process, the target thread being a thread for inter-process communication between the first process and the second process, the first process at least including the switching animation thread, and the second process being a process for performing screen synthesis;

[0030] The priority restoration module is configured to restore the priority of the target thread in the second process in response to determining that the target thread is completed.

[0031] Optionally, the device further comprises at least one of the following:

[0032] The first control module is configured to not execute the business logic corresponding to the thread unrelated to the animation switching when executing the business logic operation corresponding to the animation switching thread; and / or,

[0033] The second control module is configured not to wait for the execution result of threads unrelated to the animation switching when executing the business logic operation corresponding to the animation switching thread.

[0034] Optionally, the device further comprises any one of the following:

[0035] A third control module is configured to not perform the target operation before the interface after the animation switching is displayed; or,

[0036] A fourth control module is configured to change the operation timing of the target operation before displaying the interface after the animation switching;

[0037] The target operation includes an operation of grabbing CPU resources with the animation switching thread.

[0038] Optionally, the fourth control module includes:

[0039] The timing change submodule is configured to change the operation timing of the target operation to before a specified timing, where the specified timing is a timing for determining to start executing the animation switching thread corresponding to the trigger operation.

[0040] Optionally, the target operation includes at least one of the following:

[0041] Object allocation operations related to memory allocation;

[0042] animation file manipulation; and / or,

[0043] The inter-process communication operation is performed between a first process and a third process, wherein the first process at least includes the switching animation thread, and the third process is a process unrelated to the animation switching.

[0044] According to a third aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned animation switching methods are implemented.

[0045] According to a fourth aspect of an embodiment of the present disclosure, there is provided an animation switching device, comprising:

[0046] processor;

[0047] a memory for storing processor-executable instructions;

[0048] Wherein, the processor is configured to execute the executable instructions to implement the steps of any of the above-mentioned animation switching methods.

[0049] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0050] In an embodiment of the present disclosure, when a trigger operation for opening or exiting an application is detected, it is determined to start executing the animation switching thread corresponding to the trigger operation, and after sending a request message for requesting a vertical synchronization vsync signal, the business logic operation corresponding to the animation switching thread is executed, and further, after the animation switching is ended based on the result of the business logic operation, the final switched interface is displayed. The present disclosure can avoid the problem of terminal freeze and frame drop caused by the extension of the vsync signal request due to the execution of the business logic operation corresponding to the animation switching thread when opening or exiting an application, thereby reducing the resource occupation of the central processing unit and improving the user experience.

[0051] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0053] Figure 1A is an animation switching scene diagram shown in an exemplary embodiment of the present application;

[0054] Figure 1B is another animation switching scene diagram shown in an exemplary embodiment of the present application;

[0055] Figure 2 is a flow chart of an animation switching method shown in an exemplary embodiment of the present application;

[0056] Figure 3is a flowchart of another animation switching method shown in an exemplary embodiment of the present application;

[0057] Figure 4 is a block diagram of an animation switching device according to an exemplary embodiment;

[0058] Figure 5 The present invention is a block diagram showing a device suitable for animation switching according to an exemplary embodiment. DETAILED DESCRIPTION

[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0060] The technical scenarios in which the present disclosure is applied are, for example, Figure 1A and Figure 1B shown.

[0061] exist Figure 1A In the terminal, the user can open the application by clicking the application icon on the terminal desktop.

[0062] exist Figure 1B In the present invention, the user can exit the application and return to the desktop of the terminal by clicking the home button (a functional button for returning to the desktop), wherein the home button of the present application includes but is not limited to a physical home button or a virtual home button. Alternatively, if the terminal does not have a home button, the user can exit the application and return to the desktop by performing a gesture operation, such as sliding up on the full screen.

[0063] This application is mainly aimed at the above two scenarios to achieve the purpose of reducing terminal freezes and frame drops and reducing the resource usage of the central processing unit.

[0064] Figure 2 is a flowchart of an animation switching method shown in an exemplary embodiment of the present application. This embodiment is described from the perspective of a terminal, wherein the terminal includes but is not limited to mobile phones, laptops, desktop computers, iPads and other devices, such as Figure 2 As shown, the animation switching method includes:

[0065] In step 201, in response to detecting a trigger operation, it is determined to start executing an animation switching thread corresponding to the trigger operation.

[0066] In the embodiment of the present disclosure, the trigger operation is an operation that triggers opening an application or exiting an application. In one possible implementation, the trigger operation is an operation of clicking an application icon. In another possible implementation, the trigger operation is an operation of clicking a home button, or the trigger operation is a gesture operation of exiting an application.

[0067] In step 202, after sending a request message for requesting a vertical synchronization vsync signal, a service logic operation corresponding to the animation switching thread is executed.

[0068] In the disclosed embodiment, the request message may be sent by the operating system of the terminal to the terminal hardware via a CPU (Central Processing Unit), and the terminal hardware may include but is not limited to output devices of the terminal, such as a display screen.

[0069] The role of vertical synchronization is to prevent screen tearing. Because the screen is not rendered all at once, but row by row or column by column. If vertical synchronization is turned off, if the terminal configuration is not sufficient, the screen will tear when the current screen is not rendered and the next screen starts to be rendered at high speed. Vsync solves the problem of animation tearing by not copying the screen in the backup buffer to the display buffer before the display is refreshed.

[0070] In the embodiment of the present disclosure, after sending a request message for requesting a vertical synchronization vsync signal, the business logic operation corresponding to the animation switching thread can be executed, and the business logic operation includes but is not limited to at least one of the following business logic operations related to animation switching: calculating the location of the animation graphics, loading animation resources, dotting, screen refresh, etc. Among them, dotting refers to dividing multiple frames of images in the animation into multiple logical segments.

[0071] In step 203, after the animation switching is completed based on the business logic operation result, the interface after the animation switching is displayed.

[0072] In the disclosed embodiment, if the triggering operation is an operation of opening an application, the interface after the animation switching is the home page of the application. If the triggering operation is an operation of exiting the application, the interface after the animation switching is the desktop.

[0073] In the above embodiment, when opening or exiting an application, the terminal can avoid the problem of terminal freeze and frame drop caused by vsync signal request delay due to the business logic operation corresponding to the animation switching thread, thereby reducing the resource usage of the central processor and improving the user experience.

[0074] In some optional embodiments, it is assumed that the terminal hardware sends a vsync signal every 16 milliseconds. In the related art, the terminal will request the vsync signal after executing the business logic operation corresponding to the animation switching thread. Assuming that the business logic operation corresponding to the animation switching thread needs to occupy the 1st to 17th milliseconds, the terminal will send a request message for requesting the vsync signal after executing the above business logic operation. The terminal needs to wait for another 15 milliseconds, that is, to get the vsync signal at the 32nd millisecond.

[0075] However, in the present application, a request message for a vsync signal can be sent first at the 1st millisecond when determining to start executing the animation switching thread, and then the business logic operation corresponding to the animation switching thread can be started. Assuming that the business logic operation corresponding to the animation switching thread needs to occupy the 1st to 17th milliseconds, but the terminal has obtained the vsync signal at the 16th millisecond, there is no need to wait for 15 milliseconds to obtain the vsync signal after executing the business logic operation.

[0076] In the above embodiment, the delay in obtaining the vsync signal caused by the time-consuming business logic operation corresponding to the animation switching thread is reduced.

[0077] In some optional embodiments, during the execution of step 202, when a request message corresponding to the target thread is processed, the priority of the target thread in the second process can be increased, and after the target thread is executed, the priority of the target thread in the second process can be restored.

[0078] In the embodiment of the present disclosure, the target thread is a thread for inter-process communication between the first process and the second process, the first process at least includes the switching animation thread, and the second process is a process for performing animation synthesis. The first process may be a desktop process, the second process may be a SurfaceFlinger process responsible for screen synthesis as a server, and the target thread may be a binder thread.

[0079] Among them, a process is a dynamic execution process of a program with certain independent functions on a data set. It is an independent unit for resource allocation and scheduling of the operating system and a carrier for application running. A thread is a single sequential control flow in program execution, the smallest unit of program execution flow, and the basic unit of processor scheduling and dispatching. A process can have one or more threads.

[0080] When the terminal determines to start processing the binder request message, it can increase the priority of the binder thread in the SurfaceFlinger process.

[0081] In a possible implementation, the priority of the binder thread may be increased to the highest level.

[0082] In another possible implementation, in order to avoid raising the priority of the binder thread to the highest level and affecting the execution of other threads in the second process, the priority of the binder thread can be raised to a level higher than the priority of more than half of the threads in the SurfaceFlinger process. That is, by raising the priority of the target thread, the purpose of waking up the binder thread in advance in the second process can be achieved.

[0083] Furthermore, after the terminal determines that the binder thread is completed, the priority of the binder thread in the SurfaceFlinger process can be restored.

[0084] Through the above process, the target thread can quickly switch from the sleep state to the active state, thereby performing inter-process communication, reducing the problem of insufficient CPU resources, and avoiding the preemption of CPU resources caused by each process executing too many thread tasks.

[0085] In an optional embodiment, when executing the business logic operations corresponding to the animation switching thread, the business logic operations corresponding to the threads unrelated to the animation switching may not be executed, and / or, when executing the business logic operations corresponding to the animation switching thread, it is not necessary to wait for the execution results of the threads unrelated to the animation switching.

[0086] In the above embodiment, the animation switching thread is decoupled from other unrelated threads, and the business logic operations corresponding to other unrelated threads are not executed during the execution of the animation switching thread, and there is no need to wait for at least one of the execution results of other unrelated threads, thereby reducing the freeze and frame drops during the animation switching process and reducing the occupation of central processing unit resources.

[0087] In some optional embodiments, the terminal may not execute the target operation before displaying the interface after the animation switching, wherein the target operation includes an operation of grabbing CPU (Central Processing Unit) resources with the animation switching thread.

[0088] In the above embodiment, the terminal may not execute the target operation during the whole process from the time when the trigger operation is detected to the end of the animation switching, so as to avoid the target operation and the animation switching thread occupying the CPU resources, thereby avoiding the terminal from freezing or dropping frames.

[0089] In some optional embodiments, before displaying the interface after the animation switching, the terminal determines that a target operation needs to be performed. In order to avoid the target operation and the animation switching thread from occupying the CPU resources, the operation timing of the target operation can be changed. The target operation includes an operation that occupies the CPU resources with the animation switching thread.

[0090] In a possible implementation, the operation timing of the target operation may be changed to before a specified timing, wherein the specified timing is a timing for determining to start executing the animation switching thread corresponding to the trigger operation.

[0091] In the above embodiment, when the target operation needs to be executed, the target operation can be executed in advance to avoid the target operation and the animation switching thread from occupying the CPU resources, thereby avoiding terminal freeze and frame drops.

[0092] In some optional embodiments, the target operation may include but is not limited to at least one of the following: object allocation operations related to memory allocation; animation file operations; and / or inter-process communication operations between a first process and a third process, wherein the first process includes at least the switching animation thread, and the third process is a process unrelated to animation switching.

[0093] In a possible implementation, the memory allocation process involves operations such as garbage collection, which will occupy the resources of the central processing unit. Therefore, before the interface after the animation switching is displayed, the object allocation operation related to memory allocation may not be performed. Alternatively, before the interface after the animation switching is displayed, the operation timing of the object allocation operation related to memory allocation may be changed to before the specified timing. This prevents the object allocation operation related to memory allocation from competing with the animation switching thread for CPU resources.

[0094] In a possible implementation, the animation file is a file involved in the animation switching process, and the animation file operation includes but is not limited to the operation of reading the file from the terminal disk to the memory, I / O (input / output, input and output port) processing operation, etc. The animation file operation will also compete with the animation switching thread for CPU resources.

[0095] Therefore, in the disclosed embodiment, animation file operations may not be performed before the interface after the animation switching is displayed, thereby reducing the occupation of central processing unit resources, reducing terminal freezes and frame drops, and improving user experience.

[0096] Alternatively, the operation timing of the animation file operation can be changed before the interface after the animation switching is displayed, and the operation timing of the animation file operation can be changed to before the specified time, that is, the animation file operation is executed in advance to avoid the animation file operation and the animation switching thread from occupying CPU resources.

[0097] In another possible implementation, the inter-process communication operation between the first process and the third process may not be performed before the interface after the animation switching is displayed, that is, the inter-process communication operation between the first process where the animation switching thread is located and the third process unrelated to other animation switching is not performed.

[0098] Alternatively, if an inter-process communication operation between the first process and the third process needs to be performed, the operation timing of the communication operation can also be changed to before the specified timing, so as to prevent the inter-process communication operation between the first process and the third process and the animation switching thread from occupying CPU resources.

[0099] In the above embodiment, the terminal may not execute the target operation before the animation switching ends, or execute the target operation in advance, so as to avoid the target operation and the animation switching thread competing for the resources of the central processor during the animation switching process, reduce the terminal freeze and frame drop, and improve the user experience.

[0100] In an alternative embodiment, Figure 3 is a flowchart of an animation switching method shown in an exemplary embodiment of the present application. This embodiment is described from the perspective of a terminal, wherein the terminal includes but is not limited to mobile phones, laptops, desktop computers, iPads and other devices, such as Figure 3 As shown, the animation switching method includes:

[0101] In step 301, a trigger operation is detected.

[0102] The trigger operation is an operation that triggers opening or exiting an application. In one possible implementation, the trigger operation is an operation of clicking an application icon. In another possible implementation, the trigger operation is an operation of clicking a home button, or the trigger operation is a gesture operation of exiting an application.

[0103] In step 302, a target operation is performed.

[0104] The target operation includes but is not limited to at least one of the following: object allocation operations related to memory allocation; animation file operations; and / or inter-process communication operations between a first process and a third process, wherein the first process at least includes the switching animation thread, and the third process is a process unrelated to animation switching.

[0105] In step 303, it is determined to start executing the animation switching thread corresponding to the trigger operation.

[0106] In step 304, after sending a request message for requesting a vertical synchronization vsync signal, a service logic operation corresponding to the animation switching thread is performed.

[0107] Among them, in response to determining the request message corresponding to the target thread for processing, the priority of the target thread in the second process is increased, the target thread is a thread for inter-process communication between the first process and the second process, the first process includes at least the switching animation thread, and the second process is a process for screen synthesis.

[0108] In response to determining that the target thread is completed, restoring the priority of the target thread in the second process.

[0109] In step 305, after the animation switching is completed based on the business logic operation result, the interface after the animation switching is displayed.

[0110] In the above embodiment, when opening or exiting an application, the terminal can avoid the problem of terminal freeze and frame drop caused by the extension of the vsync signal request due to the business logic operation corresponding to the animation switching thread, thereby reducing the resource usage of the central processing unit and improving the user experience.

[0111] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an application function implementation device embodiment.

[0112] Reference Figure 4 , Figure 4 : is a block diagram of an animation switching device according to an exemplary embodiment, the device is applied to a terminal, and the device includes:

[0113] The determination module 401 is configured to, in response to detecting a trigger operation, determine to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application;

[0114] The execution module 402 is configured to execute the business logic operation corresponding to the animation switching thread after sending a request message for requesting a vertical synchronization vsync signal;

[0115] The display module 403 is configured to display the interface after the animation switching is completed based on the business logic operation result.

[0116] Optionally, the device further comprises:

[0117] a priority changing module configured to, when executing the business logic operation corresponding to the animation switching thread, in response to determining to process a request message corresponding to a target thread, increase the priority of the target thread in the second process, the target thread being a thread for inter-process communication between the first process and the second process, the first process at least including the switching animation thread, and the second process being a process for performing screen synthesis;

[0118] The priority restoration module is configured to restore the priority of the target thread in the second process in response to determining that the target thread is completed.

[0119] Optionally, the device further comprises at least one of the following:

[0120] The first control module is configured to not execute the business logic corresponding to the thread unrelated to the animation switching when executing the business logic operation corresponding to the animation switching thread; and / or,

[0121] The second control module is configured not to wait for the execution result of threads unrelated to the animation switching when executing the business logic operation corresponding to the animation switching thread.

[0122] Optionally, the device further comprises any one of the following:

[0123] A third control module is configured to not perform the target operation before the interface after the animation switching is displayed; or,

[0124] A fourth control module is configured to change the operation timing of the target operation before displaying the interface after the animation switching;

[0125] The target operation includes an operation of grabbing CPU resources with the animation switching thread.

[0126] Optionally, the fourth control module includes:

[0127] The timing change submodule is configured to change the operation timing of the target operation to before a specified timing, wherein the specified timing is a timing for determining to start executing the animation switching thread corresponding to the trigger operation. Optionally, the target operation includes at least one of the following:

[0128] Object allocation operations related to memory allocation;

[0129] animation file manipulation; and / or,

[0130] The inter-process communication operation is performed between a first process and a third process, wherein the first process at least includes the switching animation thread, and the third process is a process unrelated to the animation switching.

[0131] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.

[0132] Correspondingly, the present disclosure also provides a computer-readable storage medium for storing a computer program, wherein the computer program is used to implement the steps of any of the above-mentioned animation switching methods when executed by a processor.

[0133] Accordingly, the present disclosure also provides a communication device, comprising:

[0134] processor;

[0135] a memory for storing processor-executable instructions;

[0136] Wherein, the processor is configured to execute the executable instructions to implement the steps of any of the above-mentioned animation switching methods.

[0137] Figure 5 5 is a block diagram of an animation switching device according to an exemplary embodiment. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or other terminal.

[0138] Reference Figure 5 , the device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .

[0139] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0140] One of the processors 520 in the processing component 502 may be configured to execute the above animation switching method.

[0141] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0142] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.

[0143] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0144] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0145] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0146] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500 and the temperature change of the device 500. The sensor assembly 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0147] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0148] In an exemplary embodiment, the apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0149] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, which can be executed by a processor 520 of the apparatus 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0150] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0151] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0152] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An animation switching method, It is characterized in that The method is applied to a terminal, and the method includes: In response to detecting a trigger operation, determining to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application; When determining to start executing the animation switching thread, first send a request message for requesting a vsync signal; After sending the request message for requesting vertical synchronization of the vsync signal, executing the business logic operation corresponding to the animation switching thread; After the animation switching is completed based on the business logic operation result, the interface after the animation switching is displayed; When executing the business logic operation corresponding to the animation switching thread, the method further includes: In response to determining to process a request message corresponding to a target thread, raising the priority of the target thread in the second process, the target thread being a thread for performing inter-process communication between a first process and the second process, the first process at least including the animation switching thread, and the second process being a process for performing screen synthesis; In response to determining that the target thread is completed, restoring the priority of the target thread in the second process.

2. The method according to claim 1, It is characterized in that When executing the business logic operation corresponding to the animation switching thread, the method further includes at least one of the following: Do not execute business logic operations corresponding to threads unrelated to animation switching; and / or, Do not wait for the execution results of threads not related to animation switching.

3. The method according to claim 1, It is characterized in that Before displaying the interface after the animation switching, the method further includes any one of the following: The target action is not performed; or, Change the operation timing of the target operation; The target operation includes an operation of grabbing CPU resources with the animation switching thread.

4. The method according to claim 3, It is characterized in that The operation timing of the target change operation includes: The operation timing of the target operation is changed to before the specified timing, and the specified timing is the timing for determining to start executing the animation switching thread corresponding to the trigger operation.

5. The method according to claim 3 or 4, It is characterized in that The target operation includes at least one of the following: Object allocation operations related to memory allocation; animation file manipulation; and / or, The inter-process communication operation is performed between a first process and a third process, wherein the first process at least includes the animation switching thread, and the third process is a process unrelated to the animation switching.

6. An animation switching device, It is characterized in that The device is applied to a terminal, and the device includes: A determination module is configured to, in response to detecting a trigger operation, determine to start executing an animation switching thread corresponding to the trigger operation, wherein the trigger operation is an operation that triggers opening or exiting an application; An execution module is configured to first send a request message for requesting a vsync signal when determining to start executing the animation switching thread; after sending the request message for requesting vertical synchronization of the vsync signal, execute a service logic operation corresponding to the animation switching thread; A display module is configured to display the interface after the animation switching ends based on the business logic operation result; a priority changing module configured to, when executing the business logic operation corresponding to the animation switching thread, in response to determining to process a request message corresponding to a target thread, increase the priority of the target thread in the second process, the target thread being a thread for inter-process communication between the first process and the second process, the first process at least including the animation switching thread, and the second process being a process for performing screen synthesis; The priority restoration module is configured to restore the priority of the target thread in the second process in response to determining that the target thread is completed.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the animation switching method described in any one of claims 1 to 5 are implemented.

8. An animation switching device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the executable instructions to implement the steps of the animation switching method described in any one of claims 1-5.