Intelligent image matching method and device

By first scaling the target image and cutting it appropriately when providing information mapping, the problem of multiple cutting times and long time in the existing technology is solved, and a faster and more accurate mapping process is achieved.

CN111768412BActive Publication Date: 2024-09-20BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910968256.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-12
Publication Date
2024-09-20
Estimated Expiration
2039-10-12

AI Technical Summary

Technical Problem

In the prior art, when providing pictures for information, directly cutting the target image requires multiple cuts, resulting in a large number of cut images and a long time consumption.

Method used

By first scaling the target image so that it fits the preset window, it is cut multiple times, and after scaling, it is judged whether the cut image contains items and is clear. If so, it is used as a matching image to reduce the number of cuts and the number of images.

Benefits of technology

It shortens the time to provide graphics for information and improves the efficiency and accuracy of the mapping process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111768412B
    Figure CN111768412B
Patent Text Reader

Abstract

The present invention discloses an intelligent image matching method and device, and relates to the field of computer technology. A specific implementation of the method includes: obtaining a target image containing an object, scaling the target image; wherein the object is an object described by information; cutting the scaled target image multiple times to obtain multiple cut images; judging whether each cut image contains the object and is clear, and if so, using the cut image containing the object and being clear as the image matching the information. This implementation shortens the time consumed in providing images for information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an intelligent image matching method and device. Background Art

[0002] At present, the existing process of providing illustrations for information includes: obtaining a target image containing an object, directly cutting the target image to obtain a large number of cut images, and selecting illustrations for the information from the large number of cut images.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] Directly cutting the target image requires cutting many times, the number of cut images is very large, and it takes a long time to obtain the information matching picture. Therefore, the prior art has the problem that it takes a long time to provide the information matching picture. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides an intelligent picture matching method and device, which can shorten the time consumed in providing pictures for information.

[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a smart image matching method is provided.

[0007] The intelligent image matching method of the embodiment of the present invention includes:

[0008] Acquire a target image containing an object, and scale the target image; wherein the object is the object described by the information;

[0009] Cutting the scaled target image multiple times to obtain multiple cut images;

[0010] It is determined whether each cutting image contains the object and is clear. If so, the cutting image containing the object and is clear is used as a picture accompanying the information.

[0011] In one embodiment, scaling the target image includes:

[0012] Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window;

[0013] Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image;

[0014] The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

[0015] In one embodiment, before scaling the target image, the method further includes: setting a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape;

[0016] Determine whether each cut image contains the object and is clear, and if so, use the cut image containing the object and is clear as the accompanying image of the information, including:

[0017] For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, determine whether the cut image is clear based on the clarity model. If so, delete the bounding box and use the cut image with the bounding box deleted as a matching image for the information.

[0018] In one embodiment, acquiring a target image containing an object includes:

[0019] Acquire multiple original images of the information according to the title of the information and the category to which the item described in the information belongs;

[0020] A target image containing the object is selected from a plurality of original images according to the category to which the object belongs.

[0021] In one embodiment, obtaining multiple original images of the information according to the title of the information and the category to which the item described in the information belongs includes:

[0022] Obtaining the title of the information and the name of the category to which the item described in the information belongs, and segmenting the title of the information to obtain a word set;

[0023] Determine the similarity between the word set and the name of the category to which the item belongs; if any word in the word set is not similar to the name of the category to which the item belongs, use the name of the category to which the item belongs as the search word; otherwise, obtain a keyword based on the word set, and use the keyword and the name of the category to which the item belongs as the search word;

[0024] A search is performed on a search engine based on the search term to obtain multiple item numbers of the information, and multiple original images of the information are acquired according to the multiple item numbers of the information.

[0025] In one embodiment, a target image containing an object is selected from a plurality of original images according to the category to which the object belongs, including:

[0026] For each category, the item recognition model of the category is obtained according to the following method:

[0027] Using the name of the category as a search term, searching on a search engine to obtain a plurality of item numbers of the category; obtaining a plurality of item detail images of the category according to the plurality of item numbers of the category; labeling the item detail images, and using the labeled item detail images to train an image detection model to obtain an item recognition model of the category;

[0028] Obtaining an item recognition model of the category to which the item belongs from item recognition models of all categories according to the category to which the item belongs;

[0029] Based on an object recognition model of the category to which the object belongs, a target image containing the object is screened out from a plurality of original images.

[0030] To achieve the above objective, according to another aspect of an embodiment of the present invention, a smart image matching device is provided.

[0031] The intelligent image matching device of the embodiment of the present invention includes:

[0032] A processing unit, configured to obtain a target image containing an object and scale the target image; wherein the object is the object described by the information;

[0033] A cutting unit, used for cutting the scaled target image multiple times to obtain multiple cut images;

[0034] The judging unit is used to judge whether each cutting image contains the object and is clear. If so, the cutting image containing the object and is clear is used as a picture accompanying the information.

[0035] In one embodiment, the processing unit is used to:

[0036] Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window;

[0037] Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image;

[0038] The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

[0039] In one embodiment, the processing unit is used to:

[0040] Before scaling the target image, setting a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape;

[0041] The judging unit is used for:

[0042] For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, determine whether the cut image is clear based on the clarity model. If so, delete the bounding box and use the cut image with the bounding box deleted as a matching image for the information.

[0043] In one embodiment, the processing unit is configured to:

[0044] Acquire multiple original images of the information according to the title of the information and the category to which the item described in the information belongs;

[0045] A target image containing the object is selected from a plurality of original images according to the category to which the object belongs.

[0046] In one embodiment, the processing unit is configured to:

[0047] Obtaining the title of the information and the name of the category to which the item described in the information belongs, and segmenting the title of the information to obtain a word set;

[0048] Determine the similarity between the word set and the name of the category to which the item belongs; if any word in the word set is not similar to the name of the category to which the item belongs, use the name of the category to which the item belongs as the search word; otherwise, obtain a keyword based on the word set, and use the keyword and the name of the category to which the item belongs as the search word;

[0049] A search is performed on a search engine based on the search term to obtain multiple item numbers of the information, and multiple original images of the information are acquired according to the multiple item numbers of the information.

[0050] In one embodiment, the processing unit is configured to:

[0051] For each category, the item recognition model of the category is obtained according to the following method:

[0052] Using the name of the category as a search term, searching on a search engine to obtain a plurality of item numbers of the category; obtaining a plurality of item detail images of the category according to the plurality of item numbers of the category; labeling the item detail images, and using the labeled item detail images to train an image detection model to obtain an item recognition model of the category;

[0053] Obtaining an item recognition model of the category to which the item belongs from item recognition models of all categories according to the category to which the item belongs;

[0054] Based on an object recognition model of the category to which the object belongs, a target image containing the object is screened out from a plurality of original images.

[0055] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0056] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent image matching method provided by the embodiment of the present invention.

[0057] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0058] A computer-readable medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements the intelligent image matching method provided by the embodiment of the present invention.

[0059] One embodiment of the above invention has the following advantages or beneficial effects: obtaining a target image containing an object, scaling the target image; wherein the object is an object described by the information; cutting the scaled target image multiple times to obtain multiple cut images; judging whether each cut image contains an object and is clear, and if so, using the cut image containing the object and being clear as the illustration of the information. Scaling first and then cutting reduces the number of cutting times and the number of cut images, and can obtain a clear cut image containing the object more quickly, thereby shortening the time consumed in providing illustrations for the information.

[0060] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0062] Figure 1 is a schematic diagram of the main process of the intelligent image matching method according to an embodiment of the present invention;

[0063] Figure 2 is a schematic diagram of the main process of the intelligent image matching method according to another embodiment of the present invention;

[0064] Figure 3 is a schematic diagram of main units of an intelligent image matching device according to an embodiment of the present invention;

[0065] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0066] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0068] It should be pointed out that the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.

[0069] A large number of items require information (such as copywriting) to introduce the advantages and disadvantages of the items so that users can refer to them. However, editing a large amount of information consumes a lot of time and economic costs, especially providing illustrations for the information.

[0070] At present, there are three existing technologies for providing pictures for information, as follows:

[0071] The first type: If the specifications and styles of the item are fully filled in (mobile phone with 8GB memory, mobile phone with 4GB memory, cake skirt, V-neck skirt or floral skirt are the specifications or styles of the item), the specifications and styles can be used to directly find the target image containing the item. However, the reality is that the information is not fully filled in, and the target image containing the item cannot be found using the specifications and styles, or there are very few target images, or even images that do not contain the item are used as target images, resulting in the problem of low accuracy of intelligent image matching.

[0072] The second method is to obtain a target image containing an object, directly cut the target image, obtain a large number of cut images, and select the information matching image from the large number of cut images. Directly cutting the target image requires cutting many times, the number of cut images is very large, and it takes a long time to obtain the information matching image. Therefore, there is a problem that it takes a long time to provide matching images for information.

[0073] The third method: manually determine the search terms based on the information, conduct the search, save the searched images, manually view each image, mark the objects in the image, and manually cut the marked images to obtain the information illustrations. Since the information illustrations are provided manually, the workload of the staff is large, time-consuming, and prone to errors.

[0074] In order to solve the problems existing in the prior art, an embodiment of the present invention provides an intelligent image matching method, such as Figure 1As shown, the method includes:

[0075] Step S101, obtaining a target image containing an object, and scaling the target image; wherein the object is the object described by the information.

[0076] In this step, the objects can be mobile phones, computers, medical devices or mineral water bottles, etc. The information can be scientific papers, articles introducing mobile phones or promotional articles.

[0077] Scaling includes reducing or enlarging. If the target image is larger than the preset window, the target image is reduced, and if the target image is smaller than the preset window, the target image is enlarged. The preset window is used to cut the scaled target image multiple times. The process of scaling the target image is explained in detail below and will not be repeated here.

[0078] Step S102: cutting the scaled target image multiple times to obtain multiple cut images.

[0079] In this step, when implemented, the zoomed target image is cut multiple times using a preset window to obtain multiple cut images. It should be understood that the preset window can be a rectangle, square, diamond or circle.

[0080] It should be noted that the longest side of the preset window is parallel or perpendicular to the longest side of the target image after scaling. It should be understood that when the longest side of the preset window is parallel to the longest side of the target image after scaling, the scaled target image is cut multiple times, and the cut images obtained are easier to be used as information illustrations, and the time consumed to obtain the illustrations is shorter.

[0081] Step S103, determining whether each cut image contains the object and is clear, and if so, using the cut image containing the object and being clear as a picture accompanying the information.

[0082] In an embodiment of the present invention, scaling the target image includes:

[0083] Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window;

[0084] Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image;

[0085] The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

[0086] In this embodiment, if the first side is a long side, the second side is a short side, and if the first side is a short side, the second side is a long side. Preferably, when the first side is a long side and the second side is a short side, the time consumed to obtain the matching image is shorter. In addition, if the second side of the target zoomed image is not larger than the second side of the preset window, the target zoomed image is not used as the zoomed target image, and the matching image of the information cannot be obtained using the target zoomed image; wherein, not larger than means smaller than or equal to.

[0087] In this embodiment, the target image is scaled proportionally to prevent deformation of the object contained in the target image, thereby ensuring that the matching image is not distorted. The first side of the target scaled image is the same as the first side of the preset window, and by comparing the size of the second side of the target scaled image with the second side of the preset window, it is directly determined whether the target scaled image is suitable for cutting, thereby further shortening the time consumed in providing matching images for information.

[0088] In the embodiment of the present invention, before scaling the target image, the method further includes: setting a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape;

[0089] Step S103 may include:

[0090] For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, determine whether the cut image is clear based on the clarity model. If so, delete the bounding box and use the cut image with the bounding box deleted as a matching image for the information.

[0091] In this embodiment, the bounding box can be set to a rectangle, a diamond or a circle, etc. In addition, the preset value is set according to the demand, for example, 2 / 3. The method for calculating the area of ​​the bounding box in the cut image is the same as the method for calculating the area of ​​the bounding box in the scaled target image, and the method in the prior art can be used, for example, Matrix Laboratory (MATLAB for short). Furthermore, since the bounding box is set for the object on the target image before scaling the target image, the bounding box is also scaled proportionally after scaling the target image, and the scaling ratio of the bounding box is the same as the scaling ratio of the target image.

[0092] It should be noted that, since the target image is scaled, when the scaling ratio is too large, too small, or the clarity of the target image itself is problematic, in order to ensure the accuracy of the matching image, it is necessary to determine whether the cut image is clear.

[0093] When implementing it, Figure 2As shown, the process of obtaining the definition model includes: obtaining a large number of images from an existing content delivery network (Content Delivery Network, CDN) through crawler technology, manually judging the definition of each image, using high-definition images as positive samples, and using low-definition images as negative samples. If the negative samples are insufficient, the high-definition images can be magnified by a high multiple, and the high-definition images can be processed using a common image blur algorithm (for example, a Gaussian blur algorithm) or a mosaic algorithm to process the high-definition images, thereby increasing the number of negative samples. Blurred (label 0) and clear (label 1) are used as classification targets, and a classification network model (for example, an 18-layer convolutional neural network (abbreviated as resnet18), a 50-layer convolutional neural network (abbreviated as resnet50), a convolutional image detection model (abbreviated as vgg16)) is trained with positive samples and negative samples to obtain a definition model. The training process can be performed on a graphics processing unit (GPU) or a CPU.

[0094] In this embodiment, it is determined whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value, and it is determined whether the cut image is clear. Through the two judgments, it is determined whether the cut image is suitable as a picture, thereby further shortening the time consumed for providing pictures for information. Since objects are generally irregular in shape, the objects are in the bounding box, and the bounding box is a regular shape, the calculation amount of calculating the area of ​​the bounding box is smaller than that of calculating the area of ​​the object, and the calculation time is shorter, further shortening the time consumed for providing pictures for information.

[0095] In an embodiment of the present invention, obtaining a target image containing an object includes:

[0096] Acquire multiple original images of the information according to the title of the information and the category to which the item described in the information belongs;

[0097] A target image containing the object is selected from a plurality of original images according to the category to which the object belongs.

[0098] In this embodiment, it should be understood that the screened target image may be one or more, but the processing method for each target image is the same, which is to scale the target image; cut the scaled target image multiple times to obtain multiple cut images; determine whether each cut image contains the object and is clear. If so, the cut image that contains the object and is clear will be used as the illustration of the information.

[0099] In this embodiment, multiple original images of the information are automatically obtained through the title of the information and the category to which the item described in the information belongs. Since the title of the information records more data, many original images are obtained using the title, thereby improving the accuracy and automation of intelligent image matching. The target image containing the item is screened from multiple original images through the category to which the item belongs, thereby automatically obtaining the target image, reducing the workload of the staff and reducing the occurrence of errors.

[0100] In the embodiment of the present invention, acquiring multiple original images of the information according to the title of the information and the category to which the item described in the information belongs includes:

[0101] The title of the information and the name of the category to which the item described in the information belongs are obtained, and the title of the information is segmented to obtain a word set.

[0102] In this step, the process of obtaining the word set is described below with a specific example: for an article, the title of the article is analyzed by a natural language processing system (e.g., Jieba word segmentation, Stanford, etc.) to obtain the style and suitable population of the item described in the article. For example, the title of the article is: Fruity Cleaning Toothpaste, Turn on the Cute Baby Tooth Protection Mode. Obviously, children are suitable for the population, fruity flavor is the style, and toothpaste is the item described in the article. The word set includes children, fruity flavor, and toothpaste.

[0103] In addition, the title of the information and the name of the category to which the item described in the information belongs can be obtained from the information.

[0104] Determine the similarity between the word set and the name of the category to which the item belongs; if any word in the word set is not similar to the name of the category to which the item belongs, use the name of the category to which the item belongs as the search word; otherwise, obtain keywords based on the word set, and use the keywords and the name of the category to which the item belongs as the search word.

[0105] In this step, during specific implementation, the existing edit distance algorithm is used to calculate the similarity between each word in the word set and the name of the category to which the item belongs; if the similarity between any word in the word set and the name of the category to which the item belongs is 0, the name of the category to which the item belongs is used as the search term; if the similarity between each word in the word set and the name of the category to which the item belongs is not 0, each word in the word set is replaced with a preset word corresponding to each word, and stop words are removed to obtain keywords, and the keywords and the name of the category to which the item belongs are used as search terms.

[0106] The following is a specific example to illustrate the process of obtaining search terms when the similarities are not 0: the word set includes cute baby, fruity, popular and toothpaste, and the preset word corresponding to cute baby is child, fruity, popular and toothpaste do not have preset words, and popular is a stop word. Therefore, child, fruity, toothpaste and the name of the category to which the item belongs are used as search terms.

[0107] It should be understood that if the similarity between any word in the word set and the name of the category to which the item belongs is 0, the style and specifications of the item described in the information cannot be obtained from the title of the information, so the name of the category to which the item belongs is used as the search word. In addition, by searching with keywords and the name of the category to which the item belongs as search words, the multiple original images obtained are more likely to contain the item.

[0108] A search is performed on a search engine based on the search term to obtain multiple item numbers of the information, and multiple original images of the information are acquired according to the multiple item numbers of the information.

[0109] In this embodiment, a word set is obtained through the title of the information, and a search word is obtained based on the similarity between the word set and the name of the category to which the item belongs. A search is performed based on the search word, thereby automatically obtaining multiple original images of the information. Since the title of the information contains a lot of data (for example, specifications or styles, etc.), a large number of original images are obtained using the title, thereby improving the accuracy and automation of intelligent image matching. By searching on a search engine using the search word, multiple item numbers of the information are obtained, thereby obtaining multiple original images of the information. The item number makes the original image more likely to contain an item, further improving the accuracy of intelligent image matching.

[0110] In the embodiment of the present invention, a target image containing an object is selected from a plurality of original images according to the category to which the object belongs, including:

[0111] For each category, the item recognition model of the category is obtained according to the following method:

[0112] Using the name of the category as a search term, searching on a search engine to obtain a plurality of item numbers of the category; obtaining a plurality of item detail images of the category according to the plurality of item numbers of the category; labeling the item detail images, and using the labeled item detail images to train an image detection model to obtain an item recognition model of the category;

[0113] Obtaining an item recognition model of the category to which the item belongs from item recognition models of all categories according to the category to which the item belongs;

[0114] Based on an object recognition model of the category to which the object belongs, a target image containing the object is screened out from a plurality of original images.

[0115] In this embodiment, during specific implementation, one item number corresponds to one item style. To ensure the accuracy of the item recognition model, some special styles (e.g., ripped jeans, short casual pants) can be added to this item style, so that the item number increases. The number of item numbers is not less than 1000. Of course, the minimum number of item numbers can be set according to demand. The item number can be sku, or it can be item specification or item model, etc. In addition, the item detail image can be the same as the original image, or it can be different.

[0116] One sku corresponds to one sku id, and multiple sku ids of the category are searched. Through crawler technology or calling interface, the item details image corresponding to each sku id of the category is obtained from the database (the database matches and stores the sku id and the item details image corresponding to the sku id). It should be understood that the item details image corresponding to one sku id may be one or more. All item details images of the category are taken as a set M, and g (the number of g can be set according to requirements, specifically, any positive integer between 5% and 10% of the total number of item details images of the category) item details images are randomly extracted from the set M, and the g item details images are displayed to the image processing personnel. The image processing personnel mark the g item details images according to the name of the category and the id of the category, and mark the items corresponding to the category in each item details image (the following is a specific example to illustrate the correspondence between items and categories: the category is sports shoes, and the items are thin sports shoes, high-elastic sports shoes or lace-up sports shoes, etc.). The labeled item detail images are used to train an image detection model (for example, Faster RCNN (a baseline algorithm in the field of object detection), SSD (a single-stage method improved on the basis of YOLO), YOLO (a new object detection method), etc.) to obtain an item recognition model of the category.

[0117] The item recognition model of the category is saved to a local disk or a cloud remote system, the saving path is recorded, and the category id and the saving path are saved as a key-value in a database or other storage medium. In order to use the id of the category to which the item belongs to find the item recognition model of the category to which the item belongs, so as to filter out the target image containing the item. It should be understood that randomly extracting g item detail images from the set M is to reduce the workload of image processing personnel.

[0118] It should be noted that if the name of the category only includes the name of the first-level category, the image processing personnel cannot mark the item detail image based on the name of this level of category, and must mark the item detail image based on the name of this level of category and the ID of the category. In addition, in specific implementation, the name of the category to which the item belongs may include the name of the first-level category, the name of the second-level category, and the name of the third-level category.

[0119] For each original image, the object recognition model of the category to which the object belongs is used to determine whether the original image contains an object. If so, the original image is filtered as the target image. This is because due to various reasons, the original image may not contain an object. If it does not contain an object, the information matching image cannot be obtained.

[0120] In this embodiment, the image detection model is trained with the marked item detail image to obtain the item recognition model of each category. According to the category to which the item belongs, the item recognition model of the category to which the item belongs is obtained from the item recognition models of all categories, so that the target image containing the item can be automatically screened out from multiple original images, reducing the workload of the staff, reducing the occurrence of errors, further shortening the time consumed for providing pictures for information, and automatically providing pictures for information.

[0121] In order to solve the problems existing in the prior art, another embodiment of the present invention provides an intelligent image matching method, which includes:

[0122] The first step is to input the title of the scientific paper into the Jieba word segmentation to obtain the word set of the scientific paper. The item described in the scientific paper is a time relay, so the name of the category to which the time relay belongs is a time relay. The similarity between each word in the word set of the scientific paper and the time relay is calculated. If the similarity between any word in the word set of the scientific paper and the time relay is 0, then the time relay is used as the search word. Otherwise, the keywords are obtained according to the word set of the scientific paper, and the keywords and the time relay are used as the search words.

[0123] In the second step, a search is performed on a search engine based on the search term to obtain multiple specifications and models of the time relay, and URLs corresponding to original images of the multiple specifications and models of the time relay are obtained according to the multiple specifications and models of the time relay.

[0124] The third step is to perform the following operations on each URL:

[0125] 1. Download the original image corresponding to the URL, use the object recognition model of the time relay to determine whether the original image contains the time relay, if not, end, if yes, set a bounding box for the time relay on the original image, so that the time relay is in the bounding box, the bounding box is a regular shape, and execute 2.

[0126] 2. Scale the original image in equal proportion to obtain a scaled image, so that the first side of the scaled image is the same as the first side of the preset window, and determine whether the second side of the scaled image is larger than the second side of the preset window. If not, end the process. If yes, execute 3. The first side is adjacent to the second side.

[0127] 3. Use the preset window to cut the scaled image multiple times to obtain multiple cut images.

[0128] 4. For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the zoomed image is greater than 0.9. If so, mark the cut image as successful.

[0129] 5. Determine whether the cutting image marked as successful is clear according to the clarity model. If so, use the cutting image marked as successful and clear as the illustration of the scientific paper.

[0130] In order to solve the problems existing in the prior art, another embodiment of the present invention provides an intelligent image matching method. This embodiment is applied in the field of e-commerce, such as Figure 2 As shown, the method includes:

[0131] In the first step, for each category, the words representing specifications and styles in the category are deduplicated to obtain the word set of the category. The word sets of all categories are added to the Jieba word segmentation to improve the word segmentation ability of the Jieba word segmentation.

[0132] The second step is to configure word pairs that represent age and gender. For example, word pair 1: Cute baby = child; word pair 2: Girl = girl; word pair 3: Trendy boy = boy. Save the previous word in the word pair as the key. Configure a stop word dictionary, including stop words such as fashion, high popularity or appearance.

[0133] The third step is to input the title of the article into the Jieba word segmentation to obtain the word set of the article. According to the id of the category to which the item described in the article belongs, the name of the category to which the item described in the article belongs is obtained through the e-commerce server. The similarity between the word set of the article and the name of the category to which the item belongs is calculated; if any word in the word set of the article is not similar to the name of the category to which the item belongs, the name of the category to which the item belongs is used as the search term; otherwise, the word set of the article is replaced with a word pair (its function is to unify the words), and the stop words are removed with a stop word dictionary to obtain keywords, and the keywords and the name of the category to which the item belongs are used as search terms.

[0134] In this step, the id of the category to which the item belongs can be obtained from the e-commerce server through the interface of the e-commerce server, or it can be included in the article. The e-commerce server classifies the items, and the classification generally has three levels, for example, women's clothing, tops, and shirts. The e-commerce sets the name and id of the third-level category for each item.

[0135] The fourth step is to search on the search engine based on the search term, and then obtain 200 sku ids of the articles with pictures in the e-commerce server through the search engine interface of the e-commerce server. According to the 200 sku ids, multiple URLs corresponding to the original images of the articles are obtained through the interface of the e-commerce server or crawler technology, and the multiple URLs are deduplicated and saved to a preset location.

[0136] In the fifth step, if there is no URL in the preset location, or the number of URLs is less than K (K is preset and can be set to 300), it means that it is impossible to provide a picture for the article, and the process ends; otherwise, determine whether the category to which the item belongs has an item recognition model. If so, execute the sixth step. If not, it means that there is currently no ability to process the article, and it is impossible to provide a picture for the article, and the process ends.

[0137] Step 6: For each URL in the preset location, perform the following operations on the URL:

[0138] a. Download the original image corresponding to the URL, and determine whether the original image contains the item according to the item recognition model of the category to which the item belongs. If not, end the process. If yes, set a rectangular bounding box for the item on the original image so that the item is within the rectangular bounding box, and use existing recording technology to record the coordinate X of the rectangular bounding box relative to the original image, and then execute b.

[0139] b. Scale the original image in equal proportion to obtain a scaled image, wherein the width and length of the scaled image are t_w and t_h respectively, and select the larger value from t_w and t_h as t_max, and the other as t_low. Make t_max the same as the length of the long side of the preset window, and determine whether t_low is greater than the length of the short side of the preset window. If not, then end, and if so, execute c. Among them, the long side is adjacent to the short side, and the length of the long side is greater than the length of the short side.

[0140] c. According to the cutting method in the prior art, the zoomed image is cut multiple times using a preset window to obtain multiple cut images.

[0141] d. For each cut image, determine whether the ratio of the area of ​​the rectangular bounding box in the cut image to the area of ​​the rectangular bounding box in the scaled image (the area of ​​the rectangular bounding box in the scaled image is calculated by the coordinate X and the scaling ratio of the scaled image) is greater than 0.8. If so, the cut image is marked as success. If not, the cut image is marked as failure. If the ratio is 0, it means that the rectangular bounding box does not appear in the cut image, and the cut image is marked as ignore.

[0142] e. Determine whether the cutting image marked as successful is clear according to the clarity model. If so, use the cutting image marked as successful and clear as the illustration of the article.

[0143] In this step, when implemented, the cut image marked as successful and clear is saved in a format such as jpeg or png, and the cut image in jpeg or png format is used as the picture of the article, and the picture of the article is uploaded to an image storage server, such as CDN. The URL of the picture of the article is obtained and the URL of the picture of the article is saved.

[0144] It should be noted that an article id (article_id for short) can be set for each article, and the article id is used to distinguish different articles. It should be understood that for each article, the process of providing illustrations for each article is the process described in steps 3 to 6. In addition, if the id of the category to which the item described in one article belongs is the same as the id of the category to which the item described in another article belongs, and the title of this article is the same as the title of the other article, then the illustrations of the two articles are the same, and it is sufficient to obtain the illustrations of one article.

[0145] In order to solve the problems existing in the prior art, the embodiment of the present invention provides an intelligent image matching device, such as Figure 3 As shown, the device comprises:

[0146] The processing unit 301 is used to obtain a target image containing an object and scale the target image; wherein the object is the object described by the information.

[0147] The cutting unit 302 is used to cut the scaled target image multiple times to obtain multiple cut images.

[0148] The judging unit 303 is used to judge whether each cutting image contains the object and is clear. If so, the cutting image containing the object and is clear is used as a picture accompanying the information.

[0149] In this embodiment of the present invention, the processing unit 301 is used to:

[0150] Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window;

[0151] Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image;

[0152] The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

[0153] In this embodiment of the present invention, the processing unit 301 is used to:

[0154] Before scaling the target image, setting a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape;

[0155] The determining unit 303 is used for:

[0156] For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, determine whether the cut image is clear based on the clarity model. If so, delete the bounding box and use the cut image with the bounding box deleted as a matching image for the information.

[0157] In this embodiment of the present invention, the processing unit 301 is used to:

[0158] Acquire multiple original images of the information according to the title of the information and the category to which the item described in the information belongs;

[0159] A target image containing the object is selected from a plurality of original images according to the category to which the object belongs.

[0160] In this embodiment of the present invention, the processing unit 301 is used to:

[0161] Obtaining the title of the information and the name of the category to which the item described in the information belongs, and segmenting the title of the information to obtain a word set;

[0162] Determine the similarity between the word set and the name of the category to which the item belongs; if any word in the word set is not similar to the name of the category to which the item belongs, use the name of the category to which the item belongs as the search word; otherwise, obtain a keyword based on the word set, and use the keyword and the name of the category to which the item belongs as the search word;

[0163] A search is performed on a search engine based on the search term to obtain multiple item numbers of the information, and multiple original images of the information are acquired according to the multiple item numbers of the information.

[0164] In this embodiment of the present invention, the processing unit 301 is used to:

[0165] For each category, the item recognition model of the category is obtained according to the following method:

[0166] Using the name of the category as a search term, searching on a search engine to obtain a plurality of item numbers of the category; obtaining a plurality of item detail images of the category according to the plurality of item numbers of the category; labeling the item detail images, and using the labeled item detail images to train an image detection model to obtain an item recognition model of the category;

[0167] Obtaining an item recognition model of the category to which the item belongs from item recognition models of all categories according to the category to which the item belongs;

[0168] Based on an object recognition model of the category to which the object belongs, a target image containing the object is screened out from a plurality of original images.

[0169] It should be understood that the functions performed by the various components of the intelligent image matching device provided in the embodiment of the present invention have been introduced in detail in the intelligent image matching method of the above embodiment, and will not be repeated here.

[0170] Figure 4 An exemplary system architecture 400 to which the intelligent image matching method or intelligent image matching device according to the embodiment of the present invention can be applied is shown.

[0171] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0172] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0173] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0174] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0175] It should be noted that the intelligent picture matching method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the intelligent picture matching device is generally arranged in the server 405 .

[0176] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0177] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0178] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0179] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0180] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0181] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a processing unit, a cutting unit and a judgment unit. The names of these units do not constitute a limitation on the units themselves in some cases. For example, the cutting unit may also be described as "a unit that cuts the scaled target image multiple times to obtain multiple cut images".

[0184] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining a target image containing an object, scaling the target image; wherein the object is the object described by the information; cutting the scaled target image multiple times to obtain multiple cut images; judging whether each cut image contains the object and is clear, and if so, using the clear cut image containing the object as the accompanying image of the information.

[0185] According to the technical solution of the embodiment of the present invention, a target image containing an object is obtained, and the target image is scaled; wherein the object is the object described by the information; the scaled target image is cut multiple times to obtain multiple cut images; it is determined whether each cut image contains the object and is clear, and if so, the cut image containing the object and is clear is used as the illustration of the information. Scaling first and then cutting reduces the number of cutting times and the number of cut images, and a clear cut image containing the object can be obtained more quickly, thereby shortening the time consumed in providing illustrations for the information.

[0186] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An intelligent image matching method, It is characterized in that include: Acquire a target image containing an object, and scale the target image; wherein the object is the object described by the information; Cutting the scaled target image multiple times to obtain multiple cut images; Determine whether each cut image contains the object and is clear. If so, use the cut image containing the object and is clear as the accompanying image of the information. Before scaling the target image, the method further includes: setting a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape; Determine whether each cut image contains the object and is clear, and if so, use the cut image containing the object and is clear as the accompanying image of the information, including: For each cut image, determine whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, determine whether the cut image is clear based on the clarity model. If so, delete the bounding box and use the cut image with the bounding box deleted as a matching image for the information.

2. The method according to claim 1, It is characterized in that Scaling the target image, comprising: Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window; Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image; The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

3. The method according to claim 1, It is characterized in that Get the target image containing the object, including: Acquire multiple original images of the information according to the title of the information and the category to which the item described in the information belongs; A target image containing the object is selected from a plurality of original images according to the category to which the object belongs.

4. The method according to claim 3, It is characterized in that Acquiring multiple original images of the information according to the title of the information and the category to which the item described in the information belongs, including: Obtaining the title of the information and the name of the category to which the item described in the information belongs, and segmenting the title of the information to obtain a word set; Determine the similarity between the word set and the name of the category to which the item belongs; if any word in the word set is not similar to the name of the category to which the item belongs, use the name of the category to which the item belongs as the search word; otherwise, obtain a keyword based on the word set, and use the keyword and the name of the category to which the item belongs as the search word; A search is performed on a search engine based on the search term to obtain multiple item numbers of the information, and multiple original images of the information are acquired according to the multiple item numbers of the information.

5. The method according to claim 4, It is characterized in that Target images containing objects are selected from multiple original images according to the categories to which the objects belong, including: For each category, the item recognition model of the category is obtained according to the following method: Using the name of the category as a search term, searching on a search engine to obtain a plurality of item numbers of the category; obtaining a plurality of item detail images of the category according to the plurality of item numbers of the category; labeling the item detail images, and using the labeled item detail images to train an image detection model to obtain an item recognition model of the category; Obtaining an item recognition model of the category to which the item belongs from item recognition models of all categories according to the category to which the item belongs; Based on an object recognition model of the category to which the object belongs, a target image containing the object is screened out from a plurality of original images.

6. An intelligent image matching device, It is characterized in that include: A processing unit, configured to obtain a target image containing an object and scale the target image; wherein the object is the object described by the information; a cutting unit, configured to cut the scaled target image multiple times to obtain multiple cut images; and A judging unit is used to judge whether each cutting image contains the object and is clear. If so, the cutting image containing the object and is clear is used as a picture accompanying the information. The processing unit sets a bounding box for the object on the target image so that the object is within the bounding box, and the bounding box is a regular shape. For each cut image, the judgment unit determines whether the ratio of the area of ​​the bounding box in the cut image to the area of ​​the bounding box in the scaled target image is greater than a preset value. If so, the judgment unit determines whether the cut image is clear based on the clarity model. If so, the bounding box is deleted and the cut image with the bounding box deleted is used as a matching image for the information.

7. The device according to claim 6, It is characterized in that The processing unit is used for: Proportionally scaling the target image to obtain a target scaled image, so that a first side of the target scaled image is the same as a first side of the preset window; Determine whether the second side of the target zoomed image is larger than the second side of the preset window, and if so, use the target zoomed image as the zoomed target image; The first side is adjacent to the second side; and the preset window is used to perform multiple cuts on the scaled target image.

8. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

9. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.