# US 11,907,164 B2 · File loading method and apparatus, electronic device, and storage medium

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

- Number: US 11,907,164 B2
- Document ID: US11907164B2
- Status: Granted
- Kind: B2
- Application number: 17/325,112
- Filed: 2021-05-19
- Published: 2021-09-02
- Granted: 2024-02-20
- Earliest claimed: 2019-04-28
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Liang Du
- Web page: https://patentgrep.com/patent/US11907164B2

## CPC

- G06F 16/172: Caching, prefetching or hoarding of files
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application relates to a file loading method performed at an electronic device, and a non-transitory computer-readable storage medium thereof. The method including: receiving, in response to a user operation, an instruction for loading a target file; determining an associated feature of at least one piece of resource information in the target file; determining a type of the resource information according to the associated feature of the resource information; and loading the resource information by using a loading algorithm corresponding to the type of the resource information.

## Claims

### Claim 1

A file loading method performed at an electronic device, the method comprising:
receiving, in response to a user operation, an instruction for loading a target file;
determining an associated feature of at least one piece of resource information in the target file, wherein the associated feature indicates an amount of internal memory occupied by the resource information;
determining a type of the resource information according to the associated feature of the resource information; and
loading the resource information by using a loading algorithm corresponding to the type of the resource information.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising determining the loading algorithm based on the type of the resource information.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining a type of the resource information according to the associated feature of the resource information comprises:
determining the type of the resource information according to the amount of the occupied internal memory, the type of the resource information comprising a first type and a second type, an amount of internal memory occupied by resource information of the first type being less than an amount of internal memory occupied by resource information of the second type.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining an associated feature of at least one piece of resource information in the target file comprises:
obtaining a read frequency of reading the resource information in an internal memory; and
using the read frequency as the associated feature of the resource information.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining a type of the resource information according to the associated feature of the resource information comprises:
determining the type of the resource information according to a magnitude of the read frequency, the type of the resource information comprising a first type and a second type, a read frequency of resource information of the first type being greater than a read frequency of resource information of the second type.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
presetting a maximum quantity of cache blocks in the internal memory as a first quantity, wherein
when the type of the resource information is a first type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
increasing the quantity of cache blocks from the first quantity to a second quantity; and
loading the resource information of the first type based on the second quantity of cache blocks; and
when the type of the resource information is the second type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
loading the resource information of the second type based on the first quantity of cache blocks.

### Claim 7 (depends on 6)

The method according to claim 6, further comprising:
setting the quantity of cache blocks from the second quantity back to the first quantity after the loading of the resource information of the first type is completed.

### Claim 8 (depends on 6)

The method according to claim 6, wherein the increasing the quantity of cache blocks from the first quantity to a second quantity comprises:
adding a cache block quantity control function at an engine layer to enable a logic layer to adjust a value of the maximum quantity of cache blocks to the first quantity or the second quantity according to the cache block quantity control function.

### Claim 9

An electronic device, comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to perform a plurality of operations including:
receiving, in response to a user operation, an instruction for loading a target file;
determining an associated feature of at least one piece of resource information in the target file, wherein the associated feature indicates an amount of internal memory occupied by the resource information;
determining a type of the resource information according to the associated feature of the resource information; and
loading the resource information by using a loading algorithm corresponding to the type of the resource information.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein the loading algorithm is determined based on the type of the resource information.

### Claim 11 (depends on 9)

The electronic device according to claim 9, wherein the determining a type of the resource information according to the associated feature of the resource information comprises:
determining the type of the resource information according to the amount of the occupied internal memory, the type of the resource information comprising a first type and a second type, an amount of internal memory occupied by resource information of the first type being less than an amount of internal memory occupied by resource information of the second type.

### Claim 12 (depends on 9)

The electronic device according to claim 9, wherein the determining an associated feature of at least one piece of resource information in the target file comprises:
obtaining a read frequency of reading the resource information in an internal memory; and
using the read frequency as the associated feature of the resource information.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the determining a type of the resource information according to the associated feature of the resource information comprises:
determining the type of the resource information according to a magnitude of the read frequency, the type of the resource information comprising a first type and a second type, a read frequency of resource information of the first type being greater than a read frequency of resource information of the second type.

### Claim 14 (depends on 9)

The electronic device according to claim 9, wherein the plurality of operations further comprise:
presetting a maximum quantity of cache blocks in the internal memory as a first quantity, wherein
when the type of the resource information is a first type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
increasing the quantity of cache blocks from the first quantity to a second quantity; and
loading the resource information of the first type based on the second quantity of cache blocks; and
when the type of the resource information is the second type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
loading the resource information of the second type based on the first quantity of cache blocks.

### Claim 15 (depends on 14)

The electronic device according to claim 14, wherein the plurality of operations further comprise:
setting the quantity of cache blocks from the second quantity back to the first quantity after the loading of the resource information of the first type is completed.

### Claim 16 (depends on 14)

The electronic device according to claim 14, wherein the increasing the quantity of cache blocks from the first quantity to a second quantity comprises:
adding a cache block quantity control function at an engine layer to enable a logic layer to adjust a value of the maximum quantity of cache blocks to the first quantity or the second quantity according to the cache block quantity control function.

### Claim 17

A non-transitory computer-readable storage medium, the storage medium storing at least one instruction, the at least one instruction being loaded and executed by a processor of an electronic device to perform a plurality of operations including:
receiving, in response to a user operation, an instruction for loading a target file;
determining an associated feature of at least one piece of resource information in the target file, wherein the associated feature indicates an amount of internal memory occupied by the resource information;
determining a type of the resource information according to the associated feature of the resource information; and
loading the resource information by using a loading algorithm corresponding to the type of the resource information.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the plurality of operations further comprise:
presetting a maximum quantity of cache blocks in the internal memory as a first quantity, wherein
when the type of the resource information is a first type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
increasing the quantity of cache blocks from the first quantity to a second quantity; and
loading the resource information of the first type based on the second quantity of cache blocks; and
when the type of the resource information is the second type, the loading the resource information by using a loading algorithm corresponding to the type of the resource information comprises:
loading the resource information of the second type based on the first quantity of cache blocks.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the plurality of operations further comprise:
setting the quantity of cache blocks from the second quantity back to the first quantity after the loading of the resource information of the first type is completed.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the increasing the quantity of cache blocks from the first quantity to a second quantity comprises:
adding a cache block quantity control function at an engine layer to enable a logic layer to adjust a value of the maximum quantity of cache blocks to the first quantity or the second quantity according to the cache block quantity control function.
