WO2015007125A1 - 一种对存储器上的文件进行扫描的方法及装置 - Google Patents

一种对存储器上的文件进行扫描的方法及装置 Download PDF

Info

Publication number
WO2015007125A1
WO2015007125A1 PCT/CN2014/079900 CN2014079900W WO2015007125A1 WO 2015007125 A1 WO2015007125 A1 WO 2015007125A1 CN 2014079900 W CN2014079900 W CN 2014079900W WO 2015007125 A1 WO2015007125 A1 WO 2015007125A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
memory
scan
files
information database
Prior art date
Application number
PCT/CN2014/079900
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 腾讯科技(深圳)有限公司
Publication of WO2015007125A1 publication Critical patent/WO2015007125A1/zh

Links

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/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for scanning a file on a memory. Background of the invention
  • CF Compact Flash
  • SD Secure Digital
  • MMC Multimedia
  • the memory When the memory is connected to the electronic terminal directly or through the intermediary device, in order to uniformly and centrally manage each file in the memory, it is convenient for the user to view various file information in the memory, and the operating system on the electronic terminal usually scans the file stored in the memory. To obtain attribute information such as metadata and thumbnails of each file in the memory, so as to subsequently display the information on the electronic terminal for the user to operate and select.
  • the present invention provides a method and apparatus for scanning a file on a memory to improve scanning efficiency.
  • a method of scanning a file on a memory comprising:
  • the update file includes a modified file and a newly added file on the memory from the end of the last scan to the start of the current scan;
  • the attribute information of all the files recorded in the file information database after the update and delete operations is output as the result of the current scan.
  • the present invention also provides an apparatus for scanning a file on a memory, the apparatus comprising:
  • a search module configured to scan the memory according to the file information database, and search for an update file on the memory according to the scan result, where the file information database records all the memory on the memory obtained by scanning the memory last time Attribute information of the file, the update file includes from the end of the last scan to the start of the current scan, the memory Contained modified files and new files;
  • An obtaining module configured to obtain attribute information of the update file
  • an update module configured to update the file information database according to the attribute information of the update file
  • a deletion module configured to delete attribute information of a file that is already stored in the file information database but is not found when the memory is scanned this time.
  • the present invention also provides a non-transitory computer readable storage medium having stored thereon computer executable instructions for performing a method of scanning a file on a memory when the executable instructions are executed, Methods include:
  • the update file includes a modified file and a newly added file on the memory from the end of the last scan to the start of the current scan;
  • the attribute information of all the files recorded in the file information database after the update and delete operations is output as the result of the current scan.
  • the technical solution proposed by the present invention can avoid that each time the memory is connected to the electronic terminal, the attribute information of each file on the memory is re-scanned, and only the update file on the memory is searched for. Obtaining the corresponding attribute information and updating the file information database accordingly greatly saves the resources consumed by the repeated scanning, speeds up the scanning speed, and improves the scanning efficiency.
  • FIG. 1 is a schematic flowchart of a method for scanning a file on a memory according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of an application environment of a method for scanning a file on a memory according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic flowchart of a step of scanning a memory according to a file information database and searching for an update file on a memory according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic flowchart of a method for scanning a file on a memory according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for scanning a file on a memory according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of an apparatus for scanning a file on a memory according to Embodiment 4 of the present invention.
  • FIG. 7 is a schematic structural diagram of an apparatus for scanning a file on a memory according to Embodiment 5 of the present invention. Mode for carrying out the invention
  • the method and apparatus for scanning a file on a memory in the embodiment of the present invention may be run on an operating system platform of the smart device.
  • the smart device may be any one of a mobile phone, a personal digital assistant, a tablet computer, a desktop computer, and the like, and the smart device may include any one of a central processing unit, a memory, a switching device, a power supply, a clock signal generator, and the like. Group Hehe.
  • the smart device can be used to implement the functions of the method and apparatus for scanning a file on a memory in an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of scanning a party file for scanning a file on a memory according to Embodiment 1 of the present invention.
  • the terminal 21 includes a storage device 211, a processing device 212, and a display device 213.
  • the software program of the method is stored in the storage device 211 and can be executed by the processing device 212.
  • Display device 213 is provided to provide an interface for displaying the results of scanning files on the memory. See Figure 1, which includes:
  • Step S101 Scan the memory according to the file information database, and search for an update file on the memory;
  • the file information database records attribute information of all files on the memory obtained by scanning the memory last time. Specifically, when the current scan is the initial scan, the attribute information of all the files on the memory recorded in the file information database is empty.
  • the attribute information of the file includes a path name of the file, a recent modification time of the file, a size of the file, and an identity (ID) value of the folder where the file is located.
  • ID identity
  • the attribute information of the file is not limited thereto.
  • the attribute information may include other information such as a thumbnail corresponding to the file.
  • the key value of the attribute information of each file recorded in the file information database is the path name of the file, and the file information database uses the key value as the access index.
  • the update file includes files modified and new files on the memory from the end of the last scan to the start of this scan.
  • FIG. 3 is a schematic flowchart of a process of scanning a memory according to a file information database and searching for an update file on a memory according to the embodiment of the present invention.
  • the step includes steps S1011 to S1017: Step S1011: Scan a file stored in the memory, and obtain a path name of the current scan file;
  • the file on the memory may be scanned in a recursive manner to obtain a path name of the current scan file, wherein the path name of the current scan file is unique, and the file can be uniquely identified. For example, if the name of the current scanned file is 1. JPEG, and the storage location recorded on the electronic terminal is the picture subfolder under the folder 1 of the H disk, the obtained path name can be recorded as: H: ⁇ folder 1 : ⁇ Picture: ⁇ 1.JPEG.
  • Step S1012 determining whether the path name of the current scan file exists in the file information database, and if yes, executing step S1014; otherwise, executing step S1013;
  • the path name of the current scan file After obtaining the path name of the current scan file, it is found from the file information database whether there is attribute information with the path name of the current scan file as a key value, and if so, it is determined that the path name of the current scan file exists in the file information database. Otherwise, it is determined that the path name of the current scan file does not exist in the file information database.
  • Step S1013 When it is determined that the path name of the current scan file does not exist in the file information database, it is determined that the current scan file is a file added from the end of the last scan to the start of the current scan, and step S1017 is performed;
  • the path name of the current scan file is not found from the file information database, it is determined that the current scan file does not exist in the memory during the last scan, from the end of the last scan to the start of the current scan.
  • the newly added file that is, the change file on the storage.
  • Step S1014 when it is determined that the path name of the current scan file exists in the file information database, the latest modification time of the current scan file on the memory is obtained, and step S1015 is performed;
  • the latest modification time of the current scan file on the current storage is obtained.
  • the recent modification time includes Year, month, day, hour, minute and other information.
  • Step S1015 determining whether the latest modification time of the current scan file on the acquired memory is greater than the latest modification time of the current scan file recorded in the file information database, if yes, step S1016 is performed, otherwise, step S1017 is performed;
  • Step S1016 When the latest modification time of the current scan file on the acquired memory is greater than the latest ⁇ ⁇ tampering time of the current scan file recorded in the file information database, determine that the current scan file is from the end of the last scan to the present During the start of the secondary scan, the content on the memory has a modified file, and step S1017 is performed;
  • the latest scan time of the current scan file on the acquired memory is T1: 10:8 on May 20, 2013, the latest ⁇ ' tampering time of the current scan file recorded in the file information database is ⁇ 2: At 14:10 on May 1, 2013, the judgment time T1 is greater than time ⁇ 2, and the current scan file is a file whose contents are modified from the end of the last scan to the start of this scan.
  • the latest modification time of the current scan file on the obtained memory is T1: 10:8 on May 20, 2013, and the latest ⁇ ⁇ 'tampering time of the current scan file recorded in the file information database is ⁇ 2: At 8:10 on May 20, 2013, the judgment time T1 is greater than the time ⁇ 2, and the current scan file is a file whose contents are modified from the end of the last scan to the start of the current scan.
  • the latest modification time of the current scan file on the obtained memory is T1 : 2013 At 10:08 on May 20, the latest tampering time of the current scan file recorded in the file information database is T2: 8:10 on April 20, 2013, the judgment time T1 is greater than time T2, and the current scan file is from The file on the memory has a modified file from the end of the last scan to the start of this scan.
  • Step S1017 Continue scanning the other files stored in the memory to determine whether the scanned file is a newly added file or a modified file.
  • step S1011 After determining whether the currently scanned file is a newly added file on the memory or a modified file, continue to scan other files stored in the memory, and again according to the method of step S1011 to step S1016 in this embodiment. It is judged whether the file scanned on the memory is a newly added file on the memory or a file whose content is modified.
  • Step S102 Obtain attribute information of an update file.
  • the attribute information of the update file includes the path name of the file, the latest modification time of the file, the size of the file, and the identity (Identity, ID) value of the folder where the file is located.
  • the attribute information of the update file is not limited thereto.
  • the attribute information includes other information such as a thumbnail corresponding to the file.
  • step S1011 For the path name of the file that has been modified in step S1011, the file has been modified, and the latest modification time of the file whose content has been modified is obtained in step S1014.
  • step S102 When the step S102 is performed, the Path name, last modified time.
  • Step S103 Update the file information database according to the attribute information of the update file; the file information database is used to record attribute information of all files on the memory.
  • the step of updating the file information database includes: When the file corresponding to the update file is a file with modified content, the latest modification time of each modified file in the file information database is updated to the latest modification time of the file on the memory with the modified content;
  • the attribute information of each newly added file on the storage is added to the file information database.
  • Step S104 Delete attribute information of a file that has been stored in the file information database but is not found in the scan memory;
  • H: ⁇ Folder 3: ⁇ D: ⁇ 6.JPEG At 15:32 on June 2, 2013, after all the files on the memory have been scanned, the files with the contents of the memory are modified: "H: ⁇ Clip 2: ⁇ C: ⁇ 3.JPEG", “H: ⁇ folder 3: ⁇ D: ⁇ 4.JPEG” ; The new file is: “H: ⁇ folder 2: ⁇ C: ⁇ 5.JPEG ", "H: ⁇ folder 3: ⁇ D: ⁇ 6.JPEG”.
  • the update of the file information database includes: The most recent modification time corresponding to the file "H: ⁇ folder 2: ⁇ C: ⁇ 3. JPEG" in the file information database has been modified.
  • Step S101 further includes scanning the memory according to the folder information database to find an update folder on the storage;
  • the folder information database records attribute information of all folders obtained by scanning the memory last time, and the update folder includes a folder with modified contents on the memory from the end of the last scan to the start of the current scan.
  • New folder The property information of the folder includes the path name of the folder, the latest modification time of the folder, the ID value of the parent folder of the folder, and the number of files of various types under the folder;
  • the process of judging the update folder on the memory is similar to the process of judging the update file on the memory, and will not be described here;
  • Step S102 further includes acquiring attribute information of the update folder, and the process is similar to the process of obtaining the attribute information of the update file, and details are not described herein;
  • Step S103 further includes updating the folder information database according to the attribute information of the update folder, and the process is similar to the process of updating the file information database, and details are not described herein;
  • Step S104 further includes deleting the attribute information of the folder that has been stored in the folder information database but not found during the current scan of the memory, and the process and the deleted file information database already exist, but in the current scan memory
  • the process of attribute information of files that are not found at the time is similar, and will not be described here.
  • the method for scanning a file on a memory scans the memory according to the file information database and searches for an update file on the memory; and updates the file information database according to the attribute information of the update file. And delete the attribute information of the file that has been stored in the file information database but was not found at the time of scanning the memory.
  • attribute information of all files on the memory recorded in the file information database at the time of the last scan can be multiplexed each time the memory is scanned, and no need to re-acquire, as long as the update file on the memory is searched for, Corresponding attribute information, and corresponding update information database, reduce the time taken for obtaining attribute information of all files on the memory, and speed up the scanning speed.
  • Embodiment 2
  • FIG. 4 is a schematic flowchart of a method for scanning a file on a memory according to Embodiment 2 of the present invention. Referring to Figure 4, the method includes:
  • Step S401 it is determined whether the current scan is the first scan, and if so, step S402 is performed, otherwise, step S403 is performed;
  • whether the current scan is the first scan can be determined by searching whether there is a file information database corresponding to the memory.
  • the file information database can be stored in the electronic terminal or the memory. Considering the case where there are multiple mobile memories connected to the electronic terminal, if the file information database is stored on the electronic terminal, it takes up a large memory space, and the file information database can be stored in the memory.
  • the current scan is the first scan by searching whether the corresponding file information database exists in the memory to be scanned, and if so, it is judged that the scan is not the first scan, otherwise, the current judgment is made.
  • the scan is the first scan.
  • Step S402 establishing and storing a file information database in which attribute information of all files on the memory is recorded, and ending;
  • the file information database corresponding to the memory to be scanned is established, and each file on the memory is scanned, the attribute information of each file is obtained, and the attribute information is added to the file. Established file information in the database. After all the attribute information of all the files on the memory are added to the file information database, the file information database at this time is stored in the memory for use in the next scan.
  • Step S403 Scan the memory according to the file information database, and search for an update file on the storage;
  • the memory is scanned according to the file information database in the first embodiment, and the steps of searching for the update file on the memory are the same, and details are not described herein.
  • Step S404 Obtain attribute information of the update file.
  • This step is the same as the step of obtaining the attribute information of the update file in the first embodiment, and details are not described herein again.
  • Step S405 Update the file information database according to the attribute information of the update file. This step is the same as the step of updating the file information database according to the attribute information of the update file in the first embodiment, and details are not described herein again. Step S406, deleting the attribute information of the file that has been stored in the file information database but not found in the current scan memory;
  • This step is the same as the step of deleting the file information database in the first embodiment, but the attribute information of the file not found in the scan memory is the same, and details are not described herein again.
  • Step S407 outputting attribute information of all files recorded in the file information database after the update and delete operations as the current scan result
  • the file information database Updating the file information database according to the attribute information of the update file, and deleting the attribute information of the file that has been stored in the file information database but not found in the scan memory, the file information database records the memory on the scan time.
  • the attribute information of all stored files can be output as the result of this scan, and the attribute information about the file on the memory in the electronic terminal user interface is updated.
  • step S404 when a file on the memory is found to be a modified file or a newly added file, step S404 may be directly executed to obtain the found content.
  • the modified file or the attribute information of the newly added file, and then executing step S403 to search for other modified files or newly added files on the memory, and the searching process and the obtaining process are sequentially performed alternately.
  • the file information database is periodically updated according to the modified file and the attribute information of the newly added file in the content acquired in step S404 every preset time period.
  • the main thread is used only to implement the user interaction interface, and a sub-thread can be introduced into the electronic terminal operating system to implement scanning of the file on the memory.
  • the child thread includes a scan sub-thread TScan and a processing sub-thread TUpdate.
  • the scan sub-thread TScan and the processing sub-thread TUpdate are started.
  • the memory will be acquired every preset time period.
  • the attribute information of the modified file and the newly added file is sent to the main thread through the Handler of the main thread (identified by the AHandler).
  • the message processing function of the AHandler of the main thread extracts the attribute information of the modified file and the newly added file in the memory during the time period from the message, and the notification processing sub-thread TUpdate updates the file information database.
  • the specific update processing process is: constructing a task model UpdateTask, which includes the attribute information of the modified file on the storage memory and the newly added file, and then adds the task model UpdateTask to the work queue of the processing sub-thread TUpdate.
  • the trigger processing sub-thread Tupdate works. Processing Sub-Threads TUpdate initially waits in the work queue. Once the queue is not empty, the processing sub-thread Tupdate updates the file information database according to the contents contained in the task model UpdateTask.
  • Tscan After the scanning sub-thread Tscan completes scanning all the files on the memory, it can determine which attribute information recorded in the file information database corresponds to the file that does not exist in the memory during the current scanning, and then processes the processing sub-thread through the main thread.
  • TUpdate deletes the attribute information of the file that has been stored in the file information database but is not found during the scan of the memory, and uses the attribute information of all files recorded in the file information database after the update and delete operation as the current scan. The result is output.
  • the method for scanning a file on a memory in the second embodiment of the present invention determines that the current scan is a first scan, and creates and pre-stores a file information database in which attribute information of all files on the memory is recorded, and determines that the scan is
  • the memory is scanned according to the file information database, the update file on the memory is found, the file information database is updated according to the attribute information of the update file, and the file information database has been deleted, but the file information database has been deleted, but
  • the attribute information of the file that was not found at the time of scanning the memory finally outputs the attribute information of all the files recorded in the file information database after the update and delete operations as the result of the current scan.
  • the second embodiment of the present invention can make it possible to multiplex the memory recorded in the file information database when the last scan is completed each time the memory is scanned.
  • There is file attribute information no need to re-acquire, just look up the update file on the memory, get its corresponding attribute information, and update the information database accordingly, reducing the time taken to obtain the attribute information of all the files on the memory, improve The scanning efficiency.
  • the second embodiment of the present invention proposes a method for scanning a file on a memory by using a scan sub-thread and a processing sub-thread, which reduces the calculation load of the main thread in the electronic terminal operating system.
  • FIG. 5 is a schematic structural diagram of an apparatus for scanning a file on a memory according to Embodiment 3 of the present invention.
  • the device includes: a searching module 501, configured to scan a memory according to a file information database, and search for an update file on the storage; an obtaining module 502, configured to obtain attribute information of the update file; and an update module 503, configured to The attribute information of the file is updated, and the file information database is updated; the deleting module 504 is configured to delete the attribute information of the file that has been stored in the file information database but is not found in the current scan memory.
  • the file information database records the attribute information of all the files on the memory obtained when the memory was last scanned. Specifically, when the scan is the initial scan, the attribute information content of all files on the memory recorded in the file information database is empty.
  • the attribute information of the file includes the path name of the file, the latest modification time of the file, the size of the file, and the identity (Identity, ID) value of the folder where the file is located.
  • the attribute information of the file is not limited thereto. For example, if the current file is a file in a picture or video format, the attribute information includes other information such as a thumbnail corresponding to the file.
  • the key value of the attribute information of each file recorded in the file information database is the path name of the file, and the file information database uses the key value as the access index.
  • the update file includes files with modified contents and new files on the memory from the end of the last scan to the start of this scan.
  • the searching module 501 includes: The first obtaining unit 5011 is configured to scan a file stored in the memory, and obtain a path name of the current scanned file.
  • the first determining unit 5012 is configured to determine whether a path name of the current scan file exists in the file information database
  • the first determining unit 5013 is configured to: when it is determined that the path name of the current scan file does not exist in the file information database, determine that the current scan file is a file added from the end of the last scan to the beginning of the current scan;
  • the second obtaining unit 5014 is configured to: when determining that the path name of the current scan file exists in the file information database, obtain the latest modification time of the current scan file on the memory; the second determining unit 5015 is configured to determine the acquired memory Whether the latest modification time of the current scan file is greater than the recent tampering time of the current scan file recorded in the file information database;
  • the second determining unit 5016 is configured to: when the latest modification time of the current scan file on the acquired memory is greater than the latest modification time of the current scan file recorded in the file information database, determine that the current scan file is from the end of the last scan to the present During the start of the secondary scan, the contents of the memory have modified files.
  • the attribute information of the update file acquired by the obtaining module 502 includes the path name of the file, the latest modification time of the file, the size of the file, and the identity (ID) value of the folder where the file is located.
  • the attribute information of the update file is not limited thereto.
  • the attribute information includes other information such as a thumbnail corresponding to the file.
  • the acquiring unit 502 can directly read the latest modified time of the file whose content has been modified.
  • the update module 503 includes:
  • the modifying unit 5031 is configured to: when the file corresponding to the update file is a file whose content is modified, update the latest modification time of each file with the modified content in the file information database to a file on the memory that has the content modified. Recent modification time;
  • the adding unit 5032 is configured to add attribute information of each newly added file on the storage to the file information database when the file corresponding to the update file is a newly added file.
  • the deletion module 504 can determine, according to the path name of each file that the search module 501 scans each file on the memory, which attribute information recorded in the file information database corresponds to the file that does not exist on the memory during the current scan. File, and then delete the file information in the database to record the attribute information of the file.
  • the searching module 501 is further configured to scan the memory according to the folder information database to search for an update folder on the memory; the obtaining module 502 further The attribute information is used to obtain the update folder; the update module 503 is further configured to update the folder information database according to the attribute information of the update folder; the deletion module 504 is further configured to delete the already existing one in the folder information database, but this time Attribute information of a folder that was not found when scanning the storage.
  • the device for scanning a file on the memory provided in this embodiment is the same as the method for performing the scanning of the file on the memory. For details not described in detail in this embodiment, reference may be made to the first embodiment. .
  • the apparatus for scanning a file on a memory scans the memory according to the file information database, finds an update file on the memory, and updates the file information according to the attribute information of the update file. Database, and delete the attribute information of the file that has been stored in the file information database but not found during the scan of the memory.
  • the third embodiment of the present invention can make the attribute information of all the files on the memory recorded in the file information database at the time of the last scan completed, and need not re-acquire, as long as the update file on the memory is obtained, and obtain the same.
  • Corresponding attribute information, and corresponding update information database reduce the time taken for obtaining attribute information of all files on the memory, and speed up the scanning speed.
  • FIG. 6 is a schematic structural diagram of an apparatus for scanning a file on a memory according to Embodiment 4 of the present invention.
  • the device includes:
  • the scan determining module 601 is configured to determine whether the current scan is the initial scan. When the scan is the initial scan, the file information database in which the attribute information of all the files on the memory is recorded is pre-stored, and the scan is a non-initial scan. Sending a control signal to the lookup module 602;
  • the searching module 602 is configured to receive a control signal sent by the scan determining module 601, scan the memory according to the file information database, and search for an update file on the memory;
  • the obtaining module 603 is configured to obtain attribute information of the update file.
  • the deleting module 605 is configured to delete attribute information of a file that has been stored in the file information database but is not found when the memory is scanned this time;
  • the output module 606 is configured to output attribute information of all the files recorded in the file information database after the update and delete operations as the result of the current scan.
  • the scan determination module 601 can determine whether the current scan is the first scan by searching whether there is a file information database corresponding to the memory.
  • the file information database can be stored in the electronic terminal or the memory.
  • the scan judging module 601 can determine whether the scan is the first scan by searching whether the file information database corresponding to the scan is present in the memory to be scanned. If yes, the scan judging module 601 judges that the scan is not the first time. Scan, otherwise, the scan determination module 601 determines that the current scan is the first scan.
  • the scan determination module 601 creates a file information database corresponding to the memory to be scanned, starts scanning each file on the memory, acquires attribute information of each file, and sets attribute information thereof. Add to the created file information database. After all the attribute information of all the files on the memory are added to the file information database, the scan judging module 601 pre-stores the file information database at this time to the memory for use in the next scan.
  • the deletion module 505 deletes the file information database, but after the attribute information of the file not found in the scan, the file information database after the update and delete operations is recorded.
  • the attribute information of all the files is output as the result of the current scan, and the attribute information about the file on the memory in the electronic terminal user interface is updated.
  • the control module 603 may directly send a control signal to the obtaining module 603 to notify the obtaining module 603.
  • the found module has the modified file or the attribute information of the newly added file, and then the search module 602 searches for the modified file or the newly added file on the memory, and the search module 602 and the obtaining module 603 alternately work in sequence.
  • the update module 604 can periodically update the file information database according to the modified file and the attribute information of the newly added file acquired by the obtaining module 603 every preset time period.
  • the device for scanning the file on the memory provided in this embodiment is the same as the method for scanning the file on the memory provided by the second embodiment. For details not described in detail in this embodiment, reference may be made to the second embodiment. .
  • the apparatus for scanning a file on a memory in the fourth embodiment of the present invention determines that the current scan is a first scan, and creates and stores a file information database in which attribute information of all files on the memory is recorded, and determines that the scan is
  • the memory is scanned according to the file information database, the update file on the memory is found, the file information database is updated according to the attribute information of the update file, and the file information database has been deleted, but the file information database has been deleted, but
  • the attribute information of the file that was not found at the time of scanning the memory finally outputs the attribute information of all the files recorded in the file information database after the update and delete operations as the result of the current scan.
  • attribute information of all files on the memory recorded in the file information database at the time of the last scan can be multiplexed each time the memory is scanned, and no need to re-acquire, as long as the update file on the memory is searched for Corresponding attribute information, and corresponding update information database, reduce the time taken for obtaining attribute information of all files on the memory, and improve scanning efficiency.
  • Embodiment 5
  • FIG. 7 is a block diagram showing another structure of an apparatus for scanning a file on a memory according to an embodiment of the present invention.
  • the apparatus includes: a storage device 71, a processor 72, a bus 73, and an I/O port 74.
  • the storage device 71 and the processor 72 are connected to the bus 73, respectively.
  • the processor 72 communicates with external devices via an I/O port 74.
  • the storage device 71 is configured to store a scan determination module 701, a lookup module 702, an acquisition module 703, an update module 704, a deletion module 705, and an output module 706.
  • the storage device 71 can be a non-transitory computer readable storage medium.
  • the processor 72 is configured to communicate with the storage device 71 for performing operations performed by the scan determining module 701, the searching module 702, the obtaining module 703, the updating module 704, the deleting module 705, and the output module 706.
  • the functions of the scan determination module 701, the search module 702, the acquisition module 703, the update module 704, the deletion module 705, and the output module 706 are the same as the scan determination module 601, the search module 602, the acquisition module 603, the update module 604, and the deletion module 605.
  • the functions of the output module 606 are respectively the same.
  • the scan determination module 701, the lookup module 702, the acquisition module 703, the update module 704, the deletion module 705, and the output module 706 may be machine readable instructions. All or part of the technical solutions provided by the above embodiments may be implemented by software programming, and the software program is stored in a readable storage medium, such as: a hard disk in a computer, a computer read only memory, a CD or a floppy disk, etc. .

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)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种对存储器上的文件进行扫描的方法及装置。所述方法包括:根据文件信息数据库对存储器进行扫描,査找存储器上的更新文件;获取更新文件的属性信息;根据更新文件的属性信息,更新所述文件信息数据库;删除所述文件信息数据库中已经存有的,但在本次扫描存储器时未发现的文件的属性信息。在对存储器进行扫描时,只需获取存储器上的更新文件的属性信息用以更新文件信息数据库,将经过更新和删除操作之后的文件信息数据库中的所有文件的属性信息作为扫描结果输出,大大节省了重复扫描所耗费的资源,加快了扫描速度。

Description

一种对存储器上的文件进行扫描的方法及装置 本申请要求于 2013 年 7 月 15 日提交中国专利局、 申请号为 201310296298.0, 发明名称为 "一种对存储器上的文件进行扫描的方法 及装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请 中。 技术领域
本发明涉及通信技术领域, 特别涉及一种对存储器上的文件进行扫 描的方法及装置。 发明背景
随着电子科学技术的发展, 诸多电子终端, 例如台式电脑、 笔记本 电脑、 智能手机、 个人数字助理, 逐渐进入人们的日常生活和工作中, 成为人们日常生活和工作中必不可少的一部分。 同时, 各种各样的存储 器蜂拥而现, 例如压缩闪存卡(Compact Flash, CF )、 安全数码( Secure Digital, SD )存储卡、 多媒体 (Multimedia Card, MMC)存储卡、硬盘等。 存储器能够用来存储音乐、 图像、 视频、 应用软件等文件, 可以内置于 电子终端, 或独立于电子终端存在。 当存储器直接或通过中介设备与电 子终端连接时, 为了对存储器中各文件进行统一、 集中管理, 方便用户 查看存储器中各类文件信息, 电子终端上的操作系统通常会对存储器存 储的文件进行扫描, 以获取存储器中各文件的元数据、 缩略图等属性信 息, 以便后续在电子终端上显示该信息, 供用户操作选择。
然而,获取存储器中各文件的元数据、缩略图等属性信息耗时较长, 会导致扫描效率降低, 特别是在存储器存储容量大、 存储文件数目多的 情况下, 其扫描过程将会花费很大的时间开销。 并且, 在现有的技术中, 电子终端每次与存储器连接时, 都要重新扫描存储器中的所有文件, 获 取存储器中各文件的属性信息。 发明内容
本发明提出一种对存储器上的文件进行扫描的方法及装置, 以提高 扫描效率。
一种对存储器上的文件进行扫描的方法, 所述方法包括:
根据文件信息数据库对所述存储器进行扫描, 该文件信息数据库中 记录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息; 根据扫描结果查找所述存储器上的更新文件, 所述更新文件包括从 上次扫描结束到本次扫描开始期间, 所述存储器上内容有修改的文件和 新增的文件;
获取所述更新文件的属性信息;
根据所述更新文件的属性信息, 更新所述文件信息数据库; 删除所述文件信息数据库中已经存有的, 但在本次扫描所述存储器 时未发现的文件的属性信息; 及
将经过更新和删除操作之后的所述文件信息数据库记录的所有文件 的属性信息作为本次扫描结果进行输出。
本发明还提供了一种对存储器上的文件进行扫描的装置, 所述装置 包括:
查找模块, 用于根据文件信息数据库对所述存储器进行扫描, 根据 扫描结果查找所述存储器上的更新文件, 其中所述文件信息数据库中记 录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息, 所 述更新文件包括从上次扫描结束到本次扫描开始期间, 所述存储器上内 容有修改的文件和新增的文件;
获取模块, 用于获取所述更新文件的属性信息;
更新模块, 用于根据所述更新文件的属性信息, 更新所述文件信息 数据库;
删除模块, 用于删除所述文件信息数据库中已经存有的, 但在本次 扫描所述存储器时未发现的文件的属性信息。
本发明还提供了一种非瞬时性的计算机可读存储介质, 其上存储有 计算机可执行指令, 当这些可执行指令被执行时, 执行一种对存储器上 的文件进行扫描的方法, 所述方法包括:
根据文件信息数据库对所述存储器进行扫描, 该文件信息数据库中 记录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息; 根据扫描结果查找所述存储器上的更新文件, 所述更新文件包括从 上次扫描结束到本次扫描开始期间, 所述存储器上内容有修改的文件和 新增的文件;
获取所述更新文件的属性信息;
根据所述更新文件的属性信息, 更新所述文件信息数据库; 删除所述文件信息数据库中已经存有的, 但在本次扫描所述存储器 时未发现的文件的属性信息; 及
将经过更新和删除操作之后的所述文件信息数据库记录的所有文件 的属性信息作为本次扫描结果进行输出。
相较于现有技术, 本发明提出的技术方案可以避免每次存储器与电 子终端连接时, 都要通过重新扫描存储器上的各文件来获取其属性信 息, 而只需查找存储器上的更新文件, 获取其对应的属性信息, 并相应 的更新文件信息数据库, 大大节省了重复扫描所耗费的资源, 加快了扫 描速度, 提高了扫描效率。 附图简要说明
图 1为本发明实施例一提供的一种对存储器上的文件进行扫描的方 法的流程示意图;
图 2为本发明实施例一提供的一种对存储器上的文件进行扫描的方 法的应用环境示意图;
图 3为本发明实施例一提供的根据文件信息数据库对存储器进行扫 描, 查找存储器上的更新文件的步骤的流程示意图;
图 4为本发明实施例二提供的一种对存储器上的文件进行扫描的方 法的流程示意图;
图 5为本发明实施例三提供的一种对存储器上的文件进行扫描的装 置的结构示意图;
图 6为本发明实施例四提供的一种对存储器上的文件进行扫描的装 置的结构示意图。
图 7为本发明实施例五提供的一种对存储器上的文件进行扫描的装 置的结构示意图。 实施本发明的方式
下面结合附图和实施例对本发明作进一步的详细说明。 可以理解的 是,此处所描述的具体实施例仅用于解释本发明,而非对本发明的限定。 另外还需要说明的是, 为了便于描述, 附图中仅示出了与本发明相关的 部分而非全部内容。
本发明实施例的对存储器上的文件进行扫描的方法及装置可以运行 于智能设备的操作系统平台上。 该智能设备可以是移动电话、 个人数字 助理、 平板电脑、 台式电脑等等中的任意一种, 该智能设备中可以包括 中央处理器、 存储器、 开关器件、 电源、 时钟信号生成器等中的任意组 合。 智能设备可用于实现本发明实施例的对存储器上的文件进行扫描的 方法及装置的功能。
实施例一
图 1为本发明实施例一提供的一种对存储器上的文件进行扫描的方 文件进行的扫描。 如图 2所示, 终端 21 包括存储装置 211、 处理装置 212和显示装置 213。 该方法的软件程序存在存储装置 211 中并可被处 理装置 212执行。 显示装置 213用于提供一个界面, 可用于显示对存储 器上的文件进行扫描的结果。 参见图 1, 该方法包括:
步骤 S101、 根据文件信息数据库对存储器进行扫描, 查找存储器上 的更新文件;
其中, 文件信息数据库记录有上次扫描存储器得到的存储器上所有 文件的属性信息。 具体地, 当本次扫描为初次扫描时, 文件信息数据库 中记录的存储器上所有文件的属性信息为空。 在本实施例中, 所述文件 的属性信息包括文件的路径名称、 文件的最近修改时间、 文件的大小、 文件所在文件夹的身份标识 (Identity, ID )值。 当然, 所述文件的属性 信息并不仅限于此, 例如若当前文件为图片或视频格式的文件时, 其属 性信息还可包括与该文件对应的缩略图等其他信息。 在一实施例中, 文 件信息数据库记录的各文件的属性信息的关键值为文件的路径名称, 文 件信息数据库以关键值作为访问索引。
更新文件包括从上次扫描结束到本次扫描开始期间, 存储器上内容 有修改的文件和新增的文件。
图 3为本发明实施例一提供的根据文件信息数据库对存储器进行扫 描, 查找存储器上的更新文件的步骤的流程示意图, 参见图 3, 该步骤 包括步骤 S1011至步骤 S1017: 步骤 S1011、 对存储器上存储的文件进行扫描, 获取当前扫描文件 的路径名称;
在本实施中, 可釆用递归方式对存储器上的文件进行扫描, 获取当 前扫描文件的路径名称, 其中, 所述当前扫描文件的路径名称具有唯一 性, 能够唯一标识该文件。 例如, 当前扫描文件的名称为 1.JPEG, 在电 子终端上记录的存储位置为 H盘的文件夹 1下的图片子文件夹,则可将 获取的路径名称记作为: H:\文件夹 1:\图片 :\1.JPEG。
步骤 S1012、 判断当前扫描文件的路径名称是否存在于文件信息数 据库中, 如果是, 执行步骤 S1014, 否则, 执行步骤 S1013;
在获取到当前扫描文件的路径名称后, 从文件信息数据库中查找是 否存在以当前扫描文件的路径名称作为关键值的属性信息, 如果有, 则 判定当前扫描文件的路径名称存在于文件信息数据库中, 否则, 则判定 当前扫描文件的路径名称不存在于文件信息数据库中。
步骤 S1013、 当判断当前扫描文件的路径名称不存在于文件信息数 据库中时, 则判定当前扫描文件为从上次扫描结束到本次扫描开始期 间, 存储器上新增的文件, 执行步骤 S1017;
如果从文件信息数据库中查找不到当前扫描文件的路径名称时, 则 判定在进行上次扫描时, 该当前扫描文件不存在于存储器中, 为从上次 扫描结束到本次扫描开始期间存储器上新增的文件, 即存储器上的变更 文件。
步骤 S1014、 当判断当前扫描文件的路径名称存在于文件信息数据 库中时, 获取存储器上的当前扫描文件的最近修改时间, 执行步骤 S1015;
如果从文件信息数据库中查找到当前扫描文件的路径名称时, 获取 当前存储器上的当前扫描文件的最近修改时间。 所述最近修改时间包括 年、 月、 日、 时、 分等信息。
步骤 S1015、 判断获取到的存储器上的当前扫描文件的最近修改时 间是否大于文件信息数据库中记录的当前扫描文件的最近修改时间, 如 果是, 执行步骤 S1016, 否则, 执行步骤 S1017;
步骤 S1016、 当获取到的存储器上的当前扫描文件的最近修改时间 大于文件信息数据库中记录的当前扫描文件的最近^ ί'爹改时间时, 则判断 当前扫描文件为从上次扫描结束到本次扫描开始期间, 存储器上内容有 修改的文件, 执行步骤 S1017;
在获取到存储器上的当前扫描文件的最近修改时间后, 对该最近修 改时间与文件信息数据库中记录的当前扫描文件的最近修改时间进行 比较, 当该最近修改时间大于文件信息数据库中记录的当前扫描文件的 最近修改时间时, 说明存储器上的当前扫描文件与上次扫描时相比, 其 内容发生了变更, 为从上次扫描结束到本次扫描开始期间, 存储器上内 容有修改的文件。 例如, 修改时间的时间结构为: 年 +月 +日 +时 +分, 先 比对 "年"、 如 "年" 相同, 则比对 "月"; 如 "年" 和 "月" 均相同, 则比对 "日", 依此类推。 具体而言, 如获取到的存储器上的当前扫描 文件的最近修改时间为 T1 : 2013年 5月 20日 10点 8分, 文件信息数 据库中记录的当前扫描文件的最近 ^ί'爹改时间为 Τ2: 2013年 5月 1 日 14 点 10分, 判断时间 T1 大于时间 Τ2, 当前扫描文件为从上次扫描结束 到本次扫描开始期间, 存储器上内容有修改的文件。 再例如, 获取到的 存储器上的当前扫描文件的最近修改时间为 T1 : 2013年 5月 20 日 10 点 8分, 文件信息数据库中记录的当前扫描文件的最近^ ί'爹改时间为 Τ2: 2013年 5月 20日 8点 10分, 判断时间 T1大于时间 Τ2, 当前扫描文件 为从上次扫描结束到本次扫描开始期间, 存储器上内容有修改的文件。 再例如, 获取到的存储器上的当前扫描文件的最近修改时间为 T1 : 2013 年 5月 20日 10点 8分, 文件信息数据库中记录的当前扫描文件的最近 爹改时间为 T2: 2013年 4月 20 日 8点 10分, 判断时间 T1大于时间 T2, 当前扫描文件为从上次扫描结束到本次扫描开始期间, 存储器上内 容有修改的文件。
步骤 S1017、 继续对存储器上存储的其他文件进行扫描, 判断被扫 描文件是否为新增的文件或内容有修改的文件。
在判断完当前被扫描到的文件是否为存储器上新增的文件或内容有 修改的文件后, 继续对存储器上存储的其他文件进行扫描, 再次按照本 实施例中上述步骤 S1011-步骤 S1016的方法判断判断存储器上被扫描到 的文件是否为存储器上新增的文件或内容有修改的文件。
步骤 S102、 获取更新文件的属性信息;
其中, 更新文件的属性信息包括文件的路径名称、 文件的最近修改 时间、 文件的大小、 文件所在文件夹的身份标识 (Identity, ID )值。 当 然, 所述更新文件的属性信息并不仅限于此, 例如, 若更新文件为图片 或视频格式的文件时, 其属性信息还包括与该文件对应的缩略图等其他 信息。
对于已经在步骤 S1011获取到新增的文件或内容有修改的文件的路 径名称, 在步骤 S1014获取到内容有修改的文件的最近修改时间的, 在 执行本步骤 S102时, 可直接读取所述路径名称、 最近修改时间。
步骤 S103、 根据更新文件的属性信息, 更新文件信息数据库; 文件信息数据库用于记录存储器上所有文件的属性信息。 当本次扫 描发现:较上次扫描,存储器上存在内容有修改的文件或新增的文件时, 需要更改文件信息数据库的记录。
根据步骤 S102中所获取的更新文件的属性信息,更新文件信息数据 库的步骤包括: 当更新文件对应的文件为内容有修改的文件时, 将文件信息数据库 中每一份内容有修改的文件的最近修改时间更新为存储器上的与该份 内容有修改的文件的最近修改时间;
当更新文件对应的文件为新增的文件时, 将存储器上的每一份新增 的文件的属性信息添加至文件信息数据库中。
步骤 S104、 删除文件信息数据库中已经存有的, 但在本次扫描存储 器未发现的文件的属性信息;
在本次扫描时, 较上次扫描, 存储器上除了可能存在内容上有修改 的文件或新增的文件时, 还可能出现某些文件已经删除。 根据对存储器 上的各文件进行扫描所获取的各文件的路径名称, 可判断出文件信息数 据库中记录的哪些属性信息所对应的文件是本次扫描时存储器上不存 在的文件, 然后删除文件信息数据库中记录该文件的属性信息。
为了更详细的说明本发明实施例一提出的对存储器上的文件进行扫 描的方法, 现举例说明。 例如, 上次扫描完毕存储器时, 文件信息数据 库中记录的存储器上所有文件的部分属性信息如下表所示:
Figure imgf000010_0001
在本次扫描存储器时, 存储器上所有文件的部分属性信息如下表所
Figure imgf000010_0002
H:\文件夹 2:\C:\3.JPEG 2013年 6月 1 日 13点 40分
H:\文件夹 2:\C:\5.JPEG 2013年 6月 3日 11点 23分
H:\文件夹 3:\D:\4.JPEG 2013年 6月 3日 21点 17分
H:\文件夹 3:\D:\6.JPEG 2013年 6月 2日 15点 32分 在对存储器上的文件全部扫描完毕后, 得到存储器上内容有修改的 文件为: "H:\文件夹 2:\C:\3.JPEG", "H:\文件夹 3:\D:\4.JPEG" ; 新增的 文件为: "H:\文件夹 2:\C:\5.JPEG", "H:\文件夹 3:\D:\6.JPEG"。 此时, 对文件信息数据库进行更新包括: 将文件信息数据库中内容有修改的文 件 "H:\文件夹 2:\C:\3. JPEG" 对应的最近修改时间 "2013年 6月 1 日 8 点 45分" 更新为 "2013年 6月 1 日 13点 40分"; 将文件信息数据库中 内容有修改的文件 "H:\文件夹 3:\D:\4.JPEG"对应的最近修改时间 "2013 年 5月 23 日 13点 8分" 更新为 "2013年 6月 3 日 21点 17分"; 将文 件 "H:\文件夹 2:\C:\5.JPEG" 和 "H:\文件夹 3:\D:\6JPEG" 各自对应的 路径名称、 最近修改时间及其他属性信息添加至文件信息数据库。
然后, 删除文件信息数据库中已经存有的, 但在本次扫描存储器未 发现的文件 "H:\文件夹 1 ΛΒΛ2. JPEG" 所对应的属性信息。
为了后续查找或调用存储器上文件的方便, 在本实施例的一个实施 方式中:
步骤 S101还包括根据文件夹信息数据库对存储器进行扫描,查找存 储器上的更新文件夹;
其中, 文件夹信息数据库记录有上次扫描存储器得到的所有文件夹 的属性信息, 所述更新文件夹包括从上次扫描结束到本次扫描开始期 间, 所述存储器上内容有修改的文件夹和新增的文件夹; 文件夹的属性 信息包括文件夹的路径名称、 文件夹的最近修改时间、 文件夹所在父文 件夹的 ID值和文件夹下各种类型的文件个数; 对存储器上的更新文件夹的判断过程, 与对存储器上的更新文件的 判断过程类似, 这里不再赘述;
步骤 S102还包括获取更新文件夹的属性信息,该过程与获取更新文 件的属性信息的过程类似, 这里不再赘述;
步骤 S103还包括根据更新文件夹的属性信息,更新文件夹信息数据 库, 该过程与更新文件信息数据库的过程类似, 这里不再赘述;
步骤 S104还包括删除文件夹信息数据库中已经存有的,但在本次扫 描存储器时未发现的文件夹的属性信息, 该过程与删除文件信息数据库 中已经存有的, 但在本次扫描存储器时未发现的文件的属性信息的过程 类似, 这里不再赘述。
综上, 本发明实施例一的对存储器上的文件进行扫描的方法, 根据 文件信息数据库对存储器进行扫描并查找到存储器上的更新文件; 根据 所述更新文件的属性信息更新所述文件信息数据库, 并删除文件信息数 据库中已经存有的但在本次扫描存储器时未发现的文件的属性信息。 本 发明实施例一能够使得在每次扫描存储器时可以复用上次扫描完毕时 文件信息数据库中记录的存储器上所有文件的属性信息, 无需再重新获 取, 只要查找存储器上的更新文件, 获取其对应的属性信息, 并相应的 更新信息数据库, 减少了因获取存储器上所有文件的属性信息所耗费的 时间, 加快了扫描速度。 实施例二
图 4为本发明实施例二提供的一种对存储器上的文件进行扫描的方 法的流程示意图。 参见图 4, 该方法包括:
步骤 S401、判断本次扫描是否为初次扫描,如果是,执行步骤 S402, 否则, 执行步骤 S403; 在本实施例中, 可通过查找是否存在与存储器相对应的文件信息数 据库, 来判断本次扫描是否为初次扫描。 当存储器内置于电子终端时, 文件信息数据库可存储在电子终端或存储器中。 考虑到会存在多个移动 存储器与电子终端连接的情形, 如果文件信息数据库存储在电子终端 上, 会占用很大内存空间, 文件信息数据库可存储在存储器中。 可通过 查找本次要扫描的存储器中是否存在与之相对应的文件信息数据库, 来 判断本次扫描是否为初次扫描,如果是,则判断本次扫描为非初次扫描, 否则, 则判断本次扫描为初次扫描。
步骤 S402、建立并存储记录有存储器上所有文件的属性信息的文件 信息数据库, 结束;
在判断本次扫描为初次扫描时, 建立与本次要扫描的存储器所对应 的文件信息数据库, 开始对存储器上的各文件进行扫描, 获取各文件的 属性信息, 并将其属性信息添加至所建立的文件信息数据库中。 待将存 储器上所有文件的属性信息全部添加至文件信息数据库中后, 将此时的 文件信息数据库存储至存储器上, 供下次扫描时使用。
步骤 S403、 根据文件信息数据库对存储器进行扫描, 查找存储器上 的更新文件;
本步骤与实施例一中的根据文件信息数据库对存储器进行扫描, 查 找存储器上的更新文件的步骤相同, 这里不再赘述。
步骤 S404、 获取更新文件的属性信息;
本步骤与实施例一中的获取更新文件的属性信息的步骤相同, 这里 不再赘述。
步骤 S405、 根据更新文件的属性信息, 更新文件信息数据库; 本步骤与实施例一中的根据更新文件的属性信息更新文件信息数据 库的步骤相同, 这里不再赘述。 步骤 S406、 删除文件信息数据库中已经存有的, 但在本次扫描存储 器未发现的文件的属性信息;
本步骤与实施例一中的删除文件信息数据库中已经存有的, 但在本 次扫描存储器未发现的文件的属性信息的步骤相同, 这里不再赘述。
步骤 S407、将经过更新和删除操作之后的文件信息数据库中记录的 所有文件的属性信息作为本次扫描结果进行输出;
在根据更新文件的属性信息更新文件信息数据库, 并删除文件信息 数据库中已经存有的, 但在本次扫描存储器未发现的文件的属性信息 后, 文件信息数据库中记录着本次扫描时存储器上存储的所有文件的属 性信息, 此时可将其作为本次扫描结果进行输出, 更新电子终端用户界 面中有关存储器上的文件的属性信息。
在本实施例的一个实施方式中,在执行步骤 S403时,一旦查找到存 储器上某个文件为内容有修改的文件或新增的文件后, 还可直接执行步 骤 S404, 获取查找到的内容有修改的文件或新增的文件的属性信息, 然 后再执行步骤 S403查找存储器上其他内容有修改的文件或新增的文件, 查找过程与获取过程依次交替进行。 在本实施例中, 每隔预设的时间周 期, 根据步骤 S404 中获取到的内容有修改的文件和新增的文件的属性 信息, 定时更新一次文件信息数据库。
为降低电子终端操作系统主线程 TMain的计算负担, 使其主线程尽 可能仅用于实现用户交互界面, 可在电子终端操作系统中引入子线程来 实现对存储器上的文件进行扫描的方法, 该子线程包括扫描子线程 TScan和处理子线程 TUpdate。
在主线程启动后, 初始化用户界面控件、 获取到存储器目录后, 启 动扫描子线程 TScan和处理子线程 TUpdate。 扫描子线程 TScan执行完 上述步骤 S401-S404后, 每隔预设的时间周期, 将获取到的存储器上内 容有修改的文件和新增的文件的属性信息通过主线程的 Handler (用 AHandler标识)发送给主线程。
主线程的 AHandler 的消息处理函数从消息中提取所述时间周期内 存储器上内容有修改的文件和新增的文件的属性信息, 通告处理子线程 TUpdate对文件信息数据库进行更新处理。 具体的更新处理过程为: 构 造一个任务模型 UpdateTask, 其包含有存储存储器上内容有修改的文件 和新增的文件的属性信息内容,之后把任务模型 UpdateTask添加到处理 子线程 TUpdate的工作队列中, 以触发处理子线程 Tupdate工作。 处理 子线程 TUpdate最初等待在该工作队列中, 一旦队列非空, 处理子线程 Tupdate根据任务模型 UpdateTask中包含的内容,更新文件信息数据库。
扫描子线程 Tscan完成对存储器上所有文件的扫描后, 可判断出文 件信息数据库中记录的哪些属性信息所对应的文件是本次扫描时存储 器上不存在的文件, 然后通过主线程通告处理子线程 TUpdate删除文件 信息数据库中已经存有的, 但在本次扫描存储器时未发现的文件的属性 信息, 并将经过更新和删除操作之后的文件信息数据库中记录的所有文 件的属性信息作为本次扫描结果进行输出。
综上, 本发明实施例二的对存储器上的文件进行扫描的方法, 判断 本次扫描为初次扫描时, 建立并预存记录有存储器上所有文件的属性信 息的文件信息数据库, 判断本次扫描为非初次扫描时, 根据文件信息数 据库对存储器进行扫描, 查找到存储器上的更新文件, 根据所述更新文 件的属性信息, 更新所述文件信息数据库, 并删除文件信息数据库中已 经存有的, 但在本次扫描存储器时未发现的文件的属性信息, 最终将经 过更新和删除操作之后的文件信息数据库中记录的所有文件的属性信 息作为本次扫描结果进行输出。 本发明实施例二能够使得在每次扫描存 储器时可以复用上次扫描完毕时文件信息数据库中记录的存储器上所 有文件的属性信息, 无需再重新获取, 只要查找存储器上的更新文件, 获取其对应的属性信息, 并相应的更新信息数据库, 减少了因获取存储 器上所有文件的属性信息所耗费的时间, 提高了扫描效率。 同时, 本发 明实施例二提出釆用扫描子线程和处理子线程实现对存储器上的文件 进行扫描的方法, 降低了电子终端操作系统中主线程的计算负担。 实施例三
图 5为本发明实施例三提供的一种对存储器上的文件进行扫描的装 置的结构示意图。 参见图 5, 该装置包括: 查找模块 501, 用于根据文 件信息数据库对存储器进行扫描, 查找存储器上的更新文件; 获取模块 502, 用于获取更新文件的属性信息; 更新模块 503, 用于根据更新文件 的属性信息, 更新文件信息数据库; 删除模块 504, 用于删除文件信息 数据库中已经存有的, 但在本次扫描存储器时未发现的文件的属性信 息。
在本实施例中, 文件信息数据库记录有上次扫描存储器时得到的存 储器上所有文件的属性信息。 具体的, 当本次扫描为初次扫描时, 文件 信息数据库中记录的存储器上所有文件的属性信息内容为空。 所述文件 的属性信息包括文件的路径名称、 文件的最近修改时间、 文件的大小、 文件所在文件夹的身份标识 (Identity, ID )值。 当然, 所述文件的属性 信息并不限于此, 例如若当前文件为图片或视频格式的文件时, 其属性 信息还包括与该文件对应的缩略图等其他信息。 在一实施例中, 文件信 息数据库记录的各文件的属性信息的关键值为文件的路径名称, 文件信 息数据库以关键值作为访问索引。 更新文件包括从上次扫描结束到本次 扫描开始期间, 存储器上内容有修改的文件和新增的文件。
在本实施例中, 查找模块 501包括: 第一获取单元 5011, 用于对存储器上存储的文件进行扫描, 获取当 前扫描文件的路径名称;
第一判断单元 5012, 用于判断当前扫描文件的路径名称是否存在于 文件信息数据库中;
第一确定单元 5013, 用于当判断当前扫描文件的路径名称不存在于 文件信息数据库中时, 则判断当前扫描文件为从上次扫描结束到本次扫 描开始期间存储器上新增的文件;
第二获取单元 5014, 用于当判断当前扫描文件的路径名称存在于文 件信息数据库中时, 获取存储器上的当前扫描文件的最近修改时间; 第二判断单元 5015, 用于判断获取到的存储器上的当前扫描文件的 最近修改时间是否大于文件信息数据库中记录的当前扫描文件的最近 爹改时间;
第二确定单元 5016, 用于当获取到的存储器上的当前扫描文件的最 近修改时间大于文件信息数据库中记录的当前扫描文件的最近修改时 间时, 判断当前扫描文件为从上次扫描结束到本次扫描开始期间, 存储 器上内容有修改的文件。
在本实施例中, 获取模块 502获取的更新文件的属性信息包括文件 的路径名称、 文件的最近修改时间、 文件的大小、 文件所在文件夹的身 份标识(Identity, ID )值。 当然, 所述更新文件的属性信息并不限于此, 例如若更新文件为图片或视频格式的文件时, 其属性信息还包括与该文 件对应的缩略图等其他信息。 对于已经在第一获取单元 5011 获取到新 增的文件或内容有修改的文件的路径名称, 在第二获取单元 5014获取 到内容有修改的文件的最近修改时间的, 获取模块 502可直接读取第一 获取单元 5011获取的路径名称、 第二获取单元 5014获取的最近修改时 间。 在本实施例中, 更新模块 503包括:
修改单元 5031, 用于当更新文件对应的文件为内容有修改的文件 时, 将文件信息数据库中每一份内容有修改的文件的最近修改时间更新 为存储器上的与该份内容有修改的文件的最近修改时间;
添加单元 5032, 用于当更新文件对应的文件为新增的文件时, 将存 储器上的每一份新增的文件的属性信息添加至文件信息数据库中。
在本实施例中, 在本次扫描时, 较上次扫描, 存储器上除了可能存 在内容上有修改的文件或新增的文件时, 还可能出现某些文件已经删 除。 删除模块 504根据查找模块 501对存储器上的各文件进行扫描所获 取的各文件的路径名称, 可判断出文件信息数据库中记录的哪些属性信 息所对应的文件是本次扫描时存储器上不存在的文件, 然后删除文件信 息数据库中记录该文件的属性信息。
为了后续查找或调用存储器上文件的方便, 在本实施例的一个实施 方式中, 查找模块 501, 还用于根据文件夹信息数据库对存储器进行扫 描, 查找存储器上的更新文件夹; 获取模块 502还用于获取更新文件夹 的属性信息; 更新模块 503还用于根据更新文件夹的属性信息, 更新文 件夹信息数据库; 删除模块 504还用于删除文件夹信息数据库中已经存 有的, 但本次扫描存储器时未发现的文件夹的属性信息。
本实施例提出的对存储器上的文件进行扫描的装置与实施一提出的 对存储器上的文件进行扫描的方法属于同一发明构思, 在本实施例中未 详尽描述的细节内容, 可以参考实施例一。
综上, 本发明实施例三的对存储器上的文件进行扫描的装置, 根据 文件信息数据库对存储器进行扫描, 查找到存储器上的更新文件, 根据 所述更新文件的属性信息, 更新所述文件信息数据库, 并删除文件信息 数据库中已经存有的, 但在本次扫描存储器时未发现的文件的属性信 息。 本发明实施例三能够使得在每次扫描存储器时可以复用上次扫描完 毕时文件信息数据库中记录的存储器上所有文件的属性信息, 无需再重 新获取, 只要查找存储器上的更新文件, 获取其对应的属性信息, 并相 应的更新信息数据库, 减少了因获取存储器上所有文件的属性信息所耗 费的时间, 加快了扫描速度。 实施例四
图 6为本发明实施例四提供的一种对存储器上的文件进行扫描的装 置的结构示意图。 参见图 6, 该装置包括:
扫描判断模块 601, 用于判断本次扫描是否为初次扫描, 当本次扫 描为初次扫描时, 建立并预存记录有存储器上所有文件的属性信息的文 件信息数据库, 当本次扫描为非初次扫描时, 向查找模块 602发送控制 信号;
查找模块 602用于接收扫描判断模块 601发送的控制信号, 根据文 件信息数据库对存储器进行扫描, 查找存储器上的更新文件;
获取模块 603, 用于获取更新文件的属性信息;
更新模块 604, 用于根据更新文件的属性信息, 更新文件信息数据 库;
删除模块 605, 用于删除文件信息数据库中已经存有的, 但在本次 扫描存储器时未发现的文件的属性信息;
输出模块 606, 用于将经过更新和删除操作之后的文件信息数据库 中记录的所有文件的属性信息作为本次扫描结果进行输出。
在本实施例中, 扫描判断模块 601可通过查找是否存在与存储器相 对应的文件信息数据库, 来判断本次扫描是否为初次扫描。 当存储器内 置于电子终端时, 文件信息数据库可存储在电子终端或存储器中。 考虑 到会存在多个移动存储器与电子终端连接的情形, 如果文件信息数据库 存储在电子终端上, 会占用很大内存空间, 文件信息数据库可存储在存 储器中。 扫描判断模块 601可通过查找本次要扫描的存储器中是否存在 与之相对应的文件信息数据库, 来判断本次扫描是否为初次扫描, 如果 是, 则扫描判断模块 601判断本次扫描为非初次扫描, 否则, 则扫描判 断模块 601判断本次扫描为初次扫描。
当本次扫描为初次扫描时, 扫描判断模块 601建立与本次要扫描的 存储器所对应的文件信息数据库, 开始对存储器上的各文件进行扫描, 获取各文件的属性信息, 并将其属性信息添加至所建立的文件信息数据 库中。 待将存储器上所有文件的属性信息全部添加至文件信息数据库中 后, 扫描判断模块 601将此时的文件信息数据库预存至存储器上, 供下 次扫描时使用。
在更新模块 604更新完文件信息数据库、 删除模块 505删除文件信 息数据库中已经存有的, 但在本次扫描未发现的文件的属性信息之后, 将经过更新和删除操作之后的文件信息数据库中记录的所有文件的属 性信息作为本次扫描结果进行输出, 更新电子终端用户界面中有关存储 器上的文件的属性信息。
在本实施例的一个实施方式中, 在查找模块 602—旦查找到存储器 上某个文件为内容有修改的文件或新增的文件后, 可直接向获取模块 603发出控制信号, 通知获取模块 603获取查找到的内容有修改的文件 或新增的文件的属性信息, 然后查找模块 602再查找存储器上其他内容 有修改的文件或新增的文件, 查找模块 602与获取模块 603依次交替工 作。 在本实施例中, 更新模块 604可每隔预设的时间周期, 根据获取模 块 603获取到的内容有修改的文件和新增的文件的属性信息, 定时更新 一次文件信息数据库。 本实施例提出的对存储器上的文件进行扫描的装置与实施二提出的 对存储器上的文件进行扫描的方法属于同一发明构思, 在本实施例中未 详尽描述的细节内容, 可以参考实施例二。
综上, 本发明实施例四的对存储器上的文件进行扫描的装置, 判断 本次扫描为初次扫描时, 建立并存储记录有存储器上所有文件的属性信 息的文件信息数据库, 判断本次扫描为非初次扫描时, 根据文件信息数 据库对存储器进行扫描, 查找到存储器上的更新文件, 根据所述更新文 件的属性信息, 更新所述文件信息数据库, 并删除文件信息数据库中已 经存有的, 但在本次扫描存储器时未发现的文件的属性信息, 最终将经 过更新和删除操作之后的文件信息数据库中记录的所有文件的属性信 息作为本次扫描结果进行输出。 本发明实施例四能够使得在每次扫描存 储器时可以复用上次扫描完毕时文件信息数据库中记录的存储器上所 有文件的属性信息, 无需再重新获取, 只要查找存储器上的更新文件, 获取其对应的属性信息, 并相应的更新信息数据库, 减少了因获取存储 器上所有文件的属性信息所耗费的时间, 提高了扫描效率。 实施例五
图 7为根据本发明实施方式的另外一种对存储器上的文件进行扫描 的装置的结构示意图。 该装置包括: 存储设备 71、 处理器 72、 总线 73 和 I/O端口 74。
其中, 存储设备 71和处理器 72分别与总线 73相连。 该处理器 72 通过 I/O端口 74与外部设备进行通信。
该存储设备 71, 用于存储扫描判断模块 701、 查找模块 702、 获取 模块 703、 更新模块 704、 删除模块 705和输出模块 706。 该存储设备 71可以为非易失性计算机可读存储介质。 该处理器 72用于与该存储设备 71进行通信, 用于执行上述扫描判 断模块 701、查找模块 702、获取模块 703、 更新模块 704、删除模块 705 和输出模块 706执行的操作。 上述扫描判断模块 701、 查找模块 702、 获取模块 703、 更新模块 704、 删除模块 705和输出模块 706的功能与 上述扫描判断模块 601、 查找模块 602、 获取模块 603、 更新模块 604、 删除模块 605和输出模块 606的功能分别相同。
上述扫描判断模块 701、查找模块 702、获取模块 703、更新模块 704、 删除模块 705和输出模块 706可以为机器可读指令。 以上实施例提供的 技术方案中的全部或部分内容可以通过软件编程实现, 其软件程序存储 在可读取的存储介质中, 存储介质例如: 计算机中的硬盘、 计算机只读 存储器、 光盘或软盘等。
此外, 上述实施例的先后顺序仅为便于描述, 不代表实施例的优劣。 以上所述仅为本发明的较佳实施例, 并不用于限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包 含在本发明的保护范围之内。

Claims

权利要求书
1、 一种对存储器上的文件进行扫描的方法, 其特征在于, 所述方法 包括:
根据文件信息数据库对所述存储器进行扫描, 该文件信息数据库中 记录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息; 根据扫描结果查找所述存储器上的更新文件, 所述更新文件包括从 上次扫描结束到本次扫描开始期间, 所述存储器上内容有修改的文件和 新增的文件;
获取所述更新文件的属性信息;
根据所述更新文件的属性信息, 更新所述文件信息数据库; 删除所述文件信息数据库中已经存有的, 但在本次扫描所述存储器 时未发现的文件的属性信息; 及
将经过更新和删除操作之后的所述文件信息数据库记录的所有文件 的属性信息作为本次扫描结果进行输出。
2、根据权利要求 1所述的对存储器上的文件进行扫描的方法,其特 征在于, 该方法还包括:
判断本次扫描是否为初次扫描;
当本次扫描为初次扫描时, 建立并存储记录有所述存储器上所有文 件的属性信息的文件信息数据库;
当本次扫描为非初次扫描时, 执行所述根据文件信息数据库对存储 器进行扫描的步骤。
3、根据权利要求 2所述的对存储器上的文件进行扫描的方法,其特 征在于, 所述判断本次扫描是否为初次扫描的步骤包括:
在所述存储器或所述存储器所在的电子终端中查找是否存在与所述 存储器相对应的文件信息数据库, 如果存在, 则判定本次扫描为非初次 扫描, 否则, 则判定本次扫描为初次扫描。
4、根据权利要求 1所述的对存储器上的文件进行扫描的方法,其特 征在于, 所述文件的属性信息包括: 文件的路径名称、 文件的最近修改 时间、 文件的大小、 文件所在文件夹的身份标识值。
5、根据权利要求 4所述的对存储器上的文件进行扫描的方法,其特 征在于, 所述根据文件信息数据库对存储器进行扫描是指对所述存储器 上存储的文件进行扫描, 获取当前扫描文件的路径名称。
6、 根据权利要求 5所述的对存储器上的文件进行扫描的方法,其特 征在于, 所述根据扫描结果查找所述存储器上的更新文件的步骤包括: 判断所述当前扫描文件的路径名称是否存在于所述文件信息数据库 中;
当所述当前扫描文件的路径名称不存在于所述文件信息数据库中 时, 则判定所述当前扫描文件为从上次扫描结束到本次扫描开始期间, 所述存储器上新增的文件;
当所述当前扫描文件的路径名称存在于所述文件信息数据库中时, 获取所述存储器上的所述当前扫描文件的最近修改时间;
判断获取到的所述存储器上的所述当前扫描文件的最近修改时间是 否大于所述文件信息数据库中记录的所述当前扫描文件的最近修改时 间;
当获取到的所述存储器上的当前扫描文件的最近修改时间大于所述 文件信息数据库中记录的所述当前扫描文件的最近修改时间时, 则判定 所述当前扫描文件为从上次扫描结束到本次扫描开始期间, 所述存储器 上内容有修改的文件。
7、根据权利要求 4所述的对存储器上的文件进行扫描的方法,其特 征在于, 所述根据所述更新文件的属性信息, 更新所述文件信息数据库 的步骤包括:
当所述更新文件对应的文件为内容有修改的文件时, 将所述文件信 息数据库中每一份内容有修改的文件的最近修改时间更新为所述存储 器上与该份内容有修改的文件相对应的最近修改时间;
当所述更新文件对应的文件为新增的文件时, 将所述存储器上每一 份新增的文件的属性信息添加至所述文件信息数据库中。
8、 一种对存储器上的文件进行扫描的装置, 其特征在于, 所述装置 包括:
查找模块, 用于根据文件信息数据库对所述存储器进行扫描, 根据 扫描结果查找所述存储器上的更新文件, 其中所述文件信息数据库中记 录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息, 所 述更新文件包括从上次扫描结束到本次扫描开始期间, 所述存储器上内 容有修改的文件和新增的文件;
获取模块, 用于获取所述更新文件的属性信息;
更新模块, 用于根据所述更新文件的属性信息, 更新所述文件信息 数据库;
删除模块, 用于删除所述文件信息数据库中已经存有的, 但在本次 扫描所述存储器时未发现的文件的属性信息。
9、根据权利要求 8所述的对存储器上的文件进行扫描的装置,其特 征在于, 所述装置还包括扫描判断模块, 用于:
判断本次扫描是否为初次扫描;
当本次扫描为初次扫描时, 建立并存储记录有所述存储器上所有文 件的属性信息的文件信息数据库;
当本次扫描为非初次扫描时, 向所述查找模块发送控制信号; 所述查找模块用于: 接收所述扫描判断模块发送的控制信号, 根据 文件信息数据库对存储器进行扫描, 查找所述存储器上的更新文件。
10、 根据权利要求 9所述的对存储器上的文件进行扫描的装置, 其 特征在于, 所述扫描判断模块判断本次扫描是否为初次扫描, 包括: 在所述存储器或所述存储器所在的电子终端中查找是否存在与所述 存储器相对应的文件信息数据库, 如果是, 则判断本次扫描为非初次扫 描, 否则, 则判断本次扫描为初次扫描。
11、 根据权利要求 8所述的对存储器上的文件进行扫描的装置, 其 特征在于, 所述文件的属性信息包括: 文件的路径名称、 文件的最近修 改时间、 文件的大小、 文件所在文件夹的身份标识值。
12、根据权利要求 11所述的对存储器上的文件进行扫描的装置,其 特征在于, 所述查找模块包括:
第一获取单元, 用于对所述存储器上存储的文件进行扫描, 获取当 前扫描文件的路径名称;
第一判断单元, 用于判断所述当前扫描文件的路径名称是否存在于 所述文件信息数据库中;
第一确定单元, 用于当所述当前扫描文件的路径名称不存在于所述 文件信息数据库中时, 判定所述当前扫描文件为从上次扫描结束到本次 扫描开始期间, 所述存储器上新增的文件;
第二获取单元, 用于当所述当前扫描文件的路径名称存在于所述文 件信息数据库中时, 获取所述存储器上的所述当前扫描文件的最近修改 时间;
第二判断单元, 用于判断获取到的所述存储器上的所述当前扫描文 件的最近修改时间是否大于所述文件信息数据库中记录的所述当前扫 描文件的最近 ^ί'爹改时间; 第二确定单元, 用于当获取到的所述存储器上的当前扫描文件的最 近修改时间大于所述文件信息数据库中记录的所述当前扫描文件的最 近修改时间时, 判定所述当前扫描文件为从上次扫描结束到本次扫描开 始期间, 所述存储器上内容有修改的文件。
13、根据权利要求 11所述的对存储器上的文件进行扫描的装置,其 特征在于, 所述更新模块包括:
^ί'爹改单元,用于当所述更新文件对应的文件为内容有^ ί'爹改的文件时, 将所述文件信息数据库中每一份内容有修改的文件的最近修改时间更 新为所述存储器上与该份内容有修改的文件相对应的最近修改时间; 添加单元, 用于当所述更新文件对应的文件为新增的文件时, 将所 述存储器上每一份新增的文件的属性信息添加至所述文件信息数据库 中。
14、 根据权利要求 8所述的对存储器上的文件进行扫描的装置, 其 特征在于, 所述装置还包括输出模块, 用于将经过更新和删除操作之后 的所述文件信息数据库中记录的所有文件的属性信息作为本次扫描结 果进行输出。
15、 一种非瞬时性的计算机可读存储介质, 其上存储有计算机可执 行指令, 当这些可执行指令被执行时, 执行一种对存储器上的文件进行 扫描的方法, 所述方法包括:
根据文件信息数据库对所述存储器进行扫描, 该文件信息数据库中 记录有上次扫描所述存储器得到的所述存储器上所有文件的属性信息; 根据扫描结果查找所述存储器上的更新文件, 所述更新文件包括从 上次扫描结束到本次扫描开始期间, 所述存储器上内容有修改的文件和 新增的文件;
获取所述更新文件的属性信息; 根据所述更新文件的属性信息, 更新所述文件信息数据库; 删除所述文件信息数据库中已经存有的, 但在本次扫描所述存储器 时未发现的文件的属性信息; 及
将经过更新和删除操作之后的所述文件信息数据库记录的所有文件 的属性信息作为本次扫描结果进行输出。
PCT/CN2014/079900 2013-07-15 2014-06-16 一种对存储器上的文件进行扫描的方法及装置 WO2015007125A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310296298.0 2013-07-15
CN201310296298.0A CN104133822B (zh) 2013-07-15 2013-07-15 一种对存储器上的文件进行扫描的方法及装置

Publications (1)

Publication Number Publication Date
WO2015007125A1 true WO2015007125A1 (zh) 2015-01-22

Family

ID=51806501

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/079900 WO2015007125A1 (zh) 2013-07-15 2014-06-16 一种对存储器上的文件进行扫描的方法及装置

Country Status (2)

Country Link
CN (1) CN104133822B (zh)
WO (1) WO2015007125A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022838A (zh) * 2015-08-18 2015-11-04 深圳市为有视讯有限公司 一种摄像设备快速访问其存储卡内视频和照片文件的方法

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462296B (zh) * 2014-11-28 2020-12-04 小米科技有限责任公司 文件的管理方法、装置及终端
CN105825084B (zh) * 2015-01-06 2019-10-18 阿里巴巴集团控股有限公司 用于对具有图像的对象进行匹配检测的方法
CN105389509A (zh) * 2015-11-16 2016-03-09 北京奇虎科技有限公司 文件扫描方法及装置
CN105653648A (zh) * 2015-12-28 2016-06-08 北京金山安全软件有限公司 一种文件获取方法、装置及电子设备
CN106528594A (zh) * 2016-09-20 2017-03-22 海信集团有限公司 一种下载文件的查询方法及装置
CN106802812A (zh) * 2016-12-02 2017-06-06 乐视控股(北京)有限公司 一种加载文件的方法、装置及电子设备
CN106844566B (zh) * 2016-12-30 2020-11-20 联想(北京)有限公司 一种数据处理方法及系统、被检测设备及处理设备
CN106909632A (zh) * 2017-01-23 2017-06-30 努比亚技术有限公司 垃圾文件搜索方法及终端
CN107657051B (zh) * 2017-10-16 2020-03-17 Oppo广东移动通信有限公司 一种图片标签的生成方法、终端设备及存储介质
CN107766488B (zh) * 2017-10-17 2021-08-06 Oppo广东移动通信有限公司 一种信息查询方法、终端、计算机可读存储介质
CN109951731B (zh) * 2017-12-21 2021-06-15 深圳Tcl数字技术有限公司 解决外部存储设备重复扫描的方法、系统及存储介质
CN110086789B (zh) * 2019-04-17 2021-07-13 腾讯科技(深圳)有限公司 一种数据传输的方法、装置、设备和介质
CN110287159B (zh) * 2019-06-03 2021-11-12 北京一览群智数据科技有限责任公司 一种文件处理方法及装置
CN110347661A (zh) * 2019-07-05 2019-10-18 北京红山信息科技研究院有限公司 数据源准实时入库的方法、装置、服务器和存储介质
CN112445519B (zh) * 2020-12-03 2022-02-15 平安科技(深圳)有限公司 文件变更控制方法、装置、设备及存储介质
CN113722279B (zh) * 2021-08-19 2024-03-01 北京达佳互联信息技术有限公司 确定文件夹大小的方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609448A (zh) * 2008-06-19 2009-12-23 鸿富锦精密工业(深圳)有限公司 数据库主动扫描系统及方法
US20110106862A1 (en) * 2009-10-30 2011-05-05 Symantec Corporation Method for quickly identifying data residing on a volume in a multivolume file system
CN102081620A (zh) * 2009-11-26 2011-06-01 中国移动通信集团贵州有限公司 一种数据库对象变更的控制方法及装置
CN102480494A (zh) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 一种文件更新的方法、装置及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100366088C (zh) * 2005-05-13 2008-01-30 北京中星微电子有限公司 移动终端接收多媒体内容的系统和方法及装置
CN102014214A (zh) * 2010-12-23 2011-04-13 广东欧珀移动通信有限公司 一种手持终端开关机及其存储卡识别方法
CN102289484B (zh) * 2011-08-03 2014-10-01 Tcl集团股份有限公司 一种基于android系统的存储设备的多媒体文件的扫描方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609448A (zh) * 2008-06-19 2009-12-23 鸿富锦精密工业(深圳)有限公司 数据库主动扫描系统及方法
US20110106862A1 (en) * 2009-10-30 2011-05-05 Symantec Corporation Method for quickly identifying data residing on a volume in a multivolume file system
CN102081620A (zh) * 2009-11-26 2011-06-01 中国移动通信集团贵州有限公司 一种数据库对象变更的控制方法及装置
CN102480494A (zh) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 一种文件更新的方法、装置及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022838A (zh) * 2015-08-18 2015-11-04 深圳市为有视讯有限公司 一种摄像设备快速访问其存储卡内视频和照片文件的方法

Also Published As

Publication number Publication date
CN104133822B (zh) 2016-09-14
CN104133822A (zh) 2014-11-05

Similar Documents

Publication Publication Date Title
WO2015007125A1 (zh) 一种对存储器上的文件进行扫描的方法及装置
US11487405B2 (en) Searching digital content
US9734158B2 (en) Searching and placeholders
WO2012019390A1 (zh) 一种移动终端及其实现的文件浏览方法
EP2146293B1 (en) Mobile terminal having function of managing file and folder
WO2016070534A1 (zh) 一种本地媒体文件的扫描方法及系统
US20140222824A1 (en) Method and apparatus for portable index on a removable storage medium
WO2015117426A1 (zh) 文件管理方法及装置
CN103902589B (zh) 一种下载文件的管理方法及装置
EP2472996B1 (en) Method and system for operating telephone directory
US20140297586A1 (en) Device and method for cloud file management
WO2012089079A1 (zh) 移动终端测试日志的处理方法和移动终端
WO2014117513A1 (zh) 一种云存储的回收站管理方法和装置
CN103646072A (zh) 文件自动分类方法及移动终端
KR102503329B1 (ko) 이미지 분류 방법 및 전자 디바이스
CN117056383A (zh) 搜索方法和电子设备
CN111143293B (zh) 一种元数据获取方法、装置、设备及计算机可读存储介质
JP2001236252A (ja) 画像のフォーマット変換方法およびそのプログラムを記録した記録媒体
TW201013515A (en) Movable device and method for fleetly displaying pictures
WO2023070462A1 (zh) 一种文件去重方法、装置和设备
WO2023160208A1 (zh) 图像删除操作的通知方法、设备和存储介质
TWI469081B (zh) 可減少操作回應時間的電子裝置及方法
EP2068258B1 (en) Apparatus and method for managing metadata in portable terminal
CN115509996A (zh) 一种树形结构节点检索方法及装置
WO2013114931A1 (ja) 画像管理システム、携帯型情報端末、画像管理装置、画像管理方法、及びコンピュータ読み取り可能な記録媒体

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 23/03/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14825800

Country of ref document: EP

Kind code of ref document: A1