CN105808586B - Picture data processing method and device - Google Patents

Picture data processing method and device Download PDF

Info

Publication number
CN105808586B
CN105808586B CN201410849744.0A CN201410849744A CN105808586B CN 105808586 B CN105808586 B CN 105808586B CN 201410849744 A CN201410849744 A CN 201410849744A CN 105808586 B CN105808586 B CN 105808586B
Authority
CN
China
Prior art keywords
thumbnail
picture
index
file
picture block
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410849744.0A
Other languages
Chinese (zh)
Other versions
CN105808586A (en
Inventor
李鹏鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410849744.0A priority Critical patent/CN105808586B/en
Publication of CN105808586A publication Critical patent/CN105808586A/en
Application granted granted Critical
Publication of CN105808586B publication Critical patent/CN105808586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a picture data processing method and device. The picture data processing method comprises the following steps: viewing an index of a database for storing picture information; determining a null in the index; determining the sizes of all thumbnail image blocks stored in the thumbnail image files according to the file names of the thumbnail image files in the designated directory; determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file; and deleting the thumbnail according to the position of the picture block of the thumbnail. The method avoids the information safety problem caused by restoring the picture by using the thumbnail of the deleted picture in the prior art, simultaneously clears redundant data, and achieves the purpose of slimming the system.

Description

Picture data processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a picture data processing method and a picture data processing apparatus.
Background
With the rapid development of science and technology, people have more and more electronic devices, such as notebook computers, mobile phones, tablet computers and the like. People can use these electronic devices to meet different daily needs.
For example, people can take pictures and manage the pictures through the electronic devices, the storage of the pictures usually stores not only the original pictures of the pictures, but also the thumbnails of the pictures, and an index is established in a database so as to search the original pictures and read the thumbnails through the index. However, when the user deletes a photo, for example, when a user album has 1000 photos and deletes 500 photos, the system only deletes the original image and the information in the database, and the thumbnail file remains.
However, in the prior art, the corresponding original image can be obtained by processing the thumbnail of the deleted image, and the processing method of only deleting the original image and keeping the thumbnail has the problem of information security.
Therefore, one technical problem that needs to be urgently solved by those skilled in the art is: how to overcome the information security problem generated by restoring a picture by using a thumbnail of a deleted picture in the prior art.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a picture data processing method, which can reduce the information security problem generated by reviving a picture by using a thumbnail of a deleted picture in the prior art.
Correspondingly, the embodiment of the invention also provides a picture data processing device, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, the present invention discloses a picture data processing method, which comprises:
viewing an index of a database for storing picture information;
determining a null in the index;
determining the sizes of all thumbnail image blocks stored in the thumbnail image files according to the file names of the thumbnail image files in the designated directory;
determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
and deleting the thumbnail according to the position of the picture block of the thumbnail.
Further, at least two thumbnail files with different file names are stored in the designated directory, and the file names of the thumbnail files correspond to the picture block sizes of the thumbnails stored in the thumbnail files.
Further, at least two thumbnails with the same picture block size are stored in the thumbnail file.
Further, the image block is a storage space occupied by each thumbnail in the thumbnail file to which the thumbnail belongs.
Further, the file name of the thumbnail file corresponds to a pixel value of a thumbnail stored in the thumbnail file, wherein the size of a picture block of the thumbnail is determined according to the pixel value corresponding to the file name of the thumbnail file to which the thumbnail belongs.
Further, the determining the positions of the picture blocks of the thumbnails corresponding to the order of the vacancy in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file includes:
determining the ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the product of the vacancy sequence in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
determining the initial position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the end position of the picture block of the thumbnail corresponding to the vacancy sequence in the index and the size of the picture block of the thumbnail;
and determining the storage space between the starting position and the ending position as the picture block of the thumbnail corresponding to the vacancy sequence in the index.
Further, the deleting the thumbnail according to the position of the picture block of the thumbnail comprises:
and clearing the picture data of the thumbnail or replacing the picture data of the thumbnail with the picture data of the designated picture according to the position of the picture block of the thumbnail.
Further, the thumbnail file is an ithmb file.
Further, the method is applied to an iOS operating system.
An embodiment of the present invention further provides a picture data processing apparatus, including:
the index viewing unit is used for viewing an index of a database for storing the picture information;
a vacancy determining unit for determining a vacancy in the index;
the picture block determining unit is used for determining the picture block sizes of all thumbnails stored in the thumbnail files according to the file names of the thumbnail files under the specified directory;
the position determining unit is used for determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
and the data processing unit is used for deleting the thumbnail according to the position of the picture block of the thumbnail.
Further, at least two thumbnail files with different file names are stored in the designated directory, and the file names of the thumbnail files correspond to the picture block sizes of the thumbnails stored in the thumbnail files.
Further, at least two thumbnails with the same picture block size are stored in the thumbnail file.
Further, the image block is a storage space occupied by each thumbnail in the thumbnail file to which the thumbnail belongs.
Further, the file name of the thumbnail file corresponds to a pixel value of a thumbnail stored in the thumbnail file, wherein the size of a picture block of the thumbnail is determined according to the pixel value corresponding to the file name of the thumbnail file to which the thumbnail belongs.
Further, the position determination unit includes:
a first determining subunit, configured to determine, according to a product of a vacancy sequence in the index and sizes of picture blocks of all thumbnails stored in the thumbnail file, an end position of a picture block of a thumbnail corresponding to the vacancy sequence in the index;
the second determining subunit determines the starting position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index and the size of the picture block of the thumbnail;
and the third determining subunit determines the storage space between the starting position and the ending position as the picture block of the thumbnail corresponding to the vacancy sequence in the index.
Further, the data processing unit is specifically configured to empty the picture data of the thumbnail or replace the picture data of the thumbnail with the picture data of the specified picture according to the position of the picture block of the thumbnail.
Further, the thumbnail file is an ithmb file.
Further, the device is applied to an iOS operating system.
Compared with the prior art, the embodiment of the invention has the following advantages:
according to the embodiment of the invention, the index vacancy generated in the database by the deleted picture and the storage mode of the thumbnail in the thumbnail file are utilized, the thumbnail corresponding to the deleted picture in the thumbnail file can be searched, and further the thumbnail can be removed.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for processing picture data according to an embodiment of the present invention;
FIG. 2a is a schematic diagram of the manner in which ios7 are named before a thumbnail file in an embodiment of the present invention;
FIG. 2b is a schematic diagram of the naming of the thumbnail file after ios7 in an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a storage manner of a picture block of a thumbnail in a thumbnail file according to an embodiment of the present invention;
FIG. 4 is a flow diagram of a method of determining the location of a tile of a thumbnail corresponding to a vacancy order in an index in an embodiment of the present invention;
FIG. 5 is a flow diagram of another method for determining the location of a tile of a thumbnail corresponding to a vacancy order in an index in accordance with embodiments of the present invention;
FIG. 6 is a block diagram of an embodiment of a picture data processing apparatus according to the present invention;
fig. 7 is a block diagram of a location determination unit according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a picture data processing method according to the present invention is shown, which may specifically include the following steps:
step 101, an index of a database for storing picture information is viewed.
In the embodiment of the invention, the original pictures of the pictures are stored under the folder in a file form, each picture corresponds to one thumbnail, the thumbnails with different sizes are respectively stored in corresponding thumbnail files, and the thumbnail file can be an ithmb compressed file. When searching for the picture, the original picture can be searched and the thumbnail can be read through the index of the database.
When the system deletes a picture, the system deletes the original of the picture and deletes information in the database, but the thumbnail of the picture remains in a free state in the compressed file to which the thumbnail belongs.
In order to find the thumbnail of the deleted picture, in this step, the picture data processing apparatus first reads the index of the database for storing the picture information, and then performs step 102.
Step 102, determining a vacancy in the index.
After the index of the database is read, the corresponding index information of the deleted pictures in the database is also deleted, so that the vacancy in the index can be determined according to the sequence of the index, and the vacancy in the index corresponds to the deleted pictures.
Step 103, determining the picture block size of all thumbnails stored in the thumbnail file according to the file names of the thumbnail files in the designated directory.
In the embodiment of the present invention, the Thumbnail file is stored in a designated directory, for example, a/var/mobile/Media/metadata/Thumbnail directory, where at least two Thumbnail files may be stored in the designated directory, and each Thumbnail file includes one or more thumbnails. The thumbnail file may be an ithmb compressed file.
The filenames of the thumbnail files are different, for example as shown in FIGS. 2 a-2 b, ios7 was named before by picture size, e.g. 158x158.ithmb, and by ios7 the naming changes, with the relationship 3303:22,3309:64,3319:158,4031: 120. In summary, the file name of a thumbnail file corresponds to the pixel value of a thumbnail stored in the thumbnail file, for example, for a thumbnail file with a file name of 158 × 158.ithmb, the pixel value of all thumbnails contained in the file is 158.
The thumbnails are stored in the thumbnail files to which they belong in the form of image blocks, which are the storage space occupied by each thumbnail in the thumbnail file to which it belongs. As shown in fig. 3, two or more thumbnails with the same tile size are stored in the thumbnail file, each thumbnail corresponds to one tile, and the tiles corresponding to the thumbnails are arranged in the thumbnail file according to the index sequence in the database corresponding to the thumbnails, that is, the position of the tile corresponding to the thumbnail in the thumbnail file to which the thumbnail belongs corresponds to the index in the database.
The thumbnail of different pixels differ in tile size, for example, a thumbnail with a pixel value of 158 has a tile size of 50560. The size of a picture block of a thumbnail may be determined according to a pixel value corresponding to a file name of a thumbnail file to which the thumbnail belongs. Therefore, the file name of the thumbnail file also corresponds to the picture block size of the thumbnail stored in the thumbnail file.
In this step, the picture block sizes of all thumbnails stored in the thumbnail file may be determined according to the file names of the thumbnail files in the designated directory.
This step 103 may be performed simultaneously with the above steps 101 to 102, or may be performed sequentially by adjusting the order as necessary.
After the index vacancy and the size of the picture block of the thumbnail are determined in the above steps, step 104 can be executed.
And step 104, determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file.
As the thumbnails are arranged in the thumbnail file to which the thumbnails belong in the index sequence in the database corresponding to the thumbnails, the position of the thumbnail block corresponding to the index vacancy in the thumbnail file can be calculated as long as the vacancy sequence in the index and the size of the thumbnail block in the designated thumbnail file are obtained. The calculated picture block of the thumbnail is the picture block of the thumbnail which has been deleted from the original picture, and is the picture block which needs to be deleted. The designated thumbnail file may be all thumbnail files in the system, or may be one of the thumbnail files, for example, 158 × 158. ithmb.
Step 105, deleting the thumbnail according to the position of the picture block of the thumbnail.
After the position of the picture block needing to be cleared is determined, the data corresponding to the picture block can be cleared according to the position, and therefore the thumbnail corresponding to the picture block is deleted.
Specifically, the picture data of the thumbnail may be cleared or replaced with the picture data of the designated picture by a direct c-function according to the position of the picture block of the thumbnail.
According to the embodiment of the invention, the index vacancy generated in the database by the deleted picture and the storage mode of the thumbnail in the thumbnail file are utilized, the thumbnail corresponding to the deleted picture in the thumbnail file can be searched, and further the thumbnail can be removed.
In another embodiment of the present invention, in the process of determining the position of the picture block of the thumbnail corresponding to the order of the vacancy in the index according to the vacancy in the index and the size of the picture block of all thumbnails stored in the thumbnail file, one of the ways, as shown in fig. 4, may include the following steps:
step 401, determining the ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the product of the vacancy sequence in the index and the size of the picture block of all thumbnails stored in the thumbnail file.
The picture blocks corresponding to the thumbnails in the thumbnail file are sequentially arranged according to the index sequence in the database, as shown in fig. 3, the picture block position corresponding to the first thumbnail is 0-1 × picture block size, the picture block position corresponding to the second thumbnail is 1 × picture block size-2 × picture block size, and so on.
Then, according to the product of the vacancy sequence in the index and the size of the thumbnail picture block, the end position of the thumbnail picture block corresponding to the vacancy sequence in the index can be determined, for example, if the vacancy sequence of the index is 5, then 5 × the size of the picture block is recorded as the end position of the thumbnail picture block corresponding to the index vacancy.
For example, in 158 × 158.ithmb thumbnail file, the size of a picture block is fixed to 50560, and the terminal position of the thumbnail picture block with index vacancy of 3 is 3 × 50560.
And step 402, determining the initial position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the end position of the picture block of the thumbnail corresponding to the vacancy sequence in the index and the size of the picture block of the thumbnail.
And calculating the position of the size of one picture block forward according to the determined termination position, so that the starting position of the picture block of the thumbnail corresponding to the vacancy sequence in the index can be determined.
And step 403, determining the storage space between the starting position and the ending position as the picture block of the thumbnail corresponding to the vacancy sequence in the index.
The storage space between the start and stop positions is the picture block of the thumbnail corresponding to the vacancy sequence in the index.
After the position of the picture block is determined, the data between the start position and the stop position can be emptied or replaced through a direct c function, and the thumbnail can be deleted.
In another embodiment, as in the thumbnail file, there are gaps of several or several tens of bytes between the picture blocks of adjacent thumbnails, and the above method can be applied to calculate the position of the picture block of the thumbnail corresponding to the order of the gaps in the index by using the known gaps.
In another embodiment of the present invention, in the process of determining the position of the picture block of the thumbnail corresponding to the order of the vacancy in the index according to the vacancy in the index and the size of the picture blocks of all thumbnails stored in the thumbnail file, as shown in fig. 5, the following steps may be included:
step 501, determining the starting and ending position of the picture block of the first thumbnail in the thumbnail file according to the sizes of the picture blocks of all the thumbnails stored in the thumbnail file; the first thumbnail corresponds to the first bit in the index.
In the step, firstly, the position of a picture block of a first thumbnail arranged at the first position in the thumbnail file is determined, and the picture block position is 0-1 x picture block size.
The picture blocks corresponding to the thumbnails in the thumbnail file are sequentially arranged according to the index sequence in the database, and the first thumbnail corresponds to the first bit in the index sequence.
Step 502, determining the starting and ending positions of the picture blocks of the thumbnail corresponding to the vacancy sequence in the index according to the vacancy sequence in the index, the starting and ending positions of the picture blocks of the first thumbnail and the sizes of the picture blocks of all thumbnails stored in the thumbnail file.
In this step, the starting and ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index can be calculated according to the determined starting and ending position and the size of the picture block of the first thumbnail.
For example, the tile position corresponding to the first thumbnail is 0-1 × tile size, the tile position corresponding to the second thumbnail is 1 × tile size-2 × tile size, and so on until the empty position in the index is the tile of the thumbnail corresponding to the sequence.
Of course, if there is a gap of several or several tens of bytes between the picture blocks of the adjacent thumbnails, the start-stop position of the picture block of the thumbnail corresponding to the order of the empty position in the index can be calculated according to the determined start-stop position of the picture block of the first thumbnail, the size of the picture block and the fixed gap between the picture blocks.
For example, the tile position corresponding to the first thumbnail is 0 to 1 × tile size, the tile position corresponding to the second thumbnail is 1 × tile size + fixed space-2 × tile size + fixed space, the tile position corresponding to the third thumbnail is 2 × tile size +2 × fixed space-3 × tile size +2 × fixed space, and so on until the empty position in the index sequentially corresponds to the tile of the thumbnail.
After the position of the picture block is determined, the data between the start position and the stop position can be emptied or replaced through a direct c function, and the thumbnail can be deleted.
The method embodiment can be applied to an iOS operating system.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 6, a block diagram of a picture data processing apparatus according to an embodiment of the present invention is shown, which may specifically include the following units:
an index viewing unit 601, configured to view an index of a database for storing picture information.
A slot determining unit 602, configured to determine a slot in the index.
A picture block determination unit 603 for determining the picture block sizes of all thumbnails stored in the thumbnail file according to the file names of the thumbnail files under the designated directory.
A position determining unit 604, configured to determine, according to the empty space in the index and the sizes of all thumbnail image blocks stored in the thumbnail image file, the position of the thumbnail image block corresponding to the order of the empty space in the index.
A data processing unit 605 for deleting the thumbnail according to the position of the picture block of the thumbnail.
In the embodiment of the invention, the device can search the thumbnail corresponding to the deleted picture in the thumbnail file by using the index vacancy generated in the database by the deleted picture and the storage mode of the thumbnail in the thumbnail file through the units, so that the thumbnail can be eliminated.
In another embodiment of the present invention, at least two thumbnail files having different file names are stored under the designated directory, and the file names of the thumbnail files correspond to the picture block sizes of the thumbnails stored in the thumbnail files.
At least two thumbnails with the same picture block size are stored in the thumbnail file.
And the image blocks are storage spaces occupied by each thumbnail in the thumbnail file to which the thumbnail belongs.
The file name of a thumbnail file corresponds to a pixel value of a thumbnail stored in the thumbnail file, wherein the size of a picture block of the thumbnail is determined according to the pixel value corresponding to the file name of the thumbnail file to which the thumbnail belongs.
The thumbnail file is an ithmb file.
In another embodiment, the data processing unit 605 may be specifically configured to clear the picture data of the thumbnail or replace the picture data of the thumbnail with the picture data of the designated picture according to the position of the picture block of the thumbnail.
In another embodiment of the present invention, as shown in fig. 7, the position determining unit 604 may further include:
a first determining subunit 701, configured to determine, according to a product of the vacancy sequence in the index and the picture block sizes of all thumbnails stored in the thumbnail file, an end position of a picture block of a thumbnail corresponding to the vacancy sequence in the index.
The second determining subunit 702 determines, according to the ending position of the picture block of the thumbnail corresponding to the null order in the index and the size of the picture block of the thumbnail, the starting position of the picture block of the thumbnail corresponding to the null order in the index.
The third determining sub-unit 703 determines the storage space between the start position and the end position as a picture block of the thumbnail corresponding to the order of the empty bits in the index.
The above apparatus can be applied to an iOS operating system.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for a picture data processing method and a picture data processing apparatus, and the principle and the implementation of the present invention are explained by applying specific examples, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (18)

1. A picture data processing method is characterized by comprising the following steps:
viewing an index of a database for storing picture information;
determining a null in the index; wherein the empty bit in the index corresponds to the deleted picture;
determining the sizes of all thumbnail image blocks stored in the thumbnail image files according to the file names of the thumbnail image files in the designated directory;
determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
and deleting the thumbnail according to the position of the picture block of the thumbnail.
2. The method according to claim 1, wherein at least two thumbnail files having different file names are stored under the designated directory, the file names of the thumbnail files corresponding to the picture block sizes of the thumbnails stored in the thumbnail files.
3. The method according to claim 1, wherein at least two thumbnails with the same tile size are stored in the thumbnail file.
4. The method of claim 1, wherein the tile occupies storage space for each of the thumbnails in the thumbnail file to which the thumbnail belongs.
5. The method according to claim 1, wherein a file name of the thumbnail file corresponds to a pixel value of a thumbnail stored in the thumbnail file, wherein a size of a picture block of the thumbnail is determined according to the pixel value corresponding to the file name of the thumbnail file to which the thumbnail belongs.
6. The method of claim 1, wherein determining the positions of the tiles of the thumbnails corresponding to the order of the slots in the index according to the slots in the index and the tile sizes of all the thumbnails stored in the thumbnail file comprises:
determining the ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the product of the vacancy sequence in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
determining the initial position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the end position of the picture block of the thumbnail corresponding to the vacancy sequence in the index and the size of the picture block of the thumbnail;
and determining the storage space between the starting position and the ending position as the picture block of the thumbnail corresponding to the vacancy sequence in the index.
7. The method of claim 1, wherein the deleting the thumbnail according to the location of the picture block of the thumbnail comprises:
and clearing the picture data of the thumbnail or replacing the picture data of the thumbnail with the picture data of the designated picture according to the position of the picture block of the thumbnail.
8. The method according to any of claims 1 to 7, wherein the thumbnail file is an ithmb file.
9. The method according to any one of claims 1 to 7, wherein the method is applied to an iOS operating system.
10. A picture data processing apparatus, characterized by comprising:
the index viewing unit is used for viewing an index of a database for storing the picture information;
a vacancy determining unit for determining a vacancy in the index; wherein the empty bit in the index corresponds to the deleted picture;
the picture block determining unit is used for determining the picture block sizes of all thumbnails stored in the thumbnail files according to the file names of the thumbnail files under the specified directory;
the position determining unit is used for determining the positions of the picture blocks of the thumbnails corresponding to the vacancy sequence in the index according to the vacancy in the index and the sizes of the picture blocks of all the thumbnails stored in the thumbnail file;
and the data processing unit is used for deleting the thumbnail according to the position of the picture block of the thumbnail.
11. The apparatus according to claim 10, wherein at least two thumbnail files having different file names are stored under the designated directory, the file names of the thumbnail files corresponding to the picture block sizes of the thumbnails stored in the thumbnail files.
12. The apparatus of claim 10, wherein at least two thumbnails with the same tile size are stored in the thumbnail file.
13. The apparatus of claim 10, wherein the tile occupies, for each of the thumbnails, a storage space occupied in the thumbnail file to which the thumbnail belongs.
14. The apparatus according to claim 10, wherein a file name of the thumbnail file corresponds to a pixel value of a thumbnail stored in the thumbnail file, and wherein a size of a picture block of the thumbnail is determined according to the pixel value corresponding to the file name of the thumbnail file to which the thumbnail belongs.
15. The apparatus of claim 10, wherein the position determining unit comprises:
a first determining subunit, configured to determine, according to a product of a vacancy sequence in the index and sizes of picture blocks of all thumbnails stored in the thumbnail file, an end position of a picture block of a thumbnail corresponding to the vacancy sequence in the index;
the second determining subunit determines the starting position of the picture block of the thumbnail corresponding to the vacancy sequence in the index according to the ending position of the picture block of the thumbnail corresponding to the vacancy sequence in the index and the size of the picture block of the thumbnail;
and the third determining subunit determines the storage space between the starting position and the ending position as the picture block of the thumbnail corresponding to the vacancy sequence in the index.
16. The apparatus according to claim 10, wherein the data processing unit is specifically configured to clear the picture data of the thumbnail or replace the picture data of the thumbnail with the picture data of the specified picture according to the position of the picture block of the thumbnail.
17. The apparatus according to any of the claims 10 to 16, wherein the thumbnail file is an ithmb file.
18. The apparatus according to any one of claims 10 to 16, wherein the apparatus is applied to an iOS operating system.
CN201410849744.0A 2014-12-29 2014-12-29 Picture data processing method and device Active CN105808586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410849744.0A CN105808586B (en) 2014-12-29 2014-12-29 Picture data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410849744.0A CN105808586B (en) 2014-12-29 2014-12-29 Picture data processing method and device

Publications (2)

Publication Number Publication Date
CN105808586A CN105808586A (en) 2016-07-27
CN105808586B true CN105808586B (en) 2021-04-06

Family

ID=56421270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410849744.0A Active CN105808586B (en) 2014-12-29 2014-12-29 Picture data processing method and device

Country Status (1)

Country Link
CN (1) CN105808586B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874416B (en) * 2018-09-04 2022-06-24 深圳云天励飞技术有限公司 Image characteristic value storage method and device and electronic equipment
CN112784119B (en) * 2021-01-14 2023-04-28 内蒙古蒙商消费金融股份有限公司 Data query and synchronization optimization method and device
CN116107479B (en) * 2023-03-02 2024-02-13 优视科技有限公司 Picture display method, electronic device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0987637A2 (en) * 1998-08-31 2000-03-22 Canon Kabushiki Kaisha Image storage method and apparatus
CN101790047A (en) * 2009-01-28 2010-07-28 索尼公司 Image processing equipment, image management device and image management method and program
CN103458016A (en) * 2013-08-21 2013-12-18 小米科技有限责任公司 Method and device for picture management and terminal device
CN103645914A (en) * 2013-11-26 2014-03-19 北京奇虎科技有限公司 Software cleaning method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4327827B2 (en) * 2006-07-28 2009-09-09 株式会社東芝 Video recording / reproducing system and video recording / reproducing method
CN102722307B (en) * 2011-03-29 2016-05-11 腾讯科技(深圳)有限公司 A kind of thumbnail air navigation aid and device
CN102768662B (en) * 2011-05-05 2016-02-10 阿里巴巴集团控股有限公司 A kind of method and apparatus Loaded Image
CN102841896A (en) * 2011-06-22 2012-12-26 腾讯科技(深圳)有限公司 Mobile terminal picture and text information displaying method and system and mobile terminal
CN103164432B (en) * 2011-12-13 2016-03-30 联想(北京)有限公司 Recover method and the mobile terminal of deleted file by mistake
CN103970516B (en) * 2013-01-30 2015-10-07 腾讯科技(深圳)有限公司 Redundancy image deletion method and device
CN104239435A (en) * 2014-08-29 2014-12-24 四川长虹电器股份有限公司 Distributed picture caching method based on picture thumbnail processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0987637A2 (en) * 1998-08-31 2000-03-22 Canon Kabushiki Kaisha Image storage method and apparatus
CN101790047A (en) * 2009-01-28 2010-07-28 索尼公司 Image processing equipment, image management device and image management method and program
CN103458016A (en) * 2013-08-21 2013-12-18 小米科技有限责任公司 Method and device for picture management and terminal device
CN103645914A (en) * 2013-11-26 2014-03-19 北京奇虎科技有限公司 Software cleaning method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Windows缩略图缓存文件的分析和取证;刘浩阳;《技术研究》;20120131;第74-76页 *

Also Published As

Publication number Publication date
CN105808586A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
US11340754B2 (en) Hierarchical, zoomable presentations of media sets
CN102414721B (en) There is the data file of more than one operator scheme
US8170987B2 (en) Methods, systems and computer program products for automatically identifying and backing up user device content
WO2016101757A1 (en) Image processing method and device based on mobile device
EP2857990A1 (en) File information previewing method and system
CN105431838A (en) Streaming content and placeholders
US10140005B2 (en) Causing elements to be displayed
US11036792B2 (en) Method for designating and tagging album of stored photographs in touchscreen terminal, computer-readable recording medium, and terminal
WO2018006587A1 (en) File storage method, terminal, and storage medium
CN105808586B (en) Picture data processing method and device
CN103324892A (en) File display method and device of Android system
JP5601513B2 (en) Image display apparatus and program
CN107402846B (en) File processing method and device
CN104869144A (en) Information sharing method and electronic equipment
TW201344462A (en) File uploading system and method
JP2014154891A (en) Information processor, control method for the same, program, and storage medium
WO2017040503A1 (en) FILE MANAGEMENT FOR eDISCOVERY
CN103093213A (en) Video file classification method and terminal
EP2863323A1 (en) Apparatus for and method of managing image files by using thumbnail images
KR101780236B1 (en) Apparatus and method for file management of recovered file
US9703786B2 (en) Systems and methods of reclaiming storage space
Munegowda et al. Directory compaction techniques for space optimizations in ExFAT and FAT file systems for embedded storage devices
JP2009128946A (en) Metadata providing apparatus and method
JP2016021156A (en) Image display device
KR101300052B1 (en) Method for searching image and recording-medium recorded program thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240116

Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right