Disclosure of Invention
The first aspect of the embodiments of the present invention discloses an application loading method, which includes:
when any application page in a target application generated according to an installation package of the target application is determined to be displayed, acquiring identifiers of N sub-resource files in a resource package of the application page, wherein the resource package is a resource package required for displaying the application page;
the target application is an uninstalled application, and an installation package of the target application comprises a plurality of sub installation files; a plurality of sub installation files are commonly used for realizing the application page; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files;
acquiring N sub-resource files according to the identifiers of the N sub-resource files;
and running the plurality of sub-installation files to render or draw the N sub-resource files, thereby generating the application page and displaying the application page.
As a possible implementation manner, in the application loading method, the determining that any application page in the target application generated according to the installation package of the target application needs to be displayed includes:
if a touch instruction aiming at the identifier of the application page is received, determining that any application page in the target application generated according to the installation package of the target application needs to be displayed; or
And if the voice instruction aiming at the application page is received, determining that any application page in the target application generated according to the installation package of the target application needs to be displayed.
As a possible implementation manner, in the application loading method, each sub installation file includes a code file and a configuration file; the operating the plurality of sub-installation files to render or draw the N sub-resource files, so as to generate the application page and display the application page includes:
and running a plurality of configuration files in the plurality of sub-installation files to render or draw the N sub-resource files, thereby generating the application page and displaying the application page.
As a possible implementation manner, in the application loading method, the running a plurality of configuration files in the plurality of sub-installation files to render or draw N sub-resource files, so as to generate the application page includes:
calling a frame file built in an operating system based on a plurality of configuration files in the plurality of sub-installation files;
and analyzing the N sub-resource files through a frame file to generate the application page.
The second aspect of the embodiments of the present invention discloses an application loading method, which includes:
when any application page in a target application generated by a plurality of installation packages for running the target application is determined to be displayed, acquiring an identifier of N sub-resource files included in each resource package in a plurality of resource packages of the application page, wherein the plurality of resource packages are resource packages required for displaying the application page;
the target application is an uninstalled application, and each installation package of the target application comprises a plurality of sub installation files; the multiple sub installation files are commonly used for realizing corresponding parts of the application pages; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files;
acquiring N sub-resource files according to the identifiers of the N sub-resource files included in each resource packet;
and operating the plurality of sub-installation files to render or draw the corresponding N sub-resource files, thereby generating the corresponding part of the application page and displaying the corresponding part of the application page.
A third aspect of the present invention discloses an application loading apparatus, including:
the system comprises a detection module, a display module and a display module, wherein the detection module is used for acquiring the identifiers of N sub-resource files in a resource package of an application page when any application page in a target application generated according to an installation package of the target application is determined to be displayed, and the resource package is a resource package required for displaying the application page;
the target application is an uninstalled application, and an installation package of the target application comprises a plurality of sub installation files; a plurality of sub installation files are commonly used for realizing the application page; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files;
the acquisition module is used for acquiring the N sub-resource files according to the identifiers of the N sub-resource files;
and the execution module is used for operating the plurality of sub-installation files to render or draw the N sub-resource files, so that the application page is generated and displayed.
As a possible implementation manner, in the application loading apparatus, the detection module is further configured to determine that any application page in the target application generated according to the installation package of the target application needs to be displayed if a touch instruction for the identifier of the application page is received; or
The detection module is further used for determining that any application page in the target application generated according to the installation package of the target application needs to be displayed if a voice instruction for the application page is received.
A fourth aspect of the present invention discloses an application loading apparatus, including:
the system comprises a detection module, a display module and a display module, wherein the detection module is used for acquiring the identifier of N sub-resource files included in each resource package in a plurality of resource packages of an application page when any application page in a target application generated by a plurality of installation packages for running the target application is determined to be displayed, and the resource packages are required for displaying the application page;
the target application is an uninstalled application, and each installation package of the target application comprises a plurality of sub installation files; the multiple sub installation files are commonly used for realizing corresponding parts of the application pages; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files;
the acquisition module is used for acquiring N sub-resource files according to the identifiers of the N sub-resource files included in each resource packet;
and the execution module is used for operating the plurality of sub-installation files to render or draw the corresponding N sub-resource files, so that the corresponding part of the application page is generated and displayed.
A fifth aspect of the embodiments of the present invention discloses a computer device, where the computer device includes a processor, and the processor is configured to implement the steps of the application loading method when executing a computer program stored in a memory.
A sixth aspect of the present invention discloses a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above application loading method.
According to the technical scheme, the embodiment of the invention has the following advantages:
the embodiment of the invention discloses an application loading method and device, a computer device and a computer readable storage medium, which can greatly reduce the storage space occupied by an application program package and optimize the downloading efficiency and the opening efficiency.
Detailed Description
In order to solve the above problems, an embodiment of the present invention discloses an application loading method and apparatus, a computer apparatus, and a computer-readable storage medium.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An implementation environment of the embodiment of the present invention will be described below, where the implementation environment includes a terminal and a server, the terminal may be a mobile phone, a computer, a tablet computer, and other types of devices, and an operating system of the terminal may be an android system, an ios system of apple, and other systems. The terminal is connected with the server through a network, the server is used for distributing the application to the terminal through the network connection, and the terminal is used for running the application.
The configuration file of the application is stored in the server, the configuration file comprises data and operation logic required by the operation of the application, the terminal can acquire the configuration file of the application from the server, and a native page of the application is generated and displayed according to the configuration file, so that the operation of the application is realized. In addition, in the process of running the application by the terminal, the installation is not needed, and the data required by the running of the application can be acquired from the server.
The server can also update the configuration file of the application so as to provide the updated configuration file for the terminal, and the terminal runs the updated application.
In addition, the server may also store an installation file of the application, and the terminal may acquire the installation file of the application from the server, install the application according to the installation file, and then run the application. Of course, the server may also update the installation file of the application so as to provide the updated installation file for the terminal, and the terminal installs the updated application according to the updated installation file.
Fig. 1 is a flowchart of an application loading method 100 according to an embodiment of the present invention, where the application loading method 100 is applied to a terminal. The application loading method 100 includes step S102, step S104, and step S106.
Step S102: when any application page in the target application generated according to the installation package of the target application is determined to be displayed, acquiring the identifiers of N sub-resource files in a resource package of the application page, wherein the resource package is a resource package required for displaying the application page.
The target application is an uninstalled application, and an installation package of the target application comprises a plurality of sub installation files; a plurality of sub installation files are commonly used for realizing the application page; the N is a natural number, and is greater than or equal to 1 and less than or equal to the total number of the plurality of sub-installation files. In one possible implementation, the format of the sub mount file is. rpk (i.e., the suffix name of the sub mount file is rpk).
Step S104: and acquiring the N sub-resource files according to the identifiers of the N sub-resource files. In one possible implementation, the format of the child resource file is. rpk (i.e., the suffix name of the child resource file is rpk).
Step S106: and running the plurality of sub-installation files to render or draw the N sub-resource files, thereby generating the application page and displaying the application page.
In an embodiment of the present invention, the determining that any application page in the target application generated according to the installation package of the target application needs to be displayed in step S102 includes: and if a touch instruction aiming at the identifier of the application page is received, determining that any application page in the target application generated according to the installation package of the target application needs to be displayed.
Optionally, in another embodiment of the present invention, the determining that any application page in the target application generated according to the installation package of the target application needs to be displayed in step S102 includes: and if the voice instruction aiming at the application page is received, determining that any application page in the target application generated according to the installation package of the target application needs to be displayed.
In one embodiment of the present invention, each of the sub-installation files includes a code file and a configuration file (both of the code file and the configuration file are in the format of. rpk, i.e., both of the code file and the configuration file have a suffix name of rpk); step S106, the operating the plurality of sub-installation files to render or draw the N sub-resource files, so as to generate the application page and display the application page includes: and running a plurality of configuration files in the plurality of sub-installation files to render or draw the N sub-resource files, thereby generating the application page and displaying the application page. Specifically, the running of the configuration files in the sub-installation files to render or draw the N sub-resource files so as to generate the application page includes: calling a frame file built in an operating system based on a plurality of configuration files in the plurality of sub-installation files; and analyzing the N sub-resource files through a frame file to generate the application page.
The invention also provides an application loading method of another embodiment, which comprises the following steps: when any application page in the target application generated by a plurality of installation packages for running the target application is determined to be displayed, acquiring the identifier of N sub-resource files included in each resource package in a plurality of resource packages of the application page, wherein the plurality of resource packages are resource packages required for displaying the application page.
The target application is an uninstalled application, and each installation package of the target application comprises a plurality of sub installation files; the multiple sub installation files are commonly used for realizing corresponding parts of the application pages; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files.
And acquiring N sub-resource files according to the identifiers of the N sub-resource files included in each resource packet.
And operating the plurality of sub-installation files to render or draw the corresponding N sub-resource files, thereby generating the corresponding part of the application page and displaying the corresponding part of the application page.
Fig. 2 is a program module diagram of an application loading apparatus 200 according to an embodiment of the present invention, where the application loading apparatus 200 is applied to a terminal. The application loading apparatus 200 corresponds to the application loading method 100, and the application loading method 100 can be said to be executed in the application loading apparatus 200. The application loading apparatus 200 includes: a detection module 202, an acquisition module 204, and an execution module 206.
The detecting module 202 is configured to, when it is determined that any application page in the target application generated according to the installation package of the target application needs to be displayed, obtain identifiers of N sub-resource files in a resource package of the application page, where the resource package is a resource package required for displaying the application page.
The target application is an uninstalled application, and an installation package of the target application comprises a plurality of sub installation files; a plurality of sub installation files are commonly used for realizing the application page; the N is a natural number, and is greater than or equal to 1 and less than or equal to the total number of the plurality of sub-installation files.
The obtaining module 204 is configured to obtain the N sub-resource files according to the identifiers of the N sub-resource files.
And the execution module 206 is configured to run the multiple sub-installation files to render or draw the N sub-resource files, so as to generate the application page and display the application page.
In an embodiment of the present invention, the detection module 202 is further configured to determine that any application page in the target application generated according to the installation package of the target application needs to be displayed if a touch instruction for the identifier of the application page is received.
Optionally, in another embodiment of the present invention, the detection module 202 is further configured to determine that any application page in the target application generated according to the installation package of the target application needs to be displayed if a voice instruction for the application page is received.
The present invention also provides an application loading apparatus of another embodiment, including: the device comprises a detection module, an acquisition module and an execution module.
The detection module is used for acquiring the identifier of the N sub-resource files included in each resource package of the multiple resource packages of the application page when any application page in the target application generated by the multiple installation packages for running the target application is determined to be displayed, wherein the multiple resource packages are the resource packages required for displaying the application page.
The target application is an uninstalled application, and each installation package of the target application comprises a plurality of sub installation files; the multiple sub installation files are commonly used for realizing corresponding parts of the application pages; the N is greater than or equal to 1 and less than or equal to a total number of the plurality of sub-mount files.
And the acquisition module is used for acquiring the N sub-resource files according to the identifiers of the N sub-resource files included in each resource packet.
And the execution module is used for operating the plurality of sub-installation files to render or draw the corresponding N sub-resource files, so that the corresponding part of the application page is generated and displayed.
The embodiment of the present invention further discloses a computer device, which includes a processor, and the processor is configured to implement the steps of the application loading method 100 when executing the computer program stored in the memory.
In addition, the embodiment of the present invention also discloses a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the application loading method 100 are implemented.
According to the application loading method 100, the application loading device 200, the computer device and the computer readable storage medium disclosed by the embodiment of the invention, after an rpk file is split into a source code file package A-code.rpk and a resource file package A-res.rpk, a user only needs to download the A-code.rpk to the local part when clicking to open an application A, and then the display can be quickly opened; in the display process, if the resource file of the corresponding page is needed to be used, the resource file of the corresponding page in the A-res. The method has the advantages that the volume of the program package can be greatly reduced, the downloading speed and the opening efficiency are optimized, the resources are obtained according to the requirement, the waste is avoided, the space is not occupied, the independent downloading is realized, and the loading efficiency of the main program package is not influenced.
Correspondingly, the packing and compiling mode of the fast application is changed, and on the premise of not changing the original development mode, when rpk files are packed and compiled, resource files are packed into another package A-res.rpk in a unified manner, and source code files and application configuration information are packed into a package A-code.rpk. By the method, the volume of the running program package can be greatly reduced, and the downloading and using speed and experience of a user can be improved.
Each functional unit in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.