Image retrieval method, device and electronic equipment

By judging the number of pictures retrieved and saving frequently retrieved pictures to storage space, the problem of users needing to copy and save pictures during mobile office or historical pictures retrieval is solved, and the efficiency of the picture retrieval system is improved.

CN113495970BActive Publication Date: 2025-02-14SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010249190.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-01
Publication Date
2025-02-14
Estimated Expiration
2040-04-01

AI Technical Summary

Technical Problem

In mobile office or historical image search scenarios, users need to copy and save images for image search, which makes the search process inconvenient and affects efficiency.

Method used

By determining whether the number of searches for the image to be retrieved meets the preset threshold, determine that it is frequent or temporary search images, and save the frequently searched images to the preset storage space for direct search next time.

Benefits of technology

It improves the efficiency of the image retrieval system. Users can quickly retrieve frequently used pictures without copying or uploading pictures to adapt to the search needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113495970B_ABST
    Figure CN113495970B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device and electronic device for image retrieval, the method comprising: obtaining an image to be retrieved; determining whether the number of times the image to be retrieved is retrieved satisfies a preset threshold of the number of times; if the number of times the image to be retrieved is retrieved satisfies the preset threshold of the number of times, determining that the image to be retrieved is a frequently retrieved image, and saving the image to be retrieved to a pre-set first storage space, the pre-set first storage space being used for long-term storage of frequently retrieved images; performing retrieval with the frequently retrieved image as a first retrieval target, and returning a first retrieval result. The present invention can improve the retrieval efficiency of the retrieval system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of picture retrieval technology, and in particular to a picture retrieval method, device and electronic equipment. Background Art

[0002] With the continuous development of artificial intelligence technology, the application of face algorithms is becoming more and more popular. Image search applications have been implemented in application scenarios such as public security, supermarkets, and parks. Users often upload / drag pictures on the page or desktop to search for pictures. If you want to search for pictures with historical pictures or when you are on a business trip or other mobile office, you need to save the pictures locally or in the cloud, or copy the previous pictures by inserting a USB flash drive, etc. to search for pictures with pictures. Otherwise, it will become very passive to use historical pictures for image search, which is not convenient for image search and affects the search efficiency. Summary of the invention

[0003] The embodiment of the present invention provides an image retrieval method, which can improve the retrieval efficiency of the retrieval system.

[0004] In a first aspect, an embodiment of the present invention provides an image retrieval method, the method comprising:

[0005] Get the image to be retrieved;

[0006] Determine whether the number of times the image to be searched has been searched meets a preset number of times threshold;

[0007] If the number of retrievals meets a preset retrieval number threshold, the image to be retrieved is determined to be a frequently retrieved image, and the image to be retrieved is saved in a pre-set first storage space, where the pre-set first storage space is used for long-term storage of the frequently retrieved images;

[0008] A search is performed using the frequently searched image as a first search target to obtain a first search result.

[0009] Optionally, after the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the method further includes the steps of:

[0010] If the number of retrievals does not meet the preset retrieval number threshold, the image to be retrieved is determined to be a temporary retrieval image, and the image to be retrieved is stored in a pre-set second storage space, and the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image;

[0011] The temporary search image is used as a second search target for searching, and a second search result is returned.

[0012] Optionally, after the step of obtaining the image to be retrieved, the method further includes:

[0013] Performing structural processing on the image to be retrieved to obtain structured data corresponding to the image to be retrieved, wherein the structured data includes image features of the image to be retrieved and an image ID of the image to be retrieved;

[0014] The step of searching the frequently searched images as the first search target to obtain the first search result includes:

[0015] Performing a search using the picture features and picture ID of the frequently searched pictures as a first search target to obtain a corresponding first search result, and returning the first search result;

[0016] And / or, the step of searching with the temporary search image as the second search target and returning the second search result includes:

[0017] A search is performed using the picture features and picture ID of the temporary search picture as the second search target to obtain a corresponding second search result to obtain the second search result.

[0018] Optionally, after the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the method further includes:

[0019] If the retrieval times do not meet the preset retrieval times threshold, detecting whether an operation instruction to store the to-be-retrieved picture in the preset first storage space is received;

[0020] If the operation instruction is received, the image to be retrieved is taken as a frequently retrieved image and stored in the pre-set first storage space.

[0021] Optionally, the step of determining whether the number of times the image to be searched has been searched meets a preset number of times threshold includes:

[0022] Detect whether there is a search record for the image to be searched;

[0023] If there is a search record for the image to be searched, count the number of times the image to be searched has been searched according to the search record;

[0024] The search times are compared with a preset search times threshold, and it is determined whether the search times meet the preset search times threshold according to the comparison result.

[0025] Optionally, the step of counting the number of detection times of the to-be-searched image being searched according to the search record includes:

[0026] Obtaining the user ID of each time the image to be retrieved is retrieved according to the retrieval record;

[0027] Get the current user ID of the currently retrieved user;

[0028] Counting the number of times the image to be retrieved is retrieved by the current user ID according to the user ID of each time the image to be retrieved is retrieved;

[0029] The step of comparing the number of searches with a preset number of searches threshold and determining whether the number of searches meets the preset number of searches threshold according to the comparison result comprises:

[0030] The number of times the image to be retrieved is retrieved by the current user ID is compared with a preset retrieval number threshold of the current user ID, and it is determined based on the comparison result whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID.

[0031] In a second aspect, an embodiment of the present invention further provides an image retrieval device, the device comprising:

[0032] The acquisition module is used to obtain the image to be retrieved;

[0033] The first judgment module is used to judge whether the number of times the image to be searched has been searched meets a preset number of times threshold;

[0034] A first determination module is used to determine that the image to be retrieved is a frequently retrieved image if the number of retrievals meets a preset retrieval number threshold, and save the image to be retrieved into a preset first storage space, wherein the preset first storage space is used for long-term storage of the frequently retrieved images;

[0035] The first search module is used to perform a search using the frequently searched image as a first search target to obtain a first search result.

[0036] Optionally, after the first determining module, the device further includes:

[0037] A second determination module is used to determine that the image to be retrieved is a temporary retrieval image if the retrieval number does not meet a preset retrieval number threshold, and store the image to be retrieved in a pre-set second storage space, wherein the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image;

[0038] The second search module is used to search with the temporary search image as the second search target and return the second search result.

[0039] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image retrieval method provided in the above embodiment when executing the computer program.

[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the image retrieval method provided in the above embodiment are implemented.

[0041] In this embodiment, by obtaining the image to be retrieved; judging whether the number of times the image to be retrieved satisfies the preset threshold of the number of times of retrieval; if the number of times of retrieval satisfies the preset threshold of the number of times of retrieval, the image to be retrieved is determined to be a frequently retrieved image, and the image to be retrieved is saved in a pre-set first storage space, and the pre-set first storage space is used for long-term storage of the frequently retrieved image; the frequently retrieved image is retrieved as the first retrieval target, and the first retrieval result is returned. In this way, it can be judged whether the image to be retrieved is a frequently retrieved image, and the frequently retrieved image is stored in the pre-set first storage space, so that the next time the image is retrieved, the frequently retrieved image can be directly obtained from the pre-set first storage space, and the retrieval is performed based on the frequently retrieved image. Even if the office equipment or the location is changed, when you want to use the frequently retrieved image, you do not need to copy the local image, nor do you need to upload it to the cloud for backup, and you do not need to copy it locally or download it from the cloud for retrieval, thereby improving the retrieval efficiency of the retrieval system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 is a flow chart of a picture retrieval method provided by an embodiment of the present invention;

[0044] Figure 2 yes Figure 1 A method flow chart provided in step 102 of the embodiment;

[0045] Figure 3 is a flow chart of another image retrieval method provided by an embodiment of the present invention;

[0046] Figure 4is a flowchart of another image retrieval method provided by an embodiment of the present invention;

[0047] Figure 5 is a flow chart of another image retrieval method provided by an embodiment of the present invention;

[0048] Figure 6 is a flowchart of another image retrieval method provided by an embodiment of the present invention;

[0049] Figure 7 is a structural schematic diagram of an image retrieval device provided by an embodiment of the present invention;

[0050] Figure 8 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention;

[0051] Fig. 9 This is a structural diagram of another image retrieval device provided by an embodiment of the present invention.

[0052] Fig.10 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention;

[0053] Fig.11 yes Figure 7 Another structural schematic diagram provided by the first judgment module in the embodiment;

[0054] Fig.12 is a structural schematic diagram of another image retrieval device provided by an embodiment of the present invention;

[0055] Fig.13 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0058] It should be understood that, although the terms first, second, etc. may be used to describe various units in embodiments of the present invention, these units should not be limited to these terms. These terms are only used to distinguish the units of the same type from each other. Moreover, the terms "comprise", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment.

[0059] See also Figure 1 , Figure 1 is a flow chart of a picture retrieval method provided by an embodiment of the present invention. Figure 1 As shown, the image retrieval method includes the following steps:

[0060] Step 101: Get the image to be retrieved.

[0061] The above-mentioned images to be retrieved are images that need to be searched and are selected by the user. The images to be retrieved may be images on a page or desktop of the retrieval system. The user may select the images by uploading or dragging on the page or desktop. The images to be retrieved may be images obtained by copying from a USB flash drive, downloading from a web page, downloading from the cloud, or saving locally.

[0062] Step 102: Determine whether the number of times the image to be searched has been searched meets a preset search number threshold.

[0063] Among them, the above-mentioned preset search times threshold is a pre-set conditional threshold for determining whether the image to be retrieved is a frequently retrieved image. The preset search times threshold can set the threshold value according to actual needs. For example, the preset search times threshold can be set to 2 times, 3 times or more. The above-mentioned search times are the number of times the image to be retrieved has been retrieved in the retrieval system. For example, when the A search image is obtained, the A search image has been retrieved before and has been retrieved 2 times, then the A search image The number of times is retrieved is 2 times.

[0064] For details, see Figure 2 , Figure 2 yes Figure 1 Step 102 in the embodiment provides a method flow chart, such as Figure 2 As shown, step 102 includes:

[0065] Step 201: Check whether there is a search record for the image to be searched.

[0066] Among them, the above search records are records of the images to be searched being searched in the search system.

[0067] Specifically, after obtaining the image to be retrieved, the retrieval record of the image to be retrieved can be searched in the retrieval system. If the retrieval record of the image to be retrieved is found in the retrieval system, it means that there is a retrieval record for the image to be retrieved. If the retrieval record of the image to be retrieved is not found in the retrieval system, it means that there is no retrieval record for the image to be retrieved.

[0068] Step 202: If there is a search record for the image to be searched, count the number of times the image to be searched has been searched based on the search record.

[0069] Specifically, each time the retrieval system retrieves a picture, the retrieval record of the picture is retained within a certain preset time period, and if it is retrieved again within the preset time period, the number of retrievals of the picture will be accumulated on the basis of the first retrieval. Therefore, when it is detected that there is a retrieval record for the picture to be retrieved, the number of retrievals of the picture to be retrieved can be obtained. For example, when the B picture is retrieved for the first time, the number of retrievals is recorded as 1, and when the B picture is retrieved for the second time, the number of retrievals of the B picture is recorded as 2, so that the number of retrievals of the B picture is 2. By analogy, if the B picture is retrieved again later, the number of retrievals will be increased by 1. Of course, the preset time period can be set according to actual needs, and the preset time period can be set to one hour, one day, one week, one month, etc. It can be set specifically according to the effectiveness of the picture retrieval.

[0070] As an implementation of an embodiment of the present invention, the user ID of each time the image to be retrieved is retrieved is obtained according to the retrieval record. The current user ID of the current searching user is obtained. The number of times the image to be retrieved is retrieved by the current user ID is counted according to the user ID of each time the image to be retrieved is retrieved.

[0071] The user ID is the identity information of the user who performs the search task. Because there can be multiple search users in the search system, and each search user has his own account, and each user has the authority and standards for collecting frequently searched images. The above current user ID can be the account information of the user who is currently performing the search task.

[0072] More specifically, there can be multiple searching users in the retrieval system. When the same image to be retrieved is retrieved by different users, the total number of times the image to be retrieved is retrieved is reached, but it is not a frequent search image for all users. Therefore, it is necessary to know the user ID that is retrieved each time in the search record of the image to be retrieved, and then count the number of times different users search for the same image to be retrieved. Of course, each time a search task is performed, it is only necessary to count the number of searches corresponding to the current user ID in all the search records of the image to be retrieved. In this way, each user can judge the number of times a certain image to be retrieved has been retrieved based on his or her own search records when performing a search task. This can reduce the number of statistics and improve search efficiency.

[0073] Step 203: compare the number of retrieval times with a preset retrieval number threshold, and determine whether the number of retrieval times meets the preset retrieval number threshold based on the comparison result.

[0074] Specifically, after determining the number of retrieval times of the image to be retrieved, the number of retrieval times can be compared with a preset number of retrieval times threshold. If the number of retrieval times is greater than or equal to the preset number of retrieval times threshold, it means that the number of retrieval times meets the preset number of retrieval times threshold. Otherwise, the number of retrieval times does not meet the preset number of retrieval times.

[0075] As an implementation mode of an embodiment of the present invention, the number of times the image to be retrieved is retrieved by the current user ID is compared with the preset retrieval number threshold of the current user ID, and it is determined based on the comparison result whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID.

[0076] More specifically, in the search system, each search user can set his own preset search times threshold value, because different search users have different judgment criteria for frequently searched images for their own search tasks, so each search user can set his own unique preset search times. In this way, the search times of the image to be searched corresponding to the current user ID can be compared with the preset search times threshold value corresponding to the current user ID, and then it can be determined whether the image to be searched is a frequently searched image corresponding to the current user ID based on the comparison result.

[0077] Step 103: If the number of retrieval times meets a preset retrieval number threshold, the image to be retrieved is determined to be a frequently retrieved image, and the image to be retrieved is saved in a preset first storage space.

[0078] Among them, the above-mentioned frequently retrieved pictures are pictures that users often need to retrieve. The above-mentioned pre-set first storage space is set in the retrieval system. The user can directly use the pre-set first storage space after logging into the retrieval system. The above-mentioned pre-set first storage space can be called a temporary storage rack in the retrieval system, which is used for long-term storage of frequently retrieved pictures. The pre-set first storage space can store multiple frequently retrieved pictures. Of course, the user can also regularly clean up the frequently retrieved pictures in the pre-set first storage space according to actual needs.

[0079] Specifically, when the number of retrieval times of the image to be retrieved is greater than or equal to the preset number of retrieval times, it can be said that the image to be retrieved is a image that the user often needs to retrieve. For this reason, the image to be retrieved can be stored in a pre-set first storage space to facilitate the long-term preservation of the image to be retrieved, so as to facilitate the retrieval of the image next time.

[0080] Step 104: perform a search using the frequently searched images as the first search target to obtain a first search result.

[0081] The first search target is the target image that the user needs to search. The first search result is the result data collected according to the first search target. The first search result can be image data, text data, table data, voice data, or file data.

[0082] Specifically, when the user's purpose is to search for images by image, the first search result is the image data corresponding to the frequent image. When the user's purpose is to search for text by image, the first search result is the text data corresponding to the frequent image. When the user's purpose is to search for tables by image, the first search result is the table data corresponding to the frequent image. When the user's purpose is to search for voice by image, the first search result is the voice data corresponding to the frequent image. When the user's purpose is to search for archives by image, the first search result is the archive data corresponding to the frequent image, etc. Of course, it can also be other different data, and the specific data type of the first search result can be limited according to the specific usage scenario and purpose of use.

[0083] After determining that the frequently searched image is the first search target, the frequently searched image can be sent to the server. After receiving the frequently searched image, the server can search for relevant image data corresponding to the frequently searched image in the massive image data in the server database. The server returns the relevant image data to the search system, and the search system can obtain the first search result.

[0084] More specifically, after the first search result is obtained, the first search result can be sent to a receiving end, such as a user's mobile phone, computer or other device, and then displayed to the user, so that the user can process or analyze the first search result.

[0085] In this embodiment, by obtaining the image to be retrieved; determining whether the number of times the image to be retrieved is retrieved meets the preset threshold of the number of retrievals; if the number of retrievals meets the preset threshold of the number of retrievals, determining that the image to be retrieved is a frequently retrieved image, and saving the image to be retrieved to a pre-set first storage space, the pre-set first storage space is used for long-term storage of frequently retrieved images; searching with the frequently retrieved image as the first search target, and returning the first search result. In this way, it can be determined whether the image to be retrieved is a frequently retrieved image, and the frequently retrieved image is stored in the pre-set first storage space, so that the next time the image is retrieved, the frequently retrieved image can be directly obtained from the pre-set first storage space, and the retrieval is based on the frequently retrieved image. Even if the office equipment or location is changed, when you want to use the frequently retrieved image, you do not need to copy the local image, nor do you need to upload it to the cloud for backup, and you do not need to copy it locally or download it from the cloud for retrieval, thereby improving the retrieval efficiency of the retrieval system.

[0086] Optional, see Figure 3 , Figure 3 is a flowchart of another image retrieval method provided by an embodiment of the present invention. Figure 1 Based on this, after step 102, the method further comprises the steps of:

[0087] Step 301: If the number of retrieval times does not meet a preset retrieval number threshold, the image to be retrieved is determined to be a temporary retrieval image, and the image to be retrieved is stored in a pre-set second storage space.

[0088] Among them, the pre-set second storage space is used for automatic temporary storage of temporary retrieval pictures. Saving the pictures to be retrieved whose retrieval times do not meet the preset retrieval times threshold in the pre-set second storage space is a step automatically performed by the system (a step executed by default), and new pictures that have not been slowed down will be saved in the pre-set second storage space. And a time threshold can be set in advance. When the time for which the picture to be retrieved is stored in the pre-set second storage space exceeds the pre-set time threshold, and it is still not transferred to the pre-set first storage space, the picture to be retrieved can be automatically deleted from the pre-set second storage space. In this way, the occupied space of the pre-set second storage space can be reduced.

[0089] Step 302: perform a search using the temporary search image as a second search target to obtain a second search result.

[0090] The temporary search image is a picture that the user searches for the first time (new picture) or a picture whose search times do not meet the preset search times threshold. The second search target is also the target picture that the user needs to search. The second search result is the result data collected according to the second search target. The second search result can also be picture data, text data, table data, voice data, or archive data.

[0091] Specifically, when the number of searches for the image to be searched is less than the preset search number threshold, it means that the image to be searched may be searched for the first time, or the number of searches for the image to be searched does not reach the preset search number threshold. This means that the image to be searched is not frequently searched. In addition, the second search result is also related data obtained based on the temporary search image.

[0092] When the user's purpose is to search for images by image, the second search result is the image data corresponding to the temporary image. When the user's purpose is to search for text by image, the second search result is the text data corresponding to the temporary image. When the user's purpose is to search for tables by image, the second search result is the table data corresponding to the temporary image. When the user's purpose is to search for voice by image, the second search result is the voice data corresponding to the temporary image. When the user's purpose is to search for archives by image, the second search result is the archive data corresponding to the temporary image, etc. Of course, it can also be other different data, and the specific data type of the second search result can be limited according to the specific usage scenario and purpose of use.

[0093] More specifically, after the second search result is obtained, the second search result can be sent to a receiving end, such as a user's mobile phone, computer or other device, and then displayed to the user, so that the user can process or analyze the second search result.

[0094] It should be noted that if within the same preset time period, after the last retrieval of the picture to be retrieved, it has not been retrieved again, or the number of times it has been retrieved has not reached the preset retrieval number threshold, the retrieval record of the picture to be retrieved can be deleted. After a preset time period, if the picture to be retrieved is retrieved again, it is necessary to retrieve the picture to be retrieved again, and the retrieval record of the picture to be retrieved needs to be re-recorded, and the number of retrievals also needs to be recalculated. In this process, before the number of retrievals of the picture to be retrieved meets the preset retrieval number threshold, the picture to be retrieved is always stored in the pre-set second storage space.

[0095] In this embodiment, it is not necessary to store the pictures that are not frequently retrieved (temporary retrieval pictures) in the pre-set first storage space, thereby reducing the space occupied by the pre-set first storage space. At the same time, the temporary retrieval pictures can also be retrieved, and the retrieval results corresponding to the temporary retrieval pictures can be obtained. In this way, not only the frequently retrieved pictures that are frequently retrieved can be retrieved, but also the temporary retrieval pictures that are not frequently retrieved can be retrieved to obtain the corresponding retrieval results. Thereby improving the retrieval efficiency of the retrieval system.

[0096] Optional, see Figure 4 , Figure 4 is a flowchart of another image retrieval method provided by an embodiment of the present invention. Figure 3 On the basis of, after step 101, the method further includes:

[0097] Step 401: perform structural processing on the image to be retrieved to obtain structured data corresponding to the image to be retrieved, where the structured data includes image features of the image to be retrieved and the image ID of the image to be retrieved.

[0098] Step 104 includes:

[0099] Step 402: perform a search using the picture features and picture IDs of the frequently searched pictures as the first search target to obtain a corresponding first search result, and return the first search result.

[0100] And / or, step 302 includes:

[0101] Step 403: perform a search using the picture feature and picture ID of the temporary search picture as the second search target to obtain a corresponding second search result, and return the second search result.

[0102] The structured data can be obtained by performing structured processing on the image to be retrieved through a preset image model. The image feature includes an image feature value. For example, when the image to be retrieved is a face image, the image feature is a face feature, and the image feature value is a face feature value. The face feature can be obtained by performing structured processing on the face image through a face feature model.

[0103] Specifically, after obtaining the image to be retrieved, the image to be retrieved can be extracted and structurally processed according to the preset image model to obtain the corresponding image features and image ID. When the image to be retrieved is a frequently retrieved image, the corresponding related image data can be searched according to the image features and image ID of the frequently retrieved image, and the related image data found can be used as the first search result to obtain the first search result. Of course, when the image to be retrieved is a temporary search image, the corresponding related image data temporarily stored in the database can be searched according to the image features and image ID of the temporary search image. The related image data found can be used as the second search result, and the second search result is returned.

[0104] Optional, see Figure 5 , Figure 5 is a flowchart of another image retrieval method provided by an embodiment of the present invention. Figure 5 As shown, in Figure 3 Based on this, after step 102, the method further includes:

[0105] Step 501: If the number of retrieval times does not meet a preset retrieval number threshold, it is detected whether an operation instruction to store the image to be retrieved in a preset first storage space is received.

[0106] Step 502: If an operation instruction is received, the image to be retrieved is confirmed as a frequently retrieved image and stored in a pre-set first storage space.

[0107] The above operation instruction is used to forcibly store the to-be-retrieved images whose retrieval times do not meet the preset retrieval times threshold into the pre-set first storage space to form frequently-retrieved images. The operation instruction is triggered by the user in the retrieval system and can be triggered by a page or desktop in the retrieval system.

[0108] Specifically, after obtaining a picture to be retrieved, if the user determines that the picture to be retrieved will be frequently retrieved in the future, the operation instruction can be triggered to force the picture to be retrieved to be stored in a pre-set first storage space to form a frequently retrieved picture, so that when the user retrieves the picture to be retrieved again, it can be directly found in the pre-set first storage space and retrieved.

[0109] In this embodiment, when the user determines that the picture is frequently searched, it can be forced to be a frequently searched picture, so that in subsequent searches, it is not necessary to compare the search times of the picture to be searched with the preset search times threshold, and it is not necessary to store it in the pre-set second storage space to avoid being cleared. This makes it easier to search for pictures, thereby improving the search efficiency of the search system.

[0110] Optional, see Figure 6 , Figure 6 is a flowchart of another image retrieval method provided by an embodiment of the present invention. After step 101, the method further includes:

[0111] Step 601: Determine whether the image to be retrieved is a frequently retrieved image stored in a preset first storage space.

[0112] Step 602: If yes, return to the step of performing a search with the frequently searched pictures as the first search target and return the first search result.

[0113] Specifically, after obtaining a picture to be retrieved, the storage location of the picture to be retrieved can be detected to determine whether the picture to be retrieved is a frequently retrieved picture. If the storage location of the picture to be retrieved is a pre-set first storage space, it means that the picture to be retrieved is a frequently retrieved picture, and then step 104 is executed, and the process of using the frequently retrieved picture for retrieval can be quickly implemented to improve the retrieval efficiency. Of course, if it is detected that the storage location of the picture to be retrieved is a pre-set second storage space or other storage space, it is determined that it is not a frequently retrieved picture.

[0114] In this embodiment, the frequently searched images in the pre-set first storage space can be directly obtained and searched, so there is no need to execute the process of steps 102 to 103, thereby improving the search efficiency of the search system. In addition, the pre-set first storage space is used to store frequently searched images for a long time. As long as you log in to the search system, you can find and search in the pre-set first storage space. Even if you change office equipment or change location, when you want to use frequently searched images, you do not need to copy local images, upload them to the cloud for backup, and do not need to copy them locally or download them from the cloud for search, thereby improving the search efficiency of the search system.

[0115] See also Figure 7 , Figure 7 is a schematic diagram of the structure of an image retrieval device provided by an embodiment of the present invention. The image retrieval device 700 includes:

[0116] The acquisition module 701 is used to acquire the image to be retrieved;

[0117] The first judgment module 702 is used to judge whether the number of times the image to be searched has been searched meets a preset number of times threshold;

[0118] A first determination module 703 is used to determine that the image to be retrieved is a frequently retrieved image if the number of retrievals meets a preset retrieval number threshold, and save the image to be retrieved into a preset first storage space, where the preset first storage space is used for long-term storage of frequently retrieved images;

[0119] The first search module 704 is used to perform a search using the frequently searched pictures as the first search target to obtain a first search result.

[0120] Optional, see Figure 8 , Figure 8 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention. Figure 7 On the basis of, after the first judgment module 702, the image retrieval device 700 further includes:

[0121] The second determination module 705 is used to determine that the image to be retrieved is a temporary retrieval image if the retrieval number does not meet the preset retrieval number threshold, and store the image to be retrieved in a pre-set second storage space, and the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image;

[0122] The second search module 706 is used to perform a search using the temporary search image as a second search target and return a second search result.

[0123] Optional, see Fig. 9 , Fig. 9 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention. Figure 8 On the basis of, after obtaining module 701, the image retrieval device 700 further includes:

[0124] The processing module 707 is used to perform structured processing on the image to be retrieved to obtain structured data corresponding to the image to be retrieved, where the structured data includes image features of the image to be retrieved and an image ID of the image to be retrieved;

[0125] The first search module 704 includes

[0126] The first search unit 7041 is used to perform a search using the picture features and picture IDs of frequently searched pictures as a first search target to obtain a corresponding first search result, and return the first search result.

[0127] And / or, the second retrieval module 706 includes:

[0128] The second retrieval unit 7061 is used to perform a search using the picture feature and picture ID of the temporary retrieval picture as a second retrieval target to obtain a corresponding second retrieval result.

[0129] Optional, see Fig.10 , Fig.10 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention. Figure 8 On the basis of, after the first judgment module 702, the image retrieval device 700 further includes:

[0130] The first detection module 708 is used to detect whether an operation instruction to store the image to be retrieved in a preset first storage space is received if the number of retrievals does not meet a preset retrieval number threshold;

[0131] The confirmation module 709 is used to confirm the to-be-retrieved picture as a frequently-retrieved picture and store it in a pre-set first storage space if an operation instruction is received.

[0132] Optional, see Fig.11 , Fig.11 yes Figure 7 Another structural diagram provided by the first judgment module in the embodiment is Figure 7 On the basis of, the first judgment module 702 includes:

[0133] A detection unit 7021 is used to detect whether there is a search record for the image to be searched;

[0134] A counting unit 7022 is used for counting the number of times the image to be retrieved has been retrieved according to the retrieval record if there is a retrieval record for the image to be retrieved;

[0135] The comparison unit 7023 is used to compare the search times with a preset search times threshold, and determine whether the search times meets the preset search times threshold according to the comparison result.

[0136] Optionally, the statistics unit 7022 includes:

[0137] The first acquisition subunit is used to acquire the user ID of each time the image to be retrieved is retrieved according to the retrieval record.

[0138] The second acquisition subunit is used to acquire the current user ID of the current searching user.

[0139] The number of times the image to be retrieved is retrieved by the current user ID is counted according to the user ID by which the image to be retrieved is retrieved each time.

[0140] The comparison unit 7023 is also used to compare the number of times the image to be retrieved is retrieved by the current user ID with the preset retrieval number threshold of the current user ID, and determine whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID based on the comparison result.

[0141] Optional, see Fig.12 , Fig.12 7 is a schematic diagram of the structure of another image retrieval device provided by an embodiment of the present invention. After the acquisition module 701, the image retrieval device 700 further includes:

[0142] The second judgment module 710 is used to judge whether the image to be retrieved is a frequently retrieved image stored in the preset first storage space;

[0143] Return to the execution module 711, which is used to return to the step of performing a search with the frequently searched pictures as the first search target and returning the first search result if yes.

[0144] The image retrieval device 700 provided in the embodiment of the present invention can implement various implementation methods in the above method embodiment and the corresponding beneficial effects, which will not be described again here to avoid repetition.

[0145] See also Fig.13 , Fig.13 800 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 800 includes: a memory 802, a processor 801, and a computer program stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program, the steps in the image retrieval method provided by the above embodiment are implemented. The processor 801 performs the following steps:

[0146] Get the image to be retrieved;

[0147] Determine whether the number of times the image to be searched has been searched meets a preset number of search times threshold;

[0148] If the number of retrievals meets a preset retrieval number threshold, the image to be retrieved is determined to be a frequently retrieved image, and the image to be retrieved is saved in a pre-set first storage space, where the pre-set first storage space is used for long-term storage of frequently retrieved images;

[0149] A search is performed using the frequently searched images as a first search target to obtain a first search result.

[0150] Optionally, after the processor 801 executes the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the processor 801 further executes the steps of:

[0151] If the number of retrievals does not meet the preset retrieval number threshold, the image to be retrieved is determined to be a temporary retrieval image, and the image to be retrieved is stored in a pre-set second storage space, and the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image;

[0152] The temporary search image is used as the second search target for searching, and the second search result is returned.

[0153] Optionally, after the processor 801 executes the step of obtaining the image to be retrieved, the processor 801 further executes the following steps:

[0154] Performing structural processing on the image to be retrieved to obtain structured data corresponding to the image to be retrieved, the structured data including image features of the image to be retrieved and the image ID of the image to be retrieved;

[0155] The step of searching the frequently searched images as the first search target to obtain the first search result includes:

[0156] A search is performed using the picture features and picture IDs of the frequently searched pictures as the first search target to obtain a corresponding first search result, and the first search result is returned.

[0157] And / or, the step of searching with the temporary search image as the second search target and returning the second search result includes:

[0158] A search is performed using the picture feature and picture ID of the temporary search picture as the second search target to obtain a corresponding second search result.

[0159] Optionally, after the processor 801 executes the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the processor 801 further executes the steps of:

[0160] If the number of retrievals does not meet the preset retrieval number threshold, detecting whether an operation instruction to store the image to be retrieved in a preset first storage space is received;

[0161] If an operation instruction is received, the image to be retrieved is taken as a frequently retrieved image and stored in a pre-set first storage space.

[0162] Optionally, the step of determining whether the number of times the image to be searched is searched satisfies a preset search number threshold, performed by the processor 801, includes:

[0163] Check whether there is a search record for the image to be searched;

[0164] If there is a search record for the image to be searched, the number of times the image to be searched has been searched is counted according to the search record;

[0165] The search times are compared with a preset search times threshold, and whether the search times meet the preset search times threshold is determined based on the comparison result.

[0166] Optionally, the step of counting the number of detection times of the to-be-searched image being searched according to the search record, performed by the processor 801, includes:

[0167] Get the user ID of each time the image to be retrieved is retrieved based on the retrieval records.

[0168] Get the current user ID of the currently retrieved user.

[0169] The number of times the image to be retrieved is retrieved by the current user ID is counted according to the user ID by which the image to be retrieved is retrieved each time.

[0170] The step of comparing the number of searches with a preset number of searches threshold value and determining whether the number of searches meets the preset number of searches threshold value according to the comparison result performed by the processor 801 includes:

[0171] The number of times the image to be retrieved is retrieved by the current user ID is compared with the preset retrieval number threshold of the current user ID, and based on the comparison result, it is determined whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID.

[0172] Optionally, after the processor 801 executes the step of obtaining the image to be retrieved, the processor 801 further executes the steps:

[0173] Determining whether the image to be retrieved is a frequently retrieved image stored in a preset first storage space;

[0174] If so, the process returns to the step of performing a search using the frequently searched images as the first search target and returning the first search result.

[0175] The electronic device 800 provided in the embodiment of the present invention can implement various implementations in the above method embodiment and the corresponding beneficial effects, which will not be described again here to avoid repetition.

[0176] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the image retrieval method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0178] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A picture retrieval method, characterized in that: The method comprises: Get the image to be retrieved; Determine whether the number of times the image to be searched has been searched meets a preset number of times threshold; If the number of retrievals meets a preset retrieval number threshold, the image to be retrieved is determined to be a frequently retrieved image, and the image to be retrieved is saved in a pre-set first storage space, where the pre-set first storage space is used for long-term storage of the frequently retrieved images; Performing a search using the frequently searched image as a first search target to obtain a first search result; The step of determining whether the number of times the image to be searched has been searched meets a preset number of times threshold comprises: Detect whether there is a search record for the image to be searched; If there is a search record for the image to be searched, count the number of times the image to be searched has been searched according to the search record; Compare the search times with a preset search times threshold, and determine whether the search times meets the preset search times threshold according to the comparison result; The step of counting the number of times the image to be retrieved is retrieved according to the retrieval record comprises: Obtaining the user ID of each time the image to be retrieved is retrieved according to the retrieval record; Get the current user ID of the currently retrieved user; Counting the number of times the image to be retrieved is retrieved by the current user ID according to the user ID of each time the image to be retrieved is retrieved; The step of comparing the number of searches with a preset number of searches threshold and determining whether the number of searches meets the preset number of searches threshold according to the comparison result comprises: The number of times the image to be retrieved is retrieved by the current user ID is compared with the preset retrieval number threshold of the current user ID, and based on the comparison result, it is determined whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID.

2. The image retrieval method according to claim 1, characterized in that: After the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the method further comprises the steps of: If the number of retrievals does not meet the preset retrieval number threshold, the image to be retrieved is determined to be a temporary retrieval image, and the image to be retrieved is stored in a pre-set second storage space, and the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image; The temporary search image is used as a second search target for searching, and a second search result is returned.

3. The image retrieval method according to claim 2, characterized in that: After the step of obtaining the image to be retrieved, the method further includes: Performing structural processing on the image to be retrieved to obtain structured data corresponding to the image to be retrieved, wherein the structured data includes image features of the image to be retrieved and an image ID of the image to be retrieved; The step of searching the frequently searched images as the first search target to obtain the first search result includes: Performing a search using the picture features and picture ID of the frequently searched pictures as a first search target to obtain a corresponding first search result, and returning the first search result; And / or, the step of searching with the temporary search image as the second search target and returning the second search result includes: A search is performed using the picture features and picture ID of the temporary search picture as the second search target to obtain a corresponding second search result to obtain the second search result.

4. The image retrieval method according to claim 2, wherein: After the step of determining whether the number of times the image to be searched has been searched meets a preset search number threshold, the method further includes: If the retrieval times do not meet the preset retrieval times threshold, detecting whether an operation instruction to store the to-be-retrieved picture in the preset first storage space is received; If the operation instruction is received, the image to be retrieved is taken as a frequently retrieved image and stored in the pre-set first storage space.

5. A picture retrieval device, used in a retrieval system, characterized in that: The device comprises: The acquisition module is used to obtain the image to be retrieved; The first judgment module is used to judge whether the number of times the image to be searched has been searched meets a preset number of times threshold; A first determination module is used to determine that the image to be retrieved is a frequently retrieved image if the number of retrievals meets a preset retrieval number threshold, and save the image to be retrieved into a preset first storage space, wherein the preset first storage space is used for long-term storage of the frequently retrieved images; A first search module, used to search the frequently searched images as a first search target to obtain a first search result; The first judgment module includes: A detection unit, used to detect whether there is a search record for the image to be searched; A counting unit, for counting the number of times the image to be retrieved is retrieved according to the retrieval record if there is a retrieval record for the image to be retrieved; A comparison unit, used to compare the search times with a preset search times threshold, and determine whether the search times meets the preset search times threshold according to the comparison result; The statistical unit comprises: A first acquisition subunit is used to acquire the user ID of each time the image to be retrieved is retrieved according to the retrieval record; The second acquisition subunit is used to obtain the current user ID of the current searching user; The second acquisition subunit is further used to count the number of times the image to be retrieved is retrieved by the current user ID according to the user ID of each time the image to be retrieved is retrieved; The comparison unit is also used to compare the number of times the image to be retrieved is retrieved by the current user ID with a preset retrieval number threshold of the current user ID, and determine whether the number of times the image to be retrieved is retrieved by the current user ID meets the preset retrieval number threshold of the user ID based on the comparison result.

6. The image retrieval device according to claim 5, characterized in that: After the first determining module, the device further includes: A second determination module is used to determine that the image to be retrieved is a temporary retrieval image if the retrieval number does not meet a preset retrieval number threshold, and store the image to be retrieved in a pre-set second storage space, wherein the pre-set second storage space is used to automatically and temporarily store the temporary retrieval image; The second search module is used to search with the temporary search image as the second search target and return the second search result.

7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the image retrieval method as claimed in any one of claims 1 to 4 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the image retrieval method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Image retrieving method, electronic equipment and storage medium

    CN108228792A

  • Photo album processing method, device, terminal and storage medium

    CN108573044A