CN111475220A - Cold start method and device, electronic equipment and computer storage medium - Google Patents
Cold start method and device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN111475220A CN111475220A CN201910063709.9A CN201910063709A CN111475220A CN 111475220 A CN111475220 A CN 111475220A CN 201910063709 A CN201910063709 A CN 201910063709A CN 111475220 A CN111475220 A CN 111475220A
- Authority
- CN
- China
- Prior art keywords
- task data
- application
- initialization
- cold start
- initialization task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The embodiment of the invention provides a cold start method, a cold start device, electronic equipment and a computer storage medium, wherein the cold start method comprises the following steps: receiving an application cold start instruction triggered by version upgrading of an application; acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction; and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data. By the embodiment of the invention, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a cold start method, a cold start device, electronic equipment and a computer storage medium.
Background
The application cold start refers to a mode that when an application is started, the background of an operating system does not have a process of the application, and the operating system can recreate a new process to be allocated to the application, initialize the application and start the application.
With the continuous improvement and improvement of various application functions, the data part participating in initialization in many applications becomes larger and larger, thereby causing long initialization time when the applications are started in a cold state. Meanwhile, various applications need to be installed and upgraded frequently, and the upgraded new version can be used only through cold start after installation and upgrade, so that the use experience of a user on the new version is influenced.
Taking the browser installation and upgrade of the Android system as an example, the initialization process generally comprises downloading an installation package APK for upgrade (a part of initialization process exists and a part of initialization process does not exist), decompressing the APK, loading a Dex file (L oad Dex or ODEX) in the APK, performing security check, loading a So file (L oad So) in the APK, initializing a rendering engine and generating a new webview (new webview), because a plurality of browser kernels are super components, the time consumption is huge when the initialization process is performed, and further, the cold start time of the browser installation and upgrade is very long, and the user experience is seriously influenced.
Therefore, how to effectively shorten the cold start time when the application is installed and upgraded to improve the user experience becomes an urgent problem to be solved.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a cold start scheme to solve the above problems.
According to a first aspect of embodiments of the present invention, there is provided a cold start method, including: receiving an application cold start instruction triggered by version upgrading of an application; acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction; and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data.
According to a second aspect of embodiments of the present invention, there is provided a cold start apparatus including: the receiving module is used for receiving an application cold start instruction triggered by version upgrading of the application; the acquisition module is used for acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction; and the cold start module is used for performing cold start on the application by using the first initialization task data, and continuing to perform initialization on the application by using the second initialization task data after the cold start is successful.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the cold boot method according to the first aspect.
According to a fourth aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the cold start method as described in the first aspect.
According to the cold start scheme provided by the embodiment of the invention, the initialization task data required by the initialization of the application is divided into two parts, so that when the cold start is required by the version upgrade of the application, the initialization operation such as decompression and the like is not required to be performed on the installation file, and the initialization operation is performed by using the existing initialization task data capable of performing the cold start in the current running version, so that the application is firstly cold started, and then the initialization of the application is continued by using other initialization task data in the installation file. Therefore, according to the scheme of the embodiment of the invention, the processing result of the current running version which is already finished is fully utilized, the initialization task for cold start is stripped from the complete initialization task of the application and is finished as early as possible, the cold start time of the application during installation and upgrade is greatly shortened, the running performance of the application during version upgrade is improved, and the use experience of a user is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present invention, and it is also possible for a person skilled in the art to obtain other drawings based on the drawings.
FIG. 1 is a flowchart illustrating steps of a cold start method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a cold start method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a cold start method according to a third embodiment of the present invention;
fig. 4 is a block diagram of a cold start apparatus according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a cold start apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention shall fall within the scope of the protection of the embodiments of the present invention.
The following further describes specific implementation of the embodiments of the present invention with reference to the drawings.
Example one
Referring to fig. 1, a flowchart illustrating steps of a cold start method according to a first embodiment of the present invention is shown.
The cold start method of the embodiment comprises the following steps:
step S102: and receiving an application cold start instruction triggered by the version upgrading of the application.
Most applications trigger a cold start operation during version upgrade, so as to complete version upgrade and running of upgraded versions through cold start.
The instruction for triggering the cold start operation may be any appropriate instruction, that is, in the embodiment of the present invention, the application cold start instruction may be any appropriate instruction for instructing to perform application cold start.
Step S104: according to the application cold start instruction, first initialization task data in the current running version of the application and second initialization task data in the installation file for version upgrading are obtained.
In the embodiment of the invention, the initialization task of the application is decomposed into two parts, namely a first initialization task and a second initialization task, and correspondingly, the task data for realizing the initialization task is also decomposed into two parts, namely the first initialization task data and the second initialization task data. Wherein the first initialization task data enables at least a cold start of the application.
Since the initialization tasks corresponding to different applications may be different, the corresponding initialization task data may also be different. Therefore, in practical applications, the division of the first initialization task data and the second initialization task data may be appropriately divided by those skilled in the art according to actual needs, so that the first initialization task data therein can realize cold start of the application. Of course, the first initialization task data may also implement other initialization tasks than those required for cold start.
In addition, in the embodiment of the present invention, "first" and "second" are used only to distinguish different portions of the initialization task data, and do not indicate a timing or sequence relationship.
For example, the initialization tasks for upgrading the browser version of the Android system include downloading the installation files APK, decompressing the installation files APK, L oaddex file, security check, L oad So file, rendering engine initialization, and new WebView, among which the download installation files APK, decompressed installation files APK, and L oad Dex file may be decoupled from other initialization tasks, the download, decompressed installation files APK and L oad Dex may be used as a first initialization task, the security check, L oad So file, rendering engine initialization, and new WebView may be used as a second initialization task, and data corresponding to the two initialization tasks may be used as first initialization task data and second initialization task data, respectively.
In the embodiment of the invention, in order to improve the application cold start speed and efficiency, the first initialization task data in the current running version which can be successfully run is used for carrying out the cold start of the application. Meanwhile, the installation file for version upgrading can be processed in the background of the operating system, and second initialization task data in the installation file are obtained, so that continuous application initialization can be performed after cold start is successful.
Step S106: and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data.
As described above, the first initialization task data may at least implement cold start of the application, and after the application cold start is successful, the second initialization task data may be used to perform subsequent application initialization.
By means of the method and the device, initialization task data needed when the application is initialized is decomposed into two parts, so that when the application needs to be cold-started when the version upgrading needs to be carried out, initialization operation such as decompression and the like does not need to be carried out on the installation file, the initialization operation is carried out by using the existing initialization task data capable of being cold-started in the current running version, the application is cold-started firstly, and then initialization of the application is continued by using other initialization task data in the installation file. Therefore, according to the scheme of the embodiment, the processing result that the current running version is completed is fully utilized, the initialization task for cold start is stripped from the complete initialization task of the application and completed as early as possible, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
The cold start method of the present embodiment may be performed by any suitable electronic device having data processing capabilities, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, PCs, etc.
Example two
Referring to fig. 2, a flowchart illustrating steps of a cold start method according to a second embodiment of the present invention is shown.
The cold start method of the embodiment comprises the following steps:
step S202: and downloading an installation file for upgrading the version of the application.
In this embodiment, for example, the initialization task does not include downloading the installation file APK. Then, when the version of the application is upgraded, the new version of the installation file needs to be downloaded from the corresponding server. For many applications, after the installation file is downloaded, a cold start of the application may be triggered to implement or complete a version upgrade of the application.
Step S204: and receiving an application cold start instruction triggered by the version upgrading of the application.
The application cold start instruction may be any suitable instruction for instructing an application to perform cold start.
Step S206: according to the application cold start instruction, first initialization task data in the current running version of the application and second initialization task data in the installation file for version upgrading are obtained.
For each application to which the cold start scheme of the embodiment of the present invention is applied, the installation file of each version of the application is decomposed into the first initialization task data and the second initialization task data, and therefore, the current running version of the application and the installation file for version upgrade also include the first initialization task data and the second initialization task data.
The first initialization task data and the second initialization task data are obtained by decoupling all the applied initialization task data according to a set rule. Through the decoupling mode, the original function of the initialization task data is realized, and the independent use of the first initialization task data and the second initialization task data cannot influence each other.
In one possible approach, the setting rule includes: whether the task duration initialized by using the initialization task data is greater than the set duration or not, or whether the sequence of the task duration initialized by using the initialization task data meets the set sequence or not. The set duration and the set sequence may be appropriately set by those skilled in the art according to actual requirements, for example, the initialization task with the task duration longer than 10ms or 5ms is set to be classified as the first initialization task, or the initialization tasks with the first two bits and the first three bits of the task duration sequence are set to be classified as the first initialization task, and the like, which is not limited in the embodiment of the present invention. Regardless of the time length setting mode or the sequencing setting mode, the time-consuming initialization task in the initialization process can be effectively screened out, and the acceleration and optimization of cold start are effectively realized.
A complete initialization task for an application may include multiple portions, each having a different task duration, and those portions where the task duration is longer may be assigned to a first initialization task, e.g., the subtasks that order the task duration of the first and second may be assigned to the first initialization task, while the other portions of the initialization task may be assigned to the second initialization task. Correspondingly, data corresponding to the first initialization task in each version of the application is used as first initialization task data, and data corresponding to the second initialization task is used as second initialization task data.
When the first initialization task data and the second initialization task data are decoupled, a person skilled in the art may decouple in any appropriate manner according to actual needs, for example, decoupling in a design mode (such as an event-driven mode, a chain of responsibility mode, and the like), decoupling in an interface-oriented manner programming, decoupling in a high-cohesion programming manner, decoupling in a class-up-conversion or interface callback manner, decoupling in an adapter mode, and the like. Through decoupling, the first initialization task data and the second initialization task data with low coupling degree can be obtained, and preparation is made for cold starting by using existing data of the current running version when cold starting is triggered in subsequent version upgrading.
In a specific implementation manner, when the application is a browser application, the first initialization task data includes: decompressing task data of an installation file for version upgrading and task data for acquiring file information in the installation file; the second initialization task data includes: the system comprises task data used for carrying out security verification on the installation file, task data used for loading a dynamic link library in the installation file, task data used for initializing a browser kernel and task data used for generating a webpage view. For the browser application, when the browser application is initialized, the task of decompressing the installation file and the task of acquiring the file information in the installation file take longer time, so that the corresponding data can be classified as the first initialization task data, and the initialization and cold start processes are accelerated by utilizing the existing data of the current running version.
Optionally, the task data for acquiring the file information in the installation file is task data for loading a DEX file; the task data for loading the dynamic link library in the installation file comprises task data for loading an SO file.
In order to ensure smooth execution of the cold start, in one possible approach, the obtaining the first initialization task data in the current running version of the application according to the application cold start instruction may include: judging whether an installation file for version upgrading is decompressed or not according to the application cold start instruction; and if not, acquiring first initialization task data in the current running version of the application. This is because for some applications, the new version of the installation file may have been decompressed before the cold start, and at this point the first initialization task data in the new version of the installation file may be used without further use of the history data. However, if the installation file of the new version is not decompressed, the cold start is performed through the first initialization task data of the current running version by using the historical data.
Further optionally, if not decompressed, the obtaining the first initialization task data in the current running version of the application may include: if not, judging whether the current running version has decompressed initialization task data or not; if the first initialization task data exists, first initialization task data in the current running version are obtained; and if the installation file does not exist, carrying out decompression operation on the installation file. Therefore, the first initialization task data is ensured to be available for cold start, and cold start failure or abnormal application running is avoided.
And the second initialization task data may be obtained from the installation file for the version upgrade.
Through the steps, the acquisition of the first initialization task data for cold start and the acquisition of the second initialization task data for subsequent continuous initialization are realized, namely, the smooth cold start of the application is ensured, and the complete initialization process of the application is also effectively ensured.
Step S208: and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data.
For example, taking the installation and upgrade of the browser of the Android system as an example, the cold start may be performed by using the data required by the existing decompression installation packages APK and L oaddex in the current running version, and after the cold start is successful, the initialization of the browser is performed by using the security check in the installation file of the new version, L oad So, the engine initialization, and the data connection required by new WebView.
And after the initialization of the application is completely finished, the application can be normally operated. Meanwhile, the installation file can be correspondingly processed in the background of the operating system, so that the initialization task data in the installation file is used for cold starting and initialization when the next application is in cold starting.
By means of the method and the device, initialization task data needed when the application is initialized is decomposed into two parts, so that when the application needs to be cold-started when the version upgrading needs to be carried out, initialization operation such as decompression and the like does not need to be carried out on the installation file, the initialization operation is carried out by using the existing initialization task data capable of being cold-started in the current running version, the application is cold-started firstly, and then initialization of the application is continued by using other initialization task data in the installation file. Therefore, according to the scheme of the embodiment, the processing result that the current running version is completed is fully utilized, the initialization task for cold start is stripped from the complete initialization task of the application and completed as early as possible, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
The cold start method of the present embodiment may be performed by any suitable electronic device having data processing capabilities, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, PCs, etc.
EXAMPLE III
Referring to fig. 3, a flowchart illustrating steps of a cold start method according to a third embodiment of the present invention is shown.
The embodiment of the invention describes a cold start method by taking version upgrade of a browser based on an Android system as an example.
The cold start method of the embodiment comprises the following steps:
step S302: and receiving an application cold start instruction.
In this embodiment, the trigger reasons of the application cold start instruction are not distinguished, and the application cold start instruction may be a cold start instruction triggered by version upgrade of a browser, or may be a cold start instruction triggered by other reasons, for example, a cold start instruction triggered by rebooting an electronic device.
Step S304: checking whether the browser kernel in the browser installation file of the new version is decompressed; if not, go to step S306; if the decompression is already performed, step S314 is performed.
And the new version of the browser installation file is the installation file for upgrading the browser version. In this embodiment, the browser installation file with the new version set is downloaded, but it should be understood by those skilled in the art that in some applications, the new version of the installation package APK may also be dynamically downloaded, and the dynamic download may also be part of the application initialization task.
Step S306: checking whether a decompressed browser kernel exists in the current running version; if yes, the decompressed browser kernel is used for cold start, and then the step S308 is executed; if not, go to step S310.
Generally, the browser kernel in the current running version is a browser kernel which can already run normally, and it can be considered that if the browser kernel is decompressed, L oad Dex operation should be performed.
In this embodiment, the two initialization tasks of decompression and L oad Dex are stripped from the initialization process of version upgrade and completed as early as possible, so that the decompression and L oad Dex performance consumption of the browser kernel in the initialization process is reduced, and the cold start process is accelerated.
And S308, using the browser installation file of the new version to perform security verification, L oad So, initializing a rendering engine and ending the initialization process of the new WebView.
Namely, the second initialization task is executed by using the corresponding second initialization task data in the new version of the browser installation file, so that the initialization process of the browser is completely completed.
Step S310, decompressing the browser installation file of the new version and L oad Dex.
When there is no historical browser kernel data available, the new version of the browser installation file needs to be decompressed and L oad Dex to perform a cold start with the new version of the browser kernel data.
Step S312: and using the browser kernel with the new version for cold start and initialization. And ending the cold starting process.
Step S314, checking whether the browser kernel of the new version is L oad Dex, if yes, executing the step S312, and if not, executing the step S316.
If the new version of the browser kernel is already decompressed, it means that the new version of the browser kernel can be used for cold start, and at this time, it needs to be further checked to confirm whether the new version of the browser kernel is already L oad Dex.
And step S316, carrying out L oad Dex operation on the browser kernel of the new version, and then, executing the step S312.
According to the embodiment, except for brand new installation, the performance consumption of decompression and L oad Dex is completely avoided in the initialization process, decompression and L oadDex are hardly needed in the cold starting process of the browser, the average time consumption of 539 starting including complete decompression and L oadDex in the traditional cold starting process is about 6700ms, the average time consumption of 539 starting after decompression and 2 oadDex is reduced by about 400ms, and the performance consumption is reduced by 16.75 times.
Therefore, through the embodiment, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
The cold start method of the present embodiment may be performed by any suitable electronic device having data processing capabilities, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, PCs, etc.
Example four
Referring to fig. 4, a block diagram of a cold start apparatus according to a fourth embodiment of the present invention is shown.
The cold start apparatus of the present embodiment includes: a receiving module 402, configured to receive an application cold start instruction triggered by version upgrade of an application; an obtaining module 404, configured to obtain, according to the instruction, first initialization task data in a current running version of the application and second initialization task data in an installation file for version upgrade; a cold start module 406, configured to perform cold start of the application by using the first initialization task data, and continue to perform initialization of the application by using the second initialization task data after the cold start is successful.
By means of the method and the device, initialization task data needed when the application is initialized is decomposed into two parts, so that when the application needs to be cold-started when the version upgrading needs to be carried out, initialization operation such as decompression and the like does not need to be carried out on the installation file, the initialization operation is carried out by using the existing initialization task data capable of being cold-started in the current running version, the application is cold-started firstly, and then initialization of the application is continued by using other initialization task data in the installation file. Therefore, according to the scheme of the embodiment, the processing result that the current running version is completed is fully utilized, the initialization task for cold start is stripped from the complete initialization task of the application and completed as early as possible, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
EXAMPLE five
Referring to fig. 5, a block diagram of a cold start apparatus according to a fifth embodiment of the present invention is shown.
The cold start apparatus of the present embodiment includes: a receiving module 502, configured to receive an application cold start instruction triggered by version upgrade of an application; an obtaining module 504, configured to obtain, according to the instruction, first initialization task data in a current running version of the application and second initialization task data in an installation file for version upgrade; a cold start module 506, configured to perform cold start of the application by using the first initialization task data, and continue to perform initialization of the application by using the second initialization task data after the cold start is successful.
Optionally, the current running version of the application and the installation file for version upgrade both include first initialization task data and second initialization task data, where the first initialization task data and the second initialization task data are obtained by decoupling all initialization task data of the application according to a set rule.
Optionally, the setting rule includes: whether the task duration initialized by using the initialization task data is greater than the set duration or not, or whether the sequence of the task duration meets the set sequence or not.
Optionally, the application is a browser application; the first initialization task data includes: decompressing task data of the installation file and task data of file information in the installation file; the second initialization task data includes: the system comprises task data used for carrying out security verification on the installation file, task data used for loading a dynamic link library in the installation file, task data used for initializing a browser kernel and task data used for generating a webpage view.
Optionally, the task data for acquiring the file information in the installation file is task data for loading a DEX file; the task data for loading the dynamic link library in the installation file comprises task data for loading an SO file.
Optionally, the obtaining module 504 includes: a determining module 5042, configured to determine whether the installation file for the version upgrade has been decompressed according to the instruction; an executing module 5044, configured to obtain the first initialization task data in the current running version of the application if the determination result of the determining module 5042 is that the first initialization task data is not decompressed.
Optionally, the executing module 5044 is configured to determine whether the current running version has decompressed initialization task data if the current running version is not decompressed; if yes, acquiring first initialization task data in the current running version; and if the installation file does not exist, carrying out decompression operation on the installation file.
The cold start device of this embodiment is used to implement the corresponding cold start method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the cold start device of this embodiment can refer to the description of the corresponding part in the foregoing method embodiments, and is not repeated herein.
EXAMPLE six
Referring to fig. 6, a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 6, the electronic device may include: a processor (processor)602, a communication Interface 604, a memory 606, and a communication bus 608.
Wherein:
the processor 602, communication interface 604, and memory 606 communicate with one another via a communication bus 608.
A communication interface 604 for communicating with other electronic devices or servers.
The processor 602 is configured to execute the program 610, and may specifically perform relevant steps in the cold start method embodiment described above.
In particular, program 610 may include program code comprising computer operating instructions.
The processor 602 may be a central processing unit CPU or an application specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The intelligent device comprises one or more processors which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 606 for storing a program 610. Memory 606 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may specifically be configured to cause the processor 602 to perform the following operations: receiving an application cold start instruction triggered by version upgrading of an application; acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction; and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data.
In an optional implementation manner, the current running version of the application and the installation file for version upgrade both include first initialization task data and second initialization task data, where the first initialization task data and the second initialization task data are obtained by decoupling all initialization task data of the application according to a set rule.
In an alternative embodiment, the setting rule includes: whether the task duration initialized by using the initialization task data is greater than the set duration or not, or whether the sequence of the task duration meets the set sequence or not.
In an alternative embodiment, the application is a browser application; the first initialization task data includes: decompressing task data of the installation file and task data of file information in the installation file; the second initialization task data includes: the system comprises task data used for carrying out security verification on the installation file, task data used for loading a dynamic link library in the installation file, task data used for initializing a browser kernel and task data used for generating a webpage view.
In an optional implementation manner, the task data for acquiring the file information in the installation file is task data for loading a DEX file; the task data for loading the dynamic link library in the installation file comprises task data for loading an SO file.
In an optional implementation manner, the program 610 is further configured to enable the processor 602, when acquiring the first initialization task data in the current running version of the application according to the instruction, to determine whether an installation file for the version upgrade has been decompressed according to the instruction; and if not, acquiring first initialization task data in the current running version of the application.
In an optional implementation manner, the program 610 is further configured to enable the processor 602, when the first initialization task data in the current running version of the application is acquired if the first initialization task data is not decompressed, determine whether the decompressed initialization task data exists in the current running version if the first initialization task data is not decompressed; if yes, acquiring first initialization task data in the current running version; and if the installation file does not exist, carrying out decompression operation on the installation file.
For specific implementation of each step in the program 610, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing embodiments of the cold start method, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
By means of the electronic device, initialization task data required when the application is initialized is decomposed into two parts, so that when cold start is required when version upgrade of the application is performed, initialization operation such as decompression and the like is not required to be performed on an installation file first, and initialization operation is performed by using existing initialization task data capable of performing cold start in a current running version, so that the application is cold started first, and then initialization of the application is continued by using other initialization task data in the installation file. Therefore, according to the scheme of the embodiment, the processing result that the current running version is completed is fully utilized, the initialization task for cold start is stripped from the complete initialization task of the application and completed as early as possible, the cold start time of the application during installation and upgrading is greatly shortened, the running performance of the application during version upgrading is improved, and the use experience of a user is effectively improved.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present invention may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present invention.
The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the cold start method described herein. Further, when a general-purpose computer accesses code for implementing the cold boot method illustrated herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the cold boot method illustrated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The above embodiments are only for illustrating the embodiments of the present invention and not for limiting the embodiments of the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also belong to the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.
Claims (16)
1. A cold start method, comprising:
receiving an application cold start instruction triggered by version upgrading of an application;
acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction;
and performing cold start of the application by using the first initialization task data, and after the cold start is successful, continuing to perform initialization of the application by using the second initialization task data.
2. The method of claim 1, wherein the currently running version of the application and the installation file for the version upgrade each include first initialization task data and second initialization task data, wherein the first initialization task data and the second initialization task data are obtained by decoupling all initialization task data of the application according to a set rule.
3. The method of claim 2, wherein the setting a rule comprises: whether the task duration initialized by using the initialization task data is greater than the set duration or not, or whether the sequence of the task duration meets the set sequence or not.
4. The method of claims 1-3, wherein the application is a browser application; the first initialization task data includes: decompressing task data of the installation file and task data of file information in the installation file; the second initialization task data includes: the system comprises task data used for carrying out security verification on the installation file, task data used for loading a dynamic link library in the installation file, task data used for initializing a browser kernel and task data used for generating a webpage view.
5. The method according to claim 4, wherein the task data for acquiring the file information in the installation file is task data for loading a DEX file; the task data for loading the dynamic link library in the installation file comprises task data for loading an SO file.
6. The method of any of claims 1-3, wherein the obtaining first initialization task data in a currently running version of the application in accordance with the instructions comprises:
judging whether the installation file for the version upgrading is decompressed or not according to the instruction;
and if not, acquiring first initialization task data in the current running version of the application.
7. The method of claim 6, wherein the obtaining first initialization task data in the current running version of the application if not decompressed comprises:
if not, judging whether the current running version has decompressed initialization task data or not;
if yes, acquiring first initialization task data in the current running version;
and if the installation file does not exist, carrying out decompression operation on the installation file.
8. A cold start apparatus comprising:
the receiving module is used for receiving an application cold start instruction triggered by version upgrading of the application;
the acquisition module is used for acquiring first initialization task data in the current running version of the application and second initialization task data in an installation file for version upgrading according to the instruction;
and the cold start module is used for performing cold start on the application by using the first initialization task data, and continuing to perform initialization on the application by using the second initialization task data after the cold start is successful.
9. The apparatus of claim 8, wherein the currently running version of the application and the installation file for the version upgrade each include first initialization task data and second initialization task data, wherein the first initialization task data and the second initialization task data are obtained by decoupling all initialization task data of the application according to a set rule.
10. The apparatus of claim 9, wherein the setting a rule comprises: whether the task duration initialized by using the initialization task data is greater than the set duration or not, or whether the sequence of the task duration meets the set sequence or not.
11. The apparatus of claims 8-10, wherein the application is a browser application; the first initialization task data includes: decompressing task data of the installation file and task data of file information in the installation file; the second initialization task data includes: the system comprises task data used for carrying out security verification on the installation file, task data used for loading a dynamic link library in the installation file, task data used for initializing a browser kernel and task data used for generating a webpage view.
12. The apparatus according to claim 11, wherein the task data for acquiring the file information in the installation file is task data for loading a DEX file; the task data for loading the dynamic link library in the installation file comprises task data for loading an SO file.
13. The apparatus of any of claims 8-10, wherein the means for obtaining comprises:
the judging module is used for judging whether the installation file for version upgrading is decompressed or not according to the instruction;
and the execution module is used for acquiring the first initialization task data in the current running version of the application if the judgment result of the judgment module is not decompressed.
14. The apparatus according to claim 13, wherein the execution module is configured to determine whether decompressed initialization task data exists in a current running version if the current running version is not decompressed; if yes, acquiring first initialization task data in the current running version; and if the installation file does not exist, carrying out decompression operation on the installation file.
15. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the cold boot method according to any one of claims 1-7.
16. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the cold start method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910063709.9A CN111475220B (en) | 2019-01-23 | 2019-01-23 | Cold start method and device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910063709.9A CN111475220B (en) | 2019-01-23 | 2019-01-23 | Cold start method and device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111475220A true CN111475220A (en) | 2020-07-31 |
CN111475220B CN111475220B (en) | 2023-04-25 |
Family
ID=71743285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910063709.9A Active CN111475220B (en) | 2019-01-23 | 2019-01-23 | Cold start method and device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111475220B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113485709A (en) * | 2021-06-15 | 2021-10-08 | 荣耀终端有限公司 | Application optimization method and device and electronic equipment |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030188147A1 (en) * | 2002-04-01 | 2003-10-02 | Shung-Tang Hsu | Method for downsizing a computer operating system |
US7080371B1 (en) * | 1998-03-03 | 2006-07-18 | Siebel Systems, Inc. | Method, system, apparatus and program product for distribution and instantiation of software upgrades |
CN101008901A (en) * | 2007-01-31 | 2007-08-01 | 华为技术有限公司 | Method and system for implementing dynamic upgrade of application system |
CN101482823A (en) * | 2009-01-19 | 2009-07-15 | 中兴通讯股份有限公司 | Single board application version implementing method and system |
DE102013210505A1 (en) * | 2012-06-14 | 2013-12-19 | GM Global Technology Operations LLC (n. d. Gesetzen des Staates Delaware) | Method for the cold start of an internal combustion engine in hybrid applications |
CN103559059A (en) * | 2013-11-05 | 2014-02-05 | 广东新支点技术服务有限公司 | Quick medium-free upgrading method for Linux system |
CN104572162A (en) * | 2014-03-21 | 2015-04-29 | 中电科技(北京)有限公司 | UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Loongson handheld computer |
WO2015127730A1 (en) * | 2014-02-27 | 2015-09-03 | 中兴通讯股份有限公司 | Method and apparatus for running version file |
WO2016058350A1 (en) * | 2014-10-17 | 2016-04-21 | 中兴通讯股份有限公司 | Base station software version management method and device |
CN107239295A (en) * | 2016-03-29 | 2017-10-10 | 腾讯科技(深圳)有限公司 | The method and software updating apparatus of a kind of software upgrading |
CN107368560A (en) * | 2017-07-07 | 2017-11-21 | 腾讯科技(深圳)有限公司 | Method for implementing page and device, the computer-readable recording medium of Mobile solution |
CN107844306A (en) * | 2017-08-09 | 2018-03-27 | 平安壹钱包电子商务有限公司 | Restorative procedure, device, storage medium and the terminal of application program |
CN108810004A (en) * | 2018-06-22 | 2018-11-13 | 西安电子科技大学 | More authorization center access control methods, cloud storage system can be revoked based on agency |
CN109151850A (en) * | 2017-06-19 | 2019-01-04 | 中兴通讯股份有限公司 | Base station software upgrade method, device, base station and computer readable storage medium |
-
2019
- 2019-01-23 CN CN201910063709.9A patent/CN111475220B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7080371B1 (en) * | 1998-03-03 | 2006-07-18 | Siebel Systems, Inc. | Method, system, apparatus and program product for distribution and instantiation of software upgrades |
US20030188147A1 (en) * | 2002-04-01 | 2003-10-02 | Shung-Tang Hsu | Method for downsizing a computer operating system |
CN101008901A (en) * | 2007-01-31 | 2007-08-01 | 华为技术有限公司 | Method and system for implementing dynamic upgrade of application system |
CN101482823A (en) * | 2009-01-19 | 2009-07-15 | 中兴通讯股份有限公司 | Single board application version implementing method and system |
DE102013210505A1 (en) * | 2012-06-14 | 2013-12-19 | GM Global Technology Operations LLC (n. d. Gesetzen des Staates Delaware) | Method for the cold start of an internal combustion engine in hybrid applications |
CN103559059A (en) * | 2013-11-05 | 2014-02-05 | 广东新支点技术服务有限公司 | Quick medium-free upgrading method for Linux system |
WO2015127730A1 (en) * | 2014-02-27 | 2015-09-03 | 中兴通讯股份有限公司 | Method and apparatus for running version file |
CN104572162A (en) * | 2014-03-21 | 2015-04-29 | 中电科技(北京)有限公司 | UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Loongson handheld computer |
WO2016058350A1 (en) * | 2014-10-17 | 2016-04-21 | 中兴通讯股份有限公司 | Base station software version management method and device |
CN107239295A (en) * | 2016-03-29 | 2017-10-10 | 腾讯科技(深圳)有限公司 | The method and software updating apparatus of a kind of software upgrading |
CN109151850A (en) * | 2017-06-19 | 2019-01-04 | 中兴通讯股份有限公司 | Base station software upgrade method, device, base station and computer readable storage medium |
CN107368560A (en) * | 2017-07-07 | 2017-11-21 | 腾讯科技(深圳)有限公司 | Method for implementing page and device, the computer-readable recording medium of Mobile solution |
CN107844306A (en) * | 2017-08-09 | 2018-03-27 | 平安壹钱包电子商务有限公司 | Restorative procedure, device, storage medium and the terminal of application program |
CN108810004A (en) * | 2018-06-22 | 2018-11-13 | 西安电子科技大学 | More authorization center access control methods, cloud storage system can be revoked based on agency |
Non-Patent Citations (1)
Title |
---|
佚名: "SkyTraq推出GLONASS/GPS整合接收芯片" * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113485709A (en) * | 2021-06-15 | 2021-10-08 | 荣耀终端有限公司 | Application optimization method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111475220B (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9678767B2 (en) | Unified extensible firmware interface (UEFI) driver and protocol | |
CN111427596B (en) | Software upgrading method and device and terminal equipment | |
CN109933350B (en) | Method and device for embedding codes in application and electronic equipment | |
CN107844306B (en) | Application program repairing method and device, storage medium and terminal | |
CN113849272A (en) | Method and device for adding GPU (graphics processing Unit) resources in virtual machine | |
CN104598267A (en) | Application calling method and device | |
CN111552517B (en) | Application program starting method and device, electronic equipment and computer storage medium | |
CN114253619A (en) | SSD multi-level Boot method and device, computer equipment and storage medium | |
WO2019237239A1 (en) | Data test method and apparatus, device/terminal/server and computer readable storage medium | |
CN111475220B (en) | Cold start method and device, electronic equipment and computer storage medium | |
CN113396391B (en) | Application program starting method and device, electronic equipment and storage medium | |
CN110990116A (en) | Method, device and system for transmitting data between intelligent network card and virtual machine | |
CN115934203A (en) | Dynamic so loading method, storage medium and electronic equipment | |
CN110045966A (en) | Processing method, device and the equipment of erector | |
CN114296747A (en) | Installation method and device of software installation package | |
CN113010195B (en) | System upgrading method, storage medium and terminal equipment | |
CN111857729A (en) | Network card drive compiling method and device, computer equipment and storage medium | |
CN109739565B (en) | Method and device for ensuring normal operation of Bootrom, computer equipment and storage medium | |
CN109213503B (en) | Method and device for acquiring permission of IoT (Internet of things) equipment, storage medium and electronic device | |
CN109408063B (en) | Instruction pile inserting method and device based on virtual machine | |
CN108804144B (en) | Control method/system for starting operating system, storage medium and electronic equipment | |
CN109428936B (en) | APP upgrading method, device, system, electronic equipment and storage medium | |
CN110806876A (en) | Slitaz-based lightweight Linux system customization method, device computer equipment and storage medium | |
CN112015436A (en) | Short message platform deployment method and device, computing equipment and computer storage medium | |
CN113656322B (en) | Data processing method, device, electronic equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |