CN109783678B - Image searching method and device - Google Patents

Image searching method and device Download PDF

Info

Publication number
CN109783678B
CN109783678B CN201811645330.0A CN201811645330A CN109783678B CN 109783678 B CN109783678 B CN 109783678B CN 201811645330 A CN201811645330 A CN 201811645330A CN 109783678 B CN109783678 B CN 109783678B
Authority
CN
China
Prior art keywords
target
image
nodes
storage node
peer
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
CN201811645330.0A
Other languages
Chinese (zh)
Other versions
CN109783678A (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN201811645330.0A priority Critical patent/CN109783678B/en
Publication of CN109783678A publication Critical patent/CN109783678A/en
Application granted granted Critical
Publication of CN109783678B publication Critical patent/CN109783678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an image searching method and device. The method comprises the following steps: receiving a query request of a user, wherein the query request comprises a target image and a screening condition; determining a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; peer nodes refer to nodes storing the same information; matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity; sorting according to the matching similarity to obtain the information of the images N before sorting; screening the information of the images of the N before the sorting by using the screening condition to obtain a query result; and feeding back the query result to the user. Through the technical scheme provided by the invention, the same information of the same group is stored by using the peer node, so that the concurrency of the whole query is improved, and the query efficiency of a user is further improved.

Description

Image searching method and device
Technical Field
The invention relates to the field of internet, in particular to a method and a device for searching images.
Background
With the development of scientific technology, human information has been increased explosively, and many search engine manufacturers have to add a large number of servers for data storage.
Correspondingly, as the data volume is larger and larger, the time for the user to hit the target file is longer and longer when the user searches, and the query efficiency is low.
Disclosure of Invention
The embodiment of the invention provides an image searching method and device, and the method provided by the invention is used for storing the same information of the same group by using peer nodes, so that the concurrency of the whole query is improved, and the query efficiency of a user is further improved.
The invention discloses a method for searching images in a first aspect, which comprises the following steps:
receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
determining a group identification of the target image;
determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
sorting according to the matching similarity to acquire the information of the images of N before sorting, wherein N is a positive integer;
screening the information of the images of the N before the sorting by using the screening condition to obtain a query result;
and feeding back the query result to the user.
Wherein, it should be noted that, if the number of the target images is M; wherein M is a positive integer greater than 1;
before the feeding back the query result to the user, the method further comprises:
obtaining query results of M target storage nodes;
the feedback of the query result to the user comprises:
and feeding back the query results of the M target storage nodes to the user according to a preset sequence.
Optionally, the method further includes:
when an instruction of storing an alternative image sent by a user is received, determining a category identification of the alternative image and structural information of the alternative image;
determining a storage node according to the category identification of the alternative image;
and storing the characteristic values of the alternative images and the structural information of the alternative images into the determined storage nodes.
Optionally, determining a storage node according to the category identifier of the candidate image includes:
determining a peer node group according to the category identification of the alternative image;
sequencing all nodes in the peer node group from low load to high load;
the peer node ranked first is selected as the storage node.
Optionally, after determining the group identifier of the target image, the method further includes:
judging whether the grouping identification of the target image has a corresponding target grouping;
and if the target group does not exist, adding a new storage node, and setting the corresponding relation between the new storage node and the target group.
The second aspect of the present invention discloses an apparatus for image search, the apparatus comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving an inquiry request of a user, and the inquiry request comprises a target image and a screening condition;
a determination unit configured to determine a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
the matching unit is used for matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
the sorting unit is used for sorting according to the matching similarity so as to obtain the information of the images before sorting, wherein N is a positive integer;
the screening unit is used for screening the information of the images of the N-th rank according to the screening conditions to obtain a query result;
and the feedback unit is used for feeding back the query result to the user.
Optionally, the apparatus further comprises an obtaining unit; if the number of the target images is M; wherein M is a positive integer greater than 1;
the acquisition unit is used for acquiring the query results of the M target storage nodes;
the feedback unit is specifically configured to feed back, to the user, query results of the M target storage nodes according to a preset sequence.
Optionally, the apparatus further comprises a storage unit;
the determining unit is used for determining the category identification of the alternative image and the structural information of the alternative image when receiving an instruction of alternative image storage sent by a user; determining a storage node according to the category identification of the alternative image;
the storage node is used for storing the characteristic value of the alternative image and the structural information of the alternative image into the determined storage node.
Optionally, the determining unit is configured to determine a peer node group according to the category identifier of the candidate image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
Optionally, the apparatus further includes a determining unit and a scheduling unit;
the judging unit is used for judging whether the group identifier of the target image has a corresponding target group;
and the scheduling unit is used for adding a new storage node if no corresponding target group exists, and setting the corresponding relation between the added storage node and the target group.
It can be seen that, in the scheme of the embodiment of the present invention, an inquiry request of a user is received, where the inquiry request includes a target image and a screening condition; determining a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; peer nodes refer to nodes storing the same information; matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity; sorting according to the matching similarity to obtain the information of the images N before sorting; screening the information of the images of the N before the sorting by using the screening condition to obtain a query result; and feeding back the query result to the user. Through the technical scheme provided by the invention, the same information of the same group is stored by using the peer node, so that the concurrency of the whole query is improved, and the query efficiency of a user is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of an image searching method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating another image searching method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating another image searching method according to an embodiment of the present invention;
FIG. 4 is a block diagram of an image search apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of another embodiment of an image search apparatus;
FIG. 6 is a block diagram of another embodiment of an image search apparatus;
fig. 7 is a schematic physical structure diagram of an image searching apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The appearances of the phrases "first," "second," and "third," or the like, in the specification, claims, and figures are not necessarily all referring to the particular order in which they are presented. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a flowchart illustrating an image searching method according to an embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides an image searching method, where the method includes:
101. receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
the execution subject of the invention can be a server, and the server has the function of a search engine. Specifically, the search engine system may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices with search engine functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like. The operating system related to the embodiment of the application is a software system which performs unified management on hardware resources and provides a service interface for a user.
For example, the target image may be one or a plurality of images. In addition, it is understood that, if a plurality of target images may be provided, the plurality of target images may correspond to one filtering condition; of course, each target image may correspond to a screening condition one-to-one.
For example, after the user opens the search interface, a plurality of target pictures may be selected and a filtering condition may be selected, so that the selected target pictures correspond to the filtering condition.
For example, after the user opens the search interface, a target picture may be selected, and then after selecting a filtering condition, the selected target picture corresponds to the filtering condition. The selection method may be to select multiple sets of information as described above. It will be appreciated that each set of information will contain a target image and a filter condition.
For example, the filtering condition may be the age and sex of a person in the image, the storage time of the image, and the like.
It will be appreciated that the storage of information for the image may also be performed prior to receiving a query request from a user. For example, when an instruction of storing an alternative image sent by a user is received, determining a category identification of the alternative image and structural information of the alternative image; determining a storage node according to the category identification of the alternative image; and storing the characteristic values of the alternative images and the structural information of the alternative images into the determined storage nodes. The structured information may be parameters such as age and gender of a person in the image.
In addition, it should be noted that determining a storage node according to the category identifier of the candidate image includes: determining a peer node group according to the category identification of the alternative image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
102. Determining a group identification of the target image;
the common group identifier may be a character string, a number, or a combination of a number and a character string.
It will be appreciated that each target image will have a corresponding tag, which is the packet identifier. Such as a group identification as a face image, a body image, an animal image, or a plant image. Of course, the group identifier may be a number, such as 0001 for a face group; 0002 human body groups, etc.
In addition, the server may perform feature extraction on the target images and match the extracted features with a preset template to determine a grouping of the target images. For example, if the similarity of the feature of the target image and the face template is greater than the preset similarity, the target image is determined to be a face image group. For another example, if the similarity of the features of the target image and the human body template is greater than the preset similarity, it is determined that the target image is a human body image group. The preset similarity may be a default of the system, or may be set manually, for example, the preset similarity may be 90%.
It should be noted that, after determining the group identifier of the target image, the method further includes: judging whether the grouping identification of the target image has a corresponding target grouping; and if the target group does not exist, adding a new storage node, and setting the corresponding relation between the new storage node and the target group.
It will be appreciated that data for the image corresponding to the target packet may be subsequently stored in the newly added storage node.
103. Determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes;
the peer nodes are nodes storing the same information; for example, the peer node may be a node storing the same face image information at the same time. Optionally, the peer node may also be a node storing the same personal image information at the same time.
It will be appreciated that a packet may correspond to a packet identification, and a packet may include one or more nodes.
For example, the group is a face image group. The data of the packet is 50G, and the storage capacity of one node is 100G, then one node can meet the storage requirement. That is, the facial image group corresponds to one storage node. However, in order to improve the query efficiency, the face group may include at least two nodes, each of which stores the same thing, that is, the two nodes are backup to each other.
It can be understood that, when an inquiry request is received, the target image in the inquiry request is a face image, and at this time, the corresponding node of the face image group is traversed. And if the face image group has two nodes and the two nodes are both in an idle state, randomly selecting one node for traversal. And if the face image group has two nodes and one node is in an idle state, selecting the node in the idle state for traversing to determine the similarity and screening conditions for screening.
For example, if the packet is a facial image packet, the data of the packet is 150G, and the storage capacity of one node is 100G, two nodes are required to meet the storage requirement. The facial image packet may include 4 nodes, with every two storage nodes being peer nodes (the information stored in the peer nodes is identical). Of course, it is also possible to include 6, 8, etc., without limitation.
104. Matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
it can be understood that, for example, if the target image is a face image, feature extraction needs to be performed on the face image. And what is stored in the target node is the characteristics of the image.
For example, the face feature extraction is performed on some features of the face. Face feature extraction, also known as face characterization, is a process of feature modeling for a face. Knowledge-based characterization methods are a common extraction method. The knowledge-based characterization method mainly obtains feature data which is helpful for face classification according to shape description of face organs and distance characteristics between the face organs, and feature components of the feature data generally comprise Euclidean distance, curvature, angle and the like between feature points. The human face is composed of parts such as eyes, nose, mouth, and chin, and geometric description of the parts and their structural relationship can be used as important features for recognizing the human face, and these features are called geometric features. The knowledge-based face characterization mainly comprises a geometric feature-based method and a template matching method. The face image feature matching means that the extracted feature data of the face image is searched and matched with a feature template stored in a database, and a matching value (namely matching similarity) is output.
105. Sorting according to the matching similarity to obtain the information of the images N before sorting;
it is understood that the matching similarity may be sorted from high to low, and information of the top N images may be obtained. Where N is a positive integer, such as 1,2,3, etc. N is set by default or manually.
106. Screening the information of the images of the N before the sorting by using the screening condition to obtain a query result;
for the face image, common screening conditions include time, age, gender, and the like of image storage.
For example, N is 100, with 80 people between 20 and 30 years of age and 20 people between 30 and 40 years of age. If the screening condition is 20-30 years old, the query result is 80, and 80 of 100 are eligible.
107. And feeding back the query result to the user.
It will be appreciated that the form of feedback is many, such as presenting each piece of information directly on the interface. The information may be a thumbnail of the queried image, as well as all information of the queried image. Such as the name, age, phone number, and address of the face image in the image. Of course, the query result can also be sent to the mailbox or the mobile terminal bound by the user.
In addition, it should be noted that, if the number of the target images is M; wherein M is a positive integer greater than 1; before the feeding back the query result to the user, the method further comprises: obtaining query results of M target storage nodes; the feedback of the query result to the user comprises: and feeding back the query results of the M target storage nodes to the user according to a preset sequence.
It will be appreciated that if the data of each packet can be stored to one node (actually containing two peer nodes); then M target objects need to traverse M nodes; since the stored data amount of each node is different, the traversal time is different, and therefore, the feedback results of the M nodes can be collected and then fed back to the user. Of course, the M query results may be sorted before being fed back, and the sorted results are fed back. The manner of ordering is not limited herein.
It can be seen that, in the scheme of the embodiment of the present invention, an inquiry request of a user is received, where the inquiry request includes a target image and a screening condition; determining a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; peer nodes refer to nodes storing the same information; matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity; sorting according to the matching similarity to obtain the information of the images N before sorting; screening the information of the images of the N before the sorting by using the screening condition to obtain a query result; and feeding back the query result to the user. Through the technical scheme provided by the invention, the same information of the same group is stored by using the peer node, so that the concurrency of the whole query is improved, and the query efficiency of a user is further improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating another image searching method according to another embodiment of the present invention. Wherein, as shown in fig. 2, the method comprises:
201. when an instruction of storing an alternative image sent by a user is received, determining a category identification of the alternative image and structural information of the alternative image, and determining a storage node according to the category identification of the alternative image;
202. and storing the characteristic values of the alternative images and the structural information of the alternative images into the determined storage nodes.
Determining a storage node according to the category identification of the alternative image, wherein the determining comprises: determining a peer node group according to the category identification of the alternative image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
203. Receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
204. determining a grouping identification of the target image, and determining a target storage node according to the grouping identification;
wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
in addition, optionally, after determining the group identifier of the target image, the method further includes: judging whether the grouping identification of the target image has a corresponding target grouping; and if the target group does not exist, adding a new storage node, and setting the corresponding relation between the new storage node and the target group.
205. Matching the characteristics of the target image with the characteristics of the images stored in the target storage node to obtain matching similarity, and sequencing according to the matching similarity to obtain information of N images before sequencing, wherein N is a positive integer;
205. screening the information of the images of the N before the sorting by using the screening condition to obtain a query result;
207. and feeding back the query result to the user.
If the number of the target images is M; wherein M is a positive integer greater than 1; before the feeding back the query result to the user, the method further comprises: obtaining query results of M target storage nodes; the feedback of the query result to the user comprises: and feeding back the query results of the M target storage nodes to the user according to a preset sequence.
It should be noted that, the specific content of the embodiment described in fig. 2 can be explained with reference to the embodiment corresponding to fig. 1.
It can be seen that, in the scheme of this embodiment, the newly added data is stored by using a manner of adding the peer nodes, so that an effect of dynamic addition is achieved, and the peer nodes can ensure high concurrency and prevent downtime caused by single-node storage (if a single node fails, a whole search engine is down).
As shown in fig. 3, another embodiment of the present invention provides a flowchart of a method for searching an image. Wherein, as shown in fig. 3, the method comprises:
301. receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
302. determining a group identification of the target image;
303. judging whether the grouping identification of the target image has a corresponding target grouping;
304. if the corresponding target group does not exist, a new storage node is added;
305. and setting the corresponding relation between the newly added storage nodes and the target group.
For example, if the target image label is classified as a, but the query engine does not have a classification, the node corresponding to the classification a needs to store the corresponding classification data. Of course, this classification of a also includes that the peer node has provided concurrent processing.
It should be noted that, the specific content of the embodiment described in fig. 3 can be explained with reference to the embodiment corresponding to fig. 1.
It can be seen that, in the solution of this embodiment, if the search engine does not include the classification of the target image, the grouping and the node corresponding to the grouping are dynamically added, and then data is added to the expanded node, so as to dynamically expand the search function of the search engine.
As shown in fig. 4, an embodiment of the present invention provides an image search apparatus 400, wherein the apparatus 400 includes the following units:
a receiving unit 401, configured to receive an inquiry request of a user, where the inquiry request includes a target image and a screening condition;
a determining unit 402, configured to determine a group identifier of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
a matching unit 403, configured to match features of the target image with features of images stored in the target storage node to obtain matching similarity;
a sorting unit 404, configured to sort according to the matching similarity to obtain information of N images before sorting, where N is a positive integer;
a screening unit 405, configured to screen, by using the screening condition, the information of the image of N before the ranking to obtain a query result;
a feedback unit 406, configured to feed back the query result to the user.
Optionally, the apparatus 400 further includes an obtaining unit 407; if the number of the target images is M; wherein M is a positive integer greater than 1;
the acquisition unit is used for acquiring the query results of the M target storage nodes;
the feedback unit is specifically configured to feed back, to the user, query results of the M target storage nodes according to a preset sequence.
Optionally, the apparatus 400 further comprises a storage unit 408;
the determining unit is used for determining the category identification of the alternative image and the structural information of the alternative image when receiving an instruction of alternative image storage sent by a user; determining a storage node according to the category identification of the alternative image;
the storage node is used for storing the characteristic value of the alternative image and the structural information of the alternative image into the determined storage node.
The determining unit is configured to determine a peer node group according to the category identifier of the candidate image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
Optionally, the apparatus 400 further includes a determining unit 409 and a scheduling unit 410;
the judging unit 409 is configured to judge whether a corresponding target group exists in the group identifier of the target image;
the scheduling unit 410 is configured to add a new storage node if there is no corresponding target packet, and set a corresponding relationship between the new storage node and the target packet.
The above-mentioned unit 401-410 can be used for executing the method described in step 101-107 in embodiment 1, and the detailed description is given in the description of the method in embodiment 1, and is not repeated herein.
As shown in fig. 5, an embodiment of the present invention provides an image search apparatus 500, wherein the apparatus 500 includes the following units:
a determining unit 501, configured to determine, when an instruction for storing an alternative image sent by a user is received, a category identifier of the alternative image and structural information of the alternative image, and determine a storage node according to the category identifier of the alternative image;
a storage unit 502, configured to store the feature value of the candidate image and the structural information of the candidate image in the determined storage node.
Determining a storage node according to the category identification of the alternative image, wherein the determining comprises: determining a peer node group according to the category identification of the alternative image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
A receiving unit 503, configured to receive an inquiry request of a user, where the inquiry request includes a target image and a screening condition;
a determining unit 501, configured to determine a group identifier of the target image; determining a target storage node according to the grouping identification;
wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
in addition, optionally, after determining the group identifier of the target image, the method further includes: judging whether the grouping identification of the target image has a corresponding target grouping; and if the target group does not exist, adding a new storage node, and setting the corresponding relation between the new storage node and the target group.
A matching unit 504, configured to match features of the target image with features of images stored in the target storage node to obtain matching similarity, and sort according to the matching similarity to obtain information of N images before sorting, where N is a positive integer;
a screening unit 505, configured to screen information of the top-ranked N images by using the screening condition to obtain a query result;
a feedback unit 506, configured to feed back the query result to the user.
The above-mentioned units 501-506 may be used to execute the method described in steps 201-207 in embodiment 2, and the detailed description refers to the description of the method in embodiment 2, which is not repeated herein.
As shown in fig. 6, an embodiment of the present invention provides an image search apparatus 600, wherein the apparatus 600 includes the following units:
a receiving unit 601, configured to receive an inquiry request of a user, where the inquiry request includes a target image and a screening condition;
a determining unit 602, configured to determine a group identifier of the target image;
a judging unit 603, configured to judge whether there is a corresponding target group in the group identifier of the target image;
a scheduling unit 604, configured to add a new storage node if there is no corresponding target packet; and setting the corresponding relation between the newly added storage nodes and the target group.
The above-mentioned unit 601-604 can be used to execute the method described in the step 301-305 in the embodiment 3, and the detailed description is given in the description of the method in the embodiment 3, and is not repeated herein.
Referring to fig. 7, in another embodiment of the present invention, an image searching apparatus 700 is provided. The apparatus 700 includes hardware such as a CPU 701, memory 702, bus 703, transceiver 704, and the like. The logic units shown in fig. 4-6 described above may be implemented by hardware devices shown in fig. 7.
The CPU 701 executes a server program pre-stored in the memory 702, and the execution process specifically includes:
receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
determining a group identification of the target image;
determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
sorting according to the matching similarity to acquire the information of the images of N before sorting, wherein N is a positive integer;
screening the information of the images of the N before the sorting by using the screening condition to obtain a query result;
and feeding back the query result to the user.
Optionally, if the number of the target images is M; wherein M is a positive integer greater than 1;
before the feeding back the query result to the user, the executing process further includes:
obtaining query results of M target storage nodes;
the feedback of the query result to the user comprises:
and feeding back the query results of the M target storage nodes to the user according to a preset sequence.
Optionally, the executing process further includes:
when an instruction of storing an alternative image sent by a user is received, determining a category identification of the alternative image and structural information of the alternative image;
determining a storage node according to the category identification of the alternative image;
and storing the characteristic values of the alternative images and the structural information of the alternative images into the determined storage nodes.
Optionally, determining a storage node according to the category identifier of the candidate image includes:
determining a peer node group according to the category identification of the alternative image;
sequencing all nodes in the peer node group from low load to high load;
the peer node ranked first is selected as the storage node.
Optionally, after determining the group identifier of the target image, the executing further includes:
judging whether the grouping identification of the target image has a corresponding target grouping;
if no corresponding target group exists, a new storage node is added, and the corresponding relation between the new storage node and the target group is set
From the above, in the technical scheme provided by the embodiment of the present invention, a query request of a user is received, wherein the query request includes a target image and a screening condition; determining a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; peer nodes refer to nodes storing the same information; matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity; sorting according to the matching similarity to obtain the information of the images N before sorting; screening the information of the images of the N before the sorting by using the screening condition to obtain a query result; and feeding back the query result to the user. Through the technical scheme provided by the invention, the same information of the same group is stored by using the peer node, so that the concurrency of the whole query is improved, and the query efficiency of a user is further improved.
In another embodiment of the present invention, a computer program product is disclosed, the computer program product having program code embodied therein; the method of the preceding method embodiment is performed when the program code is executed.
In another embodiment of the present invention, a chip is disclosed, the chip comprising program code; the method of the preceding method embodiment is performed when the program code is executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method of image searching, the method comprising:
receiving a query request of a user, wherein the query request comprises a target image and a screening condition;
determining a group identification of the target image;
determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information; if all the nodes in the peer-to-peer nodes are in an idle state, randomly selecting one node as the target storage node; if the nodes in the idle state exist in the nodes in the peer-to-peer nodes, taking the nodes in the idle state as the target storage nodes;
matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
sorting according to the matching similarity to acquire the information of the images of N before sorting, wherein N is a positive integer;
screening the information of the images of the N before the sorting by using the screening condition to obtain a query result;
feeding back the query result to the user;
after determining the group identity of the target image, the method further comprises:
judging whether the grouping identification of the target image has a corresponding target grouping;
and if the target group does not exist, adding a new storage node, and setting the corresponding relation between the new storage node and the target group.
2. The method of claim 1, wherein if there are M target storage nodes; wherein M is a positive integer greater than 1;
before the feeding back the query result to the user, the method further comprises:
obtaining query results of M target storage nodes;
the feedback of the query result to the user comprises:
and feeding back the query results of the M target storage nodes to the user according to a preset sequence.
3. The method of claim 2, further comprising:
when an instruction of storing an alternative image sent by a user is received, determining a category identification of the alternative image and structural information of the alternative image;
determining a storage node according to the category identification of the alternative image;
and storing the characteristic values of the alternative images and the structural information of the alternative images into the determined storage nodes.
4. The method of claim 3, wherein determining a storage node according to the class identification of the candidate image comprises:
determining a peer node group according to the category identification of the alternative image;
sequencing all nodes in the peer node group from low load to high load;
the peer node ranked first is selected as the storage node.
5. An apparatus for image search, the apparatus comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving an inquiry request of a user, and the inquiry request comprises a target image and a screening condition;
a determination unit configured to determine a group identification of the target image; determining a target storage node according to the grouping identification; wherein the target storage node is one of peer nodes; the peer nodes are nodes storing the same information;
the determining unit is further configured to randomly select one node as the target storage node if all nodes in the peer nodes are in an idle state; if the nodes in the idle state exist in the nodes in the peer-to-peer nodes, taking the nodes in the idle state as the target storage nodes;
the matching unit is used for matching the characteristics of the target image with the characteristics of the image stored in the target storage node to obtain matching similarity;
the sorting unit is used for sorting according to the matching similarity so as to obtain the information of the images before sorting, wherein N is a positive integer;
the screening unit is used for screening the information of the images of the N-th rank according to the screening conditions to obtain a query result;
the feedback unit is used for feeding back the query result to the user;
the device further comprises: a judging unit and a scheduling unit;
the judging unit is used for judging whether the group identifier of the target image has a corresponding target group;
and the scheduling unit is used for adding a new storage node if no corresponding target group exists, and setting the corresponding relation between the added storage node and the target group.
6. The apparatus of claim 5, further comprising an acquisition unit; if the number of the target images is M; wherein M is a positive integer greater than 1;
the acquisition unit is used for acquiring the query results of the M target storage nodes;
the feedback unit is specifically configured to feed back, to the user, query results of the M target storage nodes according to a preset sequence.
7. The apparatus of claim 6, further comprising a storage unit;
the determining unit is used for determining the category identification of the alternative image and the structural information of the alternative image when receiving an instruction of alternative image storage sent by a user; determining a storage node according to the category identification of the alternative image;
the storage node is used for storing the characteristic value of the alternative image and the structural information of the alternative image into the determined storage node.
8. The apparatus according to claim 7, wherein the determining unit is configured to determine a peer node group according to a category identifier of the candidate image; sequencing all nodes in the peer node group from low load to high load; the peer node ranked first is selected as the storage node.
CN201811645330.0A 2018-12-29 2018-12-29 Image searching method and device Active CN109783678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811645330.0A CN109783678B (en) 2018-12-29 2018-12-29 Image searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811645330.0A CN109783678B (en) 2018-12-29 2018-12-29 Image searching method and device

Publications (2)

Publication Number Publication Date
CN109783678A CN109783678A (en) 2019-05-21
CN109783678B true CN109783678B (en) 2021-07-20

Family

ID=66499616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811645330.0A Active CN109783678B (en) 2018-12-29 2018-12-29 Image searching method and device

Country Status (1)

Country Link
CN (1) CN109783678B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328688B (en) * 2020-11-09 2023-10-13 广州虎牙科技有限公司 Data storage method, device, computer equipment and storage medium
CN114020986B (en) * 2022-01-05 2022-04-26 深圳思谋信息科技有限公司 Content retrieval system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004036408A2 (en) * 2002-10-17 2004-04-29 Intel Corporation A distributed network attached storage system
CN104298713A (en) * 2014-09-16 2015-01-21 北京航空航天大学 Fuzzy clustering based image retrieval method
CN107172189A (en) * 2017-06-14 2017-09-15 郑州云海信息技术有限公司 A kind of many concurrent picture storage methods
CN108073356A (en) * 2016-11-10 2018-05-25 杭州海康威视系统技术有限公司 A kind of data storage, lookup method, device and data handling system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160039A (en) * 2015-10-13 2015-12-16 四川携创信息技术服务有限公司 Query method based on big data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004036408A2 (en) * 2002-10-17 2004-04-29 Intel Corporation A distributed network attached storage system
CN104298713A (en) * 2014-09-16 2015-01-21 北京航空航天大学 Fuzzy clustering based image retrieval method
CN108073356A (en) * 2016-11-10 2018-05-25 杭州海康威视系统技术有限公司 A kind of data storage, lookup method, device and data handling system
CN107172189A (en) * 2017-06-14 2017-09-15 郑州云海信息技术有限公司 A kind of many concurrent picture storage methods

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于手机的分布式图片检索技术研究;冯喆;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315(第03期);第12页第5段、第57页第1段、第58页第1段 *

Also Published As

Publication number Publication date
CN109783678A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
US9367756B2 (en) Selection of representative images
CN107491996B (en) Webpage advertisement putting method and system
CN108334632B (en) Entity recommendation method and device, computer equipment and computer-readable storage medium
TW201322021A (en) Image search method and image search apparatus
CN110413875A (en) A kind of method and relevant apparatus of text information push
CN111327955B (en) User portrait based on-demand method, storage medium and smart television
CN108288208B (en) Display object determination method, device, medium and equipment based on image content
CN110765760B (en) Legal case distribution method and device, storage medium and server
CN109976622B (en) Book tag determination method, electronic device and computer storage medium
WO2018196553A1 (en) Method and apparatus for obtaining identifier, storage medium, and electronic device
CN109783678B (en) Image searching method and device
CN105956051A (en) Information finding method, device and system
CN109829073A (en) A kind of method and device of picture search
CN106919703A (en) Film information searching method and device
CN105589873B (en) Data searching method, terminal and server
CN111309946B (en) Established file optimization method and device
CN106844406B (en) Search method and search device
CN111160699A (en) Expert recommendation method and system
CN106202360A (en) Examination question searching method and device
CN109859011A (en) Based on the information push method in store, system and its storage medium in jewellery wire
CN113221786A (en) Data classification method and device, electronic equipment and storage medium
CN114003753A (en) Picture retrieval method and device
CN106776864A (en) A kind of image searching method and server
CN112015730A (en) Label matching method and device, storage medium and server
CN111597368A (en) Data processing method and device

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