CN113849195A - Application program loading method and device, storage medium and terminal - Google Patents

Application program loading method and device, storage medium and terminal Download PDF

Info

Publication number
CN113849195A
CN113849195A CN202111103959.4A CN202111103959A CN113849195A CN 113849195 A CN113849195 A CN 113849195A CN 202111103959 A CN202111103959 A CN 202111103959A CN 113849195 A CN113849195 A CN 113849195A
Authority
CN
China
Prior art keywords
target
application program
target application
file
information
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.)
Pending
Application number
CN202111103959.4A
Other languages
Chinese (zh)
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.)
Hangzhou Douku Software Technology Co Ltd
Original Assignee
Hangzhou Douku Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Douku Software Technology Co Ltd filed Critical Hangzhou Douku Software Technology Co Ltd
Priority to CN202111103959.4A priority Critical patent/CN113849195A/en
Publication of CN113849195A publication Critical patent/CN113849195A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

The application discloses an application program loading method, an application program loading device, a storage medium and a terminal, and relates to the technical field of application program technology development. Firstly, determining preloading information of a target application program according to running data of the target application program when the target application program is loaded for the first time; then, when the target application program meets the loading condition, acquiring the preloading information of the target application program; and finally, preloading is carried out according to the preloading information before the target application program is loaded or in the loading process. Since the loading information of the target application program in the loading process can be predetermined, the target file page of the target preset file can be preloaded in advance before or in the loading process of the target application program, and when the target application program loads the target preset file, the loading result of the loaded target preset file can be directly used, so that the overall loading time of the target application program is shortened, and the overall loading speed of the target application program is improved.

Description

Application program loading method and device, storage medium and terminal
Technical Field
The present application relates to the technical field of application program technology development, and in particular, to an application program loading method, an application program loading device, a storage medium, and a terminal.
Background
With the development of science and technology, terminals are also increasingly appearing in people's lives, and people can load various applications to realize various functions by controlling the terminals, so that a loading method of the applications in the terminals also becomes one of the important points of research of technicians in the field.
Disclosure of Invention
The application provides an application program loading method, an application program loading device, a storage medium and a terminal, and can solve the technical problem that the application program loading speed is low in the related technology.
In a first aspect, an embodiment of the present application provides an application program loading method, where the method includes:
determining preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, wherein the preloading information is attribute information of a target file page of the target preset file in the loading process of the target application program;
when the target application program meets the loading condition, acquiring the preloading information of the target application program;
and preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program.
In a second aspect, an embodiment of the present application provides an application loading apparatus, where the apparatus includes:
the system comprises a preloading information determining module, a pre-loading information determining module and a pre-loading information determining module, wherein the preloading information determining module is used for determining the preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, and the preloading information is the loading information of the target preset file in the loading process of the target application program;
the preloading information acquisition module is used for acquiring the preloading information of the target application program when the target application program meets the loading condition;
and the preloading information execution module is used for preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the above-mentioned method.
In a fourth aspect, embodiments of the present application provide a terminal including a memory, a processor, and a computer program stored on the memory and executable on the processor.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
the application provides an application program loading method, which comprises the steps of firstly, determining preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, wherein the preloading information is attribute information of a target file page of the target preset file in the target application program loading process; then, when the target application program meets the loading condition, acquiring the preloading information of the target application program; and finally, preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program. Since the loading information of the target application program in the loading process can be predetermined, the target file page of the target preset file can be preloaded in advance before or in the loading process of the target application program, and when the target application program loads the target preset file, the loading result of the loaded target preset file can be directly used, so that the overall loading time of the target application program is shortened, and the overall loading speed of the target application program is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is an exemplary system architecture diagram of an application loading method according to an embodiment of the present application;
fig. 2 is a system interaction diagram of an application program loading method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an application loading method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating an application loading method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an application loading apparatus according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all 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 application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
Fig. 1 is an exemplary system architecture diagram of an application loading method according to an embodiment of the present application.
As shown in fig. 1, the system architecture may include a terminal 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminals 101 and servers 103. Network 102 may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire or a coaxial cable, and the Wireless communication link includes a bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, a microwave communication link, or the like.
The terminal 101 may interact with the server 103 through the network 102 to receive messages from the server 103 or to send messages to the server 103. The terminal 101 may be hardware or software. When the terminal 101 is hardware, it can be a variety of electronic devices including, but not limited to, smart watches, smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal 101 is software, it may be installed in the electronic devices listed above, and it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, and is not limited in this respect.
The server 103 may be a business server providing various services. The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited in particular herein.
It should be understood that the number of terminals, networks, and servers in fig. 1 is merely illustrative, and that any number of terminals, networks, and servers may be used, as desired for an implementation.
Referring to fig. 2, fig. 2 is a system interaction diagram of an application loading method according to an embodiment of the present application, it can be understood that, in the embodiment of the present application, an execution main body may be a terminal or a processor in the terminal, or may also be a service related to application loading executed in the terminal, and for convenience of description, a system interaction process in the application loading method is introduced with reference to fig. 1 and fig. 2 by taking the execution main body as the processor in the terminal as an example.
S201, a user triggers and loads a target application program for the first time.
S202, the processor determines the preloading information of the target application program according to the running data when the target application program is loaded for the first time and the target preset file corresponding to the target application program, wherein the preloading information is the attribute information of a target file page of the target preset file in the loading process of the target application program.
Optionally, before determining the preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and the target preset file corresponding to the target application program, the method further includes: when the scanning condition is met, scanning all application programs in the terminal; respectively acquiring preset files designated by each application program and acquiring node information corresponding to each preset file; the preset file comprises at least one file page, and the file pages in the same preset file correspond to the same node information.
Optionally, before determining the preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and the target preset file corresponding to the target application program, the method further includes: when the target application program meets the loading condition and the preloading information of the target application program does not exist, determining that the target application program is loaded for the first time; and acquiring running data in the first loading process of the target application program.
Optionally, determining the preloading information of the target application program according to the running data of the target application program when the target application program is loaded for the first time and a target preset file corresponding to the target application program, where the determining includes: analyzing the running data in the first loading process of the target application program to obtain file page information of all file pages read from a disk to a memory in the first loading process of the target application program, wherein the file page information at least comprises node information corresponding to a file to which the file page belongs; determining target file page information of a target file page corresponding to a target application program according to the file page information of each file page and target node information corresponding to a target preset file in the target application program; and determining the preloading information of the target application program according to the target file page information corresponding to the target application program.
Optionally, the file page information further includes an offset initial position and an offset length of the file page in the file to which the file page belongs; determining the preloading information of the target application program according to the target file page information corresponding to the target application program, wherein the step of determining the preloading information of the target application program comprises the following steps: determining the position information of a target file page corresponding to the target application program in a target preset file according to the target file page information corresponding to the target application program; acquiring a loading time identifier of a target file page corresponding to a target application program, and sequencing each target file page according to the loading time identifier of each target file page; and taking the sequencing result of each target file page and the position information of each target file page as the attribute information of the target file page of the target preset file in the loading process of the target application program.
And S203, the user does not trigger the loading of the target application program for the first time.
And S204, acquiring the preloading information of the target application program when the target application program meets the loading condition.
S205, pre-loading the target file page of the target preset file according to the pre-loading information before or during the loading of the target application program.
Optionally, preloading a target file page of the target preset file according to the preloading information includes: reading each target file page corresponding to the target preset file from the disk according to the position information of each target file page in the preloading information; and loading all the target file pages in the memory in parallel according to the sequencing result of the target file pages so as to pre-load the target file pages of the target preset file.
Optionally, the target application satisfies a loading condition, including: starting a target application program, and determining that the target application program meets a loading condition; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: and in the loading process of the target application program, preloading a target file page of the target preset file according to the preloading information.
Or
The target application program meets the loading condition and comprises the following steps: determining that the target application program meets the loading condition when a target event indicating the target application program exists; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: and pre-loading a target file page of the target preset file according to the pre-loading information before the target application program is loaded.
In the embodiment of the application, the preloading information of the target application program is determined according to the running data of the target application program when the target application program is loaded for the first time and the target preset file corresponding to the target application program, wherein the preloading information is the attribute information of a target file page of the target preset file in the loading process of the target application program; then, when the target application program meets the loading condition, acquiring the preloading information of the target application program; and finally, preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program. Since the loading information of the target application program in the loading process can be predetermined, the target file page of the target preset file can be preloaded in advance before or in the loading process of the target application program, and when the target application program loads the target preset file, the loading result of the loaded target preset file can be directly used, so that the overall loading time of the target application program is shortened, and the overall loading speed of the target application program is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating an application loading method according to an embodiment of the present disclosure.
As shown in fig. 3, the application program loading method includes:
s301, determining preloading information of the target application program according to the running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, wherein the preloading information is attribute information of a target file page of the target preset file in the loading process of the target application program.
In the related art, people can load various application programs through a control terminal to realize various functions, in the loading process of the application programs, files corresponding to the application programs are generally run in series through a single thread, that is, in the loading process of the application programs, a subsequent file can be continuously loaded until the previous file is completely loaded, so that the loading process of the application programs is completed, and the application programs, particularly the application programs with long starting time (for example, game application programs which have long starting time and slow loading speed due to loading of animation and game resources when the application programs are started, are obtained.
In view of the above technical problems, in the embodiment of the present application, by loading the designated file in the application program in advance, the loading time of the application program is reduced, and the loading speed of the application program is increased.
Specifically, in the embodiment of the present application, the target application may be any application installed in the terminal, and when it is monitored that the target application satisfies the loading condition in the operation process of the terminal, that is, when the terminal needs to load the target application, it may be determined whether the target application is first loaded, and if the target application is not first loaded, the target application is first loaded and the operation data of the target application in the first loading process is obtained, where the operation data in the first loading process of the target application at least includes all file page information from a disk to a memory in the application loading process, and then the preloading information of the target application is determined according to the operation data of the target application in the first loading process and a target preset file corresponding to the target application, the preloading information is attribute information of a target preset file in the loading process of the target application program, and the target preset file can be one or more specified files in the loading process of the target application program.
It is understood that a file loaded in an application program is composed of one or more file pages, a file page can be considered as a unit constituting the file, for example, a file has a size of 100 megabytes, and the file is composed of 100 file pages, then it is possible that the first file page has a size of 2 megabytes at the first position or first area of the file, and the sum of the data sizes of the file pages is the size of the file. The application program starting process may be considered to be loading according to a file page sequence in a corresponding file, so that the attribute information of the target file page of the target preset file may also be specifically the attribute information of the target file page in the target preset file, the target file page may be one or more specified file pages in the target preset file loaded by the target application program, and the attribute information may be information such as a loading sequence and a storage location of the target file page.
And S302, acquiring the preloading information of the target application program when the target application program meets the loading condition.
When the target application program meets the loading condition, and whether the target application program is loaded for the first time is judged, the preloading information of the target application program is determined in the previous first loading of the target application program, and the preloading information of the target application program can be directly obtained when the target application program is monitored to meet the loading condition.
And S303, preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program.
After the preloading information of the target application program is acquired, a target preset file of the target application program can be determined according to the preloading information, and a target file page of the target preset file is preloaded.
In the process of preloading the target file page of the target preset file, different modes can be used for preloading the target file page of the target preset file according to the specific loading conditions met by the target application program.
One possible implementation is to determine that the target application satisfies the loading condition after the target application is started. The starting process of the target application program can be that a user starts the target application program by touching an icon corresponding to the target application program on a display screen in the terminal; the method may further include the step of sending a voice command similar to the starting of the target application program by the user to start the target application program.
After the target application program is monitored to be started, the target application program is in the loading process, but the target preset file can be one or more specified files in the loading process of the target application program, so that the target preset file is not necessarily loaded first in the loading process of the target application program, and at the moment, the target file page of the target preset file can be preloaded according to the preloading information in the loading process of the target application program, namely, the target file page of the target preset file is loaded in advance according to the preloading information in the loading process of the target application program.
Another possible implementation is to determine that the target application satisfies the loading condition when there is a target event indicating the target application. The target event indicating the target application program may be voice, user habit, gesture, geographical location information, and the like associated with the target application program, and the specific target time may be specified through big data analysis or by a user.
Because the target application program is not started when the target event indicating the target application program exists, the target file page of the target preset file can be preloaded according to the preloading information before the target application program is loaded, that is, the target file page of the target preset file is loaded in advance according to the preloading information before the target application program is loaded.
In the embodiment of the application, the preloading information of the target application program is determined according to the running data of the target application program when the target application program is loaded for the first time and the target preset file corresponding to the target application program, wherein the preloading information is the attribute information of a target file page of the target preset file in the loading process of the target application program; then, when the target application program meets the loading condition, acquiring the preloading information of the target application program; and finally, preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program. Since the loading information of the target application program in the loading process can be predetermined, the target file page of the target preset file can be preloaded in advance before or in the loading process of the target application program, and when the target application program loads the target preset file, the loading result of the loaded target preset file can be directly used, so that the overall loading time of the target application program is shortened, and the overall loading speed of the target application program is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating an application loading method according to another embodiment of the present application.
As shown in fig. 4, the method includes:
s401, when the scanning condition is met, scanning all the application programs in the terminal.
It can be understood that the target preset file may be one or more specified files in the target application program loading process, and the target preset file may also include one or more file pages, but all the file pages in the target preset file are not required for the target application program loading, so in the embodiment of the present application, in order to more accurately load the target preset file, the target file page required in the target preset file loaded by the target application program may be obtained, and in the process of preloading the target file page of the target preset file according to the preloading information, only the target file page required in the target preset file may be pre-recorded, and file pages other than the target file page in the target preset file do not need to be loaded, so as to reduce time wasted in loading unnecessary file pages.
In order to determine the target file page required by the target application program to load the target preset file, the target preset file in the target application program may be determined first. Specifically, all the applications in the terminal may be scanned when the terminal meets the scanning condition, where the meeting of the scanning condition in the terminal may be that the terminal meets the scanning condition when events such as startup of the terminal, update of any application in the terminal, installation and uninstallation of any application in the terminal are monitored, and at this time, all the applications in the terminal may be scanned to obtain data corresponding to all the applications in the terminal.
S402, respectively obtaining preset files designated by each application program and obtaining node information corresponding to each preset file.
After data corresponding to all application programs in the terminal are acquired, preset files designated by the application programs can be acquired respectively, wherein the preset files are one or more files in the loading process of the application programs.
Optionally, the preset file is not all files corresponding to the application program in the loading process, and may be a file whose time consumption exceeds a preset time consumption threshold in the loading process of the application program, that is, the preset file may be a file whose time consumption is long in the loading process of the application program, so that after the preset file can be preloaded in advance in the following process, the time consumption of the application program for loading the preset file can be reduced. In addition, the preset file may also be a default file specified by a developer, for example, the preset file may be an apk file or a dex file, and the default preset file may be a preset file that the developer performs repeated tests at the cloud, and screens out the configuration with the best profit as the default of the application program by configuring different loading file lists. In addition, the preset file may also be a file that the application program itself configures by itself through an open interface, and in the embodiment of the present application, the specific type of the preset file is not limited.
After the preset file designated by each application program is determined, node information corresponding to the preset file can be obtained, wherein the node information can be regarded as an identity label and is used for marking the identities of different files, and the node information of different files is different. For example, the node information may be an inode node, wherein the inode node may correspond to a file name and/or a file saving path of a preset file.
It can be understood that, since the preset file may include one or more file pages, that is, the preset file includes at least one file page, file pages in the same preset file correspond to the same node information, and file pages in different preset files correspond to different node information.
And S403, when the target application program meets the loading condition and the preloading information of the target application program does not exist, determining that the target application program is loaded for the first time.
It can be understood that when the target application program is loaded for the first time, the preloading information of the target application program needs to be determined, and then after it is detected that the target application program meets the loading condition, it is determined whether the preloading information of the target application program is stored in the terminal, and if the preloading information of the target application program is not stored in the terminal, it can be determined that the preloading information of the target application program does not exist in the terminal, and thus it can be determined that the target application program is loaded for the first time.
S404, acquiring running data in the first loading process of the target application program.
After determining that the target application program is loaded for the first time, the running data of the target application program in the process of loading the target application program for the first time may be monitored. For example, trace information of a target application program can be captured after the target application program is started through an fttrace technology, a data source of the trace is configured as an add-page event in the fttrace event, the fttrace event records a runtime behavior of a kernel, the add-page event includes file page information from a disk to a memory in an application program loading process, running data in the first loading process of the target application program can also be considered to at least include all the file page information from the disk to the memory in the application program loading process, and the running data in the first loading process of the target application program can be obtained through the fttrace technology.
If the target application program is determined not to be loaded for the first time, the step of acquiring the preloading information of the target application program can be directly executed in the previous first loading of the target application program.
S405, analyzing the running data in the first loading process of the target application program to obtain the file page information of all the file pages read from the disk to the memory in the first loading process of the target application program.
After the operation data in the first loading process of the target application program is obtained, the operation data in the first loading process of the target application program can be analyzed, and since the file loaded in the application program is composed of one or more file pages, all the file pages read from a disk to a memory in the first loading process of the target application program and file page information corresponding to each file page can be obtained through analysis, wherein the file page information at least comprises node information corresponding to the file to which the file page belongs.
S406, determining target file page information of a target file page corresponding to the target application program according to the file page information of each file page and target node information corresponding to a target preset file in the target application program.
Since the file page information at least includes node information corresponding to a file to which the file page belongs, the node information corresponding to the file to which each file page belongs can be compared with target node information corresponding to a target preset file in the target application program, and a file page of node information identical to the target node information corresponding to the target preset file in the target application program is determined as a target file page of the preset target file in the target application program, that is, a file page required when the target application program loads the target preset file, and thus target file page information of the target file page can be obtained.
S407, determining the preloading information of the target application program according to the target file page information corresponding to the target application program.
The target file page is also the file page required by the target application program when loading the target preset file, and then the preloading information of the target application program is determined according to the target file page information corresponding to the target application program, so that only the target file page required in the target preset file can be pre-recorded without loading the file pages except the target file page in the target preset file in the process of preloading the target preset file according to the preloading information, and the time wasted by unnecessary file pages is reduced.
Optionally, the file page information further includes an offset initial position and an offset length of the file page in the file to which the file page belongs, and in the process of determining the preloading information of the target application program according to the target file page information corresponding to the target application program, the position information of the target file page corresponding to the target application program in the target preset file may be determined according to the offset initial position and the offset length of the target file page in the target preset file included in the target file page information corresponding to the target application program.
The offset initial position and the offset length of the target file page in the target preset file may be regarded as data corresponding to the target file page, and the area information or the saving information in the data corresponding to the target preset file, so that the position information of the target file page corresponding to the target application program in the target preset file may be determined according to the offset initial position and the offset length of the target file page in the target preset file included in the target file page information corresponding to the target application program.
Furthermore, the loading time identifier of the target file page corresponding to the target application program can be obtained, the target file pages are sorted according to the loading time identifier of each target file page, and finally, the sorting result of each target file page and the position information of each target file page are used as the pre-loading information of the target application program.
And S408, acquiring the preloading information of the target application program when the target application program meets the loading condition.
When the target application program is monitored to meet the loading condition, and whether the target application program is loaded for the first time is judged, the preloading information of the target application program is determined in the previous first loading of the target application program, and the preloading information of the target application program can be directly obtained when the target application program is monitored to meet the loading condition.
And S409, reading each target file page corresponding to the target preset file from the disk according to the position information of each target file page in the preloading information before or during the loading of the target application program.
After the pre-loading information of the target application program is obtained, and the pre-loading information of the target application program includes the sorting result of each target file page and the position information of each target file page, each target file page corresponding to the target preset file can be read from the disk according to the position information of each target file page in the pre-loading information.
S410, loading all the target file pages in the memory in parallel according to the sequencing result of the target file pages so as to pre-load the target file pages of the target preset file.
Optionally, after reading each target file page corresponding to the target preset file from the disk, each target file page may be loaded in parallel in the memory through at least two threads according to the sorting result of the target file pages, that is, each target file page is loaded at the same time, so that the target file pages of the target preset file are preloaded. For example, according to the sorting result of the target file pages, the target file pages in the first two bits of the sorting result may be loaded in parallel in the memory through two threads. Compared with the prior art, the loading speed of the file page can be effectively improved by serially loading the file page through a single thread.
In the embodiment of the application, in order to more accurately load the target preset file, a target file page required by the target application program for loading the target preset file can be acquired, so that in the process of preloading the target file page of the target preset file according to the preloading information, only the target file page required by the target preset file can be pre-recorded, and file pages in the target preset file except the target file page do not need to be loaded, so that the time wasted by unnecessary file pages is reduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an application loading device according to another embodiment of the present application.
As shown in fig. 5, the application loading apparatus 500 includes:
the preloading information determining module 510 is configured to determine preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and a target preset file corresponding to the target application program, where the preloading information is attribute information of a target file page of the target preset file in a target application program loading process.
Optionally, the application loading apparatus 500 further includes:
and the scanning module is used for scanning all the application programs in the terminal when the scanning condition is met.
And the node information acquisition module is used for respectively acquiring the preset files appointed by each application program and acquiring the node information corresponding to each preset file.
Optionally, the application loading apparatus 500 further includes:
and the first loading determining module is used for determining that the target application program is loaded for the first time when the target application program meets the loading condition and the preloading information of the target application program does not exist.
And the first loading acquisition module is used for acquiring the running data of the target application program in the first loading process.
The preloading information determining module 510 is further configured to analyze the running data in the first loading process of the target application program to obtain file page information of all file pages read from the disk to the internal memory in the first loading process of the target application program, where the file page information at least includes node information corresponding to a file to which the file page belongs; determining target file page information of a target file page corresponding to a target application program according to the file page information of each file page and target node information corresponding to a target preset file in the target application program; and determining the preloading information of the target application program according to the target file page information corresponding to the target application program.
The file page information also comprises an offset initial position and an offset length of the file page in the file to which the file page belongs; determining the preloading information of the target application program according to the target file page information corresponding to the target application program, wherein the step of determining the preloading information of the target application program comprises the following steps: determining the position information of a target file page corresponding to the target application program in a target preset file according to the target file page information corresponding to the target application program; acquiring a loading time identifier of a target file page corresponding to a target application program, and sequencing each target file page according to the loading time identifier of each target file page; and taking the sequencing result of each target file page and the position information of each target file page as the attribute information of the target file page of the target preset file in the loading process of the target application program.
The pre-loading information obtaining module 520 is configured to obtain the pre-loading information of the target application program when it is monitored that the target application program meets the loading condition.
The preloading information executing module 530 is configured to preload a target file page of the target preset file according to the preloading information before or during the loading of the target application program.
The preloading information executing module 530 is further configured to preload a target file page of the target preset file according to the preloading information, and includes: reading each target file page corresponding to the target preset file from the disk according to the position information of each target file page in the preloading information; and loading all the target file pages in the memory in parallel so as to pre-load the target file pages of the target preset file.
Optionally, the target application satisfies a loading condition, including: starting a target application program, and determining that the target application program meets a loading condition; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: in the loading process of a target application program, preloading a target file page of a target preset file according to preloading information;
or
The target application program meets the loading condition and comprises the following steps: determining that the target application program meets the loading condition when a target event indicating the target application program exists; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: and pre-loading a target file page of the target preset file according to the pre-loading information before the target application program is loaded.
In an embodiment of the present application, an application loading apparatus includes: the system comprises a preloading information determining module, a pre-loading information determining module and a pre-loading information determining module, wherein the preloading information determining module is used for determining the preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, and the preloading information is loading information of the target preset file in the loading process of the target application program; the preloading information acquisition module is used for acquiring the preloading information of the target application program when the target application program meets the loading condition; and the preloading information execution module is used for preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program. Since the loading information of the target application program in the loading process can be predetermined, the target file page of the target preset file can be preloaded in advance before or in the loading process of the target application program, and when the target application program loads the target preset file, the loading result of the loaded target preset file can be directly used, so that the overall loading time of the target application program is shortened, and the overall loading speed of the target application program is improved.
Embodiments of the present application also provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of the above embodiments.
Further, please refer to fig. 6, where fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 6, the terminal 600 may include: at least one central processor 601, at least one network interface 604, a user interface 603, a memory 605, at least one communication bus 602.
Wherein a communication bus 602 is used to enable the connection communication between these components.
The user interface 603 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 603 may also include a standard wired interface and a wireless interface.
The network interface 604 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Central processor 601 may include one or more processing cores, among others. The central processor 601 connects the various parts within the overall terminal 600 using various interfaces and lines, and performs various functions of the terminal 600 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and calling data stored in the memory 605. Optionally, the central Processing unit 601 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The Central Processing Unit 601 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the central processor 601, but may be implemented by a single chip.
The Memory 605 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 605 includes a non-transitory computer-readable medium. The memory 605 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 605 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 605 may alternatively be at least one storage device located remotely from the central processor 601. As shown in fig. 6, the memory 605, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application loader.
In the terminal 600 shown in fig. 6, the user interface 603 is mainly used for providing an input interface for a user to obtain data input by the user; the central processing unit 601 may be configured to call the application loader stored in the memory 605, and specifically perform the following operations:
determining preloading information of the target application program according to the running data of the target application program when the target application program is loaded for the first time and a target preset file corresponding to the target application program, wherein the preloading information is attribute information of a target file page of the target preset file in the loading process of the target application program;
when the target application program meets the loading condition, acquiring the preloading information of the target application program;
and pre-loading the target file page of the target preset file according to the pre-loading information before or in the loading process of the target application program.
Optionally, before determining the preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and the target preset file corresponding to the target application program, the method further includes: when the scanning condition is met, scanning all application programs in the terminal; respectively acquiring preset files designated by each application program and acquiring node information corresponding to each preset file; the preset file comprises at least one file page, and the file pages in the same preset file correspond to the same node information.
Optionally, before determining the preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and the target preset file corresponding to the target application program, the method further includes: when the target application program meets the loading condition and the preloading information of the target application program does not exist, determining that the target application program is loaded for the first time; and acquiring running data in the first loading process of the target application program.
Optionally, determining the preloading information of the target application program according to the running data of the target application program when the target application program is loaded for the first time and a target preset file corresponding to the target application program, where the determining includes: analyzing the running data in the first loading process of the target application program to obtain file page information of all file pages read from a disk to a memory in the first loading process of the target application program, wherein the file page information at least comprises node information corresponding to a file to which the file page belongs; determining target file page information of a target file page corresponding to a target application program according to the file page information of each file page and target node information corresponding to a target preset file in the target application program; and determining the preloading information of the target application program according to the target file page information corresponding to the target application program.
Optionally, the file page information further includes an offset initial position and an offset length of the file page in the file to which the file page belongs; determining the preloading information of the target application program according to the target file page information corresponding to the target application program, wherein the step of determining the preloading information of the target application program comprises the following steps: determining the position information of a target file page corresponding to the target application program in a target preset file according to the target file page information corresponding to the target application program; acquiring a loading time identifier of a target file page corresponding to a target application program, and sequencing each target file page according to the loading time identifier of each target file page; and taking the sequencing result of each target file page and the position information of each target file page as the attribute information of the target file page of the target preset file in the loading process of the target application program.
Optionally, preloading a target file page of the target preset file according to the preloading information includes: reading each target file page corresponding to the target preset file from the disk according to the position information of each target file page in the preloading information; and loading all the target file pages in the memory in parallel so as to pre-load the target file pages of the target preset file.
Optionally, the target application satisfies a loading condition, including: starting a target application program, and determining that the target application program meets a loading condition; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: in the loading process of a target application program, preloading a target file page of a target preset file according to preloading information;
or
The target application program meets the loading condition and comprises the following steps: determining that the target application program meets the loading condition when a target event indicating the target application program exists; before or during the loading of the target application program, preloading a target file page of a target preset file according to preloading information, wherein the preloading comprises the following steps: and pre-loading a target file page of the target preset file according to the pre-loading information before the target application program is loaded.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in 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 of the embodiments of the present application. 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 should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the application loading method, apparatus, storage medium and terminal provided by the present application, those skilled in the art will recognize that there may be variations in the embodiments and applications of the method, apparatus, storage medium and terminal according to the concepts of the embodiments of the present application.

Claims (10)

1. An application loading method, comprising:
determining preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, wherein the preloading information is attribute information of a target file page of the target preset file in the loading process of the target application program;
when the target application program meets the loading condition, acquiring the preloading information of the target application program;
and preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program.
2. The method according to claim 1, wherein before determining the preloading information of the target application program according to the running data of the target application program when the target application program is first loaded and the target preset file corresponding to the target application program, the method further comprises:
when the scanning condition is met, scanning all application programs in the terminal;
respectively acquiring preset files designated by each application program and acquiring node information corresponding to each preset file;
the preset file comprises at least one file page, and the file pages in the same preset file correspond to the same node information.
3. The method according to claim 2, wherein before determining the preloading information of the target application program according to the running data of the target application program when the target application program is loaded for the first time and the target preset file corresponding to the target application program, the method further comprises:
when the target application program meets loading conditions and the preloading information of the target application program does not exist, determining that the target application program is loaded for the first time;
and acquiring the running data of the target application program in the first loading process.
4. The method according to claim 3, wherein the determining the preloading information of the target application program according to the running data of the target application program when the target application program is loaded for the first time and the target preset file corresponding to the target application program comprises:
analyzing the operating data in the first loading process of the target application program to obtain file page information of all file pages read from a disk to a memory in the first loading process of the target application program, wherein the file page information at least comprises node information corresponding to a file to which the file page belongs;
determining target file page information of a target file page corresponding to the target application program according to the file page information of each file page and target node information corresponding to a target preset file in the target application program;
and determining the preloading information of the target application program according to the target file page information corresponding to the target application program.
5. The method according to claim 4, wherein the document page information further comprises an offset initial position and an offset length of the document page in the document to which the document page belongs;
the determining the preloading information of the target application program according to the target file page information corresponding to the target application program includes:
determining the position information of a target file page corresponding to the target application program in the target preset file according to the target file page information corresponding to the target application program;
acquiring a loading time identifier of a target file page corresponding to the target application program, and sequencing each target file page according to the loading time identifier of each target file page;
and taking the sequencing result of each target file page and the position information of each target file page as the attribute information of the target file page of the target preset file in the loading process of the target application program.
6. The method according to claim 5, wherein the preloading a target file page of the target preset file according to the preloading information comprises:
reading each target file page corresponding to the target preset file from a disk according to the position information of each target file page in the preloading information;
and loading all the target file pages in the memory in parallel according to the sequencing result of the target file pages so as to pre-load the target file pages of the target preset file.
7. The method of any one of claims 1 to 6, wherein the target application satisfies a loading condition, comprising:
starting the target application program, and determining that the target application program meets loading conditions;
the pre-loading the target file page of the target preset file according to the pre-loading information before or during the loading of the target application program comprises:
in the loading process of the target application program, preloading a target file page of the target preset file according to the preloading information;
or
The target application program meets the loading condition and comprises the following steps:
determining that the target application program meets a loading condition when a target event indicating the target application program exists;
the pre-loading the target file page of the target preset file according to the pre-loading information before or during the loading of the target application program comprises:
and preloading a target file page of the target preset file according to the preloading information before the target application program is loaded.
8. An application loading apparatus, comprising:
the system comprises a preloading information determining module, a pre-loading information determining module and a pre-loading information determining module, wherein the preloading information determining module is used for determining the preloading information of a target application program according to running data when the target application program is loaded for the first time and a target preset file corresponding to the target application program, and the preloading information is the loading information of the target preset file in the loading process of the target application program;
the preloading information acquisition module is used for acquiring the preloading information of the target application program when the target application program meets the loading condition;
and the preloading information execution module is used for preloading a target file page of the target preset file according to the preloading information before or in the loading process of the target application program.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of claims 1 to 7.
10. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the steps of the method according to any of claims 1 to 7.
CN202111103959.4A 2021-09-18 2021-09-18 Application program loading method and device, storage medium and terminal Pending CN113849195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111103959.4A CN113849195A (en) 2021-09-18 2021-09-18 Application program loading method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111103959.4A CN113849195A (en) 2021-09-18 2021-09-18 Application program loading method and device, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN113849195A true CN113849195A (en) 2021-12-28

Family

ID=78974725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111103959.4A Pending CN113849195A (en) 2021-09-18 2021-09-18 Application program loading method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113849195A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541102A (en) * 2023-06-27 2023-08-04 荣耀终端有限公司 File preloading method and device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541102A (en) * 2023-06-27 2023-08-04 荣耀终端有限公司 File preloading method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN106598655B (en) Application page processing method and device
CN109976821B (en) Application program loading method and device, terminal and storage medium
CN108829457B (en) Application program prediction model updating method and device, storage medium and terminal
CN110244984B (en) Application processing method, device, storage medium and computer equipment
EP3355187A1 (en) Loading method and device for terminal application (app)
CN108549568B (en) Application entry processing method and device, storage medium and electronic equipment
CN108345478B (en) Application processing method and device, storage medium and electronic equipment
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN111666497A (en) Application program loading method and device, electronic equipment and readable storage medium
CN110222288B (en) Page display method, device and storage medium
CN107526623B (en) Data processing method and device
CN112486459B (en) Method, device, computer equipment and readable storage medium for generating active page
CN114706633B (en) Preloading method, electronic device and storage medium
CN109032685B (en) Method and terminal for accelerating startup of android system
CN109901849B (en) Application program installation method and device, electronic equipment and storage medium
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN110286981A (en) The display methods and display system of the use state of virtual cloud desktop server
CN108062401B (en) Application recommendation method and device and storage medium
CN108549557A (en) Using storing method, terminal and storage medium
CN113296841A (en) Application program processing method, device, equipment and medium
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
CN112433778A (en) Mobile equipment page display method and device, electronic equipment and storage medium
CN113157596A (en) Automatic testing method and device
CN115004667A (en) Information pushing method and device, electronic equipment and computer readable medium
CN113934453B (en) Risk detection method, risk detection device 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