CN114528037A - Application starting method and device, electronic equipment and storage medium - Google Patents

Application starting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114528037A
CN114528037A CN202111661690.1A CN202111661690A CN114528037A CN 114528037 A CN114528037 A CN 114528037A CN 202111661690 A CN202111661690 A CN 202111661690A CN 114528037 A CN114528037 A CN 114528037A
Authority
CN
China
Prior art keywords
dynamic library
execution file
main execution
codes
code
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
CN202111661690.1A
Other languages
Chinese (zh)
Other versions
CN114528037B (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111661690.1A priority Critical patent/CN114528037B/en
Publication of CN114528037A publication Critical patent/CN114528037A/en
Application granted granted Critical
Publication of CN114528037B publication Critical patent/CN114528037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to an application starting method, an application starting device, electronic equipment and a storage medium, wherein the application starting method comprises the following steps: when a starting instruction of the application program is detected, determining a current main execution file corresponding to the application program, loading codes in the current main execution file, and starting the application program, wherein the codes in the current main execution file comprise codes of a basic dynamic library, the basic dynamic library is a dynamic library depended on when the history main execution file is loaded, and the history main execution file is a file before the current main execution file is modified. According to the method and the device, the codes of the basic dynamic library depended by the main execution file are integrated into the main execution file, so that the problem of excessive time consumption caused by extra operation of a system when the application program is started can be solved, and the problem of slow starting of the application program is further solved.

Description

Application starting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an application starting method and apparatus, an electronic device, and a storage medium.
Background
Because the main execution file for starting the application program and the dynamic libraries corresponding to other events in the application program may generally depend on the same dynamic library, loading of the dynamic libraries corresponding to other events is inevitably performed when the application program is started, so that a large amount of time is consumed when the application program is started.
Disclosure of Invention
The disclosure provides an application starting method, an application starting device, electronic equipment and a storage medium, and the technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an application starting method, including:
when a starting instruction of the application program is detected, determining a current main execution file corresponding to the application program;
loading a code in the current main execution file and starting an application program;
the code in the current master execution file comprises code of the base dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the historical main execution file is a file before the current main execution file is modified.
In some possible embodiments, the method further comprises:
when a starting instruction of a business event in an application program is detected, determining a business dynamic library corresponding to the business event;
if the basic dynamic library is a dynamic library which is depended on when the business dynamic library is loaded, calling the basic dynamic library;
loading a business dynamic library based on the codes of the basic dynamic library and the codes of the business dynamic library;
a business event is initiated.
In some possible embodiments, when a start instruction of the application program is detected and before determining a current main execution file corresponding to the application program, the method further includes:
determining a basic dynamic library which is depended on when a history main execution file is loaded;
and integrating the codes in the basic dynamic library into the historical main execution file to obtain the current main execution file.
In some possible embodiments, after integrating the code in the basic dynamic library into the main execution file, the method further includes:
the base dynamic library is deleted.
In some possible embodiments, the method further comprises:
storing the codes in the current main execution file into a memory;
when a starting instruction of a business event in an application program is detected, determining a business dynamic library corresponding to the business event;
if the basic dynamic library is a dynamic library which is relied on when the business dynamic library is loaded, the codes in the memory are inquired in a dynamic inquiry mode to obtain the codes of the basic dynamic library;
loading a business dynamic library based on the codes of the basic dynamic library and the codes of the business dynamic library;
a business event is initiated.
In some possible embodiments, if the basic dynamic library is a dynamic library that is relied on when the service dynamic library is loaded, the code in the memory is queried in a dynamic query mode to obtain the code of the basic dynamic library, the service dynamic library is loaded based on the code of the basic dynamic library and the code of the service dynamic library, and the starting of the service event includes:
compiling based on codes in the service dynamic library to obtain a program package corresponding to the service event;
if the basic dynamic library is a dynamic library which is relied on when the business dynamic library is loaded, the codes in the memory are inquired in a dynamic inquiry mode to obtain the codes of the basic dynamic library;
starting a program package based on the code of the basic dynamic library;
a business event is initiated.
In some possible embodiments, saving the code in the current main execution file to the memory includes:
determining a preset deleting mode of a code in a current main execution file;
deleting preset codes in the codes of the current main execution file based on a preset deleting mode, and reserving the codes in a basic dynamic library in the codes of the current main execution file;
and storing the codes in the basic dynamic library in the codes of the current main execution file into a memory.
According to a second aspect of the embodiments of the present disclosure, there is provided an application starting apparatus including:
the file determining module is configured to execute the starting instruction of the application program and determine a current main execution file corresponding to the application program;
the starting module is configured to load codes in the current main execution file and start an application program;
the code in the current master execution file comprises code of the base dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the historical main execution file is a file before the current main execution file is modified.
In some possible embodiments, the apparatus further comprises:
the service dynamic library determining module is configured to execute a service dynamic library corresponding to a service event when a starting instruction of the service event in the application program is detected;
the calling module is configured to execute the dynamic library which is depended when the basic dynamic library is loaded as the business dynamic library, and call the basic dynamic library;
a loading module configured to execute code loading of the business dynamic library based on the code of the basic dynamic library and the code of the business dynamic library;
a start module configured to execute a start service event.
In some possible embodiments, the apparatus further comprises:
a basic dynamic library determining module configured to execute a basic dynamic library which determines a dependency of the history main execution file when loading;
and the integration module is configured to integrate the codes in the basic dynamic library into the historical main execution file to obtain the current main execution file.
In some possible embodiments, the apparatus further comprises:
a deletion module configured to perform deleting the base dynamic library.
In some possible embodiments, the apparatus further comprises:
the saving module is configured to save codes in the current main execution file into the memory;
the service dynamic library determining module is configured to execute a service dynamic library corresponding to a service event when a starting instruction of the service event in the application program is detected;
the code acquisition module is configured to execute a dynamic library which is depended on when the basic dynamic library is loaded as the service dynamic library, and the code in the memory is inquired in a dynamic inquiry mode to obtain the code of the basic dynamic library;
a loading module configured to execute code loading of the business dynamic library based on the code of the basic dynamic library and the code of the business dynamic library;
a start module configured to execute a start service event.
In some possible embodiments, the apparatus further comprises:
the compiling module is configured to execute compiling based on codes in the service dynamic library to obtain a program package corresponding to the service event;
the code acquisition module is configured to execute a dynamic library which is depended on when the basic dynamic library is loaded as the service dynamic library, and the code in the memory is inquired in a dynamic inquiry mode to obtain the code of the basic dynamic library;
a boot module configured to execute a code boot package based on a base dynamic library; a business event is initiated.
In some possible embodiments, the saving module is configured to perform:
determining a preset deleting mode of a code in a current main execution file;
deleting preset codes in the codes of the current main execution file based on a preset deleting mode, and reserving the codes in a basic dynamic library in the codes of the current main execution file;
and storing the codes in the basic dynamic library in the codes of the current main execution file into a memory.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of the first aspect as described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of the first aspects of the embodiments of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program, the computer program being stored in a readable storage medium, from which at least one processor of a computer device reads and executes the computer program, causing the computer device to perform the method of any one of the first aspects of embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
when a starting instruction of the application program is detected, determining a current main execution file corresponding to the application program, loading codes in the current main execution file, and starting the application program, wherein the codes in the current main execution file comprise codes of a basic dynamic library, the basic dynamic library is a dynamic library depended on when the history main execution file is loaded, and the history main execution file is a file before the current main execution file is modified. According to the method and the device, the codes of the basic dynamic library depended by the main execution file are integrated into the main execution file, so that the problem of excessive time consumption caused by extra operation of a system when the application program is started can be solved, and the problem of slow starting of the application program is further solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating an application environment in accordance with an illustrative embodiment;
FIG. 2 is a flowchart illustrating an application launch method in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating the initiation of a business event in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating the initiation of a business event in accordance with an exemplary embodiment;
FIG. 5 is a flow diagram illustrating a type of cropping code in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating an application launching device in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating an electronic device for application launching in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
All data about a user in the present application are data authorized by the user.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment of an application launching method according to an exemplary embodiment, as shown in fig. 1, the application environment may include a client 01, and a master executive file 011 and a dynamic service library 012 located in an application program of the client 01.
In some possible embodiments, the client 01 may include, but is not limited to, a smartphone, a desktop computer, a tablet computer, a laptop computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and the like. The software running on the client may also be an application program, an applet, or the like. Alternatively, the operating system running on the client may include, but is not limited to, an android system, an IOS system, linux, windows, Unix, and the like.
In some possible embodiments, when a start instruction of an application program is detected, a current main execution file corresponding to the application program is determined, codes in the current main execution file are loaded, and the application program is started, wherein the codes in the current main execution file include codes of a basic dynamic library, the basic dynamic library is a dynamic library depended on when a history main execution file is loaded, and the history main execution file is a file before the current main execution file is modified.
Fig. 2 is a flowchart illustrating an application starting method according to an exemplary embodiment, where as shown in fig. 2, the application starting method may be applied to a client and may also be applied to other node devices, and includes the following steps:
in step S201, when a start instruction of the application program is detected, a current main execution file corresponding to the application program is determined.
In the embodiment of the present application, the current main execution file is the main execution file of the application program. And, each application has its corresponding main execution file. The main execution file is a main entry of the application program, and the system loads codes in the main execution file during running, finds an entry function, and executes subsequent logic. The code may also be referred to as a symbol, which may be related to a class, a method, a variable, and the like.
In this embodiment of the application, the application in step S201 may be an application in an IOS system, an application in an android system, or an application in a windows, Lunix, Unix, or other system. Here, the type of system to which the application program belongs is not limited.
In some alternative embodiments, the vendor of some systems sets a maximum capacity limit for the content in a single executable file for an application. For example, if the content in a single executable file exceeds 60 million, it cannot be applied. To address this problem, the application may be adapted to the structure of multiple dynamic libraries. Further, to reduce code coupling between services, more dynamic libraries may be split. Thus, after splitting, the main execution file usually becomes an empty shell, and only the dependency relationship between the main () method and the dynamic library is reserved, so as to guarantee the operation of the application program. Therefore, the code architecture of the application program is improved, and the working efficiency of partial developers can be improved.
However, as the amount of service code increases, the number of dynamic libraries increases, which causes a certain deterioration in the time consumption for starting the application program. In contrast, the embodiment of the application can determine the dynamic library which is not needed in the starting stage, and in the running process of the application program, the interface provided by the dynamic library is called through the componentized framework, and the corresponding dynamic library is loaded as required.
For example, assume that an application has a main execution file (main execution file No. 0) and 5 dynamic libraries, where the 5 dynamic libraries include 3 basic dynamic libraries of nos. 1, 2, and 3, and further include service dynamic libraries of nos. 4 and 5 corresponding to different service events of the application. And, the 3 basic dynamic libraries No. 1, No. 2, and No. 3 are dynamic libraries that are relied upon when the main execution file is loaded, and meanwhile, the 3 basic dynamic libraries No. 1, No. 2, and No. 3 are also dynamic libraries that are relied upon when the No. 4 and No. 5 business dynamic libraries are loaded.
Thus, when the client detects the starting instruction of the application program, the main execution file corresponding to the application program is determined to be the number 0 main execution file. When the system loads the main execution file, since the 3 basic dynamic libraries of No. 1, No. 2, and No. 3 are dynamic libraries relied on when the main execution file is loaded, codes loaded into the 3 basic dynamic libraries are inevitably needed. However, loading the 3 base dynamic libraries when the main execution file is started is very time consuming.
In the embodiment of the present application, the time is consumed because the system generates additional operations. Alternatively, the additional operation may refer to when linking the dynamic library, the system performs additional symbol rebasing and binding, i.e. redefining the offset of the symbol, which inevitably results in more time consumption, so that the user feels that the application is started too slowly during the process of starting the application.
In step S203, loading a code in the current main execution file, and starting an application program, where the code in the current main execution file includes a code of the basic dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the historical main execution file is a file before the current main execution file is modified.
In the embodiment of the present application, in order to avoid a time-consuming problem caused by loading codes in 3 basic dynamics, the client may modify the previous main execution file. To distinguish from the modified master execution file, it is referred to herein as a historical master execution file.
In some possible embodiments, the client may obtain a modification instruction, where the modification instruction includes identification information of the historical main execution file and identification information of the dependent basic dynamic library (such as identification information of 3 basic dynamic libraries, No. 1, No. 2, and No. 3), and the modification instruction is used to instruct the client to integrate codes in the basic dynamic library into the historical main execution file, so as to obtain a new main execution file, that is, the current main execution file.
Correspondingly, after the client side obtains the modification instruction, the history main execution file can be determined according to the identification information of the history main execution file, and the basic dynamic library depended on when the history main execution file is loaded can be determined according to the identification information of the basic dynamic library. Subsequently, the client may integrate the code in the basic dynamic library into the historical main execution file, resulting in the current main execution file.
In an alternative embodiment, the client may retain the base dynamic library after integrating the code in the base dynamic library into the historical master execution file.
FIG. 3 is a flow diagram illustrating a method for initiating a business event, according to an exemplary embodiment, as shown in FIG. 3, including:
in step S301, when a start instruction of a service event in an application is detected, a service dynamic library corresponding to the service event is determined.
In the embodiment of the application, when the client detects the starting instruction of the business event in the application program, the business dynamic library corresponding to the business event can be determined.
Based on the above example, it is further explained that, when the client detects the start instruction of the service event corresponding to the service dynamic library No. 4, it may be determined that the service dynamic library corresponding to the service event is No. 4. Alternatively, the service event may be any service event in the application, such as a creation event (including file creation, picture creation, etc.), a download event (including picture download, document download), a page start event, and so on.
In step S303, if the basic dynamic library is a dynamic library that is relied upon when the service dynamic library is loaded, the basic dynamic library is called.
Alternatively, it is assumed that the 3 basic dynamic libraries No. 1, No. 2, and No. 3 may be a common kernel of the dynamic library No. 4 and the current master execution file. At this time, the basic dynamic library (3 basic dynamic libraries, No. 1, No. 2, and No. 3) is a dynamic library that is relied upon when the business dynamic library is loaded, and the basic dynamic library can be called.
In step S305, the business dynamic library is loaded based on the code of the base dynamic library and the code of the business dynamic library.
In the embodiment of the application, the client can load the dynamic service library based on the code of the basic dynamic library and the code of the dynamic service library.
In step S307, a business event is started.
For example, when the client detects a start instruction of a download service event in the application, a service dynamic library (for example, No. 4 service dynamic library) corresponding to the download service event may be determined. Since the above description shows that the 3 basic dynamic libraries of No. 1, No. 2, and No. 3 are also the dynamic libraries that the No. 4 business dynamic library depends on when loading. Therefore, the client can call 3 basic dynamic libraries, load the service dynamic library based on the codes of the 3 basic dynamic libraries and the codes of the service dynamic library, and start downloading service events.
Although the above method can make the basic dynamic library which the business dynamic library depends on still exist, when the business dynamic library is loaded, the code of the basic dynamic library can be found. However, the above formula can keep the business dynamic library, and at the same time, a copy of the code of the basic dynamic library exists in the current main execution file. Therefore, a plurality of codes of the basic dynamic library exist in the application program product, the memory of the client is wasted, and the actual requirement is not met.
In an alternative embodiment, the client may delete the base dynamic library after integrating the code in the base dynamic library into the historical master execution file.
FIG. 4 is a flowchart illustrating a method for initiating a business event, after the business event is applied to delete a base dynamic library, as shown in FIG. 4, comprising:
in step S401, the code in the current main execution file is saved in the memory.
In an alternative embodiment, after the client starts the application program by using the codes in the current main execution file (including the codes in the basic dynamic library), the codes in the current main execution file may be saved into the memory.
Optionally, the memory is a local memory in the client.
In some possible embodiments, some systems do not save all code in the current main execution file to memory after the process of starting the application program using the current main execution file. Rather, to reduce the size of the artifact, all code in the current main execution file may be trimmed away based on specified settings.
Specifically, the compiling and starting process of the application program may include obtaining all codes in the current main execution file, that is, obtaining a source code, then generating an intermediate code based on the source code, then generating different executable files according to the intermediate code, then packaging the different executable files and resources to obtain a program package of the application program, and then starting the application program according to the program package.
However, to reduce the size of the product, the system of the client may cut all the code in the current main execution code stored in the memory when different executable files are generated according to the intermediate code. This results in that when a business event is initiated, the code originally belonging to the underlying dynamic library that has been integrated into the current master execution file is not found. Therefore, when the client needs to cut the code in the current main execution file, the code can be cut based on a new mode, so as to ensure that the code originally belonging to the basic dynamic library can be integrated into the current main execution file when a business event is started.
FIG. 5 is a flow diagram illustrating a method for cutting code, as applied to delete a base dynamic library, according to an illustrative embodiment, shown in FIG. 5, including:
in step S501, a preset deleting manner of the code in the current main execution file is determined.
Optionally, when the client needs to cut the code in the current main execution file, the preset deletion mode of the code in the current main execution file may be determined, that is, the preset deletion mode that is not to cut all the codes may be determined.
In step S503, deleting the preset code in the code of the current main execution file based on the preset deleting manner, and retaining the code in the basic dynamic library in the code of the current main execution file.
Therefore, the client can delete the preset codes in the codes of the current main execution file based on the preset deletion mode, namely the codes in the historical main execution file, and retain the codes originally belonging to the basic dynamic library in the codes of the current main execution file.
In step S505, the codes in the basic dynamic library in the codes of the current main execution file are saved in the memory.
Optionally, if the codes in the current main execution file are not saved in the memory at this time, the codes originally belonging to the basic dynamic library in the codes of the current main execution file may be saved in the memory after the codes originally belonging to the historical main execution file are cut.
Optionally, before the step of cutting the code, the client may already store all the codes of the current main execution file in the memory, and after the client cuts the codes based on a preset deletion mode, the client leaves the codes originally belonging to the basic dynamic library in the codes of the current main execution file.
Therefore, the client can keep the codes which need to be used continuously in the memory, namely the codes originally belonging to the basic dynamic library, so that the business dynamic library can be ensured to find the codes in the basic dynamic library which the business dynamic library depends on in a dynamic query mode during running, and the loading of the business events is carried out.
However, in the actual process, after the preset deleting manner is used, there may be a portion of the code originally in the basic dynamic library that is still cut.
Through analysis, the code originally belonging to the basic dynamic library is global code in the application program, and the code in the historical main execution file is non-global code. Based on this, the deletion mode in the embodiment of the present application may be regarded as a first mode, a recognition mode may be added before cutting, and after the client recognizes that a certain code is a global code, an identifier that cannot be cut may be marked, so that when deletion is performed through a preset deletion mode, the code that cannot be cut is marked, and cannot be cut.
Therefore, the client can keep the codes which need to be used continuously in the memory, namely the codes originally belonging to the basic dynamic library, thereby ensuring that the business dynamic library can successfully find the codes in the basic dynamic library which the business dynamic library depends on in a dynamic query mode during running so as to load the business events.
In step S403, when a start instruction of a service event in the application is detected, a service dynamic library corresponding to the service event is determined.
In the embodiment of the application, when the client detects the starting instruction of the business event in the application program, the business dynamic library corresponding to the business event can be determined.
Based on the above example, it is further explained that, when the client detects the start instruction of the service event corresponding to the service dynamic library No. 4, it may be determined that the service dynamic library corresponding to the service event is No. 4. Alternatively, the service event may be any service event in the application, such as a creation event (including file creation, picture creation, etc.), a download event (including picture download, document download), a page start event, and so on.
In step S405, if the basic dynamic library is a dynamic library that is relied upon when the service dynamic library is loaded, the code in the memory is queried in a dynamic query manner to obtain the code of the basic dynamic library.
Alternatively, it is assumed that the 3 basic dynamic libraries No. 1, No. 2, and No. 3 may be a common kernel of the dynamic library No. 4 and the current master execution file. At this time, the basic dynamic library (3 basic dynamic libraries, No. 1, No. 2, and No. 3) is a dynamic library that is relied upon when the service dynamic library is loaded, and the code in the memory can be queried in a dynamic query manner to obtain the code of the basic dynamic library.
In step S407, the business dynamic library is loaded based on the code of the base dynamic library and the code of the business dynamic library.
In the embodiment of the application, the client can load the dynamic service library based on the code of the basic dynamic library and the code of the dynamic service library.
In step S409, a traffic event is initiated.
In the embodiment of the application, after the code in the memory is queried in a dynamic query mode to obtain the code of the basic dynamic library, the client compiles the code in the dynamic library based on the service to obtain the program package corresponding to the service event, so that the problem that the code of the basic dynamic library cannot be found can be ignored, and the program package corresponding to the service event is obtained by directly compiling the code in the dynamic library based on the service. And then, the client can inquire the codes in the memory in a dynamic inquiry mode to obtain the codes of the basic dynamic library, and the code based on the basic dynamic library starts a program package so as to start a service event.
In conclusion, by integrating the code of the basic dynamic library, on which the main execution file depends, into the main execution file, the problem of excessive time consumption caused by additional operation of the system when the application program is started can be avoided, and the problem of slow start of the application program is further alleviated.
Secondly, when the codes of the basic dynamic library depended by the main execution file are integrated into the main execution file, the codes of the original basic dynamic library are deleted, so that a plurality of codes of the basic dynamic library do not exist in an application program product, and the memory of a client is saved.
FIG. 6 is a block diagram illustrating an application launching device, according to an example embodiment. Referring to fig. 6, the apparatus includes a file determination module 601 and a start module 602.
The file determining module 601 is configured to execute, when a starting instruction of the application program is detected, determining a current main execution file corresponding to the application program;
a starting module 602 configured to load the code in the current main execution file and start the application program;
the code in the current master execution file comprises code of the base dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the history main execution file is a file before the current main execution file is modified.
In some possible embodiments, the apparatus further comprises:
the service dynamic library determining module is configured to execute a service dynamic library corresponding to a service event when a starting instruction of the service event in the application program is detected;
the calling module is configured to execute the dynamic library which is depended when the basic dynamic library is loaded as the business dynamic library, and call the basic dynamic library;
a loading module configured to execute code loading of the business dynamic library based on the code of the basic dynamic library and the code of the business dynamic library;
a start module configured to execute a start service event.
In some possible embodiments, the apparatus further comprises:
a basic dynamic library determining module configured to execute a basic dynamic library that determines a history main execution file to be relied upon when loaded;
and the integration module is configured to integrate the codes in the basic dynamic library into the historical main execution file to obtain the current main execution file.
In some possible embodiments, the apparatus further comprises:
a deletion module configured to perform deleting the base dynamic library.
In some possible embodiments, the apparatus further comprises:
the saving module is configured to save codes in the current main execution file into the memory;
the service dynamic library determining module is configured to execute a service dynamic library corresponding to a service event when a starting instruction of the service event in the application program is detected;
the code acquisition module is configured to execute a dynamic library which is depended on when the basic dynamic library is loaded as the service dynamic library, and the code in the memory is inquired in a dynamic inquiry mode to obtain the code of the basic dynamic library;
the loading module is configured to load the service dynamic library based on the code of the basic dynamic library and the code of the service dynamic library;
a start module configured to execute a start service event.
In some possible embodiments, the apparatus further comprises:
the compiling module is configured to execute compiling based on codes in the service dynamic library to obtain a program package corresponding to the service event;
the code acquisition module is configured to execute a dynamic library which is depended on when the basic dynamic library is loaded as the service dynamic library, and the code in the memory is inquired in a dynamic inquiry mode to obtain the code of the basic dynamic library;
a boot module configured to execute a code boot package based on a base dynamic library; a business event is initiated.
In some possible embodiments, the saving module is configured to perform:
determining a preset deleting mode of codes in a current main execution file;
deleting preset codes in the codes of the current main execution file based on a preset deleting mode, and reserving the codes in a basic dynamic library in the codes of the current main execution file;
and storing the codes in the basic dynamic library in the codes of the current main execution file into a memory.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an apparatus 700 for application launching, according to an example embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operation at the device 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of apparatus 700, sensor assembly 714 may also detect a change in position of apparatus 700 or a component of apparatus 700, the presence or absence of user contact with apparatus 700, orientation or acceleration/deceleration of apparatus 700, and a change in temperature of apparatus 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the apparatus 700 to perform the method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

Claims (10)

1. An application startup method, comprising:
when a starting instruction of an application program is detected, determining a current main execution file corresponding to the application program;
loading the codes in the current main execution file and starting the application program;
the code in the current master execution file comprises code of a base dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the historical main execution file is a file before the current main execution file is modified.
2. The application launching method according to claim 1, characterized in that the method further comprises:
when a starting instruction of a business event in the application program is detected, determining a business dynamic library corresponding to the business event;
if the basic dynamic library is a dynamic library which is depended on when the business dynamic library is loaded, calling the basic dynamic library;
loading the business dynamic library based on the codes of the basic dynamic library and the codes of the business dynamic library;
and starting the service event.
3. The application starting method according to claim 1, wherein before the step of determining the current main execution file corresponding to the application program when the starting instruction of the application program is detected, further comprising:
determining the basic dynamic library depended on when the historical main execution file is loaded;
and integrating the codes in the basic dynamic library into the historical main execution file to obtain the current main execution file.
4. The application launching method of claim 3, further comprising, after the integrating the code in the base dynamic library into the main execution file:
and deleting the basic dynamic library.
5. The application launching method according to claim 4, characterized in that the method further comprises:
storing the codes in the current main execution file into a memory;
when a starting instruction of a business event in the application program is detected, determining a business dynamic library corresponding to the business event;
if the basic dynamic library is a dynamic library which is relied on when the business dynamic library is loaded, the codes in the memory are inquired in a dynamic inquiry mode to obtain the codes of the basic dynamic library;
loading the business dynamic library based on the codes of the basic dynamic library and the codes of the business dynamic library;
and starting the service event.
6. The application starting method according to claim 5, wherein if the basic dynamic library is a dynamic library that is relied upon when the service dynamic library is loaded, the code in the memory is queried in a dynamic query manner to obtain a code of the basic dynamic library, the service dynamic library is loaded based on the code of the basic dynamic library and the code of the service dynamic library, and starting the service event comprises:
compiling based on codes in the service dynamic library to obtain a program package corresponding to the service event;
if the basic dynamic library is a dynamic library which is relied on when the business dynamic library is loaded, the codes in the memory are inquired in the dynamic inquiry mode to obtain the codes of the basic dynamic library;
launching the package based on the code of the base dynamic library;
and starting the service event.
7. An application startup device, characterized by comprising:
the file determining module is configured to execute the starting instruction of the application program, and determine a current main execution file corresponding to the application program;
the starting module is configured to load codes in the current main execution file and start the application program;
the code in the current master execution file comprises code of a base dynamic library; the basic dynamic library is a dynamic library which is relied on when a history main execution file is loaded; the historical main execution file is a file before the current main execution file is modified.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the application launching method of any of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the application launching method of any of claims 1 to 6.
10. A computer program product, characterized in that the computer program product comprises a computer program, the computer program being stored in a readable storage medium, from which at least one processor of a computer device reads and executes the computer program, causing the computer device to perform the application launching method as claimed in any one of claims 1 to 6.
CN202111661690.1A 2021-12-31 2021-12-31 Application starting method and device, electronic equipment and storage medium Active CN114528037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661690.1A CN114528037B (en) 2021-12-31 2021-12-31 Application starting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661690.1A CN114528037B (en) 2021-12-31 2021-12-31 Application starting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114528037A true CN114528037A (en) 2022-05-24
CN114528037B CN114528037B (en) 2024-03-12

Family

ID=81621789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661690.1A Active CN114528037B (en) 2021-12-31 2021-12-31 Application starting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114528037B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061750A (en) * 2022-06-27 2022-09-16 浪潮卓数大数据产业发展有限公司 Componentized data interaction method, device, equipment and medium for application program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141698A (en) * 1997-01-29 2000-10-31 Network Commerce Inc. Method and system for injecting new code into existing application code
CN103460217A (en) * 2011-01-14 2013-12-18 威步***股份公司 Method for protecting an application program and related computer program product
CN108446144A (en) * 2018-03-12 2018-08-24 武汉斗鱼网络科技有限公司 A kind of application program launching method, device, terminal and storage medium
CN109445856A (en) * 2018-09-17 2019-03-08 深圳点猫科技有限公司 A kind of method and electronic equipment of the acceleration application starting based on educational system
CN111596970A (en) * 2020-05-12 2020-08-28 广州市百果园信息技术有限公司 Dynamic library delay loading method, device, equipment and storage medium
CN112559067A (en) * 2020-12-08 2021-03-26 浪潮商用机器有限公司 Dynamic library loading method and related device
CN113204377A (en) * 2020-01-31 2021-08-03 华为技术有限公司 Method and device for loading dynamic link library

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141698A (en) * 1997-01-29 2000-10-31 Network Commerce Inc. Method and system for injecting new code into existing application code
CN103460217A (en) * 2011-01-14 2013-12-18 威步***股份公司 Method for protecting an application program and related computer program product
CN108446144A (en) * 2018-03-12 2018-08-24 武汉斗鱼网络科技有限公司 A kind of application program launching method, device, terminal and storage medium
CN109445856A (en) * 2018-09-17 2019-03-08 深圳点猫科技有限公司 A kind of method and electronic equipment of the acceleration application starting based on educational system
CN113204377A (en) * 2020-01-31 2021-08-03 华为技术有限公司 Method and device for loading dynamic link library
CN111596970A (en) * 2020-05-12 2020-08-28 广州市百果园信息技术有限公司 Dynamic library delay loading method, device, equipment and storage medium
CN112559067A (en) * 2020-12-08 2021-03-26 浪潮商用机器有限公司 Dynamic library loading method and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061750A (en) * 2022-06-27 2022-09-16 浪潮卓数大数据产业发展有限公司 Componentized data interaction method, device, equipment and medium for application program
CN115061750B (en) * 2022-06-27 2024-05-31 浪潮卓数大数据产业发展有限公司 Method, device, equipment and medium for componentized data interaction of application program

Also Published As

Publication number Publication date
CN114528037B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN105955765B (en) Application preloading method and device
CN112003893B (en) Resource downloading method and device
CN111258952B (en) Data storage control method, device and storage medium
CN114528037B (en) Application starting method and device, electronic equipment and storage medium
CN107506496B (en) Defragmentation method, defragmentation device and computer-readable storage medium
CN110457084B (en) Loading method and device
CN112083981A (en) Method and device for creating page view component
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN112181406A (en) Rendering engine sharing method and device
CN112214252A (en) Information expansion method and device and electronic equipment
CN111625251B (en) Method and device for processing application instance
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN113934452B (en) Data processing method and device, electronic equipment and storage medium
CN111596949B (en) Method and device for developing application program
CN112988173A (en) Method, apparatus and medium for processing system partition application
EP4068082B1 (en) Information processing method and apparatus, terminal device, and storage medium
CN110659081B (en) File processing method and device for program object and electronic equipment
CN114020504B (en) Data processing method and device, electronic equipment and storage medium
CN114020505B (en) Data processing method and device, electronic equipment and storage medium
CN110990073B (en) Method and device for verifying customization requirements of application program
CN108205452B (en) Software execution control method and device
CN116483436A (en) Data processing method and device, electronic equipment and storage medium
CN114416033A (en) Data processing method and device, electronic equipment and storage medium
CN115705219A (en) Terminal starting method and device, storage medium and terminal
CN107665125B (en) Method and device for executing operation instruction

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