# US 2015/0106656 A1 · Application program startup method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0106656 A1
- Document ID: US20150106656A1
- Status: Published application
- Kind: A1
- Application number: 14/383,763
- Filed: 2013-03-04
- Published: 2015-04-16
- Earliest claimed: 2012-03-14
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Chao Bian; Wenhuan Zhu
- Web page: https://patentgrep.com/patent/US20150106656A1

## CPC

- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F 9/44568: {Immediately runnable code}
- G06F 11/0721: {within a central processing unit [CPU]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention, pertaining to the field of computer technologies, discloses an application startup method and apparatus. The method includes: loading, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, where the prefetch data includes at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; and loading code of the application program to start up the application program. The apparatus includes: a prefetch data loading module and a code loading module. According to the present invention, the number of page faults occurred during the startup process of the application program because a process cannot be mapped to a valid physical page when accessing a virtual page is greatly reduced. Further, since before the code of the application program is loaded, instead of all file blocks during the initial startup of the application program, only the file block(s) corresponding to page fault(s) is loaded, frequent memory page flipping and file flipping during the loading process of the application program are mitigated, and startup speed and startup efficiency of the application program are improved.

## Claims

### Claim 1

An application program startup method, comprising:
loading, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, wherein the prefetch data comprises at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; and
loading code of the application program to start up the application program;
wherein prior to loading, upon receiving an instruction for starting up an application, prefetch data corresponding to the application program, analyzing the history startup process of the application program to obtain the prefetch data corresponding to the application program during the history startup process; and
wherein the analyzing history start process of the application program to obtain the prefetch data corresponding to the application program during the history startup process specifically comprising:
obtaining at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program;
calculating the file offset corresponding to each virtual address according to the at least one mapped file list and the at least one virtual address; and
combining, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program.

### Claim 2

(canceled)

### Claim 3

(canceled)

### Claim 4 (depends on 1)

The method according to claim 1, wherein the obtaining at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program specifically comprises:
obtaining at least one log file of the application program;
determining a time segment in the at least one log file from a startup time of a user interface process to a foreground window display time as a predetermined startup time segment;
obtaining the mapped file list loaded by a process during the predetermined startup time segment in the at least one log file; and
obtaining the virtual address of the at least one page fault occurred during the predetermined startup time segment.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the combining, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program specifically comprises:
combining, according to the file offset corresponding to each virtual address, file blocks with spacing between file offsets corresponding to the at least one virtual address being smaller than a predetermined number of bits to obtain the prefetch data corresponding to the application program.

### Claim 6

An application program startup apparatus, comprising:
a prefetch data loading module, configured to load, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, wherein the prefetch data comprises at least one file block corresponding to at least one page fault occurred during a history startup process of the application program;
a code loading module, configured to load code of the application program to start up the application program; and
a prefetch data obtaining module, configured to analyze the history startup process of the application program to obtain the prefetch data corresponding to the application program during the history startup process, wherein the prefetch data obtaining module comprises:
an obtaining unit, configured to obtain at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program;
an offset calculating unit, configured to calculate the file offset corresponding to each virtual address according to the at least one mapped file list and the at least one virtual address; and
a prefetch data obtaining unit, configured to combine, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program.

### Claim 7

(canceled)

### Claim 8

(canceled)

### Claim 9 (depends on 6)

The apparatus according to claim 6, wherein the obtaining unit comprises:
a log obtaining subunit, configured to obtain at least one log file of the application program;
a time segment determining subunit, configured to determine a time segment in the at least one log file from a startup time of a user interface process to a foreground window display time as a predetermined startup time segment;
a mapped file list obtaining subunit, configured to obtain the mapped file list loaded by a process during the predetermined startup time segment in the at least one log file; and
a virtual address obtaining subunit, configured to obtain the virtual address of the at least one page fault occurred during the predetermined startup time segment.

### Claim 10 (depends on 6)

The apparatus according to claim 6, wherein the prefetch data obtaining unit is specifically configured to combine, according to the file offset corresponding to each virtual address, file blocks with spacing between file offsets corresponding to the at least one virtual address being smaller than a predetermined number of bits to obtain the prefetch data corresponding to the application program.
