Sei sulla pagina 1di 39

A

PRELIMINARY REPORT ON

“DIETOS : Personalized Diet Companion”

SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY, IN PARTIAL


FULFILLMENT OF REQUIREMENTS FOR
THE AWARD OF THE DEGREE
OF

BACHELOR OF ENGINEERING (COMPUTER ENGINEERING)

SUBMITTED BY

Vaibhav Bahirat Exam No:B151104201


Rajkumar Sable Exam No:B151104231
Sharlin Deshmukh Exam No:B151104204
Siddharth Kemkar Exam No:B151104247
Kirti Malji Exam No:B151104221

DEPARTMENT OF COMPUTER ENGINEERING


ABMSP’S ANANTRAO PAWAR COLLEGE OF ENGINEERING &
RESEARCH,
PARVATI,PUNE 411009
SAVITRIBAI PHULE PUNE UNIVERSITY
2018 -2019
Akhil Bharatiya Maratha Shikshan Parishad’s

Anantrao Pawar College of Engineering & Research,Pavati,Pune 411009


Approved by AICTE & Gov.of Maharashtra,Affiliated to Savitribai Phule pune University
Department of Computer Engineering

CERTIFICATE
This is to certify that the project report entitles

“DIETOS : Personalized Diet Companion”

Submitted by

Vaibhav Bahirat Exam No:B151104201


Rajkumar Sable Exam No:B151104231
Sharlin Deshmukh Exam No:B151104204
Siddharth Kemkar Exam No:B151104247
Kirti Malji Exam No:B151104221

is a bonafide student of this institute and the work has been carried out by him/her
under the supervision of Prof. Manoj Mulik and it is approved for the partial ful-
fillment of the requirement of Savitribai Phule Pune University, for the award of
the degree of Bachelor of Engineering (Computer Engineering).

(Prof. Manoj Mulik) (Prof. Manoj Mulik)


Guide Head,
Dept. of Computer Engg. Dept. of Computer Engg.

(Dr. S. B. Thakare)
Principal
Anantrao Pawar College of Engineering Research. Pune 09
Place:Pune
Date: / /2018
ABSTRACT

To determine the apps services, a situation-based design approach was adopted. Through
interviews and workshops with obese children, their parents and physicians, several require-
ments with a focus on diet behavior were identified: First, the app should recommend recipes
based on ingredients available at home, prioritize desired ingredients of the patients, and foster
a diverse meal plan based on the consumption history of previously chosen ingredients. Second,
as the users navigate. In addition to encouraging people to do more physical exercises, other
apps aim at helping people to optimize their nutrition intake. Obesity is a global issue and has
a direct impact on the public and private healthcare system. In this section we present various
examples of health applications that have the potential to support health-promoting behavior
in teenagers (for a comprehensive list of prototypes and preliminary studies on IT-supported
obesity intervention. For instance In this work we describe the design and evaluation of a novel
mobile health application that supports obese children and their parents to improve their diet in-
take. First results from quantitative app usage logs, questionnaires and interviews indicate that
the mobile health app provides relevant information to attain a balanced nutrition. A discussion
of the results and an outline of future work conclude this work.

i
ACKNOWLEDGEMENT

It is my privilege to acknowledge with deep sense of gratitude to my guide Prof.Manoj


Mulik for his valuable suggestions and guidance throughout my course of study and timely
help given to me in completion of my presentation.

I express my gratitude to Prof.Manoj Mulik (HOD Computer Engg. Dept.) and Prof. Dr.
S. B. Thakare (Principal) for their kind help and cooperation. I am highly obliged to the entire
staff of the Computer Engineering Department for their kind cooperation and help.

I also take this opportunity to thank my friends and family, who backed my interest by
giving useful suggestions and all possible help.

Vaibhav Bahirat (B151104201)


Rajkumar Sable (B151104231)
Sharlin Deshmukh (B151104204)
Siddharth Kemkar (B151104247)
Kirti Malji (B151104221)

ii
List of Figures

4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


4.2 DFD Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 DFD Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5 Use Case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.6 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.7 Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.8 E-R Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

iii
List of Tables

2.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

iv
Contents

Abstract i

Acknowledgment ii

List of Figures iii

List of Tables iv

1 INTRODUCTION 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Literature Survey 2

3 Software Requirements Specification 7


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.1 Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.2 User Classes and Characteristics . . . . . . . . . . . . . . . . . . . . . 7
3.1.3 Assumptions and Dependencies . . . . . . . . . . . . . . . . . . . . . 9
3.2 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.1 System Feature 1(Functional Requirement) . . . . . . . . . . . . . . . 9
3.2.2 System Feature 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 External Interface Requirements (If Any) . . . . . . . . . . . . . . . . . . . . 11
3.3.1 User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.2 Hardware Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.3 Software Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.4 Communication Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 11
3.4 Nonfunctional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4.1 Performance Requirements . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.2 Safety Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.3 Security Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.4 Software Quality Attributes . . . . . . . . . . . . . . . . . . . . . . . 13

v
3.5 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.1 Database Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.2 Software Requirements (Platform Choice) . . . . . . . . . . . . . . . 14
3.5.3 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 Analysis Models: SDLC Model to be applied . . . . . . . . . . . . . . . . . . 15
3.7 System Implementation Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 System Design 17
4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Data Flow Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 DFD Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5 Use Case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.6 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.7 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.8 E-R Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Other Specification 26
5.1 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6 Conclusions Future Work 28

vi
CHAPTER 1

INTRODUCTION

1.1 Motivation
In India, the numbers of mobile phone users are increasing at an enormous rate. As Android
became popular, there is a radical shift in the mobile phone market. On the other hand, users
have become more health-conscious and dieticians or nutrition experts are gaining prominence.
Nevertheless, people care about their familys health. So to converge all these paths into one, it
seemed that if a user can get information about a food product that the user comes across in a
supermarket, a suggestion that can help to make decision whether to buy the product and use it
or not. This can be done using a mobile phone supported with Android. This paper describes
the process and result of such an application Healthwise which has been named so to signify
main intentions.

• Application helps to protect users health wisely

• Application in terms of health.

1.2 Problem Definition


To design and implement a system that can recommend the daily diet for individual users ac-
cording to the current health parameters like age, gender, height, weight etc.
CHAPTER 2

Literature Survey

Though there exist numerous commercial offerings of applications targeting dietary improve-
ment and personal health tracking, data regarding the effectiveness of certain approaches are
better documented in academic studies, which will therefore form a foundation upon which
our product ideas are developed. Academic research in this area is very broad and often spans
multiple disciplines with research being published in the fields of pervasive and ubiquitous
computing, human computer interaction, nutrition and dietetics. The literature reviewed for
this project can be divided into 3 groups: the use of gaming to promote healthy eating, dietary
assessment using mobile aids and journaling methods incorporating phone cameras.

Gaming and Health

Research relating gaming to health has involved using various gaming mechanics to improve
user interaction and engagement in monitoring and improving their health. One method found
to educate people on nutrition is to allow them to challenge each other based on nutrition facts
in a casual social game setting. The advantage of casual social games is the ability to spur on
critical thinking outside of game play and although the game simplistic in nature, it shows the
notion of competition is a key driver that can be utilized to encourage continuous usage.
Building on the notion of casual social gaming, daily healthy water intake is shown to increase
by using a visual representation of the need to drink water in the form of a withering tree. How
healthy your tree is dependent on the amount of water consumed and results show improvement
with the visual aid both with and without other players.
This suggests the power of a visual representation to something normally that cannot be seen
such as the need for water. Although we may know we need to drink water and we may feel
thirsty, a visual cue and an external need (to save the tree from withering) is a stronger motiva-
tional tool that can push us to perform actions.
This concept is fully developed and tested through a virtual-pet based game targeted at a
younger audience. In this application, data entry is performed through images and users will
receive feedback on a -2 to 2 point scale with comments narrated by the pet. It was found that
DIETOS : Personalized Diet Companion

during the trial, children playing the game ate a healthy breakfast 52 percent of the time; kids
who didnt play it ate a healthy breakfast approximately only 20 percent of the time. Further-
more, both positive and negative feedback from the pet invokes a responsive action suggesting
that the motivational ability of the game comes from the emotional connection with the pet and
the ability to see the effects of their actions on the pet. The gaming mechanic from this study
was similar to the initial proposal for Food Fight which also revolves around the concepts of
virtual pets. However, the applications created for academic studies were not designed for pro-
longed use and thus did not consider user retention. For Food Fight, we proposed to incorporate
further gaming elements such as competition in the form of challenges for the virtual pet to
complete against friends.

Mobile Health
Tools Aside from research merging games and health, there are also a large number of studies
on using mobile devices for various uses in health and fitness. The growth of mobile phones in
recent years has allowed new methods for health-related applications to reach out to and assist
users. Saponites and Hyper fit are both studies involving a mobile application applications
serving as a reminder tool, meal planner and calorie tracker. Both of these applications contain
a large number of tools useful to the user and provide a portable and relatively easy method to
enable users to perform personal health tracking and diet management. Although user feedback
is positive, these types of applications are geared towards health conscientious users, as a signif-
icant amount of effort is required for input with no reward other than potential health gains. In
particular, the need to calculate portion sizes to enable calorie counting is a potential source of
high error to the resulting statistics shown by the application and studies have shown that calo-
rie counting/portion estimation improves if users are trained and use developed techniques. The
average user who does not have the initial motivation would unlikely to be willing to perform
these tasks and thus an application like Food Fight which is intended for all audiences must be
easy to use and require minimal effort form the user.

Camera based journal systems


One way to minimize user effort is to use the availability of camera in modern smartphones to
enable visual recording through food photography. However, the problem of food recognition
and portion estimation remains and attempts have been made to solve this via different meth-
ods. Using computer vision, researchers have shown that it is possible to segment and classify
foods with high accuracy under certain conditions. Furthermore, it is also possible to perform
volume estimation enabling the calculation of portion sizes and thus an estimation of calories
consumed. Although the research in this area is promising, and accuracy rates are shown to be
high, it is important to note that most experiments are performed under controlled environments
with a limited number of test data. In the real world, a mobile application using these algorithms
could be faced with an extremely wide variety of food in different combinations. A key issue

”APCOER, Department of Computer Engineering 2018-19” 3


DIETOS : Personalized Diet Companion

is the ability to segment or separate the image into different parts containing different foods
and this is clearly not possible with some meals such as seafood pasta. For these algorithms
to be used in publically distributed application, there must be contingencies in place when the
computer vision algorithms fail.
An alternative to computer vision is using crowdsourcing to perform the nutritional analysis
on the food images. In this study, a method of dividing the crowdsourcing tasks on Ama-
zon Mechanical Turk is outlined which improves the accuracy of the analysis performed by the
crowd-sourced workers. Thus, given an average user, the crowd-sourced solution would provide
a greater accuracy than if the user were to perform the portion estimation themselves. However,
a major drawback to this method is the inherent time delay between the user taking the photo
and the completion of the crowd-sourced tasks. Again, for users that are already motivated to
achieve their health goals, this would not be a major problem but for an average user without a
strong motivation, this delay would detract from their experience of the application and would
outweigh any efforts to inject interest or create engagement through game mechanics.

”APCOER, Department of Computer Engineering 2018-19” 4


DIETOS : Personalized Diet Companion

Literature Review

Sr. Name of Paper Publisher Authors Description


no
1 J. Pollak, G. Journal IEEE Per- John Pollak,Geri It’s never been more im-
Gay, S. Byrne, vasive Computing Gay,Sahara portant to teach youth the
E. Wagner, D. archive Volume 9 Byrne,Emily importance of healthy eat-
Retelny and L. Issue 3, July 2010 Wagner,Daniela ing habits. Time to
Humphreys, ”It’s Retelny, Lee Eat, a mobile-phone-based
Time to Eat! Humphreys game, motivates children
Using Mobile to practice healthy eating
Games to Promote habits by letting them care
Healthy Eating,” for a virtual pet. Play-
Pervasive Com- ers send the pet photos
puting, IEEE, vol. of the food they con-
9, pp. 21-27, 2010. sume throughout the day;
the food’s healthiness de-
termines the game’s out-
come.
2 ”DietCam: Au- Pervasive and F. Kong and J. Tan, This paper presents a mo-
tomatic dietary Mobile Comput- bile phone based system,
assessment with ing 8(1):147-163 DietCam, to help assess
mobile camera February 2012 food intakes with few hu-
phones,” Perva- man interventions. Diet-
sive and Mobile Cam only requires users
Computing, 2011. to take three images or
a short video around the
meal, then it will do the
rest. The experiments of
DietCam in real restau-
rants verify the possibility
of food recognition with
vision techniques.

Table 2.1: Literature Review

”APCOER, Department of Computer Engineering 2018-19” 5


DIETOS : Personalized Diet Companion

Sr. Name of Paper Publisher Authors Description


no
3 ”The use of mobile IEEE journal of Fengqing Zhu, In this paper, we describe
devices in aiding selected topics in Marc Bosch, Insoo a novel mobile telephone
dietary assessment signal processing Woo, SungYe food record that will pro-
and evaluation,” Kim, Carol J vide an accurate account
Selected Topics in Boushey, David S of daily food and nutrient
Signal Processing. Ebert, Edward J intake. Our approach in-
Delp cludes the use of image
analysis tools for identi-
fication and quantification
of food that is consumed at
a meal. Images obtained
before and after foods are
eaten are used to estimate
the amount and type of
food consumed.
4 New technology Proceedings of Phyllis J. Stumbo This paper describes six
in dietary assess- The Nutrition projects sponsored by the
ment: A review Society 72(1):70-6 United States National In-
of digital methods February 2013 stitutes of Health that use
in improving food digital methods to improve
record accuracy food records and two mo-
bile phone applications us-
ing crowdsourcing. The
techniques under develop-
ment show promise for im-
proving accuracy of food
records.

”APCOER, Department of Computer Engineering 2018-19” 6


CHAPTER 3

Software Requirements Specification

3.1 Introduction
A Software requirements specification document describes the intended purpose, requirements
and nature of software to be developed. It also includes the yield and cost of the software.
A Software Requirements Specification (SRS) is describes the nature of a project, software
or application. In simple words, SRS is a manual of a project provided it is prepared before
you kick-start a project/application. A software document is primarily prepared for a project,
software or any kind of application.

3.1.1 Project Scope


The product is an android application used to manage daily mess attendance along with stream-
lining rebate and menu selection processes. Objective of the system is to provide a user-friendly
daily attendance system that is easy to manage, maintain and query. Our primary focus is to de-
velop a paperless system that provides the management a way to facilitate smoother functioning
of the mess system.

3.1.2 User Classes and Characteristics


Goal

To design products that satisfy their target users, a deeper understanding is needed of their
user characteristics and product properties in development related to unexpected problems users
face. These user characteristics encompass cognitive aspect, personality, demographics, and use
behavior. The product properties represent operational transparency, interaction density, prod-
uct importance, frequency of use and so on. This study focuses on how user characteristics and
product properties can influence whether soft usability problems occur, and if so, which types.
The study will lead to an interaction model that provides an overview of the interaction between
DIETOS : Personalized Diet Companion

user characteristics, product properties, and soft usability problems.

Method and results

In total three surveys and one experiment were conducted. The first survey was a question-
naire survey to explore what usability problems users experienced in the Netherlands and South
Korea. This study resulted in the categorization of soft usability problems. The second sur-
vey investigated how user characteristics are related to the occurrence of specific soft usability
problems. Finally, an experiment was conducted to find out how user characteristics are corre-
lated to specific soft usability problems depending on type of product in the USA, South Korea
and the Netherlands. Based on the findings from the studies, an interaction model (PIP model:
Product-Interaction-Persona model).were developed which provides insight into the interaction
between user characteristics, product properties, and soft usability problems. Based on this PIP
model a workshop and an interactive tool were developed. Companies can use the PIP model
to gain insights into probable usability problems of a product they are developing and the char-
acteristics of those who would have problems using the product.

Validation

The PIP model was validated in the companies involved in the project to see how it is used
in the product development process and what should be improved. The validation also included
workshops in which designers in the companies could experience and learn how the findings
and the model and the tool are applicable to their design process.

Design and Implementation constraints

This protocol is implemented in Java language .We also use HTTP/TCP/IP protocols.

Java has had a profound effect on the Internet. The reason for this is Java expands the
universe of objects that can be about freely on the Internet. There are two types of objects we
transmit over the network, passive and dynamic.

Network programs also present serious problems in the areas of security and portabil-
ity. When we download a normal program we risk viral infection. Java provides a firewall to
overcome these problems. Java concerns about these problems by applets. By using a Java
compatible Web browser we can download Java applets without fear of viral infection.

”APCOER, Department of Computer Engineering 2018-19” 8


DIETOS : Personalized Diet Companion

3.1.3 Assumptions and Dependencies


We assume that there are several servers and clients attached to it. User system supports TCP/IP
protocols.
The key considerations of Java are :

• Object Oriented: Java purists everything is an object paradigm. The java object model is
simple and easy to extend.

• Multithreaded: Java supports multithreaded programming which allows you to write pro-
grams that do many things simultaneously.

• Architecture-Neutral: the main problem facing programmers is that no guarantee that if


you write a program today, it will run tomorrow, even on the same machine. Java language
and JVM solves this problem, their goal is to provide Write once; Run anywhere anytime
forever.

• Distributed: Java is designed for the distributed environment of the Internet because it
handles TCP/IP protocols.

3.2 Functional Requirements


• System must be fast and efficient

• User friendly GUI

• Reusability

• Performance

• System Validation input

• Proper output

3.2.1 System Feature 1(Functional Requirement)


In the supermarket, user comes across a packed food product. Application can be used to cap-
ture barcode. If the lens is unable to focus barcode due to bad light or any other reasons, user
can enter the barcode manually in the space provided. Mobile fetches nutritional information of
the product from the server. Since this data is huge, it is stored in the server called as Nutrition
Server. If the user wishes to buy it, user can check if it suits the calorie requirements for that
day. Again the mobile interacts with server to get suggestions and displays it on the screen.

”APCOER, Department of Computer Engineering 2018-19” 9


DIETOS : Personalized Diet Companion

This application has been divided into three modules: Requirement module, Nutrition module,
and Exercise module.

Requirement Module
This module contains functions to create user profiles, update user profiles and store them in
phones storage area. When the user installs the application, welcome screen is displayed with
options to create a profile. User can do so by using a form provided and is stored in phones
Database. Once the profile is created, there is an option to update or delete the profile. For ev-
ery action, suitable toast messages are popped up to help the user. The database contains tables
such as Nutrition Requirements for an individual, product information, a daily log to keep log
of users consumption information and exercise chart that contains suggested exercises to burn
calories.

Diet Recommendation Module


This module contains functions to capture/enter barcode, retrieve information, check the amount
energy the user can consume in a day, and add it to the database. After the profile is created, user
can capture the barcode. After the barcode is captured, if the product is stored in database, then
its details are fetched from the server using Web Services. The protocol used is Simple Object
Access Protocol (SOAP). SOAP makes object access simple by allowing applications to invoke
object methods or functions, residing on remote servers. A SOAP application creates a request
block in XML, supplying the data needed by the remote method as well as the location of the
remote object itself. Though Android SDK does not provide SOAP library, but ksoap library
available online, which is easy to understand and implement, can be included. The suggestions
are displayed in green colour, to signify that user is within allowed energy limits and user can
consume the product and if the suggestions are in red colour, it signifies user has exceeded the
limit [Table 2]. So the user can decide whether to buy the product or not, for own consumption
or any of family members. Time of consumption is also provided breakfast, lunch or dinner. In
future, expecting that most of the food products come with bar-coded packets in India, this can
work very effectively. When user clicks add button indicating that food was consumed, then it
is added into the daily log maintained in the server. Mail is sent to the user, provided at the time
of registration, about the product consumed and the time of consumption.

Exercise Module
This module has functions to store the exercises and the calories they burn, and fetch proper
exercise to burn the calories which the user has gained in excess.

”APCOER, Department of Computer Engineering 2018-19” 10


DIETOS : Personalized Diet Companion

3.2.2 System Feature 2


a) To develop an application, an Integrated Development Environment (IDE) is required. The
choice selected is Eclipse Indigo IDE.
b) For an Android application development, Android SDK and Android Virtual Device(Emulator)
are essential.
c) A new android project is created to develop layouts and code the business logic for the same.
d) A Java project is created to code the web services part and for accessing the database.
e) To develop this application, we mainly import an open source library ZXing. ZXing (pro-
nounced ”zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing
library implemented in Java, which ports to other languages. This library currently supports
these formats: UPC-A and UPC-E, EAN-8 and EAN-13, Code 39, Code 93, Code 128, QR
Code, ITF, Coda bar, RSS-14 (all variants), Data Matrix, PDF 417 (’alpha’ quality), Aztec
(’alpha’ quality).

3.3 External Interface Requirements (If Any)

3.3.1 User Interfaces


The Interface will be in the form of an application. It is designed to be functional and minimal
in its styling. All options will be displayed in a menu based format. Android app will be used
to setup the page layout and add minimal styling to make the interface user friendly.

3.3.2 Hardware Interfaces


A webserver will be required so that the students and the mess admin can connect to it to
exchange information. The servers have a database to store all the data entries. The Server will
have to have a high speed 1 Gigabit Ethernet connection to the college’s local network.

3.3.3 Software Interfaces


The server will be hosted using Apache Tomcat Webserver (Version 8.0.14). It will also have
a MySQL relational database. The main backend processing will be done using Java Server
Pages (JSP) including connecting to and accessing the database and processing requests.

3.3.4 Communication Interfaces


The main communication protocol will be Hyper Text Transfer Protocol (HTTP). This will be
used to transfer information back and forth from the client to the server. HTTP GET and POST

”APCOER, Department of Computer Engineering 2018-19” 11


DIETOS : Personalized Diet Companion

will be used to send the information.

3.4 Nonfunctional Requirements


• Accessibility

• Capacity, current and forecast

• Compliance

• Documentation

• Disaster recovery

• Efficiency

• Effectiveness

• Extensibility

• Fault tolerance

• Interoperability

• Maintainability

• Privacy

• Portability

• Quality

• Reliability

• Reliability

• Resilience

• Response time

• Robustness

• Scalability

• Security

• Stability

”APCOER, Department of Computer Engineering 2018-19” 12


DIETOS : Personalized Diet Companion

• Supportability

• Testability

3.4.1 Performance Requirements


The only way in which systems will meet their performance targets is for them to be specified
clearly and unambiguously. It is a simple fact that if performance is not a stated criterion of the
system requirements then the system designers will generally not consider performance issues.
While loose or incorrectly defined performance specifications can lead to disputes between
clients and suppliers. In many cases performance requirements are never ridged as system
that does not fully meet its defined performance requirements may still be released as other
consideration such as time to market.
In order to assess the performance of a system the following must be clearly specified:

• Response Time

• Workload

• Scalability

• Platform

3.4.2 Safety Requirements


This Specification shall be sufficient detailed to allow the design and implement to achieve the
required safety integrity and allow an assessment of functional safety.

3.4.3 Security Requirements


We provide authentication and authorization by passwords for each level of access.
We implement IDEA algorithm for secure data transmission.

3.4.4 Software Quality Attributes


Product is portable; it can run between only two connected systems or a large Network of
computers. Product is maintainable; i.e. in future the properties of the product can be changed
to meet the requirements.

3.5 System Requirements


• Processor:- Intel Pentium 4 or above

”APCOER, Department of Computer Engineering 2018-19” 13


DIETOS : Personalized Diet Companion

• Memory:- 2 GB or above

• Other peripheral:- Printer

• Hard Disk:- 500gb

3.5.1 Database Requirements


• It should be SQLite database on platform.

• Database must be integrated with key constraints

• It should be maintain the relational base on RDMS and normalization

• System will create database backup on periodic basis.

• It will execute all commands like DML, DDL and DCL as well as we required some
security measurements for sql injection.

3.5.2 Software Requirements (Platform Choice)


Technologies and tools used in Policy system project are as follows Technology used:

Front End

• Android DSK 4.5

• Internet Explorer 6.0/above

• Tool :Eclipse or net beans

• Android, java

Back-End

• SQLite

3.5.3 Hardware Requirements


• Processor:- Intel Pentium 4 or above

• Memory:- 2 GB or above

• Other peripheral:- Printer

• Hard Disk:- 500gb

”APCOER, Department of Computer Engineering 2018-19” 14


DIETOS : Personalized Diet Companion

3.6 Analysis Models: SDLC Model to be applied


Agile SDLC model is a combination of iterative and incremental process models with focus on
process adaptability and customer satisfaction by rapid delivery of working software product.
Agile Methods break the product into small incremental builds. These builds are provided in
iterations. Each iteration typically lasts from about one to three weeks. Every iteration involves
cross functional teams working simultaneously on various areas like
Planning
Requirements Analysis
Design
Coding
Unit Testing and
Acceptance Testing.

At the end of the iteration, a working product is displayed to the customer and important stake-
holders.

3.7 System Implementation Plan

”APCOER, Department of Computer Engineering 2018-19” 15


DIETOS : Personalized Diet Companion

”APCOER, Department of Computer Engineering 2018-19” 16


CHAPTER 4

System Design

4.1 System Architecture

Figure 4.1: System Architecture

• To design and implement a system which can recommend the food and diet for users
according to given input parameters.
DIETOS : Personalized Diet Companion

• Eating a balanced diet is vital for good health and wellbeing.

• Good nutrition is an important part of leading a healthy lifestyle. Combined with physical
activity, your diet can help you to reach and maintain a healthy weight, reduce your risk
of chronic diseases (like heart disease and cancer), and promote your overall health.

• We will be using the K-means algorithm for clustering of the diet plan.

”APCOER, Department of Computer Engineering 2018-19” 18


DIETOS : Personalized Diet Companion

4.2 Data Flow Diagrams

Figure 4.2: DFD Level 0

”APCOER, Department of Computer Engineering 2018-19” 19


DIETOS : Personalized Diet Companion

4.3 DFD Level 1

Figure 4.3: DFD Level 1

”APCOER, Department of Computer Engineering 2018-19” 20


DIETOS : Personalized Diet Companion

4.4 Sequence Diagram

Figure 4.4: Sequence Diagram

”APCOER, Department of Computer Engineering 2018-19” 21


DIETOS : Personalized Diet Companion

4.5 Use Case diagram

Figure 4.5: Use Case diagram

”APCOER, Department of Computer Engineering 2018-19” 22


DIETOS : Personalized Diet Companion

4.6 Class Diagram

Figure 4.6: Class Diagram

”APCOER, Department of Computer Engineering 2018-19” 23


DIETOS : Personalized Diet Companion

4.7 Activity Diagram

Figure 4.7: Component Diagram

”APCOER, Department of Computer Engineering 2018-19” 24


DIETOS : Personalized Diet Companion

4.8 E-R Diagram

Figure 4.8: E-R Diagram

”APCOER, Department of Computer Engineering 2018-19” 25


CHAPTER 5

Other Specification

5.1 Advantages
• It is popular nutrition apps and to compare their strategies and technologies for dietary
assessment and user feedback.

• User can make a diet plan according to his workout.

• It is work like best health doctor without any technician

5.2 Limitations
We acknowledge that the Google Play Store and the iTunes App Store have different app-
ranking systems and market share. Hence, using the lowest number of reviews for the included
Google Play Store apps as a threshold for including apps from the iTunes App Store may not
reflect the number of downloads from the iTunes App Store. It is difficult to directly compare
app popularity between the two stores, as the number of downloads from the iTunes App Store
is not publically available. As the Google Play Store does not provide the exact number of
installs, it is possible that some apps in the range 500,000-1m could have approached 1 million
installs. The criteria used to select the apps were based on the number of installs and reviews.
Using these variables alone, it was not possible to identify the frequency and duration of use
of these apps. This information would be valuable to measure the real engagement of the users
and determine if they would accept the burden of text searching and barcode scanning for a
prolonged period. It would also be interesting to assess the percentage of users that upgraded to
the premium versions of the apps. Since it is not possible to measure the upgrades, the premium
versions were not considered popular and their extra functionalities were not included in this
review. A similar limitation occurred with the WW app, which requires a subscription [9]. Since
the functionalities of these apps change rapidly, it is recommended that a similar assessment be
conducted in the future
DIETOS : Personalized Diet Companion

5.3 Applications
• Food Recommender.

• MyGymFood Application

• My Food Plan application

”APCOER, Department of Computer Engineering 2018-19” 27


CHAPTER 6

Conclusions Future Work

The high number of installs indicates that there is a clear interest and opportunity for diet mon-
itoring and recommendation using mobile apps. All the apps collecting dietary intake used the
same nutrition assessment method (ie, food diary record) and technologies for data input (ie,
text search and barcode scanner). Emerging technologies, such as image recognition, natural
language processing, and artificial intelligence, were not identified. None of the apps had a
decision engine capable of providing personalized diet advice.

Future Work

To implement a system in different platform like iphone, web applications as well as various
technologies.
DIETOS : Personalized Diet Companion

Appendix A:

Time complexity with NP Complete


Case 1: P System
If there is no time difference with x, it means eTime is similar to x, we can say that system is
has categorized into P system.

Case 2: NP Hard System

If there is difference with x, it means eTime is max or high that x time, we can say that system
is has categorized into NP Hard system

Case 3: NP Complete System

If there is difference with x, it means eTime is min or lower that x time, we can say that system
is has categorized into NP Complete system According to above case 1, 2 and 3 our system has
classified into NP complete on the basis of below equation.


elapsed[time] = ∑ (e[time]) (6.1)
n=1


f (x) = ∑ (e[time]) (6.2)
n=1

is the constant of existing systems time, it might be constant? Here For the proposed
system, we define p as x time for execution of proposed system with all operations. The system
has executed under the x time, that why the proposed system is NP Complete system. Basically,
our p is considerable polynomial time and whole system complete the execution, behalf of the
x time.
So, we can conclude base on below statement.

If (elapsed Time < x && p > elapsed Time)

and our analysis graphs fulfill the proposed statement as true. The proposed problem is NP
complete problem.
There are two types of problems: Polynomial (P):

The system accepts input, and we get the output in fixed polynomial time, the input large or
small, or simple or complex. Applications of polynomial type are rare. One such example is
hash table. A hash table finds index for a data to be inserted in fixed amount of time because its

”APCOER, Department of Computer Engineering 2018-19” 29


DIETOS : Personalized Diet Companion

uses hash function to find index. So, for finding index 1 or 100 the time is fixed, which is not in
case of sequential search for index.

Our application is not of type P because if does not give result in fixed polynomial time.

Non-Polynomial (NP):
There are two sub-types of NP Problems:

1. NP-Hard:
The system accepts input, but there is no guarantee that we will get the output. Such systems do
not exist because no one will use the system if there is no guarantee the system works for any
inputs. Hence our application is again not of NP-Hard type because we want to build a system
that never fails and guarantees output.

Eg: Turing Machine Halting problem.

2. NP-Complete:
Our application is NP-Complete. The system accepts input, and we get the output in variable
non-polynomial time. Almost all or maximum systems are of NP-Complete type. Even our
application is of NP complete type because it guarantees output but not in fixed amount of time.
Now our output time varies because of the input. In our system user can get file in variable time
interval depending upon file size. If attribute set is matched with owners attribute set than only
file will be accessible to user. This is done in variable time.
Thus in our application there is guarantee that we get output. Hence our application is NP-
complete.

”APCOER, Department of Computer Engineering 2018-19” 30


DIETOS : Personalized Diet Companion

Appendix B:

[1] A. Grimes, V. Kantroo and R. E. Grinter, ”Let’s play!: Mobile health games for adults,”
in Proceedings of the 12th ACM International Conference on Ubiquitous Computing, 2010, pp.
241-250.
[2] M. C. Chiu, S. P. Chang, Y. C. Chang, H. H. Chu, C. C. H. Chen, F. H. Hsiao and J. C. Ko,
”Playful bottle: A mobile social persuasion system to motivate healthy water intake,” in Pro-
ceedings of the 11th International Conference on Ubiquitous Computing, 2009, pp. 185-194.
[3] J. Pollak, G. Gay, S. Byrne, E. Wagner, D. Retelny and L. Humphreys, ”It’s Time to Eat!
Using Mobile Games to Promote Healthy Eating,” Pervasive Computing, IEEE, vol. 9, pp. 21-
27, 2010.
[4] K. Patrick, W. G. Griswold, F. Raab and S. S. Intille, ”Health and the mobile phone,” Am.
J. Prev. Med., vol. 35, pp. 177, 2008.
[5] B. M. Silva, I. M. Lopes, J. J. P. C. Rodrigues and P. Ray, ”SapoFitness: A mobile health
application for dietary evaluation,” in E-Health Networking Applications and Services (Health-
com), 2011 13th IEEE International Conference On, 2011, pp. 375-380.
[6] P. Jarvinen, T. Jarvinen, L. Lahteenmaki and C. Sodergard, ”HyperFit: Hybrid media in
personal nutrition and exercise management,” in Pervasive Computing Technologies for Health-
care, 2008. PervasiveHealth 2008. Second International Conference On, 2008, pp. 222-226.
[7] C. K. Martin, S. D. Anton, E. York-Crowe, L. K. Heilbronn, C. VanSkiver, L. M. Redman,
F. L. Greenway, E. Ravussin and D. A. Williamson, ”Empirical evaluation of the ability to learn
a calorie counting system and estimate portion size and food intake,” Br. J. Nutr., vol. 98, pp.
439-444, 2007.
[8] F. Kong and J. Tan, ”DietCam: Automatic dietary assessment with mobile camera phones,”
Pervasive and Mobile Computing, 2011.
[9] F. Zhu, M. Bosch, I. Woo, S. Y. Kim, C. J. Boushey, D. S. Ebert and E. J. Delp, ”The use
of mobile devices in aiding dietary assessment and evaluation,” Selected Topics in Signal Pro-
cessing, IEEE Journal Of, vol. 4, pp. 756-766, 2010.
[10] J. Noronha, E. Hysen, H. Zhang and K. Z. Gajos, ”Platemate: Crowdsourcing nutritional
analysis from food photographs,” in Proceedings of the 24th Annual ACM Symposium on User
Interface Software and Technology, Santa Barbara, California, USA, 2011, pp. 1-12.

”APCOER, Department of Computer Engineering 2018-19” 31

Potrebbero piacerti anche