Program starting method and device, storage medium and program product

By detecting the lifting action event of the user clicking the application icon in an electronic device, playing the preloaded preview animation, and integrating it with the startup window animation after the animation is ready, the response delay problem at the application startup is solved, and the improvement of the Startup speed and user experience.

CN119396506AActive Publication Date: 2025-02-07HONOR DEVICE CO LTD

Patent Information

Application Number
CN202411350430.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-07
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In electronic devices, there is a response delay when the application starts, resulting in lag and poor chirality.

Method used

By detecting the lifting action event of the user clicking the application icon, the preloaded preview animation is played, and after the startup window animation is prepared, it is integrated with the preview animation to adjust the playback progress.

Benefits of technology

Shorten the application response delay, improve startup speed, and avoid the phenomenon of dynamic effects disconnection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396506A_ABST
    Figure CN119396506A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, and discloses a program starting method and device, a storage medium and a program product. The program starting method comprises the following steps: when a user clicks a desktop application icon and the electronic equipment detects a press-down operation event of the user, the electronic equipment can load a preview dynamic effect; next, when a user's uplift operation event is detected, the electronic device may play the preview dynamic effect that has been loaded. Moreover, after the finger lifting operation of the user is detected, the electronic equipment can also execute related preparatory work of starting the window dynamic effect, and after the related preparatory work of starting the window dynamic effect is completed, the electronic equipment can fuse the starting window dynamic effect and the preview dynamic effect, so that the fused starting window dynamic effect is played. Therefore, when the electronic equipment detects the operation of clicking the desktop application icon by the user, the response time delay of the application program can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a program startup method, device, storage medium and program product. Background Art

[0002] A variety of applications (APPs) can usually be installed in electronic devices such as mobile phones. Users can trigger the launch of applications by clicking on desktop application icons. Among them, the operation of the user clicking on the desktop application icon may include a finger press (down) operation and a finger lift (up) operation. Electronic devices usually start to perform preparations related to the launch of the application when they detect the user's lift (up) operation event. For example, the electronic device will start to draw the relevant layers of the startup window animation after detecting the lift (up) operation event, and then display the relevant layers of the startup window animation after drawing to the user, wherein the relevant layers of the startup window animation refer to the layer interface displayed when the application is just started. Therefore, after the user completes the lift (up) operation, it takes a certain response delay to watch the first frame of the application when it is launched. That is, the application has freezes and poor chirality during the startup process. Summary of the invention

[0003] In order to solve the above problems, the present application provides a program startup method, device, storage medium and program product.

[0004] In a first aspect, the present application provides a program startup method, which is applied to an electronic device, and the method includes: at a first moment, detecting a pressing action event of a user clicking on a first application icon, and loading a first animation effect; at a second moment, detecting a lifting action event of a user clicking on the first application icon, and playing the first animation effect, wherein the first animation effect includes an animation effect of enlarging a first image; at a third moment during the playing of the first animation effect, detecting that the preparation for the second animation effect is completed, and the first image is enlarged to a first size; enlarging the second image of the second animation effect to the first size to obtain a third animation effect, wherein the first image is the same as the second image, and the second image is a first frame image of the third animation effect; playing the third animation effect, and displaying the initial application interface of the first application corresponding to the first application icon.

[0005] In the present application, the first moment may be the moment when a user presses down as mentioned in the present application, for example, Figure 3A The first application icon may be the desktop application icon corresponding to the application to be started mentioned in this application; the first animation effect may be the preview animation effect mentioned in this application; the second moment may be the moment when the user's lifting (up) operation is detected mentioned in this application, for example, Figure 3AThe moment t2 shown; the first image can be the related layer of the preview animation mentioned in this application; the third moment can be the moment when the startup window animation mentioned in this application is ready; the second animation can be the startup window animation mentioned in this application; the first size can be the playback progress of the preview animation after the preparation of the startup window animation is completed as mentioned in this application; the second image can be the related layer of the startup window animation mentioned in this application; the third animation can be the fused startup window animation mentioned in this application; the first application can be the program to be started mentioned in this application.

[0006] In some embodiments, when the electronic device detects a pressing operation in a user's click operation, it can trigger the electronic device to load the first animation effect. Next, when the electronic device detects the user's lifting operation, the electronic device will also initiate the life cycle of the startActivity program, wherein after initiating the life cycle of the startActivity program, that is, when the relevant code of the startActivity program begins to execute and has not yet been completed, the electronic device will play the first animation effect. Then, when the electronic device completes the life cycle of the startActivity program, that is, after the relevant code of the startActivity program is executed, the electronic device will start to execute the relevant preparations for the second animation effect. And, after detecting that the preparations for the second animation are completed, the electronic device will merge the first animation effect and the second animation effect to obtain and play the merged third animation effect, wherein the fusion process can include adjusting the playback progress of the second animation effect to be consistent with the playback progress of the first animation effect being played.

[0007] In some embodiments, after completing the playback operation of the third animation effect, the electronic device may also play the display animation effect of the initial application interface of the first application, for example, gradually displaying the initial application interface on the screen through a "fade-in" animation effect, thereby displaying the initial application interface of the first application on the screen. This application does not limit the display animation effect when displaying the initial application interface.

[0008] In this way, through the above method, when the user's lift operation is detected, the screen when the application is launched can be quickly displayed, thereby shortening the response delay of the application; and after completing the relevant preparations for the startup window animation, the playback progress of the startup window animation is adjusted to be consistent with the playback progress of the preview animation, without the need to play the startup window animation from the initial state, thereby shortening the overall startup time of the application.

[0009] In a possible implementation of the first aspect, the above-mentioned method of detecting a lifting action event of a user clicking on a first application icon at the second moment and playing the first animation effect includes: detecting a lifting action event of a user clicking on a first application icon at the second moment, triggering the electronic device to start running a startup activity (startActivity) program in the operating system of the electronic device; after triggering the electronic device to start running the startup activity (startActivity) program, playing the first animation effect.

[0010] In some embodiments, in Android TM In the system architecture, a startActivity program is defined to start a new activity. When the electronic device plays the startup window animation, it will initiate the life cycle of the startActivity program when it detects the user's finger lift operation. Among them, after the life cycle of the startup activity program is initiated (at this time, the electronic device has just begun to be triggered to execute the relevant code of the startup activity program, but the relevant code of the startup activity program has not yet been executed), the preview animation can be set to play. And, after the life cycle of the startup activity program is completed (that is, the relevant code of the startup activity program is executed), the electronic device will be triggered to perform the relevant preparations for the startup window animation. In this way, when the electronic device starts to execute the startup activity program and determines that the startup window animation will be played, the preview animation screen that is the same as the screen when the application is started can be quickly displayed, shortening the response delay of the application.

[0011] In a possible implementation of the first aspect above, the method further includes: at a fourth moment of the first animation effect playing, detecting the completion of the running process of the startActivity program, and executing preparations for the second animation effect, wherein the fourth moment is earlier than the third moment.

[0012] In the present application, the fourth moment may be the moment mentioned in the present application when the completion of the life cycle of the startActivity program is detected.

[0013] In some implementations, the electronic device starts to execute relevant preparations for starting the window animation after completing the life cycle of the startActivity program, that is, after the execution of relevant codes of the startActivity program is completed.

[0014] In a possible implementation of the first aspect above, the second image of the second animation effect is enlarged to the first size to obtain a third animation effect, including: passing the callback operation data in the relevant code of the first animation effect to the relevant code of the second animation effect; merging the second tree data structure of the second animation effect with the first tree data structure of the first animation effect to obtain a third tree data structure; enlarging the second image of the second animation effect having the callback operation data and the third tree data structure to the first size to obtain the third animation effect.

[0015] In the present application, the first tree data structure may be the tree structure of the preview animation mentioned in the present application; the second tree data structure may be the tree structure of the startup window animation mentioned in the present application; and the third tree data structure may be the tree structure of the fused startup window animation mentioned in the present application.

[0016] In some embodiments, callback refers to passing a function related to the preview animation as a parameter to another function. Passing the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the start window animation can indicate that the relevant function of the start window animation is passed as a parameter to the same other function. Enlarging the second image of the second animation with the callback operation data and the third tree data structure to the first size can indicate that the playback progress of the merged start window animation is adjusted to be consistent with the playback progress of the preview animation being played.

[0017] In some embodiments, the tree structure of the animation is a non-linear data structure, including a root node and multiple child nodes. Among them, a child node in the tree structure can be used to represent an animation unit (for example, background color gradient, layer enlargement, etc.), and the child nodes can be nested or dependent on each other. For example, the animation of a child node may need to wait for the animation of another child node to be completed before it can start executing. Merging the tree structure of the preview animation with the tree structure of the startup window animation means merging the nodes in the two animations, thereby merging the animation units of each child node.

[0018] In a possible implementation of the first aspect above, the method further includes: during the playing of the third motion effect, ending the playing of the first motion effect; and, upon detecting that the playing of the third motion effect is completed, releasing the related resources of the first motion effect.

[0019] In some embodiments, when playing the fused startup window animation, the electronic device ends the life cycle of the preview animation. At this time, it only means stopping the preview animation, and does not release the related resources of the preview animation. Next, the electronic device releases the related resources of the preview animation when it detects that the playback of the fused startup window animation is completed.

[0020] In a possible implementation of the first aspect above, during the process of running a startActivity program, the method also includes: determining whether data corresponding to a focus window of the electronic device exists, the focus window being the interactive area when the user clicks on the first application icon; if the data corresponding to the focus window does not exist, if it is determined that the first animation effect is being played, continuing to run the startActivity program; if the data corresponding to the focus window does not exist, if it is determined that the first animation effect is not being played, stopping running the startActivity program.

[0021] In some embodiments, since the electronic device starts to perform the preparation work for the startup window animation after the life cycle of the startup activity program is completed, when the electronic device intercepts the life cycle of the startup activity program so that the life cycle of the startup activity program cannot run normally, the electronic device will not perform the preparation work for the startup window animation, and thus the preview animation and the startup window animation cannot be merged. Therefore, after detecting the user's lifting operation, the electronic device can also determine whether it is necessary to intercept the life cycle of the startup activity program, so that the life cycle of the startup activity program is intercepted only when it is determined that the focus window is empty and the preview animation is not played.

[0022] In some embodiments, when it is determined that the data corresponding to the focus window does not exist, that is, when the focus window is empty, as long as the electronic device is playing the preview animation, the startup activity program can continue to be executed, so that the preview animation and the startup window animation can be normally integrated, and the interface of the electronic device will not be stuck in the preview animation interface that cannot respond to user operation instructions.

[0023] In a possible implementation of the first aspect above, it is determined that the first motion effect is being played by at least one of the following methods: detecting that relevant parameter values ​​of the motion effect in the electronic device exist, and the motion effect type corresponding to the relevant parameter values ​​is a preset type, and determining that the first motion effect is being played; detecting that the electronic device is in the stage of preparing the first motion effect, and determining that the first motion effect is being played, wherein the stage of preparing the first motion effect includes at least one of the following stages: acquiring motion effect data of the first motion effect, and the motion effect type corresponding to the motion effect data is a preset type, and the motion effect data includes at least one of the motion effect time of the first motion effect, the number of frames of the first motion effect, the color of the first motion effect, and the transparency of the first motion effect; starting a remote animation service in the electronic device, wherein the remote animation service is used to generate the corresponding first motion effect based on the motion effect data.

[0024] In some embodiments, when the electronic device detects that the relevant parameter value of the motion effect is not empty, that is, when the relevant parameter value of the motion effect exists, it can be indicated that the electronic device is playing the motion effect. Among them, since the electronic device can play a variety of motion effects, the motion effect type (type) can be set for the motion effect (for example, the motion effect type can be a number). When it is determined that the motion effect type corresponding to the detected motion effect related parameter value is the same as the preset preview motion effect type, it can be indicated that the electronic device is playing the preview motion effect.

[0025] In other embodiments, multiple preparation stages are included before playing the preview motion effect. Therefore, when it is detected that the electronic device is preparing to preview the motion effect, it may also mean that the electronic device is playing the preview motion effect.

[0026] In this way, the electronic device can determine whether the preview animation is being played. When it is determined that the preview animation is being played, the relevant code of the startup activity (startActivity) program can be directly continued to run. Therefore, in the process of playing the preview animation, the life cycle of the startup activity program will not be blocked due to the delay in the transmission of user input data within the electronic device; or, in the process of playing the preview animation, the life cycle of the startup activity program will not be blocked due to the failure to detect the focus window. In this way, the preview animation and the startup window animation can be normally integrated, and the interface of the electronic device will not be stuck in the preview animation interface that cannot respond to user operation instructions.

[0027] In a possible implementation of the first aspect above, it is determined that the first motion effect is not played in the following manner: it is detected that the pre-start function is not enabled, and it is determined that the first motion effect is not played, wherein the pre-start function is used to load and play the first motion effect.

[0028] In some embodiments, when the electronic device detects that the pre-start function is not enabled, that is, the electronic device has not been triggered to load the preview animation, it can directly determine that the preview animation is not currently being played. In this way, when the electronic device determines that the focus window is empty, if it also determines that the preview animation is not being played, the electronic device can call the interception program to end the life cycle of the startActivity program, thereby stopping the execution of the relevant code of the startActivity program.

[0029] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory being used to store instructions executed by one or more processors of the electronic device, and the processor being one of the one or more processors of the electronic device, and being used to execute the program startup method mentioned in the present application.

[0030] In a third aspect, the present application provides a readable storage medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to execute the program startup method mentioned in the present application.

[0031] In a fourth aspect, the present application provides a computer program product, comprising: computer instructions, which, when executed on an electronic device, cause the electronic device to execute the program startup method mentioned in the present application.

[0032] The beneficial effects of the second to fourth aspects mentioned above can be referred to the relevant descriptions in the first aspect mentioned above and various possible implementations of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario of an application startup process is shown;

[0034] Figure 2A According to some embodiments of the present application, a schematic diagram of a system architecture of an electronic device is shown;

[0035] Figure 2B According to some embodiments of the present application, a playback timing diagram of a startup window animation is shown;

[0036] Figure 3A According to some embodiments of the present application, a playback timing diagram of a preview animation and a startup window animation is shown;

[0037] Figure 3B According to some embodiments of the present application, a schematic diagram of a fusion process of preview animation and startup window animation is shown;

[0038] Figure 4 According to some embodiments of the present application, a flowchart of a program startup method is shown;

[0039] Figure 5A According to some embodiments of the present application, a schematic diagram of a life cycle exception of a startActivity program is shown;

[0040] Figure 5B According to some embodiments of the present application, a specific flow chart of determining whether to intercept and start an active program is shown;

[0041] Figure 5C According to some embodiments of the present application, a flow chart of execution logic for determining whether a preview animation is being played is shown;

[0042] Figure 6 According to some embodiments of the present application, an interactive schematic diagram of a program startup method is shown;

[0043] Figure 7 According to some embodiments of the present application, an interactive schematic diagram of loading preview animation is shown;

[0044] Figure 8 According to some embodiments of the present application, an interactive schematic diagram of playing a startup window animation is shown;

[0045] Fig. 9 According to some embodiments of the present application, a schematic diagram of an interaction for starting abnormal interception is shown;

[0046] Fig.10 According to some embodiments of the present application, a schematic diagram of the hardware structure of an electronic device is shown. DETAILED DESCRIPTION

[0047] The illustrative embodiments of the present application include, but are not limited to, a program startup method, a device, a storage medium, and a program product.

[0048] The following first describes the background of the program startup method provided by this application.

[0049] Currently, when an electronic device starts an application, it can first play the startup window animation, and then gradually transition from the startup window animation to the application interface, thereby achieving a visual transition effect and avoiding excessive jumps in the user's vision. Figure 1 As shown in Figure (a), the user can click on the desktop application icon 101 in the mobile phone 100 to start the application "email" corresponding to the desktop application icon 101. In the process of starting the email, the mobile phone 100 will first play the start window animation. Figure 1 As shown in (b) and (c) of FIG. 1 , the mobile phone 100 will display the relevant layer 102 of the startup window animation, and gradually enlarge the relevant layer 102 of the startup window animation to occupy the entire screen of the mobile phone 100. After the relevant layer 102 of the startup window animation is enlarged to occupy the entire screen of the mobile phone 100, the mobile phone 100 will jump out of the application interface 103. At this time, Figure 1 As shown in FIG. 5( d ) of FIG. 5 , the mobile phone 100 can display the application interface 103 of the email application for the user to operate. In this way, the process of gradually transitioning from the relevant layer 102 of the startup window animation effect to the application interface 103 can achieve a visual transition effect.

[0050] Among them, in electronic devices, the realization of startup window animation requires the cooperation of multiple modules. Only through data transmission and close cooperation between multiple modules can the complex startup window animation playback effect be effectively designed and realized. The following can describe the playback process of startup window animation in combination with the modules in the electronic device system architecture.

[0051] It can be understood that the electronic device applicable to the embodiments of the present application may be any electronic device including mobile phones, computers, virtual reality (VR) devices, tablet computers, wearable devices, augmented reality (AR) devices, laptop computers, vehicle-mounted devices, etc., and the form of the electronic device is not specifically limited in the embodiments of the present application.

[0052] Below is the layered architecture of Android TM Taking the system as an example, a schematic diagram of the system architecture of an electronic device according to an embodiment of the present application is exemplarily described.

[0053] like Figure 2A As shown, Android TM The system architecture may include an application layer, an application framework layer, an Android runtime and system libraries, and a kernel layer.

[0054] like Figure 2A As shown, the application layer may include applications such as the desktop (Launcher), etc. The desktop application is responsible for managing and presenting the user interface, including the desktop layout, desktop wallpaper, etc. For example, the desktop application may be used to present the location of the desktop application icon.

[0055] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer may include a layer synthesizer (SurfaceFlingfer), an input module (Input), a window management service (window manager service, WMS), an activity manager service (activity manager service, AMS), and a system service (SystemSever).

[0056] The input module is used to receive user input data, for example, it may include a press operation event and a lift operation event when the user clicks on a desktop application icon.

[0057] AMS is used to track and manage the life cycle of activities in an application, including starting, pausing, ending, and destroying activities.

[0058] WMS can be used to display, move, hide, and destroy the startup window of an application. It can also be used to support animation effects of the startup window, such as the appearance, disappearance, movement, and enlargement of the startup window.

[0059] The layer compositor is responsible for managing and rendering all displayed content, ensuring a smooth and efficient user interface.

[0060] System services are responsible for starting and managing various services in the system, including service management, cross-process communication, etc.

[0061] Android TM The runtime includes the core library and the virtual machine, Android TM The runtime is responsible for scheduling and management of the Android system.

[0062] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0063] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0064] The system library can include multiple functional modules. For example, the surface manager can be used to create and manage layer information related to the startup window animation, and send the layer information to the layer compositor for synthesis and display.

[0065] The kernel layer is the layer between hardware and software, responsible for the management and abstraction of the underlying hardware, and providing a stable and efficient operating environment for upper-layer applications. The kernel layer can include display drivers, which can receive the relevant layers of the startup window animation sent by the layer compositor for display.

[0066] In addition, different from the kernel layer in the system architecture, electronic devices may also include a computer shell layer (shell), which can be responsible for window management and graphics rendering.

[0067] Among them, when the user clicks on the desktop application icon, the input module can receive the relevant operation data of the user operation and send the relevant operation data of the user to the application. When the application determines that the user operation is a pressing operation based on the relevant operation data, the relevant task of starting the application will not be executed; when the desktop application determines that the user operation is a lifting operation based on the relevant operation data, the application can send the relevant operation data to the WMS, so that the WMS determines which desktop application icon the user is operating based on the user operation position. After the application obtains the determination result of the WMS, the application can initiate a request to the AMS to start the specified application. Among them, in the process of starting the application process, the AMS will call the computer shell (shell), and call the surface manager and layer synthesizer through the computer shell (shell) to draw and render the relevant layers of the startup window animation effect. After the computer shell (shell) completes the drawing and rendering of the relevant layers of the startup window animation effect, the relevant layers of the startup window animation effect can be sent to the AMS, and the AMS sends an instruction to play the startup window animation effect to the computer shell (shell). After the computer shell receives the instruction to play the startup window animation, the computer shell can send the startup window animation related layer to the application, and the startup window animation is played by the application layer.

[0068] Based on the above application startup process, it can be seen that after the electronic device detects the user's lift operation, it needs to complete the drawing and rendering of the startup window animation related layers, and multiple data transmissions are required between the various layers of the architecture before the startup window animation can be played. That is, the interval time (which can be described as "response delay") between the electronic device detecting the user's lift operation and playing the startup window animation is relatively long. For example, Figure 2B As shown, after the electronic device detects the user's pressing operation at time t1, the electronic device will continue to monitor the user's operation instructions until the user's lifting operation is detected at time t2, and then the electronic device will start to execute the related work of starting the window animation effect. For example, after detecting the lifting operation, the relevant code of the startActivity program will be run first to indicate that the application can be started. After the relevant code of the startActivity program is run, the electronic device will perform preparation work such as drawing and rendering of the layers related to the start window animation effect. After completing the preparation work, the start window animation effect will be played.

[0069] In addition, the loading of the startup window animation requires the coordinated work of multiple code modules in the application, and the electronic device plays the startup window animation by running multiple code modules in the application. That is, in the process of loading the startup window animation, it can be said that the application is starting. As mentioned above, before detecting the user's lifting operation, the electronic device cannot start the application, and it is also impossible to load the startup window animation in advance, and thus it is impossible to quickly play the startup window animation after the lifting operation. Therefore, in the present application, the electronic device can load in advance a static layer (which can be described as a related layer of the preview animation) with the same layer content as the startup window animation and without running the application code module, so that after detecting the user's lifting operation, a static picture with the same image content as the startup window animation can be quickly displayed.

[0070] Among them, in the program startup method provided by the present application, when the electronic device detects the user's pressing operation, the electronic device will load the preview animation, wherein the relevant layer of the preview animation is the same as the content of the relevant layer of the startup window animation mentioned above, but the preview animation only plays a static layer, and cannot actually respond to the user's operation instructions such as clicking buttons during the playback of the preview animation. Next, when the user's finger lifting operation is detected, the electronic device can play the preview animation that has been loaded. In addition, after detecting the user's finger lifting operation, the electronic device will also perform the relevant preparations for the above-mentioned startup window animation, for example, drawing or rendering the relevant layers of the startup window animation. Finally, when the electronic device completes the relevant preparations for the startup window animation, when playing the startup window animation, the electronic device can enlarge the relevant layers of the startup window animation to the same size as the relevant layers of the preview animation, and then play the processed startup window animation until the relevant layers are gradually enlarged to occupy the entire screen.

[0071] As an example, you can combine Figure 3A The timing diagram shown in FIG. 1 describes the timing process of the above program startup method. Figure 3AAs shown, after the electronic device detects the user's finger pressing operation at time t1, the electronic device will load the preview effect. It can be understood that the relevant layer of the preview effect is only a static layer, and the loading process is relatively fast. After loading the preview effect, the electronic device will continue to monitor the user's operation instructions until the user's finger is detected to lift the operation at time t2, and the electronic device will start to execute the relevant code of the start activity (startActivity) to indicate that the application can be started. Among them, when the relevant code of the start activity (startActivity) is just started, the electronic device will first play the preview effect, and continue to play until the preparation for the start window effect is completed. Among them, after the relevant code of the start activity (startActivity) is completed, the drawing, rendering and other preparations for the relevant layers of the start window effect will be performed. After the preparation for the start window effect is completed, the electronic device will enlarge the relevant layer of the start window effect to the same size as the relevant layer of the preview effect, stop playing the preview effect, and play the processed start window effect until the relevant layer gradually enlarges to occupy the entire screen. It can be seen that after detecting the user's lifting operation, the electronic device will quickly play a static picture with the same image content as the start window effect.

[0072] In this way, through the above method, when the user's finger lifting operation is detected, the preview animation screen that is the same as the screen when the application is started can be quickly displayed, thereby shortening the response delay of the application; and after completing the relevant preparations for the startup window animation, the playback progress of the startup window animation is adjusted to be consistent with the playback progress of the preview animation, without having to play the startup window animation from the initial state, thereby shortening the overall startup time of the application.

[0073] Among them, on Android TM In the system architecture, a startActivity program is defined to start a new activity. Currently, when an electronic device plays a startup window animation, it will execute the relevant code of the startup activity program when it detects the user's finger lifting operation. After the relevant code of the startup activity program is executed, the loading and playing of the startup window animation will begin. In the program startup method provided in the present application, the electronic device will initiate the life cycle of the startup activity program after detecting the user's finger lifting operation. Among them, after the life cycle of the startup activity program is initiated (at this time, the electronic device has just begun to be triggered to execute the relevant code of the startup activity program, but the relevant code of the startup activity program has not yet been executed), the preview animation playback can be set. And, after the life cycle of the startup activity program is completed (that is, the relevant code of the startup activity program is executed), the electronic device will be triggered to perform the relevant preparations for the startup window animation.

[0074] In some embodiments, after the electronic device completes the relevant preparations for the startup window animation, the electronic device will merge the startup window animation and the preview animation, so that the user cannot see the changes in the animation layer. The fusion of the startup window animation and the preview animation may include the following: (1) The electronic device will pass the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the startup window animation. The callback refers to passing the relevant function of the preview animation as a parameter to another function. Passing the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the startup window animation can mean passing the relevant function of the startup window animation as a parameter to the same other function. (2) The tree structure of the preview animation is merged with the tree structure of the startup window animation to obtain the startup window animation after the tree structure is merged. The tree structure of the animation is a non-linear data structure, including a root node and multiple child nodes. Among them, a child node in the tree structure can be used to represent an animation unit (for example, background color gradient, layer enlargement, etc.), and the child nodes can be nested or dependent on each other. For example, the animation of a child node may need to wait for the animation of another child node to be completed before it can start executing. Merging the tree structure of the preview animation with the tree structure of the startup window animation means merging the nodes in the two animations, thereby merging the animation units of each child node. (3) Adjust the playback progress of the merged startup window animation to be consistent with the playback progress of the preview animation being played. (4) End the life cycle of the preview animation, that is, stop playing the preview animation.

[0075] In some embodiments, application startup includes cold startup and hot startup. Among them, hot startup means that the process of the application is saved in the background, and the electronic device does not need to perform initialization operations or only needs to perform part of the initialization operations. For example, after the user starts application A for the first time, if the user does not clear the memory of application A, the second startup of application A is a hot startup. Cold startup means that there is no process of the application in the background, and the electronic device needs to perform all initialization operations on the application.

[0076] Among them, when the user exits the application, the electronic device will save the interface layer where the application is located when it exits, for example, take a screenshot of the interface when the application is exited and save it. If the next time the application is started is a hot start, the electronic device can obtain the interface layer saved when the application was exited last time, and use the interface layer as the layer for previewing the animation. If the next time the application is started is a cold start, for example, a clear memory operation is performed after the application was exited last time, the layer for previewing the animation can be a startup window customized by the application, for example, usually the logo interface of the application.

[0077] In some embodiments, the playback duration of the preview animation can be extended so that the preview animation can be merged with the startup window animation before it ends, avoiding the phenomenon of animation disconnection. In addition, after the preview animation is merged with the startup window animation, when playing the merged startup window animation (an example of the third animation of the present application), the electronic device will end the life cycle of the preview animation. At this time, it only means that the preview animation is stopped, and the related resources of the preview animation are not released. Among them, the electronic device releases the related resources of the preview animation only when it detects that the playback of the merged startup window animation is completed.

[0078] For details on the fusion process of preview animation and startup window animation, please refer to Figure 3B As shown in the process. Figure 3B As shown, when the user's pressing operation is detected, the application framework layer (which can also be described as the core layer (Core)) can initiate a preview animation loading request. After the computer shell layer (shell) receives the request, it will perform the relevant work of loading the preview animation. After the user's lifting operation is detected, the application layer can play the preview animation that has been loaded. At the same time, after the user's lifting operation is detected, the application framework layer can also initiate a start window animation preparation request. After receiving the request, the computer shell layer will perform the relevant preparation work for the start window animation. After completing the relevant preparation work for the start window animation, the application layer will merge the start window animation with the preview animation before playing the start window animation. Among them, after the start window animation and the preview animation are merged, the application framework layer ends the processing of the preview animation to end the life cycle of the preview animation. In addition, after the application framework layer ends the processing of the preview animation, it will also monitor the playback status of the start window animation. When the application framework layer ends the processing of the start window animation, that is, after the start window animation is played, the preview animation will be notified to trigger the preview animation to release related resources. In this way, by integrating the startup window animation and the preview animation, the phenomenon of animation disconnection can be avoided.

[0079] The following is based on Figure 4 The flowchart schematic diagram shown in the figure describes the processing process of the program startup method mentioned in the present application. Among them, the method can be applied to electronic devices, for example, it can be applied to the mobile phone 100 mentioned above. Specifically, the method is as follows:

[0080] S401: At a first moment, a pressing action event of a user clicking on a first application icon is detected, and a first animation effect is loaded.

[0081] In the present application, the first moment may be the moment when a user presses down operation event mentioned in the present application, for example, Figure 3AThe moment t1 shown; the first application icon may be the desktop application icon corresponding to the application to be started mentioned in this application; the first animation effect may be the preview animation effect mentioned in this application.

[0082] In some embodiments, when the electronic device detects a pressing operation in a user's click operation, the electronic device can be triggered to load the preview effect. Wherein, the layer of the preview effect is a static layer, that is, when the user clicks a button in the layer of the preview effect, there will be no response.

[0083] S402: At the second moment, a lifting action event of the user clicking on the first application icon is detected, and a first motion effect is played, wherein the first motion effect includes an animation effect of enlarging the first image.

[0084] In the present application, the second moment may be the moment when the user's lifting (up) operation is detected as mentioned in the present application, for example, Figure 3A At the moment t2 shown, the first image may be a related layer of the preview motion effect mentioned in this application.

[0085] In some embodiments, when the electronic device detects a lifting operation in a user click operation, the electronic device will determine that the user operation corresponding to the user's pressing operation and lifting operation is a click operation on the desktop application icon, rather than a non-click operation such as a drag operation on the desktop application icon. For example, the electronic device can determine whether it is a click operation by monitoring the interval time between the pressing operation and the lifting operation. If the interval time is less than the preset time, it means that the user operation is a click operation, and the preview animation effect can be played; if the interval time is greater than or equal to the preset time, it means that the user operation is a non-click operation, and the preview animation effect will not be played.

[0086] In some embodiments, when the electronic device detects a lifting (up) action event of a user clicking on a desktop application icon, the electronic device is triggered to start running a startActivity program in the operating system. After the electronic device is triggered to start running the startActivity program, that is, when the relevant code of the startActivity program starts to execute and has not yet been completed, the electronic device will play a preview animation.

[0087] S403: At a third moment during the playback of the first animation effect, it is detected that the preparation for the second animation effect is completed, and the first image is enlarged to the first size.

[0088] In the present application, the third moment may be the moment when the startup window animation mentioned in the present application is prepared; the second animation may be the startup window animation mentioned in the present application; the first size may be the preview of the playback progress of the animation after the preparation of the startup window animation is completed as mentioned in the present application.

[0089] In some embodiments, during the process of playing the preview animation (which can be an example of the fourth moment of the present application, and the fourth moment is earlier than the third moment), the electronic device detects that the life cycle of the startActivity program has been completed, that is, after the execution of the relevant code of the startActivity program is completed, the electronic device will start to execute the relevant preparations for the start window animation. Among them, the layer content of the start window animation is the same as the layer content of the above-mentioned preview animation, but the start window animation can respond to the user's operation instructions.

[0090] S404: Enlarging the second image of the second motion effect to the first size to obtain a third motion effect.

[0091] In the present application, the second image may be a related layer of the startup window animation mentioned in the present application; the third animation may be the fused startup window animation mentioned in the present application.

[0092] In some embodiments, the first image is the same as the second image, and the second image is the first frame image of the third animation effect. That is, the relevant layer content of the preview animation effect is the same as the relevant layer content of the launch window animation effect, and the merged launch window animation effect starts playing from the second image.

[0093] In some embodiments, after detecting that the preparation work for the startup window animation is completed through the above S403, the electronic device will merge the startup window animation and the preview animation to obtain a merged startup window animation (i.e., the third animation). Among them, the fusion process of obtaining the third animation may include: passing the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the startup window animation; merging the tree data structure of the preview animation (which can be an example of the first tree data structure of the present application) with the tree data structure of the startup window animation (which can be an example of the second tree data structure of the present application) to obtain a merged tree data structure (which can be an example of the third tree data structure of the present application); next, the electronic device can enlarge the second image of the startup window animation with the callback operation related data and the merged tree data structure to the first size, thereby obtaining a merged startup window animation. Among them, the tree structure of the animation is a non-linear data structure, including a root node and multiple child nodes. Among them, a child node in the tree structure can be used to represent an animation unit (for example, background color gradient, layer enlargement, etc.), and the child nodes can be nested or dependent on each other. For example, the animation of a child node may need to wait for the animation of another child node to be completed before it can start to execute. Merging the tree structure of the preview animation with the tree structure of the startup window animation means merging the nodes in the two animations, thereby merging the animation units of each child node.

[0094] S405: Play the third animation effect to display the initial application interface of the first application program corresponding to the first application icon.

[0095] In the present application, the first application may be the program to be started mentioned in the present application.

[0096] In some embodiments, the electronic device can play the merged startup window animation until the relevant layer is gradually enlarged to occupy the entire screen of the electronic device, and the playback of the merged startup window animation is completed. After the playback of the merged startup window animation is completed, the relevant resources of the preview animation can be released.

[0097] In some embodiments, after completing the playback operation of the third animation effect, the electronic device can also play the display animation of the initial application interface of the first application. For example, the initial application interface is gradually displayed on the screen through a "fade-in" animation effect, thereby displaying the initial application interface of the first application on the screen. This application does not limit the display animation when displaying the initial application interface.

[0098] In this way, through the above method, when the user's lift operation is detected, the screen when the application is launched can be quickly displayed, thereby shortening the response delay of the application; and after completing the relevant preparations for the startup window animation, the playback progress of the startup window animation is adjusted to be consistent with the playback progress of the preview animation, without the need to play the startup window animation from the initial state, thereby shortening the overall startup time of the application.

[0099] In some embodiments, the electronic device can receive user input data (such as operation data of clicking a desktop application icon, etc.), and transmit the user input data between various processes or system internal modules, for example, between the application process and WMS, and between different message queues within the application. Usually, the transmission speed of input data inside the electronic device is relatively fast, and the transmission of input data has been completed before the life cycle of the start activity (startActivity) program is initiated. However, there may be some abnormal situations, such as operating system failure, etc., which may cause the transmission time of input data inside the electronic device to be too long, that is, the data transmission has not been completed when the life cycle of the start activity program is initiated. At present, when the electronic device initiates the life cycle of the start activity program, if the input data transmission has not been completed, the electronic device will intercept the life cycle of the start activity program, that is, the operation of the start activity program will be terminated before the execution of the relevant code of the start activity program is completed.

[0100] For example, Figure 5A As shown, by monitoring the background application process of the electronic device, a situation in which the life cycle of the startup active program is intercepted due to an abnormal situation is shown. Figure 5AIn the example, when the life cycle of the startup activity program is initiated, the process of input data transmission has not yet been completed. At this time, the electronic device will directly intercept the life cycle of the startup activity program before the execution of the relevant code of the startup activity program is completed.

[0101] In other embodiments, the electronic device transmits the input data to the application corresponding to the focus window based on the focus window in the input data (for example, the area where the desktop icon interacting with the user is located). However, when the acquired focus window is empty, after the electronic device initiates the life cycle of the start-up active program, the electronic device will also directly intercept the life cycle of the start-up active program before the execution of the relevant code of the start-up active program is completed.

[0102] It can be understood that since the electronic device starts to execute the preparation work for the startup window animation after the life cycle of the startup activity program is completed, when the electronic device intercepts the life cycle of the startup activity program so that the life cycle of the startup activity program cannot run normally, the electronic device will not execute the preparation work for the startup window animation, and thus the preview animation and the startup window animation cannot be merged. Therefore, after detecting the user's lifting operation, the electronic device can also determine whether it is necessary to intercept the life cycle of the startup activity program. In the present application, the electronic device can intercept the life cycle of the startup activity program only when it determines that the focus window is empty and the preview animation is not played. The specific process can be referred to. Figure 5B Schematic diagram of the process shown.

[0103] Combine the following Figure 5B The flowchart shown in the figure specifically introduces the process of determining whether to intercept the life cycle of the startup active program in the program startup method mentioned in this application. Among them, the method can be applied to electronic devices, for example, it can be applied to the mobile phone 100 mentioned above. Specifically, the method is as follows:

[0104] S501: Start executing the interception judgment program.

[0105] In some embodiments, the electronic device may also perform the following process during the process of running the startup activity program to determine whether to intercept the life cycle of the startup activity program.

[0106] S502: Determine whether the task is empty. If so, proceed to S512; if not, proceed to S503.

[0107] In some embodiments, the electronic device can detect whether there is an activity in the task. If not, the process proceeds to S503 to determine whether the activity type of the task is the home type; if so, the process proceeds to S512 to terminate the current process.

[0108] In some embodiments, a task is a logical collection, and a task may include multiple activities. Each task is independent of each other, and the activities included in a task usually belong to the same application. When a user clicks on a desktop application icon, the related activities of the application are triggered to start. The electronic device can put the related activities of the application into the task to manage and organize the interaction process between the application and the user.

[0109] S503: Determine whether the activity type of the task is the home type. If yes, proceed to S504; if no, proceed to S512.

[0110] In some embodiments, after the electronic device detects that the task is not empty through S502, it also needs to determine whether the activity type of the current task is the main type (Home). If so, it proceeds to S504 to obtain the display area of ​​the task; if not, it proceeds to S512 to end the execution of the current process.

[0111] In some embodiments, the activity type of the task is the home type (Home), which means that the current user operation is performed on the desktop of the electronic device, for example, clicking on a desktop application icon.

[0112] S504: Acquire the display area of ​​the task.

[0113] In some embodiments, when it is determined through the above S503 that the Activity type of the task is Home, a display area (homeTda) for displaying task-related content or controls may be obtained.

[0114] S505: Get the current focus window.

[0115] In some embodiments, the focus window may be an area that is being interacted with by the user. For example, when the user clicks on a desktop application icon, the focus window may be an area on the electronic device screen that is interacting with the user's click operation.

[0116] S506: Determine whether the focus window is not empty and the display area of ​​the task is not empty. If yes, proceed to S507; if no, proceed to S509.

[0117] In some embodiments, when the electronic device determines that the focus window is not empty and the display area of ​​the task is not empty, S507 can be executed. When the electronic device determines that the focus window is empty or the display area of ​​the task is empty, S509 can be executed.

[0118] In some embodiments, if the focus window is not empty, it may indicate that the electronic device has detected the interaction with the user. If the display area of ​​the task is not empty, it may indicate that the electronic device can normally obtain the display area of ​​the task.

[0119] S507: Determine whether the focus window is a subwindow of the task display area and whether there are multiple focus windows. If yes, proceed to S508; if no, proceed to S509.

[0120] In some embodiments, when it is determined that the focus window is a sub-window of the task display area and there are multiple focus windows, the process proceeds to S508 ; when it is determined that the focus window is not a sub-window of the task display area, the process proceeds to S509 .

[0121] S508: Enter the parallel event processing logic.

[0122] In some embodiments, there may be multiple focus windows. For example, when starting a social software application on a tablet, the tablet interface is usually split-screen. For example, one screen can be used to display a friend list and the other screen can be used to display a chat box. The two screens displayed in the split screen are two focus windows. When the electronic device determines through the above S507 that there are multiple focus windows, it will execute the current parallel event processing logic. For example, through resource management and scheduling mechanisms, it is ensured that multiple windows can access resources fairly and avoid mutual interference. This application does not limit this.

[0123] S509: Determine whether the focus window is empty and is playing a preview animation? If yes, proceed to S510; if no, proceed to S511.

[0124] In some embodiments, when it is determined through S507 that the focus window is not a subwindow of the task display area, that is, when it is determined that the focus window is not on the desktop, the focus window can be preset to be empty, and then S509 is used to determine whether the preview effect is being played when the focus window is empty? Or, when it is determined through S506 that the focus window is empty or the display area of ​​the task is empty, S509 can be used to determine whether the preview effect is being played when the focus window is empty? If so, enter S510, and the electronic device will not intercept the life cycle of the startActivity program; if not, enter S511 and call the interception algorithm.

[0125] The execution logic for determining whether the preview animation is being played can be found in Figure 5C Specifically, the execution logic for determining whether the preview animation is being played is as follows:

[0126] S5091: It is detected that the pre-start function is not enabled, and it is determined that there is no preview animation.

[0127] In some embodiments, when the electronic device detects that the pre-start function is not enabled, that is, the electronic device has not been triggered to load the preview effect, it can directly determine that the preview effect is not currently being played, and execute S5094 to return the determination result. The pre-start function can be the related function for loading preview effects and playing preview effects mentioned in this application.

[0128] S5092: It is detected that the value of the animation is not empty and the animation type is a preview animation type, and it is determined that the preview animation is being played.

[0129] In some embodiments, when the electronic device detects that the relevant parameter value of the motion effect is not empty, that is, when the relevant parameter value of the motion effect exists, it can be indicated that the electronic device is playing the motion effect. Among them, since the electronic device can play a variety of motion effects, the motion effect type (type) can be set for the motion effect (for example, the motion effect type can be a number). When it is determined that the motion effect type corresponding to the detected motion effect related parameter value is the same as the preset preview motion effect type, it can be indicated that the electronic device is playing the preview motion effect, and S5094 is executed to return the determination result.

[0130] S5093: It is detected that the preview animation is being collected and prepared, and the judgment result is determined to be "the preview animation is being played".

[0131] In some embodiments, multiple preparation stages are included before playing the preview animation. When it is detected that the electronic device is preparing for the preview animation, it can also indicate that the electronic device is playing the preview animation, and S5094 is executed to return the judgment result. The stage of preparing for the preview animation may include but is not limited to any one of the following: collecting animation data and the animation type corresponding to the collected animation data is a preset preview animation type, wherein the collected animation data may include at least one of the animation time of the preview animation, the number of frames of the preview animation, the color of the preview animation, and the transparency of the preview animation; or, the stage of preparing for the preview animation may also include starting a remote animation service, wherein the remote animation service can be used to generate a preview animation based on the collected animation data, and the generated preview animation is played from the desktop.

[0132] S5094: Return the determination result.

[0133] In some embodiments, after the electronic device calls the function related to determining whether the preview animation is being played, it also needs to return the determination result to the original function that called the function. Figure 5B In the function related to determining whether to intercept the execution logic of the program life cycle of the startActivity program, you need to call this Figure 5C The related functions shown in the figure determine whether the preview animation is being played (the calling process can be Figure 5B Then, the electronic device completes the execution of Figure 5C After the relevant function of determining whether the preview effect is being played is executed, any one of the determination results determined by S5091 to S5093 above (i.e., no preview effect is being played or preview effect is being played) needs to be returned to Figure 5B The execution logic shown in the figure is in the corresponding related function (returning to S509), so that the electronic device can continue to execute based on the judgment result. Figure 5B The electronic device continues to execute the subsequent process based on the judgment result. Figure 5B For the specific process of the subsequent process, please refer to S510 or S511, which will not be described in detail here.

[0134] S510: Record the log "When the preview animation is playing, the focus window is not on the desktop."

[0135] In some embodiments, when it is determined through S509 that the focus window obtained in the above S505 is empty and the preview animation is being played, that is, when the data corresponding to the focus window does not exist, if the electronic device is still playing the preview animation, the electronic device will not intercept the life cycle of the startActivity program, and continue to run the relevant code of the startActivity program, so as to perform the preparation work of the start window animation when the life cycle of the startActivity program is completed. In addition, the electronic device can also record in the log that "the focus window is not on the desktop when the preview animation is playing".

[0136] In other embodiments, if it is determined through S506 that the focus window is not empty and the display area of ​​the task is not empty, and if it is determined through S507 that the focus window is a subwindow of the task display area but there are no multiple focus windows, the relevant code of the startActivity program can be directly continued to run, so as to perform the preparation work of the start window animation when the life cycle of the startActivity program is completed. In addition, if the focus window is not empty, there is no need to record the log "the focus window is not on the desktop when the preview animation is playing".

[0137] In other embodiments, it is not necessary to detect whether the focus window is empty. When it is determined through S5092 or S5093 that the preview animation is being played, the relevant code of the startActivity program can be directly continued to run. Therefore, in the process of playing the preview animation, the life cycle of the startActivity program will not be blocked due to the delay in the transmission of user input data within the electronic device; or, in the process of playing the preview animation, the life cycle of the startActivity program will not be blocked due to the failure to detect the focus window. In this way, the preview animation and the start window animation can be normally integrated, and the interface of the electronic device will not be stuck in the preview animation interface that cannot respond to user operation instructions.

[0138] S511: Calling the interception program.

[0139] In some embodiments, when it is determined through S509 that the focus window is empty and the preview animation is not played, that is, when the data corresponding to the focus window does not exist, if the electronic device does not play the preview animation, the electronic device can call the interception program to end the life cycle of the startActivity program, thereby stopping the running of the relevant code of the startActivity program.

[0140] S512: End the execution of the interception judgment program.

[0141] In some embodiments, after executing the above process, the execution of the interception judgment program can be terminated. If the electronic device executes S510, when the execution of the interception judgment program is terminated, the electronic device is still running the relevant code of the startActivity program. If the electronic device executes S511, when the execution of the interception judgment program is terminated, the electronic device has intercepted the life cycle of the startActivity program.

[0142] In this way, through the above method, the interception logic of the startActivity program life cycle can be rebuilt so that the preview animation and the startup window animation can be normally integrated.

[0143] Combine the following Figure 6The interactive schematic diagram shown describes the overall execution process of the program startup method provided by the present application. Among them, in the process of executing the program startup method provided by the present application, the electronic device needs to transmit data between multiple software architecture modules, and the software architecture modules used may include the system user interface (system user interface, System UI), desktop (Launcher); and the layer synthesizer (SurfaceFlinger), input module (Input), activity manager service (activity manager service, AMS), system service (SystemServer) in the application framework layer (Framework); and the display driver in the kernel layer. The startup of the application can be achieved through data interaction between the above modules. Specifically, the interaction process is as follows:

[0144] 601: The desktop receives a down operation event sent by the input module.

[0145] In some embodiments, when the user touches the screen, the input module detects a press operation event in the user's click operation and sends the press operation event to the desktop.

[0146] 602: The desktop sends the application package name of the application to be started to the system service.

[0147] In some embodiments, the desktop can send the application package name of the application to be started to the system service, and the system service determines whether the startup type is a cold start or a hot start, wherein the application package name can be used as a unique identifier of the application.

[0148] 603: The system service sends the startup type to the desktop.

[0149] In some embodiments, when the system service obtains the application package name, it can determine whether the same application has been loaded in the background based on the package name. If so, the startup type of the application is hot start; if not, the startup type of the application is cold start. After determining the startup type of the application to be started, the system service can send the startup type to the desktop.

[0150] 604: The system service sends information about the completion of the preparation work to the system user interface.

[0151] In some embodiments, when loading the preview animation corresponding to the application to be started, it is necessary to obtain the relevant layer of the preview animation. For example, when the user exited the application last time, the electronic device saved the interface layer when the application was exited. If the current startup type for the application is hot start, the electronic device can obtain the interface layer saved when the application was exited last time, and use the interface layer as the layer of the preview animation. If the startup type of the current application is cold start, for example, a clear memory operation was performed after the application was exited last time, the layer of the preview animation can be a startup window customized for the application, for example, usually the logo interface of the application.

[0152] In other embodiments, when loading the preview effect, it is also necessary to obtain the clearing operation of the preview effect in advance. If the preview effect can be integrated with the startup window effect, the execution of the preview effect clearing operation can be triggered after the startup window effect is played. If the preview effect cannot be integrated with the startup window effect, the execution of the preview effect clearing operation can be triggered in advance.

[0153] In some embodiments, after completing various tasks related to loading the preview animation, the system service may send a relevant instruction to the system user interface that the preparation work is completed. Figure 7 The interactive diagram of the preview animation loading is shown, which will not be described in detail here.

[0154] 605: The system user interface sends a play animation instruction to the desktop.

[0155] In some embodiments, after the system user interface receives the relevant information about the completion of the preparation work sent by the system service, it can notify the desktop that the preview animation can be played.

[0156] 606: The desktop creates a root control layer when the preview animation is opened (pre-opening root leash) and a root control layer when the preview animation is closed (pre-closing root leash).

[0157] In some embodiments, the control layer (leash) can be used to mount other layers so that the layers mounted under the control layer (leash) can be isolated. That is, when processing the layers mounted under the control layer (leash), other layers in the business logic will not be affected. Among them, the root control layer (pre-opening root leash) when creating the preview animation effect can be to create a control layer (leash) related to the animation effect at the starting stage of the preview animation effect, so that the relevant layers at the starting stage of the preview animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the starting stage of the preview animation effect. The root control layer (pre-closing root leash) when creating the preview animation effect can be to create a control layer (leash) related to the animation effect at the closing stage of the preview animation effect, so that the relevant layers at the closing stage of the preview animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the closing stage of the preview animation effect.

[0158] 607: The desktop receives an up operation event sent by the input module.

[0159] In some embodiments, when the user's finger leaves the screen, the input module detects a lift operation event in the user's click operation and sends the lift operation event to the desktop.

[0160] 608: The desktop triggers AMS to call the startActivity program.

[0161] In some embodiments, when an up operation is detected, the AMS is triggered to execute the relevant code of the startup activity program to start a new activity (Activity) so as to display a new window or interface. Among them, AMS is the core component of activity management, providing functions such as activity startup, life cycle management, and stack management.

[0162] 609: The desktop creates an animation object.

[0163] In some embodiments, the electronic device creates a motion effect object when playing any motion effect. The created motion effect object may include various properties of the preview motion effect, such as the motion effect change type (e.g., gradient, rotation, etc.) of the preview motion effect, the duration of the preview motion effect, and other properties.

[0164] 610: The layer compositor obtains the animation sent from the desktop.

[0165] In some embodiments, the layer compositor is an AndroidTM A key component in the system, responsible for managing and compositing display content. The layer compositor receives preview animations and renders and displays them.

[0166] 611: Layer compositor performs layer processing.

[0167] In some embodiments, the layer synthesizer can synthesize multiple graphic elements (for example, multiple text boxes) in the layer of the preview motion effect into one layer, thereby forming a complete picture for the final display. In addition, when the layer synthesizer performs layer processing, it can also render the layer based on the motion effect information of the preview motion effect (for example, fade-in, gradient, etc.). For example, if the motion effect information of the preview motion effect is fade-in (such as the layer gradually displays from a transparent state to a clear state), the layer synthesizer can determine the transparency of the layer at each moment, so that when displaying the relevant layer of the preview motion effect, the fade-in animation effect can be achieved based on the determined different transparencies. Among them, the present application does not limit the way in which the layer synthesizer performs layer processing.

[0168] 612: The layer compositor sends the preview animation to the display driver.

[0169] In some embodiments, the layer synthesizer sends the processed related layers of the preview animation to the display driver, so that the display driver can send the layers to the screen for display, so that the preview animation can be played.

[0170] 613: The system service sends information about the completion of preparation work to the system user interface.

[0171] In some embodiments, after completing the relevant preparation work for starting the window animation effect, the system service can send relevant information about the completion of the preparation work to the system user interface.

[0172] 614: The system user interface sends a motion fusion instruction to the desktop.

[0173] In some embodiments, after completing the relevant preparations for the startup window animation, before playing the startup window animation, it is also necessary to merge the startup window animation and the preview object.

[0174] 615: The desktop cancels the startup window animation playback.

[0175] In some embodiments, after the startup window animation is prepared, the startup window animation and the preview animation need to be merged, instead of playing the startup window animation directly. TM The animation cancellation (onAnimationCancelled) code in the system is used to cancel the playback of the startup window animation.

[0176] 616: The desktop passes a message to the system user interface.

[0177] In some embodiments, after the desktop cancels the playing of the startup window animation, a message can be passed to the system user interface so that the system user interface executes subsequent corresponding instructions.

[0178] 617: The system user interface sends completion information to the system service.

[0179] In some embodiments, the system user interface can send relevant information to the system service that the cancellation of the startup window animation playback has been completed.

[0180] 618: The desktop creates the root control layer when the startup window animation is opened (opening root leash) and the root control layer when it is closed (closing root leash).

[0181] In some embodiments, the control layer (leash) can be used to mount other layers so that the layers mounted under the control layer (leash) can be isolated. That is, when processing the layers mounted under the control layer (leash), other layers in the business logic will not be affected. Among them, the root control layer (opening root leash) when the startup window animation effect is opened can be created by creating a control layer (leash) related to the animation at the start stage of the startup window animation effect, so that the relevant layers at the start stage of the startup window animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the start stage of the startup window animation effect. The root control layer (closing root leash) when the startup window animation effect is closed can be created by creating a control layer (leash) related to the animation at the closing stage of the startup window animation effect, so that the relevant layers at the closing stage of the startup window animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the closing stage of the startup window animation effect.

[0182] 619: The system service releases the transition effect root node of the preview animation (pre-transition root) and the root control layer when the preview animation is closed (pre-closing root leash).

[0183] In some embodiments, the transition root is the starting point and end point of the transition, for example, it may include the effect of entering the animation (such as fade-in, rotation-in, etc.) and the effect of disappearing the animation (such as fade-out, rotation-out, etc.). When the electronic device merges the startup window animation with the preview animation, the merged startup window animation can be played without showing the preview animation entering or disappearing. Therefore, the transition root of the preview animation can be released.

[0184] In some embodiments, the control layer (leash) can be used to mount other layers so that the layers mounted under the control layer (leash) can be isolated. After the electronic device merges the startup window animation effect and the preview animation effect, the merged startup window animation effect can be played without showing the effect when the preview animation effect is closed. Therefore, the electronic device can also release the root control layer (pre-closing root leash) when the preview animation effect is closed.

[0185] 620: The desktop creates an animation object.

[0186] In some embodiments, the electronic device creates an animation object when playing any animation. The created animation object may include various properties of the merged startup window animation, such as the animation change type (e.g., gradient, rotation, etc.) of the merged startup window animation, the animation duration of the merged startup window animation, and other properties.

[0187] 621: The layer compositor obtains the animation sent to the desktop.

[0188] In some embodiments, the layer compositor is an Android TM A key component in the system, responsible for managing and compositing display content. The layer compositor receives the blended splash window animations and renders and displays them.

[0189] 622: Layer compositor performs layer processing.

[0190] In some embodiments, the layer synthesizer can synthesize multiple graphic elements (for example, multiple text boxes) in the layer of the fused startup window animation into one layer, thereby forming a complete picture that is finally displayed. In addition, when the layer synthesizer performs layer processing, it can also render the layer based on the animation information of the fused startup window animation (for example, fade-in, gradient, etc.). For example, if the animation information of the startup window animation is fade-in (such as the layer gradually displays from a transparent state to a clear state), the layer synthesizer can determine the transparency of the layer at each moment, so that when displaying the relevant layers of the startup window animation, the fade-in animation effect can be achieved based on the determined different transparencies. Among them, the present application does not limit the way in which the layer synthesizer performs layer processing.

[0191] 623: The layer compositor sends the animation to the display driver.

[0192] In some embodiments, the layer synthesizer sends the processed related layers of the fused startup window animation to the display driver, so that the display driver can send the layers to the screen for display, so that the playback of the fused startup window animation can be achieved.

[0193] In this way, through the above-mentioned interaction diagram, when the user's lift operation event is detected, the screen when the application is launched can be quickly displayed, thereby shortening the response delay of the application; and after completing the relevant preparations for the startup window animation, the playback progress of the startup window animation is adjusted to be consistent with the playback progress of the preview animation, without the need to play the startup window animation from the initial state, thereby shortening the overall startup time of the application.

[0194] Combine the following Figure 7 The interactive schematic diagram shown describes the process of loading and playing preview effects in the program startup method provided by this application. Among them, in the process of loading and playing preview effects, the electronic device needs to transfer data between multiple processes or code modules, and the processes or code modules used may include the desktop (Launcher), preview effect related code class (PreAniController), remote animation service (RemoteTransition), window management service (HwWindowManager), effect participant collection service (TransitionController), effect participant collection class (Transition), window transaction synchronization engine (BLASTSyncEngine), synchronization group (SyncGroup), computer shell (Shell), and layer synthesizer (SurfaceFlinger). Through the data interaction between the above-mentioned processes or code modules, the loading of preview effects can be realized. Specifically, the interaction process is as follows:

[0195] 701: The desktop detects a press operation.

[0196] In some embodiments, the operation of the user clicking the desktop application icon may include a finger press (down) operation and a finger lift (up) operation. When the desktop process detects the user's press operation, each process can be triggered to execute the relevant process of loading the preview animation effect.

[0197] 702: Desktop creation preview animation related code class.

[0198] In some embodiments, during the execution of the process related to loading the preview animation effect, it is necessary to create a code class, and implement the process execution by calling each module code in the code class.

[0199] 703: Preview the animation-related code class to create a remote animation service.

[0200] In some embodiments, the remote animation service can be used to transmit layer information. Wherein, creating the remote animation service through the preview animation effect related code class means that during the process of running the preview animation effect related code class, the remote animation service process needs to be started.

[0201] 704: The preview animation related code class registers and passes the remote animation service to the window management service.

[0202] In some embodiments, registering the created remote animation service means actually loading the remote animation service into the process of the electronic device for operation. The window management service is located in the application framework layer of the electronic device. When the window management service process receives the remote animation service interface, it indicates that the application framework layer has received a loading request for preview animation.

[0203] 705: The window management service calls the animation participant collection service process to create an entity of the animation participant collection class and pass the animation state.

[0204] In some embodiments, the motion effect participant collection entity can be used to collect motion effect participants, so that subsequent electronic devices can only operate on the collected participants, and will not operate on elements unrelated to the motion effect participants (such as desktop wallpapers, etc.), thereby ensuring that elements unrelated to the motion effect participants will not change.

[0205] 706: The animation participant collection service process creates an animation participant collection class entity.

[0206] In some embodiments, after receiving a request to create an entity of the animation participant collection class, the animation participant collection service process can create an entity of the animation participant collection class to collect the animation participant.

[0207] 707: The animation participant collection service calls the animation participant collection class entity to collect the animation participants.

[0208] In some embodiments, the motion effect participant collection entity can be used to collect motion effect participants, so that subsequent electronic devices can only operate on the collected participants, and will not operate on elements unrelated to the motion effect participants (such as desktop wallpapers, etc.), thereby ensuring that elements unrelated to the motion effect participants will not change.

[0209] 708: The animation participant collection class entity calls the start synchronization (startSyncset) method in the window transaction synchronization engine process.

[0210] In some embodiments, when multiple window container transactions need to be processed and these transactions need to be performed synchronously, a new synchronization group (SyncGoup) can be initialized by calling the startSyncset method, and this synchronization group will be used to collect transactions of all window containers participating in synchronization. Synchronization refers to multiple operations or transactions being performed simultaneously in a certain order and rules to ensure the dependency and consistency between them.

[0211] 709: The window transaction synchronization engine process is ready to synchronize.

[0212] In some embodiments, after a window container is added to a sync group, a prepareSync method is executed to set its sync state to an appropriate value.

[0213] 710: The window transaction synchronization engine creates a synchronization group.

[0214] In some embodiments, the synchronization group may be created when a startSyncset method in a window transaction synchronization engine process is called.

[0215] 711: The window management service process initiates an animation request to the animation participant collection class.

[0216] In some embodiments, after the motion effect participant collection class has collected the motion effect participants, the window management service process may send a playback request for previewing the motion effect to the motion effect participant collection class.

[0217] 712: The animation participant collection entity sends an animation request to the computer shell.

[0218] In some embodiments, after receiving a request to play a preview animation, the animation participant collection entity may send the request to a computer shell process. The computer shell may be a processing class of an application framework layer for processing the playback of the animation.

[0219] In some embodiments, after the computer shell receives a request to play a preview animation, if the computer shell determines that the animation request can be processed, the shell may return a confirmation indication to the window management service.

[0220] 713: The window management service process calls the play (playnow) method and notifies the animation participant collection class.

[0221] In some embodiments, the window management service process may call a play (playnow) method to indicate that the preview animation may start playing, and send an instruction to play the preview animation to the animation participant collection class.

[0222] 714: The animation participant collection class calls the method in the window transaction synchronization engine process to detect whether the synchronization (onSurfacePlacement) has been completed.

[0223] In some embodiments, when the animation can be played and previewed, the animation participant collection class can call a method in the window transaction synchronization engine process to detect whether synchronization (onSurfacePlacement) has been completed, so as to trigger the window transaction synchronization engine process to call an end method and end the synchronization group.

[0224] 715: The window transaction synchronization engine process calls the completion (tryFinish) method.

[0225] In some embodiments, the window transaction synchronization engine process calls a tryFinish method, which can be used to end the synchronization group.

[0226] 716: The synchronization group sends relevant information about the completed preparation work to the animation participant collection class.

[0227] In some embodiments, after the synchronization group ends, the animation participant collection class can be notified to complete the preparation work.

[0228] 717: The window management service process obtains the relevant layers of the preview animation and saves them in the animation participant collection class.

[0229] In some embodiments, when the user exits the application, the electronic device saves the interface layer that the application was in when it was exited. If the next time the application is started is a hot start, the electronic device can obtain the interface layer saved when the application was exited last time, and use the interface layer as the layer for previewing the animation. If the next time the application is started is a cold start, for example, a clear memory operation was performed after the application was exited last time, the layer for previewing the animation can be a startup window customized for the startup application, for example, usually the logo interface of the application.

[0230] 718: The window management service process obtains the deletion operation of the preview animation and saves it in the animation participant collection class.

[0231] In some embodiments, the window management service process can obtain the preview animation deletion operation process in advance and save it to the animation participant collection class. For example, if the preview animation can be integrated with the startup window animation, the preview animation deletion operation can be triggered after the startup window animation ends.

[0232] 719: The window management service process obtains the clearing operation of the preview animation and saves it in the animation participant collection class.

[0233] In some embodiments, the window management service process can also obtain the preview animation clearing operation process in advance and save it to the animation participant collection class. For example, if the preview animation can be integrated with the startup window animation, the operation of clearing the preview animation memory can be triggered after the startup window animation ends.

[0234] 720: The animation participant collection class notifies the computer shell that the animation preview is ready.

[0235] In some embodiments, the animation participant collection class can call the animation start (OnAnimationSatart) method of the computer shell to notify the computer shell that the preview animation is ready and can play the preview animation.

[0236] 721: Layer compositor callback previews animations to desktop.

[0237] In some embodiments, since the preview animation is played on the desktop, the layer compositor can call the preview animation back to the desktop so as to play the preview animation on the desktop.

[0238] 722: The desktop detects a lift operation.

[0239] In some embodiments, when the user's finger leaves the screen, the desktop can detect the user's finger lift operation.

[0240] 723: Desktop playback preview animation.

[0241] In some embodiments, after receiving the preview animation, the desktop will not play the preview animation immediately, but will start playing the preview animation after detecting the user's lifting operation and after detecting the life cycle of the startActivity program.

[0242] 724: The desktop passes layer information to the layer compositor.

[0243] In some embodiments, the layer compositor is used to manage and optimize rendering layer data, and the desktop can also call back the relevant layer information of the preview animation to the layer compositor for storage or subsequent processing.

[0244] In this way, through the above-mentioned interaction process, the electronic device can load the preview animation when detecting the user's pressing operation, and quickly play the preview animation when detecting the user's lifting operation, so that the user can quickly view the startup screen of the application after clicking the desktop application icon.

[0245] Combine the following Figure 8 The interactive schematic diagram shown describes the process of loading and playing the startup window dynamic effects in the program startup method provided by this application. Among them, in the process of loading and playing the startup window dynamic effects, the electronic device needs to transmit data between multiple processes or code modules, and the processes or code modules used may include the desktop (Launcher), activity manager service (activity manager service, AMS), dynamic effect participant collection service (TransitionController), dynamic effect participant collection class (Transition), window transaction synchronization engine (BLASTSyncEngine), synchronization group (SyncGroup), computer shell (Shell), and layer synthesizer (SurfaceFlinger). Through the data interaction between the above-mentioned processes or code modules, the loading and playing of the startup window dynamic effects can be realized. Specifically, the interaction process is as follows:

[0246] 801: The desktop detects a lift operation.

[0247] In some embodiments, when the desktop process detects the user's finger lifting operation, each process can be triggered to execute the relevant processes of starting window animation loading and playing described later.

[0248] 802: The desktop triggers AMS to call the startActivity program.

[0249] In some embodiments, when a lift operation is detected, the AMS is triggered to execute a startActivity program to start a new activity so as to display a new window or interface. Among them, the AMS is the core component of activity management, providing functions such as activity startup, life cycle management, and stack management.

[0250] 803: AMS calls the animation participant collection service process to create an entity of the animation participant collection class (Transition).

[0251] In some embodiments, the motion effect participant collection entity can be used to collect motion effect participants, so that subsequent electronic devices can only operate on the collected participants, and will not operate on elements unrelated to the motion effect participants (such as desktop wallpaper, time settings, etc.), thereby ensuring that elements unrelated to the motion effect participants will not change.

[0252] 804: The animation participant collection service process creates an animation participant collection class entity.

[0253] In some embodiments, after receiving a request to create an entity of the animation participant collection class, the animation participant collection service process can create an entity of the animation participant collection class to collect the animation participant.

[0254] 805: The animation participant collection service calls the animation participant collection class entity to collect the animation participants.

[0255] In some embodiments, the animation participant collection entity can be used to collect animation participants, so that the subsequent electronic device can only operate the collected participants, and will not operate elements unrelated to the animation participants (such as desktop wallpaper, etc.), so that elements unrelated to the animation participants will not be changed. Among them, the participants of the window animation can be components, layouts, views, etc.

[0256] 806: The animation participant collection class entity calls the start synchronization (startSyncset) method in the window transaction synchronization engine process.

[0257] In some embodiments, when multiple window container transactions need to be processed and these transactions need to be performed synchronously, a new synchronization group can be initialized by calling the startSyncset method, and this synchronization group will be used to collect transactions of all window containers participating in synchronization. Synchronization refers to multiple operations or transactions being performed simultaneously in a certain order and rules to ensure the dependency and consistency between them.

[0258] 807: The window transaction synchronization engine process is ready to synchronize.

[0259] In some embodiments, after a window container is added to a sync group, a prepareSync method is executed to set its sync state to an appropriate value.

[0260] 808: The window transaction synchronization engine creates a synchronization group.

[0261] In some embodiments, the synchronization group may be created when a startSyncset method in a window transaction synchronization engine process is called.

[0262] 809: The animation participant collection entity sends the animation data to the computer shell.

[0263] In some embodiments, the computer shell layer may be a processing class of the application framework layer, which is used to process tasks such as playing the dynamic effect. Therefore, the relevant data of the startup window dynamic effect may be sent to the computer shell layer.

[0264] 810: The animation participant collection class calls the method in the window transaction synchronization engine process to detect whether the synchronization (onSurfacePlacement) has been completed.

[0265] In some embodiments, the animation participant collection class can call a method in the window transaction synchronization engine process for detecting whether synchronization (onSurfacePlacement) has been completed, so as to trigger the window transaction synchronization engine process to call an end method to end the synchronization group.

[0266] 811: The window transaction synchronization engine process calls the completion (tryFinish) method.

[0267] In some embodiments, the window transaction synchronization engine process calls a tryFinish method, which can be used to end the synchronization group.

[0268] 812: The synchronization group sends the relevant information of the completed preparation work to the animation participant collection class.

[0269] In some embodiments, after the synchronization group ends, the animation participant collection class can be notified to complete the preparation work.

[0270] 813: The animation participant collection class notifies the computer shell that it can play the startup window animation.

[0271] In some embodiments, the animation participant collection class can call the OnAnimationSatart method of the computer shell to notify the computer shell that the startup window animation can be played.

[0272] 814: The layer compositor callback starts the window animation to the desktop.

[0273] In some embodiments, since the startup window animation is played on the desktop, the layer compositor can call back the startup window animation to the desktop so that the startup window animation can be played on the desktop. Before playing the startup window animation, the startup window animation needs to be merged with the preview animation to avoid the user seeing two different animations. For example, the playback progress of the startup window is adjusted to be consistent with the playback progress of the preview animation being played.

[0274] 815: The desktop passes layer information to the layer compositor.

[0275] In some embodiments, the layer compositor is used to manage and optimize rendering layer data, and the desktop can also call back the relevant layer information of the startup window animation to the layer compositor for storage or subsequent processing.

[0276] In this way, through the above-mentioned interaction process, the electronic device can start playing the window animation when detecting the user's lifting operation.

[0277] In some embodiments, as described above, in the case of abnormal transmission of some input information, the electronic device will intercept the life cycle of the startActivity program. Fig. 9 The interactive schematic diagram shown describes the process of intercepting the life cycle of the start activity (startActivity) program in the program startup method provided in this application. Among them, in the process of intercepting the life cycle of the start activity program, the electronic device needs to transmit data between multiple processes or code modules, and the processes or code modules used may include the desktop (Launcher), input module (Input), window management service (WindowManagerService, WMS), activity manager service (activity managerservice, AMS). Through the data interaction between the above-mentioned processes or code modules, the life cycle of the start activity (startActivity) program can be intercepted. Specifically, the interaction process is as follows:

[0278] 901: The desktop detects a lift operation by the user.

[0279] In some embodiments, when the desktop process detects that the user's finger is lifted, each process can be triggered to execute the relevant process of starting the window animation playback.

[0280] 902: The desktop triggers the AMS to initiate the life cycle of the startActivity program.

[0281] In some embodiments, when a lift operation is detected, the AMS is triggered to execute a startActivity program to start a new activity so as to display a new window or interface. Among them, the AMS is the core component of activity management, providing functions such as activity startup, life cycle management, and stack management.

[0282] 903: The WMS determines the focus window of the input data transmitted by the input module.

[0283] In some embodiments, the Input module can receive user input data (press operation and lift operation) and transmit the user input data between various processes or system internal modules, for example, between the application process and the WMS. The WMS can determine the focus window in the input data, for example, whether the user operation is performed on the desktop.

[0284] 904: The life cycle of the startActivity program is blocked on the AMS side.

[0285] In some embodiments, the transmission speed of input data in the electronic device is usually fast, and the focus window determination speed is also fast. That is, the transmission of input data and the determination of the focus window have been completed before the life cycle of the startup activity program is initiated. Fig. 9 In the interactive flow chart shown, after the desktop triggers AMS to call the launch activity program (initiating the life cycle of the launch activity program), WMS receives input data and determines the focus window. At this time, the life cycle of the launch activity program will be blocked on the AMS side. That is, AMS cancels the call to the launch activity program, and the launch activity program is not executed.

[0286] It can be understood that since the electronic device starts to perform the preparation work for the startup window animation after the life cycle of the startup activity program is completed, when the electronic device intercepts the life cycle of the startup activity program so that the life cycle of the startup activity program cannot run normally, the electronic device will not perform the preparation work for the startup window animation, and thus the preview animation and the startup window animation cannot be merged. Since the preview animation cannot respond to user operation instructions, and the release operation of the preview animation is set at the end time of the startup window animation, therefore, if the electronic device cannot complete the preparation work for the startup window animation, the electronic device will always stay in the preview animation interface that cannot respond to user operation instructions.

[0287] In some embodiments, in order to avoid the situation that the preview animation cannot be integrated with the startup window animation due to the life cycle of the startup activity program being blocked on the AMS side after the preview animation has been played. Figure 5B and Figure 5C The interception judgment logic shown is such that when it is determined that the preview animation is being played, the life cycle of the startup activity program will continue to be executed, so that the preparation work for the startup window animation can be completed, so as to merge the startup window animation and the preview animation.

[0288] In this way, through the program startup method provided by the present application, when the user's lift operation is detected, the screen when the application is started can be quickly displayed, thereby shortening the response delay of the application; and when it is determined that the preview animation is being played, the life cycle of the startup activity (startActivity) program will continue to be executed, so that the startup window animation and the preview animation are integrated, avoiding the electronic device from always staying in the preview animation interface that cannot respond to user operation instructions.

[0289] An embodiment of the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the program startup method mentioned in the present application.

[0290] An embodiment of the present application provides a computer program product, including: computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the program startup method mentioned in the present application.

[0291] An embodiment of the present application also provides an electronic device, which includes: a memory and a processor, the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the program startup method mentioned in the present application.

[0292] The program startup method of the present application can be executed by an electronic device, wherein the electronic device can be any electronic device such as a server, a mobile phone, a computer, a tablet computer, an augmented reality (AR) device, a laptop computer, etc. The form of the electronic device is not specifically limited in the embodiments of the present application.

[0293] like Fig.10 As shown, taking mobile phone 100 as an example, a hardware structure diagram of an electronic device according to an embodiment of the present application is exemplified.

[0294] like Fig.10As shown, the mobile phone 100 may 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 speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a gyroscope sensor 180A, a magnetic sensor 180B, an acceleration sensor 180C, an infrared sensor 180D, a temperature sensor 180E, a touch sensor 180F, an ambient light sensor 180G, a light sensor 180H, etc.

[0295] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0296] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), a controller, a video codec, a digital signal processor (DSP), etc. Different processing units may be independent devices or integrated into one or more processors.

[0297] In an embodiment of the present application, the processor 110 can be used to execute the program startup method mentioned in the present application, for example, loading preview effects, running the startActivity program, and executing the interception judgment logic of the startActivity program life cycle.

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

[0299] The USB interface 130 can be used to connect a charger to charge the mobile phone 100, or to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0300] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also power the electronic device through the power management module 141.

[0301] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the screen 194, the camera 193, and the wireless communication module 160. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0302] The wireless communication function of the mobile phone 100 can be realized by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and a modulation and demodulation processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, antenna 1 can be used in combination with a tuning switch.

[0303] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the mobile phone 100 .

[0304] The screen 194 is used to display images, videos, etc. The screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), etc. In some embodiments, the mobile phone 100 may include 1 or N screens 194, where N is a positive integer greater than 1.

[0305] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

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

[0307] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0308] The gyro sensor 180A may be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180A.

[0309] The magnetic sensor 180B includes a Hall sensor and can be used to detect the strength of the surrounding magnetic field.

[0310] The acceleration sensor 180C can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching, pedometers, etc.

[0311] The infrared sensor 180D is used to detect, receive and analyze infrared radiation signals.

[0312] The temperature sensor 180E is used to detect temperature. In some embodiments, the mobile phone 100 uses the temperature detected by the temperature sensor 180E to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180E exceeds a threshold, the mobile phone 100 reduces the performance of the processor located near the temperature sensor 180E to reduce power consumption and implement thermal protection.

[0313] The touch sensor 180F is also called a "touch control device". The touch sensor 180F can be set on the screen 194, and the touch sensor 180F and the screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180F is used to detect touch operations acting on or near it.

[0314] The ambient light sensor 180G is used to sense the brightness of ambient light.

[0315] The light sensor 180H can be used to detect light intensity. It has high sensitivity and fast response speed. It can be used in various lighting environments and provide real-time feedback on light conditions.

[0316] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.

[0317] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

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

[0319] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0320] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0321] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0322] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0323] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0324] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0325] It should be noted that, in the examples and description of the present application, 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 that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "include one" do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0326] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A program startup method, applied to an electronic device, characterized in that: The method comprises: At a first moment, a pressing action event of a user clicking on a first application icon is detected, and a first animation effect is loaded; At the second moment, a lifting action event of the user clicking the first application icon is detected, and the first motion effect is played, where the first motion effect includes an animation effect of enlarging the first image; At a third moment during the playing of the first motion effect, it is detected that the preparation work for the second motion effect is completed, and the first image is enlarged to a first size; Enlarging the second image of the second motion effect to the first size to obtain a third motion effect, wherein the first image is the same as the second image, and the second image is a first frame image of the third motion effect; The third animation effect is played to display an initial application interface of the first application corresponding to the first application icon.

2. The method according to claim 1, characterized in that At the second moment, detecting a lifting action event of the user clicking the first application icon, and playing the first motion effect, comprises: At the second moment, a lifting action event of the user clicking the first application icon is detected, triggering the electronic device to start running a startup activity program in the operating system of the electronic device; After the electronic device is triggered to start running the startup activity program, the first motion effect is played.

3. The method according to claim 2, characterized in that include: At a fourth moment of playing the first motion effect, it is detected that the running process of the startup activity program is completed, and the preparation work for the second motion effect is performed, wherein the fourth moment is earlier than the third moment.

4. The method according to claim 3, characterized in that The step of enlarging the second image of the second motion effect to the first size to obtain a third motion effect includes: Passing the callback operation data in the code related to the first animation effect to the code related to the second animation effect; Merge the second tree data structure of the second animation effect with the first tree data structure of the first animation effect to obtain a third tree data structure; The second image of the second animation effect having the callback operation data and the third tree data structure is enlarged to the first size to obtain a third animation effect.

5. The method according to claim 4, characterized in that The method further comprises: During the playing of the third motion effect, the playing of the first motion effect is ended; and, It is detected that the playing of the third motion effect is completed, and the related resources of the first motion effect are released.

6. The method according to claim 3, characterized in that During the process of running the startup activity program, the method further includes: Determine whether data corresponding to the focus window of the electronic device exists, the focus window being the interactive area when the user clicks the first application icon; wherein, In the case where the data corresponding to the focus window does not exist, if it is determined that the first motion effect is being played, the startup activity program is continuously run; In the case that the data corresponding to the focus window does not exist, if it is determined that the first motion effect is not played, the startup activity program is stopped.

7. The method according to claim 6, characterized in that Determining that the first motion effect is being played by at least one of the following methods: Detecting that a relevant parameter value of the motion effect in the electronic device exists, and that the motion effect type corresponding to the relevant parameter value is a preset type, and determining that the first motion effect is being played; It is detected that the electronic device is in a stage of preparing the first motion effect, and it is determined that the first motion effect is being played, wherein the stage of preparing the first motion effect includes at least one of the following stages: Acquire the motion effect data of the first motion effect, wherein the motion effect type corresponding to the motion effect data is a preset type, wherein the motion effect data includes at least one of the motion effect time of the first motion effect, the number of frames of the first motion effect, the color of the first motion effect, and the transparency of the first motion effect; A remote animation service in the electronic device is started, wherein the remote animation service is used to generate the corresponding first animation effect based on the animation effect data.

8. The method according to claim 6, wherein determining that the first motion effect is not played is performed in the following manner: It is detected that the pre-start function is not enabled, and it is determined that the first motion effect is not played, wherein: The pre-start function is used to load and play the first motion effect.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the program startup method described in any one of claims 1 to 8.

10. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the program startup method according to any one of claims 1 to 8.

11. A computer program product, characterized in that include: A computer instruction, when the computer instruction is executed on an electronic device, causes the electronic device to execute the program startup method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Application program starting method and communication terminal

    CN102929532A

  • Display method and electronic equipment

    CN115480834A

  • Methods and apparatuses for improving application startup

    US20110167364A1

  • Approaches for seamlessly launching applications

    US9798443B1

Cited By

  • Application starting method and device, electronic equipment, storage medium and program product

    CN120909672A