WO2023184644A1 - Product information processing method and apparatus based on rpa and ai, and device and medium - Google Patents

Product information processing method and apparatus based on rpa and ai, and device and medium Download PDF

Info

Publication number
WO2023184644A1
WO2023184644A1 PCT/CN2022/091293 CN2022091293W WO2023184644A1 WO 2023184644 A1 WO2023184644 A1 WO 2023184644A1 CN 2022091293 W CN2022091293 W CN 2022091293W WO 2023184644 A1 WO2023184644 A1 WO 2023184644A1
Authority
WO
WIPO (PCT)
Prior art keywords
attribute
target
text content
content
component information
Prior art date
Application number
PCT/CN2022/091293
Other languages
French (fr)
Chinese (zh)
Inventor
陈愫恺
Original Assignee
来也科技(北京)有限公司
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 来也科技(北京)有限公司 filed Critical 来也科技(北京)有限公司
Publication of WO2023184644A1 publication Critical patent/WO2023184644A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/418Document matching, e.g. of document images

Definitions

  • the present disclosure relates to the fields of Artificial Intelligence (AI for short) and Robotic Process Automation (RPA for short), and in particular to a product information processing method, device, equipment and medium based on RPA and AI.
  • AI Artificial Intelligence
  • RPA Robotic Process Automation
  • RPA uses specific "robot software” to simulate human operations on computers and automatically execute process tasks according to rules.
  • AI is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
  • Intelligent Document Processing is based on Optical Character Recognition (OCR), Computer Vision (CV), Natural Language Processing (NLP), Knowledge Graph ( Artificial intelligence technologies such as Knowledge Graph (KG) are used to identify, classify, extract, and verify various types of documents, and are a new generation of automation technology that help enterprises realize the intelligence and automation of document processing.
  • OCR Optical Character Recognition
  • CV Computer Vision
  • NLP Natural Language Processing
  • KG Knowledge Graph
  • product packaging will be designed to match the atmosphere of each holiday.
  • packaging will also be designed. New product packaging and so on.
  • product packaging generally includes nutritional information, ingredient information, manufacturer, address, place of origin and other information. If the above information is incorrect, it may cause certain legal issues. Therefore, it is very important to check the product information on the product packaging.
  • the present disclosure aims to solve one of the technical problems in the related art, at least to a certain extent.
  • the present disclosure proposes a product information processing method, device, equipment and medium based on RPA and AI to realize automatic verification of product information on product packaging diagrams through RPA robots.
  • it can reduce the amount of manual participation. Free up human resources and reduce labor costs.
  • it can improve the efficiency of product information verification, avoid error-prone manual verification, and improve the accuracy of product information verification results.
  • the first embodiment of the present disclosure proposes a product information processing method based on RPA and AI.
  • the method is executed by an RPA robot and includes:
  • the first difference part is marked abnormally in the text content, and/or the area where the first difference part is located is marked abnormally in the product packaging diagram.
  • the second embodiment of the present disclosure proposes a product information processing device based on RPA and AI, applied to RPA robots, including:
  • the first acquisition module is used to obtain the product packaging diagram corresponding to the target product
  • a recognition module used to identify the text content in the product packaging image based on optical character recognition OCR technology
  • the second acquisition module is used to obtain a reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product;
  • a comparison module configured to compare the text content and the document content to determine the first difference part in the text content that is different from the document content
  • a marking module is configured to mark the first difference part abnormally in the text content, and/or mark the area where the first difference part is located in the product packaging diagram abnormally.
  • the third embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, the present disclosure is implemented. The method described in the above embodiment of the first aspect.
  • the fourth embodiment of the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the method described in the first embodiment of the disclosure is implemented.
  • the fifth aspect embodiment of the present disclosure proposes a computer program product, which includes a computer program. When executed by a processor, the computer program implements the method described in the above first aspect embodiment of the present disclosure.
  • the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
  • Figure 1 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 2 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 3 is a schematic diagram of each sub-image obtained after segmenting the product packaging image in an embodiment of the present disclosure.
  • Figure 4 is a partial schematic diagram of a product packaging diagram in an embodiment of the present disclosure.
  • Figure 5 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 6 is a schematic diagram of a verification report in an embodiment of the present disclosure.
  • Figure 7 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 8 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 9 is a schematic diagram of the first nutritional component information in an embodiment of the present disclosure.
  • Figure 10 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • Figure 11 is a schematic diagram of the implementation principle of an embodiment of the present disclosure.
  • Figure 12 is a partial schematic diagram of a product packaging diagram in an embodiment of the present disclosure.
  • Figure 13 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
  • Figure 14 is a schematic diagram of the ingredient information extraction results in the embodiment of the present disclosure.
  • Figure 15 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
  • Figure 16 is a schematic diagram of the extraction results of the factory name, factory address and production license number in the embodiment of the present disclosure.
  • Figure 17 is a schematic diagram of the third attribute field in an embodiment of the present disclosure.
  • Figure 18 is a schematic diagram of a configuration template in an embodiment of the present disclosure.
  • Figure 19 is a schematic diagram of extraction rules or extraction rules for ingredients in an embodiment of the present disclosure.
  • Figure 20 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
  • Figure 21 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
  • Figure 22 is a schematic structural diagram of a product information processing device based on RPA and AI provided by an embodiment of the present disclosure.
  • FIG. 23 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
  • This disclosure proposes a product information processing method, device, equipment and medium based on RPA and AI.
  • RPA Robotic Process Automation
  • labor cost investment can be significantly reduced, existing office efficiency can be effectively improved, and work can be completed accurately, stably, and quickly.
  • AI is the abbreviation of Artificial Intelligence. It is a technical science that researches and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
  • AI is the study of using computers to simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It has both hardware-level technology and software-level technology.
  • AI hardware technology generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; AI software technology mainly includes computer vision technology, speech recognition technology, and Natural Language Processing (NLP). technology and machine learning/deep learning, big data processing technology, knowledge graph technology and other major directions.
  • NLP Natural Language Processing
  • “Commodities” are the fruits of labor produced for sale and the products of labor used for exchange.
  • products can include food, daily necessities, health products, etc.
  • Target product can be any product.
  • the target product can be a certain food, a certain daily necessities, etc.
  • Product packaging drawing also known as product packaging design drawing, refers to an image including the packaging design of the target product.
  • Product information refers to information related to the target product.
  • the product information may include nutritional information, ingredient information (or composition information), manufacturer, address, origin and other information of the target product.
  • Reference document refers to a document that includes product information corresponding to the target product.
  • the reference document can be a structured document, such as an Excel document, or the reference document can also be unstructured. Documents, such as Word documents, etc. It should be understood that when the reference document is an unstructured document, in order to facilitate the RPA robot to perform information comparison, the unstructured reference document can be converted into a structured document.
  • OCR Optical Character Recognition
  • First attribute field refers to the attribute field included in the text content corresponding to the product packaging diagram.
  • the first attribute field may include: production license (or production license number, production number), address, Manufacturer, ingredients, storage conditions, shelf life, production date, net content, product type, etc.
  • First attribute value refers to the attribute value corresponding to the first attribute field in the text content.
  • the attribute values corresponding to ingredients can be: drinking water, cheese powder, citric acid, etc.
  • the "second attribute field” refers to the attribute field included in the document content in the reference document.
  • the second attribute value refers to the attribute value corresponding to the second attribute field in the document content. It should be noted that the second attribute field is the standard attribute field corresponding to the target product, and the second attribute value is the standard attribute value corresponding to the target product.
  • first attribute field and/or the first attribute value may have errors in the design process, but the second attribute field and the second attribute value are related to the target product, and the correctly written attribute field and attribute value .
  • Set vocabulary list refers to a preset vocabulary list, which can also be called a custom vocabulary list.
  • the setting vocabulary includes various attribute fields related to the product information of the target product, which are recorded as third attribute fields in this disclosure.
  • the third attribute field may include: production license, address, manufacturer, ingredients, storage conditions, shelf life, production date, net content, product type, etc.
  • the OCR recognition result may be "material", resulting in the word “mixing” not being recognized, or the recognition result may be "ingredient", resulting in There are extra spaces in the recognition results.
  • Arguments are used as the third attribute field and are set in the setting vocabulary.
  • the set word list may include: “mixing”, “materials”, “ingredients”, “ingredients”, etc.
  • “Third attribute value” refers to the attribute value corresponding to the third attribute field in the text content corresponding to the product packaging diagram of the target product.
  • the attribute value corresponding to the ingredients can be: Drinking water, cheese powder, citric acid, etc.
  • Target document refers to a document containing the product packaging diagram of the target product.
  • the target document can be a PDF (Portable Document Format) document, or it can also be a PSD (PSD is Adobe's graphic design Design documents in formats such as the special format of the software Photoshop), Adobe Illustrator (specifically the file extension of Adobe Illustrator, which is a vector graphics file format).
  • PDF Portable Document Format
  • PSD PSD is Adobe's graphic design Design documents in formats such as the special format of the software Photoshop
  • Adobe Illustrator specifically the file extension of Adobe Illustrator, which is a vector graphics file format.
  • First nutritional ingredient information is the nutritional ingredient information related to the target product included in the text content.
  • the first nutritional ingredient information can include: energy, protein, fat, carbohydrate, etc. Ingredient information.
  • “Second nutritional information” refers to the nutritional information related to the target product included in the document content. It should be understood that the first nutritional information may be wrong in the design process, but the second nutritional information is related to the target product and the correct nutritional information is written.
  • Regular expressions also known as regular expressions, are used to retrieve or replace text that matches a certain pattern (or rule).
  • Any text fragment refers to any text fragment in the first nutritional ingredient information, wherein the same text fragment contains adjacent characters, and/or contains an interval of the first set number (such as 1 or 2, etc.) each character of the space.
  • Adjacent text fragment refers to the text fragment adjacent to the position of "any text fragment” in the "first nutritional ingredient information".
  • the "adjacent text fragment” can be: located on the left side of "any text fragment", Text snippets for the right, top, and bottom sides.
  • the first nutritional ingredient information can be as shown in Table 1:
  • Target detection algorithm belongs to the field of computer vision in the field of AI. It can be based on the target detection algorithm in deep learning technology to detect whether the required content is included in the image.
  • Figure 1 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI provided by the embodiments of the present disclosure can be applied to RPA robots, which can run in any electronic device with computing capabilities.
  • the electronic device may be a personal computer, a mobile terminal, etc.
  • the mobile terminal is, for example, a mobile phone, a tablet computer, a personal digital assistant and other hardware devices with various operating systems.
  • the product information processing method based on RPA and AI can include the following steps:
  • Step 101 Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
  • the product packaging image may be an image in image formats such as JPG (or JPEG (Joint Photographic Experts Group, Joint Photographic Experts Group)), PNG (Portable Network Graphics, Portable Network Graphics), etc.
  • JPG or JPEG (Joint Photographic Experts Group, Joint Photographic Experts Group)
  • PNG Portable Network Graphics, Portable Network Graphics
  • the RPA robot can directly obtain the product packaging diagram corresponding to the target product.
  • business personnel can take photos of the target product through an image collection device (such as a camera, mobile terminal, etc.) to obtain the product in image file format.
  • Packaging diagram or the business personnel can scan the paper document containing the product packaging diagram to obtain a document in PDF format, and take a screenshot of the product packaging diagram in the above document to obtain the product packaging diagram in image file format.
  • the business personnel can upload or send the product packaging diagram to the device where the RPA robot is located.
  • the RPA robot can also indirectly obtain the product packaging diagram corresponding to the target product.
  • the RPA robot can obtain the target document containing the product packaging diagram.
  • the target document can be manually uploaded or sent to the device where the RPA robot is located, so that after the RPA robot obtains the target document, it can extract it from the target document.
  • Product packaging picture For example, RPA robots can identify and intercept product packaging images from target documents based on target detection algorithms.
  • the RPA robot after the RPA robot obtains the product packaging image, it can perform character recognition on the product packaging image based on OCR technology to obtain the text content of the product packaging image.
  • Step 102 Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
  • the RPA robot can obtain the reference document, for example, by manually uploading or sending the reference document to the device where the RPA robot is located. After the RPA robot obtains the reference document, it can read the document content in the reference document.
  • Step 103 Compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
  • the RPA robot can compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
  • Step 104 Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
  • the RPA robot can annotate the above-mentioned first difference part abnormally in the text content.
  • the RPA robot can adjust the font and/or font size of the first difference part in the text content (such as increasing the font size, italicizing and/or bolding the font, etc.), and color the adjusted first difference part. Mark; alternatively, the RPA robot can also directly color mark the first difference part in the text content.
  • the first difference part can be colored in a striking color (such as red, blue, etc.). This disclosure is for There are no restrictions.
  • the RPA robot can determine the area where the first difference part is located in the product packaging diagram, and mark the above-mentioned area as abnormal in the product packaging diagram.
  • a label box can be added to the edge of the above area; or underlines, wavy lines, etc. can be added under the characters in the above area, and this disclosure does not limit this.
  • the RPA robot can also simultaneously mark the first difference part in the text content as abnormal, and mark the area where the first difference part is located in the product packaging diagram. Exception annotation.
  • the RPA robot after the RPA robot annotates the text content abnormally, it can also display the annotated text content, and/or after the RPA robot annotates the product packaging diagram abnormally, it can also display the annotated product packaging. diagram so that relevant personnel can be informed of the comparison results in a timely manner.
  • the product information processing method based on RPA and AI in the embodiment of the present disclosure uses the RPA robot to obtain the product packaging diagram corresponding to the target product, and based on OCR technology, identifies the text content in the product packaging diagram; obtains the reference document, and obtains the reference document The document content, wherein the document content includes product information corresponding to the target product; compare the text content and the document content to determine the first difference part in the text content that is different from the document content; compare the first difference in the text content Make an abnormal mark on the part, and/or make an abnormal mark on the area where the first difference part is located in the product packaging diagram.
  • the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
  • the disclosure also proposes a product information processing method based on RPA and AI.
  • Figure 2 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI can include the following steps:
  • Step 201 Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
  • the product packaging image can be divided into at least one sub-image by manual selection, so that character recognition can be performed on at least one sub-image based on OCR technology to obtain the text content.
  • the RPA robot can respond to the interception operation triggered by the relevant personnel, divide the product packaging image into at least one sub-image, and perform character recognition on at least one sub-image based on OCR technology to obtain the text content.
  • the relevant personnel can divide the product packaging diagram into six sub-areas as shown in Figure 3 through circle selection.
  • the RPA robot can identify and extract at least one target area from the product packaging image based on the target detection algorithm in deep learning technology, where the target area includes character information.
  • the RPA robot can perform character recognition on at least one target area based on OCR technology to obtain text content.
  • Step 202 Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
  • steps 201 to 202 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • Step 203 Extract each first attribute field from the text content, and extract a first attribute value matching each first attribute field from the text content.
  • the first attribute field can be extracted from the text content, and the first attribute value matching each first attribute field can be extracted from the text content.
  • the part of the product packaging diagram can be shown in Figure 4.
  • the text fragment before “:” can be used as the first attribute field
  • the text fragment after ":” can be used as the third attribute field.
  • the first attribute value corresponding to an attribute field.
  • an attribute table can be set in advance, and the attribute table includes each attribute field related to the target product. Therefore, in the present disclosure, the text content matching each attribute field in the attribute table can be extracted. After extracting each first attribute field, the first attribute value corresponding to each first attribute field can be extracted from the text content based on the set extraction rule or extraction rule.
  • the attribute value between two adjacent first attribute fields can be extracted from the text content and used as the first attribute value corresponding to the previous one of the two adjacent first attribute fields.
  • the character content after the last first attribute field can be the first attribute value corresponding to the last first attribute field.
  • a large number of packaging design drawings can be analyzed and counted, the statement located after the last attribute field in each packaging design drawing is determined, and the ending identifier is set based on the above statement, such as the ending identifier It can be "keep environment", etc., so that when the RPA robot recognizes that the text content contains the end identifier, it can intercept the character content between the last first attribute field and the end identifier, and use it as the third attribute field corresponding to the last first attribute field. An attribute value.
  • Step 204 Compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content.
  • each first attribute field in the text content and the first attribute value corresponding to each first attribute field can be combined with each second attribute field and each second attribute field in the document content corresponding to the first attribute value. Compare the two attribute values.
  • Step 205 When there is a mismatch between the first target attribute field and the second attribute field in each first attribute field, use the first target attribute field and/or the first attribute value corresponding to the first target attribute field as the third attribute field. A difference part.
  • the first target attribute field when it is determined that at least one attribute field (denoted as the first target attribute field in this disclosure) does not match the second attribute field among the first attribute fields, the first target attribute field may be and/or the first attribute value corresponding to the first target attribute field, as the first difference part.
  • Step 206 In each first attribute field, there is a situation where the second target attribute field matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute value corresponding to the second attribute field. Next, the first attribute value corresponding to the second target attribute field is used as the first difference part.
  • the first attribute value corresponding to the second target attribute field may be used as the first difference part.
  • Step 207 Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
  • step 207 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again.
  • the product information processing method based on RPA and AI in the embodiment of the present disclosure can avoid important content in product information by comparing each attribute field and attribute value in the text content with the attribute fields and attribute values in the document content respectively. omission detection, thereby improving the accuracy of product information verification results.
  • the OCR recognition result may be "material", resulting in the word “mixing” not being recognized, or the recognition result may be "ingredient", resulting in There are extra spaces in the recognition results.
  • the above situation will cause the RPA robot to be unable to recognize the attribute field "ingredients” and thus be unable to extract the attribute value corresponding to "ingredients". This will result in the RPA robot being unable to compare the ingredient information in the product packaging diagram.
  • the third attribute value corresponding to each third attribute field in the set vocabulary table can be extracted from the text content based on the set vocabulary table, so that the third attribute value can be compared with each third attribute field in the document content. Compare the two attribute values.
  • Figure 5 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI can also include the following steps:
  • Step 301 Obtain a setting vocabulary, where the setting vocabulary includes at least one third attribute field.
  • the set word list is preset.
  • the RPA robot can obtain the preset set word list.
  • Step 302 Extract third attribute values matching each third attribute field in the set vocabulary from the text content.
  • the RPA robot can extract the third attribute value from the text content that matches each third attribute field in the set vocabulary.
  • the specific implementation process is similar to step 203 and will not be described again here.
  • Step 303 Compare the third attribute value corresponding to each third attribute field with the second attribute value corresponding to each second attribute field in the document content.
  • Step 304 If there is a mismatch between the target attribute value and the second attribute value among the third attribute values, the target attribute value is used as the first difference part.
  • the third attribute value corresponding to each third attribute field can be compared with the second attribute value corresponding to each second attribute field in the document content. If there is If at least one attribute value (referred to as the target attribute value in this disclosure) does not match the second attribute value, the target attribute value may be used as the first difference part. If each third attribute value matches the second attribute value, no processing is required.
  • steps 301 to 304 can be executed after step 206, or steps 301 to 304 can also be executed in parallel with steps 203 to 206, or steps 301 to 304 may also be executed before step 203, and so on. In other words, steps 301 to 304 only need to be executed before step 207.
  • the RPA robot when there is a first difference part in the text content, in order to enable relevant personnel to check and/or modify the product packaging diagram in a timely manner, in any embodiment of the present disclosure, the RPA robot also Prompt information can be sent, where the prompt information is used to prompt to check and/or modify the first difference part in the product packaging diagram.
  • the RPA robot can send prompt information to a designated account (such as an email account); for another example, the device where the RPA robot is located can be logged in with instant messaging software, and the RPA robot can send prompt information to the instant messaging account of the relevant person.
  • a designated account such as an email account
  • the device where the RPA robot is located can be logged in with instant messaging software, and the RPA robot can send prompt information to the instant messaging account of the relevant person.
  • the RPA robot can determine the target product according to the corresponding relationship between the first attribute field and the first attribute value, the corresponding relationship between the third attribute field and the third attribute value in the text content. Generate and display a verification report for at least one of the first nutritional ingredient information, so that relevant personnel can verify the product packaging diagram based on the above verification report.
  • the reconciliation report can be as shown in Figure 6.
  • the RPA robot can not only send prompt information, but also generate verification reports.
  • the RPA robot can also compare the document content and the text content to determine the second difference part in the document content that is different from the text content.
  • the comparison method is the same as in the above embodiment.
  • the method of comparing text content and document content is similar and will not be described in detail here.
  • the RPA robot determines that there is a second difference part in the document content, it can annotate the second difference part in the document content and display the annotated document content.
  • the marking method of the second difference part is similar to the marking method of the first difference part, and will not be described again here.
  • the product information processing method based on RPA and AI in the embodiment of the present disclosure further extracts each attribute value in the text content according to the set vocabulary, and compares each extracted attribute value with each attribute value in the document content. It can avoid the situation where attribute values are missed due to low accuracy of OCR recognition results, thereby improving the accuracy of product information verification results.
  • the disclosure also proposes a product information processing method based on RPA and AI.
  • Figure 7 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI can include the following steps:
  • Step 401 Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
  • Step 402 Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
  • steps 401 to 402 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • Step 403 Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
  • the first nutritional ingredient information of the target product can be extracted from the text content.
  • the first nutritional ingredient information can be included in a certain sub-region, which is recorded as a target sub-image in this disclosure.
  • the target sub-image can be as shown in Figure 3
  • character recognition can be performed on the target sub-area based on OCR technology to obtain the first nutritional component information.
  • the text content is composed of OCR recognition results corresponding to multiple sub-images.
  • the target sub-image containing the first nutritional component information can be determined from the multiple sub-images, and the OCR corresponding to the target sub-image can be determined from the text content. Recognition results.
  • the RPA robot can also extract the second nutritional component information from the document content.
  • Step 404 Compare each component information in the first nutritional component information with the corresponding component information in the second nutritional component information.
  • Step 405 If there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
  • each component information (such as energy, protein, fat and other component information) in the first nutritional component information can be matched with the corresponding component information in the second nutritional component information.
  • the target component information can be used as the first difference part.
  • Step 406 Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
  • step 406 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • the product information processing method based on RPA and AI in the embodiment of the present disclosure can realize the verification of the table content in the product packaging diagram by comparing the nutritional information in the text content with the nutritional information in the document content to avoid Omissions of product information are checked, thereby improving the reliability of the verification results.
  • Figure 8 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI can include the following steps:
  • Step 501 Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
  • Step 502 Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
  • Step 503 Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
  • steps 501 to 503 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • Step 504 For any component information in the first nutritional component information, obtain a regular expression matching any component information.
  • the regular expression corresponding to each ingredient information can be preset, so that in the present disclosure, the RPA robot can obtain the regular expression corresponding to each ingredient information in the first nutritional ingredient information.
  • Step 505 Match the regular expression with any component information.
  • Step 506 If there is no match, any component information is replaced based on the regular expression.
  • the corresponding regular expression can be based on the any component information. Any component information is replaced. And if any component information matches the corresponding regular expression, there is no need to perform replacement processing on any component information.
  • the unit corresponding to "carbohydrate” is “g”. If the unit corresponding to "carbohydrate” in the first nutritional ingredient information is "9", you can use the regular expression corresponding to the "carbohydrate” to "9” is automatically replaced with “g”.
  • the last item "NRV” corresponding to each nutrient ingredient is the percentage of the nutrient required throughout the day. If the unit corresponding to "NRV" in each ingredient information in the first nutrient ingredient information is not "%", and other symbols, you can use the regular expression corresponding to each component information to automatically replace other symbols with "%".
  • any component information can also be replaced by writing logical judgments at the code level.
  • the code logic can be: determine whether the last number in each ingredient information contains a unit. If it does not contain a unit, the last digit can be automatically replaced with a unit that matches the ingredient information, such as replacing "9" with " g".
  • Step 507 Compare each component information in the replaced first nutritional component information with the corresponding component information in the second nutritional component information.
  • Step 508 If there is a mismatch between the target component information in the replaced first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
  • Step 509 Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
  • step 509 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • the product information processing method based on RPA and AI in the embodiment of the present disclosure obtains a regular expression that matches any component information by targeting any component information in the first nutritional component information; the regular expression is matched with any component information Match; if not, any component information will be replaced based on the regular expression.
  • the OCR recognition results can be supplemented, corrected and optimized, thereby further improving the accuracy and reliability of the product information comparison results.
  • This disclosure also proposes an RPA and AI product information processing method.
  • Figure 10 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing method based on RPA and AI can include the following steps:
  • Step 601 Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
  • Step 602 Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
  • Step 603 Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
  • steps 601 to 603 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • Step 604 For any text segment in the first nutritional ingredient information, determine whether the semantics of any text segment is complete.
  • any text fragment in the first nutritional ingredient information it can be determined whether the semantics of any text fragment is complete.
  • the reasons for the identification errors of the first nutritional ingredient information include unit identification errors on the one hand, and item (such as protein, carbohydrates, trans fatty acids, vitamin D, etc.) identification errors on the other hand, among which , the reason for project identification errors is generally: the project name is long, which causes OCR to classify some characters in the project name into the content (such as the column for each 100mL in Figure 9).
  • each item included in the nutritional composition table corresponding to different commodities can be determined, and the above items can be written into the item table , so in the present disclosure, the text fragment where each item in the first nutritional component information is located can be matched with the name of each item in the item table. If the text fragment where a certain item in the first nutritional component information is located matches the item name in the item table If the names of each item do not match, it is determined that the semantics of the text fragment in which the item is located is incomplete.
  • Step 605 If the semantics of any text fragment is incomplete, obtain adjacent text fragments adjacent to any text fragment from the nutritional composition information.
  • the adjacent text fragments adjacent to any of the text fragments can be obtained from the nutritional component information.
  • Step 606 If the semantics of the adjacent text segments are incomplete, determine semantically complete sub-segments from the adjacent text segments.
  • Step 607 Extract other characters excluding sub-segments from the adjacent text fragments, and classify the other characters into any text fragment.
  • the next adjacent text fragment adjacent to any of the above text fragments can be obtained, and whether the semantics of the next adjacent text fragment is complete is determined. If the semantics of the next adjacent text fragment is not Complete, the semantically complete sub-segment can be determined from the next adjacent text segment, and other characters in the next adjacent text segment except the sub-segment can be extracted, so that other characters can be classified into any text segment.
  • Step 608 Remove other characters from adjacent text segments.
  • the RPA robot can also remove other characters from adjacent text segments to ensure the accuracy of the first nutritional ingredient information recognition result.
  • Step 609 Compare each component information in the updated first nutritional component information with the corresponding component information in the second nutritional component information.
  • Step 610 If there is a mismatch between the target component information in the updated first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
  • Step 611 Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
  • steps 609 to 611 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
  • the RPA robot can be installed on the verification platform side, so that in the present disclosure, automatic verification of product information can be completed on the verification platform side.
  • the implementation principle of the embodiment of the present disclosure can be shown in Figure 11, specifically: Includes the following parts:
  • the first part is to upload the product packaging pictures to the verification platform.
  • the format of the product packaging diagram can be JPG, PNG and other picture formats (or image formats), or you can upload design documents in PDF documents, PSD and other formats, and the product packaging diagram can be extracted from the above documents.
  • relevant personnel can upload images or documents to the verification platform through the web page.
  • the second part is to cut the product packaging diagram.
  • the product packaging image can be cut into multiple sub-images. For example, the relevant personnel can manually select the areas in the product packaging image that need to be OCR recognized, and cut the above areas to obtain each sub-area.
  • a human can circle the area where the nutritional label as shown in Figure 12 is located.
  • humans can circle each area as shown in Figure 3.
  • the OCR recognition results of the nutritional ingredients table in Figure 3 can be shown in Figure 9.
  • the OCR recognition results can be supplemented and optimized, and the optimized OCR recognition results can be shown in Table 1.
  • the newline symbols in the OCR recognition results can be removed to obtain a long text, which can then be checked against the configuration template on the platform (the configuration template includes information for extracting the corresponding attributes of each attribute field). Attribute value extraction rules or extraction rules), extract ingredient information from the OCR recognition results.
  • the verification platform extracts the ingredient information from the OCR recognition results in Figure 13, and the extraction results can be shown in Figure 14.
  • the extraction of the manufacturer (hereinafter referred to as the factory name), place of production and address (hereinafter referred to as the factory address), and production license (or production license number) is similar to the ingredients.
  • OCR recognition is performed on the image area where the factory name and address are located, and the recognition result can be shown in Figure 15.
  • the line breaks in the OCR recognition results can be removed to obtain a long text, and then the template can be configured to extract the text from the OCR recognition results.
  • Extract the factory name and address For example, the verification platform extracts the factory name, factory address and food production license number from the OCR recognition results in Figure 15, and the extraction results can be shown in Figure 16.
  • the attribute fields to be extracted can be defined on the verification platform side, such as extracting the manufacturer (hereinafter referred to as factory name), place of origin and address (hereinafter referred to as factory address), etc.
  • the defined attribute fields can be as shown in Figure 17, so that attribute values matching each attribute field can be extracted from the OCR recognition results, and then each extracted attribute field and attribute value can be subsequently compared with the attribute value in the document content. Each attribute field is compared with the attribute value.
  • a custom vocabulary list (referred to as a set vocabulary list in this disclosure) can also be set on the verification platform side, and the set vocabulary list is used to cooperate with the extraction.
  • the ingredient information must appear after the word “ingredients” or “ingredients:”.
  • the word “ingredients” will be recognized, but the word “matching” will not be recognized, or the word “ingredients” will be recognized. If there are spaces in the middle of the "ingredients", these can be configured in the vocabulary as enumerations.
  • the configuration template can be as shown in Figure 18.
  • Figure 19 shows the extraction rules for ingredients. It can identify whether the text content includes words in the custom word list corresponding to ingredients. If it does, any 0 to 500 characters in the text content after the word can be output to In the ingredient field, it is the attribute value corresponding to the ingredient field. If the character content located after the word in the text content includes words in the segmented vocabulary of the custom vocabulary list (recorded as the ending identifier in this disclosure), there is no need to extract the character information after the ending identifier, that is, between the word and the ending identifier The character content between them is used as the attribute value corresponding to the ingredient.
  • the third part is to upload the reference documents to the verification platform.
  • the format of the reference document can be a standard structured document, such as an Excel document. If you cannot use a structured document, you can use a document with a fixed template structure, such as a Word document.
  • relevant personnel can upload reference documents to the verification platform through the web page.
  • the fourth part is to perform OCR recognition on the product packaging image to obtain the text content.
  • OCR recognition OCR recognition on the product packaging image to obtain the text content.
  • it is necessary to ensure that the product packaging image is clear enough.
  • the size of the cut image is above 8MB, which can ensure a high recognition accuracy.
  • the fifth part is document extraction and understanding.
  • business personnel can compose the reference document according to a set format, so that there is no need to perform structured conversion of the document content of the reference document.
  • the intelligent document understanding capability in the IDP system can be used to intelligently extract key information from the document content and convert unstructured document content into structured data.
  • the sixth part is information comparison to determine the first difference part in the text content that is different from the document content, and/or to determine the second difference part in the document content that is different from the text content.
  • the comparison logic is: classify the text content into categories, such as attribute fields and attribute values, first nutritional ingredient information, etc.; compare the classified text content with the corresponding content in the document content in sequence, if the tags are inconsistent or have multiple out of the text part.
  • the document content can also be checked against the text content in sequence (or called back-checking) to ensure that all content in the text content participates in the verification, so as to avoid certain content not participating in the comparison and reducing the accuracy of the verification results. situation occurs.
  • the text content can also be logically corrected to improve the accuracy of the OCR recognition results, thereby improving the accuracy of the verification results.
  • the code logic For example, the unit of protein is g. If the unit of protein in the OCR recognition result is 9, you can replace 9 with g to improve the performance. The accuracy of OCR recognition results.
  • the comparison results can be displayed on the web page.
  • the first difference part can be marked in the text content
  • the second difference part can be marked in the document content.
  • the location of the first difference part can also be marked on the product packaging diagram.
  • the added amount of lactic acid bacteria in the product packaging picture in Figure 13 is: 1.0 ⁇ 10 7 CFU/100g, but the OCR recognition result is: 1.0 ⁇ 107CFU/100g, that is, the power is not distinguished in the OCR recognition result.
  • the RPA robot can recognize that the two attribute values are different, that is, 1.0 ⁇ 10 7 CFU/100g is different from 1.0 ⁇ 107CFU/100g.
  • the attribute value of 1.0 ⁇ 107CFU/100g can be marked in the text content. , let humans check whether there are errors here.
  • the text in the product packaging image is arranged from left to right or top to bottom.
  • the product packaging image of some products The text in may be displayed wrapped around, displayed in the form of wavy lines, etc. In this case, the OCR recognition result will be different from the document content.
  • OCR recognition is performed on sub-image 1 in Figure 3, and the recognition result can be as shown in Figure 20.
  • the OCR recognition results may be wrong.
  • the RPA robot can mark the differences in the text content, and/or mark the location of the differences in the product packaging diagram, and manually check whether there are errors.
  • the RPA robot can also generate verification results, which can be downloaded by the user.
  • annotated text content, annotated document content, annotated product packaging diagram, and verification report can be reviewed manually.
  • the verification of product information by the verification platform or RPA robot can be completed in a shorter time. Generally, it only takes 1-3 minutes to complete the verification, which not only improves the verification efficiency, but also improves the accuracy of the verification results. Only the differences are manually reviewed, which can reduce the workload of relevant personnel and improve work efficiency.
  • the present disclosure also provides a product information processing device based on RPA and AI.
  • the product information processing device corresponds to the product information processing method based on RPA and AI provided by the above embodiments of Figures 1 to 10. Therefore, the implementation of the product information processing method based on RPA and AI is also applicable to the product information processing method provided by the embodiment of the present disclosure.
  • the product information processing device based on RPA and AI will not be described in detail in the embodiment of this disclosure.
  • Figure 22 is a schematic structural diagram of a product information processing device based on RPA and AI provided by an embodiment of the present disclosure.
  • the product information processing device 2200 based on RPA and AI is applied to RPA robots and may include: a first acquisition module 2210, an identification module 2220, a second acquisition module 2230, a comparison module 2240 and an annotation module 2250.
  • the first acquisition module 2210 is used to acquire the product packaging diagram corresponding to the target product.
  • the recognition module 2220 is used to recognize text content in product packaging images based on optical character recognition OCR technology.
  • the second acquisition module 2230 is used to acquire the reference document and acquire the document content in the reference document, where the document content includes product information corresponding to the target product.
  • the comparison module 2240 is used to compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
  • the marking module 2250 is configured to mark the first difference part abnormally in the text content, and/or mark the area where the first difference part is located in the product packaging diagram abnormally.
  • the comparison module 2240 is configured to: extract each first attribute field from the text content, and extract the first attribute matching each first attribute field from the text content. value; compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content; When there is a mismatch between the first target attribute field and the second attribute field in an attribute field, the first target attribute field and/or the first attribute value corresponding to the first target attribute field is used as the first difference part; in each If there is a second target attribute field in the first attribute field that matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute value corresponding to the second attribute field, the second attribute field will be The first attribute value corresponding to the target attribute field is used as the first difference part.
  • the comparison module 2240 is also used to: obtain a setting vocabulary list, where the setting vocabulary list includes at least a third attribute field; extract and extract from the text content Set the third attribute value matching each third attribute field in the vocabulary; compare the third attribute value corresponding to each third attribute field with the second attribute value corresponding to each second attribute field in the document content; When there is a mismatch between the target attribute value and the second attribute value among the third attribute values, the target attribute value is used as the first difference part.
  • the comparison module 2240 is configured to: extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content; Each component information in the first nutritional component information is compared with the corresponding component information in the second nutritional component information; when there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, The target component information is used as the first difference part.
  • the text content includes the first nutritional ingredient information of the target product.
  • the product information processing device 2200 based on RPA and AI may also include:
  • the first processing module is used to extract the first nutritional component information from the text content; for any component information in the first nutritional component information, obtain a regular expression that matches any component information; combine the regular expression with any component information The information is matched; if there is no match, any component information is replaced based on the regular expression.
  • the text content includes the first nutritional ingredient information of the target product.
  • the product information processing device 2200 based on RPA and AI may also include:
  • the second processing module is used to extract the first nutritional component information from the text content; for any text fragment in the first nutritional component information, determine whether the semantics of any text fragment is complete; if the semantics of any text fragment is incomplete , then obtain the adjacent text segments adjacent to any text segment from the nutritional composition information; if the semantics of the adjacent text segments are incomplete, determine the semantically complete sub-segments from the adjacent text segments; extract the sub-segments from the adjacent text segments other characters, group other characters into any one text segment, and exclude other characters from adjacent text segments.
  • the first acquisition module 2210 is configured to: acquire a target document containing a product packaging diagram; and extract the product packaging diagram from the target document.
  • the recognition module 2220 is configured to: respond to the interception operation, segment the product packaging image into at least one sub-image; and perform character recognition on the at least one sub-image based on OCR technology , to get the text content.
  • the identification module 2220 is configured to: identify and extract at least one target area from the product packaging image based on a target detection algorithm, where the target area includes character information; based on OCR Technology that performs character recognition on at least one target area to obtain text content.
  • the annotation module 2250 is used to adjust the font and/or font size of the first difference part in the text content; and color-mark the adjusted first difference part. .
  • the comparison module 2240 is also used to compare the document content and the text content to determine the second difference part in the document content that is different from the text content.
  • the annotation module 2250 is also used to annotate the second difference part abnormally in the document content.
  • the product information processing device 2200 based on RPA and AI may also include:
  • Display module used to display the annotated document content.
  • the product information processing device 2200 based on RPA and AI may also include:
  • the sending module is used to send prompt information, where the prompt information is used to prompt to check and/or modify the first difference part in the product packaging diagram.
  • a generation module for generating and displaying a verification report, wherein the verification report includes a correspondence between the first attribute field and the first attribute value in the text content, a correspondence between the third attribute field and the third attribute value, and At least one item of the first nutritional ingredient information of the target product.
  • the product information processing device based on RPA and AI in the embodiment of the present disclosure obtains the product packaging diagram corresponding to the target product through the RPA robot, and based on OCR technology, identifies the text content in the product packaging diagram; obtains the reference document, and obtains the reference document The document content, wherein the document content includes product information corresponding to the target product; compare the text content and the document content to determine the first difference part in the text content that is different from the document content; compare the first difference in the text content Make an abnormal mark on the part, and/or make an abnormal mark on the area where the first difference part is located in the product packaging diagram.
  • the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
  • An embodiment of the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, any one of the foregoing methods is implemented.
  • Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the product information based on RPA and AI as described in any of the foregoing method embodiments is implemented. Approach.
  • An embodiment of the present disclosure also provides a computer program product.
  • the instruction processor in the computer program product is executed, the product information processing method based on RPA and AI as described in any of the foregoing method embodiments is implemented.
  • FIG. 23 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
  • the electronic device 12 shown in FIG. 23 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
  • electronic device 12 is embodied in the form of a general computing device.
  • Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including memory 28 and processing unit 16).
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI Peripheral Component Interconnection
  • Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and nonvolatile media, removable and non-removable media.
  • the memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or cache memory 32.
  • Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 23, commonly referred to as a "hard drive”).
  • a disk drive for reading and writing a removable non-volatile disk e.g., a "floppy disk”
  • a removable non-volatile optical disk e.g., a compact disk read-only memory
  • CD-ROM Compact Disc Read Only Memory
  • DVD-ROM Digital Video Disc Read Only Memory
  • Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.
  • a program/utility 40 having a set of (at least one) program modules 42 may be stored, for example, in memory 28 , each of these examples or some combination may include the implementation of a network environment.
  • Program modules 42 generally perform functions and/or methods in the embodiments described in this disclosure.
  • Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 22.
  • the electronic device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)) and/or a public network, such as the Internet, through the network adapter 20 ) communication.
  • networks such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)
  • a public network such as the Internet
  • network adapter 20 communicates with other modules of electronic device 12 via bus 18 .
  • other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the processing unit 16 executes programs stored in the memory 28 to perform various functional applications and data processing, such as implementing the methods mentioned in the previous embodiments.
  • references to the terms “one embodiment,” “some embodiments,” “an example,” “specific examples,” or “some examples” or the like means that specific features are described in connection with the embodiment or example. , structures, materials, or features are included in at least one embodiment or example of the present disclosure. In this specification, the schematic expressions of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine different embodiments or examples and features of different embodiments or examples described in this specification unless they are inconsistent with each other.
  • first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
  • “plurality” means at least two, such as two, three, etc., unless otherwise expressly and specifically limited.
  • a "computer-readable medium” may be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Non-exhaustive list of computer readable media include the following: electrical connections with one or more wires (electronic device), portable computer disk cartridges (magnetic device), random access memory (RAM), Read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM).
  • the computer-readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, and subsequently edited, interpreted, or otherwise suitable as necessary. process to obtain the program electronically and then store it in computer memory.
  • various parts of the present disclosure may be implemented in hardware, software, firmware, or combinations thereof.
  • various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if it is implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: discrete logic gate circuits with logic functions for implementing data signals; Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
  • the program can be stored in a computer-readable storage medium.
  • the program can be stored in a computer-readable storage medium.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing module, each unit may exist physically alone, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • the storage media mentioned above can be read-only memory, magnetic disks or optical disks, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Character Discrimination (AREA)

Abstract

The present disclosure provides a product information processing method and apparatus based on RPA and AI, and a device and a medium, which relate to the field of AI and RPA. The method comprises: obtaining, by means of an RPA robot, a product package appearance corresponding to a target product; recognizing text content in the product package appearance on the basis of an OCR technology; obtaining document content in a reference document; comparing the text content with the document content to determine a first difference part in the text content that is different from the document content; and marking anomalies for the first difference part in the text content, and/or marking anomalies for the area in the product package appearance where the first difference part is located.

Description

基于RPA和AI的商品信息处理方法、装置、设备和介质Product information processing methods, devices, equipment and media based on RPA and AI
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202210332711.3、申请日为2022年03月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on a Chinese patent application with application number 202210332711.3 and a filing date of March 31, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域Technical field
本公开涉及人工智能(Artificial Intelligence,简称AI)和机器人流程自动化(Robotic Process Automation,简称RPA)领域,尤其涉及一种基于RPA和AI的商品信息处理方法、装置、设备和介质。The present disclosure relates to the fields of Artificial Intelligence (AI for short) and Robotic Process Automation (RPA for short), and in particular to a product information processing method, device, equipment and medium based on RPA and AI.
背景技术Background technique
RPA是通过特定的“机器人软件”,模拟人在计算机上的操作,按规则自动执行流程任务。RPA uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.
AI是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门技术科学。AI is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
智能文档处理(Intelligent Document Processing,简称IDP)是基于光学字符识别(Optical Character Recognition,简称OCR)、计算机视觉(Computer Vision,简称CV)、自然语言处理(Natural Language Processing,简称NLP)、知识图谱(Knowledge Graph,简称KG)等人工智能技术,对各类文档进行识别、分类、抽取、校验等处理,帮助企业实现文档处理工作的智能化和自动化的新一代自动化技术。Intelligent Document Processing (IDP) is based on Optical Character Recognition (OCR), Computer Vision (CV), Natural Language Processing (NLP), Knowledge Graph ( Artificial intelligence technologies such as Knowledge Graph (KG) are used to identify, classify, extract, and verify various types of documents, and are a new generation of automation technology that help enterprises realize the intelligence and automation of document processing.
对于商品而言,不同时期可能会设计有不同造型的包装,比如,针对不同的节假日,会设计与各节假日氛围匹配的商品包装,再例如,当商品与不同名人或游戏联动时,也会设计新的商品包装等等。其中,商品包装上一般包括营养成分表、配料信息、生产商、地址及产地等信息,上述信息如果出现错误,可能会造成一定的法律问题。因此,如何对商品包装上的商品信息进行核对,是非常重要的。For products, different styles of packaging may be designed in different periods. For example, for different holidays, product packaging will be designed to match the atmosphere of each holiday. For example, when the product is linked with different celebrities or games, packaging will also be designed. New product packaging and so on. Among them, product packaging generally includes nutritional information, ingredient information, manufacturer, address, place of origin and other information. If the above information is incorrect, it may cause certain legal issues. Therefore, it is very important to check the product information on the product packaging.
相关技术中,在设计新的商品包装时,通过多个部门的员工对商品包装进行多次核对。In related technologies, when designing new product packaging, employees from multiple departments conduct multiple checks on the product packaging.
然而上述人工多次核对的方式,不仅效率较低,而且核对结果的准确率无法保证。此外,在生产商、地址及产地为多个的情况下,人工核对较为困难和吃力,且容易遗漏。However, the above-mentioned manual multiple verification methods are not only inefficient, but also the accuracy of the verification results cannot be guaranteed. In addition, when there are multiple manufacturers, addresses and origins, manual verification is difficult and laborious, and it is easy to miss.
发明内容Contents of the invention
本公开旨在至少在一定程度上解决相关技术中的技术问题之一。The present disclosure aims to solve one of the technical problems in the related art, at least to a certain extent.
为此,本公开提出一种基于RPA和AI的商品信息处理方法、装置、设备和介质,以实现通过RPA机器人自动对商品包装图上的商品信息进行核对,一方面,可以降低人工参与量,释放人力资源,降低人力成本,另一方面,可以提高商品信息的核对效率,还可以避免人工核对易出错的情况,提升商品信息核对结果的准确性。To this end, the present disclosure proposes a product information processing method, device, equipment and medium based on RPA and AI to realize automatic verification of product information on product packaging diagrams through RPA robots. On the one hand, it can reduce the amount of manual participation. Free up human resources and reduce labor costs. On the other hand, it can improve the efficiency of product information verification, avoid error-prone manual verification, and improve the accuracy of product information verification results.
本公开第一方面实施例提出了一种基于RPA和AI的商品信息处理方法,所述方法由RPA机器人执行,包括:The first embodiment of the present disclosure proposes a product information processing method based on RPA and AI. The method is executed by an RPA robot and includes:
获取目标商品对应的商品包装图,并基于光学字符识别OCR技术,识别所述商品包装图中的文本内容;Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on optical character recognition OCR technology;
获取参考文档,并获取所述参考文档中的文档内容,其中,所述文档内容中包括所述目标商品对应的商品信息;Obtain a reference document and obtain document content in the reference document, where the document content includes product information corresponding to the target product;
对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分;Compare the text content and the document content to determine a first difference part in the text content that is different from the document content;
在所述文本内容中对所述第一差异部分进行异常标注,和/或,在所述商品包装图中对所述第一差异部分所处的区域进行异常标注。The first difference part is marked abnormally in the text content, and/or the area where the first difference part is located is marked abnormally in the product packaging diagram.
本公开第二方面实施例提出了一种基于RPA和AI的商品信息处理装置,应用于RPA机器人,包括:The second embodiment of the present disclosure proposes a product information processing device based on RPA and AI, applied to RPA robots, including:
第一获取模块,用于获取目标商品对应的商品包装图;The first acquisition module is used to obtain the product packaging diagram corresponding to the target product;
识别模块,用于基于光学字符识别OCR技术,识别所述商品包装图中的文本内容;A recognition module, used to identify the text content in the product packaging image based on optical character recognition OCR technology;
第二获取模块,用于获取参考文档,并获取所述参考文档中的文档内容,其中,所述文档内容中包括所述目标商品对应的商品信息;The second acquisition module is used to obtain a reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product;
比对模块,用于对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分;A comparison module, configured to compare the text content and the document content to determine the first difference part in the text content that is different from the document content;
标注模块,在所述文本内容中对所述第一差异部分进行异常标注,和/或,在所述商品包装图中对所述第一差异部分所处的区域进行异常标注。A marking module is configured to mark the first difference part abnormally in the text content, and/or mark the area where the first difference part is located in the product packaging diagram abnormally.
本公开第三方面实施例提出了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如本公开上述第一方面实施例所述的方法。The third embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the present disclosure is implemented. The method described in the above embodiment of the first aspect.
本公开第四方面实施例提出了一种非临时性计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如本公开上述第一方面实施例所述的方法。The fourth embodiment of the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the first embodiment of the disclosure is implemented.
本公开第五方面实施例提出了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如本公开上述第一方面实施例所述的方法。The fifth aspect embodiment of the present disclosure proposes a computer program product, which includes a computer program. When executed by a processor, the computer program implements the method described in the above first aspect embodiment of the present disclosure.
通过RPA机器人获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容;获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息;对文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分;在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。由此,可以实现通过RPA机器人自动对商品包装图上的商品信息进行核对,一方面,可以降低人工参与量,释放人力资源,降低人力成本,另一方面,可以提高商品信息的核对效率,还可以避免人工核对易出错的情况,提升商品信息核对结果的准确性。Obtain the product packaging diagram corresponding to the target product through the RPA robot, and identify the text content in the product packaging diagram based on OCR technology; obtain the reference document, and obtain the document content in the reference document, where the document content includes the product corresponding to the target product information; compare the text content and the document content to determine the first difference part in the text content that is different from the document content; mark the first difference part in the text content as abnormal, and/or, mark the first difference part in the product packaging diagram The area where the first difference part is located is marked as abnormal. As a result, the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
本公开附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本公开的实践了解到。Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
附图说明Description of drawings
本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
图1为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 1 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图2为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 2 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图3为本公开实施例中对商品包装图进行切分后得到的各子图像示意图。Figure 3 is a schematic diagram of each sub-image obtained after segmenting the product packaging image in an embodiment of the present disclosure.
图4为本公开实施例中的商品包装图的局部示意图。Figure 4 is a partial schematic diagram of a product packaging diagram in an embodiment of the present disclosure.
图5为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 5 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图6为本公开实施例中的核对报告示意图。Figure 6 is a schematic diagram of a verification report in an embodiment of the present disclosure.
图7为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 7 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图8为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 8 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图9为本公开实施例中的第一营养成分信息示意图。Figure 9 is a schematic diagram of the first nutritional component information in an embodiment of the present disclosure.
图10为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 10 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
图11为本公开实施例的实现原理示意图。Figure 11 is a schematic diagram of the implementation principle of an embodiment of the present disclosure.
图12为本公开实施例中的商品包装图的局部示意图。Figure 12 is a partial schematic diagram of a product packaging diagram in an embodiment of the present disclosure.
图13为本公开实施例中的OCR识别结果示意图。Figure 13 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
图14为本公开实施例中的配料信息抽取结果示意图。Figure 14 is a schematic diagram of the ingredient information extraction results in the embodiment of the present disclosure.
图15为本公开实施例中的OCR识别结果示意图。Figure 15 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
图16为本公开实施例中的厂名、厂址和生产许可证编号的抽取结果示意图。Figure 16 is a schematic diagram of the extraction results of the factory name, factory address and production license number in the embodiment of the present disclosure.
图17为本公开实施例中的第三属性字段示意图。Figure 17 is a schematic diagram of the third attribute field in an embodiment of the present disclosure.
图18为本公开实施例中配置模板示意图。Figure 18 is a schematic diagram of a configuration template in an embodiment of the present disclosure.
图19为本公开实施例中配料的提取规则或抽取规则示意图。Figure 19 is a schematic diagram of extraction rules or extraction rules for ingredients in an embodiment of the present disclosure.
图20为本公开实施例中的OCR识别结果示意图。Figure 20 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
图21为本公开实施例中的OCR识别结果示意图。Figure 21 is a schematic diagram of OCR recognition results in an embodiment of the present disclosure.
图22为本公开实施例提供的一种基于RPA和AI的商品信息处理装置的结构示意图。Figure 22 is a schematic structural diagram of a product information processing device based on RPA and AI provided by an embodiment of the present disclosure.
图23示出了适于用来实现本公开实施方式的示例性电子设备的框图。23 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
具体实施方式Detailed ways
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本公开,而不能理解为对本公开的限制。Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present disclosure and are not to be construed as limitations of the present disclosure.
本公开提出了一种基于RPA和AI的商品信息处理方法、装置、设备和介质。This disclosure proposes a product information processing method, device, equipment and medium based on RPA and AI.
下面参考附图描述本公开实施例的基于RPA和AI的商品信息处理方法、装置、设备和介质。在具体描述本公开实施例之前,为了便于理解,首先对常用技术词进行介绍:The RPA- and AI-based product information processing methods, devices, equipment, and media of embodiments of the present disclosure are described below with reference to the accompanying drawings. Before describing the embodiments of the present disclosure in detail, in order to facilitate understanding, common technical terms are first introduced:
“RPA”,是机器人流程自动化(Robotic Process Automation)的简称,是为企业和个人提供专业全面的流程自动化解决方案。RPA是通过特定的“机器人软件”,模拟人在计算机上的操作,按规则自动执行流程任务。即RPA机器人可通过模拟用户的鼠标键盘操作,快速、准确的收集用户操作界面的数据,基于清晰的逻辑规则处理这些数据,再快速而准确地录入到另外一个系统或界面。由此,可以大幅降低人力成本的投入,有效提高现有办公效率,准确、稳定、快捷地完成工作。"RPA", the abbreviation of Robotic Process Automation, provides professional and comprehensive process automation solutions for enterprises and individuals. RPA uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules. That is, the RPA robot can quickly and accurately collect data from the user operation interface by simulating the user's mouse and keyboard operations, process the data based on clear logical rules, and then quickly and accurately input it into another system or interface. As a result, labor cost investment can be significantly reduced, existing office efficiency can be effectively improved, and work can be completed accurately, stably, and quickly.
“AI”是人工智能(Artificial Intelligence)的简称,是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门技术科学。AI是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的技术。AI硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术;AI软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理(Natural Language Processing,简称NLP)技术以及机器学习/深度学习、大数据处理技术、知识图谱技术等几大方向。"AI" is the abbreviation of Artificial Intelligence. It is a technical science that researches and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is the study of using computers to simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It has both hardware-level technology and software-level technology. AI hardware technology generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; AI software technology mainly includes computer vision technology, speech recognition technology, and Natural Language Processing (NLP). technology and machine learning/deep learning, big data processing technology, knowledge graph technology and other major directions.
“商品”,是为了出售而生产的劳动成果,是用于交换的劳动产品。比如,商品可以包括食品、日用品、保健品等等。"Commodities" are the fruits of labor produced for sale and the products of labor used for exchange. For example, products can include food, daily necessities, health products, etc.
“目标商品”,可以为任意一个商品,比如,目标商品可以为某个食品、某个日用品等。"Target product" can be any product. For example, the target product can be a certain food, a certain daily necessities, etc.
“商品包装图”,又称为商品包装设计图,是指包括目标商品的包装设计的图像。"Product packaging drawing", also known as product packaging design drawing, refers to an image including the packaging design of the target product.
“商品信息”,是指与目标商品相关的信息,比如,商品信息可以包括目标商品的营养成分信息、配料信息(或成分信息)、生产商、地址及产地等信息。"Product information" refers to information related to the target product. For example, the product information may include nutritional information, ingredient information (or composition information), manufacturer, address, origin and other information of the target product.
“参考文档”,或称为待比对文档,是指包括目标商品对应的商品信息的文档,比如,该参考文档可以为结构化文档,例如Excel文档,或者,参考文档也可以为非结构化文档,比如Word文档等。应当理解的是,在参考文档为非结构化文档时,为了便于RPA机器人进行信息比对,可以将非结构化的参考文档转换为结构化文档。"Reference document", or document to be compared, refers to a document that includes product information corresponding to the target product. For example, the reference document can be a structured document, such as an Excel document, or the reference document can also be unstructured. Documents, such as Word documents, etc. It should be understood that when the reference document is an unstructured document, in order to facilitate the RPA robot to perform information comparison, the unstructured reference document can be converted into a structured document.
“光学字符识别(Optical Character Recognition,简称OCR)”,是指电子设备检查纸上打印的字符,通过检测暗、亮的模式确定其形状,然后用字符识别方法将形状翻译成计算机文字的过程;即,针对印刷体字符,采用光学的方式将纸质文档中的文字转换成为黑白点阵的图像文件,并通过识别软件将图像中的文字转换成文本格式,供文字处理软件进一步编辑加工的技术。"Optical Character Recognition (OCR)" refers to the process in which electronic equipment examines characters printed on paper, determines their shape by detecting dark and light patterns, and then uses character recognition methods to translate the shape into computer text; That is, for printed characters, it uses optical methods to convert the text in the paper document into a black and white dot matrix image file, and uses recognition software to convert the text in the image into a text format for further editing and processing by word processing software. .
“第一属性字段”,是指商品包装图对应的文本内容中所包括的属性字段,比如,第一属性字段可以包括:生产许可证(或称为生产许可证编号、生产编号)、地址、生产商、配料、贮存条件、保质期、生产日期、净含量、产品种类等。"First attribute field" refers to the attribute field included in the text content corresponding to the product packaging diagram. For example, the first attribute field may include: production license (or production license number, production number), address, Manufacturer, ingredients, storage conditions, shelf life, production date, net content, product type, etc.
“第一属性值”,是指第一属性字段在文本内容中对应的属性值,比如,以目标商品为食品进行示例,配料对应的属性值可以为:饮用水、芝士粉、柠檬酸等。"First attribute value" refers to the attribute value corresponding to the first attribute field in the text content. For example, taking the target product as food as an example, the attribute values corresponding to ingredients can be: drinking water, cheese powder, citric acid, etc.
“第二属性字段”,是指参考文档中的文档内容中所包括的属性字段,相应的,第二属性值是指第二属性字段在文档内容中对应的属性值。需要说明的是,第二属性字段为目标商品对应的标准属性字段,第二属性值为目标商品对应的标准属性值。The "second attribute field" refers to the attribute field included in the document content in the reference document. Correspondingly, the second attribute value refers to the attribute value corresponding to the second attribute field in the document content. It should be noted that the second attribute field is the standard attribute field corresponding to the target product, and the second attribute value is the standard attribute value corresponding to the target product.
应当理解的是,第一属性字段和/或第一属性值可能在设计环节出现错误,但是,第二属性字段和第二属性值均是与目标商品相关,且书写正确的属性字段和属性值。It should be understood that the first attribute field and/or the first attribute value may have errors in the design process, but the second attribute field and the second attribute value are related to the target product, and the correctly written attribute field and attribute value .
“设定词表”,是指预先设定的词表,该设定词表还可以称为自定义词表。其中,设定词表中包括与目标商品的商品信息相关的各个属性字段,本公开中记为第三属性字段。比如,第三属性字段可以包括:生产许可证、地址、生产商、配料、贮存条件、保质期、生产日期、净含量、产品种类等。"Set vocabulary list" refers to a preset vocabulary list, which can also be called a custom vocabulary list. The setting vocabulary includes various attribute fields related to the product information of the target product, which are recorded as third attribute fields in this disclosure. For example, the third attribute field may include: production license, address, manufacturer, ingredients, storage conditions, shelf life, production date, net content, product type, etc.
需要说明的是,考虑到OCR识别结果的准确率,对于一些属性字段,比如配料,OCR识别结果可能为“料”,导致“配”字没有识别到,或者识别结果可能为“配料”,导致识别结果中间多出空格。针对上述情况,针对与商品信息相关的每个属性字段,还可以统计该属性字段的多种说法或多种可能的说法,将该属性字段和该属性字段对应的多种说法或多种可能的说法,均作为第三属性字段,并设置于设定词表中。It should be noted that, considering the accuracy of OCR recognition results, for some attribute fields, such as ingredients, the OCR recognition result may be "material", resulting in the word "mixing" not being recognized, or the recognition result may be "ingredient", resulting in There are extra spaces in the recognition results. In response to the above situation, for each attribute field related to product information, you can also count the multiple explanations or multiple possible explanations of the attribute field, and compare the attribute field and the multiple explanations or multiple possible explanations corresponding to the attribute field. Arguments are used as the third attribute field and are set in the setting vocabulary.
举例而言,针对“配料”这一属性字段,设定词表中可以包括:“配”、“料”、“配料”、“配料”等。For example, for the attribute field "ingredients", the set word list may include: "mixing", "materials", "ingredients", "ingredients", etc.
“第三属性值”,是指与第三属性字段在目标商品的商品包装图对应的文本内容中所对应的属性值,比如,以目标商品为食品进行示例,配料对应的属性值可以为:饮用水、芝士粉、柠檬酸等。"Third attribute value" refers to the attribute value corresponding to the third attribute field in the text content corresponding to the product packaging diagram of the target product. For example, taking the target product as food as an example, the attribute value corresponding to the ingredients can be: Drinking water, cheese powder, citric acid, etc.
“目标文档”,是指包含目标商品的商品包装图的文档,比如,目标文档可以为PDF(Portable Document Format,可携带文档格式)文档,或者,也可以为PSD(PSD是Adobe公司的图形设计软件Photoshop的专用格式)、Adobe Illustrator(具体为Adobe Illustrator的文件扩展名,是一种矢量图形文件格式)等格式的设计文档。"Target document" refers to a document containing the product packaging diagram of the target product. For example, the target document can be a PDF (Portable Document Format) document, or it can also be a PSD (PSD is Adobe's graphic design Design documents in formats such as the special format of the software Photoshop), Adobe Illustrator (specifically the file extension of Adobe Illustrator, which is a vector graphics file format).
“第一营养成分信息”,是文本内容中包括的与目标商品相关的营养成分信息,比如,以目标商品为食品进行示例,第一营养成分信息可以包括:能量、蛋白质、脂肪、碳水化合物等成分信息。"First nutritional ingredient information" is the nutritional ingredient information related to the target product included in the text content. For example, taking the target product as food as an example, the first nutritional ingredient information can include: energy, protein, fat, carbohydrate, etc. Ingredient information.
“第二营养成分信息”,是文档内容中包括的与目标商品相关的营养成分信息。应当理解的是,第一营养成分信息可能在设计环节出现错误,但是,第二营养成分信息是与目标商品相关,且书写正确的营养成分信息。"Second nutritional information" refers to the nutritional information related to the target product included in the document content. It should be understood that the first nutritional information may be wrong in the design process, but the second nutritional information is related to the target product and the correct nutritional information is written.
“正则表达式”,又称规则表达式,用于检索或替换符合某个模式(或规则)的文本。"Regular expressions", also known as regular expressions, are used to retrieve or replace text that matches a certain pattern (or rule).
“任一文本片段”,是指第一营养成分信息中任意一个文本片段,其中,同一个文本片段内包含位置相邻的各个字符,和/或,包含间隔为第一设定个数(比如1或2等)空格的各字符。"Any text fragment" refers to any text fragment in the first nutritional ingredient information, wherein the same text fragment contains adjacent characters, and/or contains an interval of the first set number (such as 1 or 2, etc.) each character of the space.
“邻接文本片段”,是指“第一营养成分信息”中与“任一文本片段”位置相邻的文本片段,比如,“邻接文本片段”可以为:位于“任一文本片段”左侧、右侧、上侧、下侧的文本片段。"Adjacent text fragment" refers to the text fragment adjacent to the position of "any text fragment" in the "first nutritional ingredient information". For example, the "adjacent text fragment" can be: located on the left side of "any text fragment", Text snippets for the right, top, and bottom sides.
作为一种示例,以目标商品为食品进行示例,第一营养成分信息可以如表1所示:As an example, taking the target product as food, the first nutritional ingredient information can be as shown in Table 1:
表1Table 1
Figure PCTCN2022091293-appb-000001
Figure PCTCN2022091293-appb-000001
假设“任一文本片段”为表1中的“碳水化合物”,则“邻接文本片段”可以为“5.8g”、“脂肪”、“钠”。Assuming that "any text fragment" is "carbohydrate" in Table 1, the "adjacent text fragment" can be "5.8g", "fat", and "sodium".
“目标检测算法”,属于AI领域中的计算机视觉领域。可以基于深度学习技术中的目标检测算法,检测图像中是否包括所需内容。"Target detection algorithm" belongs to the field of computer vision in the field of AI. It can be based on the target detection algorithm in deep learning technology to detect whether the required content is included in the image.
图1为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 1 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
本公开实施例提供的基于RPA和AI的商品信息处理方法,可应用于RPA机器人,该RPA机器人可以运行在任一具有计算能力的电子设备中。其中,该电子设备可以是个人电脑、移动终端等,移动终端例如为手机、平板电脑、个人数字助理等具有各种操作系统的硬件设备。The product information processing method based on RPA and AI provided by the embodiments of the present disclosure can be applied to RPA robots, which can run in any electronic device with computing capabilities. The electronic device may be a personal computer, a mobile terminal, etc. The mobile terminal is, for example, a mobile phone, a tablet computer, a personal digital assistant and other hardware devices with various operating systems.
如图1所示,该基于RPA和AI的商品信息处理方法可以包括以下步骤:As shown in Figure 1, the product information processing method based on RPA and AI can include the following steps:
步骤101,获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容。Step 101: Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
在本公开实施例中,商品包装图可以为JPG(或JPEG(Joint Photographic Experts Group,联合图像专家组))、PNG(Portable Network Graphics,便携式网络图形)等图像格式的图像。In the embodiment of the present disclosure, the product packaging image may be an image in image formats such as JPG (or JPEG (Joint Photographic Experts Group, Joint Photographic Experts Group)), PNG (Portable Network Graphics, Portable Network Graphics), etc.
在本公开实施例的一种可能的实现方式中,RPA机器人可以直接获取目标商品对应的商品包装图。In a possible implementation of the embodiment of the present disclosure, the RPA robot can directly obtain the product packaging diagram corresponding to the target product.
作为一种示例,可以通过人工上传或发送商品包装图至RPA机器人所在的设备,比如,业务人员可以通过图像采集设备(比如相机、移动终端等)对目标商品进行拍照,得到图像文件格式的商品包装图, 或者,业务人员可以对包含商品包装图的纸质文件进行扫描,得到PDF格式的文档,并对上述文档中的商品包装图进行截图,得到图像文件格式的商品包装图。业务人员在获取到商品包装图后,可以将商品包装图上传或发送至RPA机器人所在的设备。As an example, you can manually upload or send product packaging pictures to the device where the RPA robot is located. For example, business personnel can take photos of the target product through an image collection device (such as a camera, mobile terminal, etc.) to obtain the product in image file format. Packaging diagram, or the business personnel can scan the paper document containing the product packaging diagram to obtain a document in PDF format, and take a screenshot of the product packaging diagram in the above document to obtain the product packaging diagram in image file format. After obtaining the product packaging diagram, the business personnel can upload or send the product packaging diagram to the device where the RPA robot is located.
在本公开实施例的另一种可能的实现方式中,RPA机器人也可以间接获取目标商品对应的商品包装图。In another possible implementation of the embodiment of the present disclosure, the RPA robot can also indirectly obtain the product packaging diagram corresponding to the target product.
作为一种示例,RPA机器人可以获取包含商品包装图的目标文档,例如,可以通过人工上传或发送目标文档至RPA机器人所在的设备,从而RPA机器人在获取到目标文档后,可以从目标文档中提取商品包装图。比如,RPA机器人可以基于目标检测算法,从目标文档中识别并截取商品包装图。As an example, the RPA robot can obtain the target document containing the product packaging diagram. For example, the target document can be manually uploaded or sent to the device where the RPA robot is located, so that after the RPA robot obtains the target document, it can extract it from the target document. Product packaging picture. For example, RPA robots can identify and intercept product packaging images from target documents based on target detection algorithms.
在本公开实施例中,RPA机器人在获取到商品包装图后,可以基于OCR技术,对商品包装图进行字符识别,以得到商品包装图的文本内容。In the embodiment of the present disclosure, after the RPA robot obtains the product packaging image, it can perform character recognition on the product packaging image based on OCR technology to obtain the text content of the product packaging image.
步骤102,获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。Step 102: Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
在本公开实施例中,RPA机器人可以获取参考文档,比如,可以通过人工上传或发送参考文档至RPA机器人所在的设备。RPA机器人在获取参考文档后,可以读取参考文档中的文档内容。In the embodiment of the present disclosure, the RPA robot can obtain the reference document, for example, by manually uploading or sending the reference document to the device where the RPA robot is located. After the RPA robot obtains the reference document, it can read the document content in the reference document.
步骤103,对文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分。Step 103: Compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
在本公开实施例中,RPA机器人可以将文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分。In the embodiment of the present disclosure, the RPA robot can compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
步骤104,在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。Step 104: Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
在本公开实施例的一种可能的实现方式中,RPA机器人可以在文本内容中,对上述第一差异部分进行异常标注。例如,RPA机器人可以在文本内容中,对第一差异部分的字体和/或字号进行调整(比如调大字号、字体倾斜和/或加粗等),并对调整后的第一差异部分进行颜色标注;或者,RPA机器人也可以直接在文本内容中对第一差异部分进行颜色标注,比如,可以采用醒目的颜色(例如红色、蓝色等)对第一差异部分进行颜色标注,本公开对此并不做限制。In a possible implementation of the embodiment of the present disclosure, the RPA robot can annotate the above-mentioned first difference part abnormally in the text content. For example, the RPA robot can adjust the font and/or font size of the first difference part in the text content (such as increasing the font size, italicizing and/or bolding the font, etc.), and color the adjusted first difference part. Mark; alternatively, the RPA robot can also directly color mark the first difference part in the text content. For example, the first difference part can be colored in a striking color (such as red, blue, etc.). This disclosure is for There are no restrictions.
在本公开实施例的另一种可能的实现方式中,RPA机器人可以确定第一差异部分在商品包装图中所处的区域,并在商品包装图中对上述区域进行异常标注。比如,可以在上述区域的边缘添加标注框;或者,可以在上述区域中的字符下方添加下划线、波浪线等等,本公开对此并不做限制。In another possible implementation of the embodiment of the present disclosure, the RPA robot can determine the area where the first difference part is located in the product packaging diagram, and mark the above-mentioned area as abnormal in the product packaging diagram. For example, a label box can be added to the edge of the above area; or underlines, wavy lines, etc. can be added under the characters in the above area, and this disclosure does not limit this.
在本公开实施例的又一种可能的实现方式中,RPA机器人还可以同时在文本内容中对第一差异部分进行异常标注,以及,在商品包装图中对第一差异部分所处的区域进行异常标注。In another possible implementation of the embodiment of the present disclosure, the RPA robot can also simultaneously mark the first difference part in the text content as abnormal, and mark the area where the first difference part is located in the product packaging diagram. Exception annotation.
在一个实施例中,RPA机器人在对文本内容进行异常标注后,还可以展示标注后的文本内容,和/或,RPA机器人在对商品包装图进行异常标注后,还可以展示标注后的商品包装图,以使相关人员能够及时获知比对结果。In one embodiment, after the RPA robot annotates the text content abnormally, it can also display the annotated text content, and/or after the RPA robot annotates the product packaging diagram abnormally, it can also display the annotated product packaging. diagram so that relevant personnel can be informed of the comparison results in a timely manner.
本公开实施例的基于RPA和AI的商品信息处理方法,通过RPA机器人获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容;获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息;对文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分;在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。由此,可以实现通过RPA机器人自动对商品包装图上的商品信息进行核对,一方面,可以降低人工参与量,释放人力资源,降低人力成本,另一方面,可以提高商品信息的核对效率,还可以避免人工核对易出错的情况,提升商品信息核对结果的准确性。The product information processing method based on RPA and AI in the embodiment of the present disclosure uses the RPA robot to obtain the product packaging diagram corresponding to the target product, and based on OCR technology, identifies the text content in the product packaging diagram; obtains the reference document, and obtains the reference document The document content, wherein the document content includes product information corresponding to the target product; compare the text content and the document content to determine the first difference part in the text content that is different from the document content; compare the first difference in the text content Make an abnormal mark on the part, and/or make an abnormal mark on the area where the first difference part is located in the product packaging diagram. As a result, the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
为了清楚说明本公开任一实施例中RPA机器人是如何对文本内容和文档内容进行比对的,本公开还提出一种基于RPA和AI的商品信息处理方法。In order to clearly illustrate how the RPA robot compares text content and document content in any embodiment of the disclosure, the disclosure also proposes a product information processing method based on RPA and AI.
图2为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 2 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
如图2所示,该基于RPA和AI的商品信息处理方法可以包括以下步骤:As shown in Figure 2, the product information processing method based on RPA and AI can include the following steps:
步骤201,获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容。Step 201: Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
在本公开的任意一个实施例之中,可以通过人工圈选的方式,将商品包装图中切分为至少一个子图像,从而可以基于OCR技术,对至少一个子图像进行字符识别,以得到文本内容。In any embodiment of the present disclosure, the product packaging image can be divided into at least one sub-image by manual selection, so that character recognition can be performed on at least one sub-image based on OCR technology to obtain the text content.
即本公开中,RPA机器人可以响应于相关人员触发的截取操作,将商品包装图切分为至少一个子图 像,并基于OCR技术,对至少一个子图像进行字符识别,以得到文本内容。That is, in this disclosure, the RPA robot can respond to the interception operation triggered by the relevant personnel, divide the product packaging image into at least one sub-image, and perform character recognition on at least one sub-image based on OCR technology to obtain the text content.
作为一种示例,以目标商品为食品进行示例,相关人员可以通过圈选的方式,将商品包装图切分为如图3所示的6个子区域。As an example, taking the target product as food, the relevant personnel can divide the product packaging diagram into six sub-areas as shown in Figure 3 through circle selection.
在本公开的任意一个实施例之中,RPA机器人可以基于深度学习技术中的目标检测算法,从商品包装图中识别并提取至少一个目标区域,其中,目标区域中包括字符信息。RPA机器人可以基于OCR技术,对至少一个目标区域进行字符识别,以得到文本内容。In any embodiment of the present disclosure, the RPA robot can identify and extract at least one target area from the product packaging image based on the target detection algorithm in deep learning technology, where the target area includes character information. The RPA robot can perform character recognition on at least one target area based on OCR technology to obtain text content.
步骤202,获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。Step 202: Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
步骤201至202的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of steps 201 to 202 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
步骤203,从文本内容中提取各第一属性字段,并从文本内容中提取与各第一属性字段匹配的第一属性值。Step 203: Extract each first attribute field from the text content, and extract a first attribute value matching each first attribute field from the text content.
在本公开实施例中,可以从文本内容中提取第一属性字段,并从文本内容中提取与各第一属性字段匹配的第一属性值。In the embodiment of the present disclosure, the first attribute field can be extracted from the text content, and the first attribute value matching each first attribute field can be extracted from the text content.
作为一种示例,以目标商品为食品进行示例,商品包装图的局部可以如图4所示,可以将“:”之前的文本片段作为第一属性字段,将“:”之后的文本片段作为第一属性字段对应的第一属性值。As an example, taking the target product as food, the part of the product packaging diagram can be shown in Figure 4. The text fragment before ":" can be used as the first attribute field, and the text fragment after ":" can be used as the third attribute field. The first attribute value corresponding to an attribute field.
作为另一种示例,可以预先设定一个属性表,该属性表中包括与目标商品相关的各属性字段,从而在本公开中,可以从文本内容中提取与属性表中的各属性字段匹配的第一属性字段,在提取到各第一属性字段后,可以基于设定的提取规则或抽取规则,从文本内容中提取各第一属性字段对应的第一属性值。As another example, an attribute table can be set in advance, and the attribute table includes each attribute field related to the target product. Therefore, in the present disclosure, the text content matching each attribute field in the attribute table can be extracted. After extracting each first attribute field, the first attribute value corresponding to each first attribute field can be extracted from the text content based on the set extraction rule or extraction rule.
例如,可以从文本内容中提取相邻的两个第一属性字段之间的属性值,并作为上述相邻的两个第一属性字段中的前一个属性字段对应的第一属性值。最后一个第一属性字段之后的字符内容,可以为该最后一个第一属性字段对应的第一属性值。For example, the attribute value between two adjacent first attribute fields can be extracted from the text content and used as the first attribute value corresponding to the previous one of the two adjacent first attribute fields. The character content after the last first attribute field can be the first attribute value corresponding to the last first attribute field.
需要说明的是,实际应用时,发明人对大量的包装设计图进行分析,可以发现:位于最后一个属性字段之后的字符,不仅包括属性值,还可能包括其他字符,比如“保持环境清洁,请勿乱抛空瓶”等。It should be noted that in actual application, the inventor analyzed a large number of packaging design drawings and found that the characters after the last attribute field not only include attribute values, but may also include other characters, such as "Keep the environment clean, please Don’t throw away empty bottles” etc.
针对上述情况,本公开中,可以对大量的包装设计图进行分析和统计,确定每个包装设计图中位于最后一个属性字段之后的语句,并根据上述语句,设定结尾标识,比如该结尾标识可以为“保持环境”等,从而RPA机器人在识别到文本内容中包含结尾标识时,可以截取最后一个第一属性字段与结尾标识之间的字符内容,并作为最后一个第一属性字段对应的第一属性值。In response to the above situation, in this disclosure, a large number of packaging design drawings can be analyzed and counted, the statement located after the last attribute field in each packaging design drawing is determined, and the ending identifier is set based on the above statement, such as the ending identifier It can be "keep environment", etc., so that when the RPA robot recognizes that the text content contains the end identifier, it can intercept the character content between the last first attribute field and the end identifier, and use it as the third attribute field corresponding to the last first attribute field. An attribute value.
步骤204,将各第一属性字段和各第一属性字段对应的第一属性值,与文档内容中的各第二属性字段和各第二属性字段对应的第二属性值进行比对。Step 204: Compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content.
在本公开实施例中,可以将文本内容中的各第一属性字段和各第一属性字段对应的第一属性值,与文档内容中的各第二属性字段和各第二属性字段对应的第二属性值进行比对。In the embodiment of the present disclosure, each first attribute field in the text content and the first attribute value corresponding to each first attribute field can be combined with each second attribute field and each second attribute field in the document content corresponding to the first attribute value. Compare the two attribute values.
步骤205,在各第一属性字段中存在第一目标属性字段与第二属性字段不匹配的情况下,将第一目标属性字段和/或第一目标属性字段对应的第一属性值,作为第一差异部分。Step 205: When there is a mismatch between the first target attribute field and the second attribute field in each first attribute field, use the first target attribute field and/or the first attribute value corresponding to the first target attribute field as the third attribute field. A difference part.
在本公开实施例中,在确定各第一属性字段中存在至少一个属性字段(本公开中记为第一目标属性字段)与第二属性字段不匹配的情况下,可以将第一目标属性字段和/或第一目标属性字段对应的第一属性值,作为第一差异部分。In the embodiment of the present disclosure, when it is determined that at least one attribute field (denoted as the first target attribute field in this disclosure) does not match the second attribute field among the first attribute fields, the first target attribute field may be and/or the first attribute value corresponding to the first target attribute field, as the first difference part.
步骤206,在各第一属性字段中存在第二目标属性字段与第二属性字段匹配,但第二目标属性字段对应的第一属性值与第二属性字段对应的第二属性值不匹配的情况下,将第二目标属性字段对应的第一属性值,作为第一差异部分。Step 206: In each first attribute field, there is a situation where the second target attribute field matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute value corresponding to the second attribute field. Next, the first attribute value corresponding to the second target attribute field is used as the first difference part.
在本公开实施例中,在确定各第一属性字段中存在一个属性字段(本公开中记为第二目标属性字段)与第二属性字段匹配,但是该第二目标属性字段对应的第一属性值与第二属性字段对应的第二属性值不匹配的情况下,可以将第二目标属性字段对应的第一属性值,作为第一差异部分。In the embodiment of the present disclosure, it is determined that among the first attribute fields, there is one attribute field (denoted as the second target attribute field in this disclosure) that matches the second attribute field, but the first attribute corresponding to the second target attribute field If the value does not match the second attribute value corresponding to the second attribute field, the first attribute value corresponding to the second target attribute field may be used as the first difference part.
步骤207,在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。Step 207: Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
步骤207的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of step 207 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again.
本公开实施例的基于RPA和AI的商品信息处理方法,通过将文本内容中的各属性字段和属性值, 分别与文档内容中的属性字段和属性值进行比对,可以避免商品信息中重要内容的遗漏检测,从而提升商品信息核对结果的准确性。The product information processing method based on RPA and AI in the embodiment of the present disclosure can avoid important content in product information by comparing each attribute field and attribute value in the text content with the attribute fields and attribute values in the document content respectively. omission detection, thereby improving the accuracy of product information verification results.
需要说明的是,考虑到OCR识别结果的准确率,对于一些属性字段,比如配料,OCR识别结果可能为“料”,导致“配”字没有识别到,或者识别结果可能为“配料”,导致识别结果中间多出空格。上述情况将造成RPA机器人无法识别到“配料”这一属性字段,从而无法提取“配料”对应的属性值,进而造成RPA机器人无法对商品包装图中的配料信息进行比对的情况。It should be noted that, considering the accuracy of OCR recognition results, for some attribute fields, such as ingredients, the OCR recognition result may be "material", resulting in the word "mixing" not being recognized, or the recognition result may be "ingredient", resulting in There are extra spaces in the recognition results. The above situation will cause the RPA robot to be unable to recognize the attribute field "ingredients" and thus be unable to extract the attribute value corresponding to "ingredients". This will result in the RPA robot being unable to compare the ingredient information in the product packaging diagram.
针对上述问题,本公开中,针对与目标商品相关的每个属性字段,还可以统计该属性字段的多种说法或多种可能的说法,将该属性字段和该属性字段对应的多种说法或多种可能的说法,均作为第三属性字段,并设置于设定词表中。从而在本公开中,可以基于设定词表,从文本内容中,提取与设定词表中各第三属性字段对应的第三属性值,从而可以将第三属性值与文档内容中各第二属性值进行比对。下面结合图5,对上述过程进行详细说明。In response to the above problem, in this disclosure, for each attribute field related to the target product, multiple statements or possible statements of the attribute field can also be counted, and the attribute field and the multiple statements or statements corresponding to the attribute field can be counted. Various possible expressions are used as the third attribute field and are set in the setting vocabulary. Therefore, in the present disclosure, the third attribute value corresponding to each third attribute field in the set vocabulary table can be extracted from the text content based on the set vocabulary table, so that the third attribute value can be compared with each third attribute field in the document content. Compare the two attribute values. The above process will be described in detail below with reference to Figure 5.
图5为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 5 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
如图5所示,在图2所示实施例的基础上,该基于RPA和AI的商品信息处理方法还可以包括以下步骤:As shown in Figure 5, based on the embodiment shown in Figure 2, the product information processing method based on RPA and AI can also include the following steps:
步骤301,获取设定词表,其中,设定词表中包括至少一个第三属性字段。Step 301: Obtain a setting vocabulary, where the setting vocabulary includes at least one third attribute field.
在本公开实施例中,设定词表为预先设置的,本公开中,RPA机器人可以获取该预先设置的设定词表。In the embodiment of the present disclosure, the set word list is preset. In the present disclosure, the RPA robot can obtain the preset set word list.
步骤302,从文本内容中提取与设定词表中各第三属性字段匹配的第三属性值。Step 302: Extract third attribute values matching each third attribute field in the set vocabulary from the text content.
在本公开实施例中,RPA机器人可以从文本内容中提取与设定词表中各第三属性字段匹配的第三属性值。具体实现过程与步骤203类似,在此不做赘述。In this embodiment of the present disclosure, the RPA robot can extract the third attribute value from the text content that matches each third attribute field in the set vocabulary. The specific implementation process is similar to step 203 and will not be described again here.
步骤303,将各第三属性字段对应的第三属性值,与文档内容中的各第二属性字段对应的第二属性值进行比对。Step 303: Compare the third attribute value corresponding to each third attribute field with the second attribute value corresponding to each second attribute field in the document content.
步骤304,在各第三属性值中存在目标属性值与第二属性值不匹配的情况下,将目标属性值,作为第一差异部分。Step 304: If there is a mismatch between the target attribute value and the second attribute value among the third attribute values, the target attribute value is used as the first difference part.
在本公开实施例中,可以将各第三属性字段对应的第三属性值,分别与文档内容中的各第二属性字段对应的第二属性值进行比对,若各第三属性值中存在至少一个属性值(本公开中记为目标属性值)与第二属性值不匹配,则可以将目标属性值,作为第一差异部分。而若各第三属性值与第二属性值均匹配,则可以无需执行任何处理。In this embodiment of the present disclosure, the third attribute value corresponding to each third attribute field can be compared with the second attribute value corresponding to each second attribute field in the document content. If there is If at least one attribute value (referred to as the target attribute value in this disclosure) does not match the second attribute value, the target attribute value may be used as the first difference part. If each third attribute value matches the second attribute value, no processing is required.
需要说明的是,本公开对步骤301至304的执行时序不作限制,例如,步骤301至304可以在步骤206之后执行,或者,步骤301至304还可以与步骤203至206并列执行,或者,步骤301至304还可以在步骤203之前执行,等等。也就是说,步骤301至304只需在步骤207之前执行即可。It should be noted that this disclosure does not limit the execution sequence of steps 301 to 304. For example, steps 301 to 304 can be executed after step 206, or steps 301 to 304 can also be executed in parallel with steps 203 to 206, or steps 301 to 304 may also be executed before step 203, and so on. In other words, steps 301 to 304 only need to be executed before step 207.
需要说明的是,在文本内容中存在第一差异部分的情况下,为了使得相关人员能够及时地对商品包装图进行核对和/或修改,在本公开的任意一个实施例之中,RPA机器人还可以发送提示信息,其中,该提示信息用于提示对商品包装图中的第一差异部分进行核对和/或修改。It should be noted that, when there is a first difference part in the text content, in order to enable relevant personnel to check and/or modify the product packaging diagram in a timely manner, in any embodiment of the present disclosure, the RPA robot also Prompt information can be sent, where the prompt information is used to prompt to check and/or modify the first difference part in the product packaging diagram.
例如,RPA机器人可以向指定账户(比如邮箱账号)发送提示信息;再例如,RPA机器人所在的设备可以登录有即时通信软件,RPA机器人可以向相关人员所在的即时通信账号,发送提示信息。For example, the RPA robot can send prompt information to a designated account (such as an email account); for another example, the device where the RPA robot is located can be logged in with instant messaging software, and the RPA robot can send prompt information to the instant messaging account of the relevant person.
在本公开的任意一个实施例之中,RPA机器人可以根据文本内容中第一属性字段和第一属性值之间的对应关系、第三属性字段和第三属性值之间的对应关系和目标商品的第一营养成分信息中的至少一项,生成并展示核对报告,从而相关人员可以基于上述核对报告,对商品包装图进行核对。例如,核对报告可以如图6所示。In any embodiment of the present disclosure, the RPA robot can determine the target product according to the corresponding relationship between the first attribute field and the first attribute value, the corresponding relationship between the third attribute field and the third attribute value in the text content. Generate and display a verification report for at least one of the first nutritional ingredient information, so that relevant personnel can verify the product packaging diagram based on the above verification report. For example, the reconciliation report can be as shown in Figure 6.
在本公开的任意一个实施例之中,RPA机器人不仅可以发送提示信息,还可以生成核对报告。In any embodiment of the present disclosure, the RPA robot can not only send prompt information, but also generate verification reports.
在本公开实施例的一种可能的实现方式中,RPA机器人还可以将文档内容和文本内容进行比对,以确定文档内容中不同于文本内容的第二差异部分,比对方式与上述实施例中将文本内容和文档内容进行比对的方式类似,在此不做赘述。本公开中,RPA机器人在确定文档内容中存在第二差异部分的情况下,可以在文档内容中对第二差异部分进行异常标注,并展示标注后的文档内容。其中,第二差异部分的标注方式与第一差异部分的标注方式类似,在此不做赘述。In a possible implementation of the embodiment of the present disclosure, the RPA robot can also compare the document content and the text content to determine the second difference part in the document content that is different from the text content. The comparison method is the same as in the above embodiment. The method of comparing text content and document content is similar and will not be described in detail here. In this disclosure, when the RPA robot determines that there is a second difference part in the document content, it can annotate the second difference part in the document content and display the annotated document content. The marking method of the second difference part is similar to the marking method of the first difference part, and will not be described again here.
本公开实施例的基于RPA和AI的商品信息处理方法,进一步根据设定词表提取文本内容中的各属性值,并将提取的各属性值分别与文档内容中的各属性值进行比对,可以避免在OCR识别结果准确率较低而导致属性值遗漏提取的情况,从而提升商品信息核对结果的准确性。The product information processing method based on RPA and AI in the embodiment of the present disclosure further extracts each attribute value in the text content according to the set vocabulary, and compares each extracted attribute value with each attribute value in the document content. It can avoid the situation where attribute values are missed due to low accuracy of OCR recognition results, thereby improving the accuracy of product information verification results.
为了清楚说明本公开任一实施例中RPA机器人是如何对文本内容和文档内容进行比对的,本公开还提出一种基于RPA和AI的商品信息处理方法。In order to clearly illustrate how the RPA robot compares text content and document content in any embodiment of the disclosure, the disclosure also proposes a product information processing method based on RPA and AI.
图7为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 7 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
如图7所示,该基于RPA和AI的商品信息处理方法可以包括以下步骤:As shown in Figure 7, the product information processing method based on RPA and AI can include the following steps:
步骤401,获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容。Step 401: Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
步骤402,获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。Step 402: Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
步骤401至402的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of steps 401 to 402 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
步骤403,从文本内容中提取目标商品的第一营养成分信息,并从文档内容中提取第二营养成分信息。Step 403: Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
在本公开实施例中,可以从文本内容中提取目标商品的第一营养成分信息。比如,以将商品包装图切分为多个子图像进行示例性说明,第一营养成分信息可以包含在某个子区域中,本公开中记为目标子图像,比如,目标子图像可以如图3中的子图像1所示,可以基于OCR技术,对目标子区域进行字符识别,得到第一营养成分信息。In the embodiment of the present disclosure, the first nutritional ingredient information of the target product can be extracted from the text content. For example, by dividing the product packaging image into multiple sub-images for illustration, the first nutritional ingredient information can be included in a certain sub-region, which is recorded as a target sub-image in this disclosure. For example, the target sub-image can be as shown in Figure 3 As shown in sub-image 1, character recognition can be performed on the target sub-area based on OCR technology to obtain the first nutritional component information.
也就是说,文本内容是由多个子图像对应的OCR识别结果组成的,可以从多个子图像中确定包含第一营养成分信息的目标子图像,并从文本内容中,确定目标子图像对应的OCR识别结果。That is to say, the text content is composed of OCR recognition results corresponding to multiple sub-images. The target sub-image containing the first nutritional component information can be determined from the multiple sub-images, and the OCR corresponding to the target sub-image can be determined from the text content. Recognition results.
在本公开实施例中,RPA机器人还可以从文档内容中提取第二营养成分信息。In the embodiment of the present disclosure, the RPA robot can also extract the second nutritional component information from the document content.
步骤404,将第一营养成分信息中的各成分信息与第二营养成分信息中对应成分信息进行比对。Step 404: Compare each component information in the first nutritional component information with the corresponding component information in the second nutritional component information.
步骤405,在第一营养成分信息中存在目标成分信息与第二营养成分信息中对应成分信息不匹配的情况下,将目标成分信息作为第一差异部分。Step 405: If there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
在本公开实施例中,可以将第一营养成分信息中的各成分信息(比如能量、蛋白质、脂肪等成分信息)与第二营养成分信息中对应成分信息进行匹配,在第一营养成分信息中存在至少一个成分信息(本公开中记为目标成分信息)与第二营养成分信息中对应成分信息不匹配的情况下,可以将该目标成分信息作为第一差异部分。In the embodiment of the present disclosure, each component information (such as energy, protein, fat and other component information) in the first nutritional component information can be matched with the corresponding component information in the second nutritional component information. In the first nutritional component information When there is a mismatch between at least one component information (denoted as target component information in this disclosure) and the corresponding component information in the second nutritional component information, the target component information can be used as the first difference part.
步骤406,在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。Step 406: Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
步骤406的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of step 406 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again here.
本公开实施例的基于RPA和AI的商品信息处理方法,通过将文本内容中的营养成分信息与文档内容中的营养成分信息进行比对,可以实现对商品包装图中的表格内容进行核对,避免商品信息的遗漏核对,从而提升核对结果的可靠性。The product information processing method based on RPA and AI in the embodiment of the present disclosure can realize the verification of the table content in the product packaging diagram by comparing the nutritional information in the text content with the nutritional information in the document content to avoid Omissions of product information are checked, thereby improving the reliability of the verification results.
需要说明的是,营养成分表,由于大部分是无框线表格,目前通用的表格识别算法识别营养成分表比较困难,比如,通用表格识别算法无法明确无框线表格中的左边、中间、右边、换行等。举例而言,假设图3中子图像1中的碳水化合物如果换行,可能变为如表2或表3所示:It should be noted that because most of the nutritional ingredients tables are tables without borders, it is difficult for the current general table recognition algorithm to identify the nutritional labeling. For example, the general table recognition algorithm cannot clearly identify the left, middle, and right sides of the table without borders. , line break, etc. For example, if the carbohydrates in sub-image 1 in Figure 3 are changed to another line, they may become as shown in Table 2 or Table 3:
表2Table 2
碳水化carbs 5.8g5.8g 2%2%
合物compound    
表3table 3
Figure PCTCN2022091293-appb-000002
Figure PCTCN2022091293-appb-000002
可以理解的是,表2和表3对于人而言,是较易理解的,但是机器是很难判断碳水化合物是一个完整的词,因此目前的通用表格识别算法识别较为困难。针对上述问题,本公开中,在从文本内容中提取第一营养成分信息之后,可以对第一营养成分信息中错误识别的成分信息进行正则替换。下面结合图8,对上述过程进行详细说明。It is understandable that Tables 2 and 3 are easier to understand for people, but it is difficult for machines to judge that carbohydrate is a complete word, so the current general table recognition algorithm is more difficult to recognize. To address the above problems, in the present disclosure, after extracting the first nutritional ingredient information from the text content, regular replacement can be performed on incorrectly identified ingredient information in the first nutritional ingredient information. The above process will be described in detail below with reference to Figure 8 .
图8为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 8 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
如图8所示,该基于RPA和AI的商品信息处理方法可以包括以下步骤:As shown in Figure 8, the product information processing method based on RPA and AI can include the following steps:
步骤501,获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容。Step 501: Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
步骤502,获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。Step 502: Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
步骤503,从文本内容中提取目标商品的第一营养成分信息,并从文档内容中提取第二营养成分信息。Step 503: Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
步骤501至503的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of steps 501 to 503 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
步骤504,针对第一营养成分信息中任一成分信息,获取与任一成分信息匹配的正则表达式。Step 504: For any component information in the first nutritional component information, obtain a regular expression matching any component information.
在本公开实施例中,可以预先设置每个成分信息对应的正则表达式,从而在本公开中,RPA机器人可以获取第一营养成分信息中的每个成分信息对应的正则表达式。In the embodiment of the present disclosure, the regular expression corresponding to each ingredient information can be preset, so that in the present disclosure, the RPA robot can obtain the regular expression corresponding to each ingredient information in the first nutritional ingredient information.
步骤505,将正则表达式与任一成分信息进行匹配。Step 505: Match the regular expression with any component information.
步骤506,若不匹配,则基于正则表达式,对任一成分信息进行替换处理。Step 506: If there is no match, any component information is replaced based on the regular expression.
在本公开实施例中,针对第一营养成分信息中任一成分信息,如果该任一成分信息与对应的正则表达式不匹配,则可以基于该任一成分信息对应的正则表达式,对该任一成分信息进行替换处理。而如果该任一成分信息与对应的正则表达式匹配,则可以无需对该任一成分信息进行替换处理。In the embodiment of the present disclosure, for any component information in the first nutritional component information, if the any component information does not match the corresponding regular expression, then the corresponding regular expression can be based on the any component information. Any component information is replaced. And if any component information matches the corresponding regular expression, there is no need to perform replacement processing on any component information.
举例而言,“碳水化合物”对应的单位为“g”,如果第一营养成分信息中“碳水化合物”对应的单位为“9”,则可以利用该“碳水化合物”对应的正则表达式,将“9”自动替换为“g”。For example, the unit corresponding to "carbohydrate" is "g". If the unit corresponding to "carbohydrate" in the first nutritional ingredient information is "9", you can use the regular expression corresponding to the "carbohydrate" to "9" is automatically replaced with "g".
再例如,如图1所示,每项营养成分对应的最后一项“NRV”为全天所需营养素的百分比,如果第一营养成分信息中各项成分信息中“NRV”对应的单位不为“%”,而为其他符号,则可以利用各项成分信息对应的正则表达式,将其他符号自动替换为“%”。For another example, as shown in Figure 1, the last item "NRV" corresponding to each nutrient ingredient is the percentage of the nutrient required throughout the day. If the unit corresponding to "NRV" in each ingredient information in the first nutrient ingredient information is not "%", and other symbols, you can use the regular expression corresponding to each component information to automatically replace other symbols with "%".
又例如,假设OCR识别结果中第一营养成分信息如图9所示,根据“碳水化合物”对应的正则表达式,可以确定“碳水化合物”对应的成分信息中,第一项缺少“物”字,第二项多了“物”字,则可以利用该“碳水化合物”对应的正则表达式,将第一项中的“碳水化合”替换为“碳水化合物”,将“物5.8g”自动替换为“5.8g”。For another example, assume that the first nutritional component information in the OCR recognition result is shown in Figure 9. According to the regular expression corresponding to "carbohydrates", it can be determined that the first item in the component information corresponding to "carbohydrates" lacks the word "物" , the second item contains the word "thing", you can use the regular expression corresponding to the "carbohydrate" to replace "carbohydrate" in the first item with "carbohydrate", and automatically replace "thing 5.8g" is "5.8g".
需要说明的是,本公开上述仅以根据正则表达式,对任一成分信息进行替换处理进行示例,实际应用时,也可以通过在代码层面通过写逻辑判断,来对任一成分信息进行替换处理。比如,代码逻辑可以为:判断各项成分信息中数字的最后是否包含单位,如果不包含单位,则可以将最后一位数字自动替换为与成分信息匹配的单位,比如将“9”替换为“g”。It should be noted that the above-mentioned examples of this disclosure only use regular expressions to replace any component information. In actual application, any component information can also be replaced by writing logical judgments at the code level. . For example, the code logic can be: determine whether the last number in each ingredient information contains a unit. If it does not contain a unit, the last digit can be automatically replaced with a unit that matches the ingredient information, such as replacing "9" with " g".
步骤507,将替换处理后的第一营养成分信息中的各成分信息与第二营养成分信息中对应成分信息进行比对。Step 507: Compare each component information in the replaced first nutritional component information with the corresponding component information in the second nutritional component information.
步骤508,在替换处理后的第一营养成分信息中存在目标成分信息与第二营养成分信息中对应成分信息不匹配的情况下,将目标成分信息作为第一差异部分。Step 508: If there is a mismatch between the target component information in the replaced first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
步骤509,在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。Step 509: Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
步骤509的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of step 509 can be referred to the execution process of any embodiment of the present disclosure, and will not be described again here.
本公开实施例的基于RPA和AI的商品信息处理方法,通过针对第一营养成分信息中任一成分信息,获取与任一成分信息匹配的正则表达式;将正则表达式与任一成分信息进行匹配;若不匹配,则基于正则表达式,对任一成分信息进行替换处理。由此,可以实现对OCR识别结果进行辅正优化,从而可以进一步提升商品信息比对结果的准确性和可靠性。The product information processing method based on RPA and AI in the embodiment of the present disclosure obtains a regular expression that matches any component information by targeting any component information in the first nutritional component information; the regular expression is matched with any component information Match; if not, any component information will be replaced based on the regular expression. As a result, the OCR recognition results can be supplemented, corrected and optimized, thereby further improving the accuracy and reliability of the product information comparison results.
本公开还提出一种RPA和AI的商品信息处理方法。This disclosure also proposes an RPA and AI product information processing method.
图10为本公开实施例所提供的一种基于RPA和AI的商品信息处理方法的流程示意图。Figure 10 is a schematic flowchart of a product information processing method based on RPA and AI provided by an embodiment of the present disclosure.
如图10所示,该基于RPA和AI的商品信息处理方法可以包括以下步骤:As shown in Figure 10, the product information processing method based on RPA and AI can include the following steps:
步骤601,获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容。Step 601: Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on OCR technology.
步骤602,获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。Step 602: Obtain the reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product.
步骤603,从文本内容中提取目标商品的第一营养成分信息,并从文档内容中提取第二营养成分信息。Step 603: Extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content.
步骤601至603的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of steps 601 to 603 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
步骤604,针对第一营养成分信息中的任一文本片段,判断任一文本片段的语义是否完整。Step 604: For any text segment in the first nutritional ingredient information, determine whether the semantics of any text segment is complete.
在本公开实施例中,针对第一营养成分信息中的任一文本片段,可以判断任一文本片段的语义是否完整。In the embodiment of the present disclosure, for any text fragment in the first nutritional ingredient information, it can be determined whether the semantics of any text fragment is complete.
作为一种示例,可以基于语义分析算法,确定任一文本片段的语义是否完整。As an example, it can be determined whether the semantics of any text fragment is complete based on a semantic analysis algorithm.
可以理解的是,一般情况下,第一营养成分信息识别错误的原因,一方面包括单位识别错误,另一方面包括项目(比如蛋白质、碳水化合物、反式脂肪酸、维生素D等)识别错误,其中,项目识别错误的原因一般为:项目名称较长,而导致OCR将项目名称中的部分字符归入到含量(比如图9中每100mL所在的列)中。It can be understood that, under normal circumstances, the reasons for the identification errors of the first nutritional ingredient information include unit identification errors on the one hand, and item (such as protein, carbohydrates, trans fatty acids, vitamin D, etc.) identification errors on the other hand, among which , the reason for project identification errors is generally: the project name is long, which causes OCR to classify some characters in the project name into the content (such as the column for each 100mL in Figure 9).
因此,针对上述问题,本本公开中,作为另一种示例,可以对大量商品的包装设计图进行统计分析,确定不同商品对应的营养成分表所包含的各项目,并将上述项目写入项目表中,从而在本公开中,可以将第一营养成分信息中各项目所在的文本片段与项目表中各项目名称进行匹配,若第一营养成分信息中某个项目所在的文本片段与项目表中各项目名称不匹配,则确定该项目所在的文本片段的语义不完整。Therefore, in response to the above problems, in the present disclosure, as another example, statistical analysis can be performed on the packaging design drawings of a large number of commodities, each item included in the nutritional composition table corresponding to different commodities can be determined, and the above items can be written into the item table , so in the present disclosure, the text fragment where each item in the first nutritional component information is located can be matched with the name of each item in the item table. If the text fragment where a certain item in the first nutritional component information is located matches the item name in the item table If the names of each item do not match, it is determined that the semantics of the text fragment in which the item is located is incomplete.
步骤605,如果任一文本片段的语义不完整,则从营养成分信息中获取与任一文本片段相邻的邻接文本片段。Step 605: If the semantics of any text fragment is incomplete, obtain adjacent text fragments adjacent to any text fragment from the nutritional composition information.
在本公开实施例中,在上述任一文本片段的语义不完整的情况下,则可以营养成分信息中获取与任一文本片段相邻的邻接文本片段。In the embodiment of the present disclosure, if the semantics of any of the above text fragments is incomplete, the adjacent text fragments adjacent to any of the text fragments can be obtained from the nutritional component information.
步骤606,如果邻接文本片段的语义不完整,则从邻接文本片段中确定语义完整的子片段。Step 606: If the semantics of the adjacent text segments are incomplete, determine semantically complete sub-segments from the adjacent text segments.
步骤607,提取邻接文本片段中除子片段之外的其他字符,并将其他字符归入任一文本片段。Step 607: Extract other characters excluding sub-segments from the adjacent text fragments, and classify the other characters into any text fragment.
在本公开实施例中,可以判断邻接文本片段的语义是否完整,如果邻接文本片段的语义不完整,则可以从邻接文本片段中确定语义完整的子片段,并提取邻接文本片段中除子片段之外的其他字符,从而可以将其他字符归入任一文本片段。In the embodiment of the present disclosure, it can be determined whether the semantics of the adjacent text fragments are complete. If the semantics of the adjacent text fragments are incomplete, the semantically complete sub-segments can be determined from the adjacent text fragments, and the sub-segments in the adjacent text fragments can be extracted. characters, so that other characters can be included in any text fragment.
而在邻接文本片段的语义完整的情况下,可以获取与上述任一文本片段相邻的下一邻接文本片段,并判断下一邻接文本片段的语义是否完整,如果下一邻接文本片段的语义不完整,则可以从下一邻接文本片段中确定语义完整的子片段,并提取下一邻接文本片段中除子片段之外的其他字符,从而可以将其他字符归入任一文本片段。When the semantics of the adjacent text fragments are complete, the next adjacent text fragment adjacent to any of the above text fragments can be obtained, and whether the semantics of the next adjacent text fragment is complete is determined. If the semantics of the next adjacent text fragment is not Complete, the semantically complete sub-segment can be determined from the next adjacent text segment, and other characters in the next adjacent text segment except the sub-segment can be extracted, so that other characters can be classified into any text segment.
步骤608,将其他字符从邻接文本片段中剔除。Step 608: Remove other characters from adjacent text segments.
在本公开实施例中,RPA机器人还可以将其他字符从邻接文本片段中剔除,以保证第一营养成分信息识别结果的准确性。In the embodiment of the present disclosure, the RPA robot can also remove other characters from adjacent text segments to ensure the accuracy of the first nutritional ingredient information recognition result.
步骤609,将更新后的第一营养成分信息中的各成分信息与第二营养成分信息中对应成分信息进行比对。Step 609: Compare each component information in the updated first nutritional component information with the corresponding component information in the second nutritional component information.
步骤610,在更新后的第一营养成分信息中存在目标成分信息与第二营养成分信息中对应成分信息不匹配的情况下,将目标成分信息作为第一差异部分。Step 610: If there is a mismatch between the target component information in the updated first nutritional component information and the corresponding component information in the second nutritional component information, use the target component information as the first difference part.
步骤611,在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。Step 611: Make an abnormality mark on the first difference part in the text content, and/or make an exception mark on the area where the first difference part is located in the product packaging diagram.
步骤609至611的执行过程可以参见本公开任一实施例的执行过程,在此不做赘述。The execution process of steps 609 to 611 can refer to the execution process of any embodiment of the present disclosure, and will not be described again here.
作为一种示例,RPA机器人可以设置于核对平台侧,从而在本公开中,可以在核对平台侧完成商品信息的自动核对,例如,本公开实施例的实现原理可以如图11所示,具体可以包括以下几个部分:As an example, the RPA robot can be installed on the verification platform side, so that in the present disclosure, automatic verification of product information can be completed on the verification platform side. For example, the implementation principle of the embodiment of the present disclosure can be shown in Figure 11, specifically: Includes the following parts:
第一部分,上传商品包装图至核对平台。其中,商品包装图的格式可以为JPG、PNG等图片格式(或称为图像格式),或者,也可以上传PDF文档、PSD等格式的设计文档,可以从上述文档中提取商品包装图。The first part is to upload the product packaging pictures to the verification platform. Among them, the format of the product packaging diagram can be JPG, PNG and other picture formats (or image formats), or you can upload design documents in PDF documents, PSD and other formats, and the product packaging diagram can be extracted from the above documents.
例如,相关人员可以通过网页端上传图像或文档至核对平台。For example, relevant personnel can upload images or documents to the verification platform through the web page.
第二部分,对商品包装图进行切割。可以将商品包装图进行切割,切割为多个子图像,比如,可以通过相关人员手动框选商品包装图中需要进行OCR识别的区域,并切割上述区域,得到各个子区域。The second part is to cut the product packaging diagram. The product packaging image can be cut into multiple sub-images. For example, the relevant personnel can manually select the areas in the product packaging image that need to be OCR recognized, and cut the above areas to obtain each sub-area.
作为一种示例,由于上传的商品包装图较大,为了实现准确识别商品包装图中的文本信息,可以通过人工从商品包装图中圈选待识别部分。例如,人工可以圈选如图12中所示的营养成分表所在的区域。再例如,人工可以圈选如图3中所示的各个区域。As an example, since the uploaded product packaging image is large, in order to accurately identify the text information in the product packaging image, you can manually select the part to be identified from the product packaging image. For example, a human can circle the area where the nutritional label as shown in Figure 12 is located. For another example, humans can circle each area as shown in Figure 3.
其中,营养成分表,由于大部分是无框线表格,目前通用的表格识别算法识别营养成分表比较困难, 比如,通用表格识别算法无法明确无框线表格中的左边、中间、右边、换行等。举例而言,图3中的碳水化合物如果换行,可能变为如表2或表3所示。可以理解的是,表2和表3对于人而言,是较易理解的,但是机器是很难判断碳水化合物是一个完整的词,因此目前的通用表格识别算法识别较为困难。针对上述问题,核对平台会对营养成分表中的特定词语在代码层面通过写逻辑判断,来对OCR识别结果进行辅正优化。Among them, nutritional ingredient tables, because most of them are tables without borders, it is difficult for the current general table recognition algorithm to identify the nutrition table. For example, the general table recognition algorithm cannot clearly identify the left, middle, right, line breaks, etc. in tables without borders. . For example, if the carbohydrates in Figure 3 are changed to another line, they may become as shown in Table 2 or Table 3. It is understandable that Tables 2 and 3 are easier to understand for people, but it is difficult for machines to judge that carbohydrate is a complete word, so the current general table recognition algorithm is more difficult to recognize. In response to the above problems, the verification platform will supplement and optimize the OCR recognition results by writing logical judgments at the code level for specific words in the nutrition facts table.
例如,图3中的营养成分表的OCR识别结果可以如图9所示,可以对OCR识别结果进行辅正优化,优化后的OCR识别结果可以如表1所示。For example, the OCR recognition results of the nutritional ingredients table in Figure 3 can be shown in Figure 9. The OCR recognition results can be supplemented and optimized, and the optimized OCR recognition results can be shown in Table 1.
配料的提取,如图13所示,可以将OCR识别结果中的换行符号去除,得到一个长文本,然后可以通过核对平台上的配置模板(其中,配置模板中包括用于提取各属性字段对应的属性值的抽取规则或提取规则),从OCR识别结果中抽取配料信息。例如,在核对平台对图13中的OCR识别结果中的配料信息进行抽取,抽取结果可以如图14所示。To extract ingredients, as shown in Figure 13, the newline symbols in the OCR recognition results can be removed to obtain a long text, which can then be checked against the configuration template on the platform (the configuration template includes information for extracting the corresponding attributes of each attribute field). Attribute value extraction rules or extraction rules), extract ingredient information from the OCR recognition results. For example, the verification platform extracts the ingredient information from the OCR recognition results in Figure 13, and the extraction results can be shown in Figure 14.
生产商(后续称为厂名)、产地及地址(后续称为厂址)、生产许可证(或称为生产许可证编号)的提取,与配料类似。例如,对厂名和厂址所在的图像区域进行OCR识别,识别结果可以如图15所示,可以将OCR识别结果中的换行符号去除,得到一个长文本,然后可以通过配置模板,从OCR识别结果中抽取厂名和厂址。例如,在核对平台对图15中的OCR识别结果中厂名、厂址和食品生产许可证编号的进行抽取,抽取结果可以如图16所示。The extraction of the manufacturer (hereinafter referred to as the factory name), place of production and address (hereinafter referred to as the factory address), and production license (or production license number) is similar to the ingredients. For example, OCR recognition is performed on the image area where the factory name and address are located, and the recognition result can be shown in Figure 15. The line breaks in the OCR recognition results can be removed to obtain a long text, and then the template can be configured to extract the text from the OCR recognition results. Extract the factory name and address. For example, the verification platform extracts the factory name, factory address and food production license number from the OCR recognition results in Figure 15, and the extraction results can be shown in Figure 16.
也就是说,本公开中,可以在核对平台侧定义待抽取的属性字段,比如抽取生产商(后续称为厂名)、产地及地址(后续称为厂址)等。作为一种示例,定义的属性字段可以如图17所示,从而可以从OCR识别结果中抽取与各属性字段匹配的属性值,进而后续可以将抽取的各属性字段与属性值与文档内容中的各属性字段与属性值进行比对。That is to say, in this disclosure, the attribute fields to be extracted can be defined on the verification platform side, such as extracting the manufacturer (hereinafter referred to as factory name), place of origin and address (hereinafter referred to as factory address), etc. As an example, the defined attribute fields can be as shown in Figure 17, so that attribute values matching each attribute field can be extracted from the OCR recognition results, and then each extracted attribute field and attribute value can be subsequently compared with the attribute value in the document content. Each attribute field is compared with the attribute value.
进一步地,还可以在核对平台侧设定自定义词表(本公开中记为设定词表),该设定词表用于配合抽取。比如,配料信息一定是出现在单词“配料”或“配料:”后面的,但考虑到OCR识别结果的准确率,有可能会识别出“料”字,“配”字没有识别到,或者识别出的“配料”中间有空格的,这些都可以作为枚举配置在词表中。Furthermore, a custom vocabulary list (referred to as a set vocabulary list in this disclosure) can also be set on the verification platform side, and the set vocabulary list is used to cooperate with the extraction. For example, the ingredient information must appear after the word "ingredients" or "ingredients:". However, considering the accuracy of the OCR recognition results, it is possible that the word "ingredients" will be recognized, but the word "matching" will not be recognized, or the word "ingredients" will be recognized. If there are spaces in the middle of the "ingredients", these can be configured in the vocabulary as enumerations.
在配置上述配置模板时,可以使用各属性字段对应的自定义词表,例如,配置模板可以如图18所示。When configuring the above configuration template, you can use the custom vocabulary corresponding to each attribute field. For example, the configuration template can be as shown in Figure 18.
图19为配料的提取规则,可以识别文本内容中是否包括配料对应的自定义词表中的词,若包括,则可以将文本内容中位于该词之后的任意0~500个字符内容,输出到配料字段中,即作为配料这一属性字段对应的属性值。如果文本内容中位于该词之后的字符内容中包括自定义词表分段词汇中的词(本公开中记为结尾标识),可以无需提取结尾标识后的字符信息,即将该词与结尾标识之间的字符内容,作为配料对应的属性值。Figure 19 shows the extraction rules for ingredients. It can identify whether the text content includes words in the custom word list corresponding to ingredients. If it does, any 0 to 500 characters in the text content after the word can be output to In the ingredient field, it is the attribute value corresponding to the ingredient field. If the character content located after the word in the text content includes words in the segmented vocabulary of the custom vocabulary list (recorded as the ending identifier in this disclosure), there is no need to extract the character information after the ending identifier, that is, between the word and the ending identifier The character content between them is used as the attribute value corresponding to the ingredient.
第三部分,上传参考文档至核对平台。为了使得比对结果或核对结果更加准确,降低核对错误率,参考文档的格式可以为标准结构化文档,比如Excel文档。若无法使用结构化文档,则可以使用固定模板结构的文档,比如Word文档。The third part is to upload the reference documents to the verification platform. In order to make the comparison or verification results more accurate and reduce the verification error rate, the format of the reference document can be a standard structured document, such as an Excel document. If you cannot use a structured document, you can use a document with a fixed template structure, such as a Word document.
例如,相关人员可以通过网页端上传参考文档至核对平台。For example, relevant personnel can upload reference documents to the verification platform through the web page.
第四部分,对商品包装图进行OCR识别,得到文本内容。为了提升识别结果的准确性,需要保证商品包装图足够清晰。根据对不同图像进行测试,切割后的图像大小在8MB以上,可以保证较高的识别准确率。The fourth part is to perform OCR recognition on the product packaging image to obtain the text content. In order to improve the accuracy of the recognition results, it is necessary to ensure that the product packaging image is clear enough. According to tests on different images, the size of the cut image is above 8MB, which can ensure a high recognition accuracy.
第五部分,文档抽取理解。可以将非结构化的文档内容转换为结构化数据。在一个实施例中,业务人员可以按照设定格式撰写参考文档,从而可以无需对参考文档的文档内容进行结构化转换。比如,可以通过IDP系统中的智能文档理解能力,完成对文档内容中关键信息的智能提取,实现将非结构化的文档内容转换为结构化数据。The fifth part is document extraction and understanding. Can convert unstructured document content into structured data. In one embodiment, business personnel can compose the reference document according to a set format, so that there is no need to perform structured conversion of the document content of the reference document. For example, the intelligent document understanding capability in the IDP system can be used to intelligently extract key information from the document content and convert unstructured document content into structured data.
第六部分,信息比对,以确定文本内容中不同于文档内容的第一差异部分,和/或,确定文档内容中不同于文本内容的第二差异部分。可以使用OCR技术以及文档信息抽取功能,对第四部分提取的文本内容和第五部分提取的文档内容进行比对。比对逻辑为:将文本内容分类进行分类,比如分为属性字段和属性值、第一营养成分信息等;将分类后的文本内容依次与文档内容中的对应内容进行比对,标记不一致或者多出的文本部分。并且,还可以将文档内容依次与文本内容进行核对(或称为反查),以确保文本 内容中所有内容均参与核对,以避免某个内容未参与比对,而降低核对结果的准确率的情况发生。The sixth part is information comparison to determine the first difference part in the text content that is different from the document content, and/or to determine the second difference part in the document content that is different from the text content. You can use OCR technology and the document information extraction function to compare the text content extracted in the fourth part and the document content extracted in the fifth part. The comparison logic is: classify the text content into categories, such as attribute fields and attribute values, first nutritional ingredient information, etc.; compare the classified text content with the corresponding content in the document content in sequence, if the tags are inconsistent or have multiple out of the text part. In addition, the document content can also be checked against the text content in sequence (or called back-checking) to ensure that all content in the text content participates in the verification, so as to avoid certain content not participating in the comparison and reducing the accuracy of the verification results. situation occurs.
此外,还可以对文本内容进行逻辑扶正,以提升OCR识别结果的准确率,从而提升核对结果的准确率。例如,针对营养成分表中的不同成分信息,可以在代码逻辑中进行正则替换,例如蛋白质的单位为g,如果OCR识别结果中蛋白质的单位为9,则可以将9替换为g,以此提高OCR识别结果的准确率。In addition, the text content can also be logically corrected to improve the accuracy of the OCR recognition results, thereby improving the accuracy of the verification results. For example, for different ingredient information in the nutrition table, you can perform regular replacement in the code logic. For example, the unit of protein is g. If the unit of protein in the OCR recognition result is 9, you can replace 9 with g to improve the performance. The accuracy of OCR recognition results.
第七部分,结果展示。可以在网页中展示对比结果,比如,可以在文本内容中标注第一差异部分,在文档内容中标注第二差异部分。此外,还可以在商品包装图中标注第一差异部分的位置。Part 7, results display. The comparison results can be displayed on the web page. For example, the first difference part can be marked in the text content, and the second difference part can be marked in the document content. In addition, the location of the first difference part can also be marked on the product packaging diagram.
需要说明的是,图13中商品包装图中的乳酸菌的添加量为:1.0×10 7CFU/100g,但是OCR识别结果为:1.0×107CFU/100g,即OCR识别结果中并未区分幂次方,针对上述情形,RPA机器人可以识别得到这两个属性值不同,即1.0×10 7CFU/100g与1.0×107CFU/100g不同,可以在文本内容中对1.0×107CFU/100g这一属性值进行标注,由人工核对此处是否出错。 It should be noted that the added amount of lactic acid bacteria in the product packaging picture in Figure 13 is: 1.0×10 7 CFU/100g, but the OCR recognition result is: 1.0×107CFU/100g, that is, the power is not distinguished in the OCR recognition result. In view of the above situation, the RPA robot can recognize that the two attribute values are different, that is, 1.0×10 7 CFU/100g is different from 1.0×107CFU/100g. The attribute value of 1.0×107CFU/100g can be marked in the text content. , let humans check whether there are errors here.
需要说明的是,考虑到有些商品的商品包装图设计特殊的情况,比如,一般情况下,商品包装图中文字是从左到右或从上到下排列的,但是,一些商品的商品包装图中的文字可能是环绕显示,波浪线的形式显示等等,此时,将导致OCR识别结果与文档内容不同。It should be noted that taking into account the special circumstances of the product packaging design of some products, for example, under normal circumstances, the text in the product packaging image is arranged from left to right or top to bottom. However, the product packaging image of some products The text in may be displayed wrapped around, displayed in the form of wavy lines, etc. In this case, the OCR recognition result will be different from the document content.
作为一种示例,对图3中的子图像1进行OCR识别,识别结果可以如图20所示。但是,对于图21中的图像而言,OCR识别结果可能出错。针对上述情况,RPA机器人可以在文本内容中标注不同之处,和/或,在商品包装图中标注不同之处所处的位置,由人工核对此处是否出错。As an example, OCR recognition is performed on sub-image 1 in Figure 3, and the recognition result can be as shown in Figure 20. However, for the image in Figure 21, the OCR recognition results may be wrong. In response to the above situation, the RPA robot can mark the differences in the text content, and/or mark the location of the differences in the product packaging diagram, and manually check whether there are errors.
在一个实施例中,RPA机器人还可以生成核对结果,该核对结果可以供用户进行下载。In one embodiment, the RPA robot can also generate verification results, which can be downloaded by the user.
最后,可以由人工对标注后的文本内容、标注后的文档内容、标注后的商品包装图、核对报告进行复核。由核对平台或RPA机器人核对商品信息,可以实现在较短的时间内完成核对,一般仅需1-3分钟即可完成核对,不但提高了核对效率,也提高了核对结果的准确率。人工仅需对不同之处进行复核,可以降低相关人员的工作量,提升工作效率。Finally, the annotated text content, annotated document content, annotated product packaging diagram, and verification report can be reviewed manually. The verification of product information by the verification platform or RPA robot can be completed in a shorter time. Generally, it only takes 1-3 minutes to complete the verification, which not only improves the verification efficiency, but also improves the accuracy of the verification results. Only the differences are manually reviewed, which can reduce the workload of relevant personnel and improve work efficiency.
与上述图1至图10实施例提供的基于RPA和AI的商品信息处理方法相对应,本公开还提供一种基于RPA和AI的商品信息处理装置,由于本公开实施例提供的基于RPA和AI的商品信息处理装置与上述图1至图10实施例提供的基于RPA和AI的商品信息处理方法相对应,因此基于RPA和AI的商品信息处理方法的实施方式也适用于本公开实施例提供的基于RPA和AI的商品信息处理装置,在本公开实施例中不再详细描述。Corresponding to the product information processing method based on RPA and AI provided by the above embodiments of FIG. 1 to FIG. 10 , the present disclosure also provides a product information processing device based on RPA and AI. The product information processing device corresponds to the product information processing method based on RPA and AI provided by the above embodiments of Figures 1 to 10. Therefore, the implementation of the product information processing method based on RPA and AI is also applicable to the product information processing method provided by the embodiment of the present disclosure. The product information processing device based on RPA and AI will not be described in detail in the embodiment of this disclosure.
图22为本公开实施例提供的一种基于RPA和AI的商品信息处理装置的结构示意图。Figure 22 is a schematic structural diagram of a product information processing device based on RPA and AI provided by an embodiment of the present disclosure.
如图22所示,该基于RPA和AI的商品信息处理装置2200应用于RPA机器人,可以包括:第一获取模块2210、识别模块2220、第二获取模块2230、比对模块2240和标注模块2250。As shown in Figure 22, the product information processing device 2200 based on RPA and AI is applied to RPA robots and may include: a first acquisition module 2210, an identification module 2220, a second acquisition module 2230, a comparison module 2240 and an annotation module 2250.
其中,第一获取模块2210,用于获取目标商品对应的商品包装图。Among them, the first acquisition module 2210 is used to acquire the product packaging diagram corresponding to the target product.
识别模块2220,用于基于光学字符识别OCR技术,识别商品包装图中的文本内容。The recognition module 2220 is used to recognize text content in product packaging images based on optical character recognition OCR technology.
第二获取模块2230,用于获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息。The second acquisition module 2230 is used to acquire the reference document and acquire the document content in the reference document, where the document content includes product information corresponding to the target product.
比对模块2240,用于对文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分。The comparison module 2240 is used to compare the text content and the document content to determine the first difference part in the text content that is different from the document content.
标注模块2250,用于在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。The marking module 2250 is configured to mark the first difference part abnormally in the text content, and/or mark the area where the first difference part is located in the product packaging diagram abnormally.
在本公开实施例的一种可能的实现方式中,比对模块2240,用于:从文本内容中提取各第一属性字段,并从文本内容中提取与各第一属性字段匹配的第一属性值;将各第一属性字段和各第一属性字段对应的第一属性值,与文档内容中的各第二属性字段和各第二属性字段对应的第二属性值进行比对;在各第一属性字段中存在第一目标属性字段与第二属性字段不匹配的情况下,将第一目标属性字段和/或第一目标属性字段对应的第一属性值,作为第一差异部分;在各第一属性字段中存在第二目标属性字段与第二属性字段匹配,但第二目标属性字段对应的第一属性值与第二属性字段对应的第二属性值不匹配的情况下,将第二目标属性字段对应的第一属性值,作为第一差异部分。In a possible implementation of the embodiment of the present disclosure, the comparison module 2240 is configured to: extract each first attribute field from the text content, and extract the first attribute matching each first attribute field from the text content. value; compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content; When there is a mismatch between the first target attribute field and the second attribute field in an attribute field, the first target attribute field and/or the first attribute value corresponding to the first target attribute field is used as the first difference part; in each If there is a second target attribute field in the first attribute field that matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute value corresponding to the second attribute field, the second attribute field will be The first attribute value corresponding to the target attribute field is used as the first difference part.
在本公开实施例的一种可能的实现方式中,比对模块2240,还用于:获取设定词表,其中,设定词表中包括至少一个第三属性字段;从文本内容中提取与设定词表中各第三属性字段匹配的第三属性值; 将各第三属性字段对应的第三属性值,与文档内容中的各第二属性字段对应的第二属性值进行比对;在各第三属性值中存在目标属性值与第二属性值不匹配的情况下,将目标属性值,作为第一差异部分。In a possible implementation of the embodiment of the present disclosure, the comparison module 2240 is also used to: obtain a setting vocabulary list, where the setting vocabulary list includes at least a third attribute field; extract and extract from the text content Set the third attribute value matching each third attribute field in the vocabulary; compare the third attribute value corresponding to each third attribute field with the second attribute value corresponding to each second attribute field in the document content; When there is a mismatch between the target attribute value and the second attribute value among the third attribute values, the target attribute value is used as the first difference part.
在本公开实施例的一种可能的实现方式中,比对模块2240,用于:从文本内容中提取目标商品的第一营养成分信息,并从文档内容中提取第二营养成分信息;将第一营养成分信息中的各成分信息与第二营养成分信息中对应成分信息进行比对;在第一营养成分信息中存在目标成分信息与第二营养成分信息中对应成分信息不匹配的情况下,将目标成分信息作为第一差异部分。In a possible implementation of the embodiment of the present disclosure, the comparison module 2240 is configured to: extract the first nutritional component information of the target product from the text content, and extract the second nutritional component information from the document content; Each component information in the first nutritional component information is compared with the corresponding component information in the second nutritional component information; when there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, The target component information is used as the first difference part.
在本公开实施例的一种可能的实现方式中,文本内容中包括目标商品的第一营养成分信息,该基于RPA和AI的商品信息处理装置2200,还可以包括:In a possible implementation of the embodiment of the present disclosure, the text content includes the first nutritional ingredient information of the target product. The product information processing device 2200 based on RPA and AI may also include:
第一处理模块,用于从文本内容中提取第一营养成分信息;针对第一营养成分信息中任一成分信息,获取与任一成分信息匹配的正则表达式;将正则表达式与任一成分信息进行匹配;若不匹配,则基于正则表达式,对任一成分信息进行替换处理。The first processing module is used to extract the first nutritional component information from the text content; for any component information in the first nutritional component information, obtain a regular expression that matches any component information; combine the regular expression with any component information The information is matched; if there is no match, any component information is replaced based on the regular expression.
在本公开实施例的一种可能的实现方式中,文本内容中包括目标商品的第一营养成分信息,该基于RPA和AI的商品信息处理装置2200,还可以包括:In a possible implementation of the embodiment of the present disclosure, the text content includes the first nutritional ingredient information of the target product. The product information processing device 2200 based on RPA and AI may also include:
第二处理模块,用于从文本内容中提取第一营养成分信息;针对第一营养成分信息中的任一文本片段,判断任一文本片段的语义是否完整;如果任一文本片段的语义不完整,则从营养成分信息中获取与任一文本片段相邻的邻接文本片段;如果邻接文本片段的语义不完整,则从邻接文本片段中确定语义完整的子片段;提取邻接文本片段中除子片段之外的其他字符,并将其他字符归入任一文本片段,以及将其他字符从邻接文本片段中剔除。The second processing module is used to extract the first nutritional component information from the text content; for any text fragment in the first nutritional component information, determine whether the semantics of any text fragment is complete; if the semantics of any text fragment is incomplete , then obtain the adjacent text segments adjacent to any text segment from the nutritional composition information; if the semantics of the adjacent text segments are incomplete, determine the semantically complete sub-segments from the adjacent text segments; extract the sub-segments from the adjacent text segments other characters, group other characters into any one text segment, and exclude other characters from adjacent text segments.
在本公开实施例的一种可能的实现方式中,第一获取模块2210,用于:获取包含商品包装图的目标文档;从目标文档中提取商品包装图。In a possible implementation of the embodiment of the present disclosure, the first acquisition module 2210 is configured to: acquire a target document containing a product packaging diagram; and extract the product packaging diagram from the target document.
在本公开实施例的一种可能的实现方式中,识别模块2220,用于:响应于截取操作,将商品包装图切分为至少一个子图像;基于OCR技术,对至少一个子图像进行字符识别,以得到文本内容。In a possible implementation of the embodiment of the present disclosure, the recognition module 2220 is configured to: respond to the interception operation, segment the product packaging image into at least one sub-image; and perform character recognition on the at least one sub-image based on OCR technology , to get the text content.
在本公开实施例的一种可能的实现方式中,识别模块2220,用于:基于目标检测算法,从商品包装图中识别并提取至少一个目标区域,其中,目标区域中包括字符信息;基于OCR技术,对至少一个目标区域进行字符识别,以得到文本内容。In a possible implementation of the embodiment of the present disclosure, the identification module 2220 is configured to: identify and extract at least one target area from the product packaging image based on a target detection algorithm, where the target area includes character information; based on OCR Technology that performs character recognition on at least one target area to obtain text content.
在本公开实施例的一种可能的实现方式中,标注模块2250,用于在文本内容中,对第一差异部分的字体和/或字号进行调整;对调整后的第一差异部分进行颜色标注。In a possible implementation of the embodiment of the present disclosure, the annotation module 2250 is used to adjust the font and/or font size of the first difference part in the text content; and color-mark the adjusted first difference part. .
在本公开实施例的一种可能的实现方式中,比对模块2240,还用于:将文档内容和文本内容进行比对,以确定文档内容中不同于文本内容的第二差异部分。In a possible implementation of the embodiment of the present disclosure, the comparison module 2240 is also used to compare the document content and the text content to determine the second difference part in the document content that is different from the text content.
标注模块2250,还用于:在文档内容中对第二差异部分进行异常标注。The annotation module 2250 is also used to annotate the second difference part abnormally in the document content.
该基于RPA和AI的商品信息处理装置2200,还可以包括:The product information processing device 2200 based on RPA and AI may also include:
展示模块,用于展示标注后的文档内容。Display module, used to display the annotated document content.
在本公开实施例的一种可能的实现方式中,该基于RPA和AI的商品信息处理装置2200,还可以包括:In a possible implementation of the embodiment of the present disclosure, the product information processing device 2200 based on RPA and AI may also include:
发送模块,用于发送提示信息,其中,提示信息用于提示对商品包装图中的第一差异部分进行核对和/或修改。The sending module is used to send prompt information, where the prompt information is used to prompt to check and/or modify the first difference part in the product packaging diagram.
和/或,and / or,
生成模块,用于生成并展示核对报告,其中,核对报告中包括文本内容中第一属性字段和第一属性值之间的对应关系、第三属性字段和第三属性值之间的对应关系和目标商品的第一营养成分信息中的至少一项。A generation module for generating and displaying a verification report, wherein the verification report includes a correspondence between the first attribute field and the first attribute value in the text content, a correspondence between the third attribute field and the third attribute value, and At least one item of the first nutritional ingredient information of the target product.
本公开实施例的基于RPA和AI的商品信息处理装置,通过RPA机器人获取目标商品对应的商品包装图,并基于OCR技术,识别商品包装图中的文本内容;获取参考文档,并获取参考文档中的文档内容,其中,文档内容中包括目标商品对应的商品信息;对文本内容和文档内容进行比对,以确定文本内容中不同于文档内容的第一差异部分;在文本内容中对第一差异部分进行异常标注,和/或,在商品包装图中对第一差异部分所处的区域进行异常标注。由此,可以实现通过RPA机器人自动对商品包装图上的商品信息进行核对,一方面,可以降低人工参与量,释放人力资源,降低人力成本,另一方面,可以提高商品信息的核对效率,还可以避免人工核对易出错的情况,提升商品信息核对结果的准确性。The product information processing device based on RPA and AI in the embodiment of the present disclosure obtains the product packaging diagram corresponding to the target product through the RPA robot, and based on OCR technology, identifies the text content in the product packaging diagram; obtains the reference document, and obtains the reference document The document content, wherein the document content includes product information corresponding to the target product; compare the text content and the document content to determine the first difference part in the text content that is different from the document content; compare the first difference in the text content Make an abnormal mark on the part, and/or make an abnormal mark on the area where the first difference part is located in the product packaging diagram. As a result, the RPA robot can be used to automatically check the product information on the product packaging map. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the efficiency of checking product information, and also It can avoid the error-prone situation of manual verification and improve the accuracy of product information verification results.
本公开实施例还提出一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如前述任一方法实施例所述的基于RPA和AI的商品信息处理方法。An embodiment of the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any one of the foregoing methods is implemented. The product information processing method based on RPA and AI described in the example.
本公开实施例还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如前述任一方法实施例所述的基于RPA和AI的商品信息处理方法。Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the product information based on RPA and AI as described in any of the foregoing method embodiments is implemented. Approach.
本公开实施例还提出一种计算机程序产品,当所述计算机程序产品中的指令处理器执行时,实现如前述任一方法实施例所述的基于RPA和AI的商品信息处理方法。An embodiment of the present disclosure also provides a computer program product. When the instruction processor in the computer program product is executed, the product information processing method based on RPA and AI as described in any of the foregoing method embodiments is implemented.
图23示出了适于用来实现本公开实施方式的示例性电子设备的框图。图23显示的电子设备12仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。23 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure. The electronic device 12 shown in FIG. 23 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
如图23所示,电子设备12以通用计算设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括存储器28和处理单元16)的总线18。As shown in Figure 23, electronic device 12 is embodied in the form of a general computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including memory 28 and processing unit 16).
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
电子设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and nonvolatile media, removable and non-removable media.
存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。电子设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图23未显示,通常称为“硬盘驱动器”)。尽管图23中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or cache memory 32. Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 23, commonly referred to as a "hard drive"). Although not shown in FIG. 23, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk") and a removable non-volatile optical disk (e.g., a compact disk read-only memory) may be provided. Disc Read Only Memory (hereinafter referred to as: CD-ROM), Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本公开所描述的实施例中的功能和/或方法。A program/utility 40 having a set of (at least one) program modules 42, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored, for example, in memory 28 , each of these examples or some combination may include the implementation of a network environment. Program modules 42 generally perform functions and/or methods in the embodiments described in this disclosure.
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该电子设备12交互的设备通信,和/或与使得该电子设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,电子设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。 Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 22. Moreover, the electronic device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)) and/or a public network, such as the Internet, through the network adapter 20 ) communication. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18 . It should be understood that, although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
处理单元16通过运行存储在存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的方法。The processing unit 16 executes programs stored in the memory 28 to perform various functional applications and data processing, such as implementing the methods mentioned in the previous embodiments.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描 述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, reference to the terms "one embodiment," "some embodiments," "an example," "specific examples," or "some examples" or the like means that specific features are described in connection with the embodiment or example. , structures, materials, or features are included in at least one embodiment or example of the present disclosure. In this specification, the schematic expressions of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine different embodiments or examples and features of different embodiments or examples described in this specification unless they are inconsistent with each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本公开的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms “first” and “second” are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise expressly and specifically limited.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本公开的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本公开的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments, or portions of code that include one or more executable instructions for implementing customized logical functions or steps of the process. , and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including in a substantially simultaneous manner or in the reverse order, depending on the functionality involved, which shall It should be understood by those skilled in the art to which embodiments of the present disclosure belong.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered a sequenced list of executable instructions for implementing the logical functions, and may be embodied in any computer-readable medium, For use by, or in combination with, instruction execution systems, devices or devices (such as computer-based systems, systems including processors or other systems that can fetch instructions from and execute instructions from the instruction execution system, device or device) or equipment. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections with one or more wires (electronic device), portable computer disk cartridges (magnetic device), random access memory (RAM), Read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, and subsequently edited, interpreted, or otherwise suitable as necessary. process to obtain the program electronically and then store it in computer memory.
应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or combinations thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if it is implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: discrete logic gate circuits with logic functions for implementing data signals; Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps involved in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The program can be stored in a computer-readable storage medium. When executed, one of the steps of the method embodiment or a combination thereof is included.
此外,在本公开各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in various embodiments of the present disclosure may be integrated into one processing module, each unit may exist physically alone, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本公开的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本公开的限制,本领域的普通技术人员在本公开的范围内可以对上述实施例进行变化、修改、替换和变型。The storage media mentioned above can be read-only memory, magnetic disks or optical disks, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above-mentioned embodiments are illustrative and should not be construed as limitations of the present disclosure. Those of ordinary skill in the art can make modifications to the above-mentioned embodiments within the scope of the present disclosure. The embodiments are subject to changes, modifications, substitutions and variations.

Claims (20)

  1. 一种基于机器人流程自动化RPA和人工智能AI的商品信息处理方法,其中,所述方法由RPA机器人执行,包括:A product information processing method based on robotic process automation RPA and artificial intelligence AI, wherein the method is executed by an RPA robot and includes:
    获取目标商品对应的商品包装图,并基于光学字符识别OCR技术,识别所述商品包装图中的文本内容;Obtain the product packaging image corresponding to the target product, and identify the text content in the product packaging image based on optical character recognition OCR technology;
    获取参考文档,并获取所述参考文档中的文档内容,其中,所述文档内容中包括所述目标商品对应的商品信息;Obtain a reference document and obtain document content in the reference document, where the document content includes product information corresponding to the target product;
    对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分;Compare the text content and the document content to determine a first difference part in the text content that is different from the document content;
    在所述文本内容中对所述第一差异部分进行异常标注,和/或,在所述商品包装图中对所述第一差异部分所处的区域进行异常标注。The first difference part is marked abnormally in the text content, and/or the area where the first difference part is located is marked abnormally in the product packaging diagram.
  2. 根据权利要求1所述的方法,其中,所述对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分,包括:The method according to claim 1, wherein the comparing the text content and the document content to determine a first difference part in the text content that is different from the document content includes:
    从所述文本内容中提取各第一属性字段,并从所述文本内容中提取与各所述第一属性字段匹配的第一属性值;Extract each first attribute field from the text content, and extract a first attribute value matching each of the first attribute fields from the text content;
    将各所述第一属性字段和各所述第一属性字段对应的第一属性值,与所述文档内容中的各第二属性字段和各所述第二属性字段对应的第二属性值进行比对;Compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content. Comparison;
    在各所述第一属性字段中存在第一目标属性字段与所述第二属性字段不匹配的情况下,将所述第一目标属性字段和/或所述第一目标属性字段对应的第一属性值,作为所述第一差异部分;If there is a mismatch between the first target attribute field and the second attribute field in each of the first attribute fields, the first target attribute field and/or the first target attribute field corresponding to the first target attribute field are Attribute value, as the first difference part;
    在各所述第一属性字段中存在第二目标属性字段与所述第二属性字段匹配,但所述第二目标属性字段对应的第一属性值与所述第二属性字段对应的第二属性值不匹配的情况下,将所述第二目标属性字段对应的第一属性值,作为所述第一差异部分。In each of the first attribute fields, there is a second target attribute field that matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute corresponding to the second attribute field. If the values do not match, the first attribute value corresponding to the second target attribute field is used as the first difference part.
  3. 根据权利要求2所述的方法,其中,所述方法还包括:The method of claim 2, further comprising:
    获取设定词表,其中,所述设定词表中包括至少一个第三属性字段;Obtain a setting vocabulary, wherein the setting vocabulary includes at least one third attribute field;
    从所述文本内容中提取与所述设定词表中各所述第三属性字段匹配的第三属性值;Extract third attribute values matching each of the third attribute fields in the set vocabulary from the text content;
    将各所述第三属性字段对应的第三属性值,与所述文档内容中的各所述第二属性字段对应的第二属性值进行比对;Compare the third attribute value corresponding to each of the third attribute fields with the second attribute value corresponding to each of the second attribute fields in the document content;
    在各所述第三属性值中存在目标属性值与所述第二属性值不匹配的情况下,将所述目标属性值,作为所述第一差异部分。If there is a mismatch between the target attribute value and the second attribute value in each of the third attribute values, the target attribute value is used as the first difference part.
  4. 根据权利要求1所述的方法,其中,所述对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分,包括:The method according to claim 1, wherein the comparing the text content and the document content to determine a first difference part in the text content that is different from the document content includes:
    从所述文本内容中提取所述目标商品的第一营养成分信息,并从所述文档内容中提取第二营养成分信息;Extract the first nutritional component information of the target commodity from the text content, and extract the second nutritional component information from the document content;
    将所述第一营养成分信息中的各成分信息与所述第二营养成分信息中对应成分信息进行比对;Compare each component information in the first nutritional component information with the corresponding component information in the second nutritional component information;
    在第一营养成分信息中存在目标成分信息与所述第二营养成分信息中对应成分信息不匹配的情况下,将所述目标成分信息作为所述第一差异部分。When there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, the target component information is used as the first difference part.
  5. 根据权利要求1至4中任一项所述的方法,其中,所述文本内容中包括所述目标商品的第一营养成分信息,所述基于光学字符识别OCR技术,识别所述商品包装图中的文本内容之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein the text content includes the first nutritional ingredient information of the target commodity, and the optical character recognition (OCR) technology is used to identify the information in the packaging image of the commodity. After the text content, the method also includes:
    从所述文本内容中提取所述第一营养成分信息;Extract the first nutritional ingredient information from the text content;
    针对所述第一营养成分信息中任一成分信息,获取与所述任一成分信息匹配的正则表达式;For any component information in the first nutritional component information, obtain a regular expression matching the any component information;
    将所述正则表达式与所述任一成分信息进行匹配;Match the regular expression with any of the component information;
    若不匹配,则基于所述正则表达式,对所述任一成分信息进行替换处理。If there is no match, any component information is replaced based on the regular expression.
  6. 根据权利要求1至5中任一项所述的方法,其中,所述文本内容中包括所述目标商品的第一营养成分信息,所述基于光学字符识别OCR技术,识别所述商品包装图中的文本内容之后,所述方法还包括:The method according to any one of claims 1 to 5, wherein the text content includes the first nutritional ingredient information of the target commodity, and the optical character recognition (OCR) technology is used to identify the information in the packaging image of the commodity. After the text content, the method also includes:
    从所述文本内容中提取所述第一营养成分信息;Extract the first nutritional ingredient information from the text content;
    针对所述第一营养成分信息中的任一文本片段,判断所述任一文本片段的语义是否完整;For any text fragment in the first nutritional ingredient information, determine whether the semantics of any text fragment is complete;
    如果所述任一文本片段的语义不完整,则从所述营养成分信息中获取与所述任一文本片段相邻的邻接文本片段;If the semantics of any text fragment is incomplete, then obtain adjacent text fragments adjacent to any text fragment from the nutritional composition information;
    如果所述邻接文本片段的语义不完整,则从所述邻接文本片段中确定语义完整的子片段;If the adjacent text segment is semantically incomplete, determining a semantically complete sub-segment from the adjacent text segment;
    提取所述邻接文本片段中除所述子片段之外的其他字符,并将所述其他字符归入所述任一文本片段,以及将所述其他字符从所述邻接文本片段中剔除。Extract other characters in the adjacent text segment except the sub-segment, classify the other characters into any text segment, and eliminate the other characters from the adjacent text segment.
  7. 根据权利要求1-6中任一项所述的方法,其中,所述获取目标商品对应的商品包装图,包括:The method according to any one of claims 1-6, wherein said obtaining the product packaging diagram corresponding to the target product includes:
    获取包含所述商品包装图的目标文档;Obtain the target document containing the product packaging diagram;
    从所述目标文档中提取所述商品包装图。Extract the product packaging image from the target document.
  8. 根据权利要求1-7中任一项所述的方法,其中,所述基于光学字符识别OCR技术,识别所述商品包装图中的文本内容,包括:The method according to any one of claims 1 to 7, wherein the identifying the text content in the product packaging image based on optical character recognition (OCR) technology includes:
    响应于截取操作,将所述商品包装图切分为至少一个子图像;In response to the interception operation, segment the product packaging image into at least one sub-image;
    基于所述OCR技术,对所述至少一个子图像进行字符识别,以得到所述文本内容。Based on the OCR technology, character recognition is performed on the at least one sub-image to obtain the text content.
  9. 根据权利要求1-7中任一项所述的方法,其中,所述基于光学字符识别OCR技术,识别所述商品包装图中的文本内容,包括:The method according to any one of claims 1 to 7, wherein the identifying the text content in the product packaging image based on optical character recognition (OCR) technology includes:
    基于目标检测算法,从所述商品包装图中识别并提取至少一个目标区域,其中,所述目标区域中包括字符信息;Based on a target detection algorithm, identify and extract at least one target area from the product packaging image, wherein the target area includes character information;
    基于所述OCR技术,对所述至少一个目标区域进行字符识别,以得到所述文本内容。Based on the OCR technology, character recognition is performed on the at least one target area to obtain the text content.
  10. 根据权利要求1-9中任一项所述的方法,其中,所述在所述文本内容中对所述第一差异部分进行异常标注,包括:The method according to any one of claims 1-9, wherein the abnormal annotation of the first difference part in the text content includes:
    在所述文本内容中,对所述第一差异部分的字体和/或字号进行调整;In the text content, adjust the font and/or font size of the first difference part;
    对调整后的所述第一差异部分进行颜色标注。Color-mark the adjusted first difference part.
  11. 根据权利要求1-10中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-10, wherein the method further includes:
    将所述文档内容和所述文本内容进行比对,以确定所述文档内容中不同于所述文本内容的第二差异部分;Compare the document content and the text content to determine a second difference part in the document content that is different from the text content;
    在所述文档内容中对所述第二差异部分进行异常标注;Mark the second difference part abnormally in the document content;
    展示标注后的所述文档内容。Display the annotated document content.
  12. 根据权利要求1-11中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-11, wherein the method further includes:
    发送提示信息,其中,所述提示信息用于提示对所述商品包装图中的所述第一差异部分进行核对和/或修改;Send prompt information, wherein the prompt information is used to prompt to check and/or modify the first difference part in the product packaging diagram;
    和/或,and / or,
    生成并展示核对报告,其中,所述核对报告中包括所述文本内容中第一属性字段和第一属性值之间的对应关系、第三属性字段和第三属性值之间的对应关系和所述目标商品的第一营养成分信息中的至少一项。Generate and display a verification report, wherein the verification report includes the corresponding relationship between the first attribute field and the first attribute value in the text content, the corresponding relationship between the third attribute field and the third attribute value, and the corresponding relationship between the third attribute field and the third attribute value. At least one item of the first nutritional ingredient information of the target product.
  13. 一种基于机器人流程自动化RPA和人工智能AI的商品信息处理装置,其中,应用于RPA机器人,包括:A product information processing device based on robotic process automation RPA and artificial intelligence AI, which is applied to RPA robots and includes:
    第一获取模块,用于获取目标商品对应的商品包装图;The first acquisition module is used to obtain the product packaging diagram corresponding to the target product;
    识别模块,用于基于光学字符识别OCR技术,识别所述商品包装图中的文本内容;A recognition module, used to identify the text content in the product packaging image based on optical character recognition OCR technology;
    第二获取模块,用于获取参考文档,并获取所述参考文档中的文档内容,其中,所述文档内容中包括所述目标商品对应的商品信息;The second acquisition module is used to obtain a reference document and obtain the document content in the reference document, where the document content includes product information corresponding to the target product;
    比对模块,用于对所述文本内容和所述文档内容进行比对,以确定所述文本内容中不同于所述文档内容的第一差异部分;A comparison module, configured to compare the text content and the document content to determine the first difference part in the text content that is different from the document content;
    标注模块,在所述文本内容中对所述第一差异部分进行异常标注,和/或,在所述商品包装图中对所述第一差异部分所处的区域进行异常标注。A marking module is configured to mark the first difference part abnormally in the text content, and/or mark the area where the first difference part is located in the product packaging diagram abnormally.
  14. 根据权利要求13所述的装置,其中,所述比对模块,用于:The device according to claim 13, wherein the comparison module is used for:
    从所述文本内容中提取各第一属性字段,并从所述文本内容中提取与各所述第一属性字段匹配的第 一属性值;Extract each first attribute field from the text content, and extract a first attribute value matching each of the first attribute fields from the text content;
    将各所述第一属性字段和各所述第一属性字段对应的第一属性值,与所述文档内容中的各第二属性字段和各所述第二属性字段对应的第二属性值进行比对;Compare each first attribute field and the first attribute value corresponding to each first attribute field with each second attribute field and the second attribute value corresponding to each second attribute field in the document content. Comparison;
    在各所述第一属性字段中存在第一目标属性字段与所述第二属性字段不匹配的情况下,将所述第一目标属性字段和/或所述第一目标属性字段对应的第一属性值,作为所述第一差异部分;If there is a mismatch between the first target attribute field and the second attribute field in each of the first attribute fields, the first target attribute field and/or the first target attribute field corresponding to the first target attribute field are Attribute value, as the first difference part;
    在各所述第一属性字段中存在第二目标属性字段与所述第二属性字段匹配,但所述第二目标属性字段对应的第一属性值与所述第二属性字段对应的第二属性值不匹配的情况下,将所述第二目标属性字段对应的第一属性值,作为所述第一差异部分。In each of the first attribute fields, there is a second target attribute field that matches the second attribute field, but the first attribute value corresponding to the second target attribute field does not match the second attribute corresponding to the second attribute field. If the values do not match, the first attribute value corresponding to the second target attribute field is used as the first difference part.
  15. 根据权利要求14所述的装置,其中,所述比对模块,还用于:The device according to claim 14, wherein the comparison module is also used for:
    获取设定词表,其中,所述设定词表中包括至少一个第三属性字段;Obtain a setting vocabulary, wherein the setting vocabulary includes at least one third attribute field;
    从所述文本内容中提取与所述设定词表中各所述第三属性字段匹配的第三属性值;Extract third attribute values matching each of the third attribute fields in the set vocabulary from the text content;
    将各所述第三属性字段对应的第三属性值,与所述文档内容中的各所述第二属性字段对应的第二属性值进行比对;Compare the third attribute value corresponding to each of the third attribute fields with the second attribute value corresponding to each of the second attribute fields in the document content;
    在各所述第三属性值中存在目标属性值与所述第二属性值不匹配的情况下,将所述目标属性值,作为所述第一差异部分。If there is a mismatch between the target attribute value and the second attribute value in each of the third attribute values, the target attribute value is used as the first difference part.
  16. 根据权利要求13所述的装置,其中,所述比对模块,用于:The device according to claim 13, wherein the comparison module is used for:
    从所述文本内容中提取所述目标商品的第一营养成分信息,并从所述文档内容中提取第二营养成分信息;Extract the first nutritional component information of the target commodity from the text content, and extract the second nutritional component information from the document content;
    将所述第一营养成分信息中的各成分信息与所述第二营养成分信息中对应成分信息进行比对;Compare each component information in the first nutritional component information with the corresponding component information in the second nutritional component information;
    在第一营养成分信息中存在目标成分信息与所述第二营养成分信息中对应成分信息不匹配的情况下,将所述目标成分信息作为所述第一差异部分。When there is a mismatch between the target component information in the first nutritional component information and the corresponding component information in the second nutritional component information, the target component information is used as the first difference part.
  17. 根据权利要求13至16中任一项所述的装置,其中,所述文本内容中包括所述目标商品的第一营养成分信息,所述装置还包括:The device according to any one of claims 13 to 16, wherein the text content includes the first nutritional ingredient information of the target commodity, and the device further includes:
    第一处理模块,用于从所述文本内容中提取所述第一营养成分信息;针对所述第一营养成分信息中任一成分信息,获取与所述任一成分信息匹配的正则表达式;将所述正则表达式与所述任一成分信息进行匹配;若不匹配,则基于所述正则表达式,对所述任一成分信息进行替换处理。A first processing module, configured to extract the first nutritional component information from the text content; for any component information in the first nutritional component information, obtain a regular expression matching the any component information; The regular expression is matched with the any component information; if there is no match, the any component information is replaced based on the regular expression.
  18. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-12中任一项所述的方法。An electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the implementation as described in any one of claims 1-12 is achieved. Methods.
  19. 一种非临时性计算机可读存储介质,其上存储有计算机程序,其中,该计算机程序被处理器执行时实现如权利要求1-12中任一项所述的方法。A non-transitory computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the method according to any one of claims 1-12 is implemented.
  20. 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-12中任一项所述的方法。A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-12.
PCT/CN2022/091293 2022-03-31 2022-05-06 Product information processing method and apparatus based on rpa and ai, and device and medium WO2023184644A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210332711.3 2022-03-31
CN202210332711.3A CN114495127A (en) 2022-03-31 2022-03-31 Commodity information processing method, apparatus, device and medium based on RPA and AI

Publications (1)

Publication Number Publication Date
WO2023184644A1 true WO2023184644A1 (en) 2023-10-05

Family

ID=81488753

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091293 WO2023184644A1 (en) 2022-03-31 2022-05-06 Product information processing method and apparatus based on rpa and ai, and device and medium

Country Status (2)

Country Link
CN (1) CN114495127A (en)
WO (1) WO2023184644A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021119A (en) * 2016-08-03 2016-10-12 网易(杭州)网络有限公司 Configuration file calibration method and device
US9792524B1 (en) * 2015-07-22 2017-10-17 Amazon Technologies, Inc. Gap shifting for automatic recognition of tabular text
CN112966681A (en) * 2021-04-12 2021-06-15 深圳市秦丝科技有限公司 Method, equipment and storage medium for intelligent identification filing retrieval of commodity photographing
US20220058385A1 (en) * 2020-08-20 2022-02-24 Pepsico, Inc. Product labeling review

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424201A (en) * 2013-08-21 2015-03-18 富士通株式会社 Method and device for providing food safety information
CN104866849A (en) * 2015-04-30 2015-08-26 天津大学 Food nutrition label identification method based on mobile terminal
CN111881664A (en) * 2020-06-30 2020-11-03 北京来也网络科技有限公司 Information extraction method, device, equipment and medium combining RPA and AI
CN112381087A (en) * 2020-08-26 2021-02-19 北京来也网络科技有限公司 Image recognition method, apparatus, computer device and medium combining RPA and AI
CN113723270A (en) * 2021-08-25 2021-11-30 北京来也网络科技有限公司 File processing method and device based on RPA and AI
CN113836091A (en) * 2021-09-01 2021-12-24 北京来也网络科技有限公司 Data identification method and device combining RPA and AI, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9792524B1 (en) * 2015-07-22 2017-10-17 Amazon Technologies, Inc. Gap shifting for automatic recognition of tabular text
CN106021119A (en) * 2016-08-03 2016-10-12 网易(杭州)网络有限公司 Configuration file calibration method and device
US20220058385A1 (en) * 2020-08-20 2022-02-24 Pepsico, Inc. Product labeling review
CN112966681A (en) * 2021-04-12 2021-06-15 深圳市秦丝科技有限公司 Method, equipment and storage medium for intelligent identification filing retrieval of commodity photographing

Also Published As

Publication number Publication date
CN114495127A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
US20160203209A1 (en) Joint approach to feature and document labeling
US20230004604A1 (en) Ai-augmented auditing platform including techniques for automated document processing
US11720649B2 (en) System and method for classification of data in a machine learning system
CN111242083B (en) Text processing method, device, equipment and medium based on artificial intelligence
CN103632388A (en) Semantic annotation method, device and client for image
CN111144079B (en) Method and device for intelligently acquiring learning resources, printer and storage medium
US20220230013A1 (en) Neural network architecture for extracting information from documents
CN112530597A (en) Data table classification method, device and medium based on Bert character model
WO2022105237A1 (en) Information extraction method and apparatus for text with layout
WO2023184644A1 (en) Product information processing method and apparatus based on rpa and ai, and device and medium
CN109598712A (en) Quality determining method, device, server and the storage medium of plastic foam cutlery box
JP2018063600A (en) Information processing device, information processing method, and program
CN114331316A (en) AI and RPA-based order information entry method, device, equipment and medium
WO2024055864A1 (en) Training method and apparatus for implementing ia classification model using rpa and ai
CN109271998A (en) Character identifying method, device, equipment and storage medium
CN112084103B (en) Interface test method, device, equipment and medium
WO2023159771A1 (en) Rpa and ai-based invoice processing method and apparatus, device, and medium
CN116127087A (en) Knowledge graph construction method and device, electronic equipment and storage medium
TWI793432B (en) Document management method and system for engineering project
US11468232B1 (en) Detecting machine text
KR20220058257A (en) Method and apparatus for checking dataset to learn extraction model for metadata of thesis
Wang et al. CharXiv: Charting Gaps in Realistic Chart Understanding in Multimodal LLMs
WO2024055862A1 (en) Document review method and apparatus for implementing ia by combining rpa and ai, and electronic device
US20240135740A1 (en) System to extract checkbox symbol and checkbox option pertaining to checkbox question from a document
WO2023168964A1 (en) Data segmentation method and related apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22934470

Country of ref document: EP

Kind code of ref document: A1