CN112988284B - Application program starting method and device, computer equipment and storage medium - Google Patents

Application program starting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112988284B
CN112988284B CN202110523718.9A CN202110523718A CN112988284B CN 112988284 B CN112988284 B CN 112988284B CN 202110523718 A CN202110523718 A CN 202110523718A CN 112988284 B CN112988284 B CN 112988284B
Authority
CN
China
Prior art keywords
application
resource
application program
page
micro
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.)
Active
Application number
CN202110523718.9A
Other languages
Chinese (zh)
Other versions
CN112988284A (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.)
Taiping Finance Technology Services Shanghai Co ltd
Original Assignee
Taiping Finance Technology Services Shanghai 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 Taiping Finance Technology Services Shanghai Co ltd filed Critical Taiping Finance Technology Services Shanghai Co ltd
Priority to CN202110523718.9A priority Critical patent/CN112988284B/en
Publication of CN112988284A publication Critical patent/CN112988284A/en
Application granted granted Critical
Publication of CN112988284B publication Critical patent/CN112988284B/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
    • 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/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The application relates to an application program starting method, an application program starting device, computer equipment and a storage medium. The method comprises the following steps: receiving an application program starting instruction, and loading a target public resource of a micro application corresponding to the application program according to the starting instruction; reading a micro application to be started in an application program installation package, and reading a page identifier of a page to be loaded in the micro application; loading local resources corresponding to the page to be loaded according to the page identification, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources of an application program installation package; loading remote resources corresponding to the page to be loaded according to the page identification, wherein the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading; and starting the micro application according to the local resource and the remote resource. By adopting the method, the starting speed of the application program can be improved.

Description

Application program starting method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for starting an application program, a computer device, and a storage medium.
Background
With the deep development of the mobile internet, the number of users and the proportion of users of mobile terminals are increased dramatically, and the value core of the smart phone era begins to turn to software and application.
In the traditional technology, the hybrid application is an application between Web-APP and native-APP, and helps developers to build an application with native basic capability and support mobile, Web and embedded platforms.
However, the hybrid application is currently supported by the native function and SDK from the application container, and many daily general-purpose components need to be developed and then packaged in the installation package of the hybrid application, which causes the volume of the installation package of the hybrid application to be continuously increased, and the starting speed of the hybrid application to be continuously slowed down.
Disclosure of Invention
In view of the above, it is desirable to provide an application starting method, an apparatus, a computer device, and a storage medium capable of improving the application starting speed.
An application startup method, the application startup method comprising:
receiving an application program starting instruction, and loading a target public resource of a micro application corresponding to the application program according to the starting instruction;
reading a micro application to be started in an application program installation package, and reading a page identifier of a page to be loaded in the micro application;
loading local resources corresponding to the page to be loaded according to the page identification, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources of an application program installation package;
loading remote resources corresponding to the page to be loaded according to the page identification, wherein the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading;
and starting the micro application according to the local resource and the remote resource.
In one embodiment, the target common resource is obtained by performing deduplication according to common resources corresponding to a plurality of micro applications included in the application program.
In one embodiment, after receiving the application start instruction, the method further includes:
loading a public resource corresponding to a native function corresponding to the application program according to the starting instruction;
the application program starting method further comprises the following steps:
and loading the application resources corresponding to the native functions as required.
In one embodiment, the loading, on demand, an application resource corresponding to the native function includes:
reading a native function identifier to be started in the application program installation package;
loading a first application resource corresponding to the native function identifier, wherein the loading of the public resource corresponding to the native function and the loading of the first application resource are parallel loading;
the starting the micro application according to the local resource and the remote resource comprises:
and starting a corresponding page to be loaded according to the local resource and the remote resource, and starting a native function according to the public resource corresponding to the native function and the first application resource.
In one embodiment, the loading, on demand, an application resource corresponding to the native function includes:
receiving a native function call instruction, and loading a second application resource corresponding to the native function according to the native function call instruction;
and calling the corresponding native function according to the public resource corresponding to the native function and the second application resource.
In one embodiment, the common resource corresponding to the native function is obtained by performing deduplication according to the common resource corresponding to each of the native functions.
In one embodiment, the application program starting method further includes:
acquiring first monitoring data corresponding to a terminal and second monitoring data corresponding to the application program in real time;
uploading the first monitoring data and the second monitoring data to a server, so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
An application generation method, comprising:
acquiring at least one micro application corresponding to the application program;
splitting each micro application corresponding to the application program to obtain a public resource and a remote resource corresponding to the micro application;
acquiring an application program installation package;
and packaging the public resource and the application program installation package to obtain an application program, and storing the remote resource to a server.
In one embodiment, after splitting each micro application corresponding to the application program to obtain a common resource and a remote resource corresponding to the micro application, the method further includes:
carrying out duplicate removal processing on the public resource corresponding to the micro application to obtain a target public resource;
the packaging the public resource and the application program installation package to obtain the application program comprises:
and packaging the target public resource and the application program installation package to obtain an application program.
In one embodiment, the application generation method further includes:
acquiring at least one native function corresponding to an application program;
splitting the native function to obtain a public resource and an application resource corresponding to the native function;
generating a calling mode of a public resource corresponding to the native function and a calling mode of the application resource;
configuring the calling mode of the public resource corresponding to the native function to be started with the application program;
and configuring the calling mode of the application resource to be loaded according to the requirement.
In one embodiment, after splitting the native function to obtain a common resource and an application resource corresponding to the native function, the method further includes:
carrying out duplicate removal processing on the public resource corresponding to the native function;
the generating of the calling mode of the public resource corresponding to the native function includes:
and generating a calling mode of the public resource corresponding to the duplicate-removed native function.
An application launching device, the application launching device comprising:
the public resource loading module is used for receiving an application program starting instruction and loading a target public resource of the micro application corresponding to the application program according to the starting instruction;
the page identifier reading module is used for reading the micro application to be started in the application program installation package and reading the page identifier of the page to be loaded in the micro application;
a local resource loading module, configured to load a local resource corresponding to the page to be loaded according to the page identifier, where the local resource includes a target public resource corresponding to the page to be loaded and a basic resource of an application program installation package;
a remote resource loading module, configured to load a remote resource corresponding to the page to be loaded according to the page identifier, where the remote resource is dynamic data of the page to be loaded, and the loading of the local resource and the loading of the remote resource are parallel loading;
and the starting module is used for starting the micro application according to the local resource and the remote resource.
An application generation apparatus, the application generation apparatus comprising:
the micro-application acquisition module is used for acquiring at least one micro-application corresponding to the application program;
the first splitting module is used for splitting each micro application corresponding to the application program to obtain public resources and remote resources corresponding to the micro applications;
the installation package obtaining module is used for obtaining an application installation package;
and the packaging module is used for packaging the public resource and the application program installation package to obtain an application program and storing the remote resource to a server.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the above embodiments when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the method, the device, the computer equipment and the storage medium for starting the application program, the micro application is started in the splitting stage, namely the target public resource of the micro application is started together when the application program is started, and then when the micro application is started, only the local resource corresponding to the page to be loaded needs to be loaded according to the page identifier on one hand, and the remote resource corresponding to the page to be loaded needs to be loaded according to the page identifier on the other hand, so that the amount of the remote resource required to be loaded when the micro application is started is reduced, and then the loading of the local resource and the loading of the remote resource are loaded in parallel, and the starting efficiency of the application program is improved together.
Drawings
FIG. 1 is a diagram of an application environment for a method for application startup in one embodiment;
FIG. 2 is a flowchart illustrating a method for application launching according to one embodiment;
FIG. 3 is a flowchart illustrating a method for generating an application program according to an embodiment;
FIG. 4 is a framework diagram of an application in one embodiment;
FIG. 5 is a flowchart of an application startup method in another embodiment;
FIG. 6 is a block diagram showing the structure of an application startup device according to one embodiment;
FIG. 7 is a block diagram showing the construction of an application generating apparatus according to one embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The application program starting method provided by the application program can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 is provided with an application program, and a user can click a corresponding application program icon in the terminal 102, so that the terminal 102 receives an application program starting instruction and loads a target public resource of a micro application corresponding to the application program according to the starting instruction, and then the terminal 102 reads the micro application to be started in the application program installation package and reads a page identifier of a page to be loaded in the micro application; loading local resources corresponding to the page to be loaded according to the page identifier, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources of an application program installation package, and the terminal 102 can acquire and load remote resources corresponding to the page to be loaded from the server 104 according to the page identifier, the remote resources are dynamic data of the page to be loaded, the loading of the local resources and the loading of the remote resources are loaded in parallel, and finally the terminal 102 starts the application program according to the local resources and the remote resources, the application program starting method starts the micro application by enabling a micro application splitting stage, namely the target public resources of the micro application are started together when the application program is started, and then when the micro application is started, only the local resources corresponding to the page to be loaded according to the page identifier on one hand and the remote resources corresponding to the page to be loaded according to the page identifier on the other hand, therefore, the amount of remote resources required to be loaded when the micro application is started is reduced, and then the local resources and the remote resources are loaded in parallel, so that the starting efficiency of the application program is improved together. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, an application starting method is provided, which is described by taking the application of the method to the terminal in fig. 1 as an example, and includes the following steps:
s202: and receiving an application program starting instruction, and loading the target public resource of the micro application corresponding to the application program according to the starting instruction.
Specifically, the application starting instruction is generated after the terminal receives the trigger for the icon of the application, for example, after the user clicks the icon of the corresponding application, the terminal generates the corresponding application starting instruction according to the click, so that the operating system in the terminal sends the application starting instruction to the application, and the terminal starts to load the target public resource of the micro application corresponding to the application.
The target public resource may be a public resource corresponding to each micro application included in the application program, for example, when the application program is generated, the multiple micro applications in the application program are split to obtain a local resource and a corresponding remote resource, where the local resource includes a public resource, and the public resource may include, but is not limited to, a public component library, a public style library, configuration data, and the like.
Specifically, besides using a javascript + html docking manner, the micro application can call a third-party application program and the like to perform docking and interaction by an applet.
S204: and reading the micro application to be started in the application program installation package, and reading the page identification of the page to be loaded in the micro application.
Specifically, a micro application refers to a module in an application program that implements a certain function, and may include a plurality of pages to be loaded. The micro application to be started may be a micro application that needs to be started when the application program is started, or may be a micro application that needs to be started in the use process after the application program is started. In practical application, after the terminal finishes loading the target public resource, the micro application to be started in the application program installation package is read, for example, a preset container, for example, a corresponding micro application in webview is read, the micro application to be started at present is obtained, and then the page to be loaded at present can be read, for example, when the micro application is started, the page identifier of a first page in the micro application is obtained, the page identifier can uniquely determine the page to be loaded, and generally, the page identifier can be a URL address of the page to be loaded. Optionally, when there are multiple micro applications that need to be opened simultaneously, the processing is performed in parallel, that is, the local resources are loaded in parallel, and the remote resources are also loaded in parallel.
S206: and loading the local resources corresponding to the page to be loaded according to the page identifier, wherein the local resources comprise the target public resources corresponding to the page to be loaded and the basic resources of the application program installation package.
Specifically, the local resources include a target public resource corresponding to the page to be loaded and a basic resource in the application program installation package, the public resource refers to a public component library, a public style library, configuration data and the like, the basic resource refers to a resource which is static and unchangeable in each micro application and is different, and the resource is directly packaged into the installation package of the application program, so that the terminal can occupy the page to be loaded in a memory according to the local resources, and the corresponding static data which is kept unchanged is obtained.
S208: and loading remote resources corresponding to the page to be loaded according to the page identification, wherein the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading.
Specifically, the remote resource is dynamic data of a page to be loaded, and may include a template and data, and the remote resource needs to be acquired by the terminal from the server according to the page identifier, that is, the terminal sends the page identifier to the server through an asynchronous thread, so that the server queries corresponding dynamic data according to the page identifier and asynchronously returns the dynamic data to the terminal. Therefore, the page loading and data request of the micro application to be loaded are changed from the original serial operation into the parallel operation, the starting speed of the micro application is increased, and the effect of second opening of the application is finally achieved.
S210: and starting the application program according to the local resource and the remote resource.
Specifically, after the terminal occupies the page to be loaded, that is, obtains the local resource, it still sends an asynchronous request to the server in series with the page occupation position to obtain the remote resource, but since the remote resource has been obtained in parallel in this embodiment, after the terminal sends the asynchronous request, the terminal intercepts the sent asynchronous request, and obtains the remote resource obtained by parallel loading, and performs template splicing on the local resource and the remote resource, and then renders to obtain the first screen of the application program, thereby implementing the start of the micro application in the application program.
Specifically, the application program realizes that a plurality of H5 micro applications can be operated in a splitting stage through coding, the public component library, the public style library and the configuration data are separated from the H5 micro application into the application program installation package and are started together with the application program, so that only a few page H5 templates to be loaded and dynamic data parts need to be loaded when the H5 micro application is started, resources such as js and css which need to be loaded when the H5 micro application is started for the first time are reduced, the starting speed of a first screen is improved, meanwhile, a single page H5 application is split into a plurality of micro applications, the micro applications only contain the page templates to be loaded and dynamic data, the size is small enough, the basic component is started when the application program is started, the opening speed of the micro applications can be greatly improved, the micro applications can achieve the effect of second opening, and the use experience of the H5 function in the application program is greatly improved.
According to the method for starting the application program, the micro application is started in the splitting stage, namely the target public resources of the micro application are started together when the application program is started, and then when the micro application is started, only the local resources corresponding to the page to be loaded are loaded according to the page identification on one hand, and the remote resources corresponding to the page to be loaded are loaded according to the page identification on the other hand, so that the amount of the remote resources required to be loaded when the micro application is started is reduced, and then the loading of the local resources and the loading of the remote resources are loaded in parallel, and the efficiency of starting the application program is improved together.
In one embodiment, the target common resource is obtained by performing deduplication according to common resources corresponding to a plurality of micro applications included in the application program.
Specifically, since one application program may include a plurality of micro applications, that is, the application program is split into the plurality of micro applications according to functions when the application program is generated, each micro application only includes a page template to be loaded and dynamic data, other public resources are all split into an application program installation package, and in order to further reduce the size of the application program installation package to improve the starting speed of the application program, the public resources corresponding to each application may be subjected to deduplication processing to obtain a target public resource, so that only the target public resource after deduplication is packaged into the application program installation package to reduce the size of the application program installation package, and further improve the starting speed of the application program.
In one embodiment, after receiving the application program start instruction, the method further includes: loading a public resource corresponding to a native function corresponding to the application program according to the starting instruction; the application program starting method further comprises the following steps: and loading the application resources corresponding to the native functions as required.
Specifically, the common resources corresponding to the native function include, but are not limited to, bottom layer dependencies such as picture loading, network requests, and authority authorization, and the application resources corresponding to the native function include, but are not limited to, functions of application-level SDK message pushing, sharing, and the like.
In particular, since the application programs may include micro applications and native functions, the native functions may refer to functions of the terminal that are native to the operating system, including but not limited to an OCR, message push, voice recognition, etc. SDK module. And the native function can be correspondingly started when the application program is started or the micro application is started, or the native function can be called on the page to be loaded by the micro application after the application program is started. In order to improve the starting speed of the native functions and the starting speed of the application program, the native functions can be split and operated, the common resources such as picture loading, network requests, authority authorization and other bottom layer dependencies are extracted and loaded when the application program is started, and the functions of application-level SDK message pushing, sharing and the like are loaded according to requirements. For example, when the page to be loaded in H5 is called, the upper layer application resources except the bottom layer resources are loaded in real time, so that the resources required to be loaded when the application program is started can be saved, that is, the application resources do not need to be loaded when the application program is started, the consumption of the memory of the mobile phone is reduced, and finally, the whole second-to-second start of the application program is achieved.
And preferably, the common resource corresponding to the native function is obtained by performing deduplication according to the common resource corresponding to each native function. And one application program can call a plurality of native functions, and the native functions may have the same public resources, so that the public resources of the native functions are firstly subjected to deduplication processing, and only one public resource calling mode is provided, so that the size of an application program installation package is reduced, and the starting speed of the application program is improved.
The native function is started in two ways, one is directly started when an application program is started or a micro application is started, and the other is started when a page to be loaded of the micro application is called, which will be described in detail below, and a way that the native function is started only by local resources and a way that the native function is started by local resources and remote resources are required are given:
specifically, when the application program is started or the micro application is started directly, the application resource of the native function and the common resource corresponding to the native function may be loaded in parallel, so as to improve the efficiency. That is to say, the application resources corresponding to the native functions are loaded as required, including: and reading the native function identifiers to be started in the application program installation package, wherein the native function identifiers need to be loaded when the application program is started or the micro-application is started, namely, the native function identifiers are loaded when the application program is started. Therefore, in order to improve the efficiency of the starting, the loading of the common resource corresponding to the native function and the loading of the first application resource are loaded in parallel. That is to say, the functions of pushing, photographing, positioning, sharing and the like of the native function message are split and split into public resources, including network requests, file reading and writing, authority authorization and first application resources, including two layers of message pushing, photographing album selection and social sharing, and when the application program is started, the shared public resources and the first application resources are operated in parallel, so that the efficiency is improved. Thereby starting the application program according to the local resource and the remote resource, comprising: and starting the corresponding page to be loaded according to the local resource and the remote resource, and starting the native function according to the public resource and the first application resource corresponding to the native function.
In practical applications, for example, when an application program needs to be started through face recognition or the like, a native function needs to be called at this time, namely the photographing function, when the application program is started, the terminal needs to load the micro application to display the corresponding page to be loaded and call the native function for verification, in order to improve the processing efficiency, the target public resource corresponding to the micro application and the public resource corresponding to the native function are loaded in advance when the application program is started, then the native function is called in parallel, namely, the first application resource is loaded to take a picture to identify the face, after the face identification is passed, on one hand, the occupation of the page to be loaded is carried out in the memory, the local resources are loaded, and on the other hand, remote resources are loaded in parallel with the local resources, so that the display efficiency of the page to be loaded is improved, namely the starting efficiency of the application program is improved.
Specifically, when the application is started when the page to be loaded of the micro application is called, the loading of the application resource corresponding to the native function on demand includes: receiving a native function call instruction, and loading a second application resource corresponding to the native function according to the native function call instruction; and calling the corresponding native function according to the common resource and the second application resource corresponding to the native function.
When the terminal displays a page to be loaded of the micro application of the application program, a button for calling the native function exists in the micro application, a user clicks the button to enable the terminal to receive a native function calling instruction, and at the moment, the start of the native function which is not loaded when the application program is started is triggered, so that the terminal loads a second application resource corresponding to the native function according to the native function calling instruction; and calling the corresponding native function according to the common resource and the second application resource corresponding to the native function. The native functions in the application program, such as functions of message pushing, photographing, positioning, sharing and the like, are split and run, the functions of bottom layer dependence loading such as picture loading, network request, authority authorization and the like are loaded when the application program is started by extracting common resources, the functions of application-level SDK message pushing, sharing and the like are loaded as required, and upper layer application resources except the bottom layer resources are loaded in real time when a page to be loaded of H5 is called, so that the resources required to be loaded when the application program is started can be saved, the consumption of a mobile phone memory is reduced, and finally the whole second opening of the application program is achieved.
In addition, for the loading of the native function as required, if the native function needs to interact with the remote server, when the application resource corresponding to the native function is loaded, the application program sends a calling request to an operating system of the terminal, when the operating system judges that the native function needs to interact with the remote server, the operating system interacts with the remote server to acquire the corresponding resource, then the acquired resource is combined with the local resource of the native function to realize the calling of the application program, and if the native function does not need to interact with the remote server, the local application resource is directly acquired to realize the calling of the native function.
In one embodiment, the application program starting method may further include: acquiring first monitoring data corresponding to a terminal and second monitoring data corresponding to an application program in real time; and uploading the first monitoring data and the second monitoring data to a server, so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
Specifically, the first monitoring data corresponding to the terminal may include, but is not limited to, operating conditions of a CPU, a memory, an IO, and a port, and in practical applications, the Os Api of the terminal may be connected to the native language Java and Objective-C to monitor health conditions of hardware device resources, such as the CPU, the memory, and the IO, of the terminal occupied by the application program. The second monitoring data corresponding to the application program may refer to an execution log of each micro application in the application program, that is, by monitoring and analyzing stack information during runtime of the iOS and Android application programs, once the flash back or other abnormalities of the application program are monitored, an abnormal log is recorded and uploaded to the server for fault analysis and reporting, so that iterative optimization is performed on the application program in the following.
Optionally, the terminal may upload the first monitoring data and the second monitoring data to the server, so that the server monitors the operating state of the application program according to the first monitoring data and the second monitoring data, for example, the server may determine whether the first monitoring data is abnormal, if the first monitoring data is normal, but the second monitoring data is abnormal, it indicates that the application program itself has a problem, and may obtain the micro-application corresponding to the abnormal log, and output the micro-application and the abnormal log in a combined manner. If the first monitoring data is abnormal, the system problem can be output, and after the system is normal, the monitoring is carried out again.
In one embodiment, as shown in fig. 3, an application generation method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
s302: at least one micro application corresponding to the application program is obtained.
Specifically, referring to fig. 4, fig. 4 is a framework diagram of an application program in an embodiment, in this embodiment, an application program may include a micro application part and a native component part, and the micro application part may include a plurality of micro applications, that is, during development, the application program is split into the plurality of micro applications, for example, split according to function modules, so that when the application program is generated, at least one corresponding application of the application program is obtained.
S304: and splitting each micro application corresponding to the application program to obtain public resources and remote resources corresponding to the micro applications.
Specifically, the local resource includes a common resource, which may include but is not limited to a common component library, a common style library, configuration data, and the like, and the remote resource is dynamic data of a page to be loaded, which may include a template and data, and which needs a terminal to obtain the data from a server according to a page identifier. After each micro application is obtained, the micro application may be split, for example, the public component library, the public style library, and the configuration data are split from the micro application, the static data are split as the basic resource, and the dynamic data and the template are split as the remote resource.
S306: and acquiring the application program installation package.
Specifically, the application installation package may be a preset framework, such as the development framework in fig. 4.
S308: and packaging the public resource and the application program installation package to obtain an application program, and storing the remote resource to a server.
Specifically, when an application program is generated, a common component library, a common style library, configuration data and the like are separated from the micro application and packaged into an application program installation package, so that when the application program is started, the target common resource can be loaded preferentially, and then only the corresponding remote resource can be operated when the micro application is started, and the remote resource is stored in the server, for example, the remote resource is stored in association according to the page identifier of the micro application, so that when a subsequent application program is started, the corresponding remote resource can be directly obtained according to the page identifier and sent to the terminal for loading.
In the embodiment, the splitting stage operation of multiple H5 micro applications is realized through coding, the common component library, the common style library and the configuration data are separated from the H5 micro applications into the application program installation package and are started together with the application program, so that only a few page H5 templates and dynamic data parts to be loaded need to be loaded when the H5 micro applications are started, resources such as js and css which need to be loaded when the H5 micro applications are started for the first time, the starting speed of a first screen is improved, meanwhile, a single H5 page application is split into multiple micro applications, the micro applications only contain the page templates and dynamic data to be loaded, the size is small enough, the basic components are started when the application programs are started, the opening speed of the micro applications is greatly improved, the micro applications achieve the second opening effect, and the use experience of the H5 function in the application programs is greatly improved.
In one embodiment, after splitting each micro application corresponding to the application program to obtain a common resource and a remote resource corresponding to the micro application, the method further includes: carrying out duplicate removal processing on the public resource corresponding to the micro application to obtain a target public resource; packaging the public resource and the application program installation package to obtain the application program, wherein the packaging comprises the following steps: and packaging the target public resource and the application program installation package to obtain the application program.
Specifically, since one application program may include a plurality of micro applications, that is, the application program is split into the plurality of micro applications according to functions when the application program is generated, each micro application only includes a page template to be loaded and dynamic data, other public resources are all split into an application program installation package, and in order to further reduce the size of the application program installation package to improve the starting speed of the application program, the public resources corresponding to each application may be subjected to deduplication processing to obtain a target public resource, so that only the target public resource after deduplication is packaged into the application program installation package to reduce the size of the application program installation package, and further improve the starting speed of the application program.
In one embodiment, the application generation method may further include: acquiring at least one native function corresponding to an application program; splitting the native function to obtain a public resource and an application resource corresponding to the native function; generating a calling mode of a public resource and a calling mode of an application resource corresponding to the native function; configuring a calling mode of a public resource corresponding to a native function to be started along with an application program; and configuring the calling mode of the application resource to be loaded according to the requirement.
Specifically, with reference to fig. 4, in order to increase the starting speed of the application program, when the application program is generated, the native function is split to obtain the common resource and the application resource corresponding to the native function, so that a calling mode of the common resource and a calling mode of the application resource corresponding to the native function can be written, then the calling mode of the common resource corresponding to the native function is configured to be started along with the application program, and the calling mode of the application resource is configured to be loaded as needed, where the loading as needed includes directly starting when the application program is started or the micro application is started and starting when the application program is called through a page to be loaded of the micro application, which may be specifically described above.
In one embodiment, after splitting the native function to obtain the common resource and the application resource corresponding to the native function, the method further includes: the method for generating the calling mode of the common resource corresponding to the native function by carrying out the duplicate removal processing on the common resource corresponding to the native function comprises the following steps: and generating a calling mode of the public resource corresponding to the duplicate-removed native function.
Specifically, the common resource corresponding to the native function is obtained by performing deduplication according to the common resource corresponding to each native function. And one application program can call a plurality of native functions, and the native functions may have the same public resources, so that the public resources of the native functions are firstly subjected to deduplication processing, and only one public resource calling mode is provided, so that the size of an application program installation package is reduced, and the starting speed of the application program is improved.
Specifically, referring to fig. 5, fig. 5 is a flowchart of an application starting method in another embodiment, where in the embodiment, the application starting method may include:
an application that can run a micro-application is first generated by the hybrid application micro-application framework described above. And the generated application program can support the operation of splitting a single page of H5 application into a plurality of micro applications due to the fact that the generated application program is coded in the framework, the split micro applications are hierarchically managed, and one micro application is divided into a page template layer to be loaded (corresponding to remote resources) and a data interaction layer (corresponding to local resources). Wherein the data interaction layer is separated from the H5 micro application and runs by the native application program in parallel with the page template layer to be loaded. When the page template to be loaded is opened, the data requested by the native application program is directly read, the native data does not need to be read, serial operation is changed into parallel execution, and the performance is improved. Therefore, the first screen function is split into small enough micro applications, then parallel operation is carried out on page loading to be loaded and data requests in the micro applications, the first screen is enabled to achieve the effect of second opening, meanwhile, public basic component libraries js and css between the micro applications can be multiplexed, repeated introduction is not needed, the size of the micro applications is reduced, and the starting speed of the first screen function is accelerated.
In addition, functions of native function message pushing, photographing, positioning, sharing and the like of the application program are split into two layers, namely basic dependence layer network request, file reading and writing, authority authorization, application layer application program message pushing, photographing album selection and social contact sharing, when the application program is started, the shared basic dependence and the application layer are operated in parallel, and efficiency is improved. When the application program is opened, the application-level SDK is loaded as required, only the resources except the basic dependent component are operated, and the resources of the basic layer are shared among different application-level SDKs, so that repeated introduction is not needed, the size of the SDK is reduced, the occupation of the memory of the mobile phone is reduced, and the starting speed of the application program is accelerated.
And finally, a health monitoring and data monitoring module is developed through coding, and running conditions of a CPU, a memory, an IO and a port of the terminal are monitored when the timing application program runs through native language Java and Objective-C coding so as to collect health data of the application program to realize health monitoring. Meanwhile, the execution log of the H5 application is monitored and collected in real time during running and uploaded to the server side, so that the H5 application is monitored in real time, and developers can have complete application program running monitoring data only by developing the H5 application.
Specifically, as shown in fig. 5, a terminal first starts a webView to load a page identification URL, so as to capture the URL, then one thread reads a page to be loaded of a micro application, occupies the page to be loaded in a memory, that is, reads a local resource, then sends an asynchronous request for obtaining a remote resource, and captures the asynchronous request, and another thread loads the asynchronous request in advance corresponding to the asynchronous request in the application, sends the asynchronous request to a server, so as to obtain the remote resource from the server, so that the terminal performs splicing rendering on the local resource and the remote resource to obtain the page to be loaded.
Therefore, a complete application program with the H5 micro application running capability, the application SDK resource splitting running capability and the application program running health monitoring capability is formed by combining the H5 application developed by a developer, and the running response speed of the application program is greatly improved by optimizing the starting resources.
In the embodiment, the application program developed by using the hybrid application program micro application technology framework performs micro application splitting on the H5 single-page application and separates the basic public resources, so that the H5 application is lighter, the code is not repeatedly run, and the starting response speed of the H5 application is improved. The native SDK is split in a layered mode and loaded according to needs, so that the minimum resource consumption of the SDK is realized, and the response performance of an application program is improved. The method provides a running environment which can be quickly iterated and updated thermally by the H5 micro application, and simultaneously endows the H5 micro application with a series of mobile device native basic capabilities such as Ocr, voice recognition, message pushing, living body recognition and the like by calling on demand, and provides application program health detection, user behavior analysis and unified release management in a mobile middle station.
It should be understood that although the steps in the flowcharts of fig. 2, 3 and 5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 3 and 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 6, there is provided an application starting apparatus including: the public resource loading module 100, the page identifier reading module 200, the local resource loading module 300, the remote resource loading module 400, and the starting module 500, wherein:
the public resource loading module 100 is configured to receive an application program starting instruction, and load a target public resource of a micro application corresponding to an application program according to the starting instruction;
the page identifier reading module 200 is configured to read a micro application to be started in an application program installation package, and read a page identifier of a page to be loaded in the micro application;
the local resource loading module 300 is configured to load a local resource corresponding to the page to be loaded according to the page identifier, where the local resource includes a target public resource corresponding to the page to be loaded and a basic resource of the application program installation package;
a remote resource loading module 400, configured to load a remote resource corresponding to the page to be loaded according to the page identifier, where the remote resource is dynamic data of the page to be loaded, and the loading of the local resource and the loading of the remote resource are parallel loads;
the starting module 500 is configured to start an application according to the local resource and the remote resource.
In one embodiment, the target common resource is obtained by performing deduplication according to common resources corresponding to a plurality of micro applications included in the application program.
In one embodiment, the common resource loading module 100 is further configured to load a common resource corresponding to a native function corresponding to an application program according to a start instruction;
the application starting apparatus may further include:
and the application resource loading module is used for loading the application resources corresponding to the native functions as required.
In one embodiment, the application resource loading module may include:
the identification reading unit is used for reading the native function identification to be started in the application program installation package;
the first parallel loading unit is used for loading a first application resource corresponding to the native function identifier, and the loading of the public resource corresponding to the native function and the loading of the first application resource are parallel loading;
the starting module 500 is further configured to start the corresponding page to be loaded according to the local resource and the remote resource, and start the native function according to the public resource and the first application resource corresponding to the native function.
In one embodiment, the application resource loading module may include:
the second parallel loading unit is used for receiving the native function calling instruction and loading a second application resource corresponding to the native function according to the native function calling instruction;
and the native function starting unit is used for calling the corresponding native function according to the public resource and the second application resource corresponding to the native function.
In one embodiment, the common resource corresponding to the native function is obtained by performing deduplication according to the common resource corresponding to each native function.
In one embodiment, the application starting apparatus may further include:
the acquisition module is used for acquiring first monitoring data corresponding to the terminal and second monitoring data corresponding to the application program in real time;
and the monitoring module is used for uploading the first monitoring data and the second monitoring data to the server so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
For specific limitations of the application starting apparatus, reference may be made to the above limitations of the application starting method, which are not described herein again. The modules in the application starting device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 7, there is provided an application generating apparatus including: the micro-application obtaining module 600, the first splitting module 700, the installation package obtaining module 800, and the packaging module 900, wherein:
a micro application obtaining module 600, configured to obtain at least one micro application corresponding to an application program;
a first splitting module 700, configured to split each micro application corresponding to an application program to obtain a public resource and a remote resource corresponding to the micro application;
an installation package obtaining module 800, configured to obtain an application installation package;
and a packaging module 900, configured to package the public resource and the application installation package to obtain an application, and store the remote resource in the server.
In one embodiment, the first splitting module 700 includes:
the duplication removing unit is used for carrying out duplication removing processing on the public resources corresponding to the micro applications to obtain target public resources;
the packaging module 900 is further configured to package the target public resource and the application installation package to obtain an application.
In one embodiment, the application generating apparatus may include:
the native function acquisition module is used for acquiring at least one native function corresponding to the application program;
the second splitting module is used for splitting the native function to obtain a public resource and an application resource corresponding to the native function;
the calling mode generating module is used for generating a calling mode of a public resource and a calling mode of an application resource corresponding to the native function;
the configuration module is used for configuring the calling mode of the public resource corresponding to the native function to be started along with the application program; and configuring the calling mode of the application resource to be loaded according to the requirement.
In one embodiment, the application generating apparatus may include:
the duplication removing module is used for carrying out duplication removing processing on the public resources corresponding to the native functions;
the calling mode generating module is also used for generating a calling mode of the public resource corresponding to the duplicate-removed native function.
For specific limitations of the application generation apparatus, reference may be made to the above limitations of the application generation method, which are not described herein again. The modules in the application program generating device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an application launching method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving an application program starting instruction, and loading a target public resource of a micro application corresponding to the application program according to the starting instruction; reading a micro application to be started in an application program installation package, and reading a page identifier of a page to be loaded in the micro application; loading local resources corresponding to the page to be loaded according to the page identification, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources of an application program installation package; loading remote resources corresponding to the page to be loaded according to the page identification, wherein the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading; and starting the application program according to the local resource and the remote resource.
In one embodiment, the target common resource involved in the execution of the computer program by the processor is obtained by performing deduplication according to common resources corresponding to a plurality of micro applications included in the application program.
In one embodiment, after receiving the application start instruction when the processor executes the computer program, the method further includes: loading a public resource corresponding to a native function corresponding to the application program according to the starting instruction; the processor, when executing the computer program, further performs the steps of: and loading the application resources corresponding to the native functions as required.
In one embodiment, the loading of application resources corresponding to native functions on demand performed by a processor executing a computer program includes: reading a native function identifier to be started in an application program installation package; loading a first application resource corresponding to the native function identifier, wherein the loading of the public resource corresponding to the native function and the loading of the first application resource are parallel loading; starting the application program according to the local resource and the remote resource, comprising: and starting the corresponding page to be loaded according to the local resource and the remote resource, and starting the native function according to the public resource and the first application resource corresponding to the native function.
In one embodiment, the loading of application resources corresponding to native functions on demand performed by a processor executing a computer program includes: receiving a native function call instruction, and loading a second application resource corresponding to the native function according to the native function call instruction; and calling the corresponding native function according to the common resource and the second application resource corresponding to the native function.
In one embodiment, the common resource corresponding to the native function involved in the execution of the computer program by the processor is obtained by performing deduplication according to the common resource corresponding to each native function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring first monitoring data corresponding to a terminal and second monitoring data corresponding to an application program in real time; and uploading the first monitoring data and the second monitoring data to a server, so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring at least one micro application corresponding to the application program; splitting each micro application corresponding to the application program to obtain public resources and remote resources corresponding to the micro applications; acquiring an application program installation package; and packaging the public resource and the application program installation package to obtain an application program, and storing the remote resource to a server.
In one embodiment, after the processor splits each micro application corresponding to the application program when executing the computer program and obtains the common resource and the remote resource corresponding to the micro application, the method further includes: carrying out duplicate removal processing on the public resource corresponding to the micro application to obtain a target public resource; the method for packaging the common resource and the application program installation package to obtain the application program comprises the following steps: and packaging the target public resource and the application program installation package to obtain the application program.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring at least one native function corresponding to an application program; splitting the native function to obtain a public resource and an application resource corresponding to the native function; generating a calling mode of a public resource and a calling mode of an application resource corresponding to the native function; configuring a calling mode of a public resource corresponding to a native function to be started along with an application program; and configuring the calling mode of the application resource to be loaded according to the requirement.
In one embodiment, after the processor splits the native function involved in executing the computer program to obtain the common resource and the application resource corresponding to the native function, the method further includes: carrying out duplicate removal processing on the public resource corresponding to the native function; the calling mode of the common resource corresponding to the native function generated when the processor executes the computer program comprises the following steps: and generating a calling mode of the public resource corresponding to the duplicate-removed native function.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving an application program starting instruction, and loading a target public resource of a micro application corresponding to the application program according to the starting instruction; reading a micro application to be started in an application program installation package, and reading a page identifier of a page to be loaded in the micro application; loading local resources corresponding to the page to be loaded according to the page identification, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources of an application program installation package; loading remote resources corresponding to the page to be loaded according to the page identification, wherein the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading; and starting the application program according to the local resource and the remote resource.
In one embodiment, the target common resource involved in the execution of the computer program by the processor is obtained by performing deduplication according to common resources corresponding to a plurality of micro applications included in the application program.
In one embodiment, the computer program, when executed by a processor, further comprises, after receiving an application start instruction: loading a public resource corresponding to a native function corresponding to the application program according to the starting instruction; the computer program when executed by the processor further realizes the steps of: and loading the application resources corresponding to the native functions as required.
In one embodiment, the on-demand loading of application resources corresponding to native functions, as implemented by a computer program when executed by a processor, includes: reading a native function identifier to be started in an application program installation package; loading a first application resource corresponding to the native function identifier, wherein the loading of the public resource corresponding to the native function and the loading of the first application resource are parallel loading; starting the application program according to the local resource and the remote resource, comprising: and starting the corresponding page to be loaded according to the local resource and the remote resource, and starting the native function according to the public resource and the first application resource corresponding to the native function.
In one embodiment, the on-demand loading of application resources corresponding to native functions, as implemented by a computer program when executed by a processor, includes: receiving a native function call instruction, and loading a second application resource corresponding to the native function according to the native function call instruction; and calling the corresponding native function according to the common resource and the second application resource corresponding to the native function.
In one embodiment, the common resource corresponding to the native function involved in the execution of the computer program by the processor is obtained by performing deduplication according to the common resource corresponding to each native function.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring first monitoring data corresponding to a terminal and second monitoring data corresponding to an application program in real time; and uploading the first monitoring data and the second monitoring data to a server, so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring at least one micro application corresponding to the application program; splitting each micro application corresponding to the application program to obtain public resources and remote resources corresponding to the micro applications; acquiring an application program installation package; and packaging the public resource and the application program installation package to obtain an application program, and storing the remote resource to a server.
In one embodiment, after the splitting each micro application corresponding to the application program and obtaining the common resource and the remote resource corresponding to the micro application, the splitting of each micro application when the computer program is executed by the processor further includes: carrying out duplicate removal processing on the public resource corresponding to the micro application to obtain a target public resource; the packaging of the common resource and the application installation package to obtain the application program when the computer program is executed by the processor comprises the following steps: and packaging the target public resource and the application program installation package to obtain the application program.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring at least one native function corresponding to an application program; splitting the native function to obtain a public resource and an application resource corresponding to the native function; generating a calling mode of a public resource and a calling mode of an application resource corresponding to the native function; configuring a calling mode of a public resource corresponding to a native function to be started along with an application program; and configuring the calling mode of the application resource to be loaded according to the requirement.
In one embodiment, after the splitting the native function to obtain the common resource and the application resource corresponding to the native function, the splitting of the native function when the computer program is executed by the processor further includes: carrying out duplicate removal processing on the public resource corresponding to the native function; the calling mode of the common resource corresponding to the generation native function related to the execution of the computer program by the processor comprises the following steps: and generating a calling mode of the public resource corresponding to the duplicate-removed native function.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (15)

1. An application starting method, comprising:
receiving an application program starting instruction, and loading a target public resource of a micro application corresponding to the application program according to the starting instruction, wherein the target public resource is a public resource of each micro application included in the application program, and the target public resource is packaged into an application program installation package;
reading a micro application to be started in an application program installation package, and reading a page identifier of a page to be loaded in the micro application;
a thread loads local resources corresponding to the page to be loaded according to the page identification, sends an asynchronous request for acquiring remote resources after the local resources are loaded, and intercepts the sent asynchronous request, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources in an application program installation package;
the other thread loads remote resources corresponding to the page to be loaded according to the page identification, the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading;
and starting the micro application according to the local resource and the remote resource.
2. The method according to claim 1, wherein the target common resource is obtained by performing deduplication on common resources corresponding to a plurality of micro applications included in the application program.
3. The application startup method according to claim 1, further comprising, after receiving the application startup instruction:
loading a public resource corresponding to a native function corresponding to the application program according to the starting instruction;
the application program starting method further comprises the following steps:
and loading the application resources corresponding to the native functions as required.
4. The application program starting method according to claim 3, wherein the loading, on demand, the application resource corresponding to the native function comprises:
reading a native function identifier to be started in the application program installation package;
loading a first application resource corresponding to the native function identifier, wherein the loading of the public resource corresponding to the native function and the loading of the first application resource are parallel loading;
the starting the micro application according to the local resource and the remote resource comprises:
and starting a corresponding page to be loaded according to the local resource and the remote resource, and starting a native function according to the public resource corresponding to the native function and the first application resource.
5. The application program starting method according to claim 3, wherein the loading, on demand, the application resource corresponding to the native function comprises:
receiving a native function call instruction, and loading a second application resource corresponding to the native function according to the native function call instruction;
and calling the corresponding native function according to the public resource corresponding to the native function and the second application resource.
6. The method for starting the application program according to any one of claims 3 to 5, wherein the common resource corresponding to the native function is obtained by performing deduplication according to the common resource corresponding to each of the native functions.
7. The application program startup method according to any one of claims 1 to 5, characterized in that the application program startup method further comprises:
acquiring first monitoring data corresponding to a terminal and second monitoring data corresponding to the application program in real time;
uploading the first monitoring data and the second monitoring data to a server, so that the server monitors the running state of the application program according to the first monitoring data and the second monitoring data.
8. An application generation method, comprising:
acquiring at least one micro application corresponding to the application program;
splitting each micro application corresponding to the application program to obtain a public resource and a remote resource corresponding to the micro application;
acquiring an application program installation package;
packaging the public resource and the application program installation package to obtain an application program, storing the remote resource to a server, preferentially loading a target public resource of a micro application corresponding to the application program after the application program is started, reading the micro application to be started in the application program installation package, and reading a page identifier of a page to be loaded in the micro application; a thread loads local resources corresponding to the page to be loaded according to the page identification, sends an asynchronous request for acquiring remote resources after the local resources are loaded, and intercepts the sent asynchronous request, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources in an application program installation package; the other thread loads remote resources corresponding to the page to be loaded according to the page identification, the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading; and starting the micro application according to the local resource and the remote resource.
9. The method of claim 8, wherein after splitting each micro-application corresponding to the application program to obtain a common resource and a remote resource corresponding to the micro-application, the method further comprises:
carrying out duplicate removal processing on the public resource corresponding to the micro application to obtain a target public resource;
the packaging the public resource and the application program installation package to obtain the application program comprises:
and packaging the target public resource and the application program installation package to obtain an application program.
10. The application generation method according to claim 8, further comprising:
acquiring at least one native function corresponding to an application program;
splitting the native function to obtain a public resource and an application resource corresponding to the native function;
generating a calling mode of a public resource corresponding to the native function and a calling mode of the application resource;
configuring the calling mode of the public resource corresponding to the native function to be started with the application program;
and configuring the calling mode of the application resource to be loaded according to the requirement.
11. The method for generating an application program according to claim 10, wherein after splitting the native function to obtain a common resource and an application resource corresponding to the native function, the method further comprises:
carrying out duplicate removal processing on the public resource corresponding to the native function;
the generating of the calling mode of the public resource corresponding to the native function includes:
and generating a calling mode of the public resource corresponding to the duplicate-removed native function.
12. An application startup device, characterized in that the application startup device comprises:
the public resource loading module is used for receiving an application program starting instruction and loading a target public resource of the micro application corresponding to the application program according to the starting instruction, wherein the target public resource is a public resource of each micro application included in the application program, and the target public resource is packaged into an application program installation package;
the page identifier reading module is used for reading the micro application to be started in the application program installation package and reading the page identifier of the page to be loaded in the micro application;
a local resource loading module, configured to load, by a thread, a local resource corresponding to the page to be loaded according to the page identifier, send an asynchronous request for obtaining a remote resource after the local resource is loaded, and intercept the sent asynchronous request, where the local resource includes a target public resource corresponding to the page to be loaded and a basic resource in an application program installation package;
a remote resource loading module, configured to load, by another thread, a remote resource corresponding to the page to be loaded according to the page identifier, where the remote resource is dynamic data of the page to be loaded, and the loading of the local resource and the loading of the remote resource are loaded in parallel;
and the starting module is used for starting the micro application according to the local resource and the remote resource.
13. An application generation apparatus, characterized by comprising:
the micro-application acquisition module is used for acquiring at least one micro-application corresponding to the application program;
the first splitting module is used for splitting each micro application corresponding to the application program to obtain public resources and remote resources corresponding to the micro applications;
the installation package obtaining module is used for obtaining an application installation package;
the packaging module is used for packaging the public resource and the application program installation package to obtain an application program, storing the remote resource to a server, preferentially loading a target public resource of a micro application corresponding to the application program after the application program is started, reading the micro application to be started in the application program installation package, and reading a page identifier of a page to be loaded in the micro application; a thread loads local resources corresponding to the page to be loaded according to the page identification, sends an asynchronous request for acquiring remote resources after the local resources are loaded, and intercepts the sent asynchronous request, wherein the local resources comprise target public resources corresponding to the page to be loaded and basic resources in an application program installation package; the other thread loads remote resources corresponding to the page to be loaded according to the page identification, the remote resources are dynamic data of the page to be loaded, and the loading of the local resources and the loading of the remote resources are parallel loading; and starting the micro application according to the local resource and the remote resource.
14. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7 or 8 to 11.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7 or 8 to 11.
CN202110523718.9A 2021-05-13 2021-05-13 Application program starting method and device, computer equipment and storage medium Active CN112988284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110523718.9A CN112988284B (en) 2021-05-13 2021-05-13 Application program starting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110523718.9A CN112988284B (en) 2021-05-13 2021-05-13 Application program starting method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112988284A CN112988284A (en) 2021-06-18
CN112988284B true CN112988284B (en) 2021-08-24

Family

ID=76337649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110523718.9A Active CN112988284B (en) 2021-05-13 2021-05-13 Application program starting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112988284B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760438A (en) * 2021-09-22 2021-12-07 京东科技信息技术有限公司 Page display method and device for webpage application
CN113986388B (en) * 2021-10-28 2024-03-29 上海米哈游璃月科技有限公司 Program set loading method, system, electronic device and storage medium
CN114428922A (en) * 2022-01-24 2022-05-03 中国工商银行股份有限公司 Page loading method and device, terminal equipment and storage medium
CN114416212A (en) * 2022-01-30 2022-04-29 中国工商银行股份有限公司 Mobile terminal application program data resource processing method and device
CN115080151B (en) * 2022-07-22 2023-07-14 平安银行股份有限公司 APP starting flow control method, computer readable storage medium and terminal
CN115129300A (en) * 2022-08-30 2022-09-30 太平金融科技服务(上海)有限公司深圳分公司 Application development method, apparatus, device, medium, and program product

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6832220B1 (en) * 2000-08-03 2004-12-14 Microsoft Corporation Method and apparatus for file searching, accessing file identifiers from reference page
CN104104645B (en) * 2013-04-01 2017-08-25 北京畅游天下网络技术有限公司 A kind of cross-platform method for managing resource and system
US20150088970A1 (en) * 2013-09-20 2015-03-26 Yottaa Inc. Systems and methods for managing loading priority or sequencing of fragments of a web object
CN103942044B (en) * 2014-03-18 2017-08-25 北京领通科技有限公司 remote assistance method and system in mobile terminal application
CN104965720B (en) * 2014-07-03 2018-10-19 腾讯科技(深圳)有限公司 Using installation method and device
CN107172110A (en) * 2016-03-07 2017-09-15 阿里巴巴集团控股有限公司 A kind of application APP resource loading method, business function implementation method and device
CN107729331A (en) * 2016-08-11 2018-02-23 凡学(上海)教育科技有限公司 A kind of method of Mobile solution cache HTML5 page resources
CN107995245B (en) * 2016-10-27 2019-03-15 腾讯科技(深圳)有限公司 A kind of method and terminal of resource-sharing
CN108108205B (en) * 2016-11-25 2019-07-05 腾讯科技(深圳)有限公司 Application page surface treatment method and apparatus
CN106598655B (en) * 2016-12-05 2020-02-14 腾讯科技(深圳)有限公司 Application page processing method and device
CN107015801B (en) * 2017-03-15 2021-01-08 腾讯科技(深圳)有限公司 Webpage display method and application terminal
CN108021614A (en) * 2017-08-18 2018-05-11 口碑(上海)信息技术有限公司 A kind of method and system for page dynamic load
CN108287722A (en) * 2018-01-09 2018-07-17 北京大学 A kind of decoupling method of Android application
CN108520059A (en) * 2018-04-09 2018-09-11 世纪龙信息网络有限责任公司 Loading method, system, computer equipment and the storage medium of the client H5 pages
CN109413148A (en) * 2018-09-18 2019-03-01 平安科技(深圳)有限公司 Access control method, server, terminal and computer scale storage medium
CN109298900A (en) * 2018-10-23 2019-02-01 中国农业银行股份有限公司 A kind of application fractionation and on-demand loading method, apparatus
CN109710870A (en) * 2018-12-27 2019-05-03 北京微播视界科技有限公司 Loading method, device, electronic equipment and the readable storage medium storing program for executing of the H5 page
CN112148395A (en) * 2019-06-26 2020-12-29 杭州萤石软件有限公司 Page display method, device, equipment and storage medium
CN110427237B (en) * 2019-07-29 2023-10-20 创新先进技术有限公司 Method and device for cross-application access to target page and electronic equipment
CN111177600B (en) * 2019-12-26 2023-03-21 北京明略软件系统有限公司 Built-in webpage loading method and device based on mobile application
CN111258559B (en) * 2020-02-21 2022-07-19 南京新贝金服科技有限公司 Hybrid application multi-level page routing skip method based on fact Native
CN112559927B (en) * 2020-12-23 2023-01-03 上海哔哩哔哩科技有限公司 Webpage loading method and device

Also Published As

Publication number Publication date
CN112988284A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN112988284B (en) Application program starting method and device, computer equipment and storage medium
US11868785B2 (en) Application program page processing method and device
US20200057660A1 (en) Method and system for rendering user interfaces
CN107957941B (en) Method and device for processing memory leakage of mobile terminal
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
US20150317172A1 (en) Generating a replacement binary for emulation of an application
CN111389014A (en) Game resource data monitoring method and device, computer equipment and storage medium
CN107526623B (en) Data processing method and device
CN112667246A (en) Application function extension method and device and electronic equipment
CN111177113A (en) Data migration method and device, computer equipment and storage medium
EP3797356B1 (en) Code base sharing between standalone and web-based versions of an application due to the implementing of an emulated network communication channel
CN110659435A (en) Page data acquisition processing method and device, computer equipment and storage medium
CN110442407B (en) Application program processing method and device
US10599444B2 (en) Extensible input stack for processing input device data
CN112882769A (en) Skill pack data processing method, skill pack data processing device, computer equipment and storage medium
CN115794583A (en) Kernel analysis method and device
US20190213015A1 (en) Extensible input stack for processing input device data
CN114936189A (en) Application program operation method and device, computer equipment and readable storage medium
CN112860355A (en) Application program running and publishing method and device, computer equipment and storage medium
CN114690988B (en) Test method and device and electronic equipment
CN113051231A (en) File analysis method and device, computer equipment and storage medium
CN110908958B (en) File processing method, device, terminal and storage medium
CN111008131B (en) Automated testing method, apparatus, computer device and storage medium
CN112257106B (en) Data detection method and device
CN111158609B (en) Data storage method and device, computer 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