Method and system for processing images
AssigneeTencent Technology (Shenzhen) Company Limited
InventorsYongjian Wu, Yang Yang, Liqian Dong, Dong Chen
Life of this patent
Estimating the term…
Abstract
The present disclosure describes a method and a system for processing images. The method includes: determining a target folder selected by a user; searching for image information of the target folder, searching for information of all subfolders of the target folder, traversing all subfolders corresponding to the information of all subfolders and obtaining image information of all subfolders; and obtaining images according to the image information of the target folder and the image information of all subfolders, processing the obtained images and displaying the processed images in a flat-folder-view manner.
Claims11
A method for processing images, comprising:
- determining a target folder selected by a user;
- searching for image information of the target folder, searching for information of all subfolders of the target folder, traversing all subfolders corresponding to the information of all subfolders and obtaining image information of all subfolders;
- and
- obtaining images according to the image information of the target folder and the image information of all subfolders, processing the obtained images and displaying the processed images in a flat-folder-view manner;
- before determining the target folder selected by the user, the method further comprises:
- establishing a database, and storing the information of the target folder, the information of all subfolders, the image information, relationship information between the target folder and the subfolders, and association information between folders and images which are obtained through scanning in the database;
- wherein the database is searched for the information of all subfolders of the target folder, the image information of the target folder and/or the image information of all subfolders;
- wherein the information obtained through scanning comprises information obtained through scanning a Master File Table (MFT), wherein the scanning the MFT comprises:
- locating an MFT data area, traversing the MFT data area, obtaining directory information of the target folder and a root index corresponding to the directory information from the MFT data area, re-creating a folder path according to the directory information and the corresponding root index, and obtaining the information of the target folder;
- after searching for the information of all subfolders of the target folder, the method further comprises:
- creating a task list according to the information of all subfolders, wherein the task list is in an inverted tree structure, the subfolders corresponding to the information of the subfolders are task nodes of the task list;
- the task nodes in the task list are added into a folder task queue;
- a finish attribute identifier is configured for each task node;
- the traversing all subfolders corresponding to the information of all subfolders and obtaining the image information of all subfolders comprises:
- traversing the task nodes in the folder task queue, finding the image information of the subfolders corresponding to the task nodes;
- wherein the traversing the task nodes in the folder task queue comprises:
- transferring a task of obtaining image information from a finished task node to an unfinished task node pointed to by the finished task node;
- wherein the transferring the task of obtaining image information from the finished task node to the unfinished task node pointed to by the finished task node comprises:
- obtaining a first task node and a second task node pointed to by the first task node, wherein the first task node is the finished task node and the second task node is the unfinished task node;
- calculating a first tree height and a second tree height, wherein the first tree height is a tree height of a set where the second task node is located if the first task node directly points to the second task node, the second tree height is a tree height of a set where the first task node is located after the first task node swaps contents with the second task node;
- and
- determining whether the first tree height is smaller than the second tree height;
- if the first tree height is smaller than the second tree height, directly pointing the next task of the first task node to the second task node;
- otherwise, swapping contents of the first task node with the second task node and pointing the next task of the new first task node to the new second task node.
A system for processing images, comprising:
- a processor;
- a memory comprising instructions that when executed, cause the processor to perform the following:
- obtain a target folder selected by the user, search for image information of the target folder and information of all subfolders of the target folder, obtain image information of all subfolders, and obtain images according to the image information of the target folder and the image information of all subfolders;
- traverse all subfolders corresponding to the information of the subfolders;
- process the images in the target folder selected by the user and the images in the subfolders;
- and
- display the processed images in the target folder and the processed images in the subfolders in a flat-folder-view manner;
- create a database, and store the information of the folder, the information of all subfolders, the image information, and association information between folders and images which are obtained by scanning in the database;
- and
- search the database for the information of all subfolder of the target folder, the image information of the target folder and/or the image information of all subfolders;
- create a task list according to the information of all subfolders;
- the task list is in an inverted tree structure, subfolders corresponding to the information of all subfolders are task nodes of the task list, the task nodes of the task list are added to a folder task queue;
- configure a finish attribute identifier for each task node;
- traverse the task nodes in the folder task queue;
- and
- find the image information of the subfolders corresponding to the task nodes;
- transfer an image information obtaining task from a finished task node to an unfinished task node pointed to by the finished task node;
- obtain a first task node and a second task node pointed to by the first task node, wherein the first task node is a finished task node and the second task node is an unfinished task node;
- calculate a first tree height and a second tree height, wherein the first tree height is a tree height of a set where the second task node is located when the first task node directly points to the second task node, the second tree height is a tree height of a set where the first task node is located after the first task node swaps contents with the second task node;
- determine whether the first tree height is smaller than the second tree height;
- and
- directly point a next task of the first task node to the second task node if the first tree height is smaller than the second tree height, and to swap contents of the first task node with the second task node and point the next task of the new first task node to the new second task node if the first tree height is not smaller than the second tree height.
Dependencies are inferred from the claim text.