Image recognition method and device

Through network search and entity word sorting technology, the problem of low image recognition accuracy is solved and the effect of improving recognition accuracy is achieved. Feature augmentation is performed through web page text from multiple different sources, which enhances image understanding and recognition capabilities.

CN111859095BActive Publication Date: 2024-08-30BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN201910260784.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-02
Publication Date
2024-08-30
Estimated Expiration
2039-10-02

AI Technical Summary

Technical Problem

There is a problem of low recognition accuracy in image recognition in the prior art.

Method used

By obtaining the target image and conducting a network search on it, we obtain web page text from multiple different sources, extract and sort entity words, use the LambdaMART sorting model to calculate the matching probability of entity words and images, and output the recognition results.

Benefits of technology

It improves the accuracy of image recognition, augments the features of target images through the data layer, and enhances image understanding and recognition capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111859095B
    Figure CN111859095B
Patent Text Reader

Abstract

The present invention discloses a method for image recognition, comprising: obtaining a target image; performing a network search on the target image to obtain a plurality of web page texts of the target image distributed in the network, wherein the sources of the plurality of web page texts are different; performing entity word extraction on the plurality of web page texts to obtain a plurality of entity words; sorting the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image; obtaining a recognition result of the target image based on the sorting result, and outputting the recognition result. The present invention can improve the accuracy of image recognition. At the same time, the present invention also discloses an image recognition device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method and device for image recognition. Background Art

[0002] Image search technology can realize the search of images, obtain images related to the search entity word, and identify the content in the image. For example: who is the person in the image, what is the object in the image, where the scenery in the image belongs, etc. This is often called "guessing the word from the picture".

[0003] However, currently, when performing image recognition based on image search technology, there is a common technical problem of low recognition accuracy. Summary of the invention

[0004] The embodiments of the present application provide a method and device for image recognition, thereby solving the technical problem of low recognition accuracy in the prior art when performing image recognition, and achieving the technical effect of improving the recognition accuracy.

[0005] In the first aspect, the present application provides the following technical solutions through an embodiment of the present application:

[0006] A method for image recognition, comprising:

[0007] Get the target image;

[0008] Performing a network search for the target image to obtain a plurality of web page texts of the target image distributed on the network, wherein the plurality of web page texts are from different sources;

[0009] Extracting entity words from the multiple webpage texts to obtain multiple entity words;

[0010] Sorting the multiple entity words based on the text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image;

[0011] Obtain a recognition result of the target image based on the sorting result, and output the recognition result.

[0012] Preferably, the performing a network search on the target image to obtain a plurality of web page texts of the target image distributed on the network includes:

[0013] Searching the target image using an image search engine to obtain multiple images that are identical or similar to the target image and are distributed throughout the Internet, where the multiple images are located on different web pages;

[0014] Extract description information of each of the multiple pictures from the web page where each of the multiple pictures is located, and use the description information as the web page text.

[0015] Preferably, extracting entity words from the plurality of web page texts to obtain a plurality of entity words includes:

[0016] Based on a pre-built entity word library, entity words are extracted from each of the multiple web page texts to obtain multiple entity words.

[0017] Preferably, the entity word extraction is performed on each of the plurality of web page texts based on the pre-built entity word library to obtain a plurality of entity words, including:

[0018] Segmenting each of the plurality of web page texts to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; searching for each of the M segmented words in the entity word library and using the segmented words found as the entity word; and / or

[0019] Each of the multiple web page texts is segmented to obtain M segmented words, where the M segmented words are different and M is a positive integer; based on a preset strategy, the M segmented words are reorganized to obtain N reorganized words, where N is a positive integer; each of the M segmented words is searched in the entity word library, and each of the N reorganized words is searched, and the found segmented words and reorganized words are used as the entity words.

[0020] Preferably, the sorting of the plurality of entity words based on the text-image relevance to obtain the sorting result includes:

[0021] Get feature information of each entity word;

[0022] The feature information is input into the LambdaMART sorting model to obtain the sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability between each entity word and the image content based on the feature information, and sort the multiple entity words in order of matching probability from high to low, and output the sorting result.

[0023] Preferably, obtaining the recognition result of the target image based on the sorting result includes:

[0024] The top Q entity words are selected from the sorting results, where Q is a positive integer, and the Q entity words are used as the recognition results of the target image.

[0025] In a second aspect, the present application provides the following technical solution through an embodiment of the present application:

[0026] A picture recognition device, comprising:

[0027] An acquisition unit, used for acquiring a target image;

[0028] A search unit, configured to perform a network search for the target image, and obtain a plurality of web page texts of the target image distributed on the network, wherein the plurality of web page texts are from different sources;

[0029] An extraction unit, configured to extract entity words from the plurality of web page texts to obtain a plurality of entity words;

[0030] A sorting unit, configured to sort the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to a relevance between the entity words and the target image;

[0031] An obtaining unit, configured to obtain a recognition result of the target image based on the sorting result;

[0032] An output unit is used to output the recognition result.

[0033] Preferably, the search unit is specifically used for:

[0034] The target image is searched by using an image search engine to obtain multiple images that are identical or similar to the target image and are distributed throughout the entire network, wherein the multiple images are located on different web pages; description information of each of the multiple images is extracted from the web page where each of the multiple images is located, and the description information is used as the web page text.

[0035] Preferably, the extraction unit is specifically used for:

[0036] Based on a pre-built entity word library, entity words are extracted from each of the multiple web page texts to obtain multiple entity words.

[0037] Preferably, the extraction unit is specifically used for:

[0038] Segmenting each of the plurality of web page texts to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; searching for each of the M segmented words in the entity word library and using the segmented words found as the entity word; and / or

[0039] Each of the multiple web page texts is segmented to obtain M segmented words, where the M segmented words are different and M is a positive integer; based on a preset strategy, the M segmented words are reorganized to obtain N reorganized words, where N is a positive integer; each of the M segmented words is searched in the entity word library, and each of the N reorganized words is searched, and the found segmented words and reorganized words are used as the entity words.

[0040] Preferably, the sorting unit is specifically used to:

[0041] Acquire feature information of each entity word; input the feature information into the LambdaMART sorting model to obtain the sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability between each entity word and the image content based on the feature information, and sort the multiple entity words in order of matching probability from high to low, and output the sorting result.

[0042] Preferably, the obtaining unit is specifically used for:

[0043] The top Q entity words are selected from the sorting results, where Q is a positive integer, and the Q entity words are used as the recognition results of the target image.

[0044] In a third aspect, the present application provides the following technical solutions through an embodiment of the present application:

[0045] An image recognition device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor can implement any one of the method steps in the first aspect when executing the program.

[0046] In a fourth aspect, the present application provides the following technical solutions through an embodiment of the present application:

[0047] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, any method step in the first aspect described above can be implemented.

[0048] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0049] In an embodiment of the present application, a method for image recognition is disclosed, including: obtaining a target image; performing a network search on the target image to obtain a plurality of web page texts of the target image distributed in the network, wherein the sources of the plurality of web page texts are different; performing entity word extraction on the plurality of web page texts to obtain a plurality of entity words; sorting the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image; obtaining a recognition result of the target image based on the sorting result, and outputting the recognition result. Since entity word extraction is performed on web page texts from multiple different sources, feature augmentation is performed on the target image at the data level to improve the accuracy of image understanding and recognition, the technical problem of low recognition accuracy in the prior art when performing image recognition is solved, and the technical effect of improving recognition accuracy is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 This is a flow chart of a method for image recognition in an embodiment of the present application;

[0052] Figure 2 This is a structural diagram of an image recognition device in an embodiment of the present application;

[0053] Figure 3 This is a structural diagram of an image recognition device in an embodiment of the present invention;

[0054] Figure 4 This is a structural diagram of an image recognition device used as a server in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The embodiments of the present application provide a method and device for image recognition, thereby solving the technical problem of low recognition accuracy in the prior art when performing image recognition, and achieving the technical effect of improving the recognition accuracy.

[0056] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0057] A method for image recognition comprises: obtaining a target image; performing a network search on the target image to obtain a plurality of web page texts of the target image distributed on the network, wherein the plurality of web page texts have different sources; performing entity word extraction on the plurality of web page texts to obtain a plurality of entity words; sorting the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image; obtaining a recognition result of the target image based on the sorting result, and outputting the recognition result.

[0058] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0059] First of all, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0060] Embodiment 1

[0061] This embodiment provides an image recognition method, which is applied to a search engine (for example, an image search engine). The search engine is set in a search engine server, and users can access the webpage where the search engine is located through any terminal device and use the search service (especially the image search service) provided by it. Alternatively, the client corresponding to the search engine can also be installed in the user's terminal device, so that the user can directly use the search service provided by the search engine through the client. Among them, the terminal device used by the user can be: a smart phone, or a tablet computer, or a PC (Personal Computer), or a smart TV, or a digital camera, or a game console, etc. This embodiment does not specifically limit what kind of device the terminal device is.

[0062] like Figure 1 As shown, the picture recognition method includes:

[0063] Step S101: Acquire a target image.

[0064] In the specific implementation process, the target icon refers to the image to be identified.

[0065] The image recognition method in this embodiment can be used to identify the information contained in the target image, including identifying the image content (for example: who is the person in the image, what is the object in the image, the location of the scenery in the image), and identifying the image attributes (for example: the color tone of the image, the style of the image, the source of the image, the file format of the image, the size of the image, etc.).

[0066] As an optional embodiment, step S101 includes:

[0067] Get the target image uploaded by the user; or get the target image based on the storage address of the target image input by the user.

[0068] In the specific implementation process, an entry for uploading a target image is provided in the search box of the search page, and the user can select any image locally on the terminal device and upload the target image to the search engine through the entry. Alternatively, if the target image is a network image, the user can copy the storage address (e.g., URL) of the network image into the search box, so that the search engine can obtain the network image based on the storage address.

[0069] Step S102: performing a network search for the target image to obtain a plurality of web page texts of the target image distributed on the network, wherein the sources of the plurality of web page texts are different.

[0070] As an optional embodiment, step S102 includes:

[0071] The target image is searched by using an image search engine to obtain multiple images that are identical (or similar) to the target image distributed throughout the entire network, where the multiple images are located on different web pages; description information of each of the multiple images is extracted from the web page where each of the multiple images is located, and the description information is used as web page text.

[0072] In the specific implementation process, the same image often appears in different places on the Internet (for example, on different web pages), and the description information (or "surrounding information") of each image is also different. This description information usually contains descriptive text of the image content (or image attributes), which can serve as the most important basis for identifying the image content (or image attributes).

[0073] In the specific implementation process, the same image may appear slightly different on different web pages, for example, the original image is beautified (for example, adding filters, beautifying characters, etc.), or text or watermarks are added to the original image, etc., but the image content of these images is the same. Therefore, when searching for images, the matching parameters can be appropriately lowered so that while recalling images that are the same as the target image, images with a similarity greater than a preset value to the target image are also recalled (for example, images with a similarity greater than 85% are recalled together). This is conducive to feature augmentation of the target image at the data level, thereby obtaining more accurate recognition results.

[0074] In the specific implementation process, after searching and obtaining multiple images that are the same as (or similar to) the target image, description information (ie, web page text) can be extracted from these images to obtain multiple web page texts of the target image distributed on the network.

[0075] The following examples will illustrate:

[0076]

Example 1

[0077] For the target image A1, when performing an image search on the target image A1, the images obtained that are the same (or similar) as the target image A1 are: image B1, image C1, image D1, image E1, image F1, image G1, and image H1. Among them, the description information of image B1 is "Zhang San's concert", the description information of image C1 is "singer Zhang San's Beijing concert", the description information of image D1 is "Zhang San's concert, fans are celebrating", the description information of image E1 is "Zhang San's concert, Li Si's help singing", the description information of image F1 is "Zhang San and Li Si singing on the same stage", the description information of image G1 is "superstar Zhang San", and the description information of image H1 is "international superstar Zhang San". Further, these description information can be sequentially extracted as multiple web page texts of the target image A1.

[0078]

Example 2

[0079] For the target image A2, when performing an image search on the target image A2, the images obtained that are the same (or similar) to the target image A2 are: image B2, image C2, image D2, image E2, image F2, and image G2. Among them, the description information of image B2 is "Xphone 8", the description information of image C2 is "mobile phone conference", the description information of image D2 is "Xphone 8 pre-sale begins", the description information of image E2 is "Xphone 8 will be launched at the end of the year", the description information of image F2 is "Xphone 8 patent infringement", and the description information of image G2 is "Xphone 8 is banned from sale". Further, these description information can be extracted in sequence as multiple web page texts of the target image A2.

[0080] Step S103: extract entity words from the texts of multiple web pages to obtain multiple entity words.

[0081] As an optional embodiment, step S103 includes:

[0082] Based on a pre-built entity word library, entity words are extracted from each web page text in a plurality of web page texts to obtain a plurality of entity words.

[0083] In the specific implementation process, the entity word library stores a large number of entity words (millions or even tens of millions) collected in advance, covering various fields, including but not limited to: clothing, food, housing, travel, education, medical care, technology, sports, entertainment, politics, economy, culture, military, history, geography, society, people (such as celebrities), animals, plants, tourism, etc. In addition, the entity word library will continue to add entity words during continuous maintenance. Among them, the "entity word" is generally a noun.

[0084] As an optional embodiment, based on the pre-built entity word library, entity words are extracted from each of the multiple web page texts to obtain multiple entity words, which specifically includes the following two implementations:

[0085] Method 1: Segment each of the multiple web page texts to obtain M segmented words, where the M segmented words are different and M is a positive integer; search for each of the M segmented words in the entity word library, and use the searched segmented words as entity words.

[0086] In [Example 1], the web page text "Zhang San Concert" is segmented, and the obtained segmented words are "Zhang San", "Concert"; the web page text "Singer Zhang San's Beijing Concert" is segmented, and the obtained segmented words are "Singer", "Zhang San", "Beijing", "Concert"; the web page text "Zhang San Concert, Fans Carnival" is segmented, and the obtained segmented words are "Zhang San", "Concert", "Fans", "Carnival"; the web page text "Zhang San Concert, Li Si Assisting Singer" is segmented, and the obtained segmented words are "Zhang San", "Concert", "Li Si", "Assisting Singer"; the web page text "Zhang San and Li Si sing on the same stage" is segmented, and the obtained segmented words are "Zhang San", "Li Si", "on the same stage", "Singing"; the web page text "Superstar Zhang San" is segmented, and the obtained segmented words are "Superstar", "Zhang San"; the web page text "International Superstar Zhang San" is segmented, and the obtained segmented words are "International", "Superstar", "Zhang San".

[0087] In [Example 2], the web page text "Xphone 8" is segmented, and the obtained words are "Xphone", "8"; the web page text "mobile phone launch conference" is segmented, and the obtained words are "mobile phone", "launch conference"; the web page text "Xphone 8 starts pre-sale" is segmented, and the obtained words are "Xphone", "8", "start", "pre-sale"; the web page text "Xphone 8 will be launched at the end of the month" is segmented, and the obtained words are "Xphone", "8", "end of the month", "launched"; the web page text "Xphone 8 patent infringement" is segmented, and the obtained words are "Xphone", "8", "patent", "infringement"; the web page text "Xphone 8 is banned from sale" is segmented, and the obtained words are "Xphone", "8", "is", and "banned from sale".

[0088] Furthermore, a query is performed in each entity word library obtained, and if a certain word segment is stored in the entity word library, the word segment is confirmed as an entity word.

[0089] For example, if the word "Zhang San" is recorded in the entity word library, then "Zhang San" is regarded as an entity word; if "Zhang San" is not recorded in the entity word library, then "Zhang San" is not an entity word.

[0090] Method 2: Segment each web page text in multiple web page texts to obtain M segmented words, where M is a positive integer; reorganize the M segmented words based on a preset strategy to obtain N reorganized words, where N is a positive integer; search for each segmented word in the M segmented words and each reorganized word in the N reorganized words in the entity vocabulary, and use the found segmented words and reorganized words as entity words.

[0091] Compared with the first method, the second method is that after obtaining M participles, the M participles are appropriately reorganized based on a preset strategy.

[0092] In the specific implementation process, for adjacent segmented words, the frequency of their combined words appearing on the network can be counted. If the frequency of appearance is high (i.e., greater than the preset frequency), the adjacent segmented words can be reorganized. For example, in the above [Example 2], based on the network query, it is found that the segmented words "Xphone" and the segmented word "8" often appear together, and the frequency of appearance on the network is high, so the segmented words "Xphone" and the segmented word "8" can be reorganized into "Xphone 8" as a reorganized word.

[0093] Alternatively, if the adjacent participles are in the form of numbers or letters, they can also be reorganized. Referring to [Example 2], the participle "Xphone" and the participle "8" can be reorganized into "Xphone 8" as a reorganized word.

[0094] Here, the M word segmentations are reorganized based on a preset strategy, thereby expanding the number of entity words, which is conducive to obtaining more accurate image recognition results.

[0095] In the specific implementation process, the above-mentioned method 1 and method 2 can be used in combination to obtain more entity words with higher quality.

[0096] In the prior art, most of the text information image recognition methods used in the industry use a single document, that is, use the text information related to the image in a single page to extract entity words. Since the information that an image can express can be multifaceted, using the text of a single page to predict the image content has limitations and prediction errors.

[0097] In this embodiment, multiple web page texts from different sources are used, entity words are extracted from these web page texts, and features of the target image are augmented at the data level to improve the accuracy of image understanding and recognition, thereby improving the technical effect of improving recognition accuracy.

[0098] Step S104: sorting the multiple entity words based on the text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image.

[0099] As an optional embodiment, step S104 includes:

[0100] Obtain feature information of each entity word; input the feature information into the LambdaMART sorting model to obtain a sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability between each entity word and the icon image (image content or image attribute) based on the feature information, and sort multiple entity words in descending order of matching probability, and output the sorting result.

[0101] In a specific implementation process, for each entity word, its corresponding feature information may be obtained, and the feature information includes: text features, distribution features, and image features.

[0102] Here, “text features” refer to the entity words themselves.

[0103] Among them, "distribution characteristics" refers to the distribution of entity words (i.e., the number of times the entity words appear in the above multiple web page texts). For example, in the above [Example 1], the entity word "Zhang San" appears 7 times in the description information of pictures B1 to H1 (i.e., web page text), and the entity word "Li Si" appears 2 times in the description information of pictures B1 to H1 (i.e., web page text). The more times an entity word appears, the greater its corresponding weight.

[0104] Among them, the "image feature" refers to the image feature extracted from the picture corresponding to the entity word. For example, in the above [Example 1], more image features related to people may be extracted, and the weight of the entity word related to people will increase; in the above [Example 2], more image features related to electronic devices may be extracted, and the weight of the entity word related to electronic devices will increase.

[0105] In the specific implementation process, LambdaMART is a Listwise type of LTR algorithm. It is based on the LambdaRank algorithm and the MART (Multiple Additive Regression Tree) algorithm, and transforms the search engine result ranking problem into a regression decision tree problem.

[0106] In the specific implementation process, the LambdaMART ranking model can calculate the matching probability of each entity word with the target picture based on the feature information of each entity word (the higher the matching probability, the higher the relevance to the target picture), and sort multiple entity words in descending order of the matching probability, and output the sorting result. In this way, by inputting the feature information of multiple entity words extracted into the LambdaMART ranking model, the sorting results of these entity words can be obtained. Among them, the entity word ranked higher represents a higher matching probability with the target picture.

[0107] Step S105: Obtain the recognition result of the target picture based on the sorting result, and output the recognition result.

[0108] As an optional embodiment, step S105 includes:

[0109] Select the top Q entity words from the sorting result, where Q is a positive integer, and use the Q entity words as the recognition result of the target picture.

[0110] In the specific implementation process, the top 1 (or 2) entity words can be extracted from the sorting result, used as the recognition result of the target picture, and the recognition result can be output.

[0111] For example, in [Example 1], if the entity word ranked first is "Zhang San", then "Zhang San" is used as the recognition result of the target picture A1 and is displayed.

[0112] For example, in [Example 2], if the entity word ranked first is "Xphone 8", then "Xphone 8" is used as the recognition result of the target picture A2 and is displayed.

[0113] The technical solutions in the above embodiments of the present application at least have the following technical effects or advantages:

[0114] In an embodiment of the present application, a method for image recognition is disclosed, including: obtaining a target image; performing a network search on the target image to obtain a plurality of web page texts of the target image distributed in the network, wherein the sources of the plurality of web page texts are different; performing entity word extraction on the plurality of web page texts to obtain a plurality of entity words; sorting the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image; obtaining a recognition result of the image content based on the sorting result, and outputting the recognition result. Since entity word extraction is performed on web page texts from multiple different sources, feature augmentation is performed on the target image at the data level to improve the accuracy of image understanding and recognition, the technical problem of low recognition accuracy in the prior art when performing image recognition is solved, and the technical effect of improving recognition accuracy is achieved.

[0115] Embodiment 2

[0116] Based on the same inventive concept, Figure 2 As shown, this embodiment provides a picture recognition device 200, including:

[0117] An acquisition unit 201 is used to acquire a target image;

[0118] A search unit 202 is used to perform a network search for the target image to obtain a plurality of web page texts of the target image distributed on the network, where the plurality of web page texts come from different sources;

[0119] An extraction unit 203 is used to extract entity words from the plurality of web page texts to obtain a plurality of entity words;

[0120] A sorting unit 204 is used to sort the multiple entity words based on the text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image;

[0121] An obtaining unit 205 is used to obtain a recognition result of the target image based on the sorting result;

[0122] The output unit 206 is used to output the recognition result.

[0123] As an optional embodiment, the acquiring unit 201 is specifically configured to:

[0124] Acquire the target image uploaded by the user; or acquire the target image based on the storage address of the target image input by the user.

[0125] As an optional embodiment, the searching unit 202 is specifically configured to:

[0126] The target image is searched by using an image search engine to obtain multiple images that are identical or similar to the target image and are distributed throughout the entire network, wherein the multiple images are located on different web pages; description information of each of the multiple images is extracted from the web page where each of the multiple images is located, and the description information is used as the web page text.

[0127] As an optional embodiment, the extraction unit 203 is specifically configured to:

[0128] Based on a pre-built entity word library, entity words are extracted from each of the multiple web page texts to obtain multiple entity words.

[0129] As an optional embodiment, the extraction unit 203 is specifically configured to:

[0130] Segmenting each of the plurality of web page texts to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; searching for each of the M segmented words in the entity word library and using the segmented words found as the entity word; and / or

[0131] Each of the multiple web page texts is segmented to obtain M segmented words, where the M segmented words are different and M is a positive integer; based on a preset strategy, the M segmented words are reorganized to obtain N reorganized words, where N is a positive integer; each of the M segmented words is searched in the entity word library, and each of the N reorganized words is searched, and the found segmented words and reorganized words are used as the entity words.

[0132] As an optional embodiment, the sorting unit 204 is specifically configured to:

[0133] Acquire feature information of each entity word; input the feature information into the LambdaMART sorting model to obtain the sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability between each entity word and the image content based on the feature information, and sort the multiple entity words in order of matching probability from high to low, and output the sorting result.

[0134] As an optional embodiment, the obtaining unit 205 is specifically configured to:

[0135] The top Q entity words are selected from the sorting results, where Q is a positive integer, and the Q entity words are used as the recognition results of the target image.

[0136] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0137] The technical solutions in the above embodiments of the present invention have at least the following technical effects or advantages:

[0138] In an embodiment of the present invention, a picture recognition device is disclosed, including: an acquisition unit, used to acquire a target picture; a search unit, used to search the target picture on the network, and obtain multiple web page texts of the target picture distributed in the network, wherein the sources of the multiple web page texts are different; an extraction unit, used to extract entity words from the multiple web page texts, and obtain multiple entity words; a sorting unit, used to sort the multiple entity words based on the text-image relevance, and obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target picture; the acquisition unit, used to obtain the recognition result of the target picture based on the sorting result; and an output unit, used to output the recognition result. Since the entity words are extracted from the web page texts of multiple different sources to obtain multiple entity words, the target picture is feature augmented at the data level to improve the accuracy of image understanding and recognition, the technical problem of low recognition accuracy in the prior art when performing picture recognition is solved, and the technical effect of improving recognition accuracy is achieved.

[0139] Figure 3 800 is a structural diagram of an image recognition device according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0140] Reference Figure 3 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0141] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0142] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0143] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0144] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0145] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0146] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0147] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0148] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0149] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0150] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0151] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of an apparatus 800, enables the apparatus 800 to execute an image recognition method, including: obtaining a target image; performing a network search on the target image to obtain a plurality of web page texts of the target image distributed in the network, wherein the sources of the plurality of web page texts are different; performing entity word extraction on the plurality of web page texts to obtain a plurality of entity words; sorting the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to the relevance between the entity words and the target image; obtaining a recognition result of the target image based on the sorting result, and outputting the recognition result.

[0152] Figure 4 It is a structural diagram of an image recognition device in an embodiment of the present invention when used as a server. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0153] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0154] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0155] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for image recognition, characterized in that: Used to identify the information contained in the image, including: Get the target image; Performing a network search for the target image to obtain a plurality of web page texts of the target image distributed on the network, including: using an image search engine to search for the target image to obtain a plurality of images that are identical or similar to the target image distributed on the entire network, wherein the plurality of images are located on different web pages; extracting description information of each of the plurality of images from the web page where each of the plurality of images is located, and using the description information as the web page text, wherein the plurality of web page texts are from different sources; Segmenting each of the plurality of web page texts to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; searching for each of the M segmented words in an entity word library and using the searched segmented words as the entity word; and / or Each of the plurality of web page texts is segmented to obtain M segmented words, wherein the M segmented words are different from each other; based on a preset strategy, the M segmented words are reorganized to obtain N reorganized words, where N is a positive integer; each of the M segmented words is searched in the entity word library, and each of the N reorganized words is searched, and the segmented words and reorganized words found are used as the entity words; the preset strategy is: for adjacent segmented words, the frequency of the combined words appearing on the network is counted, and if the frequency of appearance is greater than a preset frequency, the adjacent segmented words are reorganized; Acquire feature information of each entity word; the feature information includes: text feature, distribution feature and image feature, wherein the text feature refers to the entity word itself, the distribution feature refers to the number of times the entity word appears in multiple webpage texts, and the image feature refers to the image feature extracted from the picture corresponding to the entity word, and the value of the weight of the entity word is positively correlated with the number of the distribution features, and the value of the weight of the entity word is positively correlated with the number of the image features; Input the feature information into a LambdaMART sorting model to obtain a sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability between each entity word and the target image based on the feature information, and sort the multiple entity words in descending order of matching probability, and output the sorting result; Obtain a recognition result of the target image based on the sorting result, and output the recognition result.

2. The method according to claim 1, characterized in that The obtaining the recognition result of the target image based on the sorting result includes: The top Q entity words are selected from the ranking results, where Q is a positive integer; and the Q entity words are used as the recognition results of the target image.

3. A picture recognition device, characterized in that: Used to identify the information contained in the image, including: An acquisition unit, used for acquiring a target image; A search unit is used to perform a network search for the target image to obtain a plurality of web page texts of the target image distributed in the network, which includes: using an image search engine to search for the target image to obtain a plurality of images that are identical or similar to the target image distributed in the entire network, wherein the web pages where the plurality of images are located are different; extracting description information of each of the plurality of images from the web page where each of the plurality of images is located, and using the description information as the web page text, wherein the sources of the plurality of web page texts are different; An extraction unit, configured to extract entity words from the plurality of web page texts to obtain a plurality of entity words; Specifically used for segmenting each of the plurality of web page texts to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; searching for each of the M segmented words in an entity word library and using the searched segmented words as the entity word; and / or Each of the plurality of web page texts is segmented to obtain M segmented words, wherein the M segmented words are different from each other and M is a positive integer; based on a preset strategy, the M segmented words are reorganized to obtain N reorganized words, wherein N is a positive integer; each of the M segmented words is searched in the entity word library, and each of the N reorganized words is searched, and the segmented words and reorganized words found are used as the entity words; the preset strategy is: for adjacent segmented words, the frequency of the combined words appearing on the network is counted, and if the frequency of appearance is greater than a preset frequency, the adjacent segmented words are reorganized; A sorting unit, configured to sort the plurality of entity words based on text-image relevance to obtain a sorting result, wherein the text-image relevance refers to a relevance between the entity words and the target image; The sorting unit is specifically used for: Acquire feature information of each entity word, the feature information including: text feature, distribution feature and image feature, wherein the text feature refers to the entity word itself, the distribution feature refers to the number of times the entity word appears in multiple webpage texts, and the image feature refers to the image feature extracted from the picture corresponding to the entity word, the value of the weight of the entity word is positively correlated with the number of the distribution features, and the value of the weight of the entity word is positively correlated with the number of the image features; input the feature information into the LambdaMART sorting model to obtain the sorting result; wherein the LambdaMART sorting model is used to calculate the matching probability of each entity word with the picture content based on the feature information, and sort the multiple entity words in descending order of matching probability, and output the sorting result; An obtaining unit, configured to obtain a recognition result of the target image based on the sorting result; An output unit is used to output the recognition result.

4. The device according to claim 3, characterized in that The obtaining unit is specifically used for: The top Q entity words are selected from the sorting results, where Q is a positive integer, and the Q entity words are used as the recognition results of the target image.

5. An image recognition device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method steps as claimed in claim 1 or 2 can be implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method steps as claimed in claim 1 or 2 can be implemented.

Citation Information

Patent Citations

  • Method and device for picture recommendation

    CN102609458A

  • Index building method, searching method and searching result sorting method and corresponding device

    CN102737039A

  • Method and equipment for discovering theme key words in picture

    CN103544186A

  • Data processing method and device

    CN103577414A

  • Method and device for determining subject term of picture

    CN103744970A