Tải bản đầy đủ (.pdf) (128 trang)

Báo cáo phân tích phát triển website menu dinh dưỡng khoa học sử dụng trí tuệ nhân tạo

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (12.91 MB, 128 trang )

<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">

VIETNAM NATIONAL UNIVERSITY, HANOI

</div><span class="text_page_counter">Trang 2</span><div class="page_container" data-page="2">

VIETNAM NATIONAL UNIVERSITY, HANOI

SUBJECT CODE: INS4014

MAJOR: Informatics and Computer Engineering CLASS: ICE2019A

<i>Hanoi - Year 2023</i>

</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">

<b>ACKNOWLEDGEMENT </b>

Over the past 4.5 years of my education and training at the International School - Hanoi National University, I've been fortunate to receive significant support and assistance from both teachers and friends. I express my profound and heartfelt gratitude to the faculty members at the Faculty of Applied Sciences - International School. Their dedication, knowledge, and passion have been instrumental in imparting valuable insights during my time at the school.

With the attentive, nurturing, and meticulous guidance of my teachers, I have

<b>been able to complete my graduation thesis on the topic "Developing a scientific nutrition menu website using artificial intelligence." I would like to extend my </b>

sincere gratitude to Ph.D Nguyen Dang Khoa for her diligent guidance during each meeting and discussion regarding the subject I was working on.

In addition, I would like to express my gratitude to the Board of Rectors of the International School and the Functional Offices, who provided direct and indirect assistance to me throughout the process of studying and researching this topic.

Last but not least, my parents, relatives, and friends, who have always inspired me to be more motivated to overcome problems and barriers, deeply care about me. I was inspired to study throughout my time in school by those encouraging words.

Given my limited time and experience, there might be shortcomings in my graduation project. I genuinely hope to receive guidance and valuable input from esteemed professors to enable me to improve, enhance my understanding, and better serve practical work in the future.

I sincerely thank you!

<i>Hanoi, December 15<small>th</small>, 2023 </i>

Duong Thi Huyen Trang

</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4">

Every aspect and functionality on the website has been built upon my personal research and analysis. All information, images, and product descriptions have been generated authentically and reliably. I guarantee that all images and content used on the website adhere to copyright regulations and do not violate the intellectual property rights of any third party.

I accept full responsibility for ensuring the accuracy of product information, pricing, and any other data presented on the website as part of my graduation project.

<i>Hanoi, December 15<small>th</small>, 2023 </i>

Duong Thi Huyen Trang

</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">

<b>ABSTRACT </b>

The intersection of nutritional science and technology offers a revolutionary possibility in the field of health and wellness. The present topic explores the creation of a novel website that utilizes artificial intelligence (AI) to generate personalized, science-based nutritious menus based on user needs. The innovative platform is designed to revolutionize individuals' approaches to their dietary habits. It utilizes AI algorithms to analyze a wide range of data, incorporating personal health metrics, dietary preferences, and the latest findings in nutritional research.

The site's core functionality is built around an AI engine capable of interpreting complex dietary requirements and generating personalized meal plans. To guarantee that every menu item is nutritionally tailored to each user's specific health state

Additionally, an interactive interface on the website enables customers to enter information and instantly receive meal recommendations that are high in nutrients. In addition to promoting long-term healthy eating habits, this function aims to inform users about their nutritional needs. Moreover, the platform also offers services through a monthly subscription model.

Thorough testing stages were incorporated into the development process to guarantee precision, ease of use, and adherence to nutritional recommendations. In order to make and deliver meals according to planned schedules, the organization also works with restaurants and other culinary partners.

In the nexus of artificial intelligence, digital technology, and nutritional research, this website marks a substantial advancement. It offers to provide a technologically advanced, scientifically supported, and user-centric tool for improving nutritional health and well-being. This could prove beneficial to a diverse range of users, catering to individuals with specific dietary requirements as well as those seeking to adopt healthier lifestyles.

</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">

<b>LIST OF ABBREVIATIONS Abbreviation Definition </b>

CERN European Organization for Nuclear Research

FAO Food and Agriculture Organization of the United Nations

USDA United States Department of Agriculture NDNS National Diet and Nutrition Surveys

RDBMS Relational Database Management System

RDEE Resting Daily Energy Expenditure

</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">

<b>LIST OF FIGURES </b>

Figure 1. The UK Eatwell Guide [7] ... 11

Figure 2. Dietary reference values definitions [8] ... 13

Figure 3. Example on Food Pyramids [8] ... 14

Figure 4. Hypothetical data for daily energy intake for 5 individuals across 4 days of measurement [9] ... 16

Figure 5. Hypothetical histograms of nutrient intakes in a population [9] ... 17

Figure 6. Lose It! website [12] ... 19

Figure 7. Nutrinohealth website [13] ... 20

Figure 8. Lifesum website [14] ... 21

Figure 9. Comparing different industry terms [15] ... 23

Figure 10. Comparing supervised and unsupervised learning [15] ... 24

Figure 11. System diagram ... 30

Figure 13. Basics of JavaScript ... 31

Figure 14. React framework ... 33

Figure 15. Project Structure ... 35

Figure 16. An Example Node.js Application ... 37

Figure 21. MySQL String Data Types [33] ... 41

Figure 22. MySQL Numeric Data Types [33] ... 42

Figure 23. MySQL Date and Time Data Types [33] ... 42

Figure 24. EER Diagram of GoodFood Website ... 52

Figure 26. Example Entry ... 60

Figure 27. BMI chart for adults [37] ... 63

Figure 28. User Sample Data Table ... 65

Figure 29. Meal Sample Data – Breakfast Package Table ... 65

Figure 30. Meal Sample Data – Lunch Package Table ... 66

Figure 31. Meal Sample Data – Dinner Package Table ... 66

Figure 32. Meal Sample Data – Keto Package Table ... 67

Figure 33. Meal Sample Data – Paleo Package Table ... 67

Figure 34. Meal Sample Data – Vegetarian Package Table ... 68

Figure 35. Meal Sample Data – Drink Package Table ... 68

Figure 36. Food Sample Data Table ... 69

</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">

Figure 37. General usecase diagram ... 78

Figure 38. Login usecase diagram ... 79

Figure 39. Shopping cart usecase diagram ... 80

Figure 40. Order usecase diagram ... 80

Figure 41. Meal usecase diagram ... 81

Figure 42. Package usecase diagram ... 82

Figure 43. Contact management usecase diagram ... 82

Figure 44. User management usecase diagram ... 83

Figure 45. Meal management usecase diagram ... 84

Figure 46. Food management usecase diagram ... 85

Figure 47. Order management usecase diagram ... 85

Figure 48. Package management usecase diagram ... 86

Figure 49. Login sequence diagram ... 87

Figure 50. Shopping Cart management sequence diagram ... 88

Figure 51. Contact management sequence diagram ... 89

Figure 52. User management sequence diagram ... 90

Figure 53. Order management sequence diagram ... 91

Figure 54. Meal management sequence diagram ... 92

Figure 55. Home Page Interface ... 93

Figure 56. About GoodFood Interface ... 93

Figure 57. Meal Page Interface ... 94

Figure 58. Consult Page Interface ... 94

Figure 59. Input Nutrition Calculator Interface ... 95

Figure 60. Result Calories Calculate Interface ... 95

Figure 61. Pricing Page Interface ... 96

Figure 62. Shopping Cart Interface ... 96

Figure 63. Order Delivery Interface ... 97

Figure 64. Order Derivery Complete Interface ... 97

Figure 65, Contact Page Interface ... 98

Figure 66. Meal Management Interface ... 98

Figure 67. Food Management Interface ... 99

Figure 68. Order Management Interface ... 100

</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">

Figure 69. Package Management Interface ... 100 Figure 70. Transaction Management Interface ... 101 Figure 71. Contact Management Interface ... 101

</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">

<b>LIST OF TABLES </b>

Table 2.1. Estimated Average Requirement (EAR) values for energy intake among

adults in the United Kingdom [7] ... 8

Table 2.2. Presents metabolizable energy conversion factors for various nutrients and alcohol. [7] ... 10

Table 2.3. Estimated Average Requirements (EAR) for energy (per day) across age groups [8] ... 14

Table 2.4. Carbohydrate and fat as a percentage of energy intake [8] ... 15

Table 2.5. Recommended intake of fiber by age group table [8] ... 15

Table 2.6. Reference Nutrient Intake of protein for children table [8] ... 15

Table 2.7. Comparison features table ... 21

Table 2.8. Review Table ... 22

Table 3.1.User_account table ... 43

Table 3.2. Package table ... 44

Table 3.3. Meal table ... 45

Table 3.4. Meal_item table ... 46

Table 3.5. Item table ... 47

Table 3.6. Meal_item_item table ... 47

Table 3.7. Meal_meal_item table ... 48

Table 3.8. Order table ... 48

Table 3.9. Order_meal table ... 49

Table 3.10. Transaction table ... 50

Table 3.11. Tracking table ... 51

Table 3.12. BMI table for adults [34] ... 62

Table 3.13. The American Council on Exercise Body Fat Categorization [35] ... 64

Table 3.14. Jackson & Pollock Ideal Body Fat Percentages [35] ... 64

Table 4.1. System model table ... 77

Table 4.2. General usecase specification table ... 78

Table 4.3. Login use case specification table ... 79

Table 4.4. Usecase specification Shopping Cart, Order Table ... 80

Table 4.5. Usecase specification Meal Table ... 81

Table 4.6. Usecase specification Package Table ... 82

</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">

Table 4.7. Usecase Specification Contact Management Table ... 83

Table 4.8. Usecase Specification User Management Table ... 83

Table 4.9. Usecase Specification Meal Management Table ... 84

Table 4.10. Usecase Specification Food Management Table ... 85

Table 4.11. Usecase Specification Order Management Table ... 86

Table 4.12. Usecase Specification Package Management Table ... 86

</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">

CHAPTER I: OVERVIEW OF THE TOPIC ... 1

1.1 Background of The Topic ... 1

CHAPTER II: LITERATURE REVIEW ... 5

2.1. Introduction and Concepts ... 5

2.1.1. Definition of Websites ... 5

2.1.2. Artificial Intelligence ... 6

2.1.3. Nutrition ... 7

2.2. Review of Existing Nutrition Websites ... 19

2.2.1. Lose It! Website ... 19

2.2.2. Nutrino Website ... 19

2.2.3. Lifesum Website ... 20

</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">

2.3. Machine Learning ... 22

2.3.1. Machine Learning vs Artificial Intelligence vs Deep Learning ... 23

2.3.2. Types of Machine Learning ... 24

2.3.3. Applications of Machine Learning ... 25

2.3.4. Roles of Artificial Intelligence (AI) in Nutrition ... 25

2.4. Conclusion ... 28

CHAPTER III: SYSTEM ARCHITECTURE AND DEVELOPMENT ... 29

3.1. The Problem of Planning a Menu Scientifically ... 29

3.1.1. State The Problem ... 29

3.1.2. Directions for Solving This Problems ... 29

3.2. Software Development and Technologies ... 31

3.3.2. Data Collection and Preprocessing ... 59

3.3.3. Training and Validation ... 69

3.3.4. Deployment and Integration ... 75

3.4. Conclusion ... 76

CHAPTER IV: SYSTEM DESIGN ... 77

4.1. System Model ... 77

4.2. Usecase diagram ... 78

4.2.1. General use case diagram ... 78

4.2.2. Login usecase diagram ... 79

4.2.3. Shopping Cart and Order usecase diagram ... 80

4.2.4. Meal usecase diagram ... 81

4.2.5. Package usecase diagram ... 81

4.2.6. Contact management usecase diagram ... 82

4.2.7. User management usecase diagram ... 83

</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">

4.2.8. Meal management usecase diagram ... 84

4.2.9. Food management usecase diagram ... 85

4.2.10. Order management usecase diagram ... 85

4.2.11. Package Management usecase diagram ... 86

4.3. Sequence diagram ... 87

4.3.1. Sequence Diagram Login ... 87

4.3.2. Sequence Diagram Manage Shopping Cart ... 88

4.3.3. Sequence Diagram Manage Contact ... 89

4.3.4. Sequence Diagram Manage User ... 90

4.3.5. Sequence Diagram Manage Order ... 91

4.3.6. Sequence Diagram Manage Meal ... 92

4.4. System Interface Design ... 93

4.4.1. Home Page Interface ... 93

4.4.2. About GoodFood ... 93

4.4.3. Meal Page Interface ... 94

4.4.4. Consult Page Interface ... 94

4.4.5. Pricing Page Interface ... 96

4.4.6. Shopping Cart Interface ... 96

4.4.7. Order Page Interface ... 97

4.4.8. Contact Page Interface ... 98

4.4.9. Meal Management Interface ... 98

4.4.10. Food Management Interface ... 99

4.4.11. Order Management Interface ... 100

4.4.12. Package Management Interface ... 100

4.4.13. Transaction Management Interface ... 101

4.4.14. Contact Management Interface ... 101

4.5. Conclusion ... 102

CHAPTER V: INSTALL WEBSITE ... 103

5.1. Run Frontend Project Installation and Run Guide using Next.js ... 103

5.1.1. Overview ... 103

5.1.2. Prerequisites ... 103

</div><span class="text_page_counter">Trang 16</span><div class="page_container" data-page="16">

<b>CHAPTER I: OVERVIEW OF THE TOPIC 1.1 Background of The Topic </b>

In recent years, the integration of nutrition science and technology has become increasingly prominent, driven by a growing awareness of the importance of personalized meal planning for health and wellness. It is not simple to create a scientifically sound nutritional plan that meets the individual demands of every person, though. However, traditional methods of meal planning often lack the customization needed to cater to individual nutritional requirements, preferences, and health conditions. This makes using cutting-edge technology, such as artificial intelligence (AI), necessary to address this issue.

<b>That's why the concept of “Developing a scientific nutrition menu website using artificial intelligence” has emerged. Leveraging AI technologies presents an </b>

opportunity to offer customized dietary recommendations based on individual health profiles, preferences, and goals.

<b>1.2 Problem Statement </b>

The problem lies in the complexity of sorting through extensive nutritional data to create personalized scientific nutrition meal plans. Without personalized guidance, individuals may struggle to navigate through the abundance of information available. Leading to confusion, ineffective dietary choices, or difficulty in achieving their health objectives. Moreover, it highlights a common problem faced by many people - a lack of time for cooking due to their busy lives, which can result in unhealthy dietary habits and long-term health issues.

Therefore, the need for an AI-powered platform that can interpret user-specific data, to generate scientifically backed nutrition menus arises.

<b>1.3 Objectives of The Topic </b>

The main objective of the project is to create a user-friendly website, that leverages artificial intelligence (AI) algorithms to offer personalized nutrition meal recommendations. The aim is to enhance accessibility, accuracy, and customization in the meal of nutrition. By tailoring meals to each user's individual health profile.

Moreover, the website provides a service through a monthly meal subscription model. Users have the option to receive meals every day, giving them the freedom to suit their own needs and tastes. Essentially, it integrates customized meal planning

</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">

and delivery. Providing customers with easy access to wholesome meals even with hectic schedules.

• Data collection and processing method

• User interface and experience design considaration • Continuos to improve the system

In the thesis report consist of 5 chapters, orgainzed as follows:

<i>• Chapter I introduces an overview of the topic, including: background of </i>

the topic, problem statement, objective of the topic, research methods, research objects, scope, and limitations of the topic.

<i>• Chapter II introduces the literature review of this topic. In this part, the </i>

concepts of websites, artificial intelligence, and nutrition are mentioned, along with an overview of existing literature on nutrition websites and what machine learning is.

<i>• Chapter III introduces system architecture and development, which consist </i>

of the problems of planning a menu scientifically, software development and technologies, and the artificial intelligence model.

<i>• Chapter IV introduces system design. In this chapter, I presented the </i>

system model, use case diagram, sequence diagram, and system interface design.

<i>• Finally, Chapter V introduces installed on the website. In this chapter, I </i>

presented how to run frontend project installation and run guides using Next.js, backend server configuration guides using Nest.js, and an AI training model.

<b>1.5 Research Objects </b>

The research objects are individuals who will interact with the website to receive personalized nutritional menu recommendations. Specifically, research objects include:

</div><span class="text_page_counter">Trang 18</span><div class="page_container" data-page="18">

<i>• Healthy Adults: Those who wish to maintain, gain, or lose weight in addition </i>

to improving their general health.

<i>• Individuals with particular nutritional needs: Those with hectic schedules, </i>

little time for cooking, finicky eaters, or health issues who wish to enhance their dietary.

<b>1.6 Scope and Limitation 1.5.1. Scope </b>

The scope of this project focuses on the development of an AI-driven website that can analyze various parameters, based on a platform for user data input and calorie generation. The website will integrate a comprehensive nutritional database containing information on food composition, calorie content. Training AI algorithms to analyze user data and generate personalized meal plans based on pre-defined dietary goals and constraints.

<b>1.5.2. Limitations </b>

When implementing the project, I will face some limitations:

Firstly, the accuracy of the AI recommendations heavily relies on the quality and comprehensiveness of the input data. There's a need for constant updating of the database to reflect the latest nutritional research.

Secondly, ensuring user data privacy and security is also another significant challenge.

Thirdly, the effectiveness of the website is also dependent on the users' engagement and their honesty in reporting health and dietary data.

Furthermore, the AI model's predictions are only as good as the algorithms and dataset they are trained on, which might not capture the complexity and nuances of human nutrition fully.

Finally, technological limitations and the need for continuous updates and improvements to refine AI algorithms for greater accuracy and relevance.

<b>1.7 Conclusion </b>

In summary, employing artificial intelligence to create a scientific nutrition menu website presents a viable solution to the issue of tailored dietary recommendations. Despite the possible limitations, this project has the potential to transform the way people approach nutritious meals, supporting improved health outcomes through

</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">

informed nutritional choices even when customers are busy. Continuously screening and assessing user feedback will be crucial in improving the platform's effectiveness and relevancy over time.

</div><span class="text_page_counter">Trang 20</span><div class="page_container" data-page="20">

<b>CHAPTER II: LITERATURE REVIEW </b>

As mentioned in chapter I, the methodology used in chapter II is search and analyze the document related to the topic. So, in this chapter Literature Review, I will clarify it. Chapter outline: introduction and concepts, review of existing nutrition websites, machine learning and conclusion.

<b>2.1. Introduction and Concepts 2.1.1. Definition of Websites </b>

<b>A website is a collection of web pages tied to one another within the same </b>

domain, including varied information that visitors may access quickly and conveniently as long as they have an internet connection. The site is made up of many components such as photographs, text, sound, video, animation, and graphics, depending on the website's purpose. [1]

Websites typically have one main page offering general information, known as the homepage. When you first open a web page, you will see the homepage. From

<b>here, you can explore the website's different features. [1] </b>

Websites can be divided into two broad categories that: • Static website

• Dynamic website

Each website's objective will guide in deciding what type of website to create. To further comprehend the distinction between the two, we'll look at what it means when a website is static or dynamic. [2]

<i>Static Websites: </i>

<i>A static website is relatively simple in terms of design and operation, often </i>

providing a single purpose. Static websites provide the same content and appearance for all visitors, regardless of browser, location, or device. Static web pages cannot accept visitor input, but they may have animations and clickable components such as hyperlinks or navigation buttons. This makes them an attractive option for portfolio and catalog websites. [2]

<i>Dynamic Website: </i>

A dynamic website's content and look can change depending on a variety of circumstances, such as the time of day, the visitor's location, language preferences, and previous interactions with the site.

</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">

This makes the dynamic website type best suited for eCommerce businesses, social media, ticket booking, and forums. [2]

shopee.vn is a common example of a dynamic website. Its front page displays product recommendations based on visitors' locations, purchases, and search history. A website may include both static and dynamic web pages. Typically, these websites feature static, unchanging information pages such as About and Contact Us, alongside dynamic sections like the product catalog, news feed, and main page. [2]

<b>2.1.2. Artificial Intelligence </b>

<i>The definition of Artificial Intelligence (AI) involves the examination of </i>

intelligent behavior in humans, animals, and machines, with the goal of engineering such behavior in any form of artifact. It stands as one of the most challenging and

<i>arguably the most thrilling enterprises ever undertaken by humanity. [3] </i>

One intriguing aspect of the artificial intelligence (AI) field is the challenging task of precisely defining its subject matter. This challenge involves two interconnected parts: understanding the nature of the artificial and, equally essential, having a suitable comprehension of intelligence. The term "artificial" in artificial intelligence is undoubtedly linked to its origins and creation through human contrivance and ingenuity, as opposed to arising naturally, especially through biological or evolutionary processes. In essence, artificially intelligent entities differ from naturally intelligent ones, functioning as artifacts endowed with specific properties not typically found in non-artifacts. Therefore, these entities possess a certain property (intelligence) as a result of a specific process (creation, design, or manufacturing). [4]

<i><b>Advantages and disadvantages of Artificial Intelligence (AI) </b></i>

Artificial intelligence offers numerous advantages, one notable benefit being its ability to make decisions grounded in factual information rather than emotional influences. It is widely acknowledged that human decisions are invariably susceptible to emotional biases, even when we strive to make the best choices.

<i>Advantages of Artificial Intelligence (AI) </i>

The remarkable advantages of artificial intelligence have the potential to bring about transformative changes for the better, propelling us into a new era in the history

</div><span class="text_page_counter">Trang 22</span><div class="page_container" data-page="22">

of artificial robotics. The following are the key benefits of Artificial Intelligence (AI). [5]

• Completed the work quicker than a human, • Easily finish complex and stressful task,

• Perform difficult work in a short amount of time, • Numerous tasks can be completed simultaneously,

• A high success percentage, fewer task mistakes and defects overall, • Increased productivity in a short amount of time,

• Minimize space and size,

• Compute long-term and complex problems and find uncharted territory. [5]

<i>Disadvantages of Artificial Intelligence (AI) </i>

Here are some of the main disadvantages of artificial intelligence (AI) in our daily lives:

• There is a risk of abuse, potentially leading to widespread devastation.

• Program mismatch occurs when actions deviate from the intended commands. • Poses a threat to human employment opportunities.

• The issue of unemployment has increasing. • A programmer's creativity is dependent on them. • Absents the human touch.

• A younger generation that is more indolent. • Demand a great deal of time and money. • Dependency on technology grew. [5]

<b>2.1.3. Nutrition </b>

<i><b>What is Nutrition? </b></i>

<i>Nutrition is a branch of science that studies the nutrients found in foods and their </i>

effects on the body. Nutrition is also an important aspect of health and wellness. Proper nutrition aids in the development and maintenance of healthy bodies, as well as the prevention of future ailments. Nutrition and nutritional information are dealt with through several concepts such as calories, kilocalories, essential nutrients, and non-essential nutrients, macronutrients and micronutrients. [6]

<i><b>Nutrients and Foods </b></i>

<i>Energy intake </i>

</div><span class="text_page_counter">Trang 23</span><div class="page_container" data-page="23">

The energy balance equation summarizes energy consumption and expenditure, as well as any changes in the body's energy storage (e.g., fat, protein, glycogen):

<b>Energy consumed – Energy expended = Change in energy stores </b>

• The elements of the equation are often denoted in units such as kilocalories (kcal), kilojoules (kJ), or megajoules (MJ), typically presented per unit of time, such as kcal per day.

• 1 kcal = 4.184 kJ, and 1 kJ = 0.239 kcal.

• The International System of Units recommends the use of kJ and MJ as units; nevertheless, kcal, a measure of heat, is commonly employed. [7]

As indicated by the above equation, energy requirements are directly related to energy expenditure. This is determined by factors influencing basal metabolic rate, including body size, age, gender, and level of physical activity. For instance, the estimated average needs (EARs) for energy intake in the United Kingdom (2011) are outlined in Table 2.1. [7]

<i>Table 2.1. Estimated Average Requirement (EAR) values for energy intake among adults in the United Kingdom [7] </i>

<b>Age range (years) </b>

<b>Height (cm) </b>

<b>EAR (MJ/d (kcal/d))* </b>

<b>Height cm </b>

<b>EAR (MJ/d (kcal/d))* </b>

</div><span class="text_page_counter">Trang 24</span><div class="page_container" data-page="24">

<i>The term "nutrient" refers to any substance derived from food that facilitates </i>

growth, development, or homeostasis. What sets nutrients apart from medications or other beneficial non-nutrient chemicals is their integration into functional or structural molecules within the body. Nutrients are categorized as either essential or non-essential. [7]

<i>Essential nutrients are incapable of being synthesized by the body from other </i>

substances and must be acquired through dietary sources. Examples include essential fatty acids, essential amino acids, vitamins, and specific dietary minerals. A nutritionally complete diet provides adequate amounts of each essential component, ensuring normal growth, development, and homeostasis without causing deficiency or toxicity. [7]

<i>Non-essential nutrients, on the other hand, are those the body can produce. Many </i>

fatty acids and amino acids are not obligatory in the diet and can be synthesized from basic precursor molecules or modified to meet metabolic requirements. [7]

<i>Macronutrients: </i>

Based on their chemical composition, the compounds that produce the majority of energy can be divided into three major macronutrients:

• Protein • Fat

• Carbohydrate

Due to losses incurred during food utilization, the entirety of the energy in food is not fully accessible for human metabolism. Consequently, we evaluate the 'metabolizable energy' that is actually available to humans. Table 2.2 illustrates that macronutrients and alcohol exhibit differing amounts of metabolizable energy. [7]

</div><span class="text_page_counter">Trang 25</span><div class="page_container" data-page="25">

<i>Table 2.2. Presents metabolizable energy conversion factors for various nutrients and alcohol. [7] </i>

<b>Macronutrients and alcohol Energy (kcal/g) </b>

<i>Foods: </i>

<i>Food Groups: </i>

Although nutrition has traditionally been analyzed chemically through its constituent nutrients, our dietary intake is experienced through foods, a classification that resonates more intuitively with the general public. Public health dietary recommendations are increasingly framed in terms of foods and food groups, as exemplified by initiatives like the Public Health England 5-A-Day message and the Eatwell Guide [7] shown in Figure 1.

</div><span class="text_page_counter">Trang 26</span><div class="page_container" data-page="26">

<i>Figure 1. The UK Eatwell Guide [7] Food components: </i>

All foods can be divided into their nutrient components; however, nutrient content can vary significantly amongst different kinds of the same food. Furthermore, keep in mind that foods are more than just nutrient bundles. Common ingredients in daily dishes include:

• Proteins, lipids, carbs, vitamins, and minerals are examples of nutrients. • Non-nutrient substances that occur naturally, such as flavonoids in berry fruits

or phytosterols in vegetable oils.

• Toxins present in nature, like hydrogen cyanide in almonds or aflatoxins in peanut butter.

• Externally introduced substances intentionally added to foods, such as preservatives, colorants, or flavorings.

• Industrial pollutants, including heavy metals or polychlorinated biphenyls. • Foodborne pathogens and commensal microorganisms are examples of

</div><span class="text_page_counter">Trang 27</span><div class="page_container" data-page="27">

<i>Traditionally, dietary adequacy has been gauged primarily in terms of nutritional </i>

sufficiency. However, the scientific community now acknowledges the significance of considering foods and overall dietary patterns. Consequently, this section provides a concise framework for nutritional requirements, initially emphasizing nutrient sufficiency, and subsequently delves into broader dietary considerations related to foods and dietary patterns. The latter approach includes a brief overview of diverse food-based approaches to achieve dietary adequacy, such as food-based guidelines. [8]

<i>What are Nutritional Requirements? </i>

The nutritional requirement refers to the specific amount of each nutrient needed by the human body. These requirements vary for each nutrient and also fluctuate among individuals and different stages of life. [8]

<i>Nutritional Requirements </i>

The notion of population nutritional requirements has roots that extend back several centuries, with the first documented norm likely emerging in the United Kingdom during the 1862 economic crisis to address hunger among the unemployed population. In the subsequent 50 years, entities like the British Royal Society, the League of Nations Health Organization, and the Canadian Council on Nutrition issued further recommendations in this regard. [8]

In the UK, examples of nutritional requirements are delineated through a set of Dietary Reference Values (DRVs). These values provide estimates of the amount of energy and nutrients needed at a population level, specifically targeting groups of healthy individuals. It's crucial to emphasize that these DRVs do not serve as individual recommendations or goals. The summary of these values is presented in Figure 2, and they are defined as follows:

</div><span class="text_page_counter">Trang 28</span><div class="page_container" data-page="28">

<i>Figure 2. Dietary reference values definitions [8] Food-based guidelines: </i>

Dietary guidelines based on foods incorporate nutritional recommendations into statements about specific food choices. Numerous countries adopt national food models, such as a pyramid or plate, to simplify the complexities of dietary reference values and food-based guidelines, presenting them in a visually comprehensible format. [8]

<i>Food Pyramids: </i>

Illustrated in Figure 3 is an example of a food pyramid, where each pyramid is divided into six groups, each forming a distinct layer. The base layer, occupying the largest section of the pyramid, represents the food category that should be consumed in the highest quantities, such as "vegetables, salad, fruit." Conversely, the top, which is narrower, symbolizes the group that should be consumed in lesser amounts, such as "sugary meals, beverages, and crisps." [8]

</div><span class="text_page_counter">Trang 29</span><div class="page_container" data-page="29">

<i>Figure 3. Example on Food Pyramids [8] </i>

<b>Dietary reference value tables </b>

The subsequent sections offer details on dietary reference values in the United Kingdom.

<i>Macronutrients are energy, fat, carbs, and protein: </i>

<i>Table 2.3. Estimated Average Requirements (EAR) for energy (per day) across age groups [8] </i>

</div><span class="text_page_counter">Trang 30</span><div class="page_container" data-page="30">

<b>45-54 </b> 10.8 2581 8.8 2103

<i>Carbohydrate and Fat: </i>

<i>Table 2.4. Carbohydrate and fat as a percentage of energy intake [8] </i>

<b>% Daily Food Energy </b>

<i>Dietary fibre: </i>

<i>Table 2.5. Recommended intake of fiber by age group table [8] </i>

<i>Table 2.6. Reference Nutrient Intake of protein for children table [8] </i>

</div><span class="text_page_counter">Trang 31</span><div class="page_container" data-page="31">

<i>What is diet variety, and what makes it crucial? </i>

Numerous studies assessing diets strive to gauge habitual dietary intake, representing the average long-term consumption of specific foods or nutrients within the studied group of people. Measuring habitual intake proves highly challenging due to the fluctuations in food availability. Dietary variations encompass:

• There are variations in dietary consumption among individuals individual variation).

(between-• There are differences in food intake for the same individual over time (within-individual variation).

When selecting a method for dietary assessment and during the data analysis stage, it is crucial to take into account both the between-individual and within-individual diet variation. Figure 4 illustrates hypothetical data for daily energy intake for five individuals over four days of measurement. [9]

<i>Figure 4. Hypothetical data for daily energy intake for 5 individuals across 4 days of measurement [9] </i>

</div><span class="text_page_counter">Trang 32</span><div class="page_container" data-page="32">

The precision of the prevalence estimate may fluctuate, either resulting in an underestimation or overestimation, depending on the population average illustrated in Figure 5. The extent and direction of this bias are influenced by factors like the particular nutrient being examined, the assessment methodology employed, and the characteristics of the studied population.

<i>Figure 5. Hypothetical histograms of nutrient intakes in a population [9] </i>

<i><b>Calories </b></i>

<i>Definition: </i>

<i>Calories serve as a unit of energy measurement, utilized to assess the nutritional </i>

content of foods consumed. Specifically, they represent the amount of energy needed to raise the temperature of one gram of liquid water by one degree Celsius. For example, a twelve-ounce soft drink with 160 calories contains sufficient energy to increase the temperature of 160 grams of water by one degree Celsius. In the body, food is metabolized into calories, providing the energy necessary for sustaining life

<i>and engaging in various activities. [10] </i>

• 1 kcal = 1 Calorie = 1 Cal

• 1 kcal = 1000 calories = 1000 cal

• But the way people often use it is 1 kcal = 1 calorie = 1 calorie

All foods and drinks (except water) contain a certain amount of calories, depending on the substances: [10]

• Starch • Protein

</div><span class="text_page_counter">Trang 33</span><div class="page_container" data-page="33">

• Fat • Fiber For example,

• 1g carbs = 4 calo • 1g protein = 4 calo • 1g fat = 9 calo [10]

<i>Function of Calories </i>

As previously stated, the quantity of calories in a food is a measure of how much potential energy the dish contains. Food is a synthesis of these three fundamental elements. So, if you know how many carbohydrates, lipids, and proteins are in a certain food, you can calculate how many calories or energy it contains. [11]

These chemicals are subsequently carried to the cells by blood arteries. In cells, they select:

• The body absorbs it for rapid usage.

• Is immediately introduced into the last stages of metabolism, where it chemically interacts with oxygen to release stored energy. [11]

<i>Each Person's Daily Calorie Requirement </i>

Children 2–3 years old: 1.000 calories

Children 4–8 years old: 1.200–1.400 calories Girls 9–13 years old: 1.600 calories

Boys 9–13 years old: 1.800 calories Girls 14–18 years old: 1.800 calories Boys 14–18 years old: 2.200 calories

Females from 19 to 30 years old: 2.000 calories Men from 19 to 30 years old: 2.400 calories Women from 31 to 50 years old: 1.800 calories Men from 31 to 50 years old: 2.200 calories Women over 51 years old: 1.600 calories Men over 51 years old: 2.000 calories.

The calorie count of ordinary ingredients that are regularly used in Vietnamese meals is shown above. Understand the calorie composition of foods so that you may construct a calorie calculator that works for you. [11]

</div><span class="text_page_counter">Trang 34</span><div class="page_container" data-page="34">

<b>2.2. Review of Existing Nutrition Websites </b>

Today, as society evolves, we face greater problems in maintaining a healthy and balanced lifestyle. Calorie management, food selection, and scientific menu planning have all become crucial aspects of daily life, particularly for individuals concerned about their health.

In fact, there have been a number of websites on the menu for users to integrate artificial intelligence (AI). Examples of Popular Nutrition Websites:

<b>2.2.1. Lose It! Website </b>

Best for those who want a structured approach with gamification and strong tracking features. May not be suitable for those who need more personalized

<b>guidance or those with disordered eating. </b>

<i>• Website: </i>

<i>• Strengths: Easy-to-use interface, large and active community, good for people </i>

with specific weight loss goals.

<i>• Weaknesses: Less emphasis on nutrition education and overall health, can be </i>

gamified to the point of unhealthy competition.

<i>Figure 6. Lose It! website [12] </i>

<b>2.2.2. Nutrino Website </b>

Ideal for individuals seeking personalized nutrition plans and detailed nutrient analysis. The subscription model might be a barrier for some users.

<i>• Website: </i>

</div><span class="text_page_counter">Trang 35</span><div class="page_container" data-page="35">

<i>• Strengths: Science-backed approach, focuses on individual needs, provides </i>

detailed nutritional insights.

<i>• Weaknesses: Can be expensive, requires genetic testing for full </i>

personalization, not as strong on community features.

<i>Figure 7. Nutrinohealth website [13] </i>

<b>2.2.3. Lifesum Website </b>

A good choice for those who enjoy social interaction and want a user-friendly meal planning tool. Accuracy of calorie information in recipes could be improved. [12]

<i>• Website: </i>

<i>• Strengths: Holistic approach to health, encourages healthy eating habits </i>

beyond calorie counting, user-friendly interface.

<i>• Weaknesses: Less focus on weight loss than Lose It!, not as personalized as </i>

Nutrinohealth.

</div><span class="text_page_counter">Trang 36</span><div class="page_container" data-page="36">

<i>Figure 8. Lifesum website [14] Table 2.7. Comparison features table </i>

<b>Main focus </b> Weight loss and calorie counting

Personalized nutrition and health coaching

Simple and friendly healthy eating

<b>Food tracking </b>

Large database, barcode scanner

Detailed nutrient breakdowns, food recommendations

Easy-to-use logging

<b>Meal plans </b> Yes, custom plans available with premium

Yes, personalized plans for specific goals

Yes, pre-made and custom plans available

subscription includes coaching

No

<b>Community </b> Active

community forums and challenges

community challenges

<b>Pricing </b> Free with ads, premium

memberships

Freemium, subscription for coaching

Free with ads, premium

membership

</div><span class="text_page_counter">Trang 37</span><div class="page_container" data-page="37">

<i>Table 2.8. Review Table </i>

<b>Current State </b>

Well-established, large user base, freemium model with

premium features

Emerging platform, focus on personalized nutrition,

subscription-based

Growing app, focus on social interaction and meal planning, freemium model

<b>User </b>

<b>Interaction & Experience </b>

Gamified approach, focus on daily calorie goals and tracking, large food database, progress charts

Personalized meal plans based on health goals and preferences,

extensive nutrient breakdown, recipe recommendations

Social features like challenges and recipe sharing, meal planner with grocery list

integration, barcode scanner

<b>Effectiveness & Impact </b>

Studies show significant weight loss and improved health markers with consistent use

Strong emphasis on personalized nutrition, potential for better long-term adherence

Focus on healthy habits and behavior change, may not be as effective for rapid weight loss

<b>Limitations </b>

Can be overly focused on calorie counting, may not be suitable for everyone (e.g., disordered eating)

Limited user base and data, subscription model may deter some users

Can be distracting with social features, accuracy of calorie information in recipes may vary

<b>2.3. Machine Learning </b>

<i>Machine Learning (ML) is a branch of artificial intelligence (AI) dedicated to </i>

developing computer algorithms that enhance their performance autonomously through experience and data analysis. In essence, machine learning enables

</div><span class="text_page_counter">Trang 38</span><div class="page_container" data-page="38">

computers to learn from data, enabling them to make decisions or predictions without requiring explicit programming for each specific task. [13]

TensorFlow and PyTorch are two frameworks commonly employed to expedite the development of machine learning algorithms. [13]

<b>2.3.1. Machine Learning vs Artificial Intelligence vs Deep Learning </b>

Artificial intelligence and deep learning are sometimes mistaken with machine learning. Let's see how these terms differ from one another. Check out comparative guides on AI versus machine learning and machine learning vs deep learning for a more in-depth look. [13]

<i>Artificial Intelligence refers to the development of programs that behave </i>

intelligently and replicate human intellect using a set of algorithms. In order to achieve optimum efficiency, the field concentrates on three skills: learning, reasoning, and self-correction. AI can refer to either machine learning-based or specifically written computer programs. [13]

<i>Machine learning is a branch of AI that makes predictions using algorithms that </i>

learn from data. These predictions can be derived using either supervised learning, in which algorithms learn patterns from known data, or unsupervised learning, in which algorithms uncover broad patterns in data. Based on previous data, ML models can forecast numerical values, classify events as true or false, and cluster data points based on similarities. [13]

<i>Deep learning, in contrast, is a subfield of machine learning that specifically </i>

focuses on algorithms predominantly built upon multi-layered artificial neural networks (ANN). These networks draw inspiration from the intricate structure of the human brain. [13]

<i>Figure 9. Comparing different industry terms [15] </i>

</div><span class="text_page_counter">Trang 39</span><div class="page_container" data-page="39">

<b>2.3.2. Types of Machine Learning </b>

Machine learning can be broadly categorized into three types based on the architecture of the learning system and the nature of the provided data: supervised learning, unsupervised learning, and reinforcement learning. [13]

<i><b>Supervised Learning: </b></i>

The most widespread form of machine learning is supervised learning. In this approach, the model is trained on a labeled dataset, where the data is accompanied by corresponding labels that the model endeavors to predict. These labels can range from category names to real-valued numbers.

Common examples of supervised learning algorithms for regression problems

<i>include Linear Regression, decision trees, and support vector machines. For </i>

classification problems, commonly used algorithms include logistic regression, decision trees, and support vector machines. [13]

<i><b>Unsupervised Learning: </b></i>

In contrast, unsupervised learning involves training the model on an unlabeled dataset, where the model is tasked with autonomously uncovering patterns and relationships within the data.

Commonly used unsupervised learning algorithms include k-means for clustering problems and Principal Component Analysis (PCA) for addressing dimensionality reduction challenges. [13]

<i>Figure 10. Comparing supervised and unsupervised learning [15] </i>

<i><b>Reinforcement Learning: </b></i>

</div><span class="text_page_counter">Trang 40</span><div class="page_container" data-page="40">

<i>Reinforcement learning is a type of machine learning in which an agent learns to </i>

make decisions through interaction with its environment. The agent's actions result in rewards or penalties (in the form of points), and its objective is to maximize the

<i>cumulative reward over time. </i>

Game playing, robotics, resource management, and many other applications are common examples of reinforcement learning. [13]

<b>2.3.3. Applications of Machine Learning </b>

Machine learning applications are all around us, often operating in the background to improve our lives. Here are some instances from actual life:

<i>Machine learning is used by Voice Assistants such as Siri, Alexa, and Google </i>

Assistant to interpret your voice commands and offer relevant responses. They are always learning from your encounters in order to improve their performance. [13]

<i><b>Fraud Detection </b></i>

Machine learning is used by banks and credit card firms to detect fraudulent transactions. They can detect suspicious activities in real time by evaluating patterns of normal and aberrant behavior. [13]

<i><b>Social Media </b></i>

<i>Machine learning is used by Social Media sites for a range of functions, including </i>

personalizing your feed and filtering out inappropriate content. [13]

<b>2.3.4. Roles of Artificial Intelligence (AI) in Nutrition </b>

The integration of artificial intelligence (AI) in health, biological sciences, and nutrition has witnessed notable growth. However, this widespread application has given rise to significant ethical questions across various fields. Therefore, the aim of this mini-review is to delineate AI applications in health, with a specific emphasis on nutrition, while also exploring the challenges and ethical considerations associated with its implementation. [14]

<i><b>Nutrigenomics and Personalized Nutrition </b></i>

</div>

×