CHAPTER 4
SOFTWARE DESIGN DESCRIPTION
4. 1 INTRODUCTION
The Software Design Document provides transcript which is used to assist in the software development phase of the project by providing the details for the way the software should be built. Within the program Design Record are narrative and visual documentation of the software design for the job including use case models, series diagrams, object behavior models, and other supporting requirement information. Certain requirements in SRS will be totally attended to in this software design record or different solution should get.
4. 2 DESIGN OVERVIEW
The purpose of this software design report is to provide insight into the structure and design of each element in the Friend recommendation system. Subject areas covered are the following:
- Class hierarchies and interactions
- Data stream and design (DFD)
- User software design
- Test instances and expected results
In brief, this document is meant to equip the audience with a solid understanding of the interior workings of the Good friend advice system.
The modules, as can be perceived from body [ ], are the following:
- Collect_Data_From_Sensors
- Data Collection
- Data preprocessing
- Activity Recognition
- Friend-matching graph construction
- Friend query and Responses control
These modules will be referred to in detail within the next section on System Design.
4. 3 SYSTEM DESIGN
This section offers a modular framework of the suggested system and points out each subsystem combined with the relationships between the subsystems and the interfaces between your modules.
Figure 4. 1: The Architecture Diagram
4. 4 DESIGN CONSTRAINTS:
- The server should be multithreaded.
- The Android request at the client side should have a retry mechanism to hook up to server.
- Software System Attributes
- Usability :
The software will be embedded in an internet site. . It ought to be scalable made to be easily adopted by a system.
- Reliability :
The system should have exact results and fast reaction to user's changing practices.
- Security :
The system uses Gps unit location information to find friends within some distance. To be able to provide privacy, an area surrounding the exact location will be submitted to the machine.
4. 5 MODULE STRUCTURE
The below is the framework of modules:
Username/password
User's Credentials
Individual Data
User Data
Query for Processed data
Friends
Send
FeedbackFriend ListFriend List
Figure 4. 2 : The Component design
4. 4. 1 Explanation OF MODULES
This section details each one of the above modules in brief.
- Module: LoginOrRegister
This module has login or subscription in order to register an individual with Friendbook application. If an individual has already documented, then he/she can directly login and start using the application form. If he/she is not documented then he/she must enroll with friendbook program.
- Module: Authenticate Users
This component compares the entered Username and Password with the particular records among the list of database entries. If the match is found, then redirects the user to his/her account page. Else, an appropriate message is tossed and an individual is redirected to the enrollment page.
For sign up, compares the Username inserted with the people in the data source to check on its availableness. If unavailable, then requests another type of Username, else create a new record in the repository and save the entered details. Redirects the user to his/her profile page on registration with appropriate note, if the Username is not already present. If the Username entered during enrollment is not unique, then a proper message is thrown.
Name and Usernames should focus on an alphabet and Password should contain at least one alphabet and one numeric identity and one special figure.
- Module: Pull together_Data_From_Sensors
Smartphone (e. g. , iPhone or Android-based smartphones) include a rich set of embedded receptors, such as Gps navigation, accelerometer, mike, gyroscope, and camera. On your client part, each smartphone documents data of its customer from the detectors such as accelerometer, and GPS information.
This collected data is further sent to the server for even more processing.
- Module: Data Collection and Pre-processing
This module gathers the data sent from the client side. The natural data gathered will maintain format time, latitude, longitude, accx, accy, accz. The collected uncooked data is further pre refined to remove outliers. Median filtering approach can be used for outlier diagnosis and removal. An unsupervised learning strategy is applied on the preprocessed data to create clusters known as Kmeans clustering algorithm. The causing clusters sorts a set of activities carried out by a end user, where each cluster representing an activity.
- Module: Activity Recognition
Now that the k clusters are shaped, each represents an activity, standards of living are further extracted from these activities using LDA algorithm. A collection called LAML is used*. It offers a convenient API to get topic set ups for a range of type strings. The extracted lifestyles are used to find the similarities between the users.
Once the similarity is calculated, the user who may have highest similarity is advised as a pal.
- Module: Customer Query and Opinions Control
This module performs two responsibilities, it accepts and responds to user questions (eg, query for good friend list) and collects reviews from users to be able to enhance the reliability of the friend recommendation system.
4. 6 INTERFACE Information:
The following is the set of external interfaces:
- SOCIAL NETWORK Website: A site where the users can do enrollment by coming into their details and provide a responses on the advice to enhance the accuracy of the system. It is integrated using JSP and HTML.
- MOBILE User interface: It regularly sends the daily activities to the server via network using TCP interconnection. The day to day activities are seen as a walking, sitting down and Gps navigation location.
- RECOMMENDATION SYSTEM : This is actually the interface where the friend recommender algorithm works in the backdrop. This program will be utilized by the users. Customer cannot do many procedures, but their feedbacks or ratings are extremely important to make a relevant recommendation. End users can only just provide opinions and view tips.
HARDWARE INTERFACES :
The suggestion system could work on any smartphone device. The unit must have some limit requirements to help make the request run effectively. The processor velocity and internet acceleration are anticipated to be high.
SOFTWARE INTERFACES:
This system can work on any program. Internet connection is crucial to reach the machine. Moreover, the majority of the application will be coded by Java. Java APIs of repository management tools such as Netbeans, which is a standalone workbench program to connect to database management tools.
4. 6. 1 Use Case Diagrams And Key Features
A use circumstance diagram is a kind of behavioral design, which is made of an evaluation. It presents a visual synopsis of the functions provided by something in conditions of actors, aims and dependencies between use circumstances.
Friend book end user can perform pursuing activities:
- Install the application form in their mobiles
- Login/Register with the application
- View the list of most similar friends
- Upload opinions for improving correctness of the system.
The Use Case diagram in Figure 4. 3, shows different functionalities a friendbook consumer can perform.
Figure 4. 3 : Friendbook Individual Use Case
The System can perform following activities:
- Collect raw data from users
- Pre-process the data
- Perform Activity Identification and remove the life-style using LDA
- Find the list of friends predicated on similarity between users
- Handle Feedback
Figure 4. 4 : The Server Part Use Case
4. 8 Class Diagram
Top Level Client-Side Category Diagram:
The client part class diagram, mainly consists of UI(interface) required
for a consumer to join up with the application by providing user's information, after which user will be able to login and start the service. Once the application begins, it continually details the values from detectors in the format:
< acc_x, acc_y, acc_z, gyr_x, gyr_y, gyr_z >
The above beliefs are to the server at regular intervals (say 3secs). In order to send the prices to server a TCP interconnection is setup. After the connection is installation, the device will start sending the info. The users can also provide a responses on the suggestion results given to them.
Top Level Server-Side Course Diagram:
The server-side class diagram, consists of classes that are executed in a sequential manner. First of all, ActivityClustering class collects the data sent from the android device, and pre-processes it using median filtering technique. After the data is filtered, the prepared data is then partitioned into k clusters using k-means algorithm. Next, a course known as ConvertToActivitySeq is invoked, which maps the activities to cluster they can be near and produces a list formulated with collection of activities i. e, . the life span document. This record is further given as an source to LifeStylemodelling school, which computes p(word/file) i. e, it calculates possibility of phrase given the record matrix. This matrix is then decomposed to create two matrices, called p(word/lifestyle) and p(lifestyle/doc). Finally, p(lifestyle/doc) matrix is used to calculate the similarities of the life-style between users.
4. 8 DATA Circulation DIAGRAM
The data move diagrams are pictorial representation of data streaming in the system. DFD's are used for the purpose of viewing the data processing in the system. Inside a data movement diagram, the data elements flow from exterior or an internal data source, via an inside process.
Level 0 Data Movement Diagram
A level 0 DFD or a context level design represents the intercommunication between your system and external sources, which become data sinks. In Level 0 DFD, the interaction between your system and exterior entity were created in conditions of data moves over the system boundaries. This level diagram shows the complete system as an individual procedure.
In the DFD diagram shown in Fig*, the lifestyle information are the sensor values dispatched from your client i. e. , android mobile phone to the server. The data sent from customer are processed to produce a list of potential friends.
Figure 4. * : Level 0 DFD of Lifestyle based friend recommender
Level 1 Data Flow Diagram
The level 1 DFD, exhibits the way the system is split into sub components, where each part represents one or more data moves to or from an exterior source. So when combined, it offers the complete features of the machine as a whole. It signifies the inter components data moves in a specific sequence as well as the data flow between the components of the system.
The proposed software contains the components as shown in the physique 5. *. It first works data collection, uncooked data pre-processing by noise removal, Activity recognition where each cluster represents an activity and finally calculates similaties between users to suggest a pal.
Figure 5. * : Level 1 DFD of Lifestyle established friend recommender
4. 9 OBJECTS AND Activities (SEQUENCE DIAGRAM)
The sequence diagrams shows below.
Sequence for Setup Connection:
This sequence is to create FOR TCP connection between end user and the server. Also displays Gps navigation and Accelerometer by collecting the info from them.
Sequence for Screen Result to the server:
The organic data, that is sent from your client is collected by server. Plus the collected uncooked data is pre-processed for outlier removal.
Sequence for Finding Friends:
When an individual concerns for the friend list, the server accepts the need from the client and responds by mailing the potential set of friends.
Sequence for Data Collection:
The data collection component gathers life documents from users' smartphones. The life document is assortment of users activities. The life span styles of users are extracted by the life span style analysis module with the probabilistic theme model(by by using a collection for LDA ). Then your life-style indexing module puts the life varieties of users into the repository in the format of (life- style, user) rather than (user, life-style). As the packet arrives, these packet will be store in documents.
Sequence for Preprocessing:
The user directs data, and preprocesses to make the data consistent, by remove irrelevant data. The preprocessed data is converted into archive and upload to the repository.
Sequence for Data source Connection:
Data base connection is established when a friend submission query is posed. A TCP connection will be founded between end user and server. Server will process this demand and act in response with the extracted information from the repository i. e, the list of potential friends.
4. 10 PSEUDO CODE
MOBILE END:
SERVER Aspect PSEUDO CODE: