Method for starting application program and electronic equipment

By preloading the application to a deeper stage before user interaction and shielding user-perceptible behavior, the problem of insufficient application startup time in existing technologies is solved, resulting in faster startup speed and a better user experience.

CN121523751APending Publication Date: 2026-02-13HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511039943.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing technologies have limited effectiveness in shortening application startup time and cannot further improve the user experience.

Method used

By preloading the application to deeper stages before user interaction, such as framework initialization, component startup, window creation, or first frame rendering, and by shielding user-perceptible behaviors such as sound, vibration, and display, the application startup process can be optimized.

Benefits of technology

It significantly shortens application startup time, improves user experience, avoids interference with other services during startup, and optimizes the system performance of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523751A_ABST
    Figure CN121523751A_ABST
Patent Text Reader

Abstract

The invention relates to a method for starting an application program and electronic equipment, the method is applied to the electronic equipment, a first application program is installed in the electronic equipment, and the method comprises the steps that starting time is determined according to historical operation events of a user on the first application program; before a cold start operation of a user on a first application program is received, the first application program is triggered to be started to a first stage at the start time, and the first stage is a frame initialization stage, a component start stage, a window creation stage or a first frame drawing stage before a window is displayed. Based on the technical scheme, the method for starting the application program can further shorten the starting duration of the application program felt by a user, optimize the starting performance and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronic devices, and in particular to a method for starting an application (App) and an electronic device. BACKGROUND

[0002] The starting time of an application in an electronic device is usually the time taken from when a user clicks on the application to when the screen of the electronic device displays the application opening. The shorter the starting time, the better the user experience.

[0003] Currently, there are two methods for shortening the starting time of an application: one method is to perform parallel loading during the starting process of the application; and the other method is for the electronic device to create an empty process in advance, so that the process created in advance can be used directly after the application is started, thereby reducing the time taken to create the process and achieving the purpose of shortening the starting time.

[0004] However, the above two methods have limited effect on shortening the starting time. SUMMARY

[0005] The embodiments of the present application provide a method for starting an application and an electronic device to further shorten the starting time of the application and improve the user experience.

[0006] In a first aspect, the embodiments of the present application provide a method for starting an application, applied to an electronic device, the electronic device being installed with a first application, and the method comprising: determining a starting time according to historical operation events of the user on the first application; and triggering execution of starting the first application to a first stage at the starting time before receiving a cold start operation of the user on the first application, the first stage being a framework initialization stage, a component starting stage, a window creation stage, or a first frame drawing stage before a display window.

[0007] Based on the above technical solution, compared with the prior art of preloading the first application to a stage deeper than the process creation stage, the starting time of the application experienced by the user can be further shortened, the starting performance is optimized, and the user experience is improved. Further, the method provided by the embodiments of the present application improves the intelligence of starting the application by determining the starting time according to the historical operation events of the user on the first application.

[0008] In a possible implementation manner, the system resources required for starting the first application are greater than a threshold value, so that the user experience can be further improved.

[0009] In a possible implementation manner, the starting of the first application to the first stage can comprise:

[0010] According to the configuration of the first application program, it is determined that the first application program declares a preloading stage as a framework initialization stage, a component startup stage, a window creation stage, or a first frame drawing stage;

[0011] The first application program is started to the framework initialization stage, the component startup stage, the window creation stage, or the first frame drawing stage.

[0012] Based on the above technical solution, the first application program can specify the preloading stage according to its own needs, further effectively shortening the startup time of the application program and improving the user experience.

[0013] In a possible implementation, before starting the first application program to the first stage, the method further includes: determining whether there is a permission to preload the first application program.

[0014] When there is a permission to preload the first application program, the first application program is started to the first stage.

[0015] Based on the above technical solution, the method provided by the embodiments of the present application provides security protection for the method of starting the application program by determining the preloading permission.

[0016] In a possible implementation, during the process of starting the first application program to the first stage, any one or more of the sound, vibration, and display of the first application program can be shielded. For example, for some game application programs running on a mobile phone or a tablet, even if the user sets the game to be silent, the game will still occupy the focus of the sound when the game is running, which may affect the current business of the mobile phone, such as music playing. In this regard, the method provided by the present application can avoid the situation that the application program occupies the focus of the sound during the startup process. Similarly, the method provided by the present application can also avoid the situation that the application program generates vibration, displays game notifications, or causes screen flickering during the startup process.

[0017] Based on the above technical solution, the method provided by the embodiments of the present application avoids interference with the user by shielding any one or more of the sound, vibration, and display, which are user-perceptible behaviors, and improves the user's experience of the cold start performance of the application program.

[0018] In a possible implementation, shielding any one or more of the sound, vibration, and display of the first application program can include that the system of the electronic device shields any one or more of the sound, vibration, and display of the first application program.

[0019] Based on the above technical solution, the method provided by the embodiments of the present application provides shielding protection by shielding the user-perceptible behaviors during the preloading process of the application program.

[0020] In a possible implementation, the shielding of any one or more of sound, vibration and display of the first application can include shielding of any one or more of sound, vibration and display of the first application by the first application itself.

[0021] Based on the technical solution, the method provided in the embodiments of the present application shields the user-perceptible behavior in the application preloading process by the application, the application can be self-adapted, and the performance of the application is improved.

[0022] In a possible implementation, after the first application is started to the first stage, the method can further include:

[0023] continuing to start the first application from the first stage in response to a cold start operation of the first application by the user.

[0024] Based on the technical solution, the method provided in the embodiments of the present application preloads the application to the first stage, and continues to start based on the process of the first stage after the cold start operation of the application by the user, thereby improving the experience of the cold start operation of the application by the user.

[0025] In a possible implementation, after the first application is started to the first stage, the method can further include freezing the process of the first application in the first stage.

[0026] Based on the technical solution, the method provided in the embodiments of the present application freezes the application process in the first stage, so that the CPU, memory and other resources can be released, and the system performance of the electronic device is optimized.

[0027] In a possible implementation, after the process of the application in the first stage is frozen, the method can further include:

[0028] unfreezing the process of the application in the first stage in response to a cold start operation of the first application by the user, and continuing to start the first application from the first stage;

[0029] displaying an interface of the first application.

[0030] Based on the technical solution, the method provided in the embodiments of the present application unfreezes the process of the first stage after the cold start operation of the application by the user, and continues to start the first application, thereby shortening the start time of the application perceived by the user while optimizing the performance of the electronic device, and further improving the experience of the user.

[0031] In a possible implementation, after the interface of the first application is displayed, the method can further include closing the first application in response to a quit operation of the first application by the user.

[0032] Start the first application to a first stage.

[0033] Based on the above technical solution, the method provided by the embodiment of the present application is more intelligent.

[0034] In a possible implementation, after displaying the interface of the first application, the method further includes:

[0035] Retiring the first application to the background;

[0036] When the first application is killed in the background, starting the first application to the first stage.

[0037] Based on the above technical solution, the method provided by the embodiment of the present application can be applied to more scenarios.

[0038] In a possible implementation, the electronic device further installs a second application, and the method further includes: before receiving a cold start operation of the second application by the user, starting the second application to a second stage, and the second stage can be a framework initialization stage before displaying a window, a component start stage, a window creation stage, or a first frame drawing stage.

[0039] Based on the above technical solution, the method provided by the embodiment of the present application shortens the start time of the second application experienced by the user by using a similar method to start the first application, which helps to improve the user's experience of the overall performance of the electronic device.

[0040] In a possible implementation, the second stage can be different from the first stage.

[0041] In a second aspect, the embodiment of the present application provides an electronic device. The electronic device can include one or more processors, a memory, the one or more processors coupled to the memory, the memory can be used to store computer program codes, the computer program codes can include computer instructions, when the one or more processors execute the computer instructions, the electronic device can execute the method provided by any one of the above first aspect.

[0042] In a third aspect, the embodiment of the present application provides a chip. The chip can include a processor and a communication interface, the processor can call a computer program or instructions through the communication interface, and execute the method provided by any one of the above first aspect.

[0043] In combination with the third aspect, as a possible implementation, the chip can further include a memory, the memory stores the computer program or instructions, and is connected to the processor through the communication interface, the processor can call and execute the computer program or instructions stored in the memory through the communication interface, and execute the method provided by any one of the above first aspect.

[0044] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer can execute the method provided in any one of the first aspect.

[0045] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program. When the computer program is run on a computer, the computer can execute the method provided in any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. The drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0047] Figure 1 A structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a software architecture of an electronic device provided by an embodiment of the present application;

[0049] Figure 3 An example of a method for starting an application provided by an embodiment of the present application;

[0050] Figure 4 An example of creating a process for USAP;

[0051] Figure 5 An example of a preloading depth in a method for starting an application provided by an embodiment of the present application;

[0052] Figure 6 An example of a method for starting an application provided by an embodiment of the present application;

[0053] Figure 7 Another schematic diagram of a software architecture of an electronic device provided by an embodiment of the present application;

[0054] Figure 8 An example of starting an application to a first stage in a method for starting an application provided by an embodiment of the present application;

[0055] Figure 9 Another example of a method for starting an application provided by an embodiment of the present application;

[0056] Figure 10 Another embodiment of the electronic device provided in this application. Detailed Implementation

[0057] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0058] The electronic device used in the method provided in this application embodiment can be a device or apparatus with interface display and interface touch function.

[0059] For example, the electronic devices used in the methods provided in this application can be tablet computers, personal computers (PCs), laptops, computers, netbooks, in-vehicle computers, smartphones, and smart wearable devices (such as smartwatches, smart bracelets, and smart glasses). Of course, the electronic devices can also be various portable devices, as well as in-vehicle terminal devices, personal digital assistants (PDAs), smart home devices (such as smart TVs), and other smart devices. This application does not limit the specific form of the electronic device.

[0060] This application provides an electronic device capable of implementing the method provided in this application. References are as follows. Figure 1 The structure of the electronic device provided in the embodiments of this application will be described.

[0061] like Figure 1 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc.

[0062] The processor 110 can include one or more processing units. For example, the processor 110 can include a central processing unit (CPU), an application processor (AP), a modem processing unit, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video code, a digital signal processor (DSP), a baseband processing unit, a neural-network processing unit (NPU), and / or the like. Different processing units can be independent devices or integrated in one or more processors. The controller can be the nervous system and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0063] The processor 110 can 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 can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call them from the memory. By providing the memory, the number of data accesses to the internal memory 121 by the processor 110 can be reduced, the waiting time of the processor 110 can be reduced, and thus the efficiency of the system can be improved.

[0064] The method provided by the embodiments of the present application can be controlled by the processor 110 or other components to complete, such as calling the software program of the embodiments of the present application stored in the internal memory 121, generating a real-time status image, and controlling the display screen 194 to display the real-time status image. The processor 110 can include different devices, such as when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the method provided by the embodiments of the present application, such as part of the software in the method is executed by the CPU, and another part of the algorithm related to the user interface (UI) display is executed by the GPU, to obtain faster processing efficiency.

[0065] The display screen 194 can be used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can employ a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 194, where N is a positive integer greater than 1. The display screen 194 can be used to display information input by a user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, the display screen 194 can display real-time status images, windows, photos, videos, webpages, or files, etc. In addition, it can be understood that in some embodiments, the status bar can also include a Bluetooth icon, a wireless fidelity (WiFi) icon, an external device icon, etc. In some embodiments, when the processor 110 detects a touch operation of a user's finger (or a stylus, etc.) on the display screen, in response to the touch operation, the processor 110 can perform an action corresponding to the touch operation. In some embodiments, when the processor 110 detects an input event input by an external input device (such as a mouse, a keyboard, etc.) of the electronic device 100, in response to the input event, the processor 110 can perform an action corresponding to the input event. When the processor 110 runs the method provided by the embodiments of the present application, the processor 110 can control the display screen 194 to display a window interface after the application is started in the user interface.

[0066] Exemplarily, the electronic device 100 can be a single-screen electronic device or a multi-screen electronic device. For example, when the electronic device 100 is a foldable electronic device, a display screen 194 thereof can be a flexible display screen in one piece, or can be a spliced display screen composed of two rigid screens and one flexible screen between the two rigid screens. The display screen can change the folding state in the case that the user performs a folding operation. Alternatively, in the method provided in the embodiments of the present application, when the electronic device is in a folded state, the electronic device can display the interface after the application is opened in the outer screen (the display screen exposed to the outside); when the electronic device is in an unfolded state, the electronic device can display the application interface in the inner screen or the unfolded screen (for example, the display screen in the double-screen state or the triple-screen state of a three-folded mobile phone).

[0067] The camera 193 can be used to capture a still image or a video. Optionally, the electronic device 100 can include 1-N cameras 193. For example, the camera 193 can include a front-facing camera or a rear-facing camera, or one camera 193 can be used as both a front-facing camera and a rear-facing camera.

[0068] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functions of the electronic device 100 and data processing by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system (OS), program codes of at least one App, etc. The data storage area can store data created by the electronic device 100 during use, etc.

[0069] The internal memory 121 can also store one or more computer programs for executing the method provided in the embodiments of the present application. The one or more computer programs are stored in the above-mentioned internal memory 121 and are configured to be executed by the one or more processors 110, and the one or more computer programs include instructions that can be used to perform various steps in the embodiments of the present application.

[0070] In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0071] The sensor module 180 can include a fingerprint sensor, a touch sensor, a pressure sensor, a magnetic sensor, an ambient light sensor, a barometric sensor, a bone conduction sensor, etc.

[0072] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0073] The antenna 1 and the antenna 2 can be used to transmit and receive electromagnetic wave signals.

[0074] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. of an application on the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer to the modem processor for demodulation.

[0075] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (such as Wi-Fi network), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), ultra wide band (UWB), etc. of an application on the electronic device 100. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 can receive electromagnetic waves via the antenna 2, perform frequency modulation and filtering processing on the electromagnetic wave signals, and send the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be sent from the processor 110, perform frequency modulation and amplification on the signals, and radiate the signals as electromagnetic waves via the antenna 2.

[0076] In addition, the electronic device 100 can implement an audio function such as music playing, recording, etc. through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, and an application processor, etc. The electronic device 100 can receive a key 190 input, and generate a key signal input related to user settings and function control of the electronic device 100. The electronic device 100 can generate a vibration prompt using a motor 191. An indicator 192 in the electronic device 100 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc. A SIM card interface 195 in the electronic device 100 can be used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 100.

[0077] In addition, in some scenarios, the electronic device 100 can also have an input device interface for connecting a keyboard, a mouse, a handle, etc. The input device interface can multiplex the USB interface 130, or can be a separately arranged special interface, which is not limited in the present application.

[0078] It should be understood that Figure 1 The electronic device 100 shown is only an example and does not constitute a limitation on the electronic device. In actual applications, the electronic device 100 can have more or fewer components than shown, can combine two or more components, or can have a different component configuration. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0079] The electronic device provided by the embodiments of the present application can realize its functions by running an operating system stored in the storage program area, and provide services for users. Exemplarily, the operating system can be various operating systems in the industry, such as an operating system developed based on OpenHarmony, for example or other operating systems, for example a mobile operating system, etc.; can also be various open source operating systems or derivative operating systems thereof, such as OS, and other embedded operating systems, etc.; or can be a new operating system in the future, such as an AI operating system based on artificial intelligence (AI).

[0080] The operating system can be a set of interrelated system software programs that manage and control the operation of the electronic device, utilize and run hardware, software resources, and provide common services to organize user interactions. In the electronic device, the operating system can link the hardware layer to the physical device downward, and provide a running environment for the App upward.

[0081] The operating system can generally include a kernel layer, a middleware layer, and an application layer. The application layer can include Apps, which can include system applications and third-party applications. The middleware layer can include a series of software that provides various services to App developers, or can be a framework for providing various services such as databases, multimedia, and graphics, or can provide various capabilities such as distributed scheduling, system expansion, and the like. Illustratively, the middleware layer can include a framework layer and / or a system service layer. The framework layer can provide an application programming interface (API) and a programming framework for Apps of the application program layer. The system service layer can include a set of core capabilities of the system, which provides services to Apps through the framework layer. The kernel layer can be a layer between hardware and software. The kernel layer can include hardware drivers and an operating system kernel. In addition to providing hardware drivers, the kernel layer can also support functions such as memory management and system process management.

[0082] The electronic devices used in our daily life are of various types and forms, and the scenarios in which the electronic devices are applied are also very extensive. Therefore, based on different forms and functions of the electronic devices, different application scenarios and different user needs, the operating systems applied to the electronic devices can also be different. The basic functions implemented by the electronic device provided in the embodiments of the present application can be implemented through a general-purpose operating system, or can be implemented through a special-purpose operating system. To more clearly introduce the implementation of the embodiments of the present application under a specific operating system, Figure 2 the architecture of is shown, from which those skilled in the art can deduce the implementation of the embodiments of the present application under other specific operating systems, such as the implementation under and the like.

[0083] As shown in Figure 2 , the software architecture of the electronic device provided in the embodiments of the present application can be divided into several layers, and in some embodiments, from bottom to top, they are: a kernel layer, a system service layer, a framework layer, and an application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined in sub-system granularity under different deployment scenarios of device forms, and each sub-system can be tailored, added, or combined in functional granularity.

[0084] Illustratively, the kernel layer can include a kernel subsystem, a kernel abstraction layer (KAL), and a driver subsystem.

[0085] The kernel subsystem includes multiple OS kernels, and suitable OS kernels can be selected for different resource-constrained devices, and are not limited to Linux, Hongmeng, LiteOS (Lite Operating System) kernels, and the like.

[0086] The kernel abstraction layer can provide basic kernel capabilities to the upper layer by shielding the multi-kernel differences, and can include but is not limited to process / thread management, memory management, file system, network management, and peripheral management.

[0087] The driver subsystem can include a hardware driver framework (HDF). The hardware driver framework is the basis for the HarmonyOS hardware ecosystem opening, and can provide unified peripheral access capabilities and driver development and management framework. The hardware driver framework can include display drivers, camera drivers, audio drivers, Bluetooth drivers, and sensor drivers, and the like.

[0088] The system service layer is a core capability set of the system, and can provide services to the App through the framework layer. This layer can include but is not limited to the following subsystem set: a system basic capability subsystem set, a basic software service subsystem set, an enhanced software service subsystem set, and a hardware service subsystem set, and the like.

[0089] The system basic capability subsystem set can include a distributed soft bus, a distributed data management, a distributed task scheduling, an Ark multi-language runtime subsystem, and a common foundation library subsystem, and can also include a multi-mode input subsystem, a graphics subsystem, a security subsystem, an AI subsystem, and the like, and can be used to provide basic capabilities for distributed App running, scheduling, migration, and the like on the HarmonyOS multi-device.

[0090] By way of example, the distributed task scheduling can implement distributed service management (such as discovery, synchronization, registration, calling, and the like), and can be used to support remote starting, remote calling, remote connection, and migration operations on cross-device Apps.

[0091] The distributed data management can implement full-scene, cross-device data synchronization, data storage, data sharing, and data access functions.

[0092] The distributed soft bus can provide communication-related capabilities for seamless interconnection between multiple devices, such as WLAN service capabilities, Bluetooth service capabilities, soft bus capabilities, remote procedure call (RPC) capabilities, star flash capabilities, and the like.

[0093] The Ark multi-language runtime subsystem is a unified compilation runtime platform, and can be used to support joint compilation and running of multiple programming languages and multiple chip platforms.

[0094] The basic software service subsystem set can include an event notification subsystem, a phone subsystem, a multimedia subsystem, a DFX (Design For X) subsystem, an MSDP&DV subsystem, and the like, and can be used to provide common and universal software services for HarmonyOS.

[0095] The event notification subsystem can be used to provide the App with the ability to subscribe, publish, and unsubscribe from public events. For example, the event notification subsystem can be used to receive real-time state messages of a node sent by an App, and display the messages on the display screen of the electronic device through the processing of a desktop App and a driver subsystem, and the like.

[0096] The enhanced software service subsystem set can include a smart screen specific business subsystem, a wearable specific business subsystem, an internet of things (IoT) specific business subsystem, and the like, and can be used to provide differentiated and enhanced software services for different devices for HarmonyOS.

[0097] The hardware service subsystem set can include a location service subsystem, a user unified identity and access management (IAM) subsystem, a biometric identification subsystem, a wearable specific hardware service subsystem, an IoT specific hardware service subsystem, and the like, and can be used to provide hardware services for HarmonyOS.

[0098] Exemplarily, for different deployment environments of different electronic device forms, the basic software service subsystem set, the enhanced software service subsystem set, and the hardware service subsystem set can be tailored at the subsystem granularity, and each subsystem can be further tailored at the function granularity.

[0099] The framework layer can be used to provide the App of the application layer with an application programming interface (API) and a programming framework, and can include a UI framework, a user program framework, and an Ability framework. Different electronic devices can be equipped with different operating systems, and the supported APIs can also be different.

[0100] The UI framework can be used to provide a complete infrastructure for the UI development of system applications, and can include UI functions such as components, layouts, animations, and interaction events, and a real-time interface preview tool. The Ability framework is a lightweight App, and the Ability framework schedules and manages the running and life cycle of the Ability.

[0101] HarmonyOS API is a series of open capabilities provided to support the development of HarmonyOS App. The HarmonyOS API can be set in the framework layer or independently of the framework layer. The HarmonyOS API includes an audio service (Audio API), a push service (Push API), an account service (Account API), and the like.

[0102] The App in the application layer can include system applications and extended applications / third-party applications. The system applications can include a desktop, a theme component, a control bar, settings, contacts, a phone, a camera, and the like, and the extended applications / third-party applications can include social Apps, travel Apps, take-out Apps, and the like.

[0103] It should be noted that, Figure 2 As an example of the software structure of an electronic device, only some levels and software modules are simply listed, and do not constitute any limitation on the software structure of the electronic device. In actual applications, the operating system of the electronic device can also include other levels, or each level can also include other software modules for implementing one or more functions or services. In addition, the embodiments of the present application do not limit the specific level where each software module is located. For example, some system services in the system service layer can be deployed in the application program framework layer or in the kernel layer.

[0104] By way of example, any of the electronic devices in the above embodiments can be installed with one or more application programs, and a user can start an application program by clicking on the icon of the application program displayed on the above display screen. Cold start of an application program refers to the start of the application program from the creation of a new process. The cold start time is an important indicator of the performance of the application program, and as the first "gate" of user experience, directly determines the first impression of the user on the application program.

[0105] The first existing method optimizes the cold start of the application program by parallelizing the loading during the start-up process of the application program. For example, some operating systems start some tasks in parallel during the start-up process of the application program. However, this method can only start to optimize after the user performs a cold start operation on the application program (such as clicking on the icon of the application program), and the optimization performance is limited.

[0106] For example, For example, Figure 3As shown, before the system responds to the user's operation of clicking the icon of the application program and starts the application program, and before the application program is completely started, the developer can start the multi-thread in the T1 and T2 stages to perform some parallel tasks, so as to improve the starting speed of the application program. However, the effect of this method in accelerating the starting is limited. If the application process can be started in the background and the resources can be prepared before the user clicks the icon of the application program, the starting performance of the application program can be greatly optimized when the application program is really started.

[0107] The second method is to The operating system creates an empty process in advance through the mechanism of an unspecialized application process (USAP). When the application program is loaded in response to the user's starting operation, an empty process in the process pool created in advance is used. For example, the zygote process creates a usap pool in advance by calling the fork system, and the usap pool has 10 processes usap1-usap10 for use by the application program. Figure 4 As shown, the zygote process creates a usap pool in advance by calling the fork system, and the usap pool has 10 processes usap1-usap10 for use by the application program. However, this method can only save the time of creating a process by fork, and the benefit is limited, and the starting performance cannot be further improved.

[0108] To further improve the starting performance of the application program, an embodiment of the present application provides a method for starting an application program, which can be applied to any electronic device provided in the above embodiments. The electronic device using the method for starting an application program can be installed with a first application program, and the method can include: starting the first application program to a first stage before receiving a user's operation on the first application program, the first stage being any stage between creating a process and displaying a window, and the operation being used to start the first application program (for the user, the operation is a cold starting operation). The method provided in the embodiment can further shorten the starting time of the application program and optimize the starting performance and improve the user experience compared with the prior art.

[0109] In some embodiments, the first application can be an application whose system resources required to be loaded when starting are greater than a threshold value. For example, a game application, a drawing application, an image processing application, and the like, which require loading of a large amount of memory, CPU, and the like system resources when starting, when the system resources required are greater than the threshold value, the method for starting the application provided by the embodiments of the present application can more effectively reduce the starting time, further improving the user experience. In this way, for some heavy applications in actual use scenarios which have a long time-consuming in the starting process (such as opening of a large file, etc.), the application can be preloaded to a very deep stage (such as the large file has been opened, the content has been drawn, only not displayed), which can complete most of the starting tasks of the application before the user clicks the icon of the application, so that the user feels cold start when starting the application and experiences faster starting speed, thereby further improving the user experience. For ease of description, the operation of starting the first application to the first stage before receiving the cold start operation of the first application by the user is referred to as preloading the first application. Exemplarily, the cold start operation of the first application by the user can be that the user clicks the icon of the first application displayed on the display screen.

[0110] In some embodiments, whether the system resources required to be loaded by the first application when starting exceed a threshold value can be determined by the developer of the first application to determine whether to use the method for starting the application provided by the embodiments of the present application. In some embodiments, whether the system resources required to be loaded by the first application when starting exceed a threshold value can be determined by the system of the electronic device.

[0111] Exemplarily, the first stage can be a framework initialization stage, a component starting stage, a window creation stage, or a first frame drawing stage as shown in the framework, but is not limited thereto. Figure 5

[0112] In some embodiments, the first stage can also be a process creation stage.

[0113] Exemplarily, the operation that can be included in the process creation stage is: A daemon process zygote in the operating system creates a new process by calling the fork system; or exemplarily, the operation that can be included in the process creation stage is that a daemon process AppSpawn in HarmonyOS creates a new process by calling the fork, and the like.

[0114] Exemplarily, ​In the operating system, the operations that the framework initialization stage can include are: creating an app object; starting a main process ActivityThread; creating a MainActivity to provide a basic user interface and interaction function for the application; and the like. Among them, creating the MainActivity can include creating a MainActivity class, configuring an AndroidManifest.xml, creating a layout file, and starting a component (Activity), and the like.

[0115] Exemplarily, in the HarmonyOS, the operations that the framework initialization stage can include are: component container creation (AbilityStage Create), which can specifically include module initialization and configuration file association. Among them, the module initialization can be to perform module-level initialization operations in the onCreate method, such as loading resource files (such as preloading pictures, fonts, and the like), creating a background thread or processing module-level data preprocessing, reading system-level configuration information (such as device power, network status, and the like), and the like. The configuration file association can specify an entry file path in module.json5.

[0116] Exemplarily, In the operating system, the component startup stage can include starting an Activity, and the like.

[0117] Exemplarily, in the HarmonyOS, the component startup stage can include component creation (Ability Create), such as UI Ability Create. This stage can perform operations such as initializing global configurations, resource preloading, and registering system event listening.

[0118] Exemplarily, In the operating system, the window creation stage can include window token allocation, SurfaceControl and GraphicBuffer allocation, layout calculation and rendering, etc. The window token allocation can specifically be: the system allocates a window token (WindowToken) for the new Activity through the addWindow() method of WMS, and determines the window type (application window / dialog / system window). The SurfaceControl and GraphicBuffer allocation can specifically include: creating a SurfaceControl object for the window, and allocating a GraphicBuffer (graphic buffer) and a Layer object by SurfaceFlinger, etc. The layout calculation and rendering can specifically be: the ViewRootImpl completes measurement / layout / drawing through the performTraversals() method, generates a display list (DisplayList), and finally coordinates the rendering synthesis by Choreographer.

[0119] Exemplarily, in the HarmonyOS, the window creation stage can include loading page content and resource allocation. The loading page content can include: specifying the displayed page through the windowStage.loadContent method, and setting window properties (such as brightness, direction, etc.). The resource allocation can include: completing the initialization of window-related resources, which can specifically include view handle allocation and memory management.

[0120] Exemplarily, In the operating system, the first frame rendering stage can include: measurement (Measure), layout (Layout) and drawing (Draw), etc. The measurement can be: the system traverses the view hierarchy tree, calculates the size (width and height) of each view, and this stage is completed by calling the onMeasure() method. The layout can be: determining the view position according to the measurement result, and setting the specific coordinates of each view by recursively calling the onLayout() method. The drawing can be: executing the onDraw() method to draw the view to the screen. Exemplarily, the first frame rendering stage can also include: optimizing key points, such as loading components on demand, to reduce the number of views loaded in the first frame (such as using LazyForEach instead of ForEach to reduce the number of initialized elements), and reducing the custom component life cycle time, which can be specifically achieved by optimizing the initialization logic of the custom component to shorten the measurement and layout stage time.

[0121] For example, in HarmonyOS, the first frame rendering stage may include: loading the page, measurement and layout, and rendering. Loading the page may include initializing homepage UI elements, such as loading resources like lists and images. Measurement and layout may include calculating the positions of UI elements and generating layout information. Rendering specifically involves drawing the UI elements onto the screen.

[0122] An example of a method to launch an application is as follows: Figure 6 As shown, for electronic devices running HarmonyOS, before the user performs a startup operation on the first application installed on the electronic device (a cold start operation for the user), the system can start the first application at any stage before the `onForeground` callback method, meaning the preloading depth can be as deep as the window content is fully drawn. Thus, if the first stage is when the window content is fully drawn, when the user performs a cold start operation on the first application, the first application can directly call the `onForeground` callback method to switch the already drawn window content from the background to the foreground, achieving the fastest possible window display and maximizing user satisfaction with the cold start performance of the first application.

[0123] Another example of electronic device software architecture is... Figure 7 As shown, it includes component management service 710, startup control service 720, first application 730, and process control services SA1-SAn. Among them, component management service 710, startup control service 720, and process control services SA1-SAn all belong to the underlying system services.

[0124] In some examples, for some operating systems, system services can be system capabilities (SAs), etc.

[0125] In some examples, for some operating systems, component management services such as the Abilitymanager service (AMS) can be used to manage the startup, shutdown, preloading, etc. of application processes.

[0126] The startup control service 720 can be used to control the timing of application preloading by the component management service 710. For example, when the startup control service 720 determines that the conditions for application preloading are met (such as the current time reaching the preloading time), it calls (or instructs) the component management service 710 to preload the application. The first application 730 is an application installed in the electronic device.

[0127] In some embodiments, a plurality of applications can be installed in the electronic device, and different applications can be preloaded to different stages. The process control services SA1-SAn can perform active queries and listen to the preloading status of the application processes, and different services in the process control services SA1-SAn can perform operations such as freezing of the processes, perceptible shielding, and the like.

[0128] In some examples, the process control service SA1 can be, for example, a resource scheduling service (RSS). When the preloading is completed, the RSS can be used to freeze the processes.

[0129] In some examples, the process control service SA2 can be, for example, a media service (Media Service), which can be used to shield the sound that can be generated during the preloading.

[0130] In some examples, the process control service SA3 can be, for example, a vibrator service (Vibrator Service), which can be used to shield the vibration that can be generated during the preloading.

[0131] In some examples, the process control service SA4 can be, for example, a window manager service (Window Manager Service), which can be used to shield the display that can be generated during the preloading, and the like.

[0132] In some embodiments, the stages of preloading can be notified to the process control services SA1-SAn by the component management service 710. The freezing of the processes can refer to the behavior or operation of the system kernel no longer scheduling the application processes and not allocating CPU resources to the application processes.

[0133] In some embodiments, to obtain the preloading status of the first application by the process control services SA1-SAn, the process control services can first be registered with the component management service 710, and the component management service 710 can only notify the preloading status of the first application to the registered process control services.

[0134] In some embodiments, the startup control service 720 can also perceive the system memory pressure and control it, monitor the application, and learn the behavior habits of the user. The learning of the behavior habits of the user can be, for example, through file management to obtain the recently opened files of the user such as WPS, through a browser to obtain the recently downloaded information of the user, through an instant messaging (IM) application to obtain the recently received IM information of the user, through other devices of the same account to obtain the recently received information and the recently opened files, and / or through the user to obtain the function that is used most frequently, and the like. The learning of the behavior habits of the user by the startup control service 720 can also be the recently opened application of the user, the application that is used most frequently by the user, the application that is actively adapted, and the like.

[0135] In some embodiments, the system of the electronic device can determine the first stage according to the time consumption of the first application program to start up without acceleration measures, or the size of files to be loaded during the start-up of the first application program. For example, the longer the time consumption of the first application program to start up without acceleration measures, or the larger the size of files to be loaded during the start-up of the first application program, the closer the first stage is to the operation / phase of displaying the window.

[0136] In some embodiments, the application program installed in the electronic device can be pre-configured with a preloaded stage, for example, the first stage described above can be a stage specified in the configuration file of the application program. For example, in the method provided by the above embodiments, the starting of the first application program to the first stage can include the following steps as shown in the flowchart of FIG. 8: Figure 8

[0137] Step 801: According to the configuration of the first application program, it is determined that the first application program declares the first stage as a preloaded stage. For example, before preloading the first application program, the component management service 710 first reads the configuration file of the first application program to obtain the declaration of preloading to the first stage. In some embodiments, the component management service 710 can read the configuration file of the first application program when the start-up control service 720 instructs to pre-load the first application program.

[0138] Step 802: Start the first application program to the first stage, for example, the component management service 710 starts the first application program to the first stage.

[0139] In some embodiments, the start-up control service 720 can determine the time of preloading the first application program according to the user's behavior habits. Accordingly, before the above-mentioned starting of the first application program to the first stage, it further includes: determining the time of starting according to the historical operation events of the user on the first application program. At the time of starting, the above-mentioned starting of the first application program to the first stage is triggered to be executed.

[0140] For example, if the user usually opens the first application program at 9 p.m., the start-up control service 720 determines the preloading time (i.e. the time of starting the first application program) of the first application program to be 8:58 p.m. according to this habit. Or, for example, the user exits the first application program (backgrounds the first application program) due to the lag during the running of the first application program, and then usually starts the first application program again. The start-up control service 720 can determine that the first application program needs to be preloaded immediately after the user actively exits the first application program according to this behavior habit of the user, and so on.

[0141] ​In some embodiments, before the first application is started to the first stage, the method further comprises: determining whether there is a permission to preload the first application; and when there is a permission to preload the first application, performing the starting of the first application to the first stage. For example, when the component management service 710 receives a preload instruction from the launch control service 720, the component management service 710 first determines whether the launch control service 720 has the permission to preload the first application, and then performs the preload instruction of the launch control service 720 when the launch control service 720 has the permission to preload the first application.

[0142] In some embodiments, during the starting of the first application to the first stage, any one or more of sound, vibration, and display of the first application can be shielded to avoid interference with the user and improve the user's experience of the cold start performance of the first application. For example, the shielding of any one or more of sound, vibration, and display of the first application can be shielding of any one or more of sound, vibration, and display of the first application by the system of the electronic device.

[0143] In some embodiments, the first application 730 can be aware of the preload start and process it differently from the normal start, such as being aware of the start of the preload start through LaunchReason, and adapting to different stages or states of the preload to distinguish from the normal start, so that the user is unaware of the preload of the first application 730. For example, the shielding of any one or more of sound, vibration, and display of the first application can be shielding of any one or more of sound, vibration, and display of the first application by the first application itself.

[0144] In some embodiments, after the first application is started to the first stage, the method further comprises: receiving and responding to a cold start operation of the first application by the user, and continuing to start the first application from the first stage. In this case, the time from the cold start operation of the user (such as the user clicking on the icon of the first application) to the display window of the first application (i.e., the user seeing the first application open) is the time from the first stage to the display window. The closer the first stage is to the display window, the shorter the time from the user's clicking to seeing the first application open, and the better the user's experience.

[0145] In some embodiments, after the first application is started to the first stage, the method further includes freezing the application process in the first stage to suspend the process execution, releasing CPU, memory and other resources, improving the overall system operation efficiency and prolonging the endurance. For example, after the first application is preloaded to the first stage, the component management service 710 notifies the process control service SA1 to freeze the application process in the first stage.

[0146] In some embodiments, after the application process in the first stage is frozen, the method further includes, in response to a cold start operation of the first application by the user, unfreezing the application process in the first stage, continuing to start the first application from the first stage, and displaying an interface of the first application.

[0147] In some embodiments, after the interface of the first application is displayed, the method further includes, in response to a quit operation of the first application by the user, closing the first application, and starting the first application to the first stage. For example, the quit operation of the first application by the user can be due to a running lag of the first application. For example, after the cold start operation of the first application by the user, the first application is opened, and the electronic device displays the interface of the first application, and then the first application starts to run. When the first application runs and lags, the user exits the first application, and the start control service 720 can determine the historical operation event that the user exits and cold starts the first application again under the condition that the first application lags, and call the component management service 710 to preload the first application to the first stage before the cold start operation of the first application by the user again, so that the user experiences the fast opening of the first application after the cold start operation of the first application by the user again, and the user experience is improved. In some embodiments, the quit operation of the first application by the user can also be a misoperation, and the like.

[0148] In some embodiments, after the interface of the first application is displayed, the method further includes backing up the first application to the background, and starting the first application to the first stage when the first application is killed in the background. For example, backing up the first application to the background can be triggered by the operation of the user, or can be triggered by the system resource shortage or power management, and the like. When the first application is killed in the background, the first application can be preloaded, so that the user experiences the fast start after the cold start operation of the first application by the user, and the user experience of the electronic device and the first application is improved.

[0149] In some embodiments, the electronic device further installs a second application, and the method further includes: before receiving a cold start operation of the second application by the user, starting the second application to a second stage, the second stage being any stage between the process creation and the display window, such as the framework initialization stage, the component start stage, the window creation stage, or the first frame drawing stage before the display window. The principle and method are similar to the method of starting the first application provided in the above embodiments. For example, the second stage can be the same as the first stage, or can be different. For example, whether the first stage and the second stage are the same or not depends on the configuration of the first application and the second application.

[0150] The method of starting the application is another embodiment as shown in the figure. In this embodiment, the first application is a game App, and the preloading stage declared by the configuration of the game App is the window creation stage. The method of starting the game App includes: Figure 9

[0151] Step 901: RSS registers to listen to the state change of the game App. The RSS belongs to the process control service described above, and can be used to manage the resource scheduling of the App, such as freezing the process, allocating the CPU small core, etc.

[0152] Step 902: The AMS returns the registration result.

[0153] Step 903: The game SA calls the AMS to preload the game App. The calling time can refer to the time of determining the start described above. The game SA belongs to the start control service described above.

[0154] Step 904: The AMS queries the configuration of the game App from the bundle management service (BMS). The BMS can manage the installation, upgrade, and uninstallation of the application. When the electronic device installs the game App, the BMS can obtain the configuration file of the game App.

[0155] Step 905: The BMS returns the configuration of the game App, and the AMS obtains the preloading stage declared by the game App according to the configuration of the game App.

[0156] Step 906: The AMS determines whether the game App is started. If it is started, the next step continues to execute step 907, otherwise the next step continues to execute step 908.

[0157] Step 907: The AMS returns the result that the preloading is not executable to the game SA, and ends the preloading.

[0158] Step 908: The AMS determines to preload the game App to the window creation stage according to the preloading stage declared by the game App obtained from the configuration of the game App. ​

[0159] Step 909: The AMS notifies a window management module (SceneBoardManager, SCB) to start in silence. The SCB can be used to manage the creation and display of windows.

[0160] Step 910: The SCB returns a notification result to the AMS.

[0161] Step 911: The AMS returns a preloading state to the game SA.

[0162] Step 912: The SCB notifies the AMS that it has been pulled up in silence.

[0163] Step 913: The AMS pulls up the game App and drives to a window creation (OnWindowStageCreate) stage.

[0164] Step 914: The game App returns a preloading result to the AMS.

[0165] Step 915: The AMS notifies the RSS that the game App preloading is complete and the preloading stage is the window creation stage, so that the RSS freezes the game App process in the window creation stage.

[0166] In some embodiments, the game App can actively adapt to shield its sound, vibration or display during the process of being pulled up to the window creation stage.

[0167] In some embodiments, the AMS can also notify a system service for controlling sound, vibration or display to shield the sound, vibration or display of the game App in the preloading process, and other user-perceptible behaviors.

[0168] In some embodiments, step 906 can be performed before step 905.

[0169] Another embodiment of the electronic device can refer to Figure 10 As shown in Figure 10 , the electronic device 1000 can include a processor 1001, a memory 1002 and a communication interface 1003. The processor 1001, the memory 1002 and the communication interface 1003 are coupled to each other. Optionally, the memory 1002 can be used to store instructions executed by the processor 1001, or to store input data required by the processor 1001 to run instructions, or to store data generated after the processor 1001 runs instructions. The communication interface 1003 can be a transceiver or an input / output interface. When the processor 1001 reads and executes the instructions stored in the memory 1002, the electronic device can implement any method provided by the embodiments of the present application. Illustratively, the electronic device can be the first electronic device described above, or the second electronic device described above.

[0170] Optionally, referring toFigure 10 The processor 1001, the memory 1002, and the communication interface 1003 are connected with each other through a bus 1004. The bus 1004 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 In the figure, only one thick line is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0171] The chip provided in the embodiments of the present application can be a chip or a chip system in the above-mentioned electronic device, which has the function of implementing the method provided in the embodiments of the present application. Illustratively, the chip can integrate a processor, a communication interface, and a memory, the memory stores a computer program or instructions, the processor is connected with the memory through the communication interface, reads and executes the computer program or instructions stored in the memory, so as to implement any one of the methods provided in the embodiments of the present application. In some embodiments, the memory can also be omitted in the chip, in this case, the processor can call the computer program or instructions from the external storage device through the communication interface. In some embodiments, the chip system can be composed of the chip. Illustratively, the chip system can include a processor chip, a communication interface chip, and a memory chip, the processor chip is connected with the memory chip through the communication interface chip, reads and executes the computer program or instructions stored in the memory chip, so as to implement any one of the methods provided in the embodiments of the present application. In other embodiments, the chip system can include the chip and other discrete devices.

[0172] It should be clear that the embodiments described in the present application are only some of the embodiments, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.

[0173] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects have an "or" relationship.

[0174] In specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium can store a program, and the program can include some or all steps in each method embodiment provided by the present application when executed. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM) and the like.

[0175] In specific implementation, the present application further provides a computer program product, wherein the computer program product contains executable instructions, and when the executable instructions are executed on a computer, the computer executes some or all steps in each method embodiment provided by the present application.

[0176] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be realized by means of software and necessary general hardware platforms. Based on such understanding, the technical solutions in the embodiments of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disc, an optical disc and the like, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server or a network device and the like) execute the method described in each embodiment or some parts of the embodiments of the present application.

[0177] The same or similar parts among various embodiments in the specification can be referred to each other. Especially, for the device embodiments and the terminal embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

Claims

1. A method of starting an application program, characterized by, The method is applied to an electronic device, wherein the electronic device is installed with a first application program, and the method comprises the following steps: determining a starting time according to a historical operation event of a user on the first application program; triggering execution of starting the first application program to a first stage at the starting time before receiving a cold start operation of the user on the first application program, wherein the first stage is a framework initialization stage, a component starting stage, a window creating stage or a first frame drawing stage before a display window.

2. The method of claim 1, wherein, The starting of the first application program to the first stage comprises the following steps: determining, according to a configuration of the first application program, that the first application program declares a preloaded stage as the framework initialization stage, the component starting stage, the window creating stage or the first frame drawing stage; starting the first application program to the framework initialization stage, the component starting stage, the window creating stage or the first frame drawing stage.

3. The method according to claim 1 or 2, characterized in that, Before the starting of the first application program to the first stage, the method further comprises the following steps: determining whether there is a permission of preloading the first application program; when there is the permission of preloading the first application program, executing the starting of the first application program to the first stage.

4. The method according to claim 1 or 2, characterized in that, During the starting of the first application program to the first stage, any one or more of sound, vibration and display of the first application program is shielded.

5. The method of claim 4, wherein, The shielding of any one or more of sound, vibration and display of the first application program comprises that a system of the electronic device shields any one or more of sound, vibration and display of the first application program.

6. The method of claim 4, wherein, The shielding of any one or more of sound, vibration and display of the first application program comprises that the first application program shields any one or more of sound, vibration and display of itself.

7. The method of claim 1 or 2, wherein, After the starting of the first application program to the first stage, the method further comprises the following steps: receiving and responding to a cold start operation of the user on the first application program to continue starting the first application program from the first stage.

8. The method of claim 1 or 2, wherein, After the starting of the first application program to the first stage, the method further comprises the following step:

9. The method of claim 8, wherein, frozen the process of the first application program in the first stage. After the freezing of the application process in the first stage, the method further comprises the following steps: in response to a cold start operation of the user on the first application program, unfreezing the application process in the first stage to continue starting the first application program from the first stage; 10. The method of claim 9, wherein, displaying an interface of the first application program. After the displaying of the interface of the first application program, the method further comprises the following steps: in response to a quit operation of the user on the first application program, closing the first application program; 11. The method of claim 9, wherein, starting the first application program to the first stage. After the displaying of the interface of the first application program, the method further comprises the following steps: retiring the first application program to the background; 12. The method of claim 1 or 2, wherein, when the first application program is killed in the background, starting the first application program to the first stage. The electronic device is further installed with a second application program, and the method further comprises the following steps: Before receiving the cold start operation of the second application program by the user, the second application program is started to a second stage, the second stage being a framework initialization stage before a display window, a component start stage, a window creation stage, or a first frame drawing stage, the second stage being different from the first stage.

13. An electronic device, comprising: Comprising: One or more processors coupled with a memory, the memory for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-12.

14. A computer program product, characterised in that, When the computer program product is run on a computer, the computer performs the method of any of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is run on a computer, the computer performs the method of any of claims 1-12.

Citation Information

Patent Citations

  • Application preloading method, device, storage medium and intelligent terminal

    CN108595231A

  • Starting method of application program, terminal and computer readable storage medium

    CN114020354A

  • Application starting preprocessing method and device

    CN115220814A

  • Resource preloading method and electronic equipment

    CN117827302A