Photo storage and viewing method and device of mobile terminal and storage mediumTechnical Field
The invention relates to the technical field of mobile terminals, in particular to a method, a device and a storage medium for storing and viewing photos of a mobile terminal.
Background
With the popularization of mobile terminals such as mobile phones, more and more users often record life by using the photographing function of the mobile phone, and the photographing function of the mobile phone also becomes one of the most frequently used functions of the users.
However, as more and more photos are available in the mobile phone, it is a headache to manage and view the past photos. Nowadays, most mobile phones classify photos by time or by file format (photo or video). Obviously, the classification method is too rough, when a user wants to search a certain photo, if the photographing time is not clear, the user almost needs to browse the whole photo album one by one, and the method is not only tedious and delays time.
Disclosure of Invention
In order to at least partially solve the problems in the prior art, embodiments of the present invention are directed to a method, an apparatus, and a storage medium for storing and viewing photos of a mobile terminal.
According to a first aspect, an embodiment provides a photo storage method of a mobile terminal, including:
receiving a user-defined tag setting instruction of a user for one or more photos, wherein the user-defined tag setting instruction comprises: a user-defined label set by a user;
and adding the user-defined label set by the user to the corresponding photo, and storing the photo according to the user-defined label set by the user.
In the above scheme, the method further comprises:
adding a time tag and/or a place tag to the photo;
and storing the photos according to the time labels and/or the place labels set by the user.
In the above scheme, the storing the photo according to the user-defined tag set by the user includes:
acquiring a storage path of the photo;
generating a first mapping table between the user-defined label and the storage path of the photo so as to search for the picture corresponding to the photo label according to the first mapping table;
the storing of the photo according to the time tag and/or the place tag set by the user comprises the following steps:
acquiring a storage path of the photo;
respectively generating a second mapping table between the time labels and/or the place labels and the storage paths of the photos so as to search the pictures corresponding to the time labels and/or the place labels according to the second mapping table
In the above scheme, the method further comprises:
receiving a user-defined tag modification instruction of a user for one or more photos, wherein the user-defined tag modification instruction comprises the following steps: a user-defined tag modified by a user;
and modifying the custom tag of the one or more photos according to the custom tag modified by the user.
According to a second aspect, an embodiment provides a photo viewing method of a mobile terminal, the method including:
receiving a custom tag input by a user on a photo search interface, wherein the input custom tag is a custom tag input by the user by clicking a corresponding tag option in a custom tag list, or a custom tag input by the user in a search bar through characters;
and searching all the photos added with the custom tag according to the custom tag and returning the photos to the user.
In the above scheme, the method further comprises:
receiving a time-based classification instruction or a place-based classification instruction sent by a user on a browsing interface aiming at all searched photos;
classifying all photos into a plurality of photo sets according to the time-based classification instruction or the place-based classification instruction.
In the foregoing solution, after classifying all the photos according to the time-based classification instruction or the location-based classification instruction, the method further includes:
receiving a location-based classification instruction sent by a user on a browsing interface of any photo set obtained by time classification; classifying the photos in the photo set according to the place classification instruction; or,
receiving a time classification instruction sent by a user on a browsing interface of any photo set obtained by classifying according to places; and classifying the photos in the photo set according to the time classification instruction.
According to a third aspect, there is provided in one embodiment a photo storage device, the device comprising: the device comprises a first receiving module, an adding module and a storage module; wherein,
the first receiving module is configured to receive a user-defined tag setting instruction of a user for one or more photos, where the user-defined tag setting instruction includes: a user-defined label set by a user;
the adding module is used for adding the custom tag set by the user to the corresponding photo;
and the storage module is used for storing the photo according to a user-defined label set by a user.
According to a fourth aspect, there is provided in an embodiment a photo viewing apparatus, the apparatus comprising: the second receiving module and the searching module; wherein,
the second receiving module is used for receiving a user-defined label input by a user on the photo searching interface, wherein the input user-defined label is a user-defined label input by clicking a corresponding label option in a user-defined label list, or a user-defined label input by a user in a search bar through characters;
and the searching module is used for searching all the photos added with the custom tags according to the photo tags and returning the photos to the user.
According to a fifth aspect, an embodiment provides a computer-readable storage medium comprising a program for execution by a processor to implement the method according to the first aspect.
According to a sixth aspect, an embodiment provides a computer readable storage medium comprising a program for execution by a processor to implement the method according to the second aspect.
Compared with the prior art, the embodiment of the invention at least has the following advantages:
according to the photo storage method of the mobile terminal provided by the embodiment of the invention, a user-defined tag setting instruction for one or more photos is received, wherein the user-defined tag setting instruction comprises the following steps: a user-defined label set by a user; and adding the user-defined label set by the user to the corresponding photo, and storing the photo according to the user-defined label set by the user. Based on the method, the user can set the label for the photo according to the self requirement, and the mobile terminal stores the photo according to the set label, so that the user can search according to the label when searching the photo, and the searching step of the photo is simplified.
Drawings
FIG. 1 is a flow chart of a photo storage method of a mobile terminal according to an embodiment of the invention;
FIG. 2 is a flow chart of a photo viewing method of a mobile terminal in one embodiment of the invention;
FIG. 3 is a primary block diagram of a photo storage device in accordance with one embodiment of the present invention;
FIG. 4 is a primary block diagram of a photo lookup apparatus in one embodiment of the invention;
FIG. 5 is a diagram showing a basic structure of a photo search device according to a second embodiment of the present invention;
FIG. 6 is a flowchart of a photo viewing method of a mobile terminal according to an exemplary embodiment of the present invention;
FIG. 7 is a first schematic view of an application interface of the photo viewing method of the mobile terminal in an application example according to the present invention;
FIG. 8 is a schematic diagram of an application interface of the photo viewing method of the mobile terminal in various application examples;
fig. 9 is a third schematic application interface diagram of the photo viewing method of the mobile terminal in an application example.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. Wherein like elements in different embodiments are numbered with like associated elements. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted or replaced with other elements, materials, methods in different instances. In some instances, certain operations related to the present application have not been shown or described in detail in order to avoid obscuring the core of the present application from excessive description, and it is not necessary for those skilled in the art to describe these operations in detail, so that they may be fully understood from the description in the specification and the general knowledge in the art.
Furthermore, the features, operations, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. Also, the various steps or actions in the method descriptions may be transposed or transposed in order, as will be apparent to one of ordinary skill in the art. Thus, the various sequences in the specification and drawings are for the purpose of describing certain embodiments only and are not intended to imply a required sequence unless otherwise indicated where such sequence must be followed.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning. The term "connected" and "coupled" when used in this application, unless otherwise indicated, includes both direct and indirect connections (couplings).
Example one
Referring to fig. 1, a flowchart illustrating steps of a photo storage method according to the present invention may specifically include:
step 101, receiving a user-defined tag setting instruction of a user for one or more photos, wherein the user-defined tag setting instruction comprises: a user-defined label set by a user;
the photo storage method provided by the embodiment of the invention is applied to the mobile terminal, and the mobile terminal can be any mobile phone, tablet computer, personal digital assistant or wearable device and the like with a photographing function and/or an album function.
In this step, the mobile terminal may generate a setting interface prompting the user to set a custom tag when the user opens the photographing function or after the photographing is completed, where a list of user predefined tags (i.e., custom tags set by the user) is provided on the setting interface, and the user may directly select a suitable custom tag from the list, or may input a newly defined tag.
The specific processing flow for setting the custom tag when the user opens the photographing function is as follows:
s01, receiving a photographing instruction of a user, and generating a setting interface for prompting the user to set a custom label in a photographing interface;
specifically, the receiving of the custom tag set by the user includes:
receiving a label selected from predefined labels on a setting interface by a user; alternatively, a newly defined tag newly input by the user is received.
The receiving of the newly defined tag input by the user comprises: and receiving a newly defined label input by a user through words or voice.
In this step, when the user performs the photographing function through the photographing shortcut key on the mobile terminal or the icon set on the desktop, the mobile terminal receives the photographing instruction, at this time, the user enters the photographing interface and generates a setting interface on the interface, and the user of the interface prompts the user to set the custom label.
On the setting interface, the user can select from the preset predefined tags or input the newly defined tags again according to the requirement, and the name of the newly defined tag can be input by words or voice in the input process of the user.
S02, receiving a user-defined label set by a user and starting to take a picture;
and when the user finishes setting the self-defined label, the mobile terminal starts to take a picture.
And S03, after the picture is taken, adding the user-defined label set by the user to the shot picture, and storing the picture according to the user-defined label set by the user.
In an alternative embodiment of the invention, the method further comprises:
adding a time tag and a place tag to the photo;
and storing the photos according to the time labels and the place labels set by the user.
And 103, adding the user-defined label set by the user to the corresponding photo, and storing the photo according to the user-defined label set by the user.
In an alternative embodiment of the invention, the method further comprises:
adding a time tag and/or a place tag to the photo;
and storing the photos according to the time labels and/or the place labels set by the user.
Either the user-defined tag or the time tag and the place tag are added to the photo file as attributes of the photo.
After the tags (including the custom tag, the time tag, and the place tag) are added, the photos are stored according to the added tags.
Specifically, the storing of the photo according to the user-defined tag set by the user includes:
acquiring a storage path of the photo;
and generating a first mapping table between the custom label and the storage path of the photo so as to search the picture corresponding to the custom label according to the first mapping table.
Specifically, the storing the photo according to the time tag and the location tag set by the user includes:
acquiring a storage path of the photo;
and respectively generating a second mapping table between the time label and the storage path of the place label and the storage path of the photo, so as to search the picture corresponding to the time label and/or the place label according to the second mapping table.
According to the scheme, the photos added with the tags (including the custom tag, the time tag and the place tag) can be stored in any position of the mobile terminal, but a mapping table between the tags and a photo storage path is generated in the storage process, so that when a user searches for the photos through the tags, all the photos corresponding to the corresponding tags can be found by querying the mapping table.
Of course, in practical applications, the user may set a custom tag for the photo when viewing the photo in the album. Or after setting a custom tag for a photo, adding a new custom tag for the photo, where usually one photo can be set with multiple custom tags; or modifying the set custom tag. Thus, the method further comprises: receiving a user-defined tag modification instruction of a user for one or more photos, wherein the user-defined tag modification instruction comprises the following steps: a user-defined tag modified by a user; and modifying the custom tag of the one or more photos according to the custom tag modified by the user.
To sum up, a photo storage method provided in an embodiment of the present invention receives a user-defined tag setting instruction for one or more photos, where the user-defined tag setting instruction includes: a user-defined label set by a user; and adding the user-defined label set by the user to the corresponding photo, and storing the photo according to the user-defined label set by the user. Based on the method, the user can set the label for the photo according to the self requirement, and the mobile terminal stores the photo according to the set label, so that the user can search according to the label when searching the photo, and the searching step of the photo is simplified.
Example two
Referring to fig. 2, a flowchart illustrating steps of a photo viewing method according to the present invention may specifically include:
step 201, receiving a user-defined label input by a user on a photo searching interface;
the photo storage method provided by the second embodiment of the invention is applied to the mobile terminal, and the mobile terminal can be any mobile phone, tablet computer, personal digital assistant or wearable device and the like with a photographing function and/or an album function.
Specifically, the input custom tag is input by a user by clicking a corresponding tag option in a tag list, or is input by the user in a search bar through characters.
Here, when a user enters a gallery on the mobile terminal to view pictures, the user can see a plurality of self-defined tags, and the user can click any one tag to enter a picture browsing interface under the tag as required; or, the user directly enters the picture browsing interface of the corresponding label through the character input of the name of the label to be searched in the search bar.
Step 202, according to the custom tag, finding out all photos added with the custom tag and returning the photos to the user.
The mobile terminal finds out storage paths of all photos added with the custom labels in a mapping table corresponding to the corresponding custom labels according to the custom labels input by the user, finds out all photos according to the corresponding storage paths, and then returns the found photos to the user.
In an optional implementation manner of the present invention, after the mobile terminal returns all photos corresponding to the custom tag to the user according to the custom tag input by the user, options of sorting by location or sorting by time may be provided on the photo browsing interface.
After receiving a time-based classification instruction or a place-based classification instruction sent by a user on a browsing interface aiming at all searched photos; and the mobile terminal classifies all the photos into a plurality of photo sets according to the time classification instruction or the place classification instruction.
Further, after classifying all the photos according to the time classification instruction or the place classification instruction, the mobile terminal provides a place classification option on a browsing interface of any photo set obtained by time classification, and after receiving a place classification instruction sent by a user, classifies the photos in the photo set according to the place classification instruction; or,
on a browsing interface of any photo set obtained by location classification, the mobile terminal provides a time-based classification option, and after receiving a time-based classification instruction sent by a user, the photos in the photo set are classified according to the time-based classification instruction.
The photos can be searched in multiple latitudes based on the scheme, namely, the photos are firstly classified according to the custom tags, the photos corresponding to the custom tags can be classified according to the time tags or the place tags, and further, the tags obtained after the photos are classified according to the time tags can be classified according to the places; similarly, the labels obtained after the labels are classified according to the place labels can be classified according to time, so that the multi-latitude classification of the photos is realized, the user can be helped to realize multi-latitude fine search when searching the photos, and the photo searching efficiency of the user is greatly improved.
EXAMPLE III
Referring to fig. 3, a block diagram of a photo storage device according to an embodiment of the present invention is shown, the device including: a first receiving module 31, an adding module 32 and a storage module 33; wherein,
the first receiving module 31 is configured to receive a user-defined tag setting instruction for one or more photos, where the user-defined tag setting instruction includes: a user-defined label set by a user;
the adding module 32 is configured to add the custom tag set by the user to the corresponding photo;
the storage module 33 is configured to store the photo according to a custom tag set by a user.
Specifically, the first receiving module 31 is configured to receive a label selected by a user from predefined labels on a setting interface; alternatively, a newly defined tag entered by the user through text is received.
More specifically, the first receiving module 31 is configured to receive a newly defined tag input by a user through text or voice.
In an optional embodiment of the present invention, the adding module 32 is further configured to add a time tag and/or a location tag to the photo;
the storage module 33 is further configured to store the photos according to the time tags and/or the location tags set by the user.
Specifically, the storage module 33 is configured to obtain a storage path of a photo, and generate a first mapping table between the custom tag and the storage path of the photo, so as to search for a picture corresponding to the custom tag according to the first mapping table; and the image processing device is further used for respectively generating a second mapping table between the time labels and/or the place labels and the storage paths of the photos so as to search the pictures corresponding to the time labels and/or the place labels according to the second mapping table.
In a specific implementation process, the first receiving module 31, the adding module 32, and the storage module 33 may be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), or a Programmable logic Array (FPGA) in the mobile terminal.
Example four
Referring to fig. 4, a block diagram of a photo viewing apparatus according to an embodiment of the present invention is shown, the apparatus including: a second receiving module 41 and a searching module 42; wherein,
the second receiving module 41 is configured to receive a custom tag input by a user on the photo search interface, where the input custom tag is a custom tag input by the user by clicking a corresponding tag option in a custom tag list, or a custom tag input by the user through a text in a search bar;
and the searching module 42 is configured to search all the photos added with the custom tag according to the input custom tag, and return the photos to the user.
In an alternative embodiment of the invention, referring to fig. 5, the apparatus further comprises:
a third receiving module 43, configured to receive a time-based sorting instruction or a location-based sorting instruction sent by the user on the browsing interface for all found photos;
a classification module 44, configured to classify all the photos into a plurality of photo sets according to the time-based classification instruction or the location-based classification instruction.
In an optional implementation manner of the present invention, the third receiving module 43 is further configured to receive a sorting instruction by location sent by a user on a browsing interface of any one photo collection obtained by sorting according to time; the classification module is also used for classifying the photos in the photo set according to the location classification instruction; or,
the third receiving module 43 is further configured to receive a time classification instruction sent by a user on a browsing interface of any one photo collection obtained by classifying according to locations; the classification module is further configured to classify the photos in the photo set according to the time classification instruction.
In a specific implementation process, the second receiving module 41, the searching module 42, the third receiving module 43, and the classifying module 44 may be implemented by a CPU, an MPU, a DSP, or an FPGA in the mobile terminal.
EXAMPLE five
Fifth embodiment of the present invention provides a computer-readable storage medium, which includes a program for execution by a processor to implement the method according to first embodiment.
EXAMPLE six
An embodiment six of the present invention provides a computer-readable storage medium, which includes a program for execution by a processor to implement the method according to embodiment two.
Application example
FIG. 6 is a flowchart of an exemplary application of the photo viewing method of the present invention, as shown in FIG. 6, including the following steps:
601, inputting a custom tag on a photo searching interface by a user;
specifically, after the user opens the gallery, as shown in fig. 7, the gallery shows a plurality of custom tags, including: family, friends, travel, work, etc., with each custom tag corresponding to a collection of photos. The user may click directly on the custom tab to be viewed or enter the custom tab name of the collection of photos to be viewed in the search box.
Step 602, the mobile terminal finds out all photos added with the custom tag according to the photo tag and returns the photos to the user;
assuming that the custom tag input by the user is travel, the mobile terminal displays all photos added with the travel tag to the user.
603, the user receives a location-based classification instruction sent by the user on a browsing interface aiming at all searched photos;
specifically, the user may send a location-based classification instruction to the mobile terminal on a browsing interface of all photos with travel tags.
Step 604, classifying all photos into a plurality of photo sets according to the sorting instructions by places;
after receiving the instruction of classifying by location, the mobile terminal extracts all location tags in the photo and generates a tag display interface, as shown in fig. 8, which may include: the method comprises the following steps of adding a photo with a current label under each label, wherein the photo is added under each label.
605, receiving a time classification instruction sent by a user on a browsing interface of any photo set obtained by classifying according to places;
specifically, assuming that the user selects the place tag as shanghai, the user enters a browsing interface of photos with all the place tags as shanghai, and on the browsing interface, a time-based classification option is provided for the user to select.
And 606, classifying the photos in the photo set according to the time classification instruction.
When the user selects the sort by time option, all photos tagged as shanghai are sorted, and the sorted photos are schematically shown in fig. 9.
Those skilled in the art will appreciate that all or part of the functions of the various methods in the above embodiments may be implemented by hardware, or may be implemented by computer programs. When all or part of the functions of the above embodiments are implemented by a computer program, the program may be stored in a computer-readable storage medium, and the storage medium may include: a read only memory, a random access memory, a magnetic disk, an optical disk, a hard disk, etc., and the program is executed by a computer to realize the above functions. For example, the program may be stored in a memory of the device, and when the program in the memory is executed by the processor, all or part of the functions described above may be implemented. In addition, when all or part of the functions in the above embodiments are implemented by a computer program, the program may be stored in a storage medium such as a server, another computer, a magnetic disk, an optical disk, a flash disk, or a removable hard disk, and may be downloaded or copied to a memory of a local device, or may be version-updated in a system of the local device, and when the program in the memory is executed by a processor, all or part of the functions in the above embodiments may be implemented.
The present invention has been described in terms of specific examples, which are provided to aid understanding of the invention and are not intended to be limiting. For a person skilled in the art to which the invention pertains, several simple deductions, modifications or substitutions may be made according to the idea of the invention.