Wednesday, June 5, 2019

Friend Recommendation System Software Design

Friend Recommendation System Softw ar DesignCHAPTER 4SOFTWARE DESIGN DESCRIPTION4.1INTRODUCTIONThe Software Design papers depicts transcript which go away be utilize to aid in the software development phase of this project by providing the specifics for how the software should be built. inwardly the Software Design Document are narrative and in writing(p) inventoryation of the software design for the project including use case models, sequence diagrams, object doings models, and other supporting requirement in formation. The requirements in SRS will be fully addressed in this software design document or alternative outcome should be given.4.2DESIGN OVERVIEWThe purpose of this software design document is to provide insight into the structure and design of each component in the Friend good word ashes. Topics covered include the side by side(p)Class hierarchies and interactionsData feed and design (DFD)User interface designTest cases and expected resultsIn short, this docu ment is meant to correspond the reader with a solid understanding of the inner workings of the Friend tribute system.The modules, as can be perceived from figure , are as followsCollect_Data_From_SensorsData CollectionData preprocessing bodily process RecognitionFriend-matching graph constructionFriend query and Feedback controlThese modules will be described in detail in the next section on System Design.4.3SYSTEM DESIGNThis section provides a modular structure of the proposed system and explains each subsystem along with the relationships amidst the subsystems and the interfaces between the modules. put down 4.1 The Architecture Diagram4.4DESIGN CONSTRAINTSThe boniface should be multithreaded.The Android application program at the client side should have a rehear mechanism to connect to horde.Software System AttributesUsability The software will be embedded in a website. It should be scalable designed to be tardily adopted by a system.Reliability The system should have ac curate results and fast response to users changing habits.Security The system uses GPS arrangement information to find friends within some distance. In govern to provide privacy, a region surrounding the accurate location will be uploaded to the system.4.5 mental faculty STRUCTUREThe below is the structure of modules Username/passwordUsers Credentials User DataUser Data interview for Processed dataFriends shineFeedbackFriend ListFriend ListFigure 4.2 The Module design 4.4.1 DESCRIPTION OF MODULESThis section describes each of the above modules in brief.Module LoginOrRegisterThis module contains login or accommodation in order to enter the user with Friendbook application. If the user has already registered, then he/she can directly login and start using the application. If he/she is not registered then he/she has to register with friendbook application.Module Authenticate UsersThis module compares the entered Username and Password with the respective records among the database entries. If a match is found, then redirects the user to his/her profile page. Else, an appropriate message is thrown and the user is redirected to the registration page.For registration, compares the Username entered with the ones in the database to check its availability. If unavailable, then asks for a different Username, else create a new record in the database and save the entered details. Redirects the user to his/her profile page on registration with appropriate message, if the Username is not already present. If the Username entered during registration is not unique, then an appropriate message is thrown.Name and Usernames should start with an alphabet and Password should contain at least one alphabet and one numeric character and one special character.Module Collect_Data_From_SensorsSmartphone (e.g., iPhone or Android- base smartphones) are equipped with a rich fortune of embedded sensors, such as GPS, accelerometer, microphone, gyroscope, and camera. On the client side, e ach smartphone records data of its user from the sensors such as accelerometer, and GPS information.This collected data is further sent to the server for further processing.Module Data Collection and Pre-processingThis module collects the data sent from the client side. The keen data collected will be in format time ,latitude ,longitude ,accx ,accy ,accz . The collected raw data is further pre processed to remove outliers. Median filtering technique is used for outlier detection and removal. An unsupervised learning technique is use on the preprocessed data to form clusters known as Kmeans clustering algorithm. The resulting clusters forms a list of activities carried out by a user, where each cluster representing an activity.Module Activity RecognitionNow that the k clusters are formed, each represents an activity, carriagestyles are further extracted from these activities using LDA algorithm. A library called LAML is used*. It provides a convenient API to get motif structures f or an array of input strings.The extracted lifestyles are used to find the similarities between the users.Once the similarity is calculated, the user who has highest similarity is suggested as a friend.Module User Query and Feedback ControlThis module performs two tasks, it accepts and responds to user queries (eg, query for friend list) and collects feedback from users in order to improve the accuracy of the friend recommendation system.4.6INTERFACE DESCRIPTIONThe following is the list of external interfacesSOCIAL NETWORK PORTAL A portal where the users can do registration by entering their details and likewise provide a feedback on the recommendations to improve the accuracy of the system. It is implemented using JSP and HTML.MOBILE INTERFACE It continually sends the mundane activities to the server via network using TCP alliance. The daily activities are characterized by walking, sitting and GPS location.RECOMMENDATION SYSTEM This is the interface in which the friend recommen der algorithm works in the background. This interface will be used by the users. Customer cannot do many operations, but their feedbacks or ratings are very important to create a relevant recommendation. End users can solitary(prenominal) provide feedback and view recommendations.HARDWARE INTERFACES The recommendation system can work on any smartphone device. These devices should have some limit requirements to make the application drift effectively. The processor speed and internet speed are expected to be high.SOFTWARE INTERFACESThis system can work on any platform. Internet partnership is a must to reach the system. Moreover, most of the application will be coded by Java. Java APIs of database management tools such as Netbeans, which is a standalone workbench application to interact with database management tools.4.6.1 Use Case Diagrams And Key FeaturesA use case diagram is a kind of behavioral design, which is constructed from an analysis. It presents a graphical synopsis of the capabilities provided by a system in terms of actors, aims and dependencies between use cases.Friend book user can perform following activities make the application in their mobilesLogin/Register with the applicationView the list of most similar friendsUpload feedback for improving accuracy of the system.The Use Case diagram in Figure 4.3, shows the different functionalities a friendbook user can perform.Figure 4.3 Friendbook User Use CaseThe System can perform following activitiesCollect raw data from usersPre-process the dataPerform Activity Recognition and extract the lifestyles using LDAFind the list of friends based on similarity between usersHandle FeedbackFigure 4.4 The Server Part Use Case4.8Class DiagramTop Level Client-Side Class DiagramThe client side class diagram, mainly consists of UI(user interface) essentialfor a user to register with the application by providing users information, after which user will be able to login and start the service. Once the applica tion starts, it continually records the values from sensors in the formatThe above values are to the server at regular intervals (say 3secs). In order to send the values to server a TCP connection is setup. Once the connection is setup, the device will start sending the data. The users can also provide a feedback on the recommendation results given to them.Top Level Server-Side Class DiagramThe server-side class diagram, consists of classes that are executed in a sequential manner. Firstly, ActivityClustering class collects the data sent from the mechanical man device, and pre-processes it using median filtering technique. After the data is filtered, the processed data is then partitioned into k clusters using k-means algorithm. Next, a class known as ConvertToActivitySeq is invoked, which maps the activities to cluster they are close to and produces a list containing sequence of activities i.e,. the life document. This document is further given as an input to LifeStylemodelling cl ass, which computes p(word/document) i.e, it calculates probability of word given the document matrix. This matrix is then decomposed to produce two matrices, called p(word/lifestyle) and p(lifestyle/document). Finally, p(lifestyle/document) matrix is used to calculate the similarities of the lifestyles between users.4.8DATA FLOW DIAGRAMThe data flow diagrams are pictorial type of data flowing in the system. DFDs are used for the purpose of viewing the data processing in the system. In a data flow diagram, the data elements flow from external or an internal data source, through an internal process.Level 0 Data Flow DiagramA train 0 DFD or a context level design represents the intercommunication between the system and external sources, which act as data sinks. In Level 0 DFD, the interaction between the system and external entity are designed in terms of data flows across the system boundaries. This level diagram shows the complete system as a single procedure.In the DFD diagram s hown in Fig*, the lifestyle information are the sensor values sent from the client i.e., mechanical man phone to the server. The data sent from client are processed to produce a list of potential friends.Figure 4.* Level 0 DFD of Lifestyle based friend recommenderLevel 1 Data Flow DiagramThe level 1 DFD, exhibits how the system is split into sub components, where each component represents one or more data flows to or from an external source. And when combined, it provides the complete functionality of the system as a whole. It represents the inter components data flows in a specific sequence and also the data flow between the components of the system.The proposed application consists of the components as shown in the figure 5.*. It first performs data collection, raw data pre-processing by noise removal, Activity intuition where each cluster represents an activity and finally calculates similaties between users to suggest a friend.Figure 5.* Level 1 DFD of Lifestyle based friend recommender4.9OBJECTS AND ACTIONS (SEQUENCE DIAGRAM)The sequence diagrams shows below. period for Setup ConnectionThis sequence is to set up FOR TCP connection between user and the server. Also monitors GPS and Accelerometer by collecting the data from them. period for monitoring device Result to the serverThe raw data, that is sent from the client is collected by server. And the collected raw data is pre-processed for outlier removal.Sequence for Finding FriendsWhen the user queries for the friend list, the server accepts the request from the client and responds by sending the potential list of friends.Sequence for Data CollectionThe data collection module collects life documents from users smartphones. The life document is collection of users activities. The life styles of users are extracted by the life style analysis module with the probabilistic topic model(by using a library for LDA ). Then the life style indexing module puts the life styles of users into the database in the format of (life- style, user) instead of (user, life-style). As the packet arrives , these packet will be store in files.Sequence for PreprocessingThe user sends data, and preprocesses to make the data consistent, by remove irrelevant data.The preprocessed data is converted into archive and upload to the database.Sequence for Database ConnectionData base connection is established when a friend request query is posed. A TCP connection will be established between user and server. Server will process this request and respond with the extracted information from the database i.e, the list of potential friends.4.10PSEUDO CODEMOBILE ENDSERVER SIDE PSEUDO CODE

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.