CN115658185A - Method and device for quickly starting cloud application, storage medium and electronic equipment - Google Patents

Method and device for quickly starting cloud application, storage medium and electronic equipment Download PDF

Info

Publication number
CN115658185A
CN115658185A CN202211702336.3A CN202211702336A CN115658185A CN 115658185 A CN115658185 A CN 115658185A CN 202211702336 A CN202211702336 A CN 202211702336A CN 115658185 A CN115658185 A CN 115658185A
Authority
CN
China
Prior art keywords
executable file
cloud application
file
class loader
executable
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
Application number
CN202211702336.3A
Other languages
Chinese (zh)
Other versions
CN115658185B (en
Inventor
齐永前
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Haima Cloud Technology Co ltd
Original Assignee
Beijing Haiyudongxiang Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Haiyudongxiang Technology Co ltd filed Critical Beijing Haiyudongxiang Technology Co ltd
Priority to CN202211702336.3A priority Critical patent/CN115658185B/en
Publication of CN115658185A publication Critical patent/CN115658185A/en
Application granted granted Critical
Publication of CN115658185B publication Critical patent/CN115658185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The method can be used for carrying out memory loading and inverse flattening processing on the executable files contained in the installation package of the cloud application through threads in a preset thread pool when the executable files are loaded by a class loader, and sending a first notification message to the class loader after the executable files are processed to indicate that the loading of the executable files is finished. The method and the device have the advantages that the first executable file is processed through the class loader in an inverse flattening mode and is loaded into the memory, the first executable file is an elf file which is generated in the optimized dex2oat compiling process and is irrelevant to a system, the generated elf file is irrelevant to the system, compatibility is high, meanwhile, the processing time of the dex2oat compiling process can be effectively shortened, and the starting speed of the cloud application is improved.

Description

Method and device for quickly starting cloud application, storage medium and electronic equipment
Technical Field
The application relates to the technical field of cloud computing, in particular to a method and device for quickly starting cloud application, a storage medium and electronic equipment.
Background
With the development of science and technology, cloud application is widely applied. The cloud application is installed and started on the cloud server, so that the user terminal can enjoy the relevant cloud application service by obtaining the plug-flow picture of the cloud server only by sending a simple operation instruction to the cloud server.
In order to utilize the instance resources of the cloud server to the maximum extent, the cloud application is usually installed and started in real time on the instance, that is, when the instance resources provide services for different user terminals, the cloud applications installed on the instance resources are often different, and it is very important to realize the quick installation and start of the cloud application in order to meet the service requirements of different user terminals.
At present, installation packages of many applications are large, android of an example has a limit on the number of dex files (a file type of an executable file on an Android platform) in an installation package apk, and generally, the application apk breaks through the limit by using a multiple dex technology of Google. Taking a certain social software as an example, the installation package is about 400MB, and is split into 30 dex files. For a normal installation process, work of dex2oat (which is an English full name of dalvik explicit file to optimized file and is a program for compiling and optimizing a dex file under an android system) is performed during installation, and partial byte codes of the dex file are converted into machine codes which can be executed and run by a virtual machine in advance by the action, so that the running efficiency is improved. However, this work is very time consuming, and normally installing one piece of this social software can take more than 1 minute, which is not acceptable in a cloud application scenario. The dex2 at procedure is deleted during the installation of the cloud application, but the delete of the dex2 at has the consequence that the cloud application is time-consuming to start.
In view of the above, how to provide a scheme to increase the starting speed of the cloud application is a technical problem to be solved urgently.
Disclosure of Invention
In view of the foregoing problems, the present application provides a method and an apparatus for quickly starting a cloud application, a storage medium, and an electronic device, so as to improve a starting speed of the cloud application.
In a first aspect, an embodiment of the present application provides a method for quickly starting a cloud application, which is applicable to a cloud server, and the method includes the following steps:
when a class loader loads an executable file, performing memory loading and inverse flattening processing on the executable file contained in an installation package of a cloud application through threads in a preset thread pool, and sending a first notification message to the class loader after the executable file is processed, wherein the number of the threads is greater than 1, the threads process the executable file in a parallel processing mode, and the first notification message is used for indicating that the loading of the executable file is completed; and/or
When a class loader loads an executable file, sending a second notification message to the class loader to enable the class loader to inversely process a first executable file and load the processed first executable file into a memory, wherein the second notification message is used for indicating that the first executable file is legal, the first executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to a cloud application is installed, and the optimized dex2oat compiling process generates an elf file irrelevant to a system.
In a second aspect, an embodiment of the present application further provides a device for quickly starting a cloud application, which is applicable to a cloud server, and includes:
the processing module is used for performing memory loading and inverse flattening processing on an executable file contained in an installation package of a cloud application through threads in a preset thread pool when the executable file is loaded by a class loader, and sending a first notification message to the class loader after the executable file is processed, wherein the number of the threads is greater than 1, the threads process the executable file in a parallel processing mode, and the first notification message is used for indicating that the loading of the executable file is completed; and/or
The sending module is configured to send a second notification message to the class loader when the class loader loads an executable file, so that the class loader inversely flattens the first executable file and loads the processed first executable file into the memory, where the second notification message is used to indicate that the first executable file is legal, the first executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to a cloud application is installed, and the optimized dex2oat compiling process generates an elf file unrelated to a system.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for quickly starting a cloud application are performed.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including: the cloud application quick start system comprises a processor, a storage medium and a bus, wherein the storage medium stores machine readable instructions executable by the processor, when an electronic device runs, the processor and the storage medium are communicated through the bus, and the processor executes the machine readable instructions to execute the steps of the cloud application quick start method.
Compared with the prior art, the method, the device, the storage medium and the electronic device for quickly starting the cloud application provided by the embodiment of the application provide two loading optimization schemes: in the first scheme, memory loading and inverse flattening processing are performed on executable files contained in an installation package of the cloud application through threads in a preset thread pool, a first notification message is sent to the class loader after the executable files are processed, the executable files are indicated to be loaded completely, and due to the fact that the executable files in the installation package of the cloud application are processed in parallel through the multiple threads, compared with a serial processing mode that the class loader loads the executable files to the memory one by one, loading efficiency of the executable files can be greatly improved, and starting speed of the cloud application is further improved. In the second scheme, when the executable file is loaded by the class loader, a second notification message is sent to the class loader to indicate that the first executable file is legal, and under the condition, the class loader performs inverse flattening processing on the first executable file and loads the processed first executable file into the memory.
The above description of the present invention is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clearly understood by those skilled in the art, the present invention may be further implemented according to the content described in the text and drawings of the present application, and in order to make the above objects, other objects, features, and advantages of the present application more easily understood, the following description is made in conjunction with the detailed description of the present application and the drawings.
Drawings
The drawings are only for purposes of illustrating the principles, implementations, applications, features, and effects of particular embodiments of the application, as well as others related thereto, and are not to be construed as limiting the application.
In the drawings of the specification:
fig. 1 is a flowchart of a method for quickly starting a cloud application according to a first exemplary embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario of a method for quickly starting a cloud application according to a first exemplary embodiment of the present application;
fig. 3 is a flowchart of a method for quickly starting a cloud application according to a second exemplary embodiment of the present application;
fig. 4 is a flowchart of a method for quickly starting a cloud application according to a third exemplary embodiment of the present application;
fig. 5 is a block diagram illustrating an apparatus for fast starting a cloud application according to a first exemplary embodiment of the present application;
fig. 6 is a block diagram illustrating an apparatus for fast starting a cloud application according to a second exemplary embodiment of the present application;
fig. 7 is a block diagram illustrating an apparatus for fast starting a cloud application according to a third exemplary embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
In order to explain in detail possible application scenarios, technical principles, practical embodiments, and the like of the present application, the following detailed description is given with reference to the accompanying drawings in conjunction with the listed embodiments. The embodiments described herein are only used for clearly illustrating the technical solutions of the present application, and therefore are only used as examples, and the scope of the present application is not limited thereby.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or related to other embodiments specifically defined. In principle, in the present application, the technical features mentioned in the embodiments can be combined in any manner to form a corresponding implementable solution as long as there is no technical contradiction or conflict.
Unless defined otherwise, technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the use of relational terms herein is intended only to describe particular embodiments and is not intended to limit the present application.
In the description of the present application, the term "and/or" is a expression for describing a logical relationship between objects, indicating that three relationships may exist, for example, a and/or B, indicating that: there are three cases of A, B, and both A and B. In addition, the character "/" herein generally indicates that the former and latter associated objects are in a logical relationship of "or".
In this application, terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations.
Without further limitation, in this application, the use of "including," "comprising," "having," or other similar open-ended expressions in phrases and expressions of "including," "comprising," or other similar expressions, is intended to encompass a non-exclusive inclusion, and such expressions do not exclude the presence of additional elements in a process, method, or article that includes the recited elements, such that a process, method, or article that includes a list of elements may include not only those elements but also other elements not expressly listed or inherent to such process, method, or article.
As is understood in the examination of the guidelines, the terms "greater than", "less than", "more than" and the like in this application are to be understood as excluding the number; the expressions "above", "below", "within" and the like are understood to include the present numbers. In addition, in the description of the embodiments of the present application, "a plurality" means two or more (including two), and expressions related to "a plurality" similar thereto are also understood, for example, "a plurality of groups", "a plurality of times", and the like, unless specifically defined otherwise.
In a first aspect, please refer to fig. 1, which is a flowchart of a method for quickly starting a cloud application according to a first exemplary embodiment of the present application. The method is suitable for the cloud server and comprises the following steps:
firstly, entering a step S101, when a class loader loads an executable file, performing memory loading and inverse flattening processing on the executable file contained in an installation package of the cloud application through a thread in a preset thread pool;
and then step S102 is carried out, and a first notification message is sent to the class loader after the executable file is processed.
In this embodiment, the number of the threads is greater than 1, the threads process the executable file in a parallel processing manner, and the first notification message is used to indicate that the loading of the executable file is completed. Therefore, when the installation package of the cloud application comprises a plurality of executable files, compared with a mode that a class loader adopts serial processing and loads the executable files to the memory one by one, the method adopts a multi-thread parallel processing mode to realize synchronous memory loading and non-flat processing of the executable files, can effectively improve the loading and processing efficiency of the executable files, and further improves the starting speed of the cloud application.
On the basis of the foregoing method embodiment, before the memory loading and the inverse flattening processing are performed on the executable file included in the installation package of the cloud application by using the thread in the preset thread pool, the method further includes:
and placing the information of the executable file contained in the installation package of the cloud application to the thread pool, wherein the thread carries out memory loading and inverse flattening processing on the executable file according to the information.
In this embodiment, the information of the executable file may be the identifier of the executable file, so that each thread in the thread pool may read the corresponding executable file to perform memory loading and inverse flattening processing according to the identifier of each executable file, thereby enabling the processing of the executable files to be performed in parallel, and improving the loading and processing efficiency.
As shown in fig. 2, the thread pool includes a first thread, a second thread to an nth thread, the cloud application installation package includes executable file 1, executable file 2 to executable file n, when the allocation thread performs memory loading and inverse flattening processing on the executable file included in the installation package of the cloud application, the first thread may decompress the executable file 1 from the installation package of the cloud application into the memory and perform inverse flattening processing, the second thread decompresses the executable file 2 from the installation package of the cloud application into the memory and perform inverse flattening processing, and so on, the nth thread decompresses the executable file n from the installation package of the cloud application into the memory and performs inverse flattening processing, and after all executable files required to perform memory loading and inverse flattening processing are processed, a first notification message is sent to the class loader to indicate that the executable file loading is completed, so that the cloud application can be started.
Of course, in other embodiments, the number of threads included in the thread pool may be smaller than the number of executable files included in the cloud application installation package, and in this case, if any one thread completes the memory loading and the inverse flattening processing of a certain identified executable file first, the thread may decompress a next identified executable file from the cloud application installation package into the memory according to the processing sequence and perform the inverse flattening processing until all executable files are loaded and processed, so as to improve the processing efficiency.
Assuming that the number of threads contained in the thread pool is 8,8 threads are sequentially marked as threads a-H, the number of executable files contained in the installation package of the cloud application is 20, and the executable files are respectively marked as 1-20 according to the processing sequence, the threads a-H sequentially process the executable files with the processing sequence marked as 1-20 according to the processing sequence, specifically, the thread a loads the executable file with the marking 1 into the memory and performs inverse flattening processing, the thread B loads the executable file with the marking 2 into the memory and performs inverse flattening processing, and so on, the thread H loads the executable file with the marking 8 into the memory and performs inverse flattening processing. In each thread processing process, if any one thread finishes the memory loading and the inverse flattening processing of the corresponding executable file first, the thread can load the next executable file from an installation package of the cloud application into the memory and carry out the inverse flattening processing, until all 20 executable files are loaded into the memory and the inverse flattening processing is finished, a first notification message is sent to the class loader to indicate that the executable files are loaded completely, and the cloud application can be started.
On the basis of the foregoing method embodiment, the first notification message carries a sequence of the completion of processing the executable file. Therefore, the class loader can acquire corresponding class files (class files are contained in the executable files) according to the processing sequence of the executable files, and further complete the quick start of the cloud application.
On the basis of the method embodiment, the number of the threads is the same as or half of the number of the CPU cores corresponding to the current instance. When the number of the threads is the same as that of the CPU cores corresponding to the current instance, it can be ensured that all the CPU cores are put into tasks of memory loading and inverse flattening processing of the executable file in the cloud application starting process, and the processing speed can be effectively improved. When the number of the threads is half of the number of the CPU cores corresponding to the current instance, the remaining half of the CPU cores can be ensured to be capable of coping with other processing tasks at any time except for tasks of using half of the CPU cores to perform memory loading and inverse flattening processing of the executable file in the current instance, and the processing performance is improved.
Referring to fig. 3, a flowchart of a method for quickly starting a cloud application according to a second exemplary embodiment of the present application is shown, where the method includes the following steps:
step S301 is entered, when the executable file is loaded by the class loader, a second notification message is sent to the class loader, so that the class loader inversely flattens the first executable file, and the processed first executable file is loaded into the memory.
In this embodiment, the second notification message is used to indicate that the first Executable file is legal, the first Executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to the cloud application is installed, and the optimized dex2oat compiling process generates an elf (english-called Executable and Linking Format, which is a Format of an object file) file that is irrelevant to the system.
Taking the first executable file as an elf file as an example, the installation of a normal Android application goes through a dex2 at process, which compiles a dex bytecode into a local machine code or performs some other work in compilation optimization to generate an at file. However, this optimization is time consuming, often on the order of minutes, which is unacceptable for cloud applications, and so this step is eliminated during installation of the cloud application, but the consequence of this elimination is that the application start-up time becomes longer, especially for some applications using multiDex. And the cloud application needs to be installed immediately, and needs to provide experience similar to or better than that of a local mobile phone, and if the step needs to be performed, the fast start is completed through other optimization on dex. Therefore, before the class loader is loaded, the dex2oat compiling process needs to be optimized, only elf files irrelevant to the system are generated, the files are irrelevant to a platform and other codes, the elf files can be placed on a cloud server in advance, when the class loader ClassLoader of the cloud application loads an executable file, whether the oat files exist or not and whether the oat files are legal or not are checked, at the moment, the ClassLoader is told that the elf files meet custom specifications and are legal elfs, the ClassLoader is enabled to inversely flatten unflatten elf files and load the unflatten elf files into a memory, and the dex files are not loaded one by one.
After the optimized dex2oat compiling process generates an elf file irrelevant to the system, when the executable file is loaded by the class loader, the class loader can be informed that the elf file is legal, so that the elf file is subjected to inverse flattening processing through verification, and information of the class file which can be maintained by the virtual instance on the cloud server is obtained.
Because the first executable file is generated by the optimized dex2oat compiling process during the installation of the installation package corresponding to the cloud application, the optimized dex2oat compiling process only generates the elf file irrelevant to the system, and compared with the existing dex2oat processing mode, the time of the dex2oat compiling process can be shortened. In addition, the oat file generated by the existing dex2oat processing mode is related to a core library file in the system, and a problem occurs when the core library of the system is changed, but the generated elf file is unrelated to the system in the scheme, so that the generated elf file can still be used when the core library of the system is changed, and the compatibility of the elf file is improved.
On the basis of the foregoing method embodiment, before sending the second notification message to the class loader, the method further includes: and extracting the first executable file.
In short, an elf file irrelevant to the system can be generated through an optimized dex2oat compiling process, the elf file is a machine code file, the class loader can directly inversely flatten the first executable file after checking legality (the class loader is informed that the current elf file is legal by sending a second notification message to the class loader), and the inversely flattened first executable file is loaded into the memory without loading the executable files one by one, so that the processing efficiency is effectively improved. The optimized dex2oat compiling process can be executed in advance, that is, an elf file obtained through the optimized dex2oat compiling process can be stored in a cloud server in advance and can be obtained at any time when the cloud application needs to be started.
Referring to fig. 4, a flowchart of a method for fast starting a cloud application according to a third exemplary embodiment of the present application is shown, where the method includes the following steps:
step S401 is entered first to obtain configuration information, which includes information of the second executable file.
And then, step S402 is executed to load the second executable file into the memory when the class loader loads the executable file, and a third notification message is sent to the class loader, where the third notification message is used to indicate that the loading of the executable file is completed.
In this embodiment, the second executable file is an executable file to which a first class file used when the cloud application is started belongs, and the first class file is at least one class file commonly used when the cloud application is started. Preferably, when the number of the second executable files is multiple, the configuration information further includes a loading sequence of each second executable file, so that when the class loader loads the executable files, the cloud server can load each second executable file into the memory according to the loading sequence. Specifically, the most common class files started by the cloud application can be found through a tool (the tool indexes the class by using a breadth first algorithm), the dex files to which the classes belong are indexed, and information of the dex files is configured in a server. Before the cloud application runs, an instance (namely a cloud server) configured for running the cloud application is issued, and when the instance creates a class loader and loads a dex file, the first used dex file is loaded into a memory, and the class loader is told that the dex file is loaded.
Generally, a plurality of executable files exist in an installation package corresponding to a cloud application, each executable file includes at least one class file, and the cloud application can complete installation and startup only after all the executable files are loaded into a memory through a class loader, which takes a long time. In the solution of this embodiment, by acquiring the configuration information, when the class loader loads the executable file, the second executable file is loaded into the memory, and a third notification message is sent to the class loader to indicate that the loading of the executable file is completed. After receiving the third notification message, the class loader can finish the starting of the cloud application, and only needs to load a part of executable files into the memory because all the executable files are not required to be loaded, thereby greatly improving the starting speed of the cloud application.
On the basis of the foregoing method embodiment, after the second executable file is loaded into the memory, the method further includes the following steps: loading a third executable file into the memory, wherein the third executable file comprises at least one executable file in other executable files except the second executable file in the installation package of the cloud application.
In this embodiment, the installation package corresponding to the cloud application includes both the second executable file and the third executable file. For the second executable file, the loading is completed before the cloud application is started, and for the third executable file, after the cloud application is started, the third executable file can be placed in a background process to be continuously loaded until all the third executable files are loaded into the memory, so that the service requirements of subsequent users on various functions in the cloud application are met.
Taking an executable file as a dex file, a class file as a class file, and a class loader as a ClassLoader as an example, assuming that a commonly used function when a certain cloud application is started is an entry function, the entry function needs to call three class files, namely, a.class file and a.class file, and the three class files are respectively in the three dex files, namely, class a.dex file, class b.dex file and class c.dex file, when the ClassLoader needs to load the dex file, the cloud server will load the three dex files, namely, class a.dex file, class b.dex file and class c.dex file, into a memory first, and inform the ClassLoader that the current dex file is loaded completely, that the early preparation work of the cloud application start is completed, and then the cloud application can be started. After the cloud application is started, the cloud server can continuously load other dex files except the 3 dex files in the installation package corresponding to the current cloud application in the background process so as to meet the service requirement of a subsequent user on the cloud application.
On the basis of the method embodiment, the configuration information is generated by traversing the range to construct an executable file used by the main component of the application. The application main components comprise: a main activity component, an application component, and a ContentProvider component. The executable files used when the application main component is constructed often contain the most common class files when the corresponding cloud application is started, and the configuration information is generated by traversing the executable files used when the application main component is constructed, so that the information of the second executable files contained in the configuration information is the information of the executable files to which the most common class files belong, and the basic service requirements of users on the cloud application can be met after the cloud application is started.
It should be noted that Android apk file operation is to use java class loader, and class loader first determines whether there is an oat file (generated by dex2oat process) during loading, and if so, loads the oat file into a memory, so that the process of generating the oat file is time-consuming; if there is no oat file, the dex files are loaded into the memory one by one, and if there are too many dex files, the loading process is very time-consuming, up to several seconds (related to the CPU and memory of the hardware).
And the dex2 at process is deleted in the cloud application scheme, so that when executable files are loaded by the ClassLoader, because the oat files do not exist, the dex files can be loaded one by one, so that the time consumption of the cloud application starting process is long, and bad experience can be brought to users. In order to solve the problem that the cloud application starting process is long in time consumption, the schemes shown in fig. 1 to 4 are provided.
In a second aspect, as shown in fig. 5, which is a schematic block diagram of an apparatus for quickly starting a cloud application according to a first exemplary embodiment of the present application, the apparatus 500 for quickly starting a cloud application is suitable for a cloud server, and includes:
the processing module 501 is configured to, when a class loader loads an executable file, perform memory loading and inverse flattening processing on the executable file included in an installation package of a cloud application through threads in a preset thread pool, and send a first notification message to the class loader after the executable file is processed, where the number of the threads is greater than 1, the threads process the executable file in a parallel processing manner, and the first notification message is used to indicate that the loading of the executable file is completed.
On the basis of the foregoing embodiment of the apparatus, the apparatus further comprises:
the placement module is used for placing the information of the executable files contained in the installation package of the cloud application to the thread pool before the processing module carries out memory loading and anti-flattening processing on the executable files contained in the installation package of the cloud application through threads in a preset thread pool, wherein the threads carry out memory loading and anti-flattening processing on the executable files according to the information.
On the basis of the foregoing device embodiment, the first notification message carries a sequence in which the processing of the executable file is completed.
As shown in fig. 6, which is a schematic block diagram of an apparatus for quickly starting a cloud application according to a second exemplary embodiment of the present application, the apparatus 600 for quickly starting a cloud application is suitable for a cloud server, and includes:
a sending module 601, configured to send a second notification message to a class loader when the class loader loads an executable file, so that the class loader inversely processes a first executable file, and loads the processed first executable file into a memory, where the second notification message is used to indicate that the first executable file is legal, the first executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to a cloud application is installed, and the optimized dex2oat compiling process generates an elf file unrelated to a system.
On the basis of the foregoing embodiment of the apparatus, the apparatus further comprises:
an extracting module, configured to extract the first executable file before the sending module sends the second notification message to the class loader.
As shown in fig. 7, which is a schematic block diagram of an apparatus for quickly starting a cloud application according to a third exemplary embodiment of the present application, the apparatus 700 for quickly starting a cloud application is suitable for a cloud server, and includes:
the first loading module 701 is configured to acquire configuration information, load a second executable file into a memory when a class loader loads an executable file, and send a third notification message to the class loader, where the configuration information includes information of the second executable file, the second executable file is an executable file to which a first class file used when a cloud application is started belongs, and the third notification message is used to indicate that loading of the executable file is completed.
On the basis of the foregoing embodiment of the apparatus, the apparatus further comprises:
the second loading module is configured to load a third executable file into the memory after the first loading module loads the second executable file into the memory, where the third executable file includes at least one executable file in other executable files except the second executable file in the installation package of the cloud application.
The implementation process of the device for quickly starting the cloud application provided by the embodiment of the present application is consistent with that of the method for quickly starting the cloud application provided by the embodiment of the present application, and the effect that can be achieved is also the same as that of the method for quickly starting the cloud application provided by the embodiment of the present application, which is not described herein again.
In a third aspect, corresponding to the method for quickly starting the cloud application, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program executes the steps of the method for quickly starting the cloud application.
In a fourth aspect, as shown in fig. 8, an embodiment of the present application further provides an electronic device 800, including: a processor 801, a memory 802 and a bus 803, wherein the memory 802 stores machine-readable instructions executable by the processor 801, when the electronic device is operated, the processor 801 communicates with the memory 802 through the bus 803, and the processor 801 executes the machine-readable instructions to perform the steps of the method for fast booting of a cloud application as described above.
Specifically, the memory 602 and the processor 601 may be general-purpose memory and processor, and are not specifically limited herein, and when the processor 601 runs a computer program stored in the memory 602, the method for quickly starting the cloud application can be performed.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and further, example implementations may have additional divisions, and for example, multiple modules or components may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to the requirements of the examples to achieve the purpose of the scheme of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media capable of storing program codes.
Finally, it should be noted that, although the above embodiments have been described in the text and drawings of the present application, the scope of the patent protection of the present application is not limited thereby. All technical solutions which are generated by replacing or modifying the equivalent structure or the equivalent flow according to the contents described in the text and the drawings of the present application, and which are directly or indirectly implemented in other related technical fields, are included in the scope of protection of the present application.

Claims (10)

1. A method for rapidly starting a cloud application is suitable for a cloud server, and is characterized by comprising the following steps:
when a class loader loads an executable file, performing memory loading and inverse flattening processing on the executable file contained in an installation package of a cloud application through threads in a preset thread pool, and sending a first notification message to the class loader after the executable file is processed, wherein the number of the threads is greater than 1, the threads process the executable file in a parallel processing mode, and the first notification message is used for indicating that the loading of the executable file is completed; and/or
When a class loader loads an executable file, sending a second notification message to the class loader to enable the class loader to inversely process a first executable file and load the processed first executable file into a memory, wherein the second notification message is used for indicating that the first executable file is legal, the first executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to a cloud application is installed, and the optimized dex2oat compiling process generates an elf file irrelevant to a system.
2. The method according to claim 1, before the memory loading and the inverse flattening processing of the executable file included in the installation package of the cloud application by the threads in the preset thread pool, further comprising:
and placing the information of the executable file contained in the installation package of the cloud application to the thread pool, wherein the thread carries out memory loading and inverse flattening processing on the executable file according to the information.
3. The method according to claim 1 or 2, wherein the first notification message carries a sequence of completion of processing of the executable file.
4. The method of claim 1, wherein the number of threads is the same as or half of the number of CPU cores corresponding to the current instance.
5. The method of claim 1, wherein prior to said sending the second notification message to the class loader, further comprising:
and extracting the first executable file.
6. The utility model provides a device that cloud applied quick start, is applicable to high in the clouds server, a serial communication port, includes:
the cloud application installation package comprises a processing module, a class loader and a processing module, wherein the processing module is used for carrying out memory loading and inverse flattening processing on an executable file contained in the cloud application installation package through threads in a preset thread pool when the class loader loads the executable file, and sending a first notification message to the class loader after the executable file is processed, the number of the threads is greater than 1, the threads process the executable file in a parallel processing mode, and the first notification message is used for indicating that the executable file is loaded completely; and/or
The sending module is configured to send a second notification message to the class loader when the class loader loads an executable file, so that the class loader inversely flattens the first executable file and loads the processed first executable file into the memory, where the second notification message is used to indicate that the first executable file is legal, the first executable file is generated by an optimized dex2oat compiling process when an installation package corresponding to a cloud application is installed, and the optimized dex2oat compiling process generates an elf file unrelated to a system.
7. The apparatus of claim 6, further comprising:
the placement module is used for placing the information of the executable file contained in the installation package of the cloud application to the thread pool before the processing module carries out memory loading and inverse flattening processing on the executable file contained in the installation package of the cloud application through a thread in a preset thread pool, wherein the thread carries out memory loading and inverse flattening processing on the executable file according to the information.
8. The apparatus according to claim 6 or 7, wherein the first notification message carries a sequence of completion of processing of the executable file.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the method for cloud application fast boot according to any one of claims 1 to 5.
10. An electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when an electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the method for cloud application quick start according to any one of claims 1 to 5.
CN202211702336.3A 2022-12-29 2022-12-29 Method and device for quickly starting cloud application, storage medium and electronic equipment Active CN115658185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211702336.3A CN115658185B (en) 2022-12-29 2022-12-29 Method and device for quickly starting cloud application, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211702336.3A CN115658185B (en) 2022-12-29 2022-12-29 Method and device for quickly starting cloud application, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115658185A true CN115658185A (en) 2023-01-31
CN115658185B CN115658185B (en) 2023-03-28

Family

ID=85022375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211702336.3A Active CN115658185B (en) 2022-12-29 2022-12-29 Method and device for quickly starting cloud application, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115658185B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130042098A1 (en) * 2010-02-26 2013-02-14 Samsung Electronics Co., Ltd. Method of generating boot image for fast booting and image forming apparatus for performing the method, and method of performing fast booting and image forming apparatus for performing the method
CN107766101A (en) * 2017-09-30 2018-03-06 五八有限公司 App starts processing method, device and the equipment of event
CN110750284A (en) * 2019-10-15 2020-02-04 Oppo(重庆)智能科技有限公司 Application quick starting method, terminal and computer readable storage medium
CN113396391A (en) * 2019-04-15 2021-09-14 深圳市欢太科技有限公司 Method and device for starting application program, electronic equipment and storage medium
CN114327675A (en) * 2021-12-23 2022-04-12 广东明创软件科技有限公司 Method for starting mini-game application and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130042098A1 (en) * 2010-02-26 2013-02-14 Samsung Electronics Co., Ltd. Method of generating boot image for fast booting and image forming apparatus for performing the method, and method of performing fast booting and image forming apparatus for performing the method
CN107766101A (en) * 2017-09-30 2018-03-06 五八有限公司 App starts processing method, device and the equipment of event
CN113396391A (en) * 2019-04-15 2021-09-14 深圳市欢太科技有限公司 Method and device for starting application program, electronic equipment and storage medium
CN110750284A (en) * 2019-10-15 2020-02-04 Oppo(重庆)智能科技有限公司 Application quick starting method, terminal and computer readable storage medium
CN114327675A (en) * 2021-12-23 2022-04-12 广东明创软件科技有限公司 Method for starting mini-game application and related device

Also Published As

Publication number Publication date
CN115658185B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN108027741B (en) File processing method, device, terminal and storage medium based on patch upgrade
CN112861057B (en) Page rendering method, device, equipment and storage medium based on applet
WO2019227715A1 (en) Data processing method and apparatus, and computer-readable storage medium
CN111625289B (en) Method and device for quickly starting application program and electronic equipment
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN112650541B (en) Application program starting acceleration method, system, equipment and storage medium
CN110795162B (en) Method and device for generating container mirror image file
CN111026493A (en) Interface rendering processing method and device
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN111679852A (en) Detection method and device for conflict dependency library
CN108595178B (en) Hook-based data acquisition method, device and equipment
CN107423093B (en) Control method and apparatus, computer apparatus, and computer-readable storage medium
CN115658185B (en) Method and device for quickly starting cloud application, storage medium and electronic equipment
CN115658184B (en) Method and device for quickly starting cloud application, storage medium and electronic equipment
CN111522536A (en) Method for calling programming language and related equipment thereof
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN111090442A (en) Application updating method and device and storage medium
CN110688320A (en) Global variable detection method and device and terminal equipment
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN110990137B (en) Application program function module scheduling method, scheduling information processing method and device
CN116149802B (en) Data pushing method, device, storage medium and apparatus
CN112612754A (en) File searching method, system, device and computer storage medium
CN111984343B (en) Plug-in resource searching method, device, equipment and readable storage medium
CN110532084B (en) Platform task scheduling method, device, equipment and 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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 230031 Room 672, 6/F, Building A3A4, Zhong'an Chuanggu Science Park, No. 900, Wangjiang West Road, High-tech Zone, Hefei, Anhui

Patentee after: Anhui Haima Cloud Technology Co.,Ltd.

Address before: 100015 rooms 304 and 305, 3 / F, 201 / F, yard 10, Jiuxianqiao North Road, Chaoyang District, Beijing

Patentee before: BEIJING HAIYUDONGXIANG TECHNOLOGY Co.,Ltd.