Sunteți pe pagina 1din 41

FB Chatbot

A PROJECT REPORT
Submitted By
Kharecha Maulik (140770107055)
Shah Shivani (150773107044)
Bhavsar Rajvi (150773107005)

In fulfilment for the award of the degree of

BACHELOR OF ENGINEERING
In

Computer Engineering

SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY


OPP. BHAGWAT VIDYAPITH, NEAR GOTA CROSS ROAD,
AHMEDABAD-382481
Candidate’s Declaration
We hereby declare that project report titled “FB Chatbot” submitted towards the completion
of project in 7th semester of bachelor of Computer Engineering in Silver Oak College Of
Engineering & Technology, Ahmedabad is an authenticate record of our work carried out.

We further declare that to the best of our knowledge the report of C.E. 7th semester.

Candidate’s signature :
First candidates name : Kharecha Maulik
Branch : CE
Enrollment Number : 140770107055
Candidate’s signature :
First candidates name : Shah Shivani
Branch : CE
Enrollment Number : 150773107044
Candidate’s signature :
First candidates name : Bhavsar Rajvi
Branch : CE
Enrollment Number : 150773107005

Submitted to:
Silver Oak College Of Engineering & Technology, Ahmedabad
Affiliated to:
Gujarat Technology University
Acknowledgement
We are heartily thankful to my supervisor, Mr. Aakash Shah, whose encouragement,
supervision and support from the preliminary to the concluding level enabled me to develop
an understanding of the subject. At the end, we offer my regards and blessings to all of those
who supported us in any respect during the completion of the project and to our college for
providing a resources and materials.
Abstract
FB Chatbot is a computer program which conducts a conversation via textual method. In this
project, we are going to develop the PHP based software which involves interactive agent.
A chatterbot or chatbot aims to make a conversation between both human and machine. The
machine has been embedded knowledge to identify the sentences and deciding itself as
response to answer a question. The response principle is matching the input sentence from
user. From input sentence, it will be scored to get the similarity of sentences, the higher score
obtained the more similar of reference sentences. The sentence similarity calculation in this
paper using bigram which divides input sentence as two letters of input sentence. The
knowledge of chatbot are stored in the database. The chatbot consists of core and interface
that is accessing that core in relational database management systems (RDBMS). The
database has been employed as knowledge storage and interpreter has been employed as
stored programs of function and procedure sets for pattern-matching requirement. The
interface is standalone which has been built using programming language of PHP.
List Of Figure

[Figure 1 Spiral modal] ......................................................................................................................... 5


[Figure 2 Pie Chart] .............................................................................................................................. 8
[Figure 3 Use-Case Diagram] ............................................................................................................. 19
[Figure 4 Activity Diagram] ............................................................................................................... 20
[Figure 5 Sequence Diagram] ............................................................................................................. 21
[Figure 6 E-R Diagram] ...................................................................................................................... 22
[Figure 7 Class Diagram] .................................................................................................................... 24
[Figure 9 Flow Chart] ......................................................................................................................... 32
[Figure 10 State Diagram] .................................................................................................................. 33
List Of Tables

[Table 1 Milestone and Deliverables] ................................................................................................... 7


[Table 2 User] ..................................................................................................................................... 25
[Table 3 Push messages] ..................................................................................................................... 26
[Table 4 Users].................................................................................................................................... 27
[Table 5 User Messages] ..................................................................................................................... 30
[Table 6 Users Push Messages] .......................................................................................................... 30
[Table 7 Users].................................................................................................................................... 30
Index
CHAPTER 1 ........................................................................................................................................ 1
INTRODUCTION............................................................................................................................... 1
1.1 Project Summary ................................................................................................................... 1
1.2 Purpose.................................................................................................................................. 1
1.3 Scope ..................................................................................................................................... 1
1.4 Technology and Literature Review ....................................................................................... 2
CHAPTER 2 ........................................................................................................................................ 4
PROJECT MANAGEMENT ............................................................................................................. 4
2.1 Project Planning and scheduling ................................................................................................. 4
2.1.1 Project Development Approach ........................................................................................... 4
2.1.2 Project Plan .......................................................................................................................... 5
2.1.3 Schedule Representation ...................................................................................................... 7
[Table 2.2 Project Plan] .................................................................................................................... 8
[Figure 2 Pie Chart] .......................................................................................................................... 8
2.2 Risk Management ....................................................................................................................... 9
2.2.1 Risk Identification ................................................................................................................ 9
2.2.2 Risk Analysis ....................................................................................................................... 9
2.2.3 Risk Planning ....................................................................................................................... 9
2.3 Estimation ................................................................................................................................... 9
2.3.1 Effort Estimation .................................................................................................................. 9
2.3.2 Cost Analysis ..................................................................................................................... 10
CHAPTER 3 ...................................................................................................................................... 14
SYSTEM REQUIREMENT STUDY .............................................................................................. 14
3.1 User Characteristics .................................................................................................................. 14
3.2 Hardware and Software Characteristics .................................................................................... 14
3.2.1 Hardware Requirements ..................................................................................................... 14
3.2.2 Software Requirements ...................................................................................................... 15
3.3 Constraints ................................................................................................................................ 15
3.3.1 Regulatory Policies ............................................................................................................ 15
3.3.2 Hardware limitation ........................................................................................................... 15
CHAPTER 4 ...................................................................................................................................... 16
SYSTEM ANALYSIS ....................................................................................................................... 16
4.1 Study of Current System ........................................................................................................... 16
4.2 Requirements of New System ................................................................................................... 16
4.2.1 Functional Requirements ................................................................................................... 16
4.2.2 Non-Functional Requirements ........................................................................................... 16
4.3 Feasibility Study ....................................................................................................................... 17
4.4 Requirements Validation .......................................................................................................... 17
4.5 Functions of System .................................................................................................................. 18
4.5.1 Use-Case ............................................................................................................................ 18
4.5.2 Activity Diagram................................................................................................................ 20
4.5.3 Sequence Diagram ............................................................................................................. 21
4.6 Data Modeling .......................................................................................................................... 22
4.6.1 E-R Diagram ...................................................................................................................... 22
4.6.3 Data Dictonary ................................................................................................................... 25
4.7 Main Modules of New System.................................................................................................. 28
4.8 Selection of Hardware and Software and Justification ............................................................. 28
4.8.1 Hardware ............................................................................................................................ 28
4.8.2 Software ............................................................................................................................. 28
4.8.3 Justification ........................................................................................................................ 28
CHAPTER 5 ...................................................................................................................................... 29
SYSTEM DESIGN ............................................................................................................................ 29
5.1 Database Design........................................................................................................................ 29
5.1.1 Mapping Objects / Classes of Tables ................................................................................. 30
5.2 System Procedural Design ........................................................................................................ 31
5.2.1 Designing Pseudo Code or Algorithm for Method or Operations ..................................... 31
5.2.2 Flow Chart ......................................................................................................................... 32
5.3 Data Modeling .......................................................................................................................... 33
5.3.1 State Chart Diagram ........................................................................................................... 33
GROUP-ID:1104 1.INTRODUCTION

CHAPTER 1

INTRODUCTION

1.1 Project Summary

 This technology which helps humans converse with computers via a computer
interface is gaining popularity in a variety of scenario, especially customer
service.
 Fb chatbot having a conversation data structure comprising plural conversation
path and each path having coded instructions and/or relationships with other
nodes.
 In this project, we are going to develop PHP based software which involves Fb
Chatbot.
1.2 Purpose

 The main purpose of invention is quick response and interactive conversation.


 There are many services are provided.
 It reminds you of any essential activities to be done by in a day.
 The automated virtual assistants are quite handy in completing difficult and tasks
that consume a lot of time.
1.3 Scope

Easier to learn and use:

 Chatbot strips an interface down to the most raw, meaningful experience possible.

 Besides, most users are already familiar with messaging interface.


More convenient:
 User are increasingly getting fed up with the overload of apps on their phones.

 Chatbots provide a more integrated experience allowing user to do a lot more


with fewer apps.

SOCET(CE) 1
GROUP-ID:1104 1.INTRODUCTION

1.4 Technology and Literature Review


 The front end used in our project is PHP and the back end used is MySql or
NoSQL.
 Tools used are WAMP, Sublime text 3, Messenger.
PHP:
 PHP is a server site scripting language.
 Full form of PHP is Hypertext Pre-processor.
 It is open source scripting language.
 PHP file contain text, HTML, CSS, Java Script and PHP code.
 PHP code are executed on the server so you need web browser to execute PHP
code.
 It is faster than other scripting language e.g. jsp and asp.net.
 It is very simple, faster, efficiency, security.

Laravel Framework:
 Laravel is a open source PHP web framework.
 The feature of Laravel are a modular packaging system and accessing a relational
database.
 ORM (object-relational mapping) is an advances PHP implementation of the
active record pattern and providing at the same time internal methods for
enforcing constraints on the relationship between database object.
Laravel Framework Feature:
There are many types of laravel framework feature:
 Entirely new dictionary structure.
 Routing caching.
 Inbuilt authentication system.
 Contracts.
 Multiple file system support.
 Improve methods injection.
Advantage of PHP:
 It is open source.
 Widely used in all over the world.
 To execute PHP code no need compiler.
 PHP can be easily embedded directly into HTML.
 Interfaces very easily with Apache/MySQL.

SOCET(CE) 2
GROUP-ID:1104 1.INTRODUCTION

Disadvantage of PHP:

 PHP is unsecured: It is an open source system, so any one can see and change the
source code.
 Poor error handling method.
 PHP is unable to manage large number of apps.

SQL (Structure Query Language):

 SQL (Structured Query Language) is a special-purpose programming


language designed for managing data held in a relational database management
system (RDBMS).
 Originally based upon relational algebra and tuple relational calculus, SQL
consists of a data definition language and a data manipulation language.
 The scope of SQL includes data insert, query, update and delete, schema creation
and modification, and data access control. Although SQL is often described as,
and to a great extent is, a declarative language (4GL), it also includes procedural
elements.
 Data Definition: Defining tales and structure in the database.
 Data manipulation: Used to manipulate the data within those schema objects.

SOCET(CE) 3
GROUP-ID:1104 2.PROJECT MANAGEMENT

CHAPTER 2
PROJECT MANAGEMENT

2.1 Project Planning and scheduling

2.1.1 Project Development Approach


The activities we followed for this project is listed below:
 Planning the work or objectives
 Analysis & Design of objectives
 Assessing and controlling risk
 Allocation of resources
 Organizing the work
 Database Designing
 Form Design
The Process Paradigm we used for our project is Spiral Model.

The Spiral Software Process Model


 The Spiral Process Model is similar like the incremental model, with more phases
placed on risk analysis.
 The spiral model has four phases:
1) Planning
2) Risk Analysis
3) Engineering
4) Evaluation

Explanation
1) Planning: Requirements are gathered during the planning phase. Requirements are like
BRS and SRS.
2) Risk Analysis: In this phase, a process is undertaken to identify risk and alternate
solutions. A prototype is produced at the end of the risk analysis phase. If any risk is
found during the risk analysis then alternate solutions are suggested and implemented.
3) Engineering: In this phase software has been developed, and testing will be done with
at the end of the phase.
4) Evaluation: This phase allows the customer to evaluate the output of the project to
date before the project continues to the next spiral.
 Spiral model is also called as meta-model because in a way it comprises of other
models of SDLC, both waterfall and prototype models are used in it.
 The Spiral Process model is used when costs and risk evaluation is important and for
medium to high-risk projects.

SOCET(CE) 4
GROUP-ID:1104 2.PROJECT MANAGEMENT

 It’s a risk-driven model which means that the overall success of a project highly
depends on the risks analysis phase. Risk analysis requires specific expertise on every
interaction. Thus, to review and analyses the project from time to time, special skills
are needed.

[Figure 1 Spiral modal]

2.1.2 Project Plan


 Project planning is part of project management, which relates to the use of
schedules such as Gantt charts to plan and subsequently report progress within the
project environment.

 Initially, the project scope is defined and the appropriate methods for completing
the project are determined. Following this step, the durations for the various tasks
necessary to complete the work are listed and grouped into a work breakdown
structure.
 Project planning is often used to organize different areas of a project, including
project plans, workloads and the management of teams and individuals.

SOCET(CE) 5
GROUP-ID:1104 2.PROJECT MANAGEMENT

Milestone and Deliverables:

 In this project, we went through Module Wise Completion. First we did analysis of
first module; we went through all the requirements for first module that is Admin
Module.
 By this analysis we decided field of all the tables of Admin Module. Then we started
Database Design.
 After competing it we started with the design of all forms of this module. Then we
did coding and finally validations and testing of forms that we made.
 After completing the first module we started the same procedure for the Member
Module.
 After that we completed User Module. Between this we did settings forms e.g. Change
theme, change background color of the main screen etc.
 There was continuously interaction with the client that was very beneficial for us.
 When we completed whole project we started testing the whole project for final
verification.
 Then we started documentation of our project. Finally, we completed the project with
client’s satisfaction.

Software Process Activity Milestones


Project Plan Project Schedule
Requirement Collection User requirements
Data Flow Analysis System Flow
Design
1. Database Design System Design Document
2. User Interface Design
3. System Design

SOCET(CE) 6
GROUP-ID:1104 2.PROJECT MANAGEMENT

Implementation
1. Code For giving security Access Reports
2. Code for reports
Reports

Testing Setting validation and error message

[Table 1 Milestone and Deliverables]

Roles and Responsibilities:

FB
Chatbot

Jay Shivani Rajvi


 Investigation  Investigation  Investigation
 Requirement Analysis  Requirement Analysis  Requirement Analysis
 DB Design  DB Design  DB Design
 Coding  Coding  Coding
 Testing  Testing  Testing

2.1.3 Schedule Representation

 Project Scheduling is the culmination of a planning activity that is primary


component of software project management.
 When combined with estimation methods and risk analysis, scheduling, establishes
a road map for the project management.

SOCET(CE) 7
GROUP-ID:1104 2.PROJECT MANAGEMENT

 Scheduling begins with the process composition. The characteristics of the project
are used to adapt an appropriate task set for the work to be done.
 The task network is used to compute the critical project path, a time line chart and
a variety of project information.

From Date To Date

1.Preliminary 3/7/2017 28/7/2017


Investigation

2.Requirment Analysis 29/07/2017 19/8/2017

3.Designing 20/08/2017 21/09/2017

4.Implementation 11/10/2017 16/3/2018

5.Testing 17/3/2018 15/4/2018

[Table 2.2 Project Plan]

Start Date

Testing
25% 25%

Coding
25% 25%

[Figure 2 Pie Chart]

SOCET(CE) 8
GROUP-ID:1104 2.PROJECT MANAGEMENT

2.2 Risk Management

2.2.1 Risk Identification

 Establish rules regarding chatbot data handling and storage.


 Be on the lookout for criminal chatbots.
 Be aware of the chatbot’s channel encryption.

2.2.2 Risk Analysis

 Establish rules regarding chatbot data handling and storage :


By their nature, chatbots collect information from users; that’s how they respond to
questions, and it’s how they train themselves to get better at their “jobs” over time.
Where this information is stored, how long it’s stored, how it’s used, and who has
access to it must be addressed, especially in highly regulated industries that handle
very sensitive information
 Be on the lookout for criminals chatbots :
Finally, organizations must be aware of the bigger picture of chatbot security. As
chatbots become better at imitating humans, the technology will be used by hackers
in phishing schemes and other social engineering hacks.
 Be aware of the chatbot’s channel encryption :
For maximum security, chatbot communication should be encrypted, and chatbots
should be deployed only on encrypted channels. While these sound like obvious
safeguards, unfortunately, it’s not that simple.

2.2.3 Risk Planning

 By Identification and analysis processes, we have founded out that we have to


minimize loop hole into system and provide comfort to our clients and provide better
understanding and knowledge of chatbot.
 Continuing talking about risk another factor was API, which in our case is Google
Finance API, which is available. But there are many other factor which are available
for free with little bit of delay.
 The Higher Security.
 It has Quick response.
 The More Efficient
 The chatbot system is Effective conversation

2.3 Estimation

2.3.1 Effort Estimation

 In Organic=2.4(KLOC)1.05 PM

SOCET(CE) 9
GROUP-ID:1104 2.PROJECT MANAGEMENT

 In Semidetached=3.0(KLOC)1.12 PM
 In Embedded=3.6(KLOC)1.20 PM
Effort Estimation (E):

=2.4 (KLOC)1.05 PM
=33.30 PM
Duration Estimation (D):

= 2.5(effort)0.38 months

=2.5(33.30)0.38 months
=9.5 months
Project Cost:
=effort*RS/month
=33.30*6900
= 2,29,770 RS

2.3.2 Cost Analysis

The Cocomo model

 Like all estimation models for software, the COCOMO models


require sizing information.
 Three different sizing options are available as part of the model
hierarchy: object points, function points, and lines of source code.
 Like function points, the object point is indirect software that is
computed using counts of the number of

(1) Screens (at the user interface),

(2) Reports,

(3) Components likely to be required to build the application.

 Once complexity is determined, the number of screens, reports, and components


are weighted according to Table above.
 The object point count is then determined by multiplying the original number of
object instances by the weighting factor in table above and summing to obtain a

SOCET(CE) 10
GROUP-ID:1104 2.PROJECT MANAGEMENT

total object point count.


 When component based development or general software reuse is to be applied,
the percent of reuse (%reuse) is estimated and the object point count is adjusted:
 NOP = (object points) X [(100 - %reuse) /100].
 Where NOP is defined as new object points. To derive an estimate of effort
based on the computed NOP value, a “productivity rate” must be derived.
 PROD=NOP /person-month
 For different levels of developer experience and development environment
maturity. Once the productivity rate has been determined, an estimate of project
effort can be derived as Estimated effort =NOP/PROD.
 There are three types of software project:

 Organic project
 Semi-detached project
 Embedded project

Cost required to develop project=effort*rs / month


 Effort Estimation(E):
In Organic=2.4 (KLOC)1.05PM

In semidetached=3.0(KLOC)1.12PM

In Embedded=3.6(KLOC)1.20PM

 Duration Estimation(D):
In Organic=2.5(effort)0.38months

In semidetached=2.5(effort)0.35months In Embedded=2.5((effort)0.32months

 Person Estimation:
P=E/D

 KLOC=Kilo Line of Code

Total line of code = 6900

KLOC = 69.

SOCET(CE) 11
GROUP-ID:1104 2.PROJECT MANAGEMENT

Modules Page Estimated line of code


Admin - 1700
Facebook messenger login 100
Send message 300
Receive message 300
Manage notifications 300
Time schedule 700
User 5900
Facebook messenger login 200
Library file 5000
Send Message 350
Receive Message 350

We are using Organic Project Type,


Effort Estimation (E):

=2.4 (KLOC)1.05 PM
=33.30 PM
Duration Estimation (D):

= 2.5(effort)0.38 months

=2.5(33.30)0.38 months
=9.5 months
Project Cost:
=effort*RS/month
=33.30*6900
= 2,29,770 RS
Advantages of COCOMO:
 COCOMO is factual and easy to interpret.
 One can clearly understand how it works.
 Accounts for various factors that affect cost of the project.
 Works on historical data and hence is more predictable and accurate.

SOCET(CE) 12
GROUP-ID:1104 2.PROJECT MANAGEMENT

Disadvantages of COCOMO:
 COCOMO model ignores requirements and all documentation.
 It ignores customer skills, cooperation, knowledge and other parameters.
 It oversimplifies the impact of safety/security aspects.
 It ignores hardware issues.
 It ignores personal turnover levels.
 It is dependent on the amount of time spent in each phase.

SOCET(CE) 13
GROUP-ID:1104 3.SYSTEM REQUIREMENT STUDY

CHAPTER 3
SYSTEM REQUIREMENT STUDY

3.1 User Characteristics

It is stand for the type of user which deals with the applications. Basically, this application
has four types of users as given below:

1. Admin
2. Developer
3. Customer
4. Employee

Explanation:
1. Admin:
 Responsibility of admin is to manage the application database and update the data in
database regularly. For e.g. manage the data of updating.
2. Developer:
 Responsibility of developer is to complete tasks which are assigned to him by admin
and manage the some part of database.
3. Customer:
 Once the portal being tasted and being uploaded then after customer user will use this
application. User in the main reason for which this application is being built. The end
user can easily interact with the user using this portal.
4. Employee:
 Responsibility of employee is to keep watching on chatbot and checkout the replies
which is given to the customer.

Responsibility of employee is to keep watching on chatbot and checkout the replies which is
given to the customer.

3.2 Hardware and Software Characteristics

3.2.1 Hardware Requirements

 Smart Phone required

SOCET(CE) 14
GROUP-ID:1104 3.SYSTEM REQUIREMENT STUDY

 RAM:2 GB minimum
 Internet Access
3.2.2 Software Requirements

 Smartphone compatible system


 Massager Application
 Laravel Framework
 Sublime text

3.3 Constraints

3.3.1 Regulatory Policies

 Regulatory Policies limit the discretion of individual and agencies otherwise compel
certain types of behaviour.
 This policies are generally good thought to be best applied, when good behaviour can
be easily defined and bad behaviour can be easily regulated and punished through fine.
3.3.2 Hardware limitation

 As far as hardware is concerned, It is always advisable to be up to date.


 The hardware limitation occurs if the user is using a very low level MHz processor.
 This will generally about the portal and also the use will waste a lot of valuable time,
energy and resource.
 The smooth functionality of the system mainly depends on the speedily working of
hardware and then on speed of the internet.

SOCET(CE) 15
GROUP-ID:1104 4.SYSTEM ANALYSIS

CHAPTER 4

SYSTEM ANALYSIS

4.1 Study of Current System

 Traditionally, the ChatBot system is not known to people who are not more into the
technology.
 Also this Process may lead to communicate gap between people and latest updates.

4.2 Requirements of New System

 The main concern in the context of the FB ChatBot is to provide virtual environment
which can interact with bot messenger.
 By using FB ChatBot people can interact with the world and know about the latest
updates.
4.2.1 Functional Requirements

4.2.1.1 User Requirement:

 User needs to have signup/login to web portal for messenger.


 Once, user have login, they can easily chat with chatbot or chat with group.
4.2.2 Non-Functional Requirements

4.2.2.1 Usability:

 Preservation of live chat with bot and group.


4.2.2.2 Efficiency:
 The system must provide fast, accurate and precise access without consuming more
delay into reply.
4.2.2.3 Security:
 The user wants the personal data to be secure then chatterbot can store the data in
database securely.
4.2.2.4 Maintainability:
 User wants that the system should be maintained easily means that if there are some
changes required in the system then user can be done easily.

SOCET(CE) 16
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.3 Feasibility Study

 Feasibility is the measure of how beneficial the development of information


system will be to an organization.
 The feasibility analysis is categorized under four different types.
1. Operational Feasibility
2. Technical Feasibility
3. Schedule Feasibility
4. Economic Feasibility
Explanation:
1. Operational Feasibility:
 The System is to be developed for any user who wants to use it. We want our system
user friendly and easy to use.

2. Technical Feasibility:
 The analyst must be find out whether the current technical resource, which are
available in the system is capable of handling the chatbot.

3. Schedule Feasibility:
 Schedule feasibility corresponds to whether sufficient time is available to complete
the project.

Factor considered:
 Schedule of the project
 Time by which project has to be completed
 Reporting period

Economic Feasibility:

 Economic feasibility is a measure of cost effectiveness of a project or solution.


 For declaring that the system is economically feasible, the benefits from the project
should exceed or at least to the equal to the cost of development.

4.4 Requirements Validation

 Requirement validation examines this specification to ensure that all the system
requirements have been stated unambiguously.
 These inconsistent, error have been detected and corrected and the work products

SOCET(CE) 17
GROUP-ID:1104 4.SYSTEM ANALYSIS

confirmed to the standard.


 Source of the requirement are identified, final Statement of requirement has been
examined by original source.
 Requirements related to main requirements are founds.
 Requirements are clarifying stated and are not misinterpreted.
 All sources of requirements are covered to get a maximum requirement.
 All method of finding requirements is applied.

4.5 Functions of System

4.5.1 Use-Case

 In software and systems engineering, a use case is a list of steps, typically defining
interactions between actor and a system, to achieve a goal.
 The actor can be a human, an external system, or time.
 In systems engineering, use cases are used at a higher level than within software
engineering, often representing missions or stakeholder goals.
 The detailed requirements may then be captured in Systems Modeling Language or as
contractual statements.
 As an important requirement technique, use cases have been widely used in modern
software engineering over the last two decades.
 Use case driven development is a key characteristic of process models and
frameworks.
 With its iterative and evolutionary nature, use case is also a good fit for agile
development.

SOCET(CE) 18
GROUP-ID:1104 4.SYSTEM ANALYSIS

[Figure 3 Use-Case Diagram]

SOCET(CE) 19
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.5.2 Activity Diagram

[Figure 4 Activity Diagram]

SOCET(CE) 20
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.5.3 Sequence Diagram

 The well-known Message Sequence Chart technique has been incorporated into the
Unified Modeling Language (UML) diagram under the name of Sequence Diagram.
 A sequence diagram shows, as parallel vertical lines, different processes or objects
that live simultaneously, and, as horizontal arrows, the messages exchanged between
them, in the order in which they occur.
 This allows the specification of simple runtime scenarios in a graphical manner.
 The well-known Message Sequence Chart technique has been incorporated into the
Unified Modeling Language (UML) diagram under the name of Sequence Diagram.
A sequence diagram shows, as parallel vertical lines, different processes or objects
that live simultaneously, and, as horizontal arrows, the messages exchanged between
them, in the order in which they occur. This allows the specification of simple runtime
scenarios in a graphical manner.

[Figure 5 Sequence Diagram]

SOCET(CE) 21
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.6 Data Modeling

4.6.1 E-R Diagram

 In software engineering, an Entity–Relationship model (ER model) is a data model for


describing the data or information aspects of a business domain or its process
requirements, in an abstract way that lends itself to ultimately being implemented in a
database such as a relational database.
 The main components of ER models are entities and the relationships that can exist
among them, and databases.
 An entity-relationship model is a systematic way of describing and defining a business
process.
 The process is modelled as components (entities) that are linked with each other by
relationships that express the dependencies and requirements between them, such as:
one building may be divided into zero or more apartments, but one apartment can only
be located in one building. Entities may have various properties (attributes) that
characterize them.
 Diagrams created to represent these entities, attributes, and relationships graphically
are called entity–relationship diagrams.

[Figure 6 E-R Diagram]

SOCET(CE) 22
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.6.2 Class Diagram


 In software engineering, a class diagram in the Unified Modeling Language (UML) is
a type of static structure diagram that describes the structure of a system by showing
the system's classes, their attributes, operations (or methods), and the relationships
among objects.
 The class diagram is the main building block of object oriented modeling.
 It is used both for general conceptual modeling of the systematic of the application,
and for detailed modeling translating the models into programming code.
 Class diagrams can also be used for data modeling.
 The classes in a class diagram represent both the main objects, interactions in the
application and the classes to be programmed.
 In the diagram, classes are represented with boxes which contain three parts:

 The top part contains the name of the class. It is printed in Bold, centered and
the first letter capitalized.
 The middle part contains the attributes of the class. They are left aligned and
the first letter is lower case.
 The bottom part gives the methods or operations the class can take or
undertake. They are also left aligned and the first letter is lower case.

SOCET(CE) 23
GROUP-ID:1104 4.SYSTEM ANALYSIS

[Figure 7 Class Diagram]

SOCET(CE) 24
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.6.3 Data Dictonary

Project Name: FB Chatbot Table Name: User Database

Primary key: user_id Foreign key: -

Table Description: This table is for description about user.

Table Structure

Field Name Data Type Size Constrains Description


This field
contains a id.
Id Int 10 Primary key
This field
contains bot
User_id Varchar 50 Not null
user Name.
This field
contains a first
First_name Varchar 255 Not null
name.
This field
description a
Last_name Varchar 255 Not null last name.
This field
contains a usr
user_name Varchar 255 Not null name.
This field
contains a
message Text Not null message.
This field
contains a
Message_type Int 11 Not null message type

[Table 2 User]

SOCET(CE) 25
GROUP-ID:1104 4.SYSTEM ANALYSIS

Project Name: FB Chatbot Table Name: User Database

Primary key: Push_message Foreign key: -

Table Description: This table is for description about Push messages.

Table Structure

Field Name Data Type Size Constrains Description


This field
contains a id.
Id Int 10 Primary key
This field
contains bot
User_id Varchar 100 Not null
user Name.
This field
contains a
created_at Timestamp Not null
create at.
This field
description a
updated_at Timestamp Not null updates at.
This field
contains a usr
deleted_at Timestamp Not null name.
This field
contains a
message Text Not null message.

[Table 3 Push messages]

SOCET(CE) 26
GROUP-ID:1104 4.SYSTEM ANALYSIS

Project Name: FB Chatbot Table Name: User Database

Primary key: Users Foreign key: -

Table Description: This table is for description about Push messages.

Table Structure

Field Name Data Type Size Constrains Description


This field
contains a id.
Id Int 10 Primary key
This field
contains bot
Name Varchar 255 Not null
user Name.
This field
contains a
Email Varchar 255 Not null
create at.
This field
description a
Password Varchar 255 Not null updates at.
This field
contains a usr
Remember_token Varchar 100 Not null name.
This field
contains a
Created_at Timestamp Not null message.
This field
contains a
Updated_at Timestamp Not null updated at

[Table 4 Users]

SOCET(CE) 27
GROUP-ID:1104 4.SYSTEM ANALYSIS

4.7 Main Modules of New System

 FB ChatBot uses Artificial Intelligence to sense the best auto reply of user’s question
answer.
 The main modules involved in this system are:
1. Software
2. Artificial Intelligence
3. Database
 Module wise description:
1. Software:
 It is based on Laravel framework (PHP).
 It will provide virtual bot to the user for chat.
2. Artificial Intelligence:
 It controls the functioning of the virtual bot by providing running best possible
algorithm and having prediction into software.
3. Database:
 The system will be consisting of 2 major division.
I. User data
II. ChatBot data

4.8 Selection of Hardware and Software and Justification

4.8.1 Hardware
 i3 Processor Based Computer
 4GB-Ram
 512GB Hard Disk
 Smart Phone Required
4.8.2 Software
 Windows 7
 WAMP Server
 Sublime Text
 My SQL 5.6

4.8.3 Justification
 As, Laravel is an open-source PHP web framework.
 Some of the features of Laravel are a modular packing system, different ways for
accessing relational database.
 Utilities that aid in application deployment and maintenance.

SOCET(CE) 28
GROUP-ID:1104 5.SYSTEM DESIGN

CHAPTER 5

SYSTEM DESIGN

 The system design is one of the most interesting, and most difficult, of tasks we take
may undertake in our careers as engineers or computer scientists is the entire system.
A system is a set of interacting parts, generally too large to be built by a single person,
created for some particular purpose. It is defines a process of the developing an
architecture and defining a flow of structure to satisfy the specific requirements of the
user.

5.1 Database Design

 The database design is usually a fundamental component of the information system,


especially in business oriented systems. It is the producing a detailed data model of a
database.
 Software design is a process to conceptualize the software requirements into software
implementation.
 Software design takes the user requirements as challenges and tries to find optimum
solution.
 While the software is being conceptualized, a plan is chalked out to find the best
possible design for implementing the intended solution.
 Systems design is the process of defining the architecture, components, modules,
interfaces, and data for a system to satisfy specified requirements.
 The System Design Description report provides summary or detailed information
about a system design represented by a model. Systems design is therefore the process
of defining and developing systems to satisfy specified requirements of the user.
 The database design phase is divide into three steps:
1) Conceptual database design
2) Logical database design
3) Physical database design

SOCET(CE) 29
GROUP-ID:1104 5.SYSTEM DESIGN

5.1.1 Mapping Objects / Classes of Tables

[Table 5 User Messages]

[Table 6 Users Push Messages]

[Table 7 Users]

SOCET(CE) 30
GROUP-ID:1104 5.SYSTEM DESIGN

5.2 System Procedural Design

5.2.1 Designing Pseudo Code or Algorithm for Method or Operations

 User side:

 Step 1 : Enter the URL to open the web and messenger


 Step 2 : Enter the username and password
 Step 3 : If username and password both is correct then it can be login successfully.
 Step 4 : It shows the facebook messenger page.
 Step 5 : Then search the chatbot name.
 Step 6 : Open the chatbot.
 Step 7 : Then chat with bot.
 Step 8 : Close system.

SOCET(CE) 31
GROUP-ID:1104 5.SYSTEM DESIGN

5.2.2 Flow Chart

[Figure 8 Flow Chart]

SOCET(CE) 32
GROUP-ID:1104 5.SYSTEM DESIGN

5.3 Data Modeling


5.3.1 State Chart Diagram

[Figure 9 State Diagram]

SOCET(CE) 33

S-ar putea să vă placă și