Patent Description:
The disclosure herein generally relates to cognitive retail solutions, and, more particularly, to method and system for generation of descriptive copy of grocery products.

E-commerce industry is currently expanding rapidly, worldwide. Along with its rapid expansion, it has seen many improvisations over the years. The improvisations include (a) making of the e-commerce website or user interface (UI) more attractive for user friendly, (b) making all products available to making each and everything available on customer's doorstep via humans or machines. There are endless technological advances made in this area which have led to its rapid growth and expansion. Product description generation has been in development for some time. A lot of researchers are putting in efforts to make an algorithm capable of generating product copies or descriptions for various retail products like apparel, footwear, accessories etc..

The popular traditional approaches of copy writing include involvement of a human copywriter. The human copywriter must know every detail of a product to write a copy. Also, he or she needs to refer to some retailer specific guides, product ingredients, etc. to come up with some product specific description. Further, he/she needs to take care of grammatical errors and spellings while writing each copy which increases manual efforts, time, and cost. The process of generating product copy for grocery items, which is very challenging as all food items, do not have features in common, unlike fashion products.

Embodiments of the present disclosure present technological improvements as solutions to one or more of the above-mentioned technical problems recognized by the inventors in conventional systems. For example, in one embodiment, a processor implemented method of generation of descriptive copy of grocery products is provided. The processor implemented method includes at least one of: receiving, via one or more hardware processors, data associated with one or more grocery products as an input; processing, via the one or more hardware processors, the data to obtain one or more sorted similar grocery products; extracting, via the one or more hardware processors, (a) one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) an allergen information associated with the one or more sorted similar grocery products; creating, via the one or more hardware processors, a vocabulary model based on (a) the one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) the allergen information associated with the one or more sorted similar grocery products; assigning, via the one or more hardware processors, one or more weights to a training data; validating, via the one or more hardware processors, the vocabulary model based on the one or more assigned weights on the training data to obtain an accurate match of a content of the vocabulary model; and generating, via the one or more hardware processors, one or more descriptive copies associated with the grocery product by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input. The one or more sorted similar grocery products is sorted based on one or more attributes.

In an embodiment, the data associated with the one or more grocery products corresponds to (a) a product title, (b) a product description, and (c) an additional text information. In an embodiment, the additional text information associated with the one or more grocery products corresponds to description on an image of the one or more grocery products. In an embodiment, the one or more attributes corresponds to (a) a color, (b) ingredients, (c) flavors, and (d) texture of the grocery product. In an embodiment, the one or more relevant attributes is extracted based on one or more relevant terms associated with each of the sorted similar grocery products. In an embodiment, the allergen information associated with the one or more sorted similar grocery products corresponds to (a) sulfites, (b) a color, and (c) food additives. In an embodiment, the vocabulary model is trained by a generative pretrained transformer model (GPT-<NUM>) to obtain the training data based on the data associated with the one or more grocery products.

In another aspect, there is provided a system for generation of descriptive copy of grocery products. The system includes a memory storing instructions; one or more communication interfaces; and one or more hardware processors coupled to the memory via the one or more communication interfaces, wherein the one or more hardware processors are configured by the instructions to: receive, data associated with one or more grocery products as an input; process, the data to obtain one or more sorted similar grocery products; extract, (a) one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) an allergen information associated with the one or more sorted similar grocery products; create, a vocabulary model based on (a) the one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) the allergen information associated with the one or more sorted similar grocery products; assign, one or more weights to a training data; validate, the vocabulary model based on the one or more assigned weights on the training data to obtain an accurate match of a content of the vocabulary model; and generate, one or more descriptive copies associated with the grocery product by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input. The one or more sorted similar grocery products is sorted based on one or more attributes.

In yet another aspect, there are provided one or more non-transitory machine readable information storage mediums comprising one or more instructions which when executed by one or more hardware processors causes at least one of: receiving, data associated with one or more grocery products as an input; processing, the data to obtain one or more sorted similar grocery products; extracting, (a) one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) an allergen information associated with the one or more sorted similar grocery products; creating, a vocabulary model based on (a) the one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) the allergen information associated with the one or more sorted similar grocery products; assigning, one or more weights to a training data; validating, the vocabulary model based on the one or more assigned weights on the training data to obtain an accurate match of a content of the vocabulary model; and generating, one or more descriptive copies associated with the grocery product by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input. The one or more sorted similar grocery products is sorted based on one or more attributes.

There is a need for an autonomous approach to address the product copy writing techniques, and in generating product captions for products in a retail or E-commerce website. Embodiments of the present disclosure provide a system which utilizes a transformer based deep learning model to generate descriptive copy of grocery products. An autonomous approach towards generating a product description of products in each retail or e-commerce website. The product copies correspond to textual information related to the grocery product.

<FIG> illustrates a system <NUM> for generation of the descriptive copy of the grocery products, according to some embodiments of the present disclosure. In an embodiment, the system <NUM> includes one or more processor(s) <NUM>, communication interface device(s) or input/output (I/O) interface(s) <NUM>, and one or more data storage devices or memory <NUM> operatively coupled to the one or more processors <NUM>. The memory <NUM> includes a database. The one or more processor(s) processor <NUM>, the memory <NUM>, and the I/O interface(s) <NUM> may be coupled by a system bus such as a system bus <NUM> or a similar mechanism. The one or more processor(s) <NUM> that are hardware processors can be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the one or more processor(s) <NUM> is configured to fetch and execute computer-readable instructions stored in the memory <NUM>. In an embodiment, the system <NUM> can be implemented in a variety of computing systems, such as laptop computers, notebooks, hand-held devices, workstations, mainframe computers, servers, a network cloud, and the like.

The I/O interface device(s) <NUM> can include a variety of software and hardware interfaces, for example, a web interface, a graphical user interface, and the like. The I/O interface device(s) <NUM> may include a variety of software and hardware interfaces, for example, interfaces for peripheral device(s), such as a keyboard, a mouse, an external memory, a camera device, and a printer. Further, the I/O interface device(s) <NUM> may enable the system <NUM> to communicate with other devices, such as web servers and external databases. The I/O interface device(s) <NUM> can facilitate multiple communications within a wide variety of networks and protocol types, including wired networks, for example, local area network (LAN), cable, etc., and wireless networks, such as Wireless LAN (WLAN), cellular, or satellite. In an embodiment, the I/O interface device(s) <NUM> can include one or more ports for connecting number of devices to one another or to another server.

The memory <NUM> may include any computer-readable medium known in the art including, for example, volatile memory, such as static random-access memory (SRAM) and dynamic random-access memory (DRAM), and/or non-volatile memory, such as read only memory (ROM), erasable programmable ROM, flash memories, hard disks, optical disks, and magnetic tapes. In an embodiment, the memory <NUM> includes a plurality of modules <NUM> and a repository <NUM> for storing data processed, received, and generated by the plurality of modules <NUM>. The plurality of modules <NUM> may include routines, programs, objects, components, data structures, and so on, which perform particular tasks or implement particular abstract data types.

Further, the database stores information pertaining to inputs fed to the system <NUM> and/or outputs generated by the system (e.g., data/output generated at each stage of the data processing) <NUM>, specific to the methodology described herein. More specifically, the database stores information being processed at each step of the proposed methodology.

Additionally, the plurality of modules <NUM> may include programs or coded instructions that supplement applications and functions of the system <NUM>. The repository <NUM>, amongst other things, includes a system database <NUM> and other data <NUM>. The other data <NUM> may include data generated as a result of the execution of one or more modules in the plurality of modules <NUM>. Further, the database stores information pertaining to inputs fed to the system <NUM> and/or outputs generated by the system (e.g., at each stage), specific to the methodology described herein. Herein, the memory for example the memory <NUM> and the computer program code configured to, with the hardware processor for example the processor <NUM>, causes the system <NUM> to perform various functions described herein under.

<FIG> illustrates an exemplary block diagram of the system <NUM> of <FIG>, according to some embodiments of the present disclosure. The system <NUM> may be an example of the system <NUM> (<FIG>). In an example embodiment, the system <NUM> may be embodied in, or is in direct communication with the system, for example the system <NUM> (<FIG>). The system <NUM> includes an attributes-wise grocery product grouping unit <NUM>, a relevant attribute extraction unit <NUM>, an additional textual information extraction unit <NUM>, a vocabulary model creation unit <NUM>, and a product copies generation unit <NUM>. The system <NUM> is configured to receive data associated with one or more grocery products as an input. The data associated with the one or more grocery products corresponds to (a) a product title, (b) a product description, and (c) an additional text information. The additional text information associated with the one or more grocery products corresponds to description on an image of the one or more grocery products. The input data is preprocessed to clean one or more texts. For example, the preprocessing involves removing nulls, lowercasing the text, removing special characters, removing geographical information, etc..

The attributes-wise grocery product grouping unit <NUM> is configured to process the data associated with the one or more grocery products to obtain one or more sorted similar grocery products. The one or more sorted similar grocery products is sorted by implementing a hierarchical clustering technique to group one or more similar grocery products based on one or more attributes. For example: 'breads and buns' are attribute wise similar, in terms of ingredients, texture and at times the way of consumption; and preparation like burger or sandwich. Similarly, some other considerations apart from breads and buns are: 'muffins and cupcakes', 'all whole cakes', 'canned food and processed food', 'all cereals', `curd and yogurt' etc. The hierarchical clustering technique is utilized to segregate larger sets of food items into one or more buckets to arrive at a set of relevant attributes of each.

The relevant attribute extraction unit <NUM> is configured to extract (a) one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) an allergen information associated with the one or more sorted similar grocery products. The allergen information associated with the one or more sorted similar grocery products corresponds to (a) sulfites, (b) a color, and (c) food additives. The one or more relevant attributes is extracted by a semi-supervised algorithm co-extraction and maximization algorithm. One or more relevant terms associated with each of the sorted similar grocery products is extracted. For example: All canned food includes attributes associated with packaging of items, preservatives information, shelf-life information, etc. For example: `Breads and Buns' include common attributes such as baked, oven-fresh, sandwich, burger, brown, milk, white, granary and seeded etc. Some common ingredients such as flour, yeast extract, water, salt, vegetable oil or other oil, fructose corn syrup (<NUM>-<NUM>%), vinegar etc. Additionally, common allergens and additive components like gluten, dough conditioners, sucrose, sugar, monoglycerides, peroxides, iodates etc..

The additional textual information extraction unit <NUM> is configured to extract the additional textual information from the image of with all dimensions of the one or more grocery products by using an optical character recognition (OCR) based algorithm. For example: In an image of a bread item, `Brand A' own honey wheat bread, the pack include some additional information like: `No. <NUM> Selling Bread Brand', 'Low fat bread', `Cholesterol free' and 'Zero-gram Trans Fat'. The details might not be present anywhere in the textual data available. Hence, the image extractions can add more information to the generated descriptions. The OCR technique can pull out image-based attributes/information for a bucketed item.

The vocabulary model creation unit <NUM> is configured to create a vocabulary model based on (a) the one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) the allergen information associated with the one or more sorted similar grocery products. One or more weights are assigned to a training data. The vocabulary model is trained by a generative pretrained transformer model (GPT-<NUM>) to obtain the training data based on the data associated with the one or more grocery products. The GPT-<NUM> is a decoder-based transformer model that summarizes text, writes articles, paragraphs of newspaper or novels, and writes captions for a given item. In an embodiment, <START> and <END> tags are added to each line of the training data to separate each sentence from one another to separate out each product level information from one another. Based on the vocabulary model, understanding 'where to start' and 'where to stop' and processing the information of each grocery product. For example: An entry of the training set would look like "Brand B" Black Tea Bags. A refreshing cup of tea is nearly impossible if not the "Brand B" tea, caffeine free, contains tannin, refreshing beverage.

The one or more weights are randomly assigned to the trained data, as an outcome of probability calculation for an accurate match with the vocabulary model.

In an embodiment, each sequence of words then obtains a probability of occurrence determined by training of the vocabulary model on the training data.

The vocabulary model is validated based on the one or more assigned weights on the training data to obtain an accurate match of the content of the vocabulary model. The product copies generation unit <NUM> is configured to generate one or more descriptive copies associated with the grocery product by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input. In an embodiment, the vocabulary model prompts for an input. The input is a product name or title from a test set that includes similar items, not seen by the algorithm during a training phase. Based on the given input, recalls the training information, and matches the input data with corresponding vocabulary model. The terms or words having a highest probability, or a relevancy forms a part of the generated description along with the recalled training information. With the input, the model generates a suitable caption or description. The vocabulary model aids the algorithm to fetch each word of the generated caption, based on probabilistic calculations around the input words given.

For example: Input Prompt is 'Brand C Brown Bread Loaf. The model recalls all the training information related to 'Brand C', 'brown bread', 'loaf and 'brown bread loaf. Once recalled, retrieves closest vectors from the vocabulary model. The vectors are converted to words by a decoder unit of the vocabulary model. For example: for a given prompt above, the related words that could be pulled out from the vocabulary are: 'Wheat Flour', `Gluten free', 'unsweetened', `yeast extract', `water', `no high', 'fructose', `corn syrup' 'healthy' etc. Using these words, the model frames one or more sensible sentences around the given prompt, such as `Healthy brown bread cut into loaves. Made of wheat flour and is absolutely gluten-free. Its unsweetened and contains no high fructose corn syrup.

<FIG> and <FIG> are exemplary flow diagrams illustrating method <NUM> of generating the descriptive copy of the grocery products, according to an embodiment of the present disclosure. In an embodiment, the system <NUM> comprises one or more data storage devices or the memory <NUM> operatively coupled to the one or more hardware processors <NUM> and is configured to store instructions for execution of steps of the method by the one or more processors <NUM>. The flow diagram depicted is better understood by way of following explanation/description. The steps of the method of the present disclosure will now be explained with reference to the components of the system as depicted in <FIG> and <FIG>.

At step <NUM>, data associated with one or more grocery products is received as an input. The data associated with the one or more grocery products corresponds to (a) a product title, (b) a product description, and (c) the additional text information. The additional text information associated with the one or more grocery products corresponds to description on an image of the one or more grocery products. At step <NUM>, the data associated with the one or more grocery products is processed to obtain one or more sorted similar grocery products. The one or more sorted similar grocery products is sorted based on one or more attributes. The one or more attributes corresponds to (a) a color, (b) ingredients, (c) flavors, and (d) texture of the grocery product. At step <NUM>, (a) one or more relevant attributes associated with each of the sorted similar grocery products is extracted from the one or more sorted similar grocery products, and (b) an allergen information associated with the one or more sorted similar grocery products is extracted. The one or more relevant attributes are extracted based on one or more relevant terms associated with each of the sorted similar grocery products. The allergen information associated with the one or more sorted similar grocery products corresponds to (a) sulfites, (b) a color, and (c) food additives. At step <NUM>, a vocabulary model is created based on (a) the one or more relevant attributes associated with each of the sorted similar grocery products from the one or more sorted similar grocery products, and (b) the allergen information associated with the one or more sorted similar grocery products. At step <NUM>, one or more weights are assigned to a training data. At step <NUM>, the vocabulary model is validated based on the one or more assigned weights on the training data to obtain an accurate match of a content of the vocabulary model. At step <NUM>, one or more descriptive copies associated with the grocery product is generated by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input. At step <NUM>, the vocabulary model is trained by a generative pretrained transformer model (GPT-<NUM>) to obtain the training data based on the data associated with the one or more grocery products.

For example, a study is conducted to generate the descriptive copy or a caption of the grocery products. The algorithm is first trained with product details derived from title, available descriptions, attributes, images etc. The trained model is validated or tested using a similar but different set of items or an unseen data. It is prompted to generate a description with the help of an input.

For example:
Input: 'Brand D' Honey Vanilla Greek Style Yogurt.

Actual Caption: The 'Brand D' Honey Vanilla Greek-Style Yogurt is a combination of our fan favorite honey yogurt with a hint of vanilla to create a sweet, creamy delicacy with a rich taste.

Generated Caption: All Taste No Tang. The days of sour, tangy yogurt are over! For years, we've been mastering the art of yogurt, crafting the 'Brand D' to deliver a deliciously tang-free experience in every spoonful. And the texture? Super silky smooth!.

The embodiment of present disclosure herein addresses unresolved problem of generating product captions for grocery items. The embodiment of the present disclosure provides a transformer based deep learning model approach to generate captions for grocery products. The embodiment of the present disclosure can build a context aware vocabulary model to make a general algorithm aware of the data or the context. Also, combining the process of weight initialization to the model's training data with the context aware model provides an accurate generation of outputs. The vocabulary model enables the algorithm to understand the subject matter and fetch suitable words based on probability for completing each sentence of the generated caption. Initializing weights to the data increases the sharpness or steepness of the inputs during the training phase. The weights assigned to the training data guides the algorithm to pick the important information from the training data. The time spent in writing a copy by a human copy writer, is saved. Reduces research time to an extent i.e., a lot of time spent in understanding the product for writing a good description. The embodiment of the present disclosure can generate multiple captions for a product and the most suitable can be chosen for the product under consideration. The generated captions are as good as human written copies.

Thus, the means can include both hardware means, and software means.

Claim 1:
A processor implemented method (<NUM>), comprising:
receiving, via one or more hardware processors, data associated with a plurality of grocery products as an input (<NUM>);
processing, via the one or more hardware processors, the data to obtain a plurality of sorted similar grocery products, wherein the plurality of sorted similar grocery products is sorted based on a plurality of attributes (<NUM>);
extracting, via the one or more hardware processors, (a) at least one relevant attribute associated with each of the sorted similar grocery products from the plurality of sorted similar grocery products, and (b) an allergen information associated with the plurality of sorted similar grocery products (<NUM>);
creating, via the one or more hardware processors, a vocabulary model based on (a) the at least one relevant attribute associated with each of the sorted similar grocery products from the plurality of sorted similar grocery products, and (b) the allergen information associated with the plurality of sorted similar grocery products (<NUM>);
assigning, via the one or more hardware processors, at least one weight to a training data (<NUM>);
validating, via the one or more hardware processors, the vocabulary model based on the at least one assigned weight on the training data to obtain an accurate match of a content of the vocabulary model (<NUM>); and
generating, via the one or more hardware processors, at least one descriptive copy associated with the grocery product by mapping the validated vocabulary model with the training data based on a prompt received with the data as the input (<NUM>).