A kind of photo management method and device
Technical field
The present invention relates to intelligent terminal fields, and in particular to a kind of photo management method and device.
Background technique
With the fast development of internet, the function of the mobile terminals such as mobile phone is also increasingly stronger, and people can utilize mobile phone
Operative scenario, record life etc. are shot, then, the photograph oneself shot in work and life is transmitted or shared by internet
Piece, while the storage space on mobile terminal is increasing, stores user on mobile terminals a large amount of photo, and
And it is browsed and is used anywhere or anytime.
Currently, the memory capacity of terminal is increasing, storable photo is also more and more, and user passes through mobile terminal
When photograph album checks picture, a large amount of photo is faced, user can not be quickly found out the photo for oneself wanting to check, or even the terminal having
It needs user manually to classify photo, wastes a large amount of time, it has not been convenient to which user is managed and searches.
From the foregoing, it will be observed that the photo classification method in existing intelligent terminal is inconvenient to search and manage photo, there is lookup speed
The technical issues of degree is slow, low efficiency.
Summary of the invention
The embodiment of the present invention provides a kind of photo management method and device, can solve the classification side of photo in the prior art
The technical issues of method is inconvenient to search and manage photo, and search speed is slow, low efficiency.
The embodiment of the present invention provides a kind of photo management method, comprising the following steps:
Obtain multiple attribute informations of photo;
Determining in preset attribute set whether there is and the matched preset attribute information of the attribute information;
If so, the photo is stored in the corresponding collection of photographs of the preset attribute information.
Wherein, before the step of obtaining multiple attribute informations of photo, the method also includes:
Collection of photographs request to create is received, the request to create carries at least one default photo property information;
The corresponding collection of photographs of the preset attribute information is created according to collection of photographs request to create.
Further, the step being stored in the photo in the corresponding collection of photographs of the preset attribute information it
Afterwards, the method also includes:
According to the corresponding classifying rules of the collection of photographs, classify to the photo in the collection of photographs.
Further, described according to the corresponding classifying rules of the collection of photographs, to the photo in the collection of photographs into
The step of row classification, specifically includes:
The attribute information for obtaining photo in the collection of photographs, according to the attribute information to the photograph in the collection of photographs
Piece is classified.
Wherein, whether there is and the matched preset attribute information of the attribute information in the determining preset attribute set
Step specifically includes:
It determines in the preset attribute set with the presence or absence of the default category for belonging to same type with the attribute information
Property information;
If it exists, then the attribute information is matched with the preset attribute information, wherein the preset attribute letter
Breath is the preset attribute information for belonging to same type with the attribute information;
If successful match, it is determined that exist and the matched preset attribute information of the attribute information;
If it fails to match, it is determined that be not present and the matched preset attribute information of the attribute information.
The embodiment of the invention also provides a kind of photo management devices, comprising: obtains module, determining module and storage mould
Block;
The acquisition module, for obtaining multiple attribute informations of photo;
The determining module whether there is and the matched default category of the attribute information for determining in preset attribute set
Property information;
The memory module, for when the determining module is determined as, the photo to be stored in the default category
In the property corresponding collection of photographs of information.
Wherein, described device further include: receiving module and creation module;
The receiving module, for receiving photograph collection before the acquisition module obtains multiple attribute informations of photo
Request to create is closed, the request to create carries at least one default photo property information;
The creation module, for creating the corresponding photograph collection of the preset attribute information according to collection of photographs request to create
It closes.
In the embodiment of the present invention, described device further include: categorization module;
The categorization module, it is corresponding for the photo to be stored in the preset attribute information in the memory module
After in collection of photographs, according to the corresponding classifying rules of the collection of photographs, classify to the photo in the collection of photographs.
Wherein, the categorization module specifically includes: acquisition submodule and classification submodule;
The acquisition submodule, for obtaining the attribute information of photo in the collection of photographs;
The classification submodule, for being classified according to the attribute information to the photo in the collection of photographs.
Wherein, the determining module specifically includes: determining submodule and matched sub-block;
The determining submodule belongs to phase with the attribute information for determining to whether there is in the preset attribute set
The preset attribute information of same type;
The matched sub-block, for when the determining submodule is determined as, by the attribute information with it is described pre-
If attribute information is matched, wherein the preset attribute information is the default category for belonging to same type with the attribute information
Property information, if successful match, it is determined that exist with the matched preset attribute information of the attribute information, if it fails to match,
It then determines and is not present and the matched preset attribute information of the attribute information.
Photo management method provided in an embodiment of the present invention determines preset attribute using the multiple attribute informations for obtaining photo
In set with the presence or absence of with the matched preset attribute information of the attribute information, if so, photo is stored in preset attribute information
In corresponding collection of photographs;This programme is facilitated by carrying out classification storage to photo according to the attribute information of photo to photo
Lookup and management, photo classification mode compared with the existing technology accelerates the speed for searching photo, effectively improves photo point
The efficiency of class management.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a kind of flow diagram for photo management method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of photo management method provided by Embodiment 2 of the present invention;
Fig. 3 is to show according to attribute information to what photo was managed in photo management method provided by Embodiment 2 of the present invention
Show interface schematic diagram;
Fig. 4 is a kind of structural schematic diagram for photo management device that the embodiment of the present invention three provides;
Fig. 5 is the structural schematic diagram for second of photo management device that the embodiment of the present invention three provides;
Fig. 6 is the structural schematic diagram for the third photo management device that the embodiment of the present invention three provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of photo management method and device.It will be described in detail respectively below.
Embodiment one,
The present embodiment will be described from the angle of photo management device, which can integrate in terminal
Etc. in equipment, such as be integrated in the equipment such as smart phone, tablet computer.
Referring to Fig. 1, Fig. 1 is a kind of flow diagram for photo management method that the embodiment of the present invention one provides, this reality
The photo management method for applying example includes:
Step S101 obtains multiple attribute informations of photo.
Specifically, the photo of user's shooting is obtained first.Wherein, photo can be the photo of user's captured in real-time, can also
The good photo of storage at the terminal is shot before thinking user.It, can be in addition, this embodiment scheme can also be not limited to photo
For other pictures, such as picture, the picture of self-definition design etc. of user's collection, the present embodiment is illustrated with photo.
Optionally, before the attribute information for obtaining photo, terminal receives the photo management instruction that user sends, according to upper
It states photo management instruction photo is further processed, photo management instruction can be raw while user takes pictures
At, and classification processing is carried out to the photo of this generation of taking pictures;Certainly, photo management instruction can also issue for user, than
When browsing photo in mobile phone photo album such as user, the photo classified is chosen, then terminal generates photo management instruction,
The photo that user chooses is further processed according to the instruction.
In embodiments of the present invention, above-mentioned multiple attribute informations can be the parameter information and content information of photo, such as:
Geographical location, shooting date, photo size, facial recognition information etc..
Step S102, determine in preset attribute set with the presence or absence of with the matched preset attribute information of attribute information, if so,
S103 is thened follow the steps, if it is not, thening follow the steps S104.
In embodiments of the present invention, the set of attribute can be preset, may include in the attribute set it is preset extremely
A few attribute information, and the attribute information is corresponding with collection of photographs, such as position corresponding with geographical location information phase
Volume, time photograph album corresponding with shooting date etc..
Step S103, if in preset attribute set exist with the matched preset attribute information of attribute information, photo is deposited
In the corresponding collection of photographs of Chu Yu preset attribute information.
For example, judging that preset attribute set is in the middle if multiple attribute informations of the photo obtained have geographical location information
It is no that there are geographical location information, if so, the photo is stored in the middle of photograph album corresponding with geographical location information, such as
" position photograph album ", locating geographical location when wherein geographical location information is taken pictures for terminal can pass through the GPS of terminal
The positioning of (Global Positioning System, global positioning system) system obtains;If the attribute information of the photo obtained
Having time information in the middle then judges to whether there is temporal information in preset attribute set, if so, by the photo be stored in
In the middle of the corresponding photograph album of temporal information, such as " time photograph album ", when wherein the temporal information of photo is taken pictures for terminal when
Between information, can be obtained by obtaining the current system time of mobile phone.
In embodiments of the present invention, since photo may include the attribute information in multiple preset attribute set, so
One photo can store in the middle of multiple collection of photographs, wherein the attribute in above-mentioned preset attribute set can be institute
There are the attribute information that photo all has, such as temporal information, geographical location information, which may be after photo array
The only attribute that some photo has, such as facial recognition information.
For example, carrying out Face datection to photo to judge whether comprising personage in photo, if so, judging preset attribute collection
It whether there is people information in closing, if so, the photo storage is in the corresponding photograph album of people information, such as " people
Object photograph album ", wherein carrying out Face datection to photo can be used existing human face detection tech, such as the OpenCL of open source
(Open Source Computer Library, computer vision class libraries);If otherwise do not include personage in photo, can be with
The photo is stored in the photograph album not comprising people information, such as " landscape photograph album ".
Step S104, if in preset attribute set there is no with the matched preset attribute information of attribute information, will not shine
Piece is stored in collection of photographs corresponding with preset attribute information.
Optionally, if being not present and the matched preset attribute information of attribute information namely the photo in preset attribute set
Attribute information be not present in preset attribute set, corresponding collection of photographs can be created according to the attribute information, and will
The photo is stored in the newly-built collection of photographs.
From the foregoing, it will be observed that the embodiment of the present invention is using the multiple attribute informations for obtaining photo, determining in preset attribute set is
No presence and the matched preset attribute information of the attribute information, if so, photo is stored in the corresponding photograph of preset attribute information
In piece set;This programme to increase the function for carrying out photo according to the attribute information of photo classification storage in existing terminal
Can, the classification storage mode of photo is enriched, the mode classification that can solve photo in the prior art is more single, is unfavorable for using
The technical issues of family management and lookup photo, the efficiency of photo classification management is effectively improved, so that the classification storage of photo is more
Diversification;In addition, photo management method provided in an embodiment of the present invention also has, implementation cost is low, operating procedure is simply excellent
Point.
Embodiment two,
On the basis of the photo management method that embodiment one describes, the present embodiment will be described further this programme,
As shown in Fig. 2, Fig. 2 is a kind of flow diagram of photo management method provided by Embodiment 2 of the present invention, comprising:
Step S201, receives collection of photographs request to create, and the request to create carries at least one default photo property letter
Breath;
In embodiments of the present invention, the generating mode of the collection of photographs request to create can there are many, such as by terminal system
System generates, which can carry at least one default photo property information and can also optionally give birth to according to user instructions
At the collection of photographs request to create, wherein at least one default photo property information that the request to create carries, the default photo
Attribute information can be set according to demand by user.
For example, user can click " creation " control at the photograph album interface of terminal, i.e. pop-up creates interface, on the surface
User can input album name, default photo property information etc., and album name is used to mark the photograph album of the creation, presets photo
Attribute information is for associated with the photograph album, and for example, user's input album name on creation interface is " position photograph album ", presets
Photo property information be geographical location information, i.e., should " position photograph album " carry photo geographical location information.
Step S202 creates the corresponding collection of photographs of preset attribute information according to collection of photographs request to create.
Specifically, being carried according to request to create creation with request to create after terminal receives collection of photographs request to create
At least one default corresponding collection of photographs of photo property information, for example, the collection of photographs request to create that terminal receives, root
Photograph album is created according to the geographical location information that the request to create carries, the album name that can be inputted according to user, for example " position phase
Volume " is named the photograph album.
Step S203 obtains multiple attribute informations of photo.
Optionally, before the step of extracting to photo, terminal receives the photo management instruction that user sends, according to
Photo is further processed in above-mentioned photo management instruction, and photo management instruction can be for while user takes pictures
It generates, and classification processing is carried out to the photo of this generation of taking pictures;Certainly, photo management instruction can also issue for user,
For example user chooses the photo classified when browsing photo in mobile phone photo album, then terminal generates photo management and refers to
It enables, the photo that user chooses is further processed according to the instruction.
In embodiments of the present invention, it also should not be limited to photo, can also be other pictures, such as the figure of user's collection
Piece, picture of self-definition design etc., the present embodiment is illustrated with photo.
Step S204, determine in preset attribute set with the presence or absence of with the matched preset attribute information of attribute information, if so,
S205 is thened follow the steps, if it is not, thening follow the steps S206.
Specifically, determining in preset attribute set with the presence or absence of the step with the matched preset attribute information of above-mentioned attribute information
Suddenly it specifically includes: determining with the presence or absence of the preset attribute information for belonging to same type with attribute information in preset attribute set, if
In the presence of then the attribute information is matched with preset attribute information, wherein preset attribute information is to belong to phase with attribute information
The preset attribute information of same type, if successful match, it is determined that exist with the matched preset attribute information of attribute information, if matching
Failure, it is determined that be not present and the matched preset attribute information of attribute information.
In embodiments of the present invention, the preset attribute information for belonging to same type with attribute information is first determined whether there is,
Then, attribute information is matched with the preset attribute information;For example, when obtain attribute information be geographical location information or
When person's temporal information, then will first determine whether pre-stored attribute information has geographical location information or temporal information
(belonging to same type with the attribute information of acquisition), if so, the geographical location information that then needs currently to obtain or when
Between information matched with pre-stored geographical location information or temporal information.
For example, preset attribute information is temporal information of the shooting time after 2016, then the time of photo is got
After information, first judge to whether there is and the preset attribute information of attribute information same type namely time in preset attribute set
Information continues to judge whether the temporal information is temporal information after 2016, namely judge that attribute is believed if being judged as YES
Whether breath matches with preset attribute information, if so, determination presence and the matched preset attribute information of attribute information, if it is not, then
It determines and is not present and the matched preset attribute information of attribute information.
Step S205, if in preset attribute set exist with the matched preset attribute information of attribute information, photo is deposited
In the corresponding collection of photographs of Chu Yu preset attribute information.
In embodiments of the present invention, since photo may include the attribute information in multiple preset attribute set, so
One photo can store in the middle of multiple collection of photographs, wherein the attribute in above-mentioned preset attribute set can be institute
There are the attribute information that photo all has, such as temporal information, geographical location information, is believed according to the score value that photo parameter is calculated
Breath etc., the attribute may be the attribute that only some photo has after photo array, such as facial recognition information.
For example, as shown in figure 3, Fig. 3 is to compare in photo management method provided in this embodiment according to attribute information
The display interface schematic diagram that piece is managed.
Wherein, the collection of photographs corresponding with preset attribute information which can be pre-created includes: and score information
Corresponding scoring photograph album, with personage's photograph album corresponding to facial recognition information, with landscape corresponding to no facial recognition information
Photograph album, with geographical location information corresponding to position photograph album and with time photograph album corresponding to temporal information;If the photograph obtained
Piece attribute information includes facial recognition information, then the photo is stored in personage's photograph album;If the photo property information obtained
Packet geographical location information, then the photo is stored in the photograph album of position etc..
Step S206, if in preset attribute set there is no with the matched preset attribute information of attribute information, will not shine
Piece is stored in collection of photographs corresponding with preset attribute information.
Optionally, if being not present and the matched preset attribute information of attribute information namely the photo in preset attribute set
Attribute information be not present in preset attribute set, corresponding collection of photographs can be created according to the attribute information, and will
The photo is stored in the newly-built collection of photographs.
Step S207 classifies to the photo in collection of photographs according to the corresponding classifying rules of collection of photographs.
Specifically, described according to the corresponding classifying rules of collection of photographs, the step classified to the photo in collection of photographs
Suddenly it can specifically include: obtain the attribute information of photo in the collection of photographs, according to attribute information to the photograph in collection of photographs
Piece is classified.
It in embodiments of the present invention, can be according to the preset attribute pair in collection of photographs corresponding with preset attribute
Photo is classified, if being temporal information than preset attribute information, then in the corresponding photograph album of temporal information such as " time phase
In volume ", temporal information when can be according to photograph taking is classified, specifically, can will according to the sequence of time order and function
Photo is ranked up;If the preset attribute information be geographical location information, the corresponding photograph album of the geographical location information for example
In " position photograph album ", geographical location when can be according to photograph taking is classified, and is for example " Shenzhen " by geographical location
Photo is put together, and the photo that geographical location is " Dongguan " is put together.
Optionally, when classifying to photo, the photo property information of acquisition can be with the category corresponding to collection of photographs
Property information it is identical, such as can be classified according to the time comparison piece of photograph taking in " time photograph album ";The photograph of acquisition
Piece attribute information can also be not identical as the attribute information corresponding to collection of photographs, such as can also obtain in " time photograph album "
The geographical location information of photo is taken, is then classified according to the geographical location information to photo.
Wherein, the step of being classified according to attribute information to the photo in collection of photographs can also include: according to attribute
Information contrast piece is given a mark, and is classified according to Score Control piece.
It may include the information such as the exposure of photo, f-number, noise density, root for example, obtaining the parameter information of photo
Score value is calculated according to preset algorithm by terminal system according to above- mentioned information, then photo is stored in photograph collection corresponding with score value and combines harmoniously
In the middle of " scoring photograph album ", in the photograph album, classification and ordination is carried out according to the score information of photo.
From the foregoing, it will be observed that the embodiment of the present invention obtains photo using the corresponding collection of photographs of preset attribute information is pre-created
Multiple attribute informations, determine in preset attribute set with the presence or absence of with the matched preset attribute information of the attribute information, if so,
Then photo is stored in the corresponding collection of photographs of preset attribute information, and according to the corresponding classifying rules of collection of photographs, control
Photo in piece set is classified;This programme to increase in existing terminal according to the attribute information of photo to photo into
The function of row classification storage enriches the classification storage mode of photo, can solve the mode classification of photo in the prior art compared with
Be it is single, be unfavorable for user management and search photo the technical issues of, effectively improve the efficiency of photo classification management.
Embodiment three,
In order to better implement above method embodiment, the present invention also provides a kind of photo management devices, which can
To be integrated in the equipment such as terminal, such as it is integrated in the equipment such as smart phone, tablet computer.
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of photo management device provided in an embodiment of the present invention, comprising: obtain
Modulus block 301, determining module 302 and memory module 303;
The acquisition module 301, for obtaining multiple attribute informations of photo;
Specifically, obtaining the photo of user's shooting first.Wherein, photo can be the photo of user's captured in real-time, can also
The good photo of storage at the terminal is shot before thinking user, and multiple attribute informations of photo are then obtained by acquisition module 301,
Above-mentioned multiple attribute informations can be the parameter information and content information of photo, such as: geographical location, shooting date, photo are big
Small, facial recognition information etc..
The determining module 302 whether there is and the matched preset attribute of attribute information for determining in preset attribute set
Information;
In embodiments of the present invention, the set of attribute can be preset, may include in the attribute set it is preset extremely
A few attribute information, and the attribute information is corresponding with collection of photographs, such as position corresponding with geographical location information phase
Volume, time photograph album corresponding with shooting date etc..
The memory module 303, for when above-mentioned determining module 302 is determined as, photo to be stored in preset attribute letter
It ceases in corresponding collection of photographs.
In embodiments of the present invention, since photo may include the attribute information in multiple preset attribute set, so
One photo can store in the middle of multiple collection of photographs, wherein the attribute in above-mentioned preset attribute set can be institute
There are the attribute information that photo all has, such as temporal information, geographical location information, which may be after photo array
The only attribute that some photo has, such as facial recognition information.
Specifically, as shown in figure 5, the determining module 302 can specifically include: determining submodule 3021 and matched sub-block
3022;
The determination submodule 3021 belongs to same type with attribute information for determining to whether there is in preset attribute set
Preset attribute information;
The matched sub-block 3022, for when determining that submodule 3021 is determined as, by attribute information and preset attribute
Information is matched, wherein preset attribute information be belong to the preset attribute information of same type with attribute information, if matching at
Function, it is determined that exist with the matched preset attribute information of attribute information, if it fails to match, it is determined that be not present and attribute information
The preset attribute information matched.
Preferably, as shown in fig. 6, photo management device provided in an embodiment of the present invention can also include: receiving module
304, creation module 305 and categorization module 306;
The receiving module 304, for receiving photograph collection before the multiple attribute informations for obtaining the acquisition photo of module 301
Request to create is closed, which carries at least one default photo property information;
Optionally, the generating mode of the collection of photographs request to create can there are many, for example generated by terminal system, the wound
Building request and can carrying at least one default photo property information optionally can also generate the photograph collection according to user instructions
Close request to create, wherein at least one default photo property information that the request to create carries, which can
Think that user sets according to demand, the collection of photographs request to create is finally received by above-mentioned receiving module 304.
The creation module 305, for creating the corresponding collection of photographs of preset attribute information according to collection of photographs request to create;
Specifically, creation module 305 is created and is created according to request to create after terminal receives collection of photographs request to create
At least one default corresponding collection of photographs of photo property information that request carries, for example, the collection of photographs that terminal receives
Request to create creates photograph album according to the geographical location information that the request to create carries, the album name that can be inputted according to user
The photograph album is named.
The categorization module 306, for photo to be stored in the corresponding collection of photographs of preset attribute information in memory module
Later, according to the corresponding classifying rules of collection of photographs, classify to the photo in collection of photographs.
In embodiments of the present invention, in collection of photographs corresponding with preset attribute, which can basis
The preset attribute classifies to photo, if being temporal information than preset attribute information, then in the corresponding photograph album of temporal information
Such as in " time photograph album ", temporal information when can be according to photograph taking is classified, specifically, can be according to time elder generation
Photo is ranked up by sequence afterwards;It is corresponding in the geographical location information if the preset attribute information is geographical location information
Photograph album such as " position photograph album " in, geographical location when can be according to photograph taking is classified, for example by geographical location
Photo for " Shenzhen " is put together, and the photo that geographical location is " Dongguan " is put together.
In embodiments of the present invention, which can specifically include: acquisition submodule and classification submodule;
The acquisition submodule, for obtaining the attribute information of photo in collection of photographs;
The classification submodule, for being classified according to attribute information to the photo in collection of photographs.
Optionally, classify submodule classify to photo when, by acquisition submodule obtain photo property information with
Attribute information corresponding to collection of photographs can be identical or different, and which is not limited by the present invention.
From the foregoing, it will be observed that the embodiment of the present invention obtains multiple attribute informations of photo using acquisition module 301, by determining module
302 determine preset attribute set in the presence or absence of with the matched preset attribute information of the attribute information, if so, by memory module
303 are stored in photo in the corresponding collection of photographs of preset attribute information, and according to the corresponding classifying rules of collection of photographs, control
Photo in piece set is classified;Device provided in an embodiment of the present invention to increase in existing terminal according to photo
Attribute information carries out the function of classification storage to photo, enriches the classification storage mode of photo, can solve in the prior art
The technical issues of mode classification of photo is more single, is unfavorable for user management and searches photo, effectively improves photo classification pipe
The efficiency of reason.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made
It is realized for same or several entities, the specific implementation of the above modules can be found in the embodiment of the method for front, herein not
It repeats again.
It should be noted that those of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or
Part steps are relevant hardware can be instructed to complete by program, which can store in computer-readable storage medium
It in matter, is such as stored in the memory of terminal, and is executed by least one processor in the terminal, can be wrapped in the process of implementation
Include the process of the embodiment such as information issuing method.Wherein, storage medium may include: read-only memory (ROM, Read Only
Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
A kind of photo management method provided in an embodiment of the present invention and device are described in detail above, each function
Module can integrate in a processing chip, is also possible to modules and physically exists alone, can also two or two with
Upper module is integrated in a module.Above-mentioned integrated module both can take the form of hardware realization, can also use software
The form of functional module is realized.It is used herein that a specific example illustrates the principle and implementation of the invention, with
The explanation of upper embodiment is merely used to help understand method and its core concept of the invention;Meanwhile for the technology of this field
Personnel, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion this theory
Bright book content should not be construed as limiting the invention.