Reducing food waste by using a machine learning model

An approach is provided for using a machine learning model to reduce food waste. Estimation models for food items are created by using a machine learning model. The estimation models have prediction functions specifying timelines during which the food items are not spoiled and are in a condition for consumption. Prediction function solutions are generated for a food item inventory to indicate menu items for respective time periods. Each menu item includes food item(s) which are in condition for consumption based on the estimation models. Menu recommendations corresponding to the time periods are generated. Each menu includes menu item(s) indicated by the prediction function solutions. The menu recommendations reduce a waste of the food items through spoilage by increasing a likelihood of consumption of the food items within the respective timelines.

BACKGROUND

The present invention relates to reducing food waste, and more particularly to reducing food waste by using a machine learning model to make food utilization recommendations.

About one-third of the food produced in the world for human consumption every year is lost or wasted. In the United States, food waste is estimated at between 30-40 percent of the food supply. Food may be wasted due to improper storage conditions, remaining on the shelf at a retail grocer for too long, or being disposed of even though the food may still be appropriately used for alternative preparations.

Known food monitoring techniques calculate shelf life of food by monitoring conditions of the food. For example, a chill cabinet storing fruits and vegetables predicts a remaining shelf life of the fruits and vegetables, counts down the time until the end of the shelf life, and generates a locally-presented alarm in response to the remaining shelf life being less than 24 hours, thereby prompting a consumer to use the fruits and vegetables. As another example, a known shelf life warning system is based on modeling microorganism growth.

SUMMARY

In one embodiment, the present invention provides a method of using a machine learning model to reduce food waste. The method includes creating, by one or more processors, estimation models for respective food items by using a machine learning model that receives data from one or more sensors monitoring the food items. The estimation models have respective prediction functions. Each prediction function specifies one or more timelines during which a given food item is not spoiled and is in a condition for consumption using respective one or more methods of preparing the given food item. The method includes generating, by the one or more processors, solutions of the prediction functions for a specified inventory of the food items and specified periods of time. The solutions indicate menu items for respective periods of time. Each menu item includes one or more of the food items which are in the condition for consumption based on the timelines specified by the estimation models. The method further includes generating, by the one or more processors and based on the solutions of the prediction functions and the machine learning model, recommendations of menus corresponding to the specified periods of time. Each menu for a given period of time includes one or more of the menu items indicated by the solutions of the prediction functions. The recommendations of the menus reduce a waste of the food items through spoilage by increasing a likelihood of a consumption of the food items within the respective timelines.

In another embodiment, the present invention provides a computer program product for using a machine learning model to reduce food waste. The computer program product includes a computer readable storage medium having computer readable program code stored on the computer readable storage medium. The computer readable program code is executed by a central processing unit (CPU) of a computer system to cause the computer system to perform a method. The method includes the computer system creating estimation models for respective food items by using a machine learning model that receives data from one or more sensors monitoring the food items. The estimation models have respective prediction functions. Each prediction function specifies one or more timelines during which a given food item is not spoiled and is in a condition for consumption using respective one or more methods of preparing the given food item. The method further includes the computer system generating solutions of the prediction functions for a specified inventory of the food items and specified periods of time. The solutions indicate menu items for respective periods of time. Each menu item includes one or more of the food items which are in the condition for consumption based on the timelines specified by the estimation models. The method further includes based on the solutions of the prediction functions and the machine learning model, the computer system generating recommendations of menus corresponding to the specified periods of time. Each menu for a given period of time includes one or more of the menu items indicated by the solutions of the prediction functions. The recommendations of the menus reduce a waste of the food items through spoilage by increasing a likelihood of a consumption of the food items within the respective timelines.

In another embodiment, the present invention provides a computer system including a central processing unit (CPU); a memory coupled to the CPU; and a computer readable storage device coupled to the CPU. The storage device includes instructions that are executed by the CPU via the memory to implement a method of using a machine learning model to reduce food waste. The method includes the computer system creating estimation models for respective food items by using a machine learning model that receives data from one or more sensors monitoring the food items. The estimation models have respective prediction functions. Each prediction function specifies one or more timelines during which a given food item is not spoiled and is in a condition for consumption using respective one or more methods of preparing the given food item. The method further includes the computer system generating solutions of the prediction functions for a specified inventory of the food items and specified periods of time. The solutions indicate menu items for respective periods of time. Each menu item includes one or more of the food items which are in the condition for consumption based on the timelines specified by the estimation models. The method further includes based on the solutions of the prediction functions and the machine learning model, the computer system generating recommendations of menus corresponding to the specified periods of time. Each menu for a given period of time includes one or more of the menu items indicated by the solutions of the prediction functions. The recommendations of the menus reduce a waste of the food items through spoilage by increasing a likelihood of a consumption of the food items within the respective timelines.

DETAILED DESCRIPTION

Overview

Known food management techniques result in a significant amount of food wasted due to improper storage conditions, remaining on the shelf for sale for too long, or being discarded even though the food may still be usable in an alternative method of preparation. Existing food management solutions focus on a limited number of sensors for determining shelf life of food. The existing solutions rely on locally presented alerts, such as an alarm on a device or an attached screen which is in close proximity to the monitored food. Furthermore, known food management solutions recommend consuming a food item in isolation (i.e., without regard to the food item being used together with other food items in meal preparation). The unique challenges of the known solutions that are described above are addressed by embodiments of the present invention.

Embodiments of the present invention use a machine learning model that implements visual recognition and a classification algorithm to classify states of food items and uses the food item classifications to estimate remaining shelf life of the food items and generate utilization recommendations for the food items. In one embodiment, a deep learning neural network that includes supervised learning receives input data from sensors that monitor the environmental conditions and attributes of food items and applies predictive models to recommend actions that a user can take in the future relative to the food items, so that consumption of the food items is increased, and spoilage of the food items is decreased.

In one embodiment, a utilization recommendation for a given food item includes a recommendation for a restaurant's menu items or for a recipe for preparing a meal that includes using the given food item and is based on an entire inventory consisting of a variety of food items. Based on a given inventory of food items in a restaurant and menu items typically offered by the restaurant, embodiments of the present invention create estimation models that estimate the remaining shelf life of the food items. Using output of the estimation models, embodiments of the present invention generate recommendations of specific menus for specific time periods that increase a likelihood that the food items in the given inventory are consumed by customers of the restaurant, thereby decreasing food waste due to spoilage of some or all of the food items.

In one embodiment, a notification of an impending end of a shelf life of a food item is stored in a cloud server and is accessed via a web browser. Alternatively, the aforementioned notification is sent to a user's application on a mobile device via a short message service (SMS) or a Push notification.

System for Reducing Food Waste Using a Machine Learning Model

FIG. 1is a block diagram of a system100for reducing food waste using a machine learning model, in accordance with embodiments of the present invention. System100includes a computer102, which executes a software-based food utilization recommendation system104, which creates estimation models for food items (not shown) stored in food container106-1, . . . , food container106-N (or another set of food container(s) that are not shown), where N is an integer greater than or equal to one. Each food container includes or is operatively coupled to sensors108. Although sensors108are included in each of the food containers, other embodiments include the same or different sets of sensors in each of the food containers.

In an alternate embodiment, any or all of the food containers in system100may be replaced with devices (not shown) that are embedded in the food items, where the devices include sensors108.

Sensors108detect and measure conditions of an environment of a food item (also known as “environmental conditions” of the food item) and/or attributes of the food item included in a given food container. In one embodiment, sensors108in a given food container (e.g., food container106-1) detect and measure a combination of (1) attributes of a food item: a color of the food item stored in the given food container, a pattern on the surface of the food item, a firmness of the food item, an identification of and an amount of an emission of one or more gases from the food item, a percentage of light reflected from the food item and (2) environmental conditions of the food item: the air temperature inside the given food container, the humidity inside the given food container, and an amount of light to which the given food container or the food item is exposed.

In one embodiment, sensors108transmit the measurements of the environmental conditions and attributes of the food items to a local computer gateway (not shown), which re-transmits the measurements to a cloud server that includes computer102and food utilization recommendation system104. Computer102stores the measurements from sensors108in a data repository (not shown) and food utilization recommendation system104generates estimation models (i.e., predication models) (not shown) based on the measurements and uses the estimation models to estimate remaining shelf life for each of the food items. For a given type of food item stored in one or more of food containers106-1, . . . ,106-N, the given type of food item is associated with a particular estimation model. For a given food container included in food containers106-1, . . . ,106-N, the given food container is associated with a corresponding instance of a particular estimation model that is associated with the type of food item that is stored in the food container.

In one embodiment, food utilization recommendation system104generates an estimation model that uses a machine learning tool that employs visual recognition in a training phase to obtain images (i.e., training images) of a food item at different times and classify consumption states of the food item at the different times based on the appearance of the food item in the images, where each of the consumption states of the food item indicates whether the food item is suitable or unsuitable for consumption. In one embodiment, food utilization recommendation system104employs supervised learning to classify the consumption states by receiving input from human(s) who determine whether the food item is suitable or unsuitable for consumption by visual inspection of the food item, tasting the food item, or by any other means including using additional sensor(s) that are not included in or coupled to the food container.

During the training phase, food utilization recommendation system104also obtains the measurements of the environmental conditions and attributes of the food item from sensors108. The estimation model generated by food utilization recommendation system104uses the classification of the consumption states and the measurements obtained during the training phase as input. After the training phase, for a given food item, the estimation model outputs a current consumption state of the given food item and a remaining amount of time before the food item is unsuitable for consumption (i.e., the remaining shelf life of the food item) based on matching an image of the given food item to one of the training images. For a food item that can be used in more than one food preparation method, the output of the estimation model is in an array that lists the consumption state and remaining shelf life for each of the possible food preparation methods.

After completion of the training phase, food utilization recommendation system104integrates multiple estimations of remaining shelf life for multiple food items into recommendations for menu items on menus to be offered to customers, so that food waste through spoilage is decreased by increasing a likelihood that the food items are consumed by the customers during the remaining shelf lives of the food items. For food items stored in food containers106-1, . . . ,106-N, food utilization recommendation system104receives measurements of the environmental conditions and attributes of the food items from sensors108. Each of the food containers106-1, . . . ,106-N is instrumented with a particular set of sensors108to monitor the environmental conditions and attributes of a specific type of food item. For example, food container A is instrumented for bananas and food container B is instrumented for apples. Food containers106-1, . . . ,106-N may include multiple food containers of a single type. For example, food container A1and food container A2are both instrumented for bananas.

Each food container outputs a set of measurements that is received as input into an estimation model designed for a specific type of food item. For example, Model A receives input from the food container(s) that are instrumented for bananas. A particular instance of an estimation model receives measurements from a particular food container, thereby providing an instance of the estimation model with historical data (i.e., a memory) about the previous states of the food item, which provides a better prediction of remaining shelf life versus a stateless model. For example, Model instance A1receives measurements from food container A1and Model instance A2receives measurements from food container A2, where food containers A1and A2are instrumented for bananas.

To generate a menu item-level recommendation, food utilization recommendation system104receives a list of known menu items110. For example, menu items110may be a list of menu items that were used on menus previously offered by a restaurant that is using food utilization recommendation system104. Food utilization recommendation system104also receives an ingredient inventory112, which includes the names of food items that the restaurant has in its food inventory, the quantities of the food items in the food inventory, and prediction functions solved for different times of interest to the restaurant. The prediction functions are included in the estimation models generated by the food utilization recommendation system104. A prediction function for a food item specifies timeline(s) during which the food item is suitable for consumption by respective food preparation method(s).

Food utilization recommendation system104matches the food items in ingredient inventory112to menu items included in menu items110, where the matching menu items use the food items in ingredient inventory112. Based on the matched menu items and the solutions of the prediction functions, food utilization recommendation system104generates recommended menu(s)114for the different times of interest to the restaurant which increases a likelihood that the food items in the menu items on the recommended menu(s) are consumed during the timelines specified by the prediction functions. Food utilization recommendation system104also generates a menu inventory associated with the recommended menu(s)114, where the menu inventory specifies how many of each menu item on the recommended menu(s)114is available for sale at the restaurant at the times of interest.

In one embodiment, the generation of recommended menu(s)114by food utilization recommendation system104is also based on a prediction of consumption of particular menu items received by computer102from an inventory system116, which generates the prediction based on a taste profile of customers of the restaurant. In one embodiment, inventory system116is included in an enterprise resource planning system.

In response to a customer of the restaurant placing an order for menu item(s) on one of the recommended menu(s)114, food utilization recommendation system104receives a customer order118specifying the order for the menu item(s). In response to the customer's order being fulfilled, food utilization recommendation system104generates an order fulfillment record120. Based on customer orders and order fulfillments, food utilization recommendation system104updates the ingredient inventory currently available to the restaurant and generates a recommendation for reordering ingredients that are below respective threshold amounts. Food utilization recommendation system104sends the recommendation for reordering ingredients to inventory system116.

In one embodiment, in addition to fulfilling the recommended menu, food utilization recommendation system104uses the remaining inventory (i.e., the inventory of food items after the menu inventory is subtracted from the initial ingredient inventory) to create special menu item(s) (e.g., a house special) that had not been included in menu items110. Cognitive menu application programming interface (API)122takes the remaining inventory as input and matches the remaining inventory to one or more recipes in a corpus of known recipes to determine a use of the remaining inventory as special menu item(s) which minimizes a waste of the remaining inventory through spoilage by increasing a likelihood that the remaining inventory is consumed by customers who order and consume the special menu item(s) during the shelf lives of the food items in the remaining inventory. Cognitive menu API122is a system that can generate a recipe given a list of ingredients.

In one embodiment, food utilization recommendation system104is part of a food management system which would generate recommended food preparation methods for available food items for times in the future, taking into account the times when ingredients that are ordered are expected to arrive according to inventory system116. In one embodiment, food utilization recommendation system104calculates ingredients that are currently missing but are needed for recommended menu(s) for times in the future and generates a recommendation to reorder those currently missing ingredients. Food utilization recommendation system104bases the recommendation to reorder in part on the predicted restaurant consumption profile provided by inventory system116and how much of a given dish is expected to sell on a given day.

In one embodiment, food containers106-1, . . . ,106-N are used by a single restaurant. In another embodiment, mutually exclusive sets of food containers included in food containers106-1, . . . ,106-N are used by respective restaurants.

The functionality of the components shown inFIG. 1is described in more detail in the discussion ofFIG. 2,FIG. 3,FIG. 4,FIG. 5, andFIG. 6presented below.

Process for Reducing Food Waste Using a Machine Learning Model

FIG. 2is a flowchart of a process of recommending food utilization to reduce food waste, where the process is implemented in the system ofFIG. 1, in accordance with embodiments of the present invention. The process ofFIG. 2starts at step200. In step202, a machine learning model included in food utilization recommendation system104(seeFIG. 1) receives data from sensors108(seeFIG. 1) monitoring food items. The data from the sensors108(seeFIG. 1) includes measurements of environmental conditions of the food items (e.g., temperature and humidity of the air in a food container that stores a food item and an amount of light to which the food item is exposed) and/or measurements attributes of the food items (e.g., a color of the food item, a pattern on the food item, an amount of firmness of the food item, an amount and an identification of gas(es) emitted from the food item).

In step204, food utilization recommendation system104(seeFIG. 1) creates estimation models for the food items, each food item corresponding to an instance of an estimation model, and each estimation model corresponding to a type of food item. An estimation model includes a prediction function that specifies timeline(s) during which a given food item is not spoiled and is in condition for consumption.

In cases in which a given food item can be used in more than one food preparation method, then the estimation model specifies multiple timelines for the given food item. The timelines specify the times during which the given food item, when prepared using respective food preparation methods, is suitable for consumption and is not spoiled.

In one embodiment, steps202and204collectively include the process ofFIG. 3, which is discussed below.

In step206, food utilization recommendation system104(seeFIG. 1) generates solutions of the prediction functions included in the estimation models associated with the food items. food utilization recommendation system104(seeFIG. 1) generates the solutions of the prediction functions for a specified inventory of food items included in ingredient inventory112(seeFIG. 1) and for specified periods of time. In one embodiment, the specified periods of time are specified as being periods of time during which different menus of a restaurant will be available to customers of the restaurant, where the food utilization recommendation system104(seeFIG. 1) selects the different menus of the restaurant from recommended menu(s)114(seeFIG. 1).

The solutions of the predication functions indicate menu items for the respective periods of time, where the menu items include the food items, which are suitable for consumption based on the timelines of the estimation models, where the timelines include the specified periods of time.

In step208, based on the machine learning model and the solutions generated in step206, food utilization recommendation system104(seeFIG. 1) generates recommended menu(s)114(seeFIG. 1) corresponding to the specified periods of time. Each of the recommended menu(s)114(seeFIG. 1) includes menu item(s) indicated by the solutions generated in step206. The recommended menu(s)114(seeFIG. 1) reduce a waste of the food items through spoilage by increasing a likelihood of a consumption of the food items within the respective timelines by customers of the restaurant who order the food items after viewing the recommended menu(s)114(seeFIG. 1).

The process ofFIG. 2ends at step210.

In one embodiment, food utilization recommendation system104(seeFIG. 1) determines an adjustment has been made to an environment of a food item being stored in food container106-1(seeFIG. 1). The adjustment is a change in one or more of the following environmental conditions: the air temperature within the food container106-1(seeFIG. 1), the humidity within the food container106-1(seeFIG. 1), and an amount of light to which the food item is exposed. Using a classification algorithm, food utilization recommendation system104(seeFIG. 1) determines that the adjustment to the environment of the food item extends the shelf life of the food item and prevents the spoilage of the food item beyond a time at which spoilage of the food item was previously predicted in step206, which is determined by a prediction function in an estimation model without taking into account the adjustment to the environment. The food utilization recommendation system104(seeFIG. 1) generates updated recommended menu(s) based on the extended shelf life of the food item, which is based on the adjustment to the environment of the food item.

In one embodiment, food utilization recommendation system104(seeFIG. 1) determines that one or more food items stored in one or more food containers included in food containers106-1, . . . ,106-N (seeFIG. 1) have a measurement of an attribute that is within a threshold amount of a level of freshness, a level of staleness, a predicted shelf life, and a predicted time of spoilage. The food utilization recommendation system104(seeFIG. 1) determines one or more recipes that use the one or more food items having the measurement of an attribute that is within the threshold amount. The one or more menu items included in the recommended menu(s)114(seeFIG. 1) generated in step208are based on the one or more recipes.

In one embodiment, food utilization recommendation system104(seeFIG. 1) uses a classification algorithm to determine a current state of a food item stored in food container106-1(seeFIG. 1), where the current state has one or more of the following components: storage conditions of the food item, a level of freshness of the food item, a level of staleness of the food item, a predicted shelf life of the food item, and a predicted time of spoilage of the food item. In step208, food utilization recommendation system104(seeFIG. 1) generates the recommended menu(s)114(seeFIG. 1) based on the current state of the food item.

In one embodiment, food utilization recommendation system104(seeFIG. 1) determines a recommended menu in step208that is to be used by an enterprise for a period of time in the future. Food utilization recommendation system104(seeFIG. 1) determines that one or more food items included in one or more menu items of the recommended menu are not in a current inventory of food items that are available to the enterprise. Based on a consumption profile for the enterprise, the food utilization recommendation system104(seeFIG. 1) determines an amount of the one or more menu items that are to be prepared in the period of time in the future. The food utilization recommendation system104(seeFIG. 1) orders the one or more food items so that the one or more food items are included in an updated inventory of food items that are available to the enterprise prior to and during the period of time in the future. The food utilization recommendation system104(seeFIG. 1) orders the one or more food items in a quantity that is sufficient to prepare the amount of the one or more menu items that are to be prepared in the period of time in the future.

Creating an Estimation Model

FIG. 3is a flowchart of one embodiment of a process of creating an estimation model for a food item, where the creation of the estimation model is included steps202and204in the process ofFIG. 2, in accordance with embodiments of the present invention. The process ofFIG. 3starts at step300. In step302, food utilization recommendation system104(seeFIG. 1) receives a user-provided selection of a food item for which a remaining shelf life is to be estimated.

In step304, food utilization recommendation system104(seeFIG. 1) receives a definition of the measurement(s) to be captured by sensors108(seeFIG. 1) and analyzed by the machine learning model included in food utilization recommendation system104(seeFIG. 1).

In step306, food utilization recommendation system104(seeFIG. 1) receives a selection of a food container from food containers106-1, . . . ,106-N (seeFIG. 1) for storing the selected food item. Sensors108(seeFIG. 1) in the selected food container are configured to monitor the environmental conditions and/or attributes of the selected food item, which capture the measurement(s) whose definition is received in step304. Alternatively, a user selects a measurement device to be embedded into the selected food item, where the device includes sensors108.

In step308, after the selected food item is placed in the selected food container or has the measurement device embedded, sensors108(seeFIG. 1) capture the measurement(s) of the environmental conditions and/or attributes of the selected food item and send the measurement(s) to a local computer gateway.

In step310, the local computer gateway transmits the captured measurement(s) to food utilization recommendation system104(seeFIG. 1), which is executed in a cloud server.

In step312, food utilization recommendation system104(seeFIG. 1) stores the measurement(s) in a data repository and creates an estimation model that includes a prediction function that estimates the remaining shelf life of the selected food item. The estimated remaining shelf life of the selected food item is based on the measurement(s).

After step312, the process ofFIG. 3ends at step314.

As an example of the process ofFIG. 3, step302includes receiving a selection of a banana bunch as the food item for which a remaining shelf life is to be estimated. Human-derived research provides a hypothesis that the banana's appearance (i.e., color and patterns on the surface of the banana) is a factor in determining whether the banana is suitable for consumption, and that storage conditions including air temperature and humidity in the food container and the amount of light to which the banana is exposed are the main factors to be included in the prediction function. Definitions of the measurements that indicate the banana's appearance and storage condition are received in step304. A machine learning tool such as a visual recognition service included in food utilization recommendation system104(seeFIG. 1) captures the measurements in a training phase in step308to classify the state of the banana bunch based on appearance. For example, ten discrete states of appearance may be defined (e.g., from green to brown/black). Images of bananas in different states of appearance are studied by one or more humans and the images are manually classified into respective states included in the ten discrete states. The human(s) also determine which states of appearance indicate that the banana is suitable for consumption and which other states of appearance indicate that the banana is unsuitable for consumption. This manual classification provides a baseline for the machine learning tool. After the baseline is provided, a new image of a banana is input into the machine learning tool, which classifies the banana into one of the ten states. The particular classification of the banana indicates whether the banana is suitable or unsuitable for consumption.

Furthermore, image classification provides inputs to the estimation model and prediction function of the banana. Measurements of environmental conditions, including air temperature, humidity and amount of light to which the banana is exposed, are additional inputs to the estimation model of the banana, so that an effect of each of the environmental conditions can be proved or disproved. The image classification and environmental conditions measurements are input to a deep learning neural network included in food utilization recommendation system104(seeFIG. 1). Supervised learning is included in the analysis of the measurements and image classification because a human is needed to rate whether the banana is suitable or unsuitable for consumption.

To facilitate the accuracy of the results of the estimation model of the banana, the data set must be large enough and contain data diversity (e.g., data from bananas stored at different temperatures, different levels of humidity, etc.), so that training data is in a range of expected operational data.

In one embodiment, the output of the estimation model created in step312is a model file, such as CORE ML, or a similar format, where the file is instantiated to receive data from a given storage container that stores the banana bunch. For additional banana storage containers, additional respective estimation model instances are necessary so that the estimation model can retain the history of a given storage container.

The estimation model created in step312for the selected food item outputs the current consumption state of the selected food item, as well as the amount of time in the remaining shelf life of the selected food item. Again, in one embodiment, the output of the estimation model is an array that associates different food preparation methods applied to the selected food item and whether the selected food item is suitable or unsuitable for consumption. For example, even though a banana may be too ripe for eating it raw, the banana may be used in a smoothie with not noticeable change in flavor.

The process ofFIG. 3is repeated for other food items whose remaining shelf lives are of interest, so that in the remaining steps in the process ofFIG. 2, food utilization recommendation system104(seeFIG. 1) uses multiple estimation models, where one estimation model corresponds to one type of food item.

EXAMPLES

FIG. 4is an example400of generating prediction functions in estimation models used in the process ofFIG. 2, in accordance with embodiments of the present invention. A plurality of food containers402include sensors that output measurements404of environmental conditions and/or attributes of food items stored in food containers402. Measurements404are input to estimation model instances406, which include prediction functions408.

Food containers402include a first set of food containers410, . . . ,412(i.e., food containers A1, . . . , An1, which are of a first type of container), a second set of food containers414, . . . ,416(i.e., food containers B1, . . . , Bn2, which are of a second type of container), . . . , food container418(i.e., food container mn), etc., where each food container of one type of container is instrumented with sensors for collecting measurements of environmental conditions and/or attributes of a specific type of food item. For example, food containers A1, . . . , An1are instrumented for bananas and food containers B1, . . . , Bn2are instrumented for apples. There may be one or more food containers of each type (i.e., n1, n2, etc. are integers greater than or equal to one).

For example, measurements404include measurements x1, . . . , xkbeing collected by sensors in food container A1, where k is an integer and k≥1. The number of measurements for a particular type of food container matches the number of sensors in the food container. The number sensors may vary between different types of food containers, so the number of measurements in measurements404provided by sensors in food container A1(i.e., k measurements) may be the same or different from the number of measurements in measurements404provided by sensors in food container B1.

A given food container outputs a set of measurements that becomes input to an estimation model designed for the specific type of food item being stored in the given food container. Instances of a food container provide respective sets of measurements to respective estimation model instances, so that each estimation model instance has historical data (i.e., a memory) about the previous state of the food item associated with the estimation model instance. Having knowledge of the historical data provides a more accurate prediction of remaining shelf life as compared to a stateless model.

For example, food container A1provides measurements x1, . . . , xkas input to an estimation model instance420(i.e., Model A Instance1) and food container An1provides measurements as input to an estimation model instance422, where estimation model instances420and422are both of type “Model A,” which is the type of model designed to analyze bananas.

Similarly, food container B1provides measurements as input to an estimation model instance424, food container Bn2provides measurements as input to an estimation model instance426, and food container mn provides measurements as input to an estimation model instance428.

Each estimation model instance has a prediction function that specifies one or more timelines during which the associated food item is suitable for consumption given that the food item is prepared using respective one or more food preparation methods. Solutions of the prediction functions are generated in step206(seeFIG. 2). For example, estimation model instance420includes prediction function430, where XA1includes the measurements x1, . . . , xk. As another example, estimation model instance428includes prediction function432.

FIG. 5is an example of a table500of an ingredient inventory, prediction functions, and recommended menu items used in the process ofFIG. 2, in accordance with embodiments of the present invention. For multiple food items in a food item inventory, table500includes names502of the food items, quantities504of the food items that are available for consumption, prediction functions506that specify timelines during which the food items are suitable for consumption. First solutions508of respective prediction functions for a first time (i.e., time t0) indicate respective recommended menu items that include the respective food items. For example, rec1, . . . , recrin the first data row in the first solutions508column are recommendations of menu items that include food item A1. Similarly, second solutions510of respective prediction functions for a second time (i.e., time t1) indicate respective recommended menu items that include the respective food items and third solutions512of respective prediction functions for a third time (i.e., time t2) indicate respective recommended menu items that include the respective food items. Although table500represents the menu item recommendations in solutions508,510, and512as the identical set of “rec1, . . . , recr,” each set of menu item recommendations in table500does not necessarily consist of the same recommendations. The menu item recommendations in given sets of menu item recommendations in table500may be the same recommendations, all different recommendations, or a combination of recommendation(s) that are the same and other recommendation(s) that are different. Further, the number of menu item recommendations in given sets of menu item recommendations in table500may be the same number or different numbers of recommendations. These solutions of the prediction functions are the basis for the recommended menu(s)114(seeFIG. 1) generated in step208(seeFIG. 2).

Computer System

FIG. 6is a block diagram of a computer102included in system100ofFIG. 1and that implements the process ofFIG. 2, in accordance with embodiments of the present invention. Computer102is a computer system that generally includes a central processing unit (CPU)602, a memory604, an input/output (I/O) interface606, and a bus608. Further, computer102is coupled to I/O devices610and a computer data storage unit612. CPU602performs computation and control functions of computer102, including executing instructions included in program code614for a system that includes food utilization recommendation system104(seeFIG. 1) to perform a method of reducing food waste by using a machine learning model, where the instructions are executed by CPU602via memory604. CPU602may include a single processing unit or be distributed across one or more processing units in one or more locations (e.g., on a client and server).

Memory604includes a known computer readable storage medium, which is described below. In one embodiment, cache memory elements of memory604provide temporary storage of at least some program code (e.g., program code614) in order to reduce the number of times code must be retrieved from bulk storage while instructions of the program code are executed. Moreover, similar to CPU602, memory604may reside at a single physical location, including one or more types of data storage, or be distributed across a plurality of physical systems in various forms. Further, memory604can include data distributed across, for example, a local area network (LAN) or a wide area network (WAN).

I/O interface606includes any system for exchanging information to or from an external source. I/O devices610include any known type of external device, including a display, keyboard, etc. Bus608provides a communication link between each of the components in computer102, and may include any type of transmission link, including electrical, optical, wireless, etc.

I/O interface606also allows computer102to store information (e.g., data or program instructions such as program code614) on and retrieve the information from computer data storage unit612or another computer data storage unit (not shown). Computer data storage unit612includes a known computer readable storage medium, which is described below. In one embodiment, computer data storage unit612is a non-volatile data storage device, such as a magnetic disk drive (i.e., hard disk drive) or an optical disc drive (e.g., a CD-ROM drive which receives a CD-ROM disk).

Memory604and/or storage unit612may store computer program code614that includes instructions that are executed by CPU602via memory604to reduce food waste by using a machine learning model. AlthoughFIG. 6depicts memory604as including program code, the present invention contemplates embodiments in which memory604does not include all of code614simultaneously, but instead at one time includes only a portion of code614.

Further, memory604may include an operating system (not shown) and may include other systems not shown inFIG. 6.

In one embodiment, computer data storage unit612includes menu items110(seeFIG. 1) and ingredient inventory112(seeFIG. 1).

As will be appreciated by one skilled in the art, in a first embodiment, the present invention may be a method; in a second embodiment, the present invention may be a system; and in a third embodiment, the present invention may be a computer program product.

Any of the components of an embodiment of the present invention can be deployed, managed, serviced, etc. by a service provider that offers to deploy or integrate computing infrastructure with respect to reduce food waste by using a machine learning model. Thus, an embodiment of the present invention discloses a process for supporting computer infrastructure, where the process includes providing at least one support service for at least one of integrating, hosting, maintaining and deploying computer-readable code (e.g., program code614) in a computer system (e.g., computer102) including one or more processors (e.g., CPU602), wherein the processor(s) carry out instructions contained in the code causing the computer system to reduce food waste by using a machine learning model. Another embodiment discloses a process for supporting computer infrastructure, where the process includes integrating computer-readable program code into a computer system including a processor. The step of integrating includes storing the program code in a computer-readable storage device of the computer system through use of the processor. The program code, upon being executed by the processor, implements a method of reducing food waste by using a machine learning model.

While it is understood that program code614for reducing food waste by using a machine learning model may be deployed by manually loading directly in client, server and proxy computers (not shown) via loading a computer-readable storage medium (e.g., computer data storage unit612), program code614may also be automatically or semi-automatically deployed into computer102by sending program code614to a central server or a group of central servers. Program code614is then downloaded into client computers (e.g., computer102) that will execute program code614. Alternatively, program code614is sent directly to the client computer via e-mail. Program code614is then either detached to a directory on the client computer or loaded into a directory on the client computer by a button on the e-mail that executes a program that detaches program code614into a directory. Another alternative is to send program code614directly to a directory on the client computer hard drive. In a case in which there are proxy servers, the process selects the proxy server code, determines on which computers to place the proxy servers' code, transmits the proxy server code, and then installs the proxy server code on the proxy computer. Program code614is transmitted to the proxy server and then it is stored on the proxy server.

Another embodiment of the invention provides a method that performs the process steps on a subscription, advertising and/or fee basis. That is, a service provider can offer to create, maintain, support, etc. a process of reducing food waste by using a machine learning model. In this case, the service provider can create, maintain, support, etc. a computer infrastructure that performs the process steps for one or more customers. In return, the service provider can receive payment from the customer(s) under a subscription and/or fee agreement, and/or the service provider can receive payment from the sale of advertising content to one or more third parties.

The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) (i.e., memory604and computer data storage unit612) having computer readable program instructions614thereon for causing a processor (e.g., CPU602) to carry out aspects of the present invention.

Computer readable program instructions (e.g., program code614) described herein can be downloaded to respective computing/processing devices (e.g., computer102) from a computer readable storage medium or to an external computer or external storage device (e.g., computer data storage unit612) via a network (not shown), for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card (not shown) or network interface (not shown) in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.

Aspects of the present invention are described herein with reference to flowchart illustrations (e.g.,FIG. 2) and/or block diagrams (e.g.,FIG. 1andFIG. 6) of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions (e.g., program code614).

These computer readable program instructions may be provided to a processor (e.g., CPU602) of a general purpose computer, special purpose computer, or other programmable data processing apparatus (e.g., computer102) to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium (e.g., computer data storage unit612) that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.