Method and device for loading file

A file loading and file technology, applied in the direction of program control device, program loading/starting, etc., can solve the problems of network speed limitation, long time consumption of files, etc., and achieve fast speed, good user experience, and high file loading efficiency

CN102750174AInactive Publication Date: 2012-10-24TCL CORPORATION
3 Cites 42 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2012-10-24
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention is suitable for the field of multimedia applications and provides a method and a device for loading a file. The method comprises the following steps of: receiving a file loading instruction which carries file information of a to-be-loaded file; inquiring a memory index table according to the file information of the to-be-loaded file, wherein the memory index table contains storage location information and access frequency of a file preloaded from a disk cache to a memory cache; and if searching the storage location information corresponding to the file information in the memory index table, loading the file from the memory cache according to the searched storage location information and updating the access frequency of the file in the memory index table. The file downloaded from the network is stored at a terminal by a two-level file caching mode, and since the access delay of a memory is much less than that of the dick cache, compared with the file stored in the memory cache, a display file can be rapidly loaded, the file loading efficiency is high, and the file loading speed is quick.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the field of multimedia applications, in particular to a file loading method and device. Background technique

[0002] With the advancement of network and technology, electronic terminals are becoming more and more intelligent and Internet-based. There are more and more terminal products such as mobile phones, TVs, and tablets, and there are more and more various network applications on electronic terminals. At present, many applications need to frequently obtain some files from the network to display to the user in order to provide users with a more intuitive experience. Although the current electronic terminals are becoming more and more advanced and have more and more applications, due to the limitation of network speed, it takes too long for the terminal to obtain and load a large number of files from the network, and the loading efficiency is low. Contents of the invention

[0003] The purpose of the embodiments of the ...

Examples

Embodiment 1

[0023] Such as figure 1 The flow chart of the file loading method provided by the first embodiment of the present invention is shown, and for the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0024] In step S101, a disk cache for storing files is created in advance, and a disk index table is established.

[0025] In the embodiment of the present invention, a folder is created in the disk in advance (for example, a folder named tcl_img_cache is created here) as a disk cache for storing files, and a file or a small database built in the terminal is used to create a disk index table. To record the index of these files, the disk index table includes: file feature code (such as file ID, etc.), file URL (url), file storage location information (such as file read path (path), etc.), file The number of accesses (num), the time of the most recent access to the file (date), etc. In the disk index table, since network files a...

Embodiment 2

[0039] Such as figure 2 The flow chart of the file loading method provided by the second embodiment of the present invention is shown, and for the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0040] In step S201, a disk cache for storing files is created in advance, and a disk index table is established.

[0041] In step S202, a memory cache is created when the application starts, files in the disk cache are preloaded into the memory cache, and a memory index table is established.

[0042] In step S203, a file loading instruction is received, and the file loading instruction carries file information of the file to be loaded. In step S204, query the memory index table according to the file information of the file to be loaded, and judge whether there is storage location information corresponding to the file information of the file to be loaded in the memory index table, if yes, execute step S205; otherwise, execute...

Embodiment 3

[0055] Such as image 3 The flow chart of the file loading method provided by the third embodiment of the present invention is shown, and for the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0056] In step S301, a disk cache for storing files is created in advance, and a disk index table is established.

[0057] In step S302, a memory cache is created when the application starts, files in the disk cache are preloaded into the memory cache, and a memory index table is established.

[0058] In step S303, a file loading instruction is received, and the file loading instruction carries file information of the file to be loaded.

[0059] In step S304, query the memory index table according to the file information of the file to be loaded, and judge whether there is storage location information corresponding to the file information of the file to be loaded in the memory index table, if yes, execute step S305; otherwise, ...