Keywords

1 Introduction

The world society lives with the double burden of malnutrition so that about 1/3 of humanity is nutrient deficient [4]. This phenomenon, called Hidden Hunger, is mainly generated by poor feeding conditions, causing the onset of diseases, reducing productivity levels, and decreasing the population’s life expectancy [9]. The global pandemic caused by the SARS-CoV-2 virus highlights how malnutrition can influence getting or recovering from illness[2].

Different reasons can cause nutrient deficiencies, such as food prices, lack of nutritional knowledge, availability of products, among others. However, food choice has as one of the most relevant factors the price of food products, being more relevant than the nutritional value, directly affecting the quality of the population’s diet [9]. The increase in the cost of staple foods, accentuated by the COVID-19 pandemic, may cause even more restrictions on the purchase of products, especially for populations with lower income [1, 9].

In this context, EmbrapaFootnote 1 (Brazilian Agricultural Research Corporation), in partnership with the Federal University of Juiz de Fora, developed the Nutrileite Project [9, 10]. The objective of the project is to develop computer systems that help in choosing food products based on their nutritional cost-benefit ratio. As far as we are concerned, there is no complete, safe, and free source of data to calculate the cost of nutrients and help the consumer purchase cheaper products with nutritional quality.

This work aims to propose an architecture, called Nutri’n Price, that provides, in an intelligent and personalized way, information related to food products, considering the essential nutrients and the costs associated with these foods and nutrients. The architecture encompasses an ontology network as a knowledge base to support recommendation techniques based on information retrieval, collaborative filtering, intelligent processing and knowledge discovery. Nutri’n Price is made available to consumers through a mobile application that uses price data extracted from supermarket websites. These data, together with data from users and nutritional values of foods, feeds the knowledge base that, based on inference algorithms, recommends products with high nutritional value, low cost and easy access to the consumer.

The ontology network also includes definitions and information about the user’s profile, food products and nutrients. This network uses metadata and information from multiple sources to process the recommendation [3, 8]. We have not identified any approach in the literature that uses an ontology network that covers different contexts and uses intelligent techniques for recommending products considering the relationship between nutritional value and cost. In this sense, our approach is innovative, using a semantic knowledge base and intelligent techniques to recommend nutritionally adequate products at a low cost, adapted to the consumer’s profile. In [7], the approach focuses on the nutritional composition of foods and how this information could support health sectors. Nutri’n Price focuses on analyzing the cost of nutrients and user’s preferences to recommend the cheapest and healthiest foods. Gunawardena et al. [6] address, like Nutri’n Price, the recommendation of foods to the consumer. However, the recommendation is made in the context of restaurants and not in foods to be consumed in everyday life. Furthermore, we use different recommendation techniques. Nutri’n Price uses a knowledge base and intelligent techniques (reasoner) to recommend products and rate similar users.

This article is organized into the following sections, in addition to the Introduction. Section 2 describes the proposed architecture and recommendation steps. Section 3 presents usage scenario. Finally, in Sect. 4, conclusions are drawn and possibilities for future work are listed.

2 Nutri’n Price Architecture

For the recommendation to be executed, we must have the users’ profiles with their dietary restrictions, diseases, and preferences. We will use these profiles to define recommendations in future search requests. Our recommendation strategy is based on direct information retrieval in an ontology network and on collaborative filtering performed after processing inference algorithms on the network. A similarity algorithm uses the Jaccard Index [5], to define more similar users and recommend food products in the collaborative filtering context. The ontology network comprises the Food Ontology and User Ontology ontologies, developed by these authors, and the Human Disease OntologyFootnote 2, developed by health organizations and researchers at the University of Maryland. The database with the foods and nutrients was previously built by Embrapa. Food price data are taken from supermarkets. After extraction, the cost-effectiveness of nutrients and nutritional density are calculated. The methodology adopted to calculate costs and nutritional density were also previously applied by researchers at Embrapa [9, 10]. After the calculations, the products are ranked and displayed. Figure 1 presents an overview of the architecture Nutri’n Price developed.

Fig. 1.
figure 1

Overview of the architecture nutri’n price.

The Data Extraction Module defines the periods and captures data related to the prices of food products. The aim is to keep prices always up to date, to offer an updated recommendation to the user. After, the data are sent to the Processing Module, this module calculates the cost of nutrients and the nutritional density of each food and stores the information.

The User Profile Manager Module manages user profiles. The Search Module is responsible for connecting and sending requests (nutrients, food, among others) to the Semantic Module (detailed in Sect. 2.1). The latter is responsible for selecting the recommended products, based on choosing one or more nutrients of interest (sent via the Search Module). The Inference sub-module accesses the knowledge base formed by the ontology network, logic rules and inference machine to carry out the recommendations. After semantic processing, the information is sent to the Information Synthesis Module, which organizes the information and makes it available for consumption by the API. The Mobile Module allows users to interact with the recommendation architecture through the API.

2.1 Semantic Module

The Ontology Network is used as a semantic model to support recommendations. Its main objective is to process the information (instances) from a set of logical rules and inference algorithms and from new relationships and classifications, to recommend foods suitable for a given nutritional need of the population or specific user, considering the cost of food. The Ontology Network is dynamic, as instances representing different contexts are processed and information is inferred for the recommendation of the most accessible food products. This network is formed by classes and relationships encompassing the Food Ontology, User Ontology and the Human Disease Ontology. Figure 2 illustrates some of the main classes that are interconnected and the relationships that make up the network.

Fig. 2.
figure 2

Ontology network

Food Ontology defines the concepts related to food products (:food), nutrients (:nutrient), specific nutrients (e.g. :protein and :vitaminA), price of each product for each 100g ( :price), price of each nutrient (e.g. :proteinPrice and :vitaminAPrice), URL of the websites where the product was searched (:url), the supermarket where the product was found (:marketplace) and the location where this supermarket is found (:location). In addition to classes, the network specifies relationships, through object properties, such as the relationship between the :food class and the :nutrient subclasses, which indicate the amounts of nutrients present for each food. The Food Ontology also has the relationships between food, price, url and supermarket, to identify in which web address the prices were searched (:hasURL), in which establishment (:hasMarketplace), and from which location (:isLocatedIn). User Ontology was created to represent concepts related to users. There is the class that represents the user (:User), user location (:location), food restrictions (:foodRestriction) and diseases (:disease). In addition to the classes, the object properties relate these concepts to the user.

Disease Ontology privileges the definition of concepts that refer to diseases that are related to nutrition and food are highlighted here. We can see the classes directly related to nutritional diseases (:nutrition disease) and nutrient deficiency (:nutritional deficiency disease).We also highlight food allergies that exist and are represented by classes such as :food allergy and its sub classes. Some classes relate these allergies to the materials that cause them (:foodmaterial). We can also highlight the class that defines the symptoms of each disease (:symptom). There are few object properties used in this set of disease ontology classes. The use of Disease Ontology classes is crucial for the recommendation of food products, as it supports the discovery of nutrients and restricted foods according to the user’s illness.

The ontology network considers that smaller ontologies are more extensible and easier to maintain and reuse, with clear concepts and relationships. Moreover, the connection between these ontologies enhances semantics and enables the discovery of new knowledge related to the recommendation. The network is attributed to creating new classes, object properties, properties chains and rules to assist the processing and provide new knowledge to the application. Classes semantically equivalent have been merged into just one, as is the case with :location. We created new classes to define groups according to user characteristics, these are represented by the :groups class and its sub classes. In addition, to connect the ontologies and semantically enrich the network, we created object properties, in which :chosenNutrient (defines the nutrients chosen by the user), :chosenFood (defines the foods chosen by the user) and the : hasDisease (defines the diseases the user can have). We also highlight the creation of property chains, such as :canNotEat, which through various relationships can infer, through reasoner, that a user should not consume foods against his dietary restrictions.

All classes, relationships and rules developed or reused in the network aimed to build a structure that supported information retrieval techniques or collaborative filtering for the recommendation. Property chains, such as: canNotEat, assist in the direct retrieval of information and returning food that we should not consume. We also developed SWRL rules to support in processing new ontological relationships. These SWRL rules define groups that identify users with similar preferences or characteristics. One of the advantages of this approach is that recommendation systems based on ontology, mitigate cold start problems due to the possibility of retrieving information related to a particular user with the help of a reasoner and inference rules.

2.2 Recommendation Steps

The recommendation approach used by Nutri’n Price is hybrid, it consists of the combined use of information retrieval and collaborative filtering techniques, supported by the ontology network. We chose the hybrid approach to provide a more accurate recommendation. We detail the recommendation steps from the process flow illustrated in Fig. 3. The recommendation process starts with checking restricted foods for a user or user groups and choosing the target nutrient. Then, the Nutri’n Price checks the mandatory restrictions by retrieving information in the ontology network, considering the foods that the user cannot consume. For the execution of these restrictions, the reasoning is executed in the network and all inferences of the relation :canNotEat (:user - :canNotEat - : food) for one or more individuals must be stored in a list with restricted foods.

Fig. 3.
figure 3

Process flow for recommendation

Associated with the verification of restrictions, one or more target nutrients must also be sent to Nutri’n Price, making it possible to recommend foods rich in the selected nutrient(s). Next, Nutri’n Price should check for similar users, that are, users who previously chose the same nutrients. For this, the ontology network is queried through the object property :nutrientChoosen, the inverse of :chosenNutrient (:user :chooseNutrient :nutrient), so that all similar users are returned. Then, the ontological network is processed to define groups according to the comparison between the requesting user(s) and similar users. A set with groups subsets of each similar user is defined. The groups of each similar user are compared with the groups of requesting users through the approach called Jaccard similarity, to support the precision and accuracy of the recommendations. Figure 4 exemplifies how the Jaccard index is used.

In Fig. 4, the comparison is performed using subsets of groups relevant to a requesting user, named “Carlos” and two previous users, “Marcos” and “Maria”. In Fig. 4 , we chose sets with few groups to facilitate understanding. As can be seen in Fig. 4, “Maria” is more similar to “Carlos” than “Marcos”, since the similarity index of “Maria” is higher than that of “Marcos”, with JIMaria = 0.6, while JIMarcos = 0.286. Therefore, in the ranking, the food product chosen by “Maria” for that nutrient is more suitable for “Carlos” than the product chosen by “Marcos” for that nutrient.

Fig. 4.
figure 4

Jaccard similarity between the requesting user “Carlos” and two previous users, “Marcos” and “Maria”.

For the creation of the ranking, the restricted foods for the user, the similarity between the requesting user(s) and previous users, the nutritional density, the cost-effectiveness of the nutrient and the food prices are considered. The products are presented ordered according to the choice of nutrient and similarity between users. While similar, some products are restricted for the requesting user and not restricted for previous users, so we will compare the returned foods to those on the requesting user’s banned foods list. If there are restricted foods, these must be removed from the products to be recommended.

3 Usage Scenario

This scenario considers a support group for poor people and with a previous history of COVID-19 is accompanied by the City Hall of Três Rios, Rio de Janeiro, Brazil. One of the nutritionists, named “Maria”, knows the reality of each of her patients. She knows which of them are employed, their salary range, whether they receive government benefits, what illnesses they have and their dietary restrictions. To assist in the construction of diets and food choices for these patients, given their social and financial vulnerability, in addition to symptoms of previous illnesses and sequels left by COVID-19, the nutritionist uses Nutri’n Price to recommend the food. Nutri’n Price helps in decision making to verify which products must be purchased to be distributed.

The nutritionist “Maria” has an appointment with the patient “José”, which complains of excessive sleep, weak body and constant infections. The nutritionist suspects that “José” has low immunity, as he works as a merchant in crowded environments, running significant risks of contracting COVID-19 and spreading the disease. Thus, “Maria” recommends a diet rich in Vitamins A, C and E, nutrients that help immunity. “José” is 56 years old, has fish allergy, high blood pressure and diabetes. He should avoid foods rich in salt and sugar, and don’t eat fish foods. All three nutrients have already undergone previous consultations, so the recommendations will be based on former users who chose these nutrients and have similarities with “José”. Thus, once the information about the patient is registered and the nutrients indicated, the system will recommend the best products. Figure 5 (a) illustrates the mobile interface with the choice of vitamin C nutrient. Figure 5 (b) presents the ranking with the recommendation made by Nutri’n Price to “José”. Figure 5(c) shows “Maria”’s choice for “José”.

Fig. 5.
figure 5

Nutrin’ price results for user “José” and details of the chosen food.

For the recommendation, previous users who chose these nutrients were checked. Vitamin C was chosen by more than 100 people, making it possible to calculate the similarity between them and “José”. The 10 most similar were automatically chosen to compose the ranking, and displayed their food choices for Vitamin C. In addition, “Maria” also ordered the ranking by price and indicated to “José” the cheapest and good nutritional density. With that, the nutritionist can recommend foods that can increase the patient’s immunity and thus be more resistant to COVID-19.

4 Conclusions

This work proposed an architecture, called Nutri’n Price, whose core is formed by the Semantic Module. The proposed solution aims to support consumers and nutrition professionals in decision-making for purchasing food products. We used an ontology net-work that considers, in addition to food, prices, and nutritional value, possible diseases caused by nutritional deficiencies. COVID-19 and its impacts on the lives of convalescent people stand out.

As future work, we propose the extension of the ontology network, to provide multidisciplinary views that add value to the recommendation. Furthermore, a formal and comprehensive experiment must be conducted to evaluate the Nutri’n Price solution effectively.