WO2013174172A1 - 一种文件信息预览方法及系统 - Google Patents

一种文件信息预览方法及系统 Download PDF

Info

Publication number
WO2013174172A1
WO2013174172A1 PCT/CN2013/072570 CN2013072570W WO2013174172A1 WO 2013174172 A1 WO2013174172 A1 WO 2013174172A1 CN 2013072570 W CN2013072570 W CN 2013072570W WO 2013174172 A1 WO2013174172 A1 WO 2013174172A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
file information
identification number
cache
information
Prior art date
Application number
PCT/CN2013/072570
Other languages
English (en)
French (fr)
Inventor
钟耀雄
Original Assignee
惠州Tcl移动通信有限公司
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 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Priority to US14/387,098 priority Critical patent/US9881015B2/en
Priority to EP13794492.2A priority patent/EP2857990A4/en
Publication of WO2013174172A1 publication Critical patent/WO2013174172A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • G06F16/152File search processing using file content signatures, e.g. hash values
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Definitions

  • the present invention relates to a file information preview method and system, and more particularly to a method and system for quickly previewing file information by storing file information of different files in a cache by specifying an identification number.
  • the technical problem to be solved by the present invention is to provide a file information preview method and system for the above-mentioned defects of the prior art, and save the file information in a unified format by establishing a cache, and quickly read the identification number of the file information. File information, eliminating the complicated decoding process and improving the speed of file information extraction.
  • a file information preview method includes the following steps:
  • the file information identification number of the file to be previewed exists in the file information identification number list, the file information of the file to be previewed is directly read from the cache through the unified file format;
  • the file information preview method wherein the cache includes a level 1 cache set in the memory and a level 2 cache set in the file system.
  • the file information preview method wherein the file information of the file is first stored in the first level cache when the file information of the file is stored in the cache, and stored in the second level cache when the level 1 cache is insufficient.
  • the file information preview method after the step C, further includes:
  • the file information identification number of the file to be previewed does not exist in the file information identification number list, the file information of the file is read from the file system, and the file information is stored in the cache.
  • the file information preview method wherein when the file information is stored according to a unified file format, the format is unified according to the file information format header, version, file last modification time, name, and length information type of the file.
  • the file information preview method wherein the unique identification number of the file information is determined by the MD5 algorithm according to the storage path of the file.
  • a file information preview method includes the following steps:
  • the file information identification number of the file to be previewed exists in the file information identification number list, the file information of the file to be previewed is directly read from the cache through the unified file format.
  • the file information preview method wherein when the size of the cache reaches a preset upper limit, the file information with the earliest creation time is cleared.
  • the file information preview method wherein the cache includes a level 1 cache set in the memory and a level 2 cache set in the file system.
  • the file information preview method wherein the file information of the file is first stored in the first level cache when the file information of the file is stored in the cache, and stored in the second level cache when the level 1 cache is insufficient.
  • the file information preview method after the step C, further includes:
  • the file information identification number of the file to be previewed does not exist in the file information identification number list, the file information of the file is read from the file system, and the file information is stored in the cache.
  • the file information preview method wherein when the file information is stored according to a unified file format, the format is unified according to the file information format header, version, file last modification time, name, and length information type of the file.
  • the file information preview method wherein the unique identification number of the file information is determined by the MD5 algorithm according to the storage path of the file.
  • a file information preview system includes a file system in which files are stored, and further includes:
  • a buffer for storing file information of a file
  • a pre-setting module configured to store the file information of the file in the file system in the buffer in a unified file format, and establish a file information identification number list in the buffer with the unique identification number of each file information
  • Reading a query module configured to read a file information identification number list from the buffer, and query whether the file information identification number list has a file information identification number of the file to be previewed;
  • a determining module configured to determine whether a file information identification number of the file to be previewed exists in the file information identification number list
  • an output module configured to directly read file information of the file to be previewed from the buffer by using a unified file format when the file information identification number of the file to be previewed exists in the file information identification number list.
  • the file information preview system further includes a clearing module, configured to: when the size of the cache reaches a preset upper limit, clear file information with the earliest creation time.
  • the file information preview system further includes an extracting module, configured to read file information of the file from the file system when the file information identification number of the file to be previewed does not exist in the file information identification number list, and The file information is stored in the cache.
  • the file information preview method wherein when the file information is stored according to a unified file format, the format is unified according to the file information format header, version, file last modification time, name, and length information type of the file.
  • the file information preview system further includes an identification number generating module, configured to determine, by using an MD5 algorithm, an identification number of the file information by a storage path of the file.
  • the file information preview system wherein the buffer comprises a level 1 buffer disposed in the memory and a level 2 buffer disposed in the file system.
  • the file information preview system wherein the read permission of the primary cache is higher than the read permission of the secondary cache.
  • the file information previewing method and system provided by the present invention store the file information of the file in the file system in a pre-established cache in a unified file format, and establish a unique identification number of each file information in the cache. a file information identification number list; reading a file information identification number list from the cache, and querying the file information identification number list whether there is a file information identification number of the file to be previewed; if the file information identification number list exists in the file information identification number list
  • the file information identification number of the file to be previewed reads the file information of the file to be previewed directly from the cache through the unified file format, thereby eliminating the complicated decoding process, realizing quick preview of the file information, and enhancing the user experience.
  • FIG. 1 is a flow chart of a file information preview method of the present invention.
  • FIG. 2 is a schematic structural view of a file information preview system of the present invention.
  • FIG. 3 is a schematic diagram showing the composition of a buffer of the file information preview system of the present invention.
  • FIG. 1 is a flowchart of a file information preview method provided by the present invention, which mainly includes the following steps:
  • Step S100 Store file information of the file in the file system in a pre-established cache in a unified file format, and establish a file information identification number list in the cache with the unique identification number of each file information;
  • Step S200 Read a file information identification number list from the cache, and query whether the file information identification number list has a file information identification number of the file to be previewed;
  • Step S300 If the file information identification number of the file to be previewed exists in the file information identification number list, the file information of the file to be previewed is directly read from the cache through the unified file format.
  • the file information of the file is directly read in the file system through the file storage path during the file preview, the file information of the file is extracted according to the different file information, and the process is cumbersome and wasteful. system resource.
  • step S100 of the present invention first, a file information for storing a file is created.
  • the file size is different due to different file types, such as video, audio, e-book, etc., which may be difficult to store.
  • the present invention according to the same characteristics of the file, such as length , preview, name, etc., redefine a unified file format, so there is no need to do different processing according to different types.
  • Table 1 is an example of the unified file format of the present invention.
  • Table 1 the format header label of the file information is unified into the file format TAGINFO, and the length is 7 bytes; the version label is unified into the file format VER, the length is 3 bytes, and the like, and there are many types of storage information. , Table 1 is not completely listed, users can set it according to their needs.
  • the present invention sets an upper limit on the size of the cache.
  • the cache reaches the upper limit the file information with the earliest creation time is deleted according to the time when the file information is created.
  • the cache of the present invention is set to two levels, including a level one cache and a second level cache, the first level cache is stored in the memory, and the second level cache is stored in the file system.
  • the file information of the file is stored in the cache, it is first stored in the level 1 cache, and then stored in the level 2 cache when the level 1 cache is insufficient.
  • the present invention determines a unique identification number (ID number) according to the storage path of the file information in the file system by using the MD5 algorithm, and stores the identification number of each file information in one.
  • ID number a unique identification number
  • the path of the file information crash.log is / Mnt/hgfs/G/crash.log, the ID number of the file information is obtained by the MD5 algorithm: 28bcf6f7077f0ec9e0e9407907cbf478, the ID number is unique, and the obtained ID number is used as the identifier for obtaining the file information, and is re-directed by the ID number.
  • the path of the file information can extract the file information. However, if the file with the same name is stored in the same path, the problem that the obtained file information is inaccurate will occur, because it is impossible to generate the file with the same name in the same directory at the same time. , so you can add the last modified time of the file as the identifier, so that the obtained file information is unique and accurate.
  • the present invention reads the file information identification number list from the cache through step S200, and queries the list whether there is a file information identification number of the file to be previewed, if it is in the file information identification number list. If there is a file information identification number of the file to be previewed, the file information of the file to be previewed is directly read from the cache through the unified file format. If the file information identification number of the file to be previewed does not exist in the file information identification number list, then The file information of the file is read in the file system, and the file information is stored in the cache.
  • Using the cache to obtain the file information identification list can reduce the time of each read cache, and after reading the file information of the file to be previewed directly from the cache through the unified file format, the read file information is stored in the memory, which is convenient for Secondary extraction, which reduces the time each time the file system is read.
  • the file information is first extracted from the file system and updated into the system memory, which reduces the number of times the file system is read.
  • the memory reaches the upper limit, the information is read from the secondary cache and re-updated to the memory. This can limit the memory size of the application on the one hand, and increase the speed of extracting file information on the other hand.
  • the present invention further provides a file information previewing system, as shown in FIG. 2, including a file system 10 storing a file, and a buffer 20 for storing file information of the file;
  • the pre-setting module 40 is configured to store the file information of the file in the file system 10 in the buffer 20 in a unified file format, and establish a file information identification number in the buffer 20 with the unique identification number of each file information. List
  • the read query module 50 is configured to read a file information identification number list from the buffer 20, and query the file information identification number list to determine whether there is a file information identification number of the file to be previewed;
  • the determining module 60 is configured to determine whether the file information identification number of the file to be previewed exists in the file information identification number list;
  • the output module 70 is configured to directly read the file information of the file to be previewed from the buffer 20 through the unified file format when the file information identification number of the file to be previewed exists in the file information identification number list.
  • the identifier number generating module 30 is further configured to determine the identification number of the file information from the storage path of the file by using the MD5 algorithm.
  • the method further includes a clearing module (not shown) for clearing the file information with the earliest creation time when the size of the cache reaches a preset upper limit.
  • a clearing module (not shown) for clearing the file information with the earliest creation time when the size of the cache reaches a preset upper limit.
  • the buffer 20 includes a primary buffer 21 disposed in the memory and a secondary buffer 22 disposed in the file system 20, and the read permission of the primary buffer 21 is higher. Read permission of the secondary buffer 22.
  • the file information previewing method and system provided by the present invention store the file information of the file in the file system in a pre-established cache in a unified file format, and establish a unique identification number of each file information in the cache. a file information identification number list; reading a file information identification number list from the cache, and querying the file information identification number list whether there is a file information identification number of the file to be previewed; if the file information identification number list exists in the file information identification number list
  • the file information identification number of the file to be previewed reads the file information of the file to be previewed directly from the cache through the unified file format, thereby eliminating the complicated decoding process, realizing quick preview of the file information, and enhancing the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种文件信息预览方法及系统,通过将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息,能够免去复杂的解码过程,实现文件信息的快速预览,增强了用户的体验。

Description

一种文件信息预览方法及系统 技术领域
本发明涉及文件信息预览方法及系统,尤其涉及的是一种把不同文件的文件信息存储在缓存中通过指定标识号快速预览文件信息的方法及系统。
背景技术
随着软件技术的不断发展,各种文件格式也越来越多,最初人们只能通过文件名和文件后缀识别文件类型,到现在可通过视频文件的视图、音乐的版面、电子书的版面、图片等文件预览信息来直接识别文件,而面对不断出现的众多文件格式,如RMVB,AVI,PDF,JPEG等文件格式,复杂的文件格式使提取文件信息的速度受到影响。首先需要分辨不同文件的类型,根据文件的类型格式提取文件信息,特别是视频文件需要复杂的解码过程,才能获取视频流的预览图,使人们在电子设备中预览文件信息时需等待比较长的时间,影响了用户的体验。
因此,现有技术还有待于改进和发展。
技术问题
本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种文件信息预览方法及系统,通过建立缓存把文件信息以统一的格式保存起来,并通过文件信息的标识号快速读取文件信息,免去复杂解码过程,提高文件信息提取的速度。
技术解决方案
一种文件信息预览方法,其包括以下步骤:
A、将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;
B、从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
C、如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息;
D、当所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
所述的文件信息预览方法,其中所述缓存包括设置在内存中的一级缓存和设置在文件系统中的二级缓存。
所述的文件信息预览方法,其中在缓存中存储文件的文件信息时首先存储在一级缓存中,在一级缓存不足时再存储在二级缓存中。
所述的文件信息预览方法,其中所述步骤C之后还包括:
在所述文件信息标识号列表中不存在待预览文件的文件信息标识号,则从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
所述的文件信息预览方法,其中文件信息唯一的标识号根据文件的存储路径通过MD5算法确定。
一种文件信息预览方法,其包括以下步骤:
A、将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;
B、从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
C、如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息。
所述的文件信息预览方法,其中当所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
所述的文件信息预览方法,其中所述缓存包括设置在内存中的一级缓存和设置在文件系统中的二级缓存。
所述的文件信息预览方法,其中在缓存中存储文件的文件信息时首先存储在一级缓存中,在一级缓存不足时再存储在二级缓存中。
所述的文件信息预览方法,其中所述步骤C之后还包括:
如果在所述文件信息标识号列表中不存在待预览文件的文件信息标识号,则从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
所述的文件信息预览方法,其中文件信息唯一的标识号根据文件的存储路径通过MD5算法确定。
一种文件信息预览系统,包括存储有文件的文件系统,其中还包括:
缓存器,用于存储文件的文件信息;
预设置模块,用于将文件系统中文件的文件信息以统一的文件格式存储在所述缓存器中,并在缓存器中将各文件信息的唯一标识号建立一个文件信息标识号列表;
读取查询模块,用于从所述缓存器中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
判断模块,用于判断所述文件信息标识号列表中是否存在待预览文件的文件信息标识号;
输出模块,用于在所述文件信息标识号列表中存在待预览文件的文件信息标识号时通过统一的文件格式直接从缓存器中读取待预览文件的文件信息。
所述的文件信息预览系统,其中还包括清除模块,用于在所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
所述的文件信息预览系统,其中还包括提取模块,用于在所述文件信息标识号列表中不存在待预览文件的文件信息标识号时从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
所述的文件信息预览系统,其中还包括标识号生成模块,用于采用MD5算法由文件的存储路径确定文件信息的标识号。
所述的文件信息预览系统,其中所述缓存器包括设置在内存中的一级缓存器和设置在文件系统中的二级缓存器。
所述的文件信息预览系统,其中所述一级缓存器的读取权限高于二级缓存器的读取权限。
有益效果
本发明所提供的文件信息预览方法及系统,通过将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息,能够免去复杂的解码过程,实现文件信息的快速预览,增强了用户的体验。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明文件信息预览方法的流程图。
图2是本发明文件信息预览系统的结构示意图。
图3是本发明文件信息预览系统的缓存器组成示意图。
本发明的最佳实施方式
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
请参见图1,图1是本发明提供的文件信息预览方法的流程图,主要包括以下步骤:
步骤S100、将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;
步骤S200、从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
步骤S300、如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息。
下面结合具体的实施例对上述步骤进行详细的说明。
由于在文件预览时,通常是通过文件的存储路径在文件系统中直接读取文件的文件信息,根据文件信息的不同,再进行相应的解码等操作提取出文件的文件信息,该过程繁琐且浪费系统资源。
本发明的步骤S100,首先建立一个缓存用于存储文件的文件信息。在存储文件的文件信息时,由于文件类型不同,文件的大小也不同,例如视频、音频、电子书等文件,存储起来会比较困难,本发明为了克服这个困难,根据文件的相同特性,如长度、预览图、名称等,重新定义一个统一的文件格式,这样就不需要根据不同类型做不同的处理。
请参见表1,表1是本发明统一文件格式的一个示例,
 
Figure WO-DOC-TABLE-1
在表1中,将文件信息的格式头标签统一成文件格式TAGINFO,长度为7个字节;将版本标签统一成文件格式VER,长度为3个字节等等,由于存储信息类型还有很多,表1中并未完全列出,用户可以根据需要自行设定。
进一步地,由于新文件不断产生,用于存储这些新文件的文件信息的缓存也会慢慢得不到满足,因此,本发明对缓存的大小设置上限。当缓存达到上限后,根据文件信息创建的时间,把创建时间最早的文件信息删除。而为了提高提取信息的速度,本发明的缓存设置成两级,包括一级缓存和二级缓存,一级缓存存放在内存上,二级缓存存放在文件系统中。在缓存中存储文件的文件信息时首先存储在一级缓存中,在一级缓存不足时再存储在二级缓存中。
由于各文件信息都会有一个特定的存储路径,本发明通过MD5算法,根据文件信息在文件系统中的存储路径确定一个唯一的标识号(ID号),并将各个文件信息的标识号存储在一个文件信息标识号列表中,方便管理和后续的查询。
下面举例说明通过MD5算法确定文件信息的标识号的具体方法,如下所示:
Linux@ubuntu: ~$ md5sum /mnt/hgfs/G/crash.log
28bcf6f7077f0ec9e0e9407907cbf478 / mnt/hgfs/G/crash.log
从上述方法中可以看出,文件信息crash.log的路径是/ mnt/hgfs/G/crash.log,通过MD5算法得出该文件信息的ID号是:28bcf6f7077f0ec9e0e9407907cbf478,该ID号是唯一的,将获取的ID号作为获取文件信息的标识,通过ID号重新定向获取文件信息的路径,就可以提取文件信息,然而,如果在同一路径存放有相同名称的文件,就会产生获取的文件信息不准确的问题,因为在同一时间同一目录下不可能产生相同名称的文件,所以此时可以添加文件最后修改的时间作为标识,以便获取的文件信息是唯一而准确的。
进一步地,在需要预览文件时,本发明通过步骤S200从缓存中读取文件信息标识号列表,并在该列表中查询是否存在待预览文件的文件信息标识号,如果在文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息,如果在文件信息标识号列表中不存在待预览文件的文件信息标识号,则从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
利用缓存获取文件信息标识列表能够减少每次读取缓存的时间,而通过统一的文件格式直接从缓存中读取待预览文件的文件信息后,将读取的文件信息存放在内存中,便于下次提取,从而减少了每次读取文件系统的时间。
在提取文件信息时,首先从文件系统中提取文件信息,并且更新到系统内存中,这样可以减少读取文件系统次数。当内存达到上限后,再从二级缓存读取信息,重新更新到内存上。这样一方面可以限制应用程序的内存大小,另一方面可以提高提取文件信息的速度。
基于上述文件信息预览方法,本发明还提供了一种文件信息预览系统,如图2所示,包括存储有文件的文件系统10,还包括用于存储文件的文件信息的缓存器20;
预设置模块40,用于将文件系统10中文件的文件信息以统一的文件格式存储在所述缓存器20中,并在缓存器20中将各文件信息的唯一标识号建立一个文件信息标识号列表;
读取查询模块50,用于从所述缓存器20中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
判断模块60,用于判断所述文件信息标识号列表中是否存在待预览文件的文件信息标识号;
输出模块70,用于在所述文件信息标识号列表中存在待预览文件的文件信息标识号时通过统一的文件格式直接从缓存器20中读取待预览文件的文件信息。
其中,还包括标识号生成模块30,用于采用MD5算法由文件的存储路径确定文件信息的标识号。
其中,还包括清除模块(未示出),用于在所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
如图3所示,所述缓存器20包括设置在内存中的一级缓存器21和设置在文件系统20中的二级缓存器22,且所述一级缓存器21的读取权限高于二级缓存器22的读取权限。
本发明所提供的文件信息预览方法及系统,通过将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息,能够免去复杂的解码过程,实现文件信息的快速预览,增强了用户的体验。
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。
本发明的实施方式
工业实用性
序列表自由内容

Claims (20)

  1. 一种文件信息预览方法,其包括以下步骤:
    A、将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;
    B、从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
    C、如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息;
    D、当所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
  2. 根据权利要求1所述的文件信息预览方法,其中所述缓存包括设置在内存中的一级缓存和设置在文件系统中的二级缓存。
    Figure PCTCN2013072570-appb-I000002
  3. 根据权利要求2所述的文件信息预览方法,其中在缓存中存储文件的文件信息时首先存储在一级缓存中,在一级缓存不足时再存储在二级缓存中。
  4. 根据权利要求1所述的文件信息预览方法,其中所述步骤C之后还包括:
    在所述文件信息标识号列表中不存在待预览文件的文件信息标识号,则从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
  5. 根据权利要求1所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
  6. 根据权利要求1所述的文件信息预览方法,其中文件信息唯一的标识号根据文件的存储路径通过MD5算法确定。
  7. 一种文件信息预览方法,其包括以下步骤:
    A、将文件系统中文件的文件信息以统一的文件格式存储在预先建立的缓存中,并在所述缓存中将各文件信息的唯一标识号建立一个文件信息标识号列表;
    B、从所述缓存中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
    C、如果在所述文件信息标识号列表中存在待预览文件的文件信息标识号,则通过统一的文件格式直接从缓存中读取待预览文件的文件信息。
  8. 根据权利要求7所述的文件信息预览方法,其中当所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
  9. 据权利要求7所述的文件信息预览方法,其中所述缓存包括设置在内存中的一级缓存和设置在文件系统中的二级缓存。
  10. 根据权利要求9所述的文件信息预览方法,其中在缓存中存储文件的文件信息时首先存储在一级缓存中,在一级缓存不足时再存储在二级缓存中。
  11. 根据权利要求7所述的文件信息预览方法,其中所述步骤C之后还包括:
    如果在所述文件信息标识号列表中不存在待预览文件的文件信息标识号,则从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
  12. 根据权利要求7所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
  13. 根据权利要求7所述的文件信息预览方法,其中文件信息唯一的标识号根据文件的存储路径通过MD5算法确定。
  14. 一种文件信息预览系统,包括存储有文件的文件系统,其中还包括:
    缓存器,用于存储文件的文件信息;
    预设置模块,用于将文件系统中文件的文件信息以统一的文件格式存储在所述缓存器中,并在缓存器中将各文件信息的唯一标识号建立一个文件信息标识号列表;
    读取查询模块,用于从所述缓存器中读取文件信息标识号列表,并查询所述文件信息标识号列表是否存在待预览文件的文件信息标识号;
    Figure PCTCN2013072570-appb-I000003
    判断模块,用于判断所述文件信息标识号列表中是否存在待预览文件的文件信息标识号;
    输出模块,用于在所述文件信息标识号列表中存在待预览文件的文件信息标识号时通过统一的文件格式直接从缓存器中读取待预览文件的文件信息。
    Figure PCTCN2013072570-appb-I000004
  15. 根据权利要求14所述的文件信息预览系统,其中还包括清除模块,用于在所述缓存的大小达到预设的上限时,将创建时间最早的文件信息清除。
    Figure PCTCN2013072570-appb-I000005
  16. 根据权利要求14所述的文件信息预览系统,其中还包括提取模块,用于在所述文件信息标识号列表中不存在待预览文件的文件信息标识号时从文件系统中读取文件的文件信息,并将所述文件信息存储在缓存中。
  17. 根据权利要求14所述的文件信息预览方法,其中在按照统一的文件格式对文件信息进行存储时,将分别按照文件的文件信息格式头、版本、文件最后修改时间、名称、长度的信息类型进行格式的统一。
  18. 根据权利要求14所述的文件信息预览系统,其中还包括标识号生成模块,用于采用MD5算法由文件的存储路径确定文件信息的标识号。
    Figure PCTCN2013072570-appb-I000006
  19. 根据权利要求14所述的文件信息预览系统,其中所述缓存器包括设置在内存中的一级缓存器和设置在文件系统中的二级缓存器。
  20. 根据权利要求14所述的文件信息预览系统,其中所述一级缓存器的读取权限高于二级缓存器的读取权限。
    Figure PCTCN2013072570-appb-I000007
PCT/CN2013/072570 2012-05-24 2013-03-15 一种文件信息预览方法及系统 WO2013174172A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/387,098 US9881015B2 (en) 2012-05-24 2013-03-15 Method and system for previewing file information
EP13794492.2A EP2857990A4 (en) 2012-05-24 2013-03-15 METHOD AND SYSTEM FOR PREVIEWING FILE INFORMATION

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210163669.3 2012-05-24
CN201210163669.3A CN102693305B (zh) 2012-05-24 2012-05-24 一种文件信息预览方法及系统

Publications (1)

Publication Number Publication Date
WO2013174172A1 true WO2013174172A1 (zh) 2013-11-28

Family

ID=46858739

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/072570 WO2013174172A1 (zh) 2012-05-24 2013-03-15 一种文件信息预览方法及系统

Country Status (4)

Country Link
US (1) US9881015B2 (zh)
EP (1) EP2857990A4 (zh)
CN (1) CN102693305B (zh)
WO (1) WO2013174172A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693305B (zh) * 2012-05-24 2016-01-13 惠州Tcl移动通信有限公司 一种文件信息预览方法及系统
US9106721B2 (en) 2012-10-02 2015-08-11 Nextbit Systems Application state synchronization across multiple devices
US10057726B2 (en) 2012-10-02 2018-08-21 Razer (Asia-Pacific) Pte. Ltd. Managing user data on an electronic device
CN102930056B (zh) * 2012-11-21 2016-11-23 华为技术有限公司 云存储系统的检索方法及设备
CN106649146A (zh) * 2013-05-21 2017-05-10 青岛海信移动通信技术股份有限公司 一种内存释放方法及装置
US10003637B2 (en) * 2013-06-27 2018-06-19 Tencent Technology (Shenzhen) Company Limited Method, mobile terminal and system for displaying picture based on wireless network, and storage medium
CN103500096A (zh) * 2013-09-27 2014-01-08 宇龙计算机通信科技(深圳)有限公司 一种信息处理方法及装置
US10105593B2 (en) 2014-04-08 2018-10-23 Razer (Asia-Pacific) Pte. Ltd. File prefetching for gaming applications accessed by electronic devices
CN103942344A (zh) * 2014-05-12 2014-07-23 深圳市中博科创信息技术有限公司 一种预览文件的方法及文件处理系统
CN105205069B (zh) * 2014-06-24 2020-04-21 鸿合科技股份有限公司 一种基于分页文件的缓存打开方法和装置
CN106294376B (zh) * 2015-05-15 2019-08-20 北京国双科技有限公司 数据处理方法和装置
CN105183393A (zh) * 2015-09-21 2015-12-23 上海维宏电子科技股份有限公司 基于磁盘缓存实现文件快速预览的方法
US10353865B2 (en) * 2015-12-30 2019-07-16 Dropbox, Inc. On-device indexing of hosted content items
CN108090078B (zh) * 2016-11-22 2021-11-30 北京京东尚科信息技术有限公司 文档在线预览方法及装置、存储介质、电子设备
CN106792105B (zh) * 2016-11-30 2020-02-14 青岛海信电器股份有限公司 光盘镜像iso音视频文件的播放处理方法、装置及电视
CN115878676B (zh) * 2023-02-08 2023-05-05 成都数联云算科技有限公司 一种预览文件的方法、装置、设备和介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110105A (zh) * 2009-12-23 2011-06-29 新奥特(北京)视频技术有限公司 一种图文包装系统读取文件夹的方法和装置
CN102314496A (zh) * 2011-08-25 2012-01-11 百度在线网络技术(北京)有限公司 一种预览媒体文件的方法与设备
CN102693305A (zh) * 2012-05-24 2012-09-26 惠州Tcl移动通信有限公司 一种文件信息预览方法及系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5915129A (en) * 1994-06-27 1999-06-22 Microsoft Corporation Method and system for storing uncompressed data in a memory cache that is destined for a compressed file system
JP2004213128A (ja) * 2002-12-27 2004-07-29 Panasonic Communications Co Ltd 文書管理装置及び文書管理方法
US7797359B1 (en) * 2005-08-23 2010-09-14 Hewlett-Packard Development Company, L.P. Recursive data naming
JP4182994B2 (ja) * 2006-07-14 2008-11-19 ソニー株式会社 データ処理システム、情報処理装置及び情報処理方法、記録再生装置、並びにコンピュータ・プログラム
US7908276B2 (en) * 2006-08-25 2011-03-15 Qnx Software Systems Gmbh & Co. Kg Filesystem having a filename cache
CN101227602A (zh) * 2007-01-18 2008-07-23 中兴通讯股份有限公司 文件存储方法和文件播放方法
US20100306180A1 (en) * 2009-01-28 2010-12-02 Digitiliti, Inc. File revision management
CN102184177A (zh) * 2011-01-04 2011-09-14 北京开心人信息技术有限公司 一种预览文件的方法与系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110105A (zh) * 2009-12-23 2011-06-29 新奥特(北京)视频技术有限公司 一种图文包装系统读取文件夹的方法和装置
CN102314496A (zh) * 2011-08-25 2012-01-11 百度在线网络技术(北京)有限公司 一种预览媒体文件的方法与设备
CN102693305A (zh) * 2012-05-24 2012-09-26 惠州Tcl移动通信有限公司 一种文件信息预览方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2857990A4 *

Also Published As

Publication number Publication date
CN102693305B (zh) 2016-01-13
US9881015B2 (en) 2018-01-30
EP2857990A4 (en) 2016-01-20
EP2857990A1 (en) 2015-04-08
CN102693305A (zh) 2012-09-26
US20150052178A1 (en) 2015-02-19

Similar Documents

Publication Publication Date Title
WO2013174172A1 (zh) 一种文件信息预览方法及系统
TWI518530B (zh) Repeated data processing methods, devices and systems
WO2012100605A1 (zh) 图片管理方法、移动终端及计算机存储介质
WO2012149845A1 (zh) 一种微博消息的显示方法、系统、微博终端、微博服务器端及存储介质
US7216289B2 (en) Method and apparatus for synchronizing multiple versions of digital data
WO2016095072A1 (zh) 一种视频处理方法、视频处理装置及显示装置
WO2012155709A1 (zh) 一种动态推送用户个人标签的方法和系统、存储介质
WO2019037197A1 (zh) 主题分类器的训练方法、装置及计算机可读存储介质
WO2015003480A1 (zh) 一种社交媒体中的信息推荐方法和装置
WO2018076800A1 (zh) 一种数据异步更新方法及其系统
WO2014079322A1 (zh) 音频流媒体的跟踪方法及系统、存储介质
WO2016184314A1 (zh) 一种构建结构化视频图像信息的设备和方法
WO2013143391A1 (zh) 一种设备上文件清理的方法和系统
WO2018056751A1 (en) Summarized data storage management system for streaming data
WO2018000174A1 (zh) 面向存储的dna序列的并行快速匹配方法及其系统
WO2012155744A1 (zh) 一种将检索结果显示在地图上的方法和装置
WO2017206454A1 (zh) 一种指纹拍照处理方法及装置
WO2020141660A1 (en) Electronic apparatus managing data based on block chain and method for managing data
WO2018036168A1 (zh) 数据处理任务执行方法、装置、执行服务器和存储介质
WO2017028573A1 (zh) 一种基于移动终端的图片信息处理的方法及系统
WO2016095547A1 (zh) 一种通过仪表监控文件上传的方法及装置
WO2014166196A1 (zh) 一种具有文字介绍功能的图片显示和管理的方法和系统
WO2020062640A1 (zh) 终端应用动态文案的语言切换方法、服务器及存储介质
WO2022206476A1 (zh) 水印处理方法、装置、电子设备及介质
WO2020199599A1 (zh) 工作队列的信息展示方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13794492

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2013794492

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14387098

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE