Commodity identification method, device, electronic device and storage medium
By performing product detection and feature extraction on images in shared content, and combining visual and textual information for matching, it solves the problem of users finding the same or similar products, achieves accurate and efficient product identification, and simplifies the purchase process.
Patent Information
- Application Number
- CN202310173653.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-02-23
AI Technical Summary
On the Internet platform, it is difficult to accurately discover the same or similar products in the picture content shared by users, causing users to spend extra time searching.
By detecting and classifying the products in the pictures in the shared content, extracting image features, and matching them with the information in the product library, using visual features and text information to identify target products, and identify the same or similar products.
The accuracy and efficiency of product identification are improved. Users can purchase directly through product links added in shared content, reducing search time and improving user experience.
Smart Images

Figure CN117726843B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a commodity identification method, device, electronic device and storage medium. Background Art
[0002] With the development of Internet technology, content sharing in the form of pictures, videos, pictures + text, and videos + text is becoming more and more common on Internet platforms. After the shared content is released, users may want to buy the same or similar products based on the pictures in the shared content. In this way, users need to spend extra time searching for the same or similar products. Therefore, how to accurately mine the same and similar products based on the pictures in the shared content is a technical problem that needs to be solved in related technologies. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application propose a product identification method, device, electronic device and storage medium to accurately recall the same or similar products based on the pictures in the shared content.
[0004] According to one aspect of an embodiment of the present application, a product identification method is provided, including: performing product detection and classification on images in shared content, determining a first pixel area in the image where a product to be matched is located and a product category to which the product to be matched belongs; performing feature extraction on the first pixel area using a feature extraction model corresponding to the product category to which the product to be matched belongs, to obtain image features of the product to be matched in the image; performing product matching in a product library according to the image features of the product to be matched, to determine candidate products similar to the product to be matched; and performing target product identification on the candidate product according to image feature similarity between the image features of the candidate product and the image features of the product to be matched, product description information of the candidate product in the product library, and text in the shared content.
[0005] According to one aspect of an embodiment of the present application, a product identification device is provided, including: a detection and classification module, used to detect and classify products on pictures in shared content, and determine a first pixel area in the picture where a product to be matched is located and a product category to which the product to be matched belongs; a feature extraction module, used to extract features from the first pixel area through a feature extraction model corresponding to the product category to which the product to be matched belongs, and obtain image features of the product to be matched in the picture; a product matching module, used to match products in a product library according to the image features of the product to be matched, and determine candidate products similar to the product to be matched; and a recall module, used to identify target products for the candidate products according to the image feature similarity between the image features of the candidate products and the image features of the product to be matched, the product description information of the candidate products in the product library, and the text in the shared content.
[0006] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the commodity identification method described above is implemented.
[0007] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the commodity identification method as described above is implemented.
[0008] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions, and when the computer instructions are executed by a processor, the above commodity identification method is implemented.
[0009] In the present application, a feature extraction model is constructed for different commodity categories, and the image feature extraction of the first pixel area where the commodity to be matched is located is performed through the feature extraction model corresponding to the commodity category to which the commodity to be matched belongs, which can ensure that the extracted image features of the commodity to be matched are representative of the visual characteristics of the commodity to be matched, and ensure the accuracy of the image features of the commodity to be matched, thereby ensuring the accuracy of the candidate commodities determined for the commodity to be matched based on the image features of the commodity to be matched. Moreover, after the candidate commodities are determined for the commodity to be matched, the candidate commodities are recalled according to the image feature similarity between the image features of the candidate commodities and the image features of the commodity to be matched, the commodity description information of the candidate commodities in the commodity library and the text in the shared content, which is equivalent to combining the image features (visual features) of the commodity to be matched and the text in the shared content to identify the target commodity. Compared with using only information in one modality (for example, only visual features) for identification, the present application can improve the accuracy of identifying the target commodity, and the identified target commodity can be a similar commodity or the same commodity to the commodity to be matched. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 It is a schematic diagram of an application scenario of the present application according to an embodiment of the present application.
[0012] Figure 2 It is a flow chart of a commodity identification method according to an embodiment of the present application.
[0013] Figure 3 It is a flowchart of step 210 according to an embodiment of the present application.
[0014] Figure 4 is a flowchart of step 210 according to another embodiment of the present application.
[0015] Figure 5 is a flowchart of step 240 according to an embodiment of the present application.
[0016] Figure 6 It is a schematic diagram of performing brand consistency verification and category consistency verification according to an embodiment of the present application.
[0017] Figure 7is a flow chart of step 240 according to another embodiment of the present application.
[0018] Figure 8 It is a flow chart of a commodity identification method according to a specific embodiment of the present application.
[0019] Fig. 9 It is a block diagram of a commodity identification device according to an embodiment of the present application.
[0020] Fig.10 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application is shown. DETAILED DESCRIPTION
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0022] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0023] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0024] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes 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. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0025] Figure 1 is a schematic diagram of an application scenario of the present application according to an embodiment of the present application, such as Figure 1As shown, the application scenario includes a terminal 110 and a server 120. The terminal 110 is connected to the server 120 through a wired or wireless network. The terminal 110 can run the client program of the content sharing application, so that the terminal 110 can display the user interface of the content sharing application and input the content to be shared based on the user interface. After that, the terminal 110 can send the content to be shared to the server 120, and the server 120 will publish the shared content, so that other users in the content sharing application can view the published shared content. The content sharing application refers to an application with a content sharing function. In this application, the shared content includes at least pictures, and further, the shared content can also include text.
[0026] In the present application, a product library can be deployed in the server 120, and multiple products can be stored in the product library. On this basis, the server 120 can execute the product identification method provided in the present application according to the published shared content and the product library, so as to recall the same or similar products in the shared content. Specifically, the server 120 can implement product recall according to the following process: perform product detection and classification on the pictures in the shared content; perform image feature extraction on the first pixel area where the product to be matched is located; perform product matching in the product library according to the image features; perform target product identification on the candidate products, that is, identify whether the candidate product is the same or similar product to the product to be matched. The implementation details of product identification by the server 120 are described below.
[0027] In some embodiments, the server 120 may also add product links identified as candidate products for the same product or similar products to the shared content. In this way, for users viewing the shared content, if they want to purchase the same product or similar products in the shared content, they can directly purchase them according to the product links added to the shared content without the need for additional product searches, thereby shortening the time it takes for users to purchase the same or similar products and improving the user experience.
[0028] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0029] Figure 2 is a flowchart of a commodity identification method according to an embodiment of the present application. The method can be executed by an electronic device with processing capabilities, such as a Figure 1 The server 120 in.
[0030] Reference Figure 2 As shown, the method at least includes steps 210 to 240, which are described in detail as follows:
[0031] Step 210 , performing product detection and classification on the image in the shared content, and determining the first pixel area where the to-be-matched product in the image is located and the product category to which the to-be-matched product belongs.
[0032] The shared content can be the shared content to be distributed uploaded by the terminal, or it can be the shared content that has been published, which is not specifically limited here. In this application, the shared content at least includes a picture, which can be a picture as part of the shared content, or it can be a video frame in the video in the shared content. Furthermore, the shared content can also include text.
[0033] In some embodiments, the server 120 may determine whether to recall the published shared content based on the user feedback of the published shared content. The user feedback of the shared content is used to indicate the user feedback behavior triggered by the user on the published shared content. The user feedback behavior is such as the like behavior, collection behavior, forwarding behavior, purchase comment behavior, screenshot behavior of the shared content, and the behavior of saving pictures in the shared content, etc., which are not specifically limited here. In a specific embodiment, the server 120 can calculate the attention score of the shared content based on the user feedback of the shared content. The higher the attention score, the higher the attention of the shared content. Therefore, the server 120 can recall the shared content with an attention score exceeding the score threshold. If the attention score of a shared content does not exceed the score threshold, it indicates that the attention of the shared content is not high, that is, the user is not very interested in the shared content. Therefore, in this case, it is not necessary to recall the shared content, thereby realizing that the server 120 recalls the shared content based on the shared content in a targeted manner, avoiding the waste of processing resources in the server 120.
[0034] The shared content may include multiple pictures. For each picture in the shared content, the same product or similar products can be identified according to the method of this application.
[0035] The first pixel area refers to the pixel area where the to-be-matched product is located in the picture. The to-be-matched product refers to the product identified in the picture. In a specific embodiment, there may be one or more products in the picture. When there are multiple products in the picture, each product in the picture can be used as a to-be-matched product, or some of the products in the picture can be used as the to-be-matched products.
[0036] In some embodiments, Figure 3 As shown, step 210 includes the following steps 310-320:
[0037] Step 310: Perform product detection on the image in the shared content through the product detection model to determine the first pixel area where each to-be-matched product in the image is located.
[0038] Among them, the commodity detection model refers to a model that detects the commodity in the picture as the target, and the commodity detection model is a model constructed by one or more neural networks, such as recurrent neural networks, convolutional neural networks, fully connected networks, etc., which are not specifically limited here. In some embodiments, the commodity detection model can also be R-CNN (Regin Convolutional Neural Network, regional convolutional neural network), Fast R-CNN (fast regional convolutional neural network), Faster R-CNN, YOLO (You Only Look Me), R-FCN (Object Detection via Region-based Fully Convolutional Networks, object detection based on region-based fully convolutional network) model, etc.
[0039] In step 310, the image is input into the commodity detection model, which extracts image features from the image, and then identifies the commodity based on its image features, and outputs the position information of the detection frame corresponding to each commodity in the image. The detection frame corresponding to the commodity refers to the boundary frame surrounding the commodity in the image, and the detection frame can be a rectangular shape or the like. Since the commodity detection model outputs the position information of the detection frame corresponding to each commodity, the pixel area of the candidate commodity in the image, i.e., the first pixel area, can be located according to the position information of the detection frame corresponding to the commodity, i.e., the pixel area surrounded by the detection frame corresponding to the candidate commodity is used as the first pixel area where the candidate commodity is located.
[0040] As described above, the picture may include multiple products. Therefore, in step 310, the product detection model can output the location information of one detection box, or can output the location information of multiple detection boxes. If the product detection model outputs the location information of multiple detection boxes, it indicates that the product detection model recognizes that the picture includes multiple products.
[0041] It is worth mentioning that in order to ensure the accuracy of the product detection model, before step 310, the product detection model is trained using the first training data, wherein the first training data includes multiple sample images and annotation information of the sample images, and the annotation information of the sample images is used to indicate the products included in the image and the location information of the detection boxes corresponding to the products in the image.
[0042] Step 320: Perform commodity category recognition based on the first pixel area using a commodity classification model, and output the commodity category to which the to-be-matched commodity belongs.
[0043] The product classification model is used to identify the pixel category of the pixel area where the product is located. The product classification model can also be a model built by one or more neural networks.
[0044] In order to ensure the accuracy of commodity category identification by the commodity classification model, in step 320, the commodity classification model is trained using the second training data, wherein the second training data includes a plurality of sample commodity images and annotation information corresponding to the sample commodity images, and the annotation information corresponding to the sample commodity images is used to indicate the commodity category to which the commodity in the sample commodity images belongs. During the training process, the sample commodity images are input into the commodity classification model, which extracts features from the sample commodity images, and predicts the commodity category based on the extracted features, and outputs the predicted commodity category corresponding to the sample commodity images; thereafter, the loss value is calculated based on the predicted commodity category corresponding to the sample commodity images and the commodity category indicated by the annotation information corresponding to the sample commodity images, and the parameters of the commodity classification model are adjusted in reverse according to the loss value until the training end condition is reached.
[0045] In step 320, the first pixel area is input into the commodity classification model, and the commodity classification model extracts features from the first pixel area, classifies the commodity category according to the extracted features, and outputs the commodity category to which the first pixel area belongs.
[0046] In a specific embodiment, the commodity categories divided for commodities may be divided according to a primary directory or a multi-level directory. When the commodity categories are divided according to a multi-level directory, the same commodity belongs to a commodity category at each level of the multi-level directory.
[0047] For example, under the first-level category of beauty and cosmetics, there are four second-level categories, namely: cosmetics / perfumes / beauty tools; under the second-level category of beauty tools, there is a third-level category: beauty tools; under the third-level category of beauty tools, there is a fourth-level category: makeup brushes; in this way, for a makeup brush of brand A and material B, its fourth-level category is makeup brushes, its third-level category is beauty tools, its second-level category is beauty tools, and its first-level category is beauty and cosmetics.
[0048] Therefore, when the commodity categories are divided according to a multi-level catalog, in step 320, the commodity category to which the output first pixel area belongs includes the commodity category to which the to-be-matched commodity corresponding to the first pixel area belongs at each level of the category.
[0049] As described above, the image may include multiple products. Therefore, in step 320, the first pixel area where each to-be-matched product in the identified image is located is input into the product classification model for product category identification to obtain the product category to which each to-be-matched product in the image belongs.
[0050] In other embodiments, Figure 4 As shown, step 210 includes steps 410 to 440, which are described in detail as follows:
[0051] Step 410: Perform product detection on the image in the shared content through a product detection model to determine the first pixel area where each product in the image is located.
[0052] Step 420 , using a product classification model to identify the product category based on the first pixel area, and outputting the product category to which each product belongs.
[0053] In this embodiment, the implementation details of step 410 and step 420 are the same as the implementation details of step 310 to step 320, and are not described again here.
[0054] Step 430 , sorting the products in the picture according to the first pixel area where each product in the picture is located and the product category to which each product belongs through the product sorting model, to obtain the product sorting corresponding to the picture.
[0055] Step 440 : taking a preset number of commodities in the commodity ranking as commodities to be matched, and outputting the first pixel area where each commodity to be matched is located and the commodity category to which each commodity to be matched belongs.
[0056] As described above, the picture may include multiple products, and the user may not be very interested in some of the products in the picture. Therefore, in this case, the products identified in the picture can be sorted, and the first preset number of products in the product sorting can be used as to-be-matched products, so that subsequent product recall can be performed based on the determined to-be-matched products, while the products that are ranked later in the product sorting do not need to participate in the subsequent product recall process.
[0057] Thus, the first pixel areas and the corresponding commodity categories corresponding to the multiple commodities in the picture can be input into the commodity ranking model, and the commodity ranking model determines the importance score of each commodity in the picture according to the first pixel areas and the corresponding commodity categories corresponding to the multiple commodities in the picture, and sorts the multiple commodities in the picture in descending order of importance scores to obtain the corresponding commodity ranking. Afterwards, the first preset number of commodities in the commodity ranking are used as the commodities to be matched. The preset number can be set according to actual needs, such as 2, 3, etc.
[0058] Please continue reading Figure 2 , step 220, extracting features from the first pixel region through a feature extraction model corresponding to the commodity category to which the commodity to be matched belongs, and obtaining image features of the commodity to be matched in the picture.
[0059] In the present application, a feature extraction model corresponding to each commodity category is constructed. Thus, after identifying the commodity category to which the commodity to be matched belongs, the feature extraction model corresponding to the commodity category to which the commodity to be matched belongs is used to perform feature extraction on the first pixel area where the commodity to be matched is located.
[0060] The feature extraction model corresponding to each commodity category is a model constructed by one or more neural networks. The feature extraction model is constructed and trained specifically for each commodity category, so that the feature extraction model is targeted at the pixel area where the commodities belonging to the commodity category are located, thereby ensuring the accuracy of the image features extracted by the feature extraction model.
[0061] As described above, product categories can be divided according to multi-level directories. In this case, a feature extraction model can be constructed for each first-level category, that is, products belonging to the same first-level category share the same feature extraction model. In this way, it can be ensured that the feature extraction model can perform targeted feature extraction on pixel areas of products in different product categories, and the number of constructed feature extraction models can be reduced.
[0062] Step 230 , matching products in the product library is performed based on the image features of the product to be matched, and candidate products similar to the product to be matched are determined.
[0063] The product library stores product information of multiple products, and the product information may include pictures corresponding to the products, or image features corresponding to the product pictures of the products. Based on the image features corresponding to each product in the product library and the image features of the products to be matched, the feature similarity between the image features of the products to be matched and the image features corresponding to each product in the product library can be calculated, and candidate products similar to the products to be matched can be determined based on the determined feature similarity. In a specific embodiment, products in the product library whose feature similarity with the products to be matched is greater than a similarity threshold can be determined as candidate products similar to the products to be matched. Among them, the similarity threshold can be set according to actual needs, for example, 85%, 90%, 95%, etc., and is not specifically limited here.
[0064] Step 240 , target product recognition is performed on the candidate product based on the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched, the product description information of the candidate product in the product library, and the text in the shared content.
[0065] In the present application, the commodity information of each commodity in the commodity library also includes the commodity description information of the commodity, and the commodity description information at least includes the name of the commodity and the commodity category to which the commodity belongs. Similarly, if the commodity category is divided according to a multi-level directory, the commodity category to which each commodity in the commodity library belongs includes the commodity category to which the commodity belongs in each level of the commodity category.
[0066] The target product may be the same product or a similar product to the product to be matched. The target product identification is performed on the candidate product, that is, whether the candidate product is the same product or a similar product to the product to be matched.
[0067] In some embodiments, the target product includes the same product as the product to be matched. In this case, Figure 5 The process shown is used to identify the same product. Figure 5 As shown, when the image feature similarity is greater than the first threshold, step 240 includes the following steps 510 to 530, which are described in detail as follows:
[0068] Step 510, determine whether the text in the shared content includes the brand word; if it does, execute the following steps 520-530; if it does not, execute the following steps 540-550.
[0069] In some embodiments, before step 510, brand word recognition may be performed on the text in the shared content to determine whether the text in the shared content includes brand words. That is, before step 510, the method further includes: acquiring the text in the shared content; performing brand word recognition on the text in the shared content to determine a brand word recognition result corresponding to the text, and the brand word recognition result indicates whether the text includes brand words.
[0070] In a specific embodiment, the brand word recognition model can be used to identify brand words in the text and output the corresponding brand word recognition results. The brand word recognition model refers to a neural network model used to identify brand words. After the text in the shared content is input into the brand word recognition model, the brand word recognition model extracts semantic features from each word in the text, and then classifies the brand words according to the extracted semantics, and outputs the corresponding brand word recognition results. It can be understood that if the brand word recognition result indicates that the text includes brand words, the brand word recognition result corresponds to the brand words in the recognized text.
[0071] In order to ensure the recognition accuracy of the brand word recognition model, it is necessary to pre-train the brand word recognition model with the third training data. The third training data includes multiple sample texts and annotation information of the sample texts, and the annotation information of the sample texts is used to indicate the brand words included in the sample texts. Afterwards, each sample text is input into the brand word recognition model respectively, and the brand word recognition model performs brand word recognition on the sample text and outputs the brand word recognition result corresponding to the sample text; afterward, the loss value is calculated based on the brand word recognition result corresponding to the sample text and the brand words included in the sample text indicated by the annotation information corresponding to the sample text, and the parameters of the brand word recognition model are adjusted in reverse according to the loss value until the training end condition of the brand word recognition model is reached.
[0072] Step 520: Determine the brand of the candidate product from the product description information of the candidate product in the product library.
[0073] As described above, the product description information includes the brand to which the product belongs. Therefore, for a candidate product, the brand to which the candidate product belongs can be determined from the product description information of the candidate product.
[0074] Step 530: If the brand to which the candidate product belongs is the same brand as the brand indicated by the brand word included in the text in the shared content, then the candidate product is determined to be the same product as the product to be matched.
[0075] In some embodiments, since some brands may have aliases, there may be two different brand names that actually indicate the same brand. Therefore, in order to avoid the error in the judgment result of whether the brand of the candidate product and the brand word in the text of the shared content belong to the same brand due to the brand alias or other reasons, the brand of the candidate product in the product description information and the brand word in the text of the shared content may be mapped to the same standard brand word library before step 530. In this way, if the brand of the candidate product is represented by an alias, after being mapped to the standard brand word library, the brand of the candidate product can be represented by the standard brand word of the brand. Similarly, if the brand word included in the text of the shared content is represented by an alias of the brand, after being mapped to the standard brand word library, the brand represented by the brand word in the text of the shared content can be represented by the standard brand word of the brand.
[0076] Since the text in the shared content and the picture in the shared content belong to the same shared content, the text in the shared content can be understood as a text description of the picture in the shared content. On this basis, the brand indicated by the brand word in the text in the shared content can be determined as the brand of the product to be matched. Since the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched is greater than the first threshold, it indicates that the visual features between the candidate product and the product to be matched are relatively similar. In this case, if the brand to which the candidate product belongs is the same brand as the brand to which the product to be matched belongs, the probability that the candidate product and the product to be matched belong to the same item is high. Therefore, if it is determined that the brand to which the candidate product belongs is the same brand as the brand indicated by the brand word included in the text in the shared content, the candidate product can be determined to be the same item as the product to be matched, and the candidate product is recalled accordingly.
[0077] In the embodiment of steps 510 to 530 as above, when the image feature similarity is greater than the first threshold and the text in the shared content includes brand words, if the brand to which the candidate product belongs and the brand indicated by the brand words included in the text in the shared content are the same brand, the candidate product is determined to be the same product as the product to be matched, which is equivalent to using image features as the main constraints and using brand words in the text in the shared content for weak supervision to achieve accurate recall of candidate products that are the same as the product to be matched. Since the image features of the product to be matched and the text in the shared content are combined to determine whether the candidate product is the same product as the product to be matched based on information from these two modalities, the accuracy of identifying the same product is improved compared to identifying the same product using information in one modality.
[0078] Step 540 , determining the category similarity between the to-be-matched product and the candidate product according to the product category to which the to-be-matched product belongs and the product description information of the candidate product in the product library.
[0079] As described above, the commodity description information of the candidate commodity in the commodity library indicates the commodity category to which the candidate commodity belongs. Therefore, the commodity category to which the candidate commodity belongs can be determined according to the commodity description information of the candidate commodity.
[0080] In some embodiments, step 540 includes: if the product name of the candidate product includes the product category to which the to-be-matched product belongs, or the semantic similarity between the product category to which the to-be-matched product belongs and the product category description of the candidate product is greater than a semantic similarity threshold, then determining that the category similarity between the to-be-matched product and the candidate product is a first category similarity, and the first category similarity is greater than the category similarity threshold; the name of the candidate product and the product category description of the candidate product are obtained from the product description information of the candidate product.
[0081] Usually, for a commodity, the lowest level commodity category to which the commodity belongs is generally reflected in the commodity name. For example, a brand of makeup brushes generally includes "makeup brushes" in its name, and the lowest level commodity catalog in the commodity catalog to which the commodity belongs is also makeup brushes. Therefore, based on the commodity name of the candidate commodity and the lowest level commodity category in the commodity category to which the to-be-matched commodity belongs, if the lowest level commodity category in the commodity category to which the to-be-matched commodity belongs is in the commodity name of the candidate commodity, it can be determined that the to-be-matched commodity and the candidate commodity belong to the same commodity category. Therefore, at this time, it can be determined that the category similarity between the to-be-matched commodity and the candidate commodity is relatively large. In this embodiment, when the category similarity between the to-be-matched commodity and the candidate commodity is relatively large, the category similarity between the two is unified as the first category similarity that is greater than the category similarity threshold.
[0082] When the semantic similarity between the commodity category to which the commodity to be matched belongs and the commodity category description of the candidate commodity is greater than the semantic similarity threshold, it indicates that the probability that the commodity category to which the commodity to be matched belongs and the commodity category to which the candidate commodity belongs are the same commodity category is high. Therefore, in this case, it can be determined that the commodity to be matched and the candidate commodity belong to the same commodity category. In this embodiment, when the semantic similarity between the commodity category to which the commodity to be matched belongs and the commodity category description of the candidate commodity is greater than the semantic similarity threshold, the category similarity of the two is unified as the first category similarity greater than the category similarity threshold.
[0083] Step 550: If the category similarity is greater than the category similarity threshold, the candidate product is determined to be the same product as the product to be matched.
[0084] As described above, when the category similarity is greater than the category similarity threshold, it indicates that the candidate product and the product to be matched have a high probability of belonging to the same category. Since the similarity of their image features is also high, it can be approximately considered that the candidate product and the product to be matched are the same product, and the candidate product is recalled accordingly.
[0085] In the embodiments of step 510 and step 540-step 550 as above, when the image feature similarity is greater than the first threshold and the text in the shared content does not include brand words, if the category similarity between the product to be matched and the candidate product is greater than the category similarity threshold, the candidate product is recalled, which is equivalent to using image features as the main constraint and the category to which the product belongs as weak supervision to achieve accurate recall of candidate products that are the same as the product to be matched. Since the image features of the product to be matched and the product category to which the product belongs (i.e., the product category to which the candidate product belongs and the product category to which the product to be matched belongs) are combined to determine whether the candidate product is the same product as the product to be matched, the accuracy of identifying the same product is improved compared to using information in one modality to identify the same product.
[0086] In the above steps 520-530, the process of determining whether the brand to which the candidate product belongs and the brand indicated by the brand word in the text of the shared content are the same brand according to the brand to which the candidate product belongs and the brand word included in the text of the shared content can be summarized as a brand consistency verification process. In the above steps 540-550, the process of determining the category similarity between the product to be matched and the candidate product according to the product category to which the product to be matched belongs and the product description information of the candidate product in the product library, and then determining whether the two are in the same product category according to the category similarity can be summarized as a category consistency verification process.
[0087] On this basis, Figure 5 The corresponding embodiments can be summarized as Figure 6 The process shown, namely: when the image feature similarity is greater than the first threshold and the text in the shared content includes brand words, brand consistency verification is performed based on the product description information of the candidate product (specifically, the brand to which the candidate product belongs in the product description information) and the text in the shared content; when the image feature similarity is not greater than the first threshold and the text in the shared content does not include brand words, category consistency verification is performed based on the product category to which the product to be matched belongs and the product description information of the candidate product (mainly the product category to which the candidate product belongs and the name of the candidate product).
[0088] In some embodiments, the target product also includes similar products to the product to be matched. In this case, Figure 7 The process shown is used for identification. Figure 7 As shown, when the second threshold value ≤ image feature similarity ≤ the first threshold value (it can be understood that the second threshold value is less than the first threshold value), step 240 includes the following steps 510-520, step 540, and step 710, which are described in detail as follows:
[0089] Step 510, determine whether the text in the shared content includes the brand word; if it does, execute the following steps 520, 710-720; otherwise, if it does not, execute the following steps 540 and 720.
[0090] Step 520: Determine the brand of the candidate product from the product description information of the candidate product in the product library.
[0091] Step 540: Determine the category similarity between the to-be-matched product and the candidate product according to the product category to which the to-be-matched product belongs and the product description information of the candidate product in the product library. The specific implementation details of determining the category similarity are described above and will not be repeated here.
[0092] Step 710: If the brand to which the candidate product belongs is the same brand as the brand indicated by the brand word included in the text in the shared content, and the category similarity is greater than the category similarity threshold, the candidate product is determined to be a similar product to the product to be matched.
[0093] exist Figure 7 In the embodiment of , when the second threshold ≤ image feature similarity ≤ first threshold, and the text in the shared content includes brand words, it is equivalent to performing both brand consistency verification and category consistency verification. If the two are determined to belong to the same brand based on brand consistency verification, and if the two are determined to belong to the same category based on category consistency verification (i.e., the category similarity of the two is greater than the category similarity threshold), the candidate product is recalled. In this embodiment, compared with Figure 5 In the corresponding embodiment, the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched is slightly lower than Figure 5 The corresponding implementation example therefore uses the text in the shared content and the brand to which the candidate product belongs as weak supervision at the same time, and not only performs brand consistency verification on the candidate product, but also performs category consistency verification, thereby enhancing the recall constraints on the candidate product, and further ensuring the accuracy of similar products to the recalled products to be matched.
[0094] In some embodiments, please refer to Figure 7 , when the second threshold ≤ image feature similarity ≤ the first threshold, step 240 also includes the following steps 540 and 720, that is: if it is determined that the text in the shared content does not include the brand word, then execute steps 540 and 720.
[0095] Step 540 , determining the category similarity between the to-be-matched product and the candidate product according to the product category to which the to-be-matched product belongs and the product description information of the candidate product in the product library.
[0096] Step 720: If the category similarity is greater than the category similarity threshold and the image feature similarity is greater than the third threshold, the candidate product is determined to be a similar product to the product to be matched, and the third threshold is greater than the second threshold and less than the first threshold.
[0097] In some embodiments, the third threshold may be equal to a product of a penalty factor and the first threshold, wherein the penalty factor is a number greater than zero and less than 1.
[0098] In this embodiment, when the second threshold ≤ image feature similarity ≤ first threshold, and the text in the shared content does not include brand words, it is equivalent to determining whether the candidate product is a similar product to the product to be matched based on the verification result of the category consistency verification and the penalty factor, that is, when the category consistency condition is met (that is, the category similarity of the two is greater than the category similarity threshold), and the third threshold < image feature similarity ≤ first threshold, the candidate product is determined to be a similar product to the product to be matched.
[0099] Above Figure 7 The corresponding embodiments can be summarized as follows: when the second threshold ≤ image feature similarity ≤ first threshold and the text in the shared content includes brand words, brand consistency verification and category consistency verification are performed on the candidate products; when the second threshold ≤ image feature similarity ≤ first threshold and the text in the shared content does not include brand words, category consistency verification is performed on the candidate products, and the requirements for image feature similarity of the same products that need to be recalled are strengthened based on the penalty factor.
[0100] In some embodiments, in order to further distinguish the relationship between the recalled candidate products and the products to be matched, the first threshold can be determined based on the image feature similarity between product images of the same product, and the second threshold can be determined based on the image feature similarity between product images of similar products. Specifically, the first threshold can be set to be slightly larger than the image feature similarity between product images of the same product, or the first threshold can be set to be slightly larger than the image feature similarity threshold corresponding to the same product; the second threshold can be set to be slightly smaller than the image feature similarity between product images of similar products, or the second threshold can be set to be slightly smaller than the image feature similarity threshold corresponding to similar products. On this basis, according to Figure 5 The candidate products to be recalled determined in the corresponding embodiment can be marked as the same products as the products to be matched. Figure 7 The candidate products to be recalled determined by the corresponding embodiment can be marked as similar products to the products to be matched, thereby achieving accurate classification of the recalled candidate products into similar products and identical products.
[0101] In some embodiments, after step 240, the method further includes: adding a product link of a candidate product of the same or similar product to be matched to the shared content. In this way, if a user wants to purchase the same or similar product based on the picture in the shared content, the user can purchase it through the product link in the shared content without additional product search or searching for the same or similar product from other channels.
[0102] In some embodiments, after step 240, the method further includes: determining an attention score corresponding to the shared content based on user feedback on the shared content, and then using the attention score corresponding to the shared content as the attention score of a candidate product identified as a similar product or the same product based on the shared content, and sending a product link of the candidate product to the user based on the attention score of the candidate product, or sorting the products on the product page based on the attention score of the candidate product, so that the candidate products with higher attention scores are located at the front of the product page, so that users can quickly pay attention to products with higher attention scores without spending a lot of time looking for and searching for products.
[0103] In some embodiments, an enhancement factor or enhancement score can be set for the same product. In this way, for candidate products recalled for the same shared content, if the candidate product is the same product, the product of the attention score of the shared content and the enhancement factor is used as the corresponding attention score of the product, or the sum of the attention score of the shared content and the enhancement score is used as the corresponding attention score of the product; if the candidate product is a similar product, the attention score of the shared content is used as the corresponding attention score of the candidate product. In this way, it can be ensured that among the candidate products recalled for the same shared content, the attention score of the same product is higher than that of the similar product, and then the same product can be recommended first, or the same product can be displayed at the front position on the product page.
[0104] In the present application, a feature extraction model is constructed for different commodity categories, and the image feature extraction is performed on the first pixel area where the commodity to be matched is located by the feature extraction model corresponding to the commodity category to which the commodity to be matched belongs, which can ensure that the extracted image features of the commodity to be matched are representative of the visual characteristics of the commodity to be matched, and ensure the accuracy of the image features of the commodity to be matched, thereby ensuring the accuracy of the candidate commodities determined for the commodity to be matched based on the image features of the commodity to be matched. Moreover, after the candidate commodities are determined for the commodity to be matched, the candidate commodities are recalled according to the image feature similarity between the image features of the candidate commodities and the image features of the commodity to be matched, the commodity description information of the candidate commodities in the commodity library and the text in the shared content, which is equivalent to combining the image features (visual features) of the commodity to be matched and the text in the shared content to identify the target commodity. Compared with using only information in one modality (for example, only visual features) for identification, the present application can improve the accuracy of identifying the target commodity, wherein the identified target commodity can be a similar commodity or the same commodity of the commodity to be matched.
[0105] In some embodiments, if the same or similar products are not identified based on the shared content, the possible reason is that the products in the product library are limited. In this case, the pictures in the shared content can be sent to the product review end, and then the user of the product review end manually expands the products based on the pictures in the shared content, and adds the product description information of the expanded products to the product library, which is equivalent to enriching the products in the product library based on the shared content.
[0106] Figure 8 is a flowchart of a commodity identification method according to a specific embodiment of the present application, such as Figure 8 As shown, the shared content-ID of the shared content can be entered, and then, based on the shared content-ID, the picture in the shared content can be obtained. In other embodiments, the picture-URL (Uniform Resource Locator) of the picture can also be entered, and the picture in the shared content can be obtained based on the picture-URL.
[0107] Afterwards, the step of matching candidate products can be performed based on the pictures in the shared content. Figure 8 As shown, based on the picture in the shared content, the first pixel area where the to-be-matched product in the picture is located and the product category to which the to-be-matched product belongs are output in sequence through the product detection model, the product classification model and the product sorting model. Then, according to the product category to which the to-be-matched product belongs, the feature extraction model corresponding to the product category to which the to-be-matched product belongs is determined, and the corresponding feature extraction model performs feature extraction on the first pixel area where the to-be-matched product is located to obtain the image features corresponding to the to-be-matched product. Figure 8 The figure shows the apparel feature extraction model, the shoe feature extraction model, the bag feature extraction model, the beauty feature extraction model, etc. It is worth mentioning that the feature extraction models deployed for different product categories are not limited to Figure 8 shown.
[0108] It is understandable that for a picture, there may be multiple products to be matched that are identified. For each product to be matched that is identified, the subsequent product matching and product identification process is performed according to the method of this application. In this way, the problem of identifying the same or similar products in complex shared content or pictures can be broken down into the problem of recalling the same or similar products that focus on a single product to be matched, and then simply deduplication can be performed, simplifying the problem of identifying the same or similar products based on shared content and pictures.
[0109] exist Figure 8 In the corresponding embodiment, the product library includes product sub-libraries for different product categories, for example Figure 8 In the apparel product sub-library for clothing, the footwear product sub-library for shoes, the luggage product sub-library for bags, and the beauty product sub-library for beauty products. In other embodiments, the deployed product sub-libraries are not limited to Figure 8 Afterwards, for the to-be-matched product, the image features of the to-be-matched product extracted by the corresponding feature extraction model can be used to perform product matching in the product sub-library corresponding to the product category to which the to-be-matched product belongs, and determine candidate products similar to the to-be-matched product.
[0110] Afterwards, for the determined candidate products, the same product identification or similar product identification processing can be performed. Specifically: you can first call the product information to obtain the RPC (Remote Procedure Call) service to obtain the product description information of the candidate product from the product library. And based on the product description information of the candidate product, the brand word recognition result of the text in the shared content, and the product category to which the product to be matched belongs, perform at least one of brand consistency verification and category consistency verification to determine that the candidate product is identified as the same product or a similar product to the product to be matched. For the specific process of performing brand consistency verification and category consistency verification, please refer to the above. Figure 5-Figure 7 The description of the corresponding embodiments will not be repeated here.
[0111] Since multiple products to be matched may be identified in one picture in the shared content, multiple candidate products may be determined for each product to be matched, and the shared content may include multiple pictures, duplicate candidate products may be recalled for the same shared content. Therefore, the recalled candidate products can be deduplicated. In a specific embodiment, the candidate products can be deduplicated in the shared content dimension or the picture dimension. Specifically, if the candidate products are deduplicated in the shared content dimension, multiple candidate products recalled for the same shared content can be deduplicated; if the candidate products are deduplicated in the picture dimension, multiple candidate products recalled for the same picture can be deduplicated.
[0112] After the candidate products are deduplicated, the product IDs of the candidate products may be written into the first product library, which may be used to subsequently actively push products to users, or to add product links of the candidate products to corresponding shared content.
[0113] In this embodiment, product detection, product classification, and feature extraction are performed based on the pictures in the shared content to obtain image features (which can also be understood as visual features) of the products to be matched. Afterwards, product recall is performed using the first threshold and the second threshold set for the visual features as the main constraints, and the product category and brand words in the text of the shared content as weak supervision, which can achieve accurate recall of products from the image threshold to the product threshold.
[0114] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.
[0115] Fig. 9 is a block diagram of a commodity identification device according to an embodiment of the present application. The commodity identification device can be configured in an electronic device to implement the commodity identification method provided by the present application, such as Fig. 9 As shown, the product identification device includes: a detection and classification module 910, which is used to detect and classify products in the pictures in the shared content, and determine the first pixel area where the product to be matched is located in the picture and the product category to which the product to be matched belongs; a feature extraction module 920, which is used to extract features from the first pixel area through a feature extraction model corresponding to the product category to which the product to be matched belongs, and obtain image features of the product to be matched in the picture; a product matching module 930, which is used to match products in the product library according to the image features of the product to be matched, and determine candidate products similar to the product to be matched; an identification module 940, which is used to identify the candidate products according to the image feature similarity between the image features of the candidate products and the image features of the product to be matched, the product description information of the candidate products in the product library and the text in the shared content.
[0116] In some embodiments, the target product includes the same product as the product to be matched; the identification module 940 includes: a first identification unit, which is used to determine the brand of the candidate product from the product description information of the candidate product in the product library if the image feature similarity is greater than a first threshold and the text in the shared content includes brand words; if the brand to which the candidate product belongs and the brand indicated by the brand words included in the text in the shared content are the same brand, then the candidate product is determined to be the same product as the product to be matched; a second identification unit, which is used to determine the category similarity between the product to be matched and the candidate product based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library if the image feature similarity is greater than a first threshold and the text in the shared content does not include brand words; if the category similarity is greater than the category similarity threshold, then the candidate product is determined to be the same product as the product to be matched.
[0117] In some embodiments, the target product also includes similar products of the product to be matched; the identification module 940 also includes: a brand determination unit, which is used to determine the brand of the candidate product from the product description information of the candidate product in the product library if the second threshold ≤ image feature similarity ≤ first threshold and the text in the shared content includes brand words; a category similarity determination unit, which is used to determine the category similarity between the product to be matched and the candidate product according to the product category to which the product to be matched belongs and the product description information of the candidate product in the product library; a third identification unit, which is used to determine that the candidate product is a similar product of the product to be matched if the brand to which the candidate product belongs is the same brand as the brand indicated by the brand words included in the text in the shared content and the category similarity is greater than the category similarity threshold.
[0118] In some embodiments, the identification module 940 also includes: a fourth identification unit, which is used to determine the category similarity between the product to be matched and the candidate product according to the product category to which the product to be matched belongs and the product description information of the candidate product in the product library if the second threshold ≤ image feature similarity ≤ first threshold and the text in the shared content does not include brand words; if the category similarity is greater than the category similarity threshold and the image feature similarity is greater than the third threshold, then determine that the candidate product is a similar product of the product to be matched, and the third threshold is greater than the second threshold and less than the first threshold.
[0119] In some embodiments, the category similarity determination unit is further configured as follows: if the product name of the candidate product includes the product category to which the product to be matched belongs, or the semantic similarity between the product category to which the product to be matched belongs and the product category description of the candidate product is greater than a semantic similarity threshold, then the category similarity between the product to be matched and the candidate product is determined to be a first category similarity, and the first category similarity is greater than the category similarity threshold; the name of the candidate product and the product category description of the candidate product are obtained from the product description information of the candidate product.
[0120] In some embodiments, the product identification device also includes: a text acquisition module, used to acquire text in the shared content; a brand word recognition module, used to perform brand word recognition on the text in the shared content, and determine the brand word recognition result corresponding to the text, and the brand word recognition result indicates whether the text includes brand words.
[0121] In some embodiments, the detection and classification module includes: a product detection unit, which is used to perform product detection on pictures in the shared content through a product detection model, and determine the first pixel area where each to-be-matched product in the picture is located; a product category identification unit, which is used to perform product category identification based on the first pixel area through a product classification model, and output the product category to which the to-be-matched product belongs.
[0122] In some embodiments, the commodity identification device further includes: a commodity link adding module, configured to add a commodity link of a candidate commodity to the shared content.
[0123] Fig.10 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The electronic device may be Figure 1 The server in the embodiment may, of course, be other devices that can be used to execute the commodity identification method provided in this application.
[0124] like Fig.10 As shown, the electronic device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally also be a storage device independent of the aforementioned processor 1001. Those skilled in the art will understand that, Fig.10 The structure of the electronic device shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0125] like Fig.10 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a program for implementing the commodity identification method. Fig.10 In the electronic device shown, the network interface 1004 is mainly used to communicate with other devices, such as Figure 1 The user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the program for implementing the commodity identification method stored in the memory 1005 and execute the steps of the commodity identification method in any of the above method embodiments.
[0126] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the commodity identification method in any of the above method embodiments is implemented.
[0127] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, 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 can 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), a 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 application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals 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 programs 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, wired, etc., or any suitable combination of the above.
[0128] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions. When the computer instructions are executed by a processor, the commodity identification method in any of the above method embodiments is implemented.
[0129] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the 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 flowchart, and the combination of boxes in the block diagram or flowchart 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.
[0130] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0131] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0132] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0133] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A commodity identification method, characterized in that: include: Performing product detection and classification on the image in the shared content, determining the first pixel area where the to-be-matched product in the image is located and the product category to which the to-be-matched product belongs; Performing feature extraction on the first pixel region using a feature extraction model corresponding to the commodity category to which the to-be-matched commodity belongs, to obtain image features of the to-be-matched commodity in the image; Matching products in a product library according to the image features of the product to be matched, and determining candidate products similar to the product to be matched; Target product identification is performed on the candidate product based on the image feature similarity between the image features of the candidate product and the image features of the product to be matched, whether the brand to which the candidate product belongs and the brand indicated by the brand word included in the text in the shared content are the same brand, and the category similarity between the product to be matched and the candidate product determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library.
2. The method according to claim 1, characterized in that: The target product includes the same product as the product to be matched; The target product identification of the candidate product is performed based on the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched, whether the brand to which the candidate product belongs and the brand indicated by the brand word included in the text in the shared content are the same brand, and the category similarity between the product to be matched and the candidate product determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library, including: If the image feature similarity is greater than a first threshold, and the text in the shared content includes a brand word, determining the brand to which the candidate product belongs from the product description information of the candidate product in the product library; if the brand to which the candidate product belongs is the same brand as the brand indicated by the brand word included in the text in the shared content, determining that the candidate product is the same product as the product to be matched; If the image feature similarity is greater than a first threshold, and the text in the shared content does not include brand words, the category similarity between the product to be matched and the candidate product is determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library; if the category similarity is greater than the category similarity threshold, the candidate product is determined to be the same product as the product to be matched.
3. The method according to claim 2, characterized in that The target product also includes similar products to the product to be matched; The target product identification for the candidate product is performed based on the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched, whether the brand to which the candidate product belongs and the brand indicated by the brand word included in the text in the shared content are the same brand, and the category similarity between the product to be matched and the candidate product determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library, further comprising: If the second threshold value is ≤ the image feature similarity ≤ the first threshold value, and the text in the shared content includes a brand word, determining the brand to which the candidate product belongs from the product description information of the candidate product in the product library; Determine the category similarity between the to-be-matched product and the candidate product according to the product category to which the to-be-matched product belongs and the product description information of the candidate product in the product library; If the brand to which the candidate product belongs is the same brand as the brand indicated by the brand word included in the text in the shared content, and the category similarity is greater than the category similarity threshold, the candidate product is determined to be a similar product to the product to be matched.
4. The method according to claim 3, characterized in that The target product identification for the candidate product is performed based on the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched, whether the brand to which the candidate product belongs and the brand indicated by the brand word included in the text in the shared content are the same brand, and the category similarity between the product to be matched and the candidate product determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library, further comprising: If the second threshold ≤ the image feature similarity ≤ the first threshold, and the text in the shared content does not include a brand word, determining the category similarity between the to-be-matched product and the candidate product according to the product category to which the to-be-matched product belongs and the product description information of the candidate product in the product library; If the category similarity is greater than the category similarity threshold and the image feature similarity is greater than a third threshold, the candidate product is determined to be a similar product to the product to be matched, and the third threshold is greater than the second threshold and less than the first threshold.
5. The method according to any one of claims 2 to 4, characterized in that The determining, according to the commodity category to which the to-be-matched commodity belongs and the commodity description information of the candidate commodity in the commodity library, the category similarity between the commodity and the candidate commodity includes: If the product name of the candidate product includes the product category to which the to-be-matched product belongs, or the semantic similarity between the product category to which the to-be-matched product belongs and the product category description of the candidate product is greater than a semantic similarity threshold, then the category similarity between the to-be-matched product and the candidate product is determined to be a first category similarity, and the first category similarity is greater than the category similarity threshold; the name of the candidate product and the product category description of the candidate product are obtained from the product description information of the candidate product.
6. The method according to any one of claims 2 to 4, characterized in that Before recalling the candidate product based on the image feature similarity between the image feature of the candidate product and the image feature of the product to be matched, the product description information of the candidate product in the product library and the text in the shared content, the method further includes: Obtaining text in the shared content; Brand word recognition is performed on the text in the shared content to determine a brand word recognition result corresponding to the text, wherein the brand word recognition result indicates whether the text includes a brand word.
7. The method according to claim 1, characterized in that The detecting and classifying products in the image in the shared content, and determining the first pixel area where the product to be matched in the image is located and the product category to which the product to be matched belongs, includes: Performing product detection on the image in the shared content by using a product detection model to determine a first pixel area where each to-be-matched product in the image is located; The commodity category is identified according to the first pixel area through a commodity classification model, and the commodity category to which the to-be-matched commodity belongs is output.
8. A commodity identification device, characterized in that: include: A detection and classification module, used to detect and classify products in the pictures in the shared content, and determine the first pixel area where the product to be matched in the picture is located and the product category to which the product to be matched belongs; A feature extraction module, configured to extract features of the first pixel region by using a feature extraction model corresponding to the commodity category to which the commodity to be matched belongs, so as to obtain image features of the commodity to be matched in the image; A product matching module, used to match products in a product library according to the image features of the product to be matched, and determine candidate products similar to the product to be matched; The recognition module is used to identify the candidate product as a target product based on the image feature similarity between the image features of the candidate product and the image features of the product to be matched, whether the brand to which the candidate product belongs and the brand indicated by the brand word included in the text in the shared content are the same brand, and the category similarity between the product to be matched and the candidate product determined based on the product category to which the product to be matched belongs and the product description information of the candidate product in the product library.
9. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
