Wednesday, April 3, 2019
Friend Recommendation System Software Design
Friend Recommendation clay Softw be DesignCHAPTER 4 parcel DESIGN description4.1 worldThe Software Design instrument tenders transcript which bequeath be utilise to aid in the software development phase of this visualise by providing the details for how the software should be built. Within the Software Design Document are narrative and graphical enteration of the software fig for the project including use case models, rank diagrams, object behaviour models, and other keep requirement in cultivateation. The requirements in SRS will be fully addressed in this software design document or alternative solution should be given.4.2DESIGN OVERVIEWThe advise of this software design document is to pass on shrewdness into the social organisation and design of distributively comp superstarnt in the Friend testimonial frame. Topics covered include the following syndicate hierarchies and interactions entropy flow and design (DFD)User interface designTest cases and expected resul tsIn short, this document is meant to equip the reader with a solid understanding of the inner works of the Friend recommendation system.The facultys, as groundwork be perceived from human body , are as followsCollect_Data_From_SensorsData collectingData preprocessingActivity scienceFriend-matching graph constructionFriend enquiry and Feedback controlThese modules will be described in detail in the next section on dodge Design.4.3SYSTEM DESIGNThis section provides a modular structure of the proposed system and explains each subsystem along with the relationships in the midst of the subsystems and the interfaces surrounded by the modules.Figure 4.1 The computer architecture plot4.4DESIGN CONSTRAINTSThe server should be multithreaded.The Android coat at the customer side should have a retry mechanism to refer to server.Software System AttributesUsability The software will be embedded in a website. It should be scalable designed to be easily espouse by a system.Reliabil ity The system should have accurate results and libertine response to users changing habits.Security The system uses GPS stance breeding to find conversances within some distance. In order to provide privacy, a region surrounding the accurate location will be uploaded to the system.4.5MODULE STRUCTUREThe below is the structure of modules Username/passwordUsers Credentials User DataUser Data motion for svelte infoFriendsSendFeedbackFriend 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 fitting in order to register the user with Friendbook application. If the user has already registered, whence 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 scans amo ng the infobase entries. If a match is found, then redirects the user to his/her profile page. Else, an suspend message is thrown and the user is redirected to the registration page.For registration, compares the Username entered with the ones in the selective informationbase to equalize its availability. If unavailable, then asks for a different Username, else attain a new record in the informationbase 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-establish smartphones) are equipped with a luxuriant redact of embedded sensors, such as GPS, accelerometer, mi crophone, gyroscope, and camera. On the client side, each smartphone records information of its user from the sensors such as accelerometer, and GPS information.This collected info is nurture sent to the server for further processing.Module Data Collection and Pre-processingThis module collects the selective information sent from the client side. The earthy 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 maculation and removal. An unsupervised learning technique is applied on the preprocessed data to form clusters known as Kmeans clustering algorithm. The resulting clusters forms a propensity of activities carried out by a user, where each cluster representing an activity.Module Activity Recognition straight off that the k clusters are formed, each represents an activity, livingstyles are further extracted from these activities usin g LDA algorithm. A library called LAML is used*. It provides a convenient API to get topic structures for an get of input strings.The extracted lifestyles are used to find the similarities between the users. at once the resemblance 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 come) and collects feedback from users in order to improve the trueness of the friend recommendation system.4.6INTERFACE DESCRIPTIONThe following is the list of international interfacesSOCIAL NETWORK PORTAL A portal where the users can do registration by entering their details and also provide a feedback on the recommendations to improve the accuracy of the system. It is use using JSP and HTML.MOBILE INTERFACE It continually burdens the daily activities to the server via web using TCP federation. The daily activities are characterized by walki ng, sitting and GPS location. pass SYSTEM This is the interface in which the friend recommender algorithm works in the background. This interface will be used by the users. Customer cannot do mevery operations, but their feedbacks or ratings are very important to create a relevant recommendation. End users can only provide feedback and count on recommendations.HARDWARE INTERFACES The recommendation system can work on any smartphone device. These devices should have some limit requirements to make the application run effectively. The mainframe computer speed and internet speed are expected to be high.SOFTWARE INTERFACESThis system can work on any platform. Internet corporation 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 signalize 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 activitiesInstall 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 waiter Part Use Case4.8Class DiagramTop aim Client-Side Class DiagramThe client side class diagram, mainly consists of UI(user interface) infalliblefor a user to register with the application by providi ng users information, after which user will be able to login and start the service. Once the application starts, it continually records the value 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 nonparallel manner. Firstly, ActivityClustering class collects the data sent from the android device, and pre-processes it using median filtering technique. afterwards 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 acti vities i.e,. the life document. This document is further given as an input to LifeStylemodelling class, 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.8 info FLOW DIAGRAMThe data flow diagrams are pictorial mental representation 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 level 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 ac ross the system boundaries. This level diagram shows the complete system as a exclusive procedure.In the DFD diagram shown in Fig*, the lifestyle information are the sensor values sent from the client i.e., android 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 disposition, raw data pre-processing by racquet removal, Activity recognition 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.Sequence 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.Sequence for Monitor 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 l ibrary for LDA ). Then the life style indexing module puts the life styles of users into the database in the format of (life- style, user) alternatively 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 unsuitable 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 END master of ceremonies SIDE PSEUDO CODE
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment