Picture searching method and device, electronic equipment and storage medium

The integration of NLP models to convert user queries into search conditions addresses limitations in existing image classification and search systems, enhancing accuracy and usability through multi-dimensional image retrieval.

CN120316291APending Publication Date: 2025-07-15WUHAN LAZYMAO WEIFU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510387043.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the prior art, the image classification and search functions on mobile devices are limited, which cannot meet user needs, especially the multi-dimensional search cannot be performed in natural language, and the classification accuracy is not high.

Method used

Artificial intelligence technology is used to classify images, convert search statements entered by users into search conditions through natural language processing models, and use AI technology to accurately search and classify the image library.

Benefits of technology

It realizes more accurate search and classification of image libraries, improves the accuracy of image classification and the usability of AI technology, and improves user search efficiency and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316291A_ABST
    Figure CN120316291A_ABST
Patent Text Reader

Abstract

The invention provides a picture searching method and device, electronic equipment and a storage medium. The method comprises the steps that a search statement input by a user is acquired; converting the search statement into a search condition; searching a picture library according to the search condition to obtain a target picture matched with the search condition; and returning the searched target picture. The picture library can be searched more accurately, the picture classification accuracy is improved, and the availability of the AI technology is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of natural language processing, and particularly to a method and apparatus for image search, an electronic device, and a storage medium. Background Art

[0002] With the popularization of mobile devices and the increasing usage rate of cameras, users usually have a large number of images stored in their mobile devices. Currently, on mobile devices, images are generally classified and searched according to predefined classification rules. Even with the use of cloud resources, it is impossible to improve the accuracy of classification and search. Summary of the Invention

[0003] In view of this, this specification provides a method and apparatus for image search, an electronic device, and a storage medium.

[0004] According to the first aspect of the embodiments of this specification, a method for image search is provided. The method is executed by an electronic device and includes:

[0005] Obtain a search statement input by a user;

[0006] Convert the search statement into a search condition;

[0007] Search an image library according to the search condition to obtain target images matching the search condition;

[0008] Return the searched target images.

[0009] According to the second aspect of the embodiments of this specification, an apparatus for image search is provided. The apparatus includes:

[0010] An obtaining module, configured to obtain a search statement input by a user;

[0011] A conversion module, configured to convert the search statement into a search condition;

[0012] A search module, configured to search an image library according to the search condition to obtain target images matching the search condition;

[0013] A return module, configured to return the searched target images.

[0014] According to the third aspect of the embodiments of this specification, an electronic device is provided. The device includes:

[0015] One or more processors; wherein, the processor is configured to execute the steps of the method according to any one of the first aspect.

[0016] According to a fourth aspect of the embodiments of the present specification, there is provided a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0017] According to a fifth aspect of the embodiments of the present specification, there is provided a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0018] The technical solutions provided by the embodiments of the present specification may include the following beneficial effects:

[0019] In the embodiments of the present specification, the natural search statement input by the user can be converted into search conditions, so as to search the picture library and return the pictures that the user expects to search for. Through Artificial Intelligence (AI) technology, more accurate search and classification of the picture library are realized, the accuracy of picture classification is improved, and the usability of AI technology is also improved.

[0020] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present specification, and are used together with the specification to explain the principles of the present specification.

[0022] Figure 1 is one of the schematic flowcharts of a picture search method provided by an exemplary embodiment.

[0023] Figure 2 is another schematic flowchart of a picture search method provided by an exemplary embodiment.

[0024] Figure 3 is yet another schematic flowchart of a picture search method provided by an exemplary embodiment.

[0025] Figure 4 is still another schematic flowchart of a picture search method provided by an exemplary embodiment.

[0026] Figure 5 is a schematic structural diagram of a picture search device provided by an exemplary embodiment.

[0027] Figure 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] Exemplary embodiments will be described in detail herein, and examples thereof are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0029] The terms used in this specification are for the purpose of describing particular embodiments only and are not intended to limit this specification. The singular forms "a", "the", and "said" used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0031] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0032] In the related art, taking a terminal as an example, its picture classification and search functions are limited and cannot meet the user's needs. Additionally, its picture classification function is usually automatically completed by the system, cannot be customized, and the classification accuracy is not high. Furthermore, the picture search function on the terminal usually can only search using keywords and cannot search using natural language, let alone achieve multi-dimensional search, such as being unable to search simultaneously according to information such as time, location, and people.

[0033] To solve the above problems, embodiments of the present disclosure provide the following image search methods and devices, electronic devices, and storage media. Artificial intelligence technology can be used to classify images more accurately. Users can use natural language to search for images, and AI technology can be used to classify images more accurately.

[0034] First, the image search method provided by the present disclosure will be introduced below.

[0035] Figure 1 It is a schematic flowchart of an image search method provided according to an exemplary embodiment. As Figure 1 shown, this method can be executed by an electronic device. Among them, the electronic device includes but is not limited to terminals such as mobile phones, personal assistants, laptop computers, desktop computers, etc. This method may include the following steps:

[0036] Step S101, obtain a search statement input by the user.

[0037] In some embodiments, the electronic device may output a user interface (User Interface, UI), and the electronic device obtains the search statement input by the user in a text or voice manner through this user interface.

[0038] For example, the electronic device obtains the voice input by the user: "I want to find pictures (or photos) taken in Yunnan last year."

[0039] For another example, the electronic device obtains the text "last year" and "Yunnan" input by the user on this user interface.

[0040] In some embodiments, a search engine may be deployed on the electronic device, and the search engine can obtain the search statement input by the user through an interface with the user interface.

[0041] In one example, the search engine can convert the voice input by the user into text to obtain the search statement.

[0042] In one example, the search engine can combine the text or phrases input by the user into a search statement. For example, combine "last year" and "Yunnan" into "pictures taken in Yunnan last year".

[0043] The above is only an exemplary illustration, and the present disclosure does not limit the solution for obtaining the search statement.

[0044] Step S102, convert the search statement into a search condition.

[0045] In some embodiments, the search engine can perform semantic analysis on a search statement through a Natural Language Processing (NLP) model to determine the semantic analysis result.

[0046] In one example, the NLP model can include, but is not limited to, at least one of the following: a word embedding model; a recurrent neural network; a long short-term memory network; a neural network based on an attention mechanism; a generative adversarial network, etc. The present disclosure does not limit the type of the NLP model used.

[0047] In one example, the NLP model can perform, but is not limited to, word sense disambiguation, entity recognition, relation extraction, and / or dependency parsing on the search statement to determine the semantic analysis result. Among them, the semantic analysis result can include at least one phrase obtained by partitioning and / or an identified entity.

[0048] Exemplarily, word sense disambiguation can refer to determining the specific meaning of a word in different contexts.

[0049] Exemplarily, entity recognition can identify named entities in the text, such as person names, locations, organizations, time, etc.

[0050] Exemplarily, relation extraction can identify the relationships between entities.

[0051] Exemplarily, dependency parsing can analyze the dependency relationships between words in a sentence, such as subject-predicate relationships, verb-object relationships, etc.

[0052] Further, the search engine can extract search information from the search statement according to the above semantic analysis result. The search information includes, but is not limited to, date information and / or geographical location information.

[0053] For example, if the search statement is "I want to find pictures taken in Yunnan last year", the partitioned phrases are respectively "I", "want", "find", "last year", "Yunnan", "taken", "pictures", among which the extracted date information can be "last year" and the geographical location information can be "Yunnan".

[0054] Further, the search engine can convert the above search information to obtain a first search condition.

[0055] Specifically, a search engine can convert date information into a date search condition through a time semantic parsing model such as the Chinese NLP preprocessing and parsing toolkit JioNLP. This date search condition is used to indicate the date range to be searched. For example, "last year" is converted to "January 1, 2023 to December 31, 2023". Another example is that "during the National Day" can be converted to "October 1 to October 7".

[0056] Specifically, a search engine can convert geographical location information into a location search condition through a time semantic parsing model such as JioNLP. This location search condition is used to indicate the geographical location range to be searched. For example, "Yunnan" is converted to "Yunnan Province", and "Beijing" is converted to "Beijing City". Another example is that "Lijiang, Yunnan" can be converted to "Lijiang City, Yunnan Province".

[0057] The above is only an exemplary illustration, and the present disclosure does not limit the specific scheme for converting to the first search condition.

[0058] Furthermore, the search engine can convert the remaining text in the search statement into a search vector to obtain a second search condition.

[0059] For example, the search statement is "I want to find pictures taken last year in Yunnan". After removing the phrases of date information and location information, the remaining text includes "I want to find pictures of...". Convert this remaining text into a search vector, and the search vector constitutes the second search condition.

[0060] Another example is that the search statement is "I want to find pictures with water taken last year in Yunnan". After removing the phrases of date information and location information, the remaining text includes "I want to find pictures with water taken by...". Convert this remaining text into a search vector, and the search vector constitutes the second search condition.

[0061] It should also be noted that the electronic device can determine the third search condition in any of the following ways, and this third search condition can be used to indicate the living body to be searched:

[0062] Method 1: The user can select a certain living body on a certain picture. For example, the user long-presses on the face position on the picture. The search engine detects this long-press operation, extracts the feature information of the face, and uses it as the third search condition.

[0063] Method 2: Multiple pictures of living bodies are provided in advance in the picture library. For example, multiple face pictures are provided. The user selects one of the face pictures, and then the search engine can use the feature information of this face as the third search condition.

[0064] The above is only an exemplary illustration, and the present disclosure does not limit the process of converting search information into search conditions.

[0065] Step S103, search the image library according to the search conditions to obtain target images that match the search conditions.

[0066] In some embodiments, the search engine can filter the associated data of each image stored in the image library according to the above search conditions, such as at least one of the first search condition, the second search condition, and the third search condition, to filter out target images that match the search conditions.

[0067] In one example, the associated data of the image includes but is not limited to at least one of the following: identification information of the image; vector set of the image; text information in the image; date information of the image; geographical location information of the image; living body information in the image.

[0068] Exemplarily, the identification information of the image can be used to distinguish different images.

[0069] Exemplarily, the vector set of the image can refer to a set composed of vectors obtained after vectorizing the image.

[0070] Exemplarily, the text information in the image can refer to information of the text recognized in the image.

[0071] Exemplarily, the date information of the image can be the date information when the image was taken, or the date information when the image was imported into the electronic device.

[0072] Exemplarily, the geographical location information of the image can include but is not limited to the geographical location information where the image was taken, or the geographical location information where the image was imported, or the geographical location information included in the image.

[0073] Exemplarily, a living body can refer to a living animal or plant.

[0074] Among them, the living body information can include but is not limited to at least one of the following: face information; human body information; animal posture information; animal type information (such as cats, dogs, tigers, lions, etc.); plant type information (such as various trees, various flowers, etc.).

[0075] Among them, the process of obtaining the associated data of each image will be introduced in subsequent Figure 4 embodiments and will not be introduced here temporarily.

[0076] For example, the search statement is "I want to find pictures taken in Yunnan last year". The first search conditions include: "from January 1, 2023 to December 31, 2023", "Yunnan Province", and the second search condition includes the search vector formed by "I want to find pictures taken by...". According to the above search conditions, the relevant information of each picture in the picture library can be used to match "from January 1, 2023 to December 31, 2023" and "Yunnan Province" to determine the target pictures.

[0077] Another example, the search statement is "I want to find pictures with water taken in Yunnan last year". The first search conditions include: "from January 1, 2023 to December 31, 2023", "Yunnan Province", and the second search condition includes the search vector corresponding to "I want to find pictures with water taken by...". According to the above search conditions, the relevant information of each picture in the picture library can be used to match the target pictures that match "from January 1, 2023 to December 31, 2023", "Yunnan Province", and "water". Among them, the target pictures have the entity of "water", or the text of "water" in the target pictures.

[0078] Another example, the search statement is "I want to find pictures with the Great Wall taken in Beijing last year's National Day". The first search conditions include: "from October 1, 2023 to October 7, 2023", "Beijing", and the second search condition includes the search vector corresponding to "I want to find pictures with the Great Wall taken by...". For example, the text of the picture contains "the Great Wall", or the physical object of "the Great Wall" is in the vector obtained by converting the picture, or the similarity between the entity in the picture and "the Great Wall" is greater than or equal to a threshold (such as a city wall extremely similar to the Great Wall). According to the above search conditions, the corresponding target pictures can be found in the picture library. For example, Picture #1 was taken at the Badaling Great Wall in Yanqing District, Beijing on October 4, 2023, Picture #2 was taken in Beijing on October 5, 2023 with the words "He who has never been to the Great Wall is not a true man", and Picture #3 was taken in Beijing on October 5, 2023 with a city wall similar in shape to "the Great Wall"......

[0079] For another example, the search statement is "I want to find pictures with the Great Wall taken in Beijing last November", and the user selects face #a from multiple face pictures provided by the picture library. The first search condition includes "from October 1, 2023 to October 7, 2023" and "Beijing". The second search condition includes the search vector corresponding to "I want to find pictures with the Great Wall taken...". The third search condition includes the feature information corresponding to face #a. The electronic device can find the corresponding target pictures from the picture library according to the above search conditions. For example, picture #1 is a picture with a single face #a taken at Badaling Great Wall, Yanqing District, Beijing on October 4, 2023. Picture #2 is a picture with the words "He who has never been to the Great Wall is not a true man" and faces #a and #b taken in Beijing on October 5, 2023. Picture #3 is a picture with a city wall similar in shape to the "Great Wall" and faces #a, #c, and #d taken in Beijing on October 5, 2023...

[0080] The above is only an exemplary illustration, and the present disclosure does not limit the process of searching the picture library.

[0081] Step S104, return the searched target pictures.

[0082] In some embodiments, the search engine can return at least one searched target picture to the user.

[0083] In some embodiments, the search engine can provide the target pictures to the user in the order of the shooting time of the target pictures from the latest to the earliest. For example, the later the shooting time, the closer the shooting time of the target picture is to the current time point and can be displayed before other target pictures.

[0084] In some embodiments, the search engine can provide the target pictures to the user in the order of the matching degree of the target pictures with the search conditions from high to low. For example, the target pictures with a higher matching degree with the search conditions can be displayed before other target pictures.

[0085] In the above embodiments, the natural search statement input by the user can be converted into search conditions, so as to search the picture library and return the pictures that the user expects to search. Through AI technology, more accurate search and classification of the picture library are realized, the accuracy of picture classification is improved, and the usability of AI technology is improved.

[0086] Figure 2 is according to Figure 1 Another flowchart of a picture search method provided by the shown embodiment. As Figure 2 shown, the method may further include the following steps:

[0087] Step S105, save the target pictures as a dynamic album.

[0088] In some embodiments, after the search engine returns the target images, the electronic device may call a processor to save the returned target images as a dynamic album.

[0089] It can be understood that if the user subsequently selects to enter the dynamic album, it is determined that the user has performed a search using the corresponding search criteria and the electronic device has returned the searched target images.

[0090] In the above embodiments, the electronic device can implement the saving of the dynamic album, improving the efficiency of the user's image search and having high usability.

[0091] Figure 3 is according to Figure 2 shown in the flowchart of another image search method provided by the embodiments. As Figure 3 shown, the method may further include the following steps:

[0092] Step S106, update the dynamic album.

[0093] In some embodiments, the electronic device may update and cache the dynamic album when the album update condition is met.

[0094] In one example, the album update condition includes at least one of the following: reaching the update time point; the image library has been updated.

[0095] Exemplarily, an album update period may be set, assumed to be daily, and the electronic device updates and caches the dynamic album every day.

[0096] Exemplarily, when the image library has been updated, such as new images are imported, some images are deleted by the user, or the user adjusts the color, size, pixels, etc. of some images, the electronic device may update and cache the dynamic album at this time.

[0097] In the above embodiments, the dynamic album can be updated and cached regularly, improving the user experience and the search performance.

[0098] Figure 4 is according to Figure 1 shown in the flowchart of another image search method provided by the embodiments. As Figure 4 shown, before executing step S101, the method may further include the following steps:

[0099] Step S401, obtain the images input by the user.

[0100] In some embodiments, the user may input one or more images, and the electronic device may obtain these images.

[0101] Step S402, process the images through at least one processor to obtain the associated data of the images.

[0102] In some embodiments, the electronic device may vectorize the imported pictures through a vector processor to obtain a vector set for each picture.

[0103] In one example, the vector processor may call the Milvus vector database to vectorize the pictures.

[0104] In some embodiments, the electronic device may recognize the text in the pictures through an Optical Character Recognition (OCR) processor to obtain the text information in each picture.

[0105] In one example, the OCR processor may include, but is not limited to, the PaddleOCR processor.

[0106] In some embodiments, the electronic device may obtain the longitude and latitude information of the pictures through a location information processor and convert the longitude and latitude information into the geographical location information of each picture.

[0107] In one example, the location information processor may obtain the longitude and latitude information from the Exchangeable Image File (EXIF) information of each picture. Further, the reverse geocoding method may be adopted to convert the longitude and latitude information into specific geographical location information.

[0108] Among them, reverse geocoding refers to obtaining the relevant description of the location according to the longitude and latitude. Specifically, by inputting the longitude and latitude coordinates, the specific address information of the location can be returned, including detailed information such as streets and cities.

[0109] For example, if the longitude and latitude are (a, b), through reverse geocoding, we can obtain ** District, ** Street, Beijing City.

[0110] In some embodiments, the electronic device may recognize the live bodies in the pictures through a live body recognition processor to obtain the live body information in each picture.

[0111] In one example, the live body recognition processor may use OpenCV.

[0112] In some embodiments, the electronic device may extract the date information of the pictures through a date information processor.

[0113] In one example, the date information processor may obtain the date information from the EXIF information of each picture. If the date information cannot be extracted from the EXIF information of the picture, the date of importing the picture may be used as the date information.

[0114] Step S403: Store the associated data of the pictures in the picture library.

[0115] In some embodiments, the corresponding associated data can be stored for each picture in the picture library.

[0116] In one example, the associated data can be stored in the following manner:

[0117] {

[0118] Identifier Id, / / The unique identifier of the picture

[0119] Vector, / / The set composed of the vectors of the picture

[0120] OCR, / / The OCR information of the picture, usually an array of strings containing all the extracted text

[0121] Time, / / The date information of the picture, usually an array of strings containing all the extracted time

[0122] GeoLocation, / / The geographical location information of the picture, usually an array of strings containing all the extracted geographical locations

[0123] Face, / / The face information of the picture, usually an array of strings containing all the extracted face information

[0124] }

[0125] The above is only an exemplary illustration, and the present disclosure does not limit the specific manner of storing the associated data.

[0126] It should also be noted that after the electronic device extracts the live body information in the picture, the live body can be displayed as an icon at a specified position in the picture library, such as the front of the picture library, or the upper left corner of each picture, or as the cover of a personal photo album.

[0127] In the above embodiments, each picture can be processed by the processor to obtain the associated information of each picture and store the associated information, so as to utilize AI technology subsequently to achieve fast search and classification of pictures, improve the accuracy of picture classification, and improve the usability of AI technology.

[0128] The above process is further illustrated by the following examples.

[0129] The present disclosure provides the following classification process:

[0130] For each incoming picture, it can be classified by the following types of processors:

[0131] 1. Image vectorization: Convert the image into a vector by vectorization and store the vector in the database. Many AI vector databases support image vectorization, such as Milvus.

[0132] 2. OCR processor: Use the OCR processor to recognize the text in the image and store the recognized text in the database. Commonly used OCR processors include the PaddleOCR offline database.

[0133] 3. Geographical location processor: The processing of geographical location information is a bit more complex. First, read the geographical location information stored in the image, which is usually the information containing latitude and longitude in the EXIF information of the image. However, the raw geographical location information is not very helpful for subsequent searches. Therefore, it is necessary to convert the geographical location information into more specific geographical location information, such as converting latitude and longitude into a more specific address. This process is called reverse geocoding. For example, if the latitude and longitude are (a, b), through reverse geocoding, you can get **District, **Street, Beijing. The finally stored geographical location information is **District, **Street, Beijing.

[0134] 4. Face recognition processor: Use the face recognition processor to recognize the faces in the image and store the recognized face information in the database. Open-source libraries such as OpenCV are usually used in face recognition processors.

[0135] 5. Date information processor: Use the image date information processor to extract the date information of the image and store the extracted date information in the database. The image date information processor usually uses the date information in the EXIF information. If this date information is not included, the time when the image is stored in the electronic device can be used.

[0136] Through the above four types of processors, the following data can be stored in the database

[0137] {

[0138] Id, / / The unique id of the image

[0139] Vector, / / The vector set of the image

[0140] Ocr, / / The ocr information of the image, usually an array of strings containing all the extracted text

[0141] Time, / / The time information of the image, usually an array of strings containing all the extracted times

[0142] GeoLocation, / / Geographical location information of the image, usually an array of strings containing all the extracted geographical locations

[0143] Face, / / Face information of the image, usually an array of strings containing all the extracted face information

[0144] }

[0145] Next, let's introduce the search process:

[0146] To enable users to search for images through natural language, a search engine can be provided. This search engine can accept the natural language input by the user, convert the natural language into search conditions, and search for images that meet the conditions in the vector database through the search conditions. To implement this function, the following steps can be taken to process the text input by the user:

[0147] 1. Extract date information. Since the user uses natural language, it is necessary to be able to recognize the date information input by the user, such as "last year", "yesterday", "2021", "January 1, 2021", etc. For this step, we need to rely on a natural language processing library specifically for time, such as time semantic parsing like JioNLP, to convert this into a time, and finally form a time range. For example, "last year" can be converted to January 1, 2023 to December 31, 2023. During the National Day last year, it can be converted to October 1, 2023 to October 8, 2023.

[0148] Additionally, if the text contains date information, the new text needs to remove the matching date information. For example, "Images during the National Day last year" is converted to "Images during the National Day".

[0149] 2. Extract geographical location information. Since the user uses natural language, it is necessary to be able to recognize the geographical location information input by the user, such as "Beijing", "Beijing City", "Haidian District, Beijing City", etc. For this step, a natural language processing library specifically for geographical locations can be used, such as geographical location semantic parsing like JioNLP, to convert this into a geographical location, and finally form a geographical location range. For example, "Beijing" can be converted to Beijing City, Haidian District.

[0150] Additionally, if the text contains geographical location information, the new text needs to remove the matching geographical location information. For example, "Images of Haidian District, Beijing City" is converted to "Images of".

[0151] 3. Use the remaining text as keywords, then convert it into a vector, and then use this vector to search for images that meet the conditions in the vector database.

[0152] 4. Filter the retrieved images by information such as time, geographical location, face, and OCR, and finally return them to the user.

[0153] Regarding the dynamic album:

[0154] Based on the implemented search function, a dynamic album can be realized. Users can save any search conditions as a dynamic album. Entering this album means searching according to the saved search conditions and returning the search results. Considering the search performance and enhancing the user experience, the search results can be cached regularly (for example, set to 1 minute).

[0155] In some embodiments, this specification also provides an image search device, as Figure 5 shown, the device may include:

[0156] An acquisition module 501, configured to acquire a search statement input by a user;

[0157] A conversion module 502, configured to convert the search statement into search conditions;

[0158] A search module 503, configured to search an image library according to the search conditions to obtain target images matching the search conditions;

[0159] A return module 504, configured to return the searched target images.

[0160] In some embodiments, this specification also provides an electronic device, which may include: one or more processors; wherein, the processor is configured to execute the steps of the method described in any one of the foregoing.

[0161] Figure 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Please refer to Figure 6 , at the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610. Of course, there may also be other hardware required for other functions. One or more embodiments of this specification can be implemented in a software manner. For example, a large model is deployed on this server, and the processor 602 reads the corresponding computer program from the non-volatile memory 610 into the memory 608 and then runs it. Of course, in addition to the software implementation manner, one or more embodiments of this specification do not exclude other implementation manners, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and can also be hardware or a logic device.

[0162] Based on the same concept as the above method, this specification also provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0163] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0164] After considering the specification and practicing the invention claimed herein, those skilled in the art will readily conceive of other embodiments of this specification. This specification is intended to cover any variations, uses, or adaptations of this specification, which follow the general principles of this specification and include known common knowledge or conventional technical means in the technical field not claimed in this specification. The specification and the embodiments are to be regarded as exemplary only, and the true scope and spirit of this specification are pointed out by the following claims.

[0165] It should be understood that this specification is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is only limited by the appended claims.

[0166] The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of this specification shall be included within the scope of protection of this specification.

Claims

1. A method for image search, characterized in that, The method is executed by an electronic device, and the method includes: Obtain a search statement input by a user; Convert the search statement into a search condition; Search an image library according to the search condition to obtain a target image matching the search condition; Return the searched target image.

2. The method according to claim 1, characterized in that The converting the search statement into a search condition includes: Perform semantic analysis on the search statement through a natural language processing model to determine a semantic analysis result; Extract search information from the search statement according to the semantic analysis result, where the search information includes date information and / or geographical location information; Based on the search information, convert to obtain a first search condition; Convert the remaining text in the search statement into a search vector to obtain a second search condition.

3. The method according to claim 2, wherein The converting to obtain a first search condition based on the search information includes at least one of the following: Convert the date information into a date search condition, where the date search condition is used to indicate a date range to be searched; Convert the geographical location information into a location search condition, where the location search condition is used to indicate a geographical location range to be searched.

4. The method according to claim 1, wherein The searching the image library according to the search condition to obtain a target image matching the search condition includes: Filter the associated data of each image stored in the image library according to the search condition to filter out the target image matching the search condition.

5. The method according to claim 4, wherein The method further includes: Obtain an image passed in by the user; Process the image through at least one processor to obtain associated data of the image; Store the associated data of the image in the image library.

6. The method according to claim 5, characterized in that, The associated data includes at least one of the following: Identification information of the image; Vector set of the image; Text information in the image; Date information of the image; Geographical location information of the image; Liveness information in the image.

7. The method according to claim 6, wherein The processing the image through at least one processor to obtain storage data of the image includes at least one of the following: Vectorize the image through a vector processor to obtain a vector set of the image; Recognize the text in the image through an optical character recognition (OCR) processor to obtain the text information in the image; Obtain the longitude and latitude information of the image through a location information processor, and convert the longitude and latitude information into the geographical location information of the image; Recognize the liveness in the image through a liveness recognition processor to obtain the liveness information in the image; Extract the date information of the image through a date information processor.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Save the target image as a dynamic photo album.

9. The method according to claim 8, wherein The method further includes: Update the dynamic photo album when an album update condition is met.

10. The method according to claim 9, characterized in that The album update condition includes at least one of the following: Reaching an update time point; The image library has been updated.

11. An image search device, characterized in that, The device includes: An obtaining module, configured to obtain a search statement input by a user; A converting module, configured to convert the search statement into a search condition; A searching module, configured to search an image library according to the search condition to obtain a target image matching the search condition; A return module for returning the searched target picture.

12. An electronic device, characterized in that, The device includes: One or more processors; wherein, the processor is configured to execute the steps of the method according to any one of claims 1-10.

13. A computer-readable storage medium having computer instructions stored thereon, characterized in that, When the instruction is executed by the processor, it implements the steps of the method according to any one of claims 1-10.

14. A computer program product, characterized in that, It includes a computer program / instructions, and when the computer program / instructions are executed by the processor, it implements the steps of the method according to any one of claims 1-10.