Application startup method, electronic device and storage medium

By loading multiple packages of an application in parallel, the problem of long startup time of existing applications is solved and the user experience and application startup efficiency are improved.

CN113835782BActive Publication Date: 2024-09-24ZHANGYUE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111115529.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-23
Publication Date
2024-09-24
Estimated Expiration
2041-09-23

AI Technical Summary

Technical Problem

Existing applications take longer to launch, resulting in poor user experience and reduced application retention.

Method used

After detecting the application startup operation, start the corresponding application process and create multiple child threads, and load multiple packages in parallel until the main interface is displayed after all packages are loaded.

Benefits of technology

It improves application startup efficiency, shortens user waiting time, and improves user experience and application retention rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835782B
    Figure CN113835782B
Patent Text Reader

Abstract

The present disclosure relates to an application startup method, an electronic device and a storage medium. The application startup method includes: in response to detecting a startup operation on a target application, starting a first application process corresponding to the target application, the target application includes multiple program packages; creating multiple first sub-threads through the first application process; loading multiple program packages in parallel through multiple first sub-threads; and displaying the main interface of the target application when the first type of program package in the multiple program packages is loaded. According to the embodiment of the present disclosure, the display speed of the main interface of the target application is accelerated, thereby improving the startup efficiency of the target application, and improving the user experience and the retention rate of the target application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an application startup method, an electronic device, and a storage medium. Background Art

[0002] With the advent of the mobile Internet era, more and more applications can be installed and used on electronic devices. Users can use these applications for entertainment, such as browsing the web, reading e-books, watching videos, playing games, chatting, navigating, etc.

[0003] Currently, if a user wants to use an application, he or she needs to spend a long time waiting for the application to start, which brings a bad experience to the user and reduces the retention rate of the application. Summary of the invention

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides an application startup method, an electronic device and a storage medium.

[0005] In a first aspect, the present disclosure provides an application startup method, comprising:

[0006] In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages;

[0007] Creating a plurality of first sub-threads through a first application process;

[0008] Loading multiple program packages in parallel through multiple first sub-threads;

[0009] When the first type of program packages among the multiple program packages are loaded completely, a main interface of the target application is displayed.

[0010] In a second aspect, the present disclosure provides an electronic device, including a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0011] In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages;

[0012] Creating a plurality of first sub-threads through a first application process;

[0013] Loading multiple program packages in parallel through multiple first sub-threads;

[0014] When the first type of program packages among the multiple program packages are loaded completely, a main interface of the target application is displayed.

[0015] In a third aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the application startup method described in the first aspect.

[0016] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0017] The application startup method, electronic device and storage medium of the disclosed embodiments can, after detecting a startup operation on a target application including multiple program packages, start a first application process corresponding to the target application, and load multiple program packages in parallel through multiple first sub-threads of the first application process, thereby improving the loading efficiency of the program packages of the target application, and then displaying the main interface of the target application when the first type of program packages among the multiple program packages is completed, so as to speed up the display speed of the main interface of the target application, thereby improving the startup efficiency of the target application, and enhancing the user experience and the retention rate of the target application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1 A flowchart of an application startup method provided by an embodiment of the present disclosure;

[0020] Figure 2 A flowchart of another application startup method provided by an embodiment of the present disclosure;

[0021] Figure 3 A flowchart of another application startup method provided by an embodiment of the present disclosure;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] The embodiments of the present disclosure provide an application startup method, an electronic device, and a storage medium capable of improving the startup efficiency of a target application program.

[0030] Next, first combine Figures 1 to 3 The application startup method provided by the embodiment of the present disclosure is described.

[0031] Figure 1 A flow chart of an application startup method provided by an embodiment of the present disclosure is shown.

[0032] In some embodiments of the present disclosure, Figure 1 The application startup method shown can be executed by an electronic device. The electronic device may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc.

[0033] like Figure 1 As shown, the application startup method may include the following steps.

[0034] S110 . In response to detecting a start operation on a target application, start a first application process corresponding to the target application.

[0035] In the embodiment of the present disclosure, when the user needs to start the target application, the user can input a start operation of the target application to the electronic device. After detecting the start operation, the electronic device can start the first application process corresponding to the target application in response to the start operation, so as to start and run the target application through the first application process.

[0036] In the embodiment of the present disclosure, the startup operation may be any operation that can trigger the electronic device to start the target application.

[0037] Optionally, the start operation may be a gesture control operation (such as click, long press, double click, etc.), a voice control operation, or an expression control operation on the program icon of the target application, which is not limited here.

[0038] In the embodiment of the present disclosure, the target application may be an application to be started.

[0039] Optionally, the target application may be any plug-in application, for example, a plug-in e-book application, a video player application, a navigation application, a game application, a chat application, etc., which are not limited here.

[0040] Among them, plug-in applications are applications composed of some dynamic independent modules, each of which can realize at least one service function. Each independent module of a plug-in application can meet certain plug-in protocols and can realize communication between the main program and independent modules, and between independent modules with the help of the main program.

[0041] Specifically, the target application may include multiple program packages, and the multiple program packages may include a main program package corresponding to the main program, a configuration program package, and plug-in program packages corresponding to each independent module.

[0042] S120. Create multiple first sub-threads through the first application process.

[0043] In the embodiment of the present disclosure, the first application process may be a basic execution unit of the target application in the memory environment, and the first application process may create multiple first sub-threads.

[0044] Optionally, the number of first sub-threads created by the first application process may be determined according to the number of processor cores.

[0045] Specifically, the electronic device may determine the maximum number of sub-threads corresponding to the number of its own processor cores according to a preset correspondence between the number of processor cores and the maximum number of sub-threads, and create a first sub-thread of the maximum number of sub-threads.

[0046] In an example, if the number of processor cores is 2, the number of first sub-threads may be 3.

[0047] In another example, if the number of processor cores is 4, the number of first sub-threads may be 4.

[0048] Therefore, in the embodiment of the present disclosure, it is possible to avoid starting too many first sub-threads, and to create as many first sub-threads as possible while ensuring that fewer processor resources are occupied.

[0049] S130: Load multiple program packages in parallel through multiple first sub-threads.

[0050] In the embodiment of the present disclosure, after creating multiple first sub-threads, the electronic device can use the multiple first sub-threads to load multiple program packages of the target application in parallel to improve the loading efficiency of the multiple program packages.

[0051] Specifically, multiple first sub-threads may load multiple program packages synchronously, and each first sub-thread may load at least one program package.

[0052] S140: When the first type of program packages among the multiple program packages has been loaded, display the main interface of the target application.

[0053] In the embodiment of the present disclosure, during the process of loading multiple program packages in parallel through multiple first sub-threads, the electronic device can detect in real time whether the loading of the first type of program package has been completed. If the loading is completed, the main interface of the target application can be displayed. If the loading is not completed, the multiple program packages will continue to be loaded until it is detected that the loading of the first type of program package has been completed, and then the main interface of the target application will be displayed.

[0054] The first type of program package may include a program package for supporting the running of a main program of a target application program.

[0055] Optionally, the first type of program package may include a main program package of the target application and / or a configuration program package of the target application.

[0056] The main program package may be a program package corresponding to the user operating platform of the target application. Specifically, the main program package may be used to support the operation of the main interface corresponding to the main program of the target application, the management of the interface configuration and the management of the plug-in, which is not limited here.

[0057] The configuration package may be a package corresponding to the configuration function of the target application. Specifically, the configuration package may include a plug-in protocol, a common component, a control, etc., which are not limited here.

[0058] Thus, the electronic device can immediately display the main interface of the target application after detecting that each program package required to run the main program of the target application has been loaded, so as to further shorten the time the user waits for the target application to start.

[0059] In the disclosed embodiment, after detecting a startup operation of a target application including multiple program packages, a first application process corresponding to the target application can be started, and multiple program packages can be loaded in parallel through multiple first sub-threads of the first application process, thereby improving the loading efficiency of the program packages of the target application. When the first type of program packages among the multiple program packages is loaded, the main interface of the target application is displayed to speed up the display speed of the main interface of the target application, thereby improving the startup efficiency of the target application, improving the user experience and the retention rate of the target application.

[0060] In some embodiments of the present disclosure, after S140, the application startup method may further include:

[0061] Detect whether there is a package to be updated in the target application;

[0062] When detecting that there is a program package to be updated, downloading the program package to be updated;

[0063] The package to be updated is stored as an updated package corresponding to the target application.

[0064] Specifically, during the process of the electronic device running the target application, it can detect whether there is a program package to be updated for the target application. If it is detected that there is a program package to be updated, the program package to be updated is downloaded, the program package to be updated is decompressed, and the decompressed program package to be updated is stored as the updated program package corresponding to the target application.

[0065] Therefore, in the embodiment of the present disclosure, after starting the target application, if it is detected that there is a program package to be updated, the program package to be updated can be downloaded from the server, and the decompressed program package to be updated can be stored as an updated program package, so that the target application can be started based on the updated program package when the target application is started next time.

[0066] In another embodiment of the present disclosure, the start operation may be used to trigger the start of the target application for the first time.

[0067] In the disclosed embodiment, the first launch of the target application may be a cold launch of the application. A cold launch means that the target application process does not exist in the operating system of the electronic device, and the target application process needs to be created before entering the main interface of the target application. In other words, a cold launch means that the target application is completely exited and then launched.

[0068] For the cold start process, the electronic device needs to decompress the compressed package corresponding to each program package before loading the program package. The decompression process of the compressed package will consume a certain amount of time. In the embodiment of the present disclosure, when multiple program packages are loaded in parallel through multiple first sub-threads, although the compressed package corresponding to each program package also needs to be decompressed first, since the compressed packages can be decompressed and loaded in parallel, the startup time of the target application can also be shortened and the startup efficiency can be improved.

[0069] Furthermore, the applicant discovered that the process of loading a program package is not related to the process of obtaining permissions. Therefore, if the program package of the target application is loaded before obtaining permissions, the efficiency of starting the application will be further improved.

[0070] In some embodiments, while executing S120, the application startup method may further include:

[0071] When a launch operation is detected for the first time, permission acquisition request information corresponding to the target application is displayed.

[0072] Accordingly, displaying the main interface of the target application in S140 may include:

[0073] When a first trigger operation for the permission acquisition request information is detected, a main interface of the target application is displayed.

[0074] In an embodiment of the present disclosure, when the electronic device receives a startup operation, it determines whether it is the first time that a startup operation for the icon of the target application corresponding to the startup operation is detected. If so, it can obtain permission from the user to run the target application while creating multiple first sub-threads through the first application process, and load multiple program packages in parallel through the multiple first sub-threads. If the first type of program packages among the multiple program packages is completed and the corresponding permissions have been obtained, the main interface of the target application is displayed to complete the first startup process of the target application.

[0075] In an embodiment of the present disclosure, a method for an electronic device to obtain permissions from a user may be to display permission acquisition request information corresponding to a target application through a main thread, where the permission acquisition request information is used to prompt the user to grant permissions for running the target application.

[0076] In the embodiment of the present disclosure, the first trigger operation may be an operation for triggering the granting of the target permission.

[0077] Optionally, the first trigger operation may be a gesture control operation (such as click, long press, double click, etc.), a voice control operation, or an expression control operation for confirming the granting of permission in the first permission acquisition request information for the target permission, which is not limited here.

[0078] Optionally, the target permission may be a necessary permission for running the target application, for example, the target permission may be a voice permission, a camera permission, a location permission, etc., which are not limited here.

[0079] Taking the first trigger operation as a click operation as an example, the electronic device creates multiple first sub-threads through the first application process, displays the permission acquisition request information corresponding to the target application, and detects the click operation of the control for confirming the grant of permission in the first permission acquisition request information for the target permission, so as to obtain permission for running the target application. If a click operation is detected, the main interface of the target application can be displayed when the first type of package in the multiple packages is completed.

[0080] Therefore, in the embodiment of the present disclosure, if the target application is started for the first time, the program package of the target application can be loaded at the same time as the permission is obtained, so as to advance the loading process of the program package and further improve the startup efficiency of the target application.

[0081] In some other embodiments, before executing S110, the application startup method further includes:

[0082] When a startup operation is detected for the first time, a first application process is created.

[0083] In an embodiment of the present disclosure, when the electronic device receives a startup operation, it determines whether it is the first time that a startup operation is detected for the icon of the target application corresponding to the startup operation. If so, it means that the process for running the target application has not been created, and the electronic device can create a first application process in response to the startup operation. If not, it means that the process for running the target application has been created.

[0084] Therefore, in the embodiment of the present disclosure, if the target application is started for the first time, when the startup operation is detected for the first time, a first application process is created to create multiple first sub-threads based on the first application process, and multiple program packages are further loaded in parallel using the multiple first sub-threads, so that when the first type of program package among the multiple program packages is completed loading, the main interface of the target application is displayed, and the startup process of the target application is completed.

[0085] In some further embodiments of the present disclosure, the launch operation may be used to trigger the launch of the target application program not for the first time.

[0086] In the embodiment of the present disclosure, the non-first launch of the target application may be a hot launch of the target application. A hot launch refers to a process in which the target application already exists in the operating system of the electronic device, that is, a hot launch refers to a process in which the application enters the foreground from the background of the operating system.

[0087] For the hot start process, the electronic device does not need to decompress the compressed package corresponding to each program package before loading the program package, and the first application process of the target application may already exist in the operating system of the electronic device. If the first application process exists and there is no updated program package corresponding to the target application, the first application process is directly started and each program package is loaded to improve the startup efficiency of the target application. Otherwise, a new application process is created and the program package is loaded using the new process to ensure that the target application starts normally.

[0088] In some embodiments of the present disclosure, a process of launching the target application program not for the first time may be performed based on a detected launch operation for the target application program.

[0089] In the embodiment of the present disclosure, optionally, before executing S110, the application startup method may further include:

[0090] When the start operation is not detected for the first time, it is queried whether there is a first application process corresponding to the target application.

[0091] Accordingly, S110 may specifically include:

[0092] When it is found that the first application process exists, the first application process is started.

[0093] In an embodiment of the present disclosure, when the electronic device receives a startup operation, it determines whether it is the first time that a startup operation is detected for the icon of the target application corresponding to the startup operation. If not, it detects whether there is a first application process corresponding to the target application. If the first application process corresponding to the target application is queried, the first application process is directly started, and multiple program packages are loaded in parallel through multiple first sub-threads created by the first application process. If the first type of program packages in the multiple program packages are loaded, the main interface of the target application is displayed to complete the non-first startup process of the target application; if the first application process corresponding to the target application is not queried, the first application process is created to create multiple first sub-threads using the created first application process, and multiple program packages are loaded in parallel using the multiple first sub-threads until it is detected that the first type of program packages in the multiple program packages are loaded, and the main interface of the target application is displayed; if the startup operation for the icon of the target application corresponding to the startup operation is detected for the first time, the first application process is created based on the startup operation to load multiple program packages in parallel based on multiple first sub-threads created by the first application process until it is detected that the first type of program packages in the multiple program packages are loaded, and the main interface of the target application is displayed.

[0094] In the embodiment of the present disclosure, the startup operation may be any operation that can trigger the electronic device to start the target application program not for the first time.

[0095] Optionally, the start operation may be a gesture control operation (such as click, long press, double click, etc.), a voice control operation, or an expression control operation on the program icon of the target application, which is not limited here.

[0096] In some embodiments, before starting the first application process, the application starting method may further include:

[0097] Detect whether there is an updated package corresponding to the target application;

[0098] Accordingly, starting the first application process may specifically include:

[0099] In the case where it is detected that there is no updated package, the first application process is started.

[0100] In an embodiment of the present disclosure, when the electronic device receives a startup operation, if the startup operation is not the first startup operation and there is a first application process corresponding to the target application, it detects whether there is an updated program package corresponding to the target application; if no updated program package is detected, the first application process is directly started.

[0101] The updated program package may be a program package that has been updated before the target application is started.

[0102] In some other embodiments, after detecting whether there is an updated program package corresponding to the target application, the application startup method may further include:

[0103] When an updated program package is detected, closing an application process;

[0104] Creating a second application process corresponding to the target application;

[0105] Loading the updated multiple program packages in parallel through the second application process, wherein the updated multiple program packages include the updated program package;

[0106] When the first type of program packages among the updated multiple program packages are completely loaded, the main interface of the target application is displayed.

[0107] In an embodiment of the present disclosure, when an electronic device receives a startup operation, if the startup operation is not the first startup operation and there is a first application process corresponding to the target application, it is detected whether there is an updated program package corresponding to the target application. If an updated program package is detected, one application process is closed, and a second application process corresponding to the target application is created. The updated multiple program packages are loaded in parallel through the second application process. If a first type of program package in the updated multiple program packages is completed, the main interface of the target application is displayed. If an updated program package is not detected, the first application process is directly started to load multiple program packages in parallel using the first sub-thread created by the first application process. If the first type of program package is completed, the main interface of the target application can be displayed. If the loading is not completed, multiple program packages continue to be loaded until it is detected that the loading of the first type of program package is completed, and then the main interface of the target application is displayed.

[0108] In the embodiment of the present disclosure, the second application process may be a new process for loading an updated program package, and may be a basic execution unit of the target application program in a memory environment.

[0109] In some embodiments, the updated program packages may include the main program packages and / or configuration program packages in the first type of program packages, and the non-updated program packages may include program packages of various target functions corresponding to the target application.

[0110] In other embodiments, the updated program package may include a program package of at least one target function corresponding to the target application, and the non-updated program package may include a program package of other target functions corresponding to the target application and a main program package and / or a configuration program package in the first category of program packages.

[0111] Taking the updated program package of the e-book application as an example, the version of the updated program package of the e-book purchase function in the e-book application is 1.1, while the version of other program packages of the e-book application is 1.0. Then, the multiple updated program packages loaded in parallel by the second application process may include the updated program package corresponding to the e-book purchase function with version 1.1 and other program packages with version 1.0.

[0112] In some other embodiments of the present disclosure, the process of launching the target application program not for the first time may be executed based on the method of triggering a push message.

[0113] For the hot start process, the electronic device can first load the main interface through message push, then jump from the main interface to the landing page or result page, and finally jump from the landing page or result page to the final function page according to the user's operation. However, the landing page or result page is time-sensitive, so the user expects to view the landing page or result page faster, but this method loads the main interface first and then loads the landing page or result page, which increases the time it takes for the user to view the final function page. In addition, this startup method requires two main interface jump processes, which reduces the loading efficiency of the program package, and thus reduces the startup efficiency of the application.

[0114] Furthermore, the applicant discovered that in the process of executing a non-first launch of a target application based on a triggered push message, if the landing page or result page is loaded first and then the main interface is loaded, the user can view the landing page or result page faster, and then jump from the main interface to the final function page based on the user's operation. Therefore, this startup method only requires one main interface jump process, which improves the loading efficiency of the program package and thus improves the startup efficiency of the application.

[0115] In the embodiment of the present disclosure, optionally, the start operation may include a third trigger operation on the push message.

[0116] Accordingly, before S120, the application startup method may further include:

[0117] Loading a target program package corresponding to the push message through the first application process;

[0118] When the target package is loaded, the target application page corresponding to the push message is displayed;

[0119] Accordingly, S120 may include:

[0120] In response to detecting a close operation on the target application page, a plurality of first sub-threads are created by the first application process.

[0121] In an embodiment of the present disclosure, when the electronic device detects the third trigger operation on the push message, it loads the target program package corresponding to the push message through the first application process, and determines whether the target program package has been loaded. If so, the target application page corresponding to the push message is displayed, and it is continued to be determined whether a closing operation on the target application page is detected. If detected, multiple first sub-threads are created through the first application process to load multiple program packages in parallel based on the first sub-threads, so that when the first type of program package is loaded, the main interface is displayed. If the target software has not been loaded, the target program package continues to be loaded until the target program package is loaded. If the closing operation is not detected, the closing operation on the target application page continues to be detected until the closing operation is detected. Multiple first sub-threads are created through the first application process to load multiple program packages in parallel based on the first sub-threads, so that when the first type of program package is loaded, the main interface is displayed.

[0122] The third trigger operation may be an operation for triggering the start of a target application page corresponding to the push message.

[0123] Optionally, the third trigger operation may be a gesture control operation (such as click, long press, double click, etc.), a voice control operation or an expression control operation on the push message, which is not limited here.

[0124] The target program package may be a program package for supporting loading of a target application page corresponding to a push message.

[0125] Among them, the target application page corresponding to the push message can be the landing page or result page of the target application, that is, the target application page corresponding to the push message can be the push page corresponding to the push message.

[0126] The closing operation may be any operation that can trigger a closing control corresponding to the target application page.

[0127] Optionally, the closing operation may be a gesture control operation (such as clicking, long pressing, double clicking, etc.), a voice control operation, or an expression control operation for closing the control, which is not limited here.

[0128] Therefore, in the embodiment of the present disclosure, based on the push message, the target program package for supporting the running of the push page can be loaded first, and the push page corresponding to the push message can be displayed. Then, when the user closes the push page, other program packages of the target application can be loaded to jump from the push page to the main interface. When the user views the push message, there is no need to wait for the loading of other program packages except the target program package, which further improves the startup efficiency when the target application is started due to the push message.

[0129] In yet another embodiment of the present disclosure, the first type of program package may be loaded through one of the first sub-threads, and the second type of program package may be loaded synchronously through other first sub-threads, so as to load multiple program packages in parallel in a classified manner.

[0130] In some embodiments of the present disclosure, S130 may include:

[0131] S1301, loading a first type of program package through any first sub-thread;

[0132] S1302: Load a group of second-category program packages from a plurality of program packages through each other first sub-thread.

[0133] In an embodiment of the present disclosure, when an electronic device uses multiple first sub-threads to load multiple program packages in parallel, the first-category program packages can be divided into one group, and multiple second-category program packages can be divided into multiple groups, so that the multiple program packages can be divided into a preset number of groups (one group of first-category program packages and multiple groups of second-category program packages form a preset number of program groups) and loaded in parallel.

[0134] The preset number of groups may be any preset number of groups and is not limited here.

[0135] In one example, if the preset number of groups is 4 and the number of processor cores is 4, the electronic device can create 4 first sub-threads.

[0136] In another example, the preset number of groups is 3, the number of processor cores is 2, and the electronic device can create 3 first sub-threads.

[0137] In an embodiment of the present disclosure, the second type of program package may include a program package for supporting the running of an independent module of a target application.

[0138] In one example, the target application is an e-book application, and the main package may be a package used to support the operation of the main services of the e-book application, such as the bookshelf service, and the second type of package may be a package used to support the operation of non-main services such as the bookstore service, community service, study room service, and setting service within the e-book application.

[0139] In another example, the target application is a short video application. The main program package can be used to support the main services of the short video application, such as the home page video playback service. The second type of program can be used to support the running of non-main services such as the mall service, message browsing service, and setting service within the short video application.

[0140] Therefore, in the embodiment of the present disclosure, the first type of program package can be loaded through one of the first sub-threads, and the second type of program package can be loaded synchronously through other first sub-threads, so as to load multiple program packages in parallel in a classified manner.

[0141] In the embodiment of the present disclosure, the loading time of the second type of program package is less than or equal to the preset permission acquisition time. Specifically, the loading time of each second type of program package is less than or equal to the preset permission acquisition time.

[0142] The permission acquisition time may be any pre-set time for waiting for the user to grant permission for running the target application, and is not limited here.

[0143] Therefore, in the embodiment of the present disclosure, since the loading time of the second type program package is less than or equal to the preset permission acquisition time, the second type program package required by the target application can be loaded before obtaining permission, thereby further improving the startup efficiency of the application.

[0144] In the disclosed embodiment, each group of second-category program packages meets a preset condition;

[0145] The preset conditions include: there is a dependency relationship between the second category program packages, and / or the total loading time is less than or equal to the preset permission acquisition time.

[0146] The dependency relationship may be used to describe the functional requirements between program packages. If the function of one program package requires support from another program package, it indicates that there is a dependency relationship between the program packages.

[0147] The total loading duration may be the sum of the loading durations of the second-category program packages in each group. Specifically, the sum of the loading durations of the second-category program packages in a group is also less than or equal to the preset permission acquisition duration.

[0148] Therefore, in the embodiment of the present disclosure, since there is a dependency relationship between the second-category program packages and the total loading time is less than or equal to the preset permission acquisition time, all the second-category program packages required by the target application are loaded before obtaining permission, thereby further improving the startup efficiency of the application and ensuring that all second-category program packages are loaded.

[0149] In some other embodiments of the present disclosure, if the number of groups is greater than the number of first sub-threads, the unloaded second-category program packages may be loaded by the first sub-thread that completes loading first.

[0150] In the embodiment of the present disclosure, optionally, after multiple program packages are loaded in parallel through multiple first sub-threads, S130 may further include:

[0151] S1303: When the target first sub-thread completes loading and there is a group of target second-category program packages that have not been loaded in the multiple program packages, complete loading the target second-category program packages through the target first sub-thread.

[0152] In an embodiment of the present disclosure, when an electronic device uses multiple first sub-threads to load multiple program packages in parallel, the multiple program packages can be divided into a preset number of groups. If the preset number of groups is greater than the number of first sub-threads, after loading the first-category program package through any first sub-thread and loading a group of second-category program packages among the multiple program packages through each other first sub-thread, it is determined whether there is a group of target second-category program packages that have not been loaded among the multiple program packages when the target first sub-thread completes loading. If so, the target second-category program packages are loaded through the target first sub-thread until all the second-category program packages are loaded. If not, both the first-category program packages and the second-category program packages are loaded.

[0153] The target first sub-thread may be the first sub-thread that first completes loading of a group of second-category program packages.

[0154] The target second-category program package may be a second-category program package that has not been loaded.

[0155] In an example, if the number of processor cores is 2, the number of first sub-threads is 3, and each first sub-thread is numbered 1, 2, and 3 respectively. If multiple program packages include 1 group of first-category program packages and 3 groups of second-category program packages, the 3 groups of second-category program packages are respectively package 1, package 2, and package 3, 1 group of first-category program packages and package 1 and package 2 are loaded in parallel through the 3 first sub-threads corresponding to number 1, number 2, and number 3 respectively, the target first sub-thread that completes loading first is detected, and the 1 group of second-category program packages that have not been loaded are determined. If the target first sub-thread that completes loading first is numbered 2, and the group of target second-category program packages that have not been loaded is package 3, package 3 is continuously loaded through the target first sub-thread numbered 2. After package 3 is loaded, it is determined that the loading of 1 group of first-category program packages and 3 groups of second-category program packages have all been completed.

[0156] In another example, if the number of processor cores is 4, the number of first sub-threads is 4, and the first sub-threads are numbered 1, 2, 3, and 4 respectively. If the multiple program packages include 1 group of first-category program packages and 4 groups of second-category program packages, the 4 groups of second-category program packages are respectively package 1, package 2, package 3, and package 4, 1 group of first-category program packages and package 1, package 2, and package 3 are loaded in parallel through the 4 first sub-threads corresponding to number 1, number 2, number 3, and number 4 respectively, the target first sub-thread that completes loading first is detected, and the 1 group of second-category program packages that have not been loaded are determined. If the target first sub-thread that completes loading first is numbered 1, and the group of target second-category program packages that have not been loaded is package 4, package 4 is continuously loaded through the target first sub-thread numbered 1. After the loading of package 4 is completed, it is determined that the loading of 1 group of first-category program packages and 4 groups of second-category program packages are all completed.

[0157] Therefore, in the embodiment of the present disclosure, the first type of program package can be loaded through one of the first sub-threads, and the second type of program package can be loaded through other first sub-threads, so as to load multiple program packages in parallel in an orderly manner, and different parallel loading strategies are adopted according to the different quantitative relationships between the number of groups of the second type of program packages and the first sub-threads to adapt to different program package loading scenarios.

[0158] In another embodiment of the present disclosure, after displaying the main interface of the target application, the third or fourth program package among the multiple program packages may be loaded to avoid affecting the loading of the main interface due to loading of the third or fourth program package.

[0159] In some embodiments of the present disclosure, the electronic device may load a third type program package with a large amount of code after starting the target application.

[0160] Figure 2 A flow chart of another application startup method provided by an embodiment of the present disclosure is shown.

[0161] like Figure 2 As shown, the application startup method may include the following steps.

[0162] S210: In response to detecting a start operation on a target application, start a first application process corresponding to the target application.

[0163] S220. Create multiple first sub-threads through the first application process.

[0164] S230: Load multiple program packages in parallel through multiple first sub-threads.

[0165] S240: When the first type of program packages among the multiple program packages has been loaded, display the main interface of the target application program.

[0166] It should be noted that after the first subprocess has loaded multiple packages, it can be automatically closed.

[0167] Among them, S210 to S240 are similar to S110 to S140 and are not described in detail here.

[0168] S250: Create a second sub-thread through the first application process.

[0169] In the embodiment of the present disclosure, after the electronic device displays the main interface, the second sub-thread can be created through the first application process.

[0170] S260: Load a third type of program package from the multiple program packages through the second sub-thread.

[0171] In the embodiment of the present disclosure, after the electronic device creates the second sub-thread, the third type of program package among the multiple program packages can be loaded through the second sub-thread.

[0172] In an embodiment of the present disclosure, the third type of program package may include a program package with a large amount of code for supporting the running of independent modules of the target application.

[0173] In the embodiment of the present disclosure, the loading time of the third type of program package is longer than the preset permission acquisition time. In other words, the third type of program package may be a program package that is not loaded when the target application is started.

[0174] In the disclosed embodiment, if the loading time of the third-category program package is longer than the preset permission acquisition time, it means that the third-category program package has a large amount of code, which makes the loading time longer. Loading the third-category program package when starting the target application will reduce the startup speed of the target application. In the disclosed embodiment, the third-category program package can be loaded after startup, so the startup efficiency of the target application can be improved.

[0175] In the embodiment of the present disclosure, the third type of program package may be a program package corresponding to a pre-set service that the user will not use immediately upon entering the target application.

[0176] In one example, the target application is an e-book application, and the third type of program package may be a program package for user support of non-main service operations such as bookstore service, community service, study room service, and setting service.

[0177] In another example, the target application is a short video application, and the third type of package may be a package for supporting the operation of non-main services such as a shopping mall service, a message browsing service, and a setting service.

[0178] Therefore, in the disclosed embodiment, after loading the first type of program package, the third type of program package with a larger code volume can be loaded, so as to further improve the loading efficiency of the main interface by delaying the loading of the third type of program package.

[0179] In some other embodiments of the present disclosure, the electronic device may load the fourth type of program package after starting the target application and when the user uses the service provided by the target application.

[0180] Figure 3 A flow chart of another application startup method provided by an embodiment of the present disclosure is shown.

[0181] like Figure 3 As shown, the application startup method may include the following steps.

[0182] S310: In response to detecting a start operation on a target application, start a first application process corresponding to the target application.

[0183] S320. Create multiple first sub-threads through the first application process.

[0184] S330: Load multiple program packages in parallel through multiple first sub-threads.

[0185] S340: When the first type of program packages among the multiple program packages has been loaded, display the main interface of the target application.

[0186] It should be noted that after the first subprocess has loaded multiple packages, it can be automatically closed.

[0187] Among them, S310 to S340 are similar to S110 to S140 and are not described in detail here.

[0188] S350: In response to detecting a second trigger operation on a target function in the main interface, create a third sub-thread through the first application process.

[0189] In an embodiment of the present disclosure, after the electronic device displays the main interface, it can detect in real time the second trigger operation of the target function in the main interface, and determine whether the second trigger operation is received. If so, it creates a third sub-thread through the first application process in response to the second trigger operation; otherwise, it continues to detect the second trigger operation until the second trigger operation is detected, and creates a third sub-thread through the first application process.

[0190] In the embodiment of the present disclosure, the target function may be a function corresponding to a non-primary service provided by the target application.

[0191] In one example, the target application is an e-book application, and the target functions may include functions corresponding to non-primary services such as a bookstore service, a community service, a study room service, and a setting service within the e-book application.

[0192] In another example, the target application is a short video application, and the target functions may include functions corresponding to non-main services such as a shopping mall service, a message browsing service, and a setting service within the short video application.

[0193] In the embodiment of the present disclosure, the second trigger operation can be a gesture control operation (such as click, long press, double click, etc.), a voice control operation or an expression control operation for the control used to use the target function in the main interface, and is not limited here.

[0194] In the embodiment of the present disclosure, the third sub-thread may be a sub-thread used to load a program package corresponding to the target function during the process of using the target function.

[0195] In the embodiment of the present disclosure, the number of third sub-threads can be determined according to the number of processor cores.

[0196] S360: Load the fourth type of program package corresponding to the target function through the third sub-thread.

[0197] In the embodiment of the present disclosure, after the electronic device creates the third sub-thread, it can use the fourth type of program package corresponding to the target function of the third sub-thread.

[0198] In an embodiment of the present disclosure, the fourth type of program package may include a program package for supporting the running of an independent module of the target application.

[0199] In the embodiment of the present disclosure, the fourth type of program package may be a program package corresponding to a service that the user will not use immediately upon entering the target application. In other words, the fourth type of program package may be a program package that is not loaded when the target application is started and is loaded when the target function is used.

[0200] In the embodiment of the present disclosure, the fourth type of program package can be a program package that is loaded only when the target function is used. When the fourth type of program package is loaded when the target application is started, the startup speed of the target application will be reduced to a certain extent. In the embodiment of the present disclosure, the fourth type of program package can be loaded after startup and only when the target function is used, so the startup efficiency of the target application can be improved.

[0201] In one example, the target application is an e-book application, and the fourth type of program package may be a program package that supports non-main service operations such as bookstore service, community service, study room service, and setting service.

[0202] In another example, the target application is a short video application, and the fourth type of package may be a package for supporting the operation of non-main services such as a shopping mall service, a message browsing service, and a setting service.

[0203] Therefore, in the embodiment of the present disclosure, after loading the first type of program package, if a second trigger operation of the user using the target function is received when the target function is used, the fourth type of program package is loaded, so as to further improve the loading efficiency of the main interface by delaying the loading of the fourth type of program package.

[0204] In summary, in the embodiments of the present disclosure, the loading efficiency of the main interface can be improved by delaying the loading of the third-category program package and the fourth-category program package, thereby further improving the application startup efficiency.

[0205] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown.

[0206] The electronic devices provided by the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as smart phones, laptops, PDAs, PADs, PMPs, vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), wearable devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc.

[0207] It should be noted that Figure 4 The electronic device 410 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0208] The electronic device 410 conventionally includes a processor 410 and a computer program product or computer-readable medium in the form of a memory 420. The memory 420 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 420 has a storage space 421 for executable instructions (or program codes) 4211 for executing any method steps in the above-mentioned application startup method. For example, the storage space 421 for executable instructions may include individual executable instructions 4211 respectively used to implement various steps in the above-mentioned application startup method. These executable instructions may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit. The storage unit may have a storage device 4211 having a plurality of computer program products. Figure 4 The memory 420 in the electronic device 410 is similarly arranged as a storage segment or storage space. The executable instructions can be compressed, for example, in an appropriate form. Generally, the storage unit includes executable instructions for executing the steps of the application startup method according to the present invention, that is, codes that can be read by a processor such as the processor 410, and when these codes are executed by the electronic device 410, the electronic device 410 executes the various steps in the application startup method described above.

[0209] Of course, to simplify, Figure 4 Only some of the components related to the present invention in the electronic device 410 are shown, and components such as a bus, an input / output interface, an input device, an output device, etc. are omitted. In addition, according to specific application conditions, the electronic device 410 may also include any other appropriate components.

[0210] An embodiment of the present invention further provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the application startup method provided by each embodiment of the present invention.

[0211] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0212] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0213] In an embodiment of the present invention, program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0214] The present invention discloses:

[0215] A1. A method for starting an application, comprising:

[0216] In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages; creating a plurality of first sub-threads through the first application process;

[0217] Loading multiple program packages in parallel through multiple first sub-threads;

[0218] When the first type of program packages among the multiple program packages are loaded completely, a main interface of the target application is displayed.

[0219] A2. According to the method of claim A1, wherein, while creating a plurality of first sub-threads by the first application process, the method further comprises:

[0220] When a launch operation is detected for the first time, the permission acquisition request information corresponding to the target application is displayed;

[0221] Among them, the main interface of the target application is displayed, including:

[0222] When a first trigger operation for the permission acquisition request information is detected, a main interface of the target application is displayed.

[0223] A3. According to the method of claim A1 or A2, before starting the first application process corresponding to the target application, the method further comprises:

[0224] When a startup operation is detected for the first time, a first application process is created.

[0225] A4. The method according to claims A1 to A3, wherein the number of first sub-threads is determined according to the number of processor cores.

[0226] A5. The method according to claim A1, wherein the step of loading a plurality of program packages in parallel through a plurality of first sub-threads comprises:

[0227] Loading a first-category program package through any first child thread;

[0228] A set of second-category packages among the plurality of packages is loaded by each of the other first child threads.

[0229] A6. The method according to claim A5, wherein the multiple packages are loaded in parallel by multiple first sub-threads, further comprising:

[0230] When the target first sub-thread completes loading and there is still a group of target second-category program packages that have not been loaded in the multiple program packages, the target second-category program packages are loaded through the target first sub-thread.

[0231] A7. A method according to claim A5 or A6, wherein the loading time of the second type of program package is less than or equal to the preset permission acquisition time.

[0232] A8. The method according to claim A5 or A6, wherein each group of second-category program packages satisfies a preset condition;

[0233] The preset conditions include: there is a dependency relationship between the second category program packages, and / or the total loading time is less than or equal to the preset permission acquisition time.

[0234] A9. The method according to claims A1 to A8, wherein the first type of program package includes a main program package of the target application and / or a configuration program package of the target application.

[0235] A10. According to the method of claim A1, after displaying the main interface of the target application, the method further comprises:

[0236] Creating a second child thread through the first application process;

[0237] A third type of program package among the multiple program packages is loaded by the second sub-thread.

[0238] A11. According to the method of claim A10, wherein the loading time of the third type of program package is greater than the preset permission acquisition time.

[0239] A12. According to the method of claim A1, after displaying the main interface of the target application, the method further comprises:

[0240] In response to detecting a second trigger operation on the target function in the main interface, creating a third sub-thread through the first application process;

[0241] The fourth type of program package corresponding to the target function is loaded through the third sub-thread.

[0242] A13. According to the method of claim A1, before starting the first application process corresponding to the target application, the method further comprises:

[0243] In the case where the start operation is not detected for the first time, querying whether there is a first application process corresponding to the target application;

[0244] Wherein, starting the first application process corresponding to the target application program includes:

[0245] When it is found that the first application process exists, the first application process is started.

[0246] A14. The method according to claim A13, wherein, before starting the first application process, the method further comprises:

[0247] Detect whether there is an updated package corresponding to the target application;

[0248] Wherein, starting the first application process includes:

[0249] In the case where it is detected that there is no updated package, the first application process is started.

[0250] A15. The method according to claim A14, wherein, after detecting whether there is an updated program package corresponding to the target application, the method further comprises:

[0251] When an updated program package is detected, closing the first application process;

[0252] Creating a second application process corresponding to the target application;

[0253] Loading the updated multiple program packages in parallel through the second application process, wherein the updated multiple program packages include the updated program package;

[0254] When the first type of program packages among the updated multiple program packages are completely loaded, the main interface of the target application is displayed.

[0255] A16. According to the method of claim A1, after displaying the main interface of the target application, the method further comprises:

[0256] Detect whether there is a package to be updated in the target application;

[0257] When detecting that there is a program package to be updated, downloading the program package to be updated;

[0258] The package to be updated is stored as an updated package corresponding to the target application.

[0259] A17. The method according to claim A1, wherein the start operation comprises a third trigger operation for pushing a message;

[0260] Before creating a plurality of first sub-threads through the first application process, the method further includes:

[0261] Loading a target program package corresponding to the push message through the first application process;

[0262] When the target package is loaded, the target application page corresponding to the push message is displayed;

[0263] The step of creating a plurality of first sub-threads through the first application process includes:

[0264] In response to detecting a close operation on the target application page, a plurality of first sub-threads are created by the first application process.

[0265] B18. An electronic device, comprising a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0266] In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages;

[0267] Creating a plurality of first sub-threads through a first application process;

[0268] Loading multiple program packages in parallel through multiple first sub-threads;

[0269] When the first type of program packages among the multiple program packages are loaded completely, a main interface of the target application is displayed.

[0270] B19. An electronic device according to claim B18, wherein, while creating a plurality of first sub-threads through the first application process, the executable instructions further cause the processor to execute:

[0271] When a launch operation is detected for the first time, the permission acquisition request information corresponding to the target application is displayed;

[0272] Wherein, when displaying the main interface of the target application, the executable instruction specifically causes the processor to execute:

[0273] When a first trigger operation for the permission acquisition request information is detected, a main interface of the target application is displayed.

[0274] B20. An electronic device according to claim B18 or B19, wherein, before starting the first application process corresponding to the target application, the executable instructions further cause the processor to execute:

[0275] When a startup operation is detected for the first time, a first application process is created.

[0276] B21. An electronic device according to any one of claims B18-B20, wherein the number of first sub-threads is determined according to the number of processor cores.

[0277] B22. An electronic device according to claim B18, wherein, when the plurality of program packages are loaded in parallel through the plurality of first sub-threads, the executable instructions specifically cause the processor to execute:

[0278] Loading a first-category program package through any first child thread;

[0279] A set of second-category packages among the plurality of packages is loaded by each of the other first child threads.

[0280] B23. An electronic device according to claim B22, wherein the plurality of program packages are loaded in parallel by the plurality of first sub-threads, and the executable instructions further cause the processor to execute:

[0281] When the target first sub-thread completes loading and there is still a group of target second-category program packages that have not been loaded in the multiple program packages, the target second-category program packages are loaded through the target first sub-thread.

[0282] B24. An electronic device according to claim B21 or B22, wherein the loading time of the second type of program package is less than or equal to the preset permission acquisition time.

[0283] B25. An electronic device according to claim B21 or B22, wherein each group of second-category program packages satisfies a preset condition;

[0284] The preset conditions include: there is a dependency relationship between the second category program packages, and / or the total loading time is less than or equal to the preset permission acquisition time.

[0285] B26. An electronic device according to claim B18 or B25, wherein the first type of program package includes a main program package of the target application and / or a configuration program package of the target application.

[0286] B27. An electronic device according to claim B26, wherein, after displaying the main interface of the target application, the executable instructions further cause the processor to execute:

[0287] Creating a second child thread through the first application process;

[0288] A third type of program package among the multiple program packages is loaded by the second sub-thread.

[0289] B28. An electronic device according to claim B27, wherein the loading time of the third category program package is longer than the preset permission acquisition time.

[0290] B29. The electronic device according to claim B18, wherein after displaying the main interface of the target application, the method further comprises:

[0291] In response to detecting a second trigger operation on the target function in the main interface, creating a third sub-thread through the first application process;

[0292] The fourth type of program package corresponding to the target function is loaded through the third sub-thread.

[0293] B30. An electronic device according to claim B18, wherein, before starting the first application process corresponding to the target application, the executable instructions further cause the processor to execute:

[0294] In the case where the start operation is not detected for the first time, querying whether there is a first application process corresponding to the target application;

[0295] Wherein, when the first application process corresponding to the target application is started, the executable instruction specifically causes the processor to execute:

[0296] When it is found that the first application process exists, the first application process is started.

[0297] B31. An electronic device according to claim B30, wherein, before starting the first application process, the executable instructions further cause the processor to execute:

[0298] Detect whether there is an updated package corresponding to the target application;

[0299] Wherein, when the first application process is started, the executable instruction further causes the processor to execute:

[0300] In the case where it is detected that there is no updated package, the first application process is started.

[0301] B32. An electronic device according to claim B31, wherein, after detecting whether there is an updated program package corresponding to the target application, the executable instructions further cause the processor to execute:

[0302] When an updated program package is detected, closing the first application process;

[0303] Creating a second application process corresponding to the target application;

[0304] Loading the updated multiple program packages in parallel through the second application process, wherein the updated multiple program packages include the updated program package;

[0305] When the first type of program packages among the updated multiple program packages are completely loaded, the main interface of the target application is displayed.

[0306] B33. An electronic device according to claim B18, wherein, after displaying the main interface of the target application, the executable instructions further cause the processor to execute:

[0307] Detect whether there is a package to be updated in the target application;

[0308] When detecting that there is a program package to be updated, downloading the program package to be updated;

[0309] The package to be updated is stored as an updated package corresponding to the target application.

[0310] B34. An electronic device according to claim B18, wherein the start operation comprises a third trigger operation for pushing a message;

[0311] Before creating a plurality of first sub-threads through the first application process, the executable instructions further cause the processor to execute:

[0312] Loading a target program package corresponding to the push message through the first application process;

[0313] When the target package is loaded, the target application page corresponding to the push message is displayed;

[0314] Wherein, when the plurality of first sub-threads are created by the first application process, the executable instruction specifically causes the processor to execute:

[0315] In response to detecting a close operation on the target application page, a plurality of first sub-threads are created by the first application process.

[0316] C35. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the application startup method of any one of claims A1-A18 above.

[0317] The various component embodiments of the present invention can be implemented in hardware in all or part of the steps, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in an electronic device according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0318] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

[0319] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0320] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for starting an application, characterized in that: include: In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages; Creating a plurality of first sub-threads through the first application process; Loading the multiple program packages in parallel through the multiple first sub-threads; When the first type of program packages among the multiple program packages are loaded, displaying the main interface of the target application; The startup operation includes a third trigger operation on the push message; wherein, before creating multiple first sub-threads through the first application process, the method also includes: loading the target program package corresponding to the push message through the first application process; when the target program package is loaded, displaying the target application page corresponding to the push message; wherein, creating multiple first sub-threads through the first application process includes: in response to detecting a closing operation on the target application page, creating the multiple first sub-threads through the first application process.

2. The method according to claim 1, characterized in that: While creating a plurality of first sub-threads through the first application process, the method further includes: When the startup operation is detected for the first time, displaying permission acquisition request information corresponding to the target application; Wherein, displaying the main interface of the target application includes: When a first trigger operation for the permission acquisition request information is detected, a main interface of the target application is displayed.

3. The method according to claim 1 or 2, characterized in that: Before starting the first application process corresponding to the target application, the method further includes: When the startup operation is detected for the first time, the first application process is created.

4. The method according to claim 1 or 2, characterized in that: The number of the first sub-threads is determined according to the number of processor cores.

5. The method according to claim 1, characterized in that The step of loading the multiple program packages in parallel through the multiple first sub-threads includes: Loading the first type of program package through any one of the first sub-threads; A group of second-category program packages among the plurality of program packages is loaded through each of the other first sub-threads.

6. The method according to claim 5, characterized in that The step of loading the plurality of program packages in parallel through the plurality of first sub-threads further comprises: When the target first sub-thread completes loading and there is a group of unloaded target second-category program packages in the plurality of program packages, the target second-category program packages are loaded through the target first sub-thread.

7. The method according to claim 5 or 6, characterized in that: The loading time of the second type of program package is less than or equal to the preset permission acquisition time.

8. The method according to claim 5 or 6, characterized in that: Each group of the second-category program packages meets the preset conditions; The preset conditions include: there is a dependency relationship between the second-category program packages, and / or the total loading time is less than or equal to a preset permission acquisition time.

9. The method according to claim 1, characterized in that: The first type of program package includes a main program package of the target application and / or a configuration program package of the target application.

10. The method according to claim 1, characterized in that After displaying the main interface of the target application, the method further includes: Creating a second sub-thread through the first application process; A third type of program package among the plurality of program packages is loaded by the second sub-thread.

11. The method according to claim 10, characterized in that The loading time of the third type of program package is longer than the preset permission acquisition time.

12. The method according to claim 1, characterized in that After displaying the main interface of the target application, the method further includes: In response to detecting a second triggering operation on a target function in the main interface, creating a third sub-thread through the first application process; The fourth type of program package corresponding to the target function is loaded through the third sub-thread.

13. The method according to claim 1, characterized in that Before starting the first application process corresponding to the target application, the method further includes: In a case where the start operation is not detected for the first time, querying whether the first application process corresponding to the target application exists; Wherein, starting the first application process corresponding to the target application includes: In a case where it is found that the first application process exists, the first application process is started.

14. The method according to claim 13, characterized in that Before starting the first application process, the method further includes: Detecting whether there is an updated program package corresponding to the target application; Wherein, starting the first application process includes: In the case where it is detected that the updated program package does not exist, the first application process is started.

15. The method according to claim 14, characterized in that After detecting whether there is an updated program package corresponding to the target application, the method further includes: When the updated program package is detected, closing the first application process; Creating a second application process corresponding to the target application; Loading multiple updated program packages in parallel through the second application process, wherein the multiple updated program packages include the updated program package; When the first type of program packages among the updated multiple program packages are completely loaded, the main interface of the target application is displayed.

16. The method according to claim 1, characterized in that After displaying the main interface of the target application, the method further includes: Detecting whether the target application has a program package to be updated; In the case where the to-be-updated program package is detected to exist, downloading the to-be-updated program package; The program package to be updated is stored as an updated program package corresponding to the target application.

17. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations: In response to detecting a start operation on a target application, starting a first application process corresponding to the target application, the target application including a plurality of program packages; Creating a plurality of first sub-threads through the first application process; Loading the multiple program packages in parallel through the multiple first sub-threads; When the first type of program packages among the multiple program packages are loaded, displaying the main interface of the target application; The startup operation includes a third trigger operation on the push message; wherein, before creating multiple first sub-threads through the first application process, the executable instructions also cause the processor to execute: loading the target program package corresponding to the push message through the first application process; when the target program package is loaded, displaying the target application page corresponding to the push message; wherein, when creating multiple first sub-threads through the first application process, the executable instructions specifically cause the processor to execute: in response to detecting a closing operation on the target application page, creating the multiple first sub-threads through the first application process.

18. The electronic device according to claim 17, characterized in that: While creating a plurality of first sub-threads through the first application process, the executable instructions further cause the processor to execute: When the startup operation is detected for the first time, displaying permission acquisition request information corresponding to the target application; Wherein, when displaying the main interface of the target application, the executable instruction specifically causes the processor to execute: When a first trigger operation for the permission acquisition request information is detected, a main interface of the target application is displayed.

19. The electronic device according to claim 17 or 18, characterized in that: Before starting the first application process corresponding to the target application, the executable instruction further causes the processor to execute: When the startup operation is detected for the first time, the first application process is created.

20. The electronic device according to claim 17 or 18, characterized in that: The number of the first sub-threads is determined according to the number of processor cores.

21. The electronic device according to claim 17, characterized in that: When the multiple program packages are loaded in parallel through the multiple first sub-threads, the executable instructions specifically cause the processor to execute: Loading the first type of program package through any one of the first sub-threads; A group of second-category program packages among the plurality of program packages is loaded through each of the other first sub-threads.

22. The electronic device according to claim 21, characterized in that: The multiple program packages are loaded in parallel by the multiple first sub-threads, and the executable instructions further cause the processor to execute: When the target first sub-thread completes loading and there is a group of unloaded target second-category program packages in the plurality of program packages, the target second-category program packages are loaded through the target first sub-thread.

23. The electronic device according to claim 21 or 22, characterized in that: The loading time of the second type of program package is less than or equal to the preset permission acquisition time.

24. The electronic device according to claim 21 or 22, characterized in that: Each group of the second-category program packages meets the preset conditions; The preset conditions include: there is a dependency relationship between the second-category program packages, and / or the total loading time is less than or equal to a preset permission acquisition time.

25. The electronic device according to claim 17, characterized in that: The first type of program package includes a main program package of the target application and / or a configuration program package of the target application.

26. The electronic device according to claim 17, characterized in that: After displaying the main interface of the target application, the executable instructions further cause the processor to execute: Creating a second sub-thread through the first application process; A third type of program package among the plurality of program packages is loaded by the second sub-thread.

27. The electronic device according to claim 26, characterized in that: The loading time of the third type of program package is longer than the preset permission acquisition time.

28. The electronic device according to claim 17, characterized in that: After displaying the main interface of the target application, the executable instructions further cause the processor to execute: In response to detecting a second triggering operation on a target function in the main interface, creating a third sub-thread through the first application process; The fourth type of program package corresponding to the target function is loaded through the third sub-thread.

29. The electronic device according to claim 17, characterized in that: Before starting the first application process corresponding to the target application, the executable instruction further causes the processor to execute: In a case where the start operation is not detected for the first time, querying whether the first application process corresponding to the target application exists; Wherein, when the first application process corresponding to the target application is started, the executable instruction specifically causes the processor to execute: In a case where it is found that the first application process exists, the first application process is started.

30. The electronic device according to claim 29, characterized in that Before starting the first application process, the executable instructions further cause the processor to execute: Detecting whether there is an updated program package corresponding to the target application; Wherein, when the first application process is started, the executable instruction further causes the processor to execute: In the case where it is detected that the updated program package does not exist, the first application process is started.

31. The electronic device according to claim 30, characterized in that: After detecting whether there is an updated program package corresponding to the target application, the executable instructions further cause the processor to execute: When the updated program package is detected, closing the first application process; Creating a second application process corresponding to the target application; Loading multiple updated program packages in parallel through the second application process, wherein the multiple updated program packages include the updated program package; When the first type of program packages among the updated multiple program packages are completely loaded, the main interface of the target application is displayed.

32. The electronic device according to claim 17, characterized in that: After displaying the main interface of the target application, the executable instructions further cause the processor to execute: Detecting whether the target application has a program package to be updated; In the case where the to-be-updated program package is detected to exist, downloading the to-be-updated program package; The program package to be updated is stored as an updated program package corresponding to the target application.

33. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the application startup method described in any one of claims 1 to 16.