CN115661516A - Commodity identification method and device, storage medium, and electronic device - Google Patents

Commodity identification method and device, storage medium, and electronic device Download PDF

Info

Publication number
CN115661516A
CN115661516A CN202211269536.4A CN202211269536A CN115661516A CN 115661516 A CN115661516 A CN 115661516A CN 202211269536 A CN202211269536 A CN 202211269536A CN 115661516 A CN115661516 A CN 115661516A
Authority
CN
China
Prior art keywords
brand
commodity
matching
information
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211269536.4A
Other languages
Chinese (zh)
Inventor
范凌
蒋兆湘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tezign Shanghai Information Technology Co Ltd
Original Assignee
Tezign Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tezign Shanghai Information Technology Co Ltd filed Critical Tezign Shanghai Information Technology Co Ltd
Priority to CN202211269536.4A priority Critical patent/CN115661516A/en
Publication of CN115661516A publication Critical patent/CN115661516A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a commodity identification method and device, a storage medium and an electronic device, wherein the method comprises the steps of extracting OCR texts in pictures to be uploaded and clustering the OCR texts under the condition that file names of the pictures to be uploaded are not read and target character strings of commodities are not matched, so as to obtain long texts with semantic information; detecting the brand of the commodity in the picture to be uploaded; if not, matching the brand name according to the long text with the semantic information; if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information; and carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result. By the method and the device, good identification can be realized for the commodities in the unlabeled white background picture, and the identification accuracy is ensured.

Description

Commodity identification method and device, storage medium, and electronic device
Technical Field
The present disclosure relates to the field of computer vision, and in particular, to a method and an apparatus for identifying a commodity, a storage medium, and an electronic apparatus.
Background
In different systems, the data stored by users are inconsistent, for example, only the design drawing of the current product line is stored in the system A, the name naming is not standard, some file names in the system are even stored in a messy code form, and only all the selling information of the current product line, such as brand category, weight, trade name, commodity description and the like, is stored in the system B. Because the system B does not have picture information, the customers need to integrate and deploy the information in the two systems into the same digital asset management system, so that the commodity pictures and the selling information of the commodities are matched and input into a new system. Sku, (Stock Keeping Unit minimum Stock).
However, in the whole system, the total sku categories are as many as 5 thousands or more, and each sku has a corresponding front side and a back side of the product, so that the workload is very large if picture information is marked purely manually.
The following scheme is mainly adopted in the related technology:
the method comprises the following steps: training an image classification or target detection model, inputting a picture through the model, and identifying and marking a label of the picture by a machine, but the model has the precondition that marking data must be prepared in advance in the training process, for example, the machine is expected to identify an A commodity in a poster, a marked white background of the A commodity needs to be prepared in advance, and then the characteristics of the A commodity need to be learned through machine training. However, machines typically lack labeling information for training pictures.
The second method comprises the following steps: the method includes the steps that an image retrieval model is trained, a comparison model is trained through different attempts of the same commodity to complete image retrieval, after a user uploads a picture, the model can retrieve the picture in a commodity picture library to find the most similar picture, meanwhile, a label of the most similar commodity picture in the commodity picture library is attached to the retrieval picture, in the process, a commodity base picture library still needs to be built, all pictures in the library need to be marked in advance, and the user does not mark the picture in advance in actual requirements.
The drawbacks in the related art are: although the two common methods have high working accuracy and are more suitable for marking commodities, the two common methods do not accord with the actual scene of a customer. For example, in the actual scene of the customer, the picture is not marked in advance, but an unfamiliar picture is directly uploaded on the machine, the machine needs to extract some text information of the picture, and then a proper sku commodity is matched in the text of the fragmented information according to the commodity information.
When the commodity image information under the condition of no picture indexing in the related technology is directly identified, a better solution is still not provided.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for identifying a commodity, a storage medium, and an electronic apparatus, so as to solve the problem of identifying the commodity in a mass non-indexed image.
In order to achieve the above object, according to one aspect of the present application, there is provided an article identification method.
The commodity identification method according to the application comprises the following steps:
under the condition that the file name of the picture to be uploaded is not read and the target character string of the commodity is not matched, extracting an OCR text in the picture to be uploaded and clustering the OCR text to obtain a long text with semantic information;
detecting the brand of the commodity in the picture to be uploaded;
if not, matching the brand name according to the long text with the semantic information;
if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
In some embodiments, the extracting and clustering OCR texts in the picture to be uploaded includes:
clustering OCR texts of the coordinate information in a preset distance range to obtain a plurality of coordinate clustering units by calculating the coordinate information among all the divided words;
and splicing the plurality of coordinate clustering units to obtain a long text with semantic information according to the reading habit as prior knowledge.
In some embodiments, after the detecting the brand of the commodity in the picture to be uploaded, the method further includes:
if the brand of the commodity is detected, judging whether the brand of the commodity is in a brand range with confusion significance;
based on the long text with the semantic information, performing text matching again and selecting a matching result with the highest similarity;
and if the brand of the commodity is judged to be in the brand range with the confusion significance, starting characters for rechecking to obtain sub-brand commodities under the brand.
In some embodiments, said matching, if not detected, brand names from said long text with semantic information comprises:
and keeping the long text by filtering out the short text in advance based on the long text with the semantic information, and matching the brand names in the brand pool.
In some embodiments, if there is a matching brand name, performing item attribute matching in a brand pool according to the long text with semantic information, where the item attribute matching includes at least one of: weight information, size information, country of production information, include:
according to a preset matching rule, matching commodity attributes of weight information, and/or size information, and/or production country information in a brand pool according to the long text with the semantic information;
wherein the matching rule at least comprises: (brand & size) | (brand & weight) | (brand & producing country), the & expression results take the intersection, and the | expression results take the union.
In some embodiments, the performing fuzzy matching according to the product attribute matching result to obtain a final product identification result includes:
calculating the similarity between the long text with semantic information and preset commodity name information by adopting a minimum public subsequence, wherein the preset commodity name information at least comprises a commodity name, a selling name and commodity description information;
and calculating according to the similarity to obtain a matching result, and using the matching result as a candidate for manual examination and warehousing.
In some embodiments, the method further comprises: if there is no matching brand name method, the method further comprises:
and triggering an alarm mechanism to ensure that whether the picture to be uploaded is correct is manually confirmed, wherein the picture to be uploaded comprises the white background image information of the front and back sides of the commodity.
In order to achieve the above object, according to another aspect of the present application, there is provided an article recognition apparatus.
The commodity identification device according to the application includes:
the extraction module is used for extracting the OCR texts in the pictures to be uploaded and clustering the OCR texts to obtain long texts with semantic information under the condition that the file names of the pictures to be uploaded are not read and are not matched with the target character strings of the commodities;
the detection module is used for detecting the brand of the commodity in the picture to be uploaded;
the first matching module is used for matching the brand name according to the long text with the semantic information if the brand name is not detected;
the second matching module is used for matching commodity attributes in a brand pool according to the long text with the semantic information if the matched brand name exists, and the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and the third matching module is used for carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
According to another aspect of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another aspect of the present invention, there is also provided an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
From the above description, it can be seen that the following technical effects are achieved by the present application:
extracting OCR texts in the pictures to be uploaded and clustering the OCR texts under the condition that the file names of the pictures to be uploaded are not read and the target character strings of the commodities are not matched, so as to obtain long texts with semantic information; then detecting the brand of the commodity in the picture to be uploaded; if not, matching the brand name according to the long text with the semantic information; and further, if the matched brand name exists, performing commodity attribute matching in a brand pool according to the long text with the semantic information, and finally performing fuzzy matching according to a commodity attribute matching result to obtain a final commodity identification result.
By the commodity identification method in the embodiment of the application, a user is helped to realize content fusion and matching management of two systems, and the base map label of each commodity does not need to be known in advance. Meanwhile, for some uncertain commodity categories, marking suggestion ranges can be given, so that a user can be helped to recommend at least Top10 suggestion ranges from 5W commodity categories, and then business personnel can carry out examination marking, and the marking workload in the system file migration work is greatly reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow chart of a method for identifying an article according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an article identification device according to an embodiment of the present application;
fig. 3 is a flow chart illustrating a method for identifying an article according to a preferred embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used in other meanings besides orientation or positional relationship, for example, the term "upper" may also be used in some cases to indicate a certain attaching or connecting relationship. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
For the actual scene of the user, since the label of the picture cannot be known in advance, the picture marking is directly performed through the information of the picture and the description information in other systems, and the task form is not classification or target detection, but rather a matching task should be defined.
In order to solve the above problem, an embodiment of the present application provides a matching task-based product identification method, which performs multi-dimensional extraction of picture contents and matching of extracted contents. The commodity identification efficiency is improved. And is suitable for white background picture commodities without any label result.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, the method includes steps S110 to S150 as follows:
and step S110, under the condition that the file name of the picture to be uploaded is not read and the target character string of the commodity is not matched, extracting the OCR text in the picture to be uploaded and clustering the OCR text to obtain a long text with semantic information.
It can be understood that the fastest identification mode of the commodity can be identified and marked through the file of the picture or the commodity code of the commodity in the picture.
Specifically, the matching task is that when a user downloads a picture to be uploaded from the system A (original system) and uploads the picture to be uploaded to the system C (new system), the user expects a machine to print a label or a label range from the content information of the picture or the file name of the picture to be matched with the commodity information in the system B (original system), so that the label of the picture commodity can be printed when the picture is directly uploaded to the system C without manual retrieval.
Further, in the process of considering the file name, firstly, the information of the file name is read in parallel, whether digital information exists in the file name or not is matched, and the digital information is matched with the identification code and/or the bar code of the commodity in the commodity pool. And if the matching is matched, directly labeling the picture in the system C, and if the matching is not matched, entering the picture for recognition again.
In addition, since no useful information is obtained in the file name, barcode detection is performed on the picture.
In some embodiments, some of the commodities have bar codes on their back images, and the bar codes are output according to the format of EAN13, so as to mark the uploaded pictures.
Under the condition that the file name of the picture to be uploaded is not read and the target character string of the commodity is not matched, extracting the OCR text in the picture to be uploaded and clustering the OCR text, wherein the result of clustering the OCR text is to obtain the long text with semantic information.
It is understood that semantic information herein refers to semantics that conform to natural language processing.
Specifically, the machine extracts the OCR texts in the picture, clusters the OCR texts, and restores the OCR texts into long sentences with certain semantic information. For example, if the text information extracted from the OCR long text is "dove", "body", "location", "men", "motion", "floor", "200", "ml" and "e", the text with a shorter distance is clustered according to the coordinate information thereof, and then is further clustered into "dove men", "body location", "floor motion", "200mle", and then the clustering units are spliced into a long sentence according to the reading habit from top to bottom and from left to right, and the long text with (actual) semantic information, such as "dove men body location floor motion 200mle", is restored. If neither the character string nor the Barcode can be identified, brand identification of the product is performed.
It is understood that Barcode is a machine-readable representation of data consisting of a set of bars, empty symbols, arranged according to a certain coding rule to represent certain characters, numbers and symbols.
And step S120, detecting the brand of the commodity in the picture to be uploaded.
And after the clustering is finished, continuously detecting the brand of the commodity in the picture to be uploaded. I.e. commercial logo recognition.
Specifically, the brand of the commodity is detected, so that the fuzzy matching narrowing range of the last step of the application is reduced, logo detection is preferentially carried out on the picture, logo graphs of all commodities in the warehouse are prepared in advance, and if the logo is detected in the step, whether the logo is in the brand range with the confusion significance is judged.
In some embodiments, for example, two brands, "dove" and "dove men" have the same logo, except that "dove men" has only the word "men" more on the logo than "dove", but belongs to both brands in the brand library of the merchandise. And performing text matching again in the long text with semantic information obtained by clustering the OCR texts, and preferentially obtaining the most similar matching result, so that some situations of logo recognition errors can be avoided. If the logo of the dove men is identified as the logo of the dove men, text re-verification is triggered, if the text message detects the text ' dove men ', brand information of a commodity can be modified from dove to dove men, and for example, two brands of ' wall's ' and ' algida ' are sub-brands under a road snow flag, similar sub-brands are quite many, and the logo of the main brand is the same, sometimes has text information, and sometimes does not have text information.
Preferably, if the logo matches any one of the sub-brands, the application also passes through text verification at this time, if no text information of any sub-brand is detected, the matching range is reduced to all sub-brand commodities under the logo, and if no logo is detected.
And step S130, if not, matching the brand name according to the long text with the semantic information.
If the brand of the commodity is not detected, the brand name needs to be matched according to the long text with the semantic information. That is, the long text with semantic information is still used to directly match with the brand name in the brand pool, and there are many noisy texts in plain text matching. For example, some short tradenames are called "t2", "sun", "omo", "rin", and these short tradenames are easily appeared in other words of the product description information during the matching process, for example, "sun" may appear in the description words "sunlight" of some sunscreen products, and these products are not the "sun" brand, so that some short texts are filtered out and only some texts are kept for matching when the product brands are matched here.
Step S140, if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information.
In order to narrow the matching range of the uploaded pictures to the range of fixed brands, the matching of the weight, the size and the country (production place) is then performed still by using the long text with semantic information.
Further, the range of the matched commodities is reduced, for example, if the current picture is known to be a commodity of dovemen through the relevant matching step and the size of 200ML is matched in the text information of the picture, the range of the final fuzzy matching can be reduced to be within about 50.
And S150, performing fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
And performing fuzzy matching (including matching with the commodity names, the selling names and the description information) according to the commodity attribute matching result to obtain a final commodity identification result.
In a specific embodiment, the extracting the OCR texts in the picture to be uploaded and clustering the OCR texts includes: clustering OCR texts of the coordinate information in a preset distance range by calculating the coordinate information among all the divided words to obtain a plurality of coordinate clustering units; and splicing the plurality of coordinate clustering units to obtain a long text with semantic information according to the reading habit as prior knowledge.
During specific implementation, after the OCR texts in the pictures to be uploaded are extracted, whether the OCR texts are clustered or not is judged according to the distance, namely the OCR texts with the coordinate information within a preset distance range are clustered to obtain a plurality of coordinate clustering units.
And then, splicing the plurality of coordinate clustering units according to the prior knowledge to obtain a long text with semantic information.
It should be noted that the long text may be english or chinese and has certain semantic information.
In a specific embodiment, after detecting the brand of the commodity in the picture to be uploaded, the method further includes: if the brand of the commodity is detected, judging whether the brand of the commodity is in a brand range with confusion significance; based on the long text with the semantic information, performing text matching again and selecting a matching result with the highest similarity; and if the brand of the commodity is judged to be in the brand range with the confusion significance, starting characters for rechecking to obtain sub-brand commodities under the brand.
In specific implementation, after the brand of the commodity in the picture to be uploaded is detected, if the brand of the commodity is detected, whether the brand of the commodity is in a brand range with confusion significance is judged. That is, it is determined whether the brand of the current good is of other brands of confusing significance or is within other easily confusable brands.
Further, if the brand of the commodity is judged to be in the brand range with the confusion significance, the characters are started to check again, and sub-brand commodities under the brand are obtained. If the logo of the dove men is identified as the logo of the dove men, text re-verification is triggered, if the text information detects the text ' dove men ', brand information of a commodity can be modified from dove to dove men, and for example, two brands of ' wall's ' and ' algida ' are sub-brands under the road snow flag, similar sub-brands are quite many, and the same logo of the main brand is needed, so that the identification accuracy is improved.
In one embodiment, the matching, if not detected, brand names according to the long text with semantic information includes: and keeping the long text by filtering out the short text in advance based on the long text with the semantic information, and matching the brand names in the brand pool.
In specific implementation, the long text is reserved by filtering out the short text in advance based on the long text with the semantic information, and the brand names in the brand pool are matched, so that the recognition efficiency is improved, and meanwhile, the text recognition noise is eliminated.
In a specific embodiment, if there is a matching brand name, performing product attribute matching in a brand pool according to the long text with semantic information, where the product attribute matching includes at least one of: weight information, size information, country of production information, include: according to a preset matching rule, carrying out commodity attribute matching on weight information, size information and/or production country information in a brand pool according to the long text with the semantic information, wherein the matching rule at least comprises the following steps: (brand & size) | (brand & weight) | (brand & producing country), the & expression results take the intersection, and the | expression results take the union.
In specific implementation, the matching of the commodity attributes at least comprises one of the following steps: weight information, size information, country of production information. And matching commodity attribute information in a brand pool according to the long text with the semantic information aiming at the weight information, the size information and the production country information.
It should be noted that the purpose of this operation is to further narrow the matching range of the product.
Meanwhile, the reason for adopting the operation of intersection and union is as follows: since the text recognized by the OCR sometimes has errors at a character level, sometimes the intersection is empty, and the information of the commodity which does not meet the preset conditions (such as weight information and calorie information) may appear in the text, for example, the real weight of the commodity is 300g, but the OCR may recognize the number 0 in 300g as the letter o, the package size is 300ml, the recognition is correct, and how many calories are contained in each 100g of the OCR text. Generally, if the machine only matches the digital weight, the range match can be changed to match only 100g of wrong brand goods (brand & weight), but because the range is changed to match 300ml of correct brand goods at this step, the union is finally obtained, and the range of correct answers can still be included in the final matching range at this step.
In a specific embodiment, the performing fuzzy matching according to the product attribute matching result to obtain a final product identification result includes: calculating the similarity between the long text with semantic information and preset commodity name information by adopting a minimum public subsequence, wherein the preset commodity name information at least comprises a commodity name, a selling name and commodity description information; and calculating according to the similarity to obtain a matching result, and using the matching result as a candidate for manual examination and warehousing.
In specific implementation, the minimum public subsequence is adopted, and the similarity between the long text with the semantic information and the preset commodity name information is calculated. And then, calculating according to the similarity to obtain a matching result, and using the matching result as a candidate for manual examination and warehousing.
It should be noted that since a large amount of abbreviated information is used by a client in making a record of a trade name in an actual recognition process, if it is calculated in terms of word level, it is difficult to obtain a high similarity value, but common character continuity is not required with the minimum common subsequence.
Specifically, for example, the extracted OCR information is "dove men body position motion 200mle", and the commodity name of a certain commodity 1 is "dovemen bdlt dm200ml" and the commodity name of another commodity 2 is "dovemen shmp 300ml" by narrowing down the commodity range in the system B,
the minimum public subsequence of the picture and the commodity 1 is calculated to be 'dovemenbdltdm 200 ml' through the minimum public subsequence, the length is 18, the minimum public subsequence of the picture and the commodity 2 is 'dovemenm 00 ml', the length is 12, therefore, the commodity 1 is preferentially recommended than the label of the commodity 2, and finally, related information of a machine matching result is listed in the candidate item for manual final examination and warehousing.
In one embodiment, the method further comprises: if there is no matching brand name method, the method further comprises: and triggering an alarm mechanism to manually confirm whether the picture to be uploaded is correct, wherein the picture to be uploaded comprises the white background image information of the front and back of the commodity.
In specific implementation, if an error occurs in the marking process manually or the resolution of the picture is low, for example, the commodity of the brand of cif is marked by the error to be the brand of jif or the image resolution of the front side and the back side of the commodity is low, the condition that the result is inconsistent with the machine recommendation result is alarmed, and the error data in the cleaning system is further helped.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided an article identification apparatus for implementing the above method, as shown in fig. 2, the apparatus including:
the extracting module 210 is configured to extract OCR texts in the pictures to be uploaded and cluster the OCR texts to obtain long texts with semantic information under the condition that the filenames of the pictures to be uploaded are not read and the target character strings of the commodities are not matched;
the detection module 220 is configured to detect a brand of a commodity in the picture to be uploaded;
a first matching module 230, configured to match a brand name according to the long text with semantic information if the brand name is not detected;
a second matching module 240, configured to, if there is a matching brand name, perform, according to the long text with semantic information, a product attribute matching in a brand pool, where the product attribute matching at least includes one of: weight information, size information, country of production information;
and the third matching module 250 is configured to perform fuzzy matching according to the product attribute matching result to obtain a final product identification result.
In the extraction module 210 in the embodiment of the present application, it can be understood that the fastest identification method for the product can be identified and marked through the file of the picture or the product code of the product in the picture.
Specifically, the matching task is that when a user downloads a picture to be uploaded from the system A (original system) and uploads the picture to be uploaded to the system C (new system), the user expects a machine to print a label or a label range from the content information of the picture or the file name of the picture to be matched with the commodity information in the system B (original system), so that the label of the picture commodity can be printed when the picture is directly uploaded to the system C without manual retrieval.
Further, in the process of considering the file name, firstly, the information of the file name is read in parallel, whether digital information exists in the file name or not is matched, and the digital information is matched with the identification code and/or the bar code of the commodity in the commodity pool. And if the matching is matched, directly labeling the picture in the system C, and if the matching is not matched, entering the picture for recognition again.
In addition, since no useful information is obtained in the file name, barcode detection is performed on the picture.
In some embodiments, some of the commodities have bar codes on their back images, and the bar codes are output according to the format of EAN13, so as to mark the uploaded pictures.
Under the condition that the file name of the picture to be uploaded is not read and the target character string of the commodity is not matched, extracting the OCR text in the picture to be uploaded and clustering the OCR text, wherein the result of clustering the OCR text is to obtain the long text with semantic information.
It is understood that semantic information herein refers to semantics that conform to natural language processing.
Specifically, the machine extracts the OCR texts in the picture, clusters the OCR texts, and restores the OCR texts into long sentences with certain semantic information. For example, if the text information extracted from the OCR long text is "dove", "body", "location", "men", "motion", "floor", "200", "ml" and "e", the text with a shorter distance is clustered according to the coordinate information thereof, and then is further clustered into "dove men", "body location", "floor motion", "200mle", and then the clustering units are spliced into a long sentence according to the reading habit from top to bottom and from left to right, and the long text with (actual) semantic information, such as "dove men body location floor motion 200mle", is restored. If neither the character string nor the Barcode can be identified, brand identification of the commodity is performed.
It is understood that Barcode is a machine-readable representation of data consisting of a set of bars, empty symbols, arranged according to a certain coding rule to represent certain characters, numbers and symbols.
In the detection module 220 in this embodiment of the application, after the clustering is finished, the brand of the commodity in the picture to be uploaded continues to be detected. I.e. commercial logo recognition.
Specifically, the brand of the commodity is detected, so that the fuzzy matching narrowing range of the last step of the application can be used for carrying out logo detection on the pictures preferentially, logo images of all commodities in the warehouse can be prepared in advance, and if the logo is detected at the step, whether the logo is in the brand range with the confusion significance can be judged.
In some embodiments, for example, two brands, "dove" and "dove men" have the same logo, except that "dove men" has only the word "men" more on the logo than "dove", but belongs to both brands in the brand library of the merchandise. And performing text matching again in the long text with semantic information obtained by clustering the OCR texts, and preferentially obtaining the most similar matching result, so that some situations of logo recognition errors can be avoided. If the logo of the dove men is identified as the logo of the dove men, text re-verification is triggered, if the text message detects the text ' dove men ', brand information of a commodity can be modified from dove to dove men, and for example, two brands of ' wall's ' and ' algida ' are sub-brands under a road snow flag, similar sub-brands are quite many, and the logo of the main brand is the same, sometimes has text information, and sometimes does not have text information.
Preferably, if the logo matches any one of the sub-brands, the application can pass text verification at this time, if no text information of any sub-brand is detected, the matching range can be reduced to all sub-brand commodities under the logo, and if no logo is detected.
In the first matching module 230 in the embodiment of the present application, if the brand of the article is not detected, the brand name needs to be matched according to the long text with semantic information. That is, the long text with semantic information is still used to directly match with the brand name in the brand pool, and there are many noisy texts in plain text matching. For example, some short tradenames are called "t2", "sun", "omo", "rin", and these short tradenames are easily appeared in other words of the product description information during the matching process, for example, "sun" may appear in the description words "sunlight" of some sunscreen products, and these products are not the "sun" brand, so that some short texts are filtered out and only some texts are kept for matching when the product brands are matched here.
In the second matching module 240 in this embodiment of the present application, in order to narrow the matching range of the uploaded pictures to the range of the fixed brand, the long text with semantic information is still used to perform matching of weight, size and country (production place).
Further, the range of the matched commodities is reduced, for example, if the current picture is known to be a commodity of dovemen through the relevant matching step and the size of 200ML is matched in the text information of the picture, the range of the final fuzzy matching can be reduced to be within about 50.
In the third matching module 250 in the embodiment of the present application, fuzzy matching (including matching with the product name, the selling name, and the description information) is performed according to the product attribute matching result, and a final product identification result is obtained.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
In order to better understand the flow of the product identification method, the following explains the technical solutions with reference to the preferred embodiments, but the technical solutions of the embodiments of the present invention are not limited.
In the method in the embodiment of the application, the commodities in the library are matched only through the image information which can be captured under the condition that the machine does not process the images in advance, and under the limiting condition, the final identification accuracy rate can still reach about 50%.
As shown in fig. 3, a schematic flow chart of a product identification method according to a preferred embodiment of the present application specifically includes the following steps:
step S1, a matching task is that when a user downloads a picture to be uploaded from a system A (an original system) and uploads the picture to be uploaded to a system C (a new system), the user expects a machine to print a label or a label range from the content information of the picture or the file name of the picture in the system B (the original system) when matching the commodity information, so that the label of the picture commodity can be printed when the picture is directly uploaded to the system C without manual retrieval.
And S2, in the process of considering the file names, reading the information of the file names in parallel, matching whether the file names have digital information or not, and matching the digital information with the identification codes and/or the bar codes of the commodities in the commodity pool. And if the matching is matched, directly labeling the picture in the system C, and if the matching is not matched, entering the picture for recognition again.
And S3, detecting the bar code of the picture because useful information is not acquired in the file name.
In some embodiments, some of the commodities have bar codes on their back images, and the bar codes are output according to the format of EAN13, so as to mark the uploaded pictures. The flow proceeds to the next step.
And S4, in the step, the machine extracts the OCR texts in the picture, clusters the OCR texts and restores the OCR texts into long sentences with certain semantic information.
For example, the text information extracted from the OCR long text is "dove", "body", "location", "men", "motion", "daily", "200", "ml", "e".
According to the method, the texts with the shorter distance are clustered according to the coordinate information, and are further clustered into 'dove men', 'body position', 'floor motion', '200 mle', then the clustering units are spliced into long sentences according to the coordinates and the reading habits from top to bottom and from left to right, and the long texts are restored into 'dove men body position floor motion 200 mle'.
Step S5, then, the method can detect the brand of the commodity, so that the fuzzy matching narrowing range of the last step of the method is achieved, the method can preferentially detect the logo of the picture, the method can prepare logo maps of all commodities in the warehouse in advance, if the method detects the logo at the step, the method can determine whether the logo is in the brand range with confusion significance, for example, two brands of 'dove' and 'dove men' have the same logo, only 'dove men' has the word of 'men' more than 'dove' on the logo, but the logo belongs to two brands in the brand warehouse of the commodity. And performing text matching again in the long text with semantic information obtained by clustering the OCR texts, and preferentially selecting the most similar matching result so as to avoid some logo recognition errors. If the logo of the dove men is identified as the logo of the dove men, text re-verification is triggered, if the text message detects the text ' dove men ', brand information of a commodity can be modified from dove to dove men, and for example, two brands of ' wall's ' and ' algida ' are sub-brands under a road snow flag, similar sub-brands are quite many, and the logo of the main brand is the same, sometimes has text information, and sometimes does not have text information.
If the logo matches any sub-brand, the application can pass text verification at the moment, if text information of any sub-brand is not detected, the matching range can be reduced to all sub-brand goods under the logo, and if the logo is not detected.
Step S6, because step S5 the application does not detect a logo, in this step, the application still adopts the clustered OCR information extracted in step S4, the application can directly awaken and match brand names in a brand pool, and because a lot of noise texts exist in the pure text matching. For example, some short tradenames are called "t2", "sun", "omo", "rin", and these short tradenames are easily appeared in other words of the product description information during the matching process, for example, "sun" may appear in the description words "sunlight" of some sunscreen products, and these products are not the "sun" brand, so that some short texts are filtered out and only some texts are kept for matching when the product brands are matched here.
And S7, through the matching in the steps S5 and S6, the matching range of the uploaded pictures is reduced to the range of fixed brands, then the clustered OCR text information extracted in the step 4 is still utilized in the method, the weight information, the size information and the production country information are matched, and the range of matched commodities in the method is further reduced.
If the picture is known to be a product of dove men through steps S4 and S5, and the size of the picture is matched to 200ml in the text information of the picture, the range of final fuzzy matching can be reduced to be within about 50.
The matching rule for the additional reduced brand range is (brand & size) | (brand & weight) | (brand & producing country), wherein "&" indicates that the matched range of the "brand" and the matched range of the "size" intersect, and the following is analogized in turn, and "|" indicates that the results of the three ranges are merged again, the purpose of the further operation is to further reduce the matching range of the commodity of the application, and the reason for the merging operation is that the text recognized by the OCR sometimes has errors in character level, so that sometimes the intersection is empty, and commodity information which does not meet preset conditions (such as weight information and heat information) may appear in the text, for example, the real weight of the commodity is 300g, but the OCR may recognize the number 0 in 300g as the letter o, the size of the package is 300ml, the recognition is correct, and how many calories each 100g may also appear in the OCR text. Generally, if the machine only matches the digital weight, the range match can be changed to match only 100g of wrong brand goods (brand & weight), but because the range is changed to match 300ml of correct brand goods at this step, the union is finally obtained, and the range of correct answers can still be included in the final matching range at this step.
In step S8, the present application performs fuzzy matching, and through the first 7 steps, the present application can reduce the range of the present application from 5W commodities to about 50 commodities, where all the commodity names and the selling names, and some description information contained in the commodity names are extracted, and the OCR text obtained in step S4 of the present application performs similarity calculation with all the commodity names, where the similarity calculation employs a minimum common subsequence.
The reason for this is that the client of the present application uses a large amount of abbreviated information when making trade name recording, if the present application calculates according to word level, it is difficult to obtain a high similarity value, but the minimum public subsequence does not require the continuation of public characters, for example, the extracted OCR information is "dove men body position data motion 200mle", and by narrowing down the commodity range in the system B, the commodity name of a certain commodity 1 is "dovemen bdlt dm200ml", the commodity name of another commodity 2 is "dovemen shmp 300ml",
the minimum public subsequence of the picture and the commodity 1 is calculated to be 'dovemenbdltdm 200 ml' through the minimum public subsequence, the length is 18, the minimum public subsequence of the picture and the commodity 2 is 'dovemenm 00 ml', the length is 12, therefore, the commodity 1 is preferentially recommended than the label of the commodity 2, and finally, related information of a machine matching result is listed in the candidate item for manual final examination and warehousing.
Step S9, if the machine does not provide a matching result for the front and back high-definition pictures of the commodity in the steps, an alarm mechanism is triggered at the same time, and whether the selected picture is correct or not is confirmed manually, for example, a user may upload a card which is not placed in a commodity library completely, or the picture pixels are too low to be identified.
Embodiments of the present application further provide a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that a file name of a picture to be uploaded is not read and a target character string of a commodity is not matched, extracting an OCR text in the picture to be uploaded and clustering the OCR text to obtain a long text with semantic information;
s2, detecting the brand of the commodity in the picture to be uploaded;
s3, if the brand name is not detected, matching the brand name according to the long text with the semantic information;
s4, if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and S5, carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that a file name of a picture to be uploaded is not read and a target character string of a commodity is not matched, extracting an OCR text in the picture to be uploaded and clustering the OCR text to obtain a long text with semantic information;
s2, detecting the brand of the commodity in the picture to be uploaded;
s3, if the brand name is not detected, matching the brand name according to the long text with the semantic information;
s4, if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and S5, carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for identifying an article, the method comprising:
under the condition that the file name of the picture to be uploaded is not read and the target character string of the commodity is not matched, extracting an OCR text in the picture to be uploaded and clustering the OCR text to obtain a long text with semantic information;
detecting the brand of the commodity in the picture to be uploaded;
if not, matching the brand name according to the long text with the semantic information;
if the matched brand name exists, carrying out commodity attribute matching in a brand pool according to the long text with the semantic information, wherein the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
2. The method of claim 1, wherein the extracting and clustering OCR texts in the picture to be uploaded comprises:
clustering OCR texts of the coordinate information in a preset distance range to obtain a plurality of coordinate clustering units by calculating the coordinate information among all the divided words;
and splicing the plurality of coordinate clustering units to obtain a long text with semantic information according to the reading habit as prior knowledge.
3. The method according to claim 2, wherein after detecting the brand of the commodity in the picture to be uploaded, the method further comprises:
if the brand of the commodity is detected, judging whether the brand of the commodity is in a brand range with confusion significance;
based on the long text with the semantic information, performing text matching again and selecting a matching result with the highest similarity;
and if the brand of the commodity is judged to be in the brand range with the confusion significance, starting characters for rechecking to obtain sub-brand commodities under the brand.
4. The method of claim 2, wherein if not detected, matching brand names from the long text with semantic information comprises:
and keeping the long text by filtering out the short text in advance based on the long text with the semantic information, and matching the brand names in the brand pool.
5. The method according to claim 1, wherein if there is a matching brand name, performing item attribute matching in a brand pool according to the long text with semantic information, wherein the item attribute matching comprises at least one of: weight information, size information, country of production information include:
according to a preset matching rule, matching commodity attributes of weight information, and/or size information, and/or production country information in a brand pool according to the long text with the semantic information;
wherein the matching rules comprise at least: (brand & size) | (brand & weight) | (brand & producing country), the & expression results take the intersection, and the | expression results take the union.
6. The method according to claim 1, wherein the performing fuzzy matching according to the product attribute matching result to obtain a final product identification result comprises:
calculating the similarity between the long text with semantic information and preset commodity name information by adopting a minimum public subsequence, wherein the preset commodity name information at least comprises a commodity name, a selling name and commodity description information;
and calculating according to the similarity to obtain a matching result, and using the matching result as a candidate for manual examination and warehousing.
7. The method of claim 1, further comprising: if there is no matching brand name method, the method further comprises:
and triggering an alarm mechanism to ensure that whether the picture to be uploaded is correct is manually confirmed, wherein the picture to be uploaded comprises the white background image information of the front and back sides of the commodity.
8. An article identification device, the device comprising:
the extraction module is used for extracting the OCR texts in the pictures to be uploaded and clustering the OCR texts to obtain long texts with semantic information under the condition that the file names of the pictures to be uploaded are not read and are not matched with the target character strings of the commodities;
the detection module is used for detecting the brand of the commodity in the picture to be uploaded;
the first matching module is used for matching the brand name according to the long text with the semantic information if the brand name is not detected;
the second matching module is used for matching commodity attributes in a brand pool according to the long text with the semantic information if the matched brand name exists, and the commodity attribute matching at least comprises one of the following steps: weight information, size information, country of production information;
and the third matching module is used for carrying out fuzzy matching according to the commodity attribute matching result to obtain a final commodity identification result.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202211269536.4A 2022-10-17 2022-10-17 Commodity identification method and device, storage medium, and electronic device Pending CN115661516A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211269536.4A CN115661516A (en) 2022-10-17 2022-10-17 Commodity identification method and device, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211269536.4A CN115661516A (en) 2022-10-17 2022-10-17 Commodity identification method and device, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
CN115661516A true CN115661516A (en) 2023-01-31

Family

ID=84987944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211269536.4A Pending CN115661516A (en) 2022-10-17 2022-10-17 Commodity identification method and device, storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN115661516A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116934195A (en) * 2023-09-14 2023-10-24 海信集团控股股份有限公司 Commodity information checking method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116934195A (en) * 2023-09-14 2023-10-24 海信集团控股股份有限公司 Commodity information checking method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP2585979B1 (en) Method and system for fast and robust identification of specific products in images
CN112446351B (en) Intelligent identification method for medical bills
US8744196B2 (en) Automatic recognition of images
US7382903B2 (en) Method for selecting an emphasis image from an image collection based upon content recognition
CN102103697B (en) Information processing device, method, and program
US20230085687A1 (en) Machine learning prediction and document rendering improvement based on content order
CN103995904B (en) A kind of identifying system of image file electronic bits of data
CN110210470B (en) Commodity information image recognition system
CN107403128B (en) Article identification method and device
CN112434691A (en) HS code matching and displaying method and system based on intelligent analysis and identification and storage medium
JP4783802B2 (en) Method and apparatus for outputting advertisement to printed matter
WO2000052645A1 (en) Document image processor, method for extracting document title, and method for imparting document tag information
JPH04321183A (en) Document register method for filing device
CN110413825B (en) Street-clapping recommendation system oriented to fashion electronic commerce
CN110489457A (en) Merchandise news analysis method, system and storage medium based on image recognition
WO2020007989A1 (en) Method for co-clustering senders and receivers based on text or image data files
CN111723640A (en) Commodity information inspection system and computer control method
CN115661516A (en) Commodity identification method and device, storage medium, and electronic device
CN112308059A (en) Commodity information translation method, system and readable storage medium for electronic commerce
Bajić et al. Data visualization classification using simple convolutional neural network model
CN109766893A (en) Picture character recognition methods suitable for receipt of doing shopping
TWI285849B (en) Optical character recognition device, document searching system, and document searching program
CN115063784A (en) Bill image information extraction method and device, storage medium and electronic equipment
CN115188006A (en) Method and device for extracting text from image, storage medium and electronic equipment
JP5869987B2 (en) Article collation apparatus, article collation method, and article collation program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination