CN108897757B - Photo storage method, storage medium and server - Google Patents

Photo storage method, storage medium and server Download PDF

Info

Publication number
CN108897757B
CN108897757B CN201810456993.1A CN201810456993A CN108897757B CN 108897757 B CN108897757 B CN 108897757B CN 201810456993 A CN201810456993 A CN 201810456993A CN 108897757 B CN108897757 B CN 108897757B
Authority
CN
China
Prior art keywords
photo
value
preset
shooting
classification
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
CN201810456993.1A
Other languages
Chinese (zh)
Other versions
CN108897757A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810456993.1A priority Critical patent/CN108897757B/en
Priority to PCT/CN2018/097097 priority patent/WO2019218459A1/en
Publication of CN108897757A publication Critical patent/CN108897757A/en
Application granted granted Critical
Publication of CN108897757B publication Critical patent/CN108897757B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a photo storage method, a storage medium and a server, comprising the following steps: acquiring shooting attributes of a photo; calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight; searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value; and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder. According to the application, the photos are not required to be manually classified and stored by a user, so that the time of the user can be saved, and the photo storage efficiency is improved.

Description

Photo storage method, storage medium and server
Technical Field
The present application relates to the field of computer technologies, and in particular, to a photo storage method, a storage medium, and a server.
Background
Along with the development of technology, mobile terminals such as mobile phones and digital cameras with photographing function are lighter and thinner, and quality of photographed pictures is better. People often carry an intelligent terminal with a photographing function with them so as to take photos at any time.
However, the current intelligent terminals with photographing function generally store photographed photos according to photographing time, and some of the intelligent terminals can be classified according to APP from which the photos are derived, but cannot be automatically classified and stored according to information in the photos. When a user needs to screen out photos comprising the same photo information from a large number of photos, the photos can be searched and identified one by one only through manual operation, so that a large amount of manpower and time are wasted.
Disclosure of Invention
The embodiment of the application provides a photo storage method, a storage medium and a server, which are used for solving the problems that in the prior art, when a user needs to screen out photos comprising the same photo information from a large number of photos, the photos can be searched and identified one by one only through manual operation, so that a large amount of manpower and time are wasted.
A first aspect of an embodiment of the present application provides a photo storage method, including:
acquiring shooting attributes of a photo;
calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight;
searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value;
and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder.
A second aspect of an embodiment of the present application provides a server comprising a memory and a processor, the memory storing a computer program executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring shooting attributes of a photo;
calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight;
searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value;
and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder.
A third aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which when executed by a processor performs the steps of:
acquiring shooting attributes of a photo;
calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight;
searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value;
and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder.
According to the embodiment of the application, the classification attribution value of the photo is calculated according to the shooting attribute of the photo and the preset attribute weight, then the photo storage folder corresponding to the classification attribution value in the preset classification comparison table is searched, the photo is stored in the photo storage folder corresponding to the classification attribution value, if the photo storage folder corresponding to the classification attribution value cannot be searched, a storage path is automatically generated, the storage path corresponds to a new photo storage folder, the photo is stored in the new photo storage folder, and the photo can be classified and stored when shooting is completed, so that the user does not need to manually classify and store the photo, the time of the user is saved, and the photo storage efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a photo storage method according to an embodiment of the present application;
fig. 2 is a flowchart of a specific implementation of a photo storage method S102 according to an embodiment of the present application;
FIG. 3 is a flowchart of a specific implementation of a photo storage method B2 according to an embodiment of the present application;
fig. 4 is a flowchart of a specific implementation of a photo storage method S103 according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a photo storage method according to another embodiment of the present application;
FIG. 6 is a block diagram of a photo storage device according to an embodiment of the present application;
FIG. 7 is a block diagram of a photo storage device according to another embodiment of the present application;
fig. 8 is a schematic diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 shows an implementation flow of a photo storage method provided by an embodiment of the present application, where the method flow includes steps S101 to S104. The specific implementation principle of each step is as follows:
s101: and acquiring the shooting attribute of the photo.
Specifically, the photographing attributes include photographing time, photographing place, and photo type. The photo types comprise a character photo, a food photo, a landscape photo and a two-dimensional code.
In the embodiment of the application, the shooting attribute of the photo can be determined according to the user-defined tag for shooting the photo by using the intelligent terminal. For example, 10 points on 2018, 1 and 20, a self-timer facial shot is taken at home, wherein the shooting location can be defined by a user by customizing a location tag, such as defining a geographic location as a home, a work unit or a scenic spot. The user may take a picture at the same place at the same time of each day, for example, a two-dimensional code picture taken in a parking lot when going to work.
Optionally, the shooting location is determined by counting the location information of the intelligent terminal through big data, for example, a day is divided according to a working period and a rest period, for example, nine in the morning to six in the afternoon are working periods, ten in the evening to six in the morning are rest periods. The method comprises the steps of obtaining geographic positions of an intelligent terminal in preset workdays, accumulating total time of the same time period in the same geographic position, marking the place of the geographic position with the longest total time of the working time period as a working unit, and marking the place of the geographic position with the longest total time of the rest time period as a home.
Optionally, performing cluster analysis on the geographic position of the intelligent terminal in the preset workday. Specifically, geographical positions of all working time periods in a preset working day are stored in a working time set, a first designated number of geographical positions are randomly selected to be used as first clustering centers, distance values between each geographical position in the working time set and the first clustering centers are calculated, initial clustering is conducted on the geographical positions in the working time set according to the calculated distance values and the designated clustering centers, a second designated number of geographical positions are selected from the geographical positions after initial clustering to be used as second clustering centers, the geographical positions after initial clustering are clustered by using the second clustering centers as central clusters, and the like until the clustering centers in the working time set converge, and location labels of the clustering centers (geographical positions) of the working time set after convergence are defined to be used as working units. According to the same method as described above, the location label of the cluster center (geographical position) defining the converged working time set is home. The shooting location includes not only a work unit and a home, but also a parking lot, a school, and the like, and other shooting locations can be determined according to the above-described method.
Alternatively, for the photo type of the photo, it may be determined by inputting the photo into a trained convolutional neural network model. Specifically, the image characteristics of the photo are extracted, the extracted image characteristics of the photo are input to an input layer of a trained convolutional neural network model, and the photo type of the photo is output at an output layer. The trained convolutional neural network model is obtained according to the following steps:
a1: and obtaining a set number of sample photos, wherein the sample photos are provided with type labels in advance. Specifically, by acquiring a set number of sample photographs, the sample photographs are provided with labels such as scenery, figures, food, two-dimensional codes, and the like in advance.
A2: a convolutional neural network model is built that includes an input layer, a convolutional layer, a full-connection layer, and an output layer.
A3: and when training is performed for the first time, presetting a network connection weight and a threshold value among nodes of each layer of the convolutional neural network model to be random values meeting preset conditions, setting ideal output values of the sample photos, randomly selecting the sample photos from the sample photos with the set number, inputting the sample photos to an input layer, transmitting the sample photos to an output layer through a convolutional layer and a full connection layer, acquiring actual output values of the sample photos, completing one round of training, and calculating difference values of the actual output values and the ideal output values.
A4: according to the calculated difference value, the network connection weight and the threshold value between the nodes of each layer are adjusted according to a specified learning rule, and training is conducted on the convolutional neural network model again until training is completed when the calculated difference value is not greater than a preset threshold value, and the trained convolutional neural network model is obtained.
Specifically, a convolutional neural network model comprising an input layer, a convolutional layer, a full-connection layer and an output layer is established, training is divided into the following steps of randomly selecting samples from sample photos, inputting the samples into the convolutional neural network model, calculating output values of the sample photos, presetting network connection weights and threshold values among nodes of each layer of the convolutional neural network model to be small random values close to 0 when training is performed for the first time, setting ideal output values of the sample photos, transmitting the sample photos from the input layer to the output layer through the convolutional layer and the full-connection layer, acquiring actual output values of the sample photos, completing one round of training, and calculating differences between the actual output values and the ideal output values. In the embodiment of the application, the global difference D of the convolutional neural network is calculated according to the following formula:
wherein D is t Ideal output value I for the t-th sample photo t And the actual output value R t N is a positive integer and n is the total number of sample photographs to be trained. And adjusting the weight matrix according to a method for minimizing the error. Setting an error threshold, if D is larger than the threshold, adjusting the network connection weight and the threshold among nodes of each layer according to a Delta learning rule, then training the convolutional neural network model again until the network global error D is not larger than the threshold, ending training, and storing the trained weight and threshold as optimal model parameters of the convolutional neural network to obtain a trained convolutional neural network model. Wherein, the learning signal of the Delta learning rule is specified as: r= (dj-f (wTjx)) f '(wTjx) = (dj-oj)) f' (netj).
In the embodiment of the application, the set number of sample photos are input into the convolutional neural network model for training, and the optimal model parameters of the neural network model are determined, so that the trained convolutional neural network model is obtained, and the photo types of the photos can be quickly obtained by inputting the shot photos into the trained convolutional neural network model, so that the efficiency of classifying and storing the photos is improved.
S102: and calculating the classification attribution value of the photo according to the shooting attribute of the photo and the preset attribute weight.
Specifically, each shooting attribute corresponds to a preset attribute weight, for example, a shooting location corresponds to a preset location weight, a shooting time corresponds to a preset time weight, and a photo type corresponds to a preset type weight. And calculating the classification attribute value of the photo according to the shooting attribute of the photo and the preset attribute weight, so that the shooting attribute of the photo is quantized, and the photo is conveniently stored in a classified mode.
As an embodiment of the present application, as shown in fig. 2, the S102 specifically includes:
b1: and establishing a three-dimensional coordinate system.
B2: and mapping the shooting time, the shooting place and the photo type of the photo into the three-dimensional coordinate system according to the attribute weight corresponding to the shooting attribute, and determining the three-dimensional coordinate of the photo in the three-dimensional coordinate system. Specifically, the shooting attribute of the photo is mapped to a point in the three-dimensional coordinate system.
B3: and calculating a distance value between a point corresponding to the three-dimensional coordinates of the photo and the origin of the three-dimensional coordinate system, and taking the distance value as a classification attribution value of the photo.
According to the embodiment of the application, the photo is mapped into one point in the three-dimensional coordinate system, the distance value from the point corresponding to the three-dimensional coordinate system to the origin of the photo is used as the classification attribution value of the photo, and the shooting attribute of the photo is quantized so as to be classified and stored according to the classification attribution value.
As an embodiment of the present application, fig. 3 shows a specific implementation flow of step B2 of the photo storage method provided by the embodiment of the present application, which is described in detail below:
b21: a mapping table is pre-established, wherein the mapping table comprises values corresponding to different shooting times, values corresponding to different shooting places and values corresponding to different photo types. Specifically, the shooting time is divided according to shooting dates or shooting moments, and if the shooting time is divided according to shooting dates in the mapping table, the numerical value corresponding to the shooting dates is gradually increased day by day according to the appointed difference value; if the shooting time is divided according to the shooting time, dividing the shooting time into a plurality of time periods, and gradually increasing the numerical value corresponding to the time periods according to the appointed difference value. If the photographing time period is, for example, 5 in ten am, and 8 in three pm. For shooting places, longitude and latitude of different shooting places are different, and in the mapping table, numerical values corresponding to different longitude and latitude are included in the mapping table. The shooting type is determined by predetermining the photo type determined through big data statistical analysis, and different values are set for different photo types, for example, the figure is 10, and the landscape is 20.
B22: and searching the corresponding numerical values of the shooting time, the shooting place and the photo type of the photo from the mapping table.
B23: and determining the three-dimensional coordinates of the photo in the three-dimensional coordinate system according to the corresponding numerical values and the attribute weights of the shooting time, the shooting place and the photo type of the photo. Specifically, a product of a value corresponding to the shooting time of the photo and a preset time weight is taken as a value on a first coordinate axis in the three-dimensional coordinate system, a product of a value corresponding to the shooting place of the photo and a preset place weight is taken as a value on a second coordinate axis in the three-dimensional coordinate system, and a product of a value corresponding to the photo type of the photo and a preset type weight is taken as a value on a third coordinate axis in the three-dimensional coordinate system, so that the three-dimensional coordinate of the photo in the three-dimensional coordinate system is obtained.
S103: searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value.
In the embodiment of the present application, the preset classification comparison table includes a correspondence between a classification attribution value and a preset numerical value corresponding to a photo storage folder.
Specifically, fig. 4 shows a specific implementation flow of the photo storage method S103 provided by the embodiment of the present application, which is described in detail below:
c1: and acquiring a preset numerical value corresponding to each photo storage folder from the preset classification comparison table. Specifically, the preset value corresponding to the photo storage folder may be determined according to the classification attribute value stored in the first photo.
C2: and comparing the classification attribution value of the photo with the obtained preset value one by one, and determining the preset value with the smallest absolute value of the difference value of the classification attribution value of the photo.
And C3: if the absolute value of the difference between the determined preset value and the classification attribution value of the photo is located in a preset difference interval, the determined preset value is judged to be matched with the classification attribution value of the photo. Of course, if the absolute value of the difference between the preset numerical value and the classification attribution value of the photo is not within the preset difference interval, the determined preset numerical value is not matched with the classification attribution value of the photo.
And C4: and storing the photos into the photo storage folders corresponding to the determined preset values. Specifically, the photo is stored in a photo storage folder corresponding to a preset numerical value matched with the classification attribution value of the photo.
S104: and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder.
Specifically, defining the difference between the preset numerical value and the classification attribution value of the photo as E, when E is less than or equal to eta, storing the photo into a photo storage folder corresponding to the preset numerical value, when E is more than eta, namely, when the absolute value of the difference between the preset classification attribution value of the photo and the classification attribution value of the photo is not in the preset numerical value in a preset difference interval in the preset classification comparison table, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and the folder is the storage path of a file only when the folder is the storage path of the file, namely, by automatically generating a storage path, a photo storage folder is newly built, and the photo is stored into a newly-built folder. If the photo storage folder corresponding to the classification attribution value is not found, a storage path is automatically generated to be different from the storage path corresponding to the existing photo storage folder. Further, the classification attribution value of the photo is used as a preset numerical value of the photo storage file.
Optionally, for photos of the person type, the photos are further classified according to the area value of the face in the photo, for example, further subdivided into self-shots. Specifically, face recognition is performed on the photo, the area value of the recognized face is calculated, the area proportion of the area value of the face in the photo is determined, and if the area proportion is larger than a preset area proportion threshold, the photo is further stored in a self-photographing folder, so that a user can rapidly process the self-photographing.
Optionally, for the photos in the same photo storage folder, the similarity of the photos can be calculated, a subfolder of the photo storage folder is built according to the similarity of the photos, and the photos with the similarity greater than a preset similarity threshold are stored in the same subfolder. For example, calculating the similarity of photos to determine whether the photos are the same facial photos, if so, creating a subfolder in the photo storage folder, and storing the photos of the same facial photos in the subfolder.
According to the embodiment of the application, the classification attribution value of the photo is calculated according to the shooting attribute of the photo and the preset attribute weight, then the photo storage folder corresponding to the classification attribution value in the preset classification comparison table is searched, the photo is stored in the photo storage folder corresponding to the classification attribution value, if the photo storage folder corresponding to the classification attribution value cannot be searched, a storage path is automatically generated, the storage path corresponds to a new photo storage folder, the photo is stored in the new photo storage folder, and the photo can be classified and stored when shooting is completed, so that the user does not need to manually classify and store the photo, the time of the user is saved, and the photo storage efficiency is improved.
Further, another embodiment of the present application is proposed based on the photo storage method provided in the embodiment of fig. 1 described above. In an embodiment of the present application, on the basis of steps S101 to S104 shown in fig. 1, as shown in fig. 5, the photo storage method further includes:
s201: and acquiring the shooting attribute of the photo.
S202: and calculating the classification attribution value of the photo according to the shooting attribute of the photo and the preset attribute weight.
S203: searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value.
S204: and if the photo storage folder corresponding to the classification attribution value is not found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder.
In this embodiment, the specific steps from step S201 to step S204 are referred to steps S101 to S104 in the foregoing embodiment, and are not described herein.
S205: and arranging the photos stored in the same photo storage folder according to a time line stored in the photo storage folder.
S206: and taking the latest photo stored in the folder as the cover of the photo storage folder according to the time line stored in the photo storage folder.
Specifically, the priority of the shooting time is higher than that of the photo type, the priority of the photo type is higher than that of the shooting place, the photos in the same photo storage folder are arranged according to the stored time line, when the photo storage folder stores the photos newly, the photos stored newly replace the covers of the photo storage folder to become the new covers of the photo storage folder, the effect that the covers of the photo storage folder are updated dynamically according to the shooting of the stored photos is achieved, the user can quickly and clearly store the photo types in the folder without opening the folder, and user experience is improved.
According to the embodiment of the application, the classification attribution value of the photo is calculated according to the shooting attribute of the photo and the preset attribute weight, then the photo storage folder corresponding to the classification attribution value in the preset classification comparison table is searched, the photo is stored in the photo storage folder corresponding to the classification attribution value, if the photo storage folder corresponding to the classification attribution value is not searched, a storage path is automatically generated, the storage path corresponds to a new photo storage folder, the photo is stored in the new photo storage folder, the photo can be classified and stored by a user without manually classifying and storing the photo when shooting is completed, the time of the user is saved, the efficiency of storing the photo is improved, meanwhile, the photo stored in the same photo storage folder is arranged according to the time line stored in the photo storage folder, the photo stored in the latest photo storage folder is used as the cover of the photo storage folder according to the time line stored in the photo storage folder, the photo storage folder is dynamically updated, the user can store the photo in the new photo storage folder without opening the folder, and the user experience of the photo storage folder can be quickly and clearly improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the photo storage method described in the above embodiments, fig. 6 shows a block diagram of a photo storage device according to an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
Referring to fig. 6, the photo storage device includes: an attribute obtaining unit 61, a home value calculating unit 62, a first storage unit 63, a second storage unit 64, wherein:
an attribute acquisition unit 61 for acquiring a shooting attribute of a photograph;
a attribution value calculating unit 62, configured to calculate a classification attribution value of the photo according to a shooting attribute of the photo and a preset attribute weight;
a first storage unit 63, configured to search a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and store the photo in the photo storage folder corresponding to the classification attribution value;
and the second storage unit 64 is configured to automatically generate a storage path if the photo storage folder corresponding to the classification attribute value is not found, where the storage path corresponds to a new photo storage folder, and store the photo in the new photo storage folder.
Optionally, the home value calculating unit 62 includes:
the coordinate system establishment module is used for establishing a three-dimensional coordinate system;
the coordinate determining module is used for mapping the shooting time, the shooting place and the photo type of the photo into the three-dimensional coordinate system according to the attribute weight corresponding to the shooting attribute, and determining the three-dimensional coordinate of the photo in the three-dimensional coordinate system;
and the attribution value determining module is used for calculating the distance value between the point corresponding to the three-dimensional coordinate of the photo and the origin of the three-dimensional coordinate system, and taking the distance value as the classification attribution value of the photo.
Optionally, the coordinate determination module includes:
the system comprises a preset submodule, a mapping table and a control module, wherein the preset submodule is used for presetting a mapping table, and the mapping table comprises numerical values corresponding to different shooting times, numerical values corresponding to different shooting places and numerical values corresponding to different photo types;
the numerical value searching sub-module is used for searching numerical values corresponding to the shooting time, the shooting place and the photo type of the photo from the mapping table;
and the coordinate determination submodule is used for determining the three-dimensional coordinate of the photo in the three-dimensional coordinate system according to the corresponding numerical value and the attribute weight of the shooting time, the shooting place and the photo type of the photo.
Optionally, the first storage unit 63 includes:
the first searching module is used for acquiring a preset numerical value corresponding to each photo storage folder from the preset classification comparison table;
the numerical value comparison module is used for comparing the classification attribution value of the photo with the obtained preset numerical value one by one, and determining the preset numerical value with the smallest difference absolute value with the classification attribution value of the photo;
the judging module is used for judging that the determined preset numerical value is matched with the classification attribution value of the photo if the absolute value of the difference between the determined preset numerical value and the classification attribution value of the photo is located in a preset difference interval;
and the storage module is used for storing the photos into the photo storage folders corresponding to the determined preset values.
Alternatively, the attribute obtaining unit 61 includes:
the feature extraction module is used for extracting image features of the photo;
the type output module is used for inputting the extracted image characteristics into the trained convolutional neural network model and outputting the photo type of the photo;
the trained convolutional neural network model is obtained according to the following steps:
obtaining a set number of sample photos, wherein the sample photos are provided with type labels in advance;
establishing a convolutional neural network model comprising an input layer, a convolutional layer, a full-connection layer and an output layer;
when training is performed for the first time, presetting a network connection weight and a threshold value among nodes of each layer of the convolutional neural network model to be random values meeting preset conditions, setting ideal output values of the sample photos, randomly selecting the sample photos from the sample photos with the set number, inputting the sample photos to an input layer, transmitting the sample photos to an output layer through a convolutional layer and a full connection layer, acquiring actual output values of the sample photos, completing one round of training, and calculating difference values of the actual output values and the ideal output values;
according to the calculated difference value, the network connection weight and the threshold value between the nodes of each layer are adjusted according to a specified learning rule, and training is conducted on the convolutional neural network model again until training is completed when the calculated difference value is not greater than a preset threshold value, and the trained convolutional neural network model is obtained.
Optionally, as shown in fig. 7, the photo storage device further includes:
a photo arrangement unit 71 for arranging photos stored in the same photo storage folder in a time line stored in the photo storage folder;
the cover determining unit 72 is configured to take, as the cover of the photo storage folder, the photo stored in the photo storage folder latest according to the timeline stored in the photo storage folder.
According to the embodiment of the application, the classification attribution value of the photo is calculated according to the shooting attribute of the photo and the preset attribute weight, then the photo storage folder corresponding to the classification attribution value in the preset classification comparison table is searched, the photo is stored in the photo storage folder corresponding to the classification attribution value, if the photo storage folder corresponding to the classification attribution value cannot be searched, a storage path is automatically generated, the storage path corresponds to a new photo storage folder, the photo is stored in the new photo storage folder, and the photo can be classified and stored when shooting is completed, so that the user does not need to manually classify and store the photo, the time of the user is saved, and the photo storage efficiency is improved.
Fig. 8 is a schematic diagram of a server according to an embodiment of the present application. As shown in fig. 8, the server 8 of this embodiment includes: a processor 80, a memory 81 and a computer program 82, such as a photo storage program, stored in the memory 81 and executable on the processor 80. The processor 80, when executing the computer program 82, implements the steps of the various photo storage method embodiments described above, such as steps 101 through 104 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 61 to 64 shown in fig. 6.
By way of example, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program 82 in the server 8.
The server 8 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The server may include, but is not limited to, a processor 80, a memory 81. It will be appreciated by those skilled in the art that fig. 8 is merely an example of the server 8 and is not limiting of the server 8, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the server may also include input and output devices, network access devices, buses, etc.
The processor 80 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the server 8, such as a hard disk or a memory of the server 8. The memory 81 may be an external storage device of the server 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the server 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the server 8. The memory 81 is used for storing the computer program and other programs and data required by the server. The memory 81 may also be used to temporarily store data that has been output or is to be output.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (8)

1. A photo storage method, comprising:
acquiring shooting attributes of a photo;
calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight, wherein each shooting attribute corresponds to one preset attribute weight;
searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value;
if the photo storage folder corresponding to the classification attribution value cannot be found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder;
the shooting attribute comprises shooting time, shooting place and photo type, and the calculating of the classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight comprises the following steps:
establishing a three-dimensional coordinate system;
mapping the shooting time, shooting place and photo type of the photo into the three-dimensional coordinate system according to the attribute weight corresponding to the shooting attribute, and determining the three-dimensional coordinate of the photo in the three-dimensional coordinate system;
and calculating a distance value between a point corresponding to the three-dimensional coordinates of the photo and the origin of the three-dimensional coordinate system, and taking the distance value as a classification attribution value of the photo.
2. The method according to claim 1, wherein the mapping the shooting time, the shooting place and the type of the photo into the three-dimensional coordinate system according to the attribute weight corresponding to the shooting attribute, and determining the three-dimensional coordinates of the photo in the three-dimensional coordinate system comprises:
a mapping table is established in advance, wherein the mapping table comprises numerical values corresponding to different shooting times, numerical values corresponding to different shooting places and numerical values corresponding to different photo types;
searching values corresponding to the shooting time, the shooting place and the photo type of the photo from the mapping table;
and determining the three-dimensional coordinates of the photo in the three-dimensional coordinate system according to the corresponding numerical values and the attribute weights of the shooting time, the shooting place and the photo type of the photo.
3. The method for storing photos according to claim 1, wherein searching a photo storage folder corresponding to the classification attribution value in the preset classification comparison table, and storing the photos into the photo storage folder corresponding to the classification attribution value, comprises:
acquiring a preset numerical value corresponding to each photo storage folder from the preset classification comparison table;
comparing the classification attribution value of the photo with the obtained preset value one by one, and determining the preset value with the smallest difference absolute value of the classification attribution value of the photo;
if the absolute value of the difference between the determined preset value and the classification attribution value of the photo is located in a preset difference interval, judging that the determined preset value is matched with the classification attribution value of the photo;
and storing the photos into the photo storage folders corresponding to the determined preset values.
4. The method according to claim 1, wherein the photographing attribute includes a photograph type, and the acquiring the photographing attribute of the photograph includes:
extracting image features of the photo;
inputting the extracted image features into a trained convolutional neural network model, and outputting the photo type of the photo;
the trained convolutional neural network model is obtained according to the following steps:
obtaining a set number of sample photos, wherein the sample photos are provided with type labels in advance;
establishing a convolutional neural network model comprising an input layer, a convolutional layer, a full-connection layer and an output layer;
when training is performed for the first time, presetting a network connection weight and a threshold value among nodes of each layer of the convolutional neural network model to be random values meeting preset conditions, setting ideal output values of the sample photos, randomly selecting the sample photos from the sample photos with the set number, inputting the sample photos to an input layer, transmitting the sample photos to an output layer through a convolutional layer and a full connection layer, acquiring actual output values of the sample photos, completing one round of training, and calculating difference values of the actual output values and the ideal output values;
according to the calculated difference value, the network connection weight and the threshold value between the nodes of each layer are adjusted according to a specified learning rule, and training is conducted on the convolutional neural network model again until training is completed when the calculated difference value is not greater than a preset threshold value, and the trained convolutional neural network model is obtained.
5. The photo storage method according to any one of claims 1 to 4, further comprising:
arranging photos stored in the same photo storage folder according to a time line stored in the photo storage folder;
and taking the latest photo stored in the folder as the cover of the photo storage folder according to the time line stored in the photo storage folder.
6. A computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the photo storage method of any one of claims 1 to 5.
7. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor when executing the computer program performs the steps of:
acquiring shooting attributes of a photo;
calculating a classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight, wherein each shooting attribute corresponds to one preset attribute weight;
searching a photo storage folder corresponding to the classification attribution value in a preset classification comparison table, and storing the photo into the photo storage folder corresponding to the classification attribution value;
if the photo storage folder corresponding to the classification attribution value cannot be found, automatically generating a storage path, wherein the storage path corresponds to a new photo storage folder, and storing the photo into the new photo storage folder;
the shooting attribute comprises shooting time, shooting place and photo type, and the calculating of the classification attribution value of the photo according to the shooting attribute of the photo and preset attribute weight comprises the following steps:
establishing a three-dimensional coordinate system;
mapping the shooting time, shooting place and photo type of the photo into the three-dimensional coordinate system according to the attribute weight corresponding to the shooting attribute, and determining the three-dimensional coordinate of the photo in the three-dimensional coordinate system;
and calculating a distance value between a point corresponding to the three-dimensional coordinates of the photo and the origin of the three-dimensional coordinate system, and taking the distance value as a classification attribution value of the photo.
8. The server according to claim 7, wherein searching a photo storage folder corresponding to the classification attribution value in the preset classification comparison table, and storing the photo in the photo storage folder corresponding to the classification attribution value, comprises:
acquiring a preset numerical value corresponding to each photo storage folder from the preset classification comparison table;
comparing the classification attribution value of the photo with the obtained preset value one by one, and determining the preset value with the smallest difference absolute value of the classification attribution value of the photo;
if the absolute value of the difference between the determined preset value and the classification attribution value of the photo is located in a preset difference interval, judging that the determined preset value is matched with the classification attribution value of the photo;
and storing the photos into the photo storage folders corresponding to the determined preset values.
CN201810456993.1A 2018-05-14 2018-05-14 Photo storage method, storage medium and server Active CN108897757B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810456993.1A CN108897757B (en) 2018-05-14 2018-05-14 Photo storage method, storage medium and server
PCT/CN2018/097097 WO2019218459A1 (en) 2018-05-14 2018-07-25 Photo storage method, storage medium, server, and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810456993.1A CN108897757B (en) 2018-05-14 2018-05-14 Photo storage method, storage medium and server

Publications (2)

Publication Number Publication Date
CN108897757A CN108897757A (en) 2018-11-27
CN108897757B true CN108897757B (en) 2023-08-22

Family

ID=64342970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810456993.1A Active CN108897757B (en) 2018-05-14 2018-05-14 Photo storage method, storage medium and server

Country Status (2)

Country Link
CN (1) CN108897757B (en)
WO (1) WO2019218459A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508398B (en) * 2018-11-30 2020-09-15 维沃移动通信有限公司 Photo classification method and terminal equipment thereof
CN109766461A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Photo management method, device, computer equipment and medium based on micro- expression
CN111414966B (en) * 2020-03-25 2023-08-15 抖音视界有限公司 Classification method, classification device, electronic equipment and computer storage medium
CN112395037B (en) * 2020-12-07 2024-01-05 深圳云天励飞技术股份有限公司 Dynamic cover selection method and device, electronic equipment and storage medium
CN112766139A (en) * 2021-01-14 2021-05-07 北京迈格威科技有限公司 Target identification method and device, storage medium and electronic equipment
CN114840620B (en) * 2022-04-01 2023-06-27 广东省国土资源测绘院 Evidence-providing material management method, intelligent terminal and storage medium
CN115035785A (en) * 2022-06-17 2022-09-09 云知声智能科技股份有限公司 Method and device for displaying photos, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080028698A (en) * 2006-09-27 2008-04-01 삼성전자주식회사 Method and system for mapping image objects in photo to geographic objects
CN103870599A (en) * 2014-04-02 2014-06-18 联想(北京)有限公司 Shooting data collecting method, device and electronic equipment
CN104598932A (en) * 2015-02-13 2015-05-06 成都品果科技有限公司 Method and system for photograph classification based on event information
CN104699842A (en) * 2015-03-31 2015-06-10 百度在线网络技术(北京)有限公司 Method and device for displaying pictures
CN105608425A (en) * 2015-12-17 2016-05-25 小米科技有限责任公司 Method and device for sorted storage of pictures
CN105760533A (en) * 2016-03-08 2016-07-13 广东欧珀移动通信有限公司 Photo management method and photo management device
CN106101224A (en) * 2016-06-12 2016-11-09 腾讯科技(深圳)有限公司 Identify the method and device of the classification of user geographic location
CN106155592A (en) * 2016-07-26 2016-11-23 深圳天珑无线科技有限公司 A kind of photo processing method and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7663671B2 (en) * 2005-11-22 2010-02-16 Eastman Kodak Company Location based image classification with map segmentation
CN101510205B (en) * 2009-03-16 2013-02-27 广州市有福数码科技有限公司 Method for implementing automatically clustering photographs, apparatus and system
WO2012073421A1 (en) * 2010-11-29 2012-06-07 パナソニック株式会社 Image classification device, image classification method, program, recording media, integrated circuit, and model creation device
CN103220376B (en) * 2013-03-30 2014-07-16 清华大学 Method for positioning IP (Internet Protocol) by position data of mobile terminal
CN104866500B (en) * 2014-02-25 2021-10-15 腾讯科技(深圳)有限公司 Picture classification display method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080028698A (en) * 2006-09-27 2008-04-01 삼성전자주식회사 Method and system for mapping image objects in photo to geographic objects
CN103870599A (en) * 2014-04-02 2014-06-18 联想(北京)有限公司 Shooting data collecting method, device and electronic equipment
CN104598932A (en) * 2015-02-13 2015-05-06 成都品果科技有限公司 Method and system for photograph classification based on event information
CN104699842A (en) * 2015-03-31 2015-06-10 百度在线网络技术(北京)有限公司 Method and device for displaying pictures
CN105608425A (en) * 2015-12-17 2016-05-25 小米科技有限责任公司 Method and device for sorted storage of pictures
CN105760533A (en) * 2016-03-08 2016-07-13 广东欧珀移动通信有限公司 Photo management method and photo management device
CN106101224A (en) * 2016-06-12 2016-11-09 腾讯科技(深圳)有限公司 Identify the method and device of the classification of user geographic location
CN106155592A (en) * 2016-07-26 2016-11-23 深圳天珑无线科技有限公司 A kind of photo processing method and terminal

Also Published As

Publication number Publication date
WO2019218459A1 (en) 2019-11-21
CN108897757A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108897757B (en) Photo storage method, storage medium and server
CN111368893B (en) Image recognition method, device, electronic equipment and storage medium
US8953895B2 (en) Image classification apparatus, image classification method, program, recording medium, integrated circuit, and model creation apparatus
CN111340131B (en) Image labeling method and device, readable medium and electronic equipment
US11288307B2 (en) Method, electronic device, and computer readable medium for photo organization
JP2021533497A (en) High-speed detection methods for video objects, devices, servers and storage media
CN103617432A (en) Method and device for recognizing scenes
Cheng et al. A data-driven point cloud simplification framework for city-scale image-based localization
CN110399487B (en) Text classification method and device, electronic equipment and storage medium
CN110717366A (en) Text information identification method, device, equipment and storage medium
US11768871B2 (en) Systems and methods for contextualizing computer vision generated tags using natural language processing
CN111598176B (en) Image matching processing method and device
CN112069338A (en) Picture processing method and device, electronic equipment and storage medium
US11127199B2 (en) Scene model construction system and scene model constructing method
CN111191065B (en) Homologous image determining method and device
CN117275086A (en) Gesture recognition method, gesture recognition device, computer equipment and storage medium
CN110059696B (en) Image annotation method and device and computer readable storage medium
CN112069342A (en) Image classification method and device, electronic equipment and storage medium
CN107766881B (en) Way finding method and device based on basic classifier and storage device
CN106469437B (en) Image processing method and image processing apparatus
CN114037889A (en) Image identification method and device, electronic equipment and storage medium
CN112069981A (en) Image classification method and device, electronic equipment and storage medium
CN112580750A (en) Image recognition method and device, electronic equipment and storage medium
WO2020211003A1 (en) Image processing method, computer readable storage medium, and computer device
CN115455227B (en) Element searching method of graphical interface, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 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