WO2015074545A1 - 一种文件扫描方法及装置 - Google Patents

一种文件扫描方法及装置 Download PDF

Info

Publication number
WO2015074545A1
WO2015074545A1 PCT/CN2014/091428 CN2014091428W WO2015074545A1 WO 2015074545 A1 WO2015074545 A1 WO 2015074545A1 CN 2014091428 W CN2014091428 W CN 2014091428W WO 2015074545 A1 WO2015074545 A1 WO 2015074545A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage space
scanned
space layer
current storage
file
Prior art date
Application number
PCT/CN2014/091428
Other languages
English (en)
French (fr)
Inventor
何松
梁帆
Original Assignee
乐视致新电子科技(天津)有限公司
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 乐视致新电子科技(天津)有限公司 filed Critical 乐视致新电子科技(天津)有限公司
Priority to US15/037,658 priority Critical patent/US20160292174A1/en
Publication of WO2015074545A1 publication Critical patent/WO2015074545A1/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
    • 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/13File access structures, e.g. distributed indices
    • 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/164File meta data generation

Definitions

  • the present application relates to the field of data processing technologies, and more particularly to a file scanning method and apparatus.
  • FIG. 1a the contents stored in the first layer storage space, namely, folder 1, folder 2, file 1 and file 2
  • FIG. 1b is the second layer storage space.
  • the stored partial content, that is, the file 5 and the folder 3 stored in the folder 2, the file 3 and the file 4 (not shown) stored in the folder 1 also belong to the second layer storage space, and FIG. 1c is the third.
  • the storage path of each file is generally obtained by a recursive algorithm. After the storage paths of all the files are obtained, the file types and resolutions of all the files are parsed from the bottom layer. And other specific information. For example, if the file of the above computer D disk is scanned, the storage path of the file 1, the file 2, the file 3, the file 4, the file 5, and the file 6 is first obtained through a recursive algorithm, and the storage path of all the files is obtained. After that, the specific information of file 1, file 2, file 3, file 4, file 5, and file 6 is parsed from the bottom layer at one time, and finally file 1, file 2, file 3, file 4, file 5, and file 6 are combined. The corresponding specific information is displayed to complete the scanning of the file.
  • the storage path of the calculation file and the parsing file are specific.
  • the information is performed separately, and the specific information of the file can be parsed only after the storage path of all the files is calculated, and the specific information of all the files is parsed at the same time, so that when there are many files to be scanned, it is bound to cause
  • the scanning time is longer and the scanning efficiency is reduced.
  • the present application provides a file scanning method and apparatus, which overcomes the problem of long scanning time and reduced scanning efficiency when there are many files to be scanned in the prior art.
  • a file scanning method comprising:
  • Determining whether the current storage space layer to be scanned further stores a folder
  • the folder is used as a next storage space layer, and the step of determining the current storage space layer to be scanned is returned, and the next storage space layer is determined to be
  • the storage space layer to be scanned is sequentially executed;
  • the method further includes:
  • the file stored in the current storage space layer to be scanned is displayed.
  • the calculating a storage path of the file that is currently stored in the storage space layer to be scanned includes:
  • the storage path of the file stored in the current storage space layer to be scanned is calculated by a recursive algorithm.
  • the parsing the storage of the current storage space layer to be scanned Documents including:
  • the information of the file stored in the current storage space layer to be scanned is sequentially analyzed.
  • a document scanning device comprising:
  • the current storage space layer determining module to be scanned is configured to determine a current storage space layer to be scanned
  • a scanning module configured to scan the current storage space layer to be scanned, and acquire a file stored in the current storage space layer to be scanned;
  • a storage path calculation module configured to calculate a storage path of the file stored in the current storage space layer to be scanned
  • An information acquiring module configured to parse a file stored in the current storage space layer to be scanned, and obtain information about a file stored in the current storage space layer to be scanned;
  • a determining module configured to determine whether the current storage space layer to be scanned further stores a folder
  • a loop control module configured to: when the current storage space layer to be scanned stores a folder, use the folder as a next storage space layer, and return the step of determining a current storage space layer to be scanned, and determine the The next storage space layer is the current storage space layer to be scanned, and is sequentially executed;
  • the end control module is configured to end the file scanning when the current storage space layer to be scanned has no storage folder.
  • the method further includes:
  • a display module configured to display the file stored in the current storage space layer to be scanned.
  • the storage path calculation module includes:
  • the recursive algorithm calculation sub-module is configured to calculate, by using a recursive algorithm, a storage path of the file stored in the current storage space layer to be scanned.
  • the information acquiring module includes:
  • a scan time acquisition submodule configured to acquire a scan time of the file stored in the current storage space layer to be scanned
  • the file information parsing sub-module is configured to sequentially parse the information of the file stored in the current storage space layer to be scanned according to the sequence of the scanning time.
  • the scanning and text of the document in the present application are compared with the prior art.
  • the calculation of the path and the analysis of the file information are layered, and the next layer of file scanning and the previous file path calculation and file information analysis can be performed simultaneously, thereby reducing the scanning time and improving the scanning efficiency.
  • FIG. 1 is a schematic diagram of a storage space layer in the prior art disclosed in the background art of the present application.
  • FIG. 2 is a schematic flowchart of a file scanning method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a file scanning method according to another embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a file scanning device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a file scanning apparatus according to another embodiment of the present disclosure.
  • the storage path of the calculation file is separately performed from the analysis of the specific information, and the specific information of the file can be parsed only after the storage path of all the files is calculated, and The specific information of all the files is parsed at the same time, so that when there are many files to be scanned, the scanning time is long, and the scanning efficiency is reduced.
  • the present application discloses a file scanning method and apparatus for scanning a current storage space layer to be scanned, acquiring a file stored in a storage space layer to be scanned, and then calculating a path of a file stored in a storage space layer to be scanned.
  • the file stored in the storage space layer to be scanned is parsed, and the file information stored in the storage space layer to be scanned is obtained, and then the current storage to be scanned is determined to be empty. Whether the inter-layer still stores a folder.
  • the folder is used as the current storage space layer to be scanned, and the above steps are performed until the storage space layer to be scanned has no storage folder.
  • the file scan ends.
  • the scanning of the file, the calculation of the file path, and the parsing of the file information are layered, and the scanning of the next layer of files and the calculation of the path of the previous layer and the parsing of the file information can be performed simultaneously, thereby reducing the scanning time. Improve scanning efficiency.
  • the specific flow of the scanning method of the document and the specific structure of the document scanning apparatus will be described in detail through the following embodiments.
  • the file scanning method includes the following steps:
  • S101 Determine a current storage space layer to be scanned.
  • S102 Scan the current storage space layer to be scanned, and obtain a file to be scanned in the current storage space layer to be scanned.
  • S103 Calculate a storage path of the file stored in the current storage space layer to be scanned.
  • S104 Parsing the file stored in the current storage space layer to be scanned, and acquiring information about the file stored in the current storage space layer to be scanned.
  • step S105 Determine whether the current to-be-scanned storage space layer further stores a folder, and when the current to-be-scanned storage space layer stores a folder, step S106 is performed, and when the current to-be-scanned storage space layer is not stored. In the case of a folder, step S107 is performed.
  • the embodiment of the present invention discloses a file scanning method, which scans a current storage space layer to be scanned, acquires a file stored in a storage space layer to be scanned, and then calculates a file stored in a storage space layer to be scanned.
  • the path is used to parse the file stored in the storage space layer to be scanned, and obtain the file information stored in the storage space layer to be scanned.
  • the folder is used as the current storage space layer to be scanned, and the above steps are performed until the storage space layer to be scanned has no storage folder, and the file scanning ends. Scanning the file by the above method,
  • the calculation of the file path and the analysis of the file information are layered, and the next layer of file scanning and the previous file path calculation and file information analysis can be performed simultaneously, thereby reducing the scanning time and improving the scanning efficiency.
  • the present application also discloses a more specific file scanning method, which will be described in detail below through the following embodiments.
  • FIG. 3 is a schematic flowchart of a file scanning method according to another embodiment of the present disclosure.
  • the file scanning method includes the following steps:
  • S202 Scan the current storage space layer to be scanned, and acquire a file stored in the current storage space layer to be scanned.
  • S203 Calculate, by using a recursive algorithm, a storage path of a file stored in the current storage space layer to be scanned.
  • S204 Acquire a scan time of the file stored in the current storage space layer to be scanned
  • S205 Parse the information of the file stored in the current storage space layer to be scanned in sequence according to the sequence of the scanning time.
  • step S207 determining whether the current to-be-scanned storage space layer further stores a folder, and when the current to-be-scanned storage space layer stores a folder, step S208 is performed, and when the current to-be-scanned storage space layer is not stored. When the folder is present, step S209 is performed.
  • a more specific file scanning method is disclosed, which enables file scanning and display simultaneously, and the file scanning, file path calculation, and file information analysis are equally divided by the above method.
  • the layer is performed, and the next layer of file scanning and the previous file path calculation and file information analysis can be performed simultaneously, thereby reducing the scanning time and improving the scanning efficiency.
  • the present application provides a computer readable recording medium on which a program for executing the above method is recorded.
  • the computer readable recording medium includes any mechanism for storing or transmitting information in a form readable by a computer (eg, a computer).
  • a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , infrared signals, digital signals, etc.).
  • FIG. 4 is a schematic structural diagram of a file scanning device according to an embodiment of the present disclosure.
  • the file scanning device includes the following modules:
  • the current to-be-scanned storage space layer determining module 10 is configured to determine a current storage space layer to be scanned
  • the scanning module 11 is configured to scan the current storage space layer to be scanned, and acquire the file stored in the current storage space layer to be scanned;
  • the storage path calculation module 12 is configured to calculate a storage path of the file stored in the current storage space layer to be scanned;
  • the information obtaining module 13 is configured to parse the file stored in the current storage space layer to be scanned, and obtain information about the file stored in the current storage space layer to be scanned;
  • the determining module 14 is configured to determine whether the current storage space layer to be scanned further stores a folder
  • the loop control module 15 is configured to: when the current storage space layer to be scanned stores a folder, use the folder as a next storage space layer, and determine that the next storage space layer is a current storage space layer to be scanned. And returning to the step of scanning the current storage space layer to be scanned, and executing sequentially;
  • the end control module 16 is configured to end the file scanning when the current storage space layer to be scanned does not have a storage folder.
  • FIG. 5 is a specific structure of another file scanning device disclosed in another embodiment of the present application.
  • the file scanning device specifically includes:
  • the current to-be-scanned storage space layer determining module 20 is configured to determine a current storage space layer to be scanned.
  • the scanning module 21 is configured to scan the current storage space layer to be scanned, and acquire the file stored in the current storage space layer to be scanned.
  • the recursive algorithm calculation module 22 is configured to calculate, by using a recursive algorithm, a storage path of the file stored in the current storage space layer to be scanned.
  • the scan time obtaining module 23 is configured to acquire a scan time of the file stored in the current storage space layer to be scanned.
  • the file information parsing module 24 is configured to sequentially parse the information of the file stored in the current storage space layer to be scanned according to the sequence of the scanning time.
  • the display module 25 is configured to display the file stored in the current storage space layer to be scanned.
  • the determining module 26 is configured to determine whether the current storage space layer to be scanned further stores a folder.
  • the loop control module 27 is configured to: when the current storage space layer to be scanned stores a folder, use the folder as a next storage space layer, and determine that the next storage space layer is a current storage space layer to be scanned. And returning to the step of scanning the current storage space layer to be scanned, and executing sequentially.
  • the end control module 28 is configured to end the file scanning when the current storage space layer to be scanned does not have a storage folder.
  • the present application discloses a file scanning method and device for scanning a current storage space layer to be scanned, acquiring a file stored in a storage space layer to be scanned, and then calculating a file stored in a storage space layer to be scanned. Path, parsing the file stored in the storage space layer to be scanned, obtaining the file information stored in the storage space layer to be scanned, and then determining whether the current storage space layer to be scanned still stores a folder, and storing the current storage space layer to be scanned.
  • the folder is used as the current storage space layer to be scanned, and the above steps are performed until the storage space layer to be scanned has no storage folder, and the file scanning ends.
  • the scanning of the file, the calculation of the file path, and the analysis of the file information are layered, and the next layer of the file is scanned.
  • the calculation of the path of the upper layer and the parsing of the file information can be performed simultaneously, thereby reducing the scanning time and improving the scanning efficiency.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Abstract

一种文件扫描方法及装置,对当前待扫描存储空间层进行扫描,获取当前待扫描存储空间层存储的文件,之后,计算当前待扫描存储空间层存储的文件的路径,解析当前待扫描存储空间层存储的文件,获取当前待扫描存储空间层存储的文件信息,随后,判断当前待扫描存储空间层是否还存储有文件夹,当当前待扫描存储空间层存储有文件夹时,将文件夹作为当前待扫描存储空间层,并返回执行上述步骤,直到当前待扫描存储空间层没有存储文件夹时,文件扫描结束。通过上述方法,对文件的扫描、文件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。

Description

一种文件扫描方法及装置
本申请要求在2013年11月19日提交中国专利局、申请号为2013105864975、发明名称为“一种文件扫描方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,更具体的说,是涉及一种文件扫描方法及装置。
背景技术
为了便于查找,用户在将文档、音频或视频等文件存储在电脑硬盘、U盘或SD卡中的时候,一般采用文件夹的形式进行分层存储。假设电脑D盘为第一层存储空间,如图1a所示,该第一层存储空间存储的内容,即文件夹1、文件夹2、文件1和文件2,图1b为第二层存储空间存储的部分内容,即文件夹2存储的文件5和文件夹3,文件夹1中存储的文件3和文件4(图中未示出)也属于第二层存储空间,以及图1c为第三层存储空间存储的内容,即文件夹3内存储的文件6。
通常对存储装置中存储的文件进行扫描的时候,一般是先通过递归算法得出各个文件的存储路径,在得出所有文件的存储路径之后,再从底层解析出所有文件的文件类型、分辨率等具体信息。比如,要对上述电脑D盘的文件进行扫描,则先通过递归算法得出文件1、文件2、文件3、文件4、文件5和文件6的存储路径,在得出上述所有文件的存储路径之后,再从底层一次性解析出文件1、文件2、文件3、文件4、文件5和文件6的具体信息,最后将文件1、文件2、文件3、文件4、文件5和文件6结合相应的具体信息展现出来,才能完成对文件的扫描。
综上可知,通常在对文件扫描时,计算文件的存储路径与解析文件具体 信息是分开进行的,且只有在计算出所有文件的存储路径之后,才能解析文件的具体信息,而且,解析所有文件的具体信息是同时进行的,这样,在需要扫描的文件较多时,势必造成扫描时间较长,降低扫描效率。
发明内容
有鉴于此,本申请提供了一种文件扫描方法及装置,以克服现有技术中在需要扫描的文件较多时造成扫描时间长,降低扫描效率的问题。
为实现上述目的之一,本申请提供如下技术方案:
一种文件扫描方法,包括:
确定当前待扫描存储空间层;
对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件;
计算所述当前待扫描存储空间层存储的文件的存储路径;
解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息;
判断所述当前待扫描存储空间层是否还存储有文件夹;
当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,并返回所述确定当前待扫描存储空间层的步骤,确定所述下一存储空间层为当前待扫描存储空间层,顺序执行;
当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
在本申请一具体实施例中,在所述获取所述当前待扫描存储空间层存储的文件的信息之后,在所述判断所述当前待扫描存储空间层是否还存储文件夹之前,还包括:
将所述当前待扫描存储空间层存储的文件进行展示。
在本申请一具体实施例中,所述计算所述当前待扫描存储空间层存储的文件的存储路径,包括:
通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
在本申请一具体实施例中,所述解析所述当前待扫描存储空间层存储的 文件,包括:
获取所述当前待扫描存储空间层存储的文件的扫描时间;
按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
一种文件扫描装置,包括:
当前待扫描存储空间层确定模块,设置为确定当前待扫描存储空间层;
扫描模块,设置为对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件;
存储路径计算模块,设置为计算所述当前待扫描存储空间层存储的文件的存储路径;
信息获取模块,设置为解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息;
判断模块,设置为判断所述当前待扫描存储空间层是否还存储有文件夹;
循环控制模块,设置为当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,并返回所述确定当前待扫描存储空间层的步骤,确定所述下一存储空间层为当前待扫描存储空间层,顺序执行;
结束控制模块,设置为当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
在本申请一具体实施例中,还包括:
展示模块,设置为将所述当前待扫描存储空间层存储的文件进行展示。
在本申请一具体实施例中,所述存储路径计算模块包括:
递归算法计算子模块,设置为通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
在本申请一具体实施例中,所述信息获取模块包括:
扫描时间获取子模块,设置为获取所述当前待扫描存储空间层存储的文件的扫描时间;
文件信息解析子模块,设置为按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
经由上述的技术方案可知,与现有技术相比,本申请对文件的扫描、文 件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请背景技术公开的现有技术中的存储空间层示意图;
图2为本申请一实施例公开的一种文件扫描方法具体流程示意图;
图3为本申请另一实施例公开的一种文件扫描方法具体流程示意图;
图4为本申请一实施例公开的一种文件扫描装置具体结构示意图;
图5为本申请另一实施例公开的一种文件扫描装置具体结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
由背景技术可知,现有技术中,在对文件扫描时,计算文件的存储路径与解析具体信息是分开进行的,且只有在计算出所有文件的存储路径之后,才能解析文件的具体信息,而且,解析所有文件的具体信息是同时进行的,这样,在需要扫描的文件较多时,势必造成扫描时间较长,降低扫描效率。
为此,本申请公开了一种文件扫描方法及装置,对当前待扫描存储空间层进行扫描,获取当前待扫描存储空间层存储的文件,之后,计算当前待扫描存储空间层存储的文件的路径,解析当前待扫描存储空间层存储的文件,获取当前待扫描存储空间层存储的文件信息,随后,判断当前待扫描存储空 间层是否还存储有文件夹,当当前待扫描存储空间层存储有文件夹时,将文件夹作为当前待扫描存储空间层,并返回执行上述步骤,直到当前待扫描存储空间层没有存储文件夹时,文件扫描结束。通过上述方法,对文件的扫描、文件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。有关于该文件扫描方法的具体流程及该文件扫描装置的具体结构将通过以下实施例进行详细说明。
请参阅附图2,为本申请一实施例公开的一种文件扫描方法流程示意图,该文件扫描方法包括以下步骤:
S101:确定当前待扫描存储空间层。
S102:对所述当前待扫描存储空间层进行扫描,获取所述待扫描当前待扫描存储空间层存储的文件。
S103:计算所述当前待扫描存储空间层存储的文件的存储路径。
S104:解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息。
S105:判断所述当前待扫描存储空间层是否还存储有文件夹,并且当所述当前待扫描存储空间层存储有文件夹时,执行步骤S106,而当所述当前待扫描存储空间层没有存储文件夹时,执行步骤S107。
S106:将所述文件夹作为下一存储空间层,确定所述下一存储空间层为当前待扫描存储空间层,并返回执行步骤S102,顺序执行S103~S105。
S107:文件扫描结束。
综上所述,本实施例公开了一种文件扫描方法,对当前待扫描存储空间层进行扫描,获取当前待扫描存储空间层存储的文件,之后,计算当前待扫描存储空间层存储的文件的路径,解析当前待扫描存储空间层存储的文件,获取当前待扫描存储空间层存储的文件信息,随后,判断当前待扫描存储空间层是否还存储有文件夹,当当前待扫描存储空间层存储有文件夹时,将文件夹作为当前待扫描存储空间层,并返回执行上述步骤,直到当前待扫描存储空间层没有存储文件夹时,文件扫描结束。通过上述方法,对文件的扫描、 文件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。
在上述本申请公开的实施例的基础上,本申请还公开了一种更为具体的文件扫描方法,下面将通过以下实施例进行详细说明。
请参阅附图3,为本申请另一实施例公开的一种文件扫描方法具体流程示意图,该文件扫描方法包括以下步骤:
S201:确定当前待扫描存储空间层。
S202:对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件。
S203:通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
S204:获取所述当前待扫描存储空间层存储的文件的扫描时间;
S205:按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
S206:将所述当前待扫描存储空间层存储的文件进行展示。
S207:判断所述当前待扫描存储空间层是否还存储有文件夹,并且当所述当前待扫描存储空间层存储有文件夹时,执行步骤S208,而当所述当前待扫描存储空间层没有存储文件夹时,执行步骤S209。
S208:将所述文件夹作为下一存储空间层,确定所述下一存储空间层为当前待扫描存储空间层,并返回步骤S202,顺序执行S203~S207。
S209:文件扫描结束。
综上所述,在本实施例中,公开了一种更具体的文件扫描方法,使文件扫描与展示同时进行,通过上述方法,对文件的扫描、文件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。
上述本申请公开的实施例中详细描述了方法,对于本申请的方法可采用 多种形式的装置实现,因此本申请还公开了一种装置,下面给出具体的实施例进行详细说明。
本申请提供一种在其上记录有用于执行上述方法的程序的计算机可读记录介质。
所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等。
请参阅附图4,为本申请一实施例公开的一种文件扫描装置具体结构示意图,该文件扫描装置包括如下模块:
当前待扫描存储空间层确定模块10,设置为确定当前待扫描存储空间层;
扫描模块11,设置为对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件;
存储路径计算模块12,设置为计算所述当前待扫描存储空间层存储的文件的存储路径;
信息获取模块13,设置为解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息;
判断模块14,设置为判断所述当前待扫描存储空间层是否还存储有文件夹;
循环控制模块15,设置为当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,确定所述下一存储空间层为当前待扫描存储空间层,并返回对所述当前待扫描存储空间层进行扫描的步骤,顺序执行;
结束控制模块16,设置为当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
需要说明的是,有关于上述各个模块的功能实现请参见方法实施例一中的相关描述,本实施例不再赘述。
请参阅附图5,为本申请另一实施例公开的另一种文件扫描装置具体结构 示意图,该文件扫描装置具体包括:
当前待扫描存储空间层确定模块20,设置为确定当前待扫描存储空间层。
扫描模块21,设置为对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件。
递归算法计算模块22,设置为通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
扫描时间获取模块23,设置为获取所述当前待扫描存储空间层存储的文件的扫描时间。
文件信息解析模块24,设置为按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
展示模块25,设置为将所述当前待扫描存储空间层存储的文件进行展示。
判断模块26,设置为判断所述当前待扫描存储空间层是否还存储有文件夹。
循环控制模块27,设置为当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,确定所述下一存储空间层为当前待扫描存储空间层,并返回对所述当前待扫描存储空间层进行扫描的步骤,顺序执行。
结束控制模块28,设置为当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
需要说明的是,有关于上述各个模块的功能实现请参见方法实施例二中的相关描述,本实施例不再赘述。
综上所述:本申请公开了一种文件扫描方法及装置,对当前待扫描存储空间层进行扫描,获取当前待扫描存储空间层存储的文件,之后,计算当前待扫描存储空间层存储的文件的路径,解析当前待扫描存储空间层存储的文件,获取当前待扫描存储空间层存储的文件信息,随后,判断当前待扫描存储空间层是否还存储有文件夹,当当前待扫描存储空间层存储有文件夹时,将文件夹作为当前待扫描存储空间层,并返回执行上述步骤,直到当前待扫描存储空间层没有存储文件夹时,文件扫描结束。通过上述方法,对文件的扫描、文件路径的计算以及文件信息的解析均分层进行,且下一层文件扫描 与上一层文件路径计算及文件信息的解析可同时进行,从而降低扫描时间,提高扫描效率。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (10)

  1. 一种文件扫描方法,其特征在于,包括:
    确定当前待扫描存储空间层;
    对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件;
    计算所述当前待扫描存储空间层存储的文件的存储路径;
    解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息;
    判断所述当前待扫描存储空间层是否还存储有文件夹;
    当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,并返回所述确定当前待扫描存储空间层的步骤,确定所述下一存储空间层为当前待扫描存储空间层,顺序执行;
    当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
  2. 根据权利要求1所述的方法,其特征在于,在所述获取所述当前待扫描存储空间层存储的文件的信息之后,在所述判断所述当前待扫描存储空间层是否还存储文件夹之前,还包括:
    将所述当前待扫描存储空间层存储的文件进行展示。
  3. 根据权利要求1或2所述的方法,其特征在于,所述计算所述当前待扫描存储空间层存储的文件的存储路径,包括:
    通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
  4. 根据权利要求1或2所述的方法,其特征在于,所述解析所述当前待扫描存储空间层存储的文件,包括:
    获取所述当前待扫描存储空间层存储的文件的扫描时间;
    按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
  5. 一种文件扫描装置,其特征在于,包括:
    当前待扫描存储空间层确定模块,设置为确定当前待扫描存储空间层;
    扫描模块,设置为对所述当前待扫描存储空间层进行扫描,获取所述当前待扫描存储空间层存储的文件;
    存储路径计算模块,设置为计算所述当前待扫描存储空间层存储的文件 的存储路径;
    信息获取模块,设置为解析所述当前待扫描存储空间层存储的文件,获取所述当前待扫描存储空间层存储的文件的信息;
    判断模块,设置为判断所述当前待扫描存储空间层是否还存储有文件夹;
    循环控制模块,设置为当所述当前待扫描存储空间层存储有文件夹时,将所述文件夹作为下一存储空间层,并返回所述确定当前待扫描存储空间层的步骤,确定所述下一存储空间层为当前待扫描存储空间层,顺序执行;
    结束控制模块,设置为当所述当前待扫描存储空间层没有存储文件夹时,文件扫描结束。
  6. 根据权利要求5所述的装置,其特征在于,还包括:
    展示模块,设置为将所述当前待扫描存储空间层存储的文件进行展示。
  7. 根据权利要求5或6所述的装置,其特征在于,所述存储路径计算模块包括:
    递归算法计算模块,设置为通过递归算法计算所述当前待扫描存储空间层存储的文件的存储路径。
  8. 根据权利要求5或6所述的装置,其特征在于,所述信息获取模块包括:
    扫描时间获取模块,设置为获取所述当前待扫描存储空间层存储的文件的扫描时间;
    文件信息解析模块,设置为按照所述扫描时间的先后顺序,依次解析所述当前待扫描存储空间层存储的文件的信息。
  9. 一种在其上记录有用于执行权利要求1或2所述方法的程序的计算机可读记录介质。
  10. 一种在其上记录有用于执行权利要求3所述方法的程序的计算机可读记录介质。
PCT/CN2014/091428 2013-11-19 2014-11-18 一种文件扫描方法及装置 WO2015074545A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/037,658 US20160292174A1 (en) 2013-11-19 2014-11-18 File scanning method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310586497.5A CN103593451A (zh) 2013-11-19 2013-11-19 一种文件扫描方法及装置
CN201310586497.5 2013-11-19

Publications (1)

Publication Number Publication Date
WO2015074545A1 true WO2015074545A1 (zh) 2015-05-28

Family

ID=50083592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/091428 WO2015074545A1 (zh) 2013-11-19 2014-11-18 一种文件扫描方法及装置

Country Status (3)

Country Link
US (1) US20160292174A1 (zh)
CN (1) CN103593451A (zh)
WO (1) WO2015074545A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593451A (zh) * 2013-11-19 2014-02-19 乐视致新电子科技(天津)有限公司 一种文件扫描方法及装置
CN105653617B (zh) * 2015-12-22 2019-02-26 广州视源电子科技股份有限公司 多媒体文件管理器快速显示文件的方法及系统
CN108133154B (zh) * 2017-12-25 2020-03-24 奇安信科技集团股份有限公司 一种对文件进行存储的方法及装置
US10917535B2 (en) * 2019-06-27 2021-02-09 Kyocera Document Solutions Inc. Scanning system with automatic file folder refiler

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6741996B1 (en) * 2001-04-18 2004-05-25 Microsoft Corporation Managing user clips
CN101673302A (zh) * 2009-09-22 2010-03-17 珠海市安德网络科技有限公司 提高杀毒引擎扫描速度的方法
CN102411628A (zh) * 2011-12-19 2012-04-11 Tcl集团股份有限公司 基于android系统的文件扫描方法及装置
CN102929981A (zh) * 2012-10-17 2013-02-13 Tcl通力电子(惠州)有限公司 多媒体扫描文件索引方法及装置
CN103345494A (zh) * 2013-06-27 2013-10-09 广东欧珀移动通信有限公司 快速浏览文件的方法及其移动终端
CN103593451A (zh) * 2013-11-19 2014-02-19 乐视致新电子科技(天津)有限公司 一种文件扫描方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006134526A2 (en) * 2005-06-17 2006-12-21 Koninklijke Philips Electronics N.V. Method and device of tracking file transfer
CN102360353A (zh) * 2011-09-27 2012-02-22 汉王科技股份有限公司 扫描文件存储方法、装置和扫描设备
CN103369003A (zh) * 2012-03-30 2013-10-23 网秦无限(北京)科技有限公司 一种利用云计算扫描移动设备的冗余文件的方法和系统
CN103019839B (zh) * 2012-11-15 2015-10-28 广东欧珀移动通信有限公司 一种文件快速显示方法、装置及终端
CN103198101A (zh) * 2013-03-15 2013-07-10 华为技术有限公司 一种媒体文件扫描方法及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6741996B1 (en) * 2001-04-18 2004-05-25 Microsoft Corporation Managing user clips
CN101673302A (zh) * 2009-09-22 2010-03-17 珠海市安德网络科技有限公司 提高杀毒引擎扫描速度的方法
CN102411628A (zh) * 2011-12-19 2012-04-11 Tcl集团股份有限公司 基于android系统的文件扫描方法及装置
CN102929981A (zh) * 2012-10-17 2013-02-13 Tcl通力电子(惠州)有限公司 多媒体扫描文件索引方法及装置
CN103345494A (zh) * 2013-06-27 2013-10-09 广东欧珀移动通信有限公司 快速浏览文件的方法及其移动终端
CN103593451A (zh) * 2013-11-19 2014-02-19 乐视致新电子科技(天津)有限公司 一种文件扫描方法及装置

Also Published As

Publication number Publication date
US20160292174A1 (en) 2016-10-06
CN103593451A (zh) 2014-02-19

Similar Documents

Publication Publication Date Title
US20140281855A1 (en) Displaying information in a presentation mode
US20200322684A1 (en) Video recommendation method and apparatus
WO2015074545A1 (zh) 一种文件扫描方法及装置
US9098836B2 (en) Rich email attachment presentation
USRE48430E1 (en) Two-dimensional code processing method and terminal
US20130191715A1 (en) Borderless Table Detection Engine
US20170111532A1 (en) Real-time processing of video streams captured using mobile devices
WO2017067275A1 (zh) 一种文档图片显示方法、装置及终端
US9420137B2 (en) Image-reading apparatus, image-processing method, and computer program product
CN104834645B (zh) 用于展示版式文档的方法和装置
US20150058708A1 (en) Systems and methods of character dialog generation
WO2017032313A1 (zh) 一种待清理数据识别方法、装置及电子设备
US20160321500A1 (en) Document analysis system, image forming apparatus, and analysis server
US10769247B2 (en) System and method for interacting with information posted in the media
KR102505973B1 (ko) 영상 처리 장치, 이의 제어 방법 및 컴퓨터 프로그램이 기록된 기록 매체
US20180018348A1 (en) Method And Apparatus For Searching Information
CN107197372B (zh) 批量竖屏视频的剪切方法、装置及电子设备
US9881223B2 (en) Forming scanned composite document with optical character recognition function
JP2009177630A5 (zh)
US20160188580A1 (en) Document discovery strategy to find original electronic file from hardcopy version
US20140300790A1 (en) Image processing apparatus, and non-transitory computer readable medium storing image processing program
US20130003112A1 (en) Scanner device and scanning method
CN102426581A (zh) 一种生成文件预览的方法及装置
US20150261746A1 (en) Translation system, information processing apparatus, information processing method, and computer program product
US10257383B2 (en) Image processing apparatus with partition image processing function

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: 14863510

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15037658

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14863510

Country of ref document: EP

Kind code of ref document: A1