Sei sulla pagina 1di 36

DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

1.INTRODUCTION

What is Data Mining?

Structure of Data Mining

Generally, data mining (sometimes called data or knowledge discovery) is the process of analyzing
data from different perspectives and summarizing it into useful information - information that can
be used to increase revenue, cuts costs, or both. Data mining software is one of a number of
analytical tools for analyzing data. It allows users to analyze data from many different dimensions
or angles, categorize it, and summarize the relationships identified. Technically, data mining is the
process of finding correlations or patterns among dozens of fields in large relational databases.

How Data Mining Works?

While large-scale information technology has been evolving separate transaction and analytical
11systems, data mining provides the link between the two. Data mining software analyzes
relationships and patterns in stored transaction data based on open-ended user queries. Several types
of analytical software are available: statistical, machine learning, and neural networks. Generally,
any of four types of relationships are sought:

 Classes: Stored data is used to locate data in predetermined groups. For example, a
restaurant chain could mine customer purchase data to determine when customers visit and

Dept of CSE, Nandamuru Page 1


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

what they typically order. Clusters: Data items are grouped according to logical
relationships or consumer preferences. For example, data can be mined to identify market
segments or consumer affinities.

 Associations: Data can be mined to identify associations. The beer-diaper example is an


example of associative mining.

 Sequential patterns: Data is mined to anticipate behavior patterns and trends. For example,
an outdoor equipment retailer could predict the likelihood of a backpack being purchased
based on a consumer's purchase of sleeping bags and hiking shoes.

Data mining consists of five major elements:

1) Extract, transform, and load transaction data onto the data warehouse system.
2) Store and manage the data in a multidimensional database system.
3) Provide data access to business analysts and information technology professionals.
4) Analyze the data by application software.
5) present the data in a useful format, such as a graph or table.

Psychological stress is becoming a threat to people’s health nowadays. With the rapid pace
of life, more and more people are feeling stressed. According to a worldwide survey reported by
Newbusiness in 20101, over half of the population have experienced an appreciable rise in stress
over the last two years. Though stress itself is non-clinical and common in our life, excessive and
chronic stress can be rather harmful to people’s physical and mental health. According to existing
research works, long-term stress has been found to be related to many diseases, e.g., clinical
depressions, insomnia etc.. Moreover, according to Chinese Center for Disease Control and
Prevention, suicide has become the top cause of death among Chinese youth, and excessive stress is
considered to be a major factor of suicide. All these reveal that the rapid increase of stress has
become a great challenge to human health and life quality.

Dept of CSE, Nandamuru Page 2


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

2.LITERATURE SURVEY
Daily stress recognition from mobile phone data, weather conditions and individual traits
Research has proven that stress reduces quality of life and causes many diseases. For this
reason, several researchers devised stress detection systems based on physiological parameters.
However, these systems require that obtrusive sensors are continuously carried by the user. In our
project, we propose an alternative approach providing evidence that daily stress can be reliably
recognized based on behavioral metrics, derived from the user's mobile phone activity and from
additional indicators, such as the weather conditions (data pertaining to transitory properties of the
environment) and the personality traits (data concerning permanent dispositions of individuals). Our
multifactorial statistical model, which is person-independent, obtains the accuracy score of 72.28%
for a 2-class daily stress recognition problem. The model is efficient to implement for most of
multimedia applications due to highly reduced low-dimensional feature space (32d). Moreover, we
identify and discuss the indicators which have strong predictive power.

2.1 Feasibility Study


The feasibility of the project is analyzed in this phase and business proposal is put forth with
a very general plan for the project and some cost estimates. During system analysis the feasibility
study of the proposed system is to be carried out. This is to ensure that the proposed system is not a
burden to the company. For feasibility analysis, some understanding of the major requirements for
the system is essential.

2.2 Economical Feasibility


This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development of
the system is limited. The expenditures must be justified. Thus the developed system as well within
the budget and this was achieved because most of the technologies used are freely available. Only
the customized products had to be purchased.

Dept of CSE, Nandamuru Page 3


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

2.3 Technical Feasibility


This study is carried out to check the technical feasibility, that is, the technical requirements
of the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead to high
demands being placed on the client. The developed system must have a modest requirement, as only
minimal or null changes are required for implementing this system.

2.4 Social Feasibility


The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the users
solely depends on the methods that are employed to educate the user about the system and to make
him familiar with it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.

Dept of CSE, Nandamuru Page 4


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

SYSTEM ANALYSIS
3.1 EXISTING SYSTEM:

 Many studies on social media based emotion analysis are at the tweet level, using text-based
linguistic features and classic classification approaches. A system called MoodLens to
perform emotion analysis on the Chinese micro-blog platform Weibo, classifying the
emotion categories into four types, i.e., angry, disgusting, joyful, and sad.
 A existing system studied the emotion propagation problem in social networks, and found
that anger has a stronger correlation among different users than joy, indicating that negative
emotions could spread more quickly and broadly in the network. As stress is mostly
considered as a negative emotion, this conclusion can help us in combining the social
influence of users for stress detection.

DISADVANTAGES OF EXISTING SYSTEM:

 Traditional psychological stress detection is mainly based on face-to face interviews, self-
report questionnaires or wearable sensors. However, traditional methods are actually
reactive, which are usually labor-consuming, time-costing and hysteretic.
 These works mainly leverage the textual contents in social networks. In reality, data in social
networks is usually composed of sequential and inter-connected items from diverse sources
and modalities, making it be actually cross-media data.
 Though some user-level emotion detection studies have been done, the role that social
relationships plays in one’s psychological stress states, and how we can incorporate such
information into stress detection have not been examined yet.

Dept of CSE, Nandamuru Page 5


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

3.2PROPOSED SYSTEM:

 Inspired by psychological theories, we first define a set of attributes for stress detection from
tweet-level and user-level aspects respectively: 1) tweet-level attributes from content of
user’s single tweet, and 2) user-level attributes from user’s weekly tweets.
 The tweet-level attributes are mainly composed of linguistic, visual, and social attention
(i.e., being liked, retweeted, or commented) attributes extracted from a single-tweet’s text,
image, and attention list. The user-level attributes however are composed of: (a) posting
behavior attributes as summarized from a user’s weekly tweet postings; and (b) social
interaction attributes extracted from a user’s social interactions with friends.
 In particular, the social interaction attributes can further be broken into: (i) social
interaction content attributes extracted from the content of users’ social interactions with
friends; and (ii) social interaction structure attributes extracted from the structures of users’
social interactions with friends.

ADVANTAGES OF PROPOSED SYSTEM:

 Experimental results show that by exploiting the users’ social interaction attributes, the
proposed model can improve the detection performance (F1-score) by 6-9% over that of the
state-of-art methods. This indicates that the proposed attributes can serve as good cues in
tackling the data sparsity and ambiguity problem. Moreover, the proposed model can also
efficiently combine tweet content and social interaction to enhance the stress detection
performance.
 Beyond user’s tweeting contents, we analyze the correlation of users’ stress states and their
social interactions on the networks, and address the problem from the standpoints of: (1)
social interaction content, by investigating the content differences between stressed and
non-stressed users’ social interactions; and (2) social interaction structure, by investigating
the structure differences in terms of structural diversity, social influence, and strong/weak
tie.
 We build several stressed-twitter-posting datasets by different ground-truth labeling methods
from several popular social media platforms and thoroughly evaluate our proposed method
on multiple aspects.

Dept of CSE, Nandamuru Page 6


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

3.3HARDWARE REQUIREMENTS:

• System : Pentium IV 2.4 GHz.


• Hard Disk : 120 GB..
• Monitor : 15 '' LED
• Input Devices : keyboard, mouse
• Ram : 512 Mb.

3.4SOFTWARE REQUIREMENTS:

• Operating system : - Windows 7.


• Coding Language : JAVA/J2EE
• Tool : Netbeans 8.1
• Data Base :MYSQL

Dept of CSE, Nandamuru Page 7


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Software Environment
Initially the language was called as “oak” but it was renamed as “Java” in 1995. The primary
motivation of language was the need for a platform-independent (i.e., architecture neutral) language
that could be used to create software to be embedded in various consumer electronic devices.

 Java is a programmer’s language.


 Java is cohesive and consistent.
 Except for those constraints imposed by the Internet environment, Java gives the
programmer, full control.

Finally, Java is to Internet programming where C was to system programming.

Importance of Java to the Internet


Java has had a profound effect on the Internet. This is because; Java expands the Universe of
objects that can move about freely in Cyberspace. In a network, two categories of objects are
transmitted between the Server and the Personal computer. They are: Passive information and
Dynamic active programs. The Dynamic, Self-executing programs cause serious problems in the
areas of Security and probability. But, Java addresses those concerns and by doing so, has opened
the door to an exciting new form of program called the Applet.

Features Of Java
 Security
 Portability
 Object oriented
 Robust
 Portable
 Interpreted
 Multithreaded

4.1 Java Virtual Machine (JVM)


Beyond the language be done only at run time. The JIT compiles code, as it is needed,
during execution. There is the Java virtual machine. The Java virtual machine is an important
element of the Java technology. The virtual machine can be embedded within a web browser or an
operating system. Once a piece of Java code is loaded onto a machine, it is verified. As part of the
loading process, a class loader is invoked and does byte code verification makes sure that the code
that’s has been generated by the compiler will not corrupt the machine that it’s loaded on. Byte code
verification takes place at the end of the compilation process to make sure that is all accurate and
correct. So byte code verification is integral to the compiling and executing of Java code.

Dept of CSE, Nandamuru Page 8


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Overall Description

Jateja Java bytecode java VM


java source JavaVM
JJSourcJe
Java .Class
Fig 4.1 Picture showing the development process of JAVA Program

Java programming uses to produce byte codes and executes them. The first box indicates that the
Java source code is located in a. Java file that is processed with a Java compiler called javac. The
Java compiler produces a file called a. class file, which contains the byte code. The. Class file is
then loaded across the network or loaded locally on your machine into the execution environment is
the Java virtual machine, which interprets and executes the byte code.

Java Architecture
Java architecture provides a portable, robust, high performing environment for development.
Java provides portability by compiling the byte codes for the Java Virtual Machine, which is then
interpreted on each platform by the run-time environment. Java is a dynamic system, able to load
code when needed from a machine in the same room or across the planet.

Compilation of code
When you compile the code, the Java compiler creates machine code (called byte code) for a
hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte

Java
PC Compiler Interpreter
Java (PC)
Source
Code Byte code
………..
……….. Macintosh Java
Compiler Interpreter
(Platform (Macintosh)
……….. indepen
dent)

SPARC
………… Java
Compiler Interpreter
(Sparc)

Dept of CSE, Nandamuru Page 9


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

code. The JVM is created for overcoming the issue of portability. The code is written and compiled
for one machine and interpreted on all machines. This machine is called Java Virtual Machine.

Fig 4.2Compiling and interpreting Java Source Code

During run-time the Java interpreter tricks the byte code file into thinking that it is running on a Java
Virtual Machine. In reality this could be a Intel Pentium Windows 95 or Sun SARC station running
Solaris or Apple Macintosh running system and all could receive code from any computer through
Internet and run the Applets Simple

4.2 JAVASCRIPT
JavaScript supports the development of both client and server components of Web-based
applications. On the client side, it can be used to write programs that are executed by a Web browser
within the context of a JavaScript is a script-based programming language that was developed by
Netscape Communication Web page. On the server side, it can be used to write Web server
programs that can process information submitted by a Web browser and then updates the browser’s
display accordingly

Even though JavaScript supports both client and server Web programming, we prefer
JavaScript at Client side programming since most of the browsers supports it. JavaScript is almost
as easy to learn as HTML, and JavaScript statements can be included in HTML documents by
enclosing the statements between a pair of scripting tags

<SCRIPTS>..</SCRIPT>.

<SCRIPT LANGUAGE = “JavaScript”>

JavaScript statements

</SCRIPT>

Here are a few things we can do with JavaScript :

 Validate the contents of a form and make calculations.


 Add scrolling or changing messages to the Browser’s status line.
 Animate images or rotate images that change when we move the mouse over them.
 Detect the browser in use and display different content for different browsers.
 Detect installed plug-ins and notify the user if a plug-in is required.

JavaScript vs java
We can do much more with JavaScript, including creating entire application.

JavaScript and Java are entirely different languages. A few of the most glaring differences are:

Dept of CSE, Nandamuru Page 10


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

 Java applets are generally displayed in a box within the web document; JavaScript can affect
any part of the Web document itself.
 While JavaScript is best suited to simple applications and adding interactive features to Web
pages; Java can be used for incredibly complex applications.

Advantages
 JavaScript can be used for Sever-side and Client-side scripting.
 It is more flexible than VBScript.
 JavaScript is the default scripting languages at Client-side since all the browsers supports it.

4.3 Hyper Text Markup Language[HTML]


Hypertext Markup Language (HTML), the languages of the World Wide Web (WWW),
allows users to produces Web pages that include text, graphics and pointer to other Web pages
(Hyperlinks).

HTML is not a programming language but it is an application of ISO Standard 8879, SGML
(Standard Generalized Markup Language), but specialized to hypertext and adapted to the Web. The
idea behind Hypertext is that instead of reading text in rigid linear structure, we can easily jump
from one point to another point. We can navigate through the information based on our interest and
preference. A markup language is simply a series of elements, each delimited with special
characters that define how text or other items enclosed within the elements should be displayed.
Hyperlinks are underlined or emphasized works that load to other documents or some portions of
the same document.

Advantages
 A HTML document is small and hence easy to send over the net. It is small because it does
not include formatted information.
 HTML is platform independent.
 HTML tags are not case-sensitive.

4.4 Database Description [Java DataBase Connectivity[JDBC]]

What Is JDBC?

JDBC is a Java API for executing SQL statements. (As a point of interest, JDBC is a trademarked
name and is not an acronym; nevertheless, JDBC is often thought of as standing for Java Database
Connectivity. It consists of a set of classes and interfaces written in the Java programming language.
JDBC provides a standard API for tool/database developers and makes it possible to write database
applications using a pure Java API.

Dept of CSE, Nandamuru Page 11


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Using JDBC, it is easy to send SQL statements to virtually any relational database.
One can write a single program using the JDBC API, and the program will be able to send
SQL statements to the appropriate database. The combinations of Java and JDBC lets a
programmer write it once and run it anywhere.

What Does JDBC Do?

Simply put, JDBC makes it possible to do three things:


 Establish a connection with a database
 Send SQL statements
 Process the results.

JAVA
Application Client machine

JDBC
DBMS-proprietary protocol

DBMS Database server

Fig 3.2.4 JDBC Connection

Until now the middle tier has typically been written in languages such as C or C++,
which offer fast performance. However, with the introduction of optimizing compilers that
translate Java byte code into efficient machine-specific code, it is becoming practical to
implement the middle tier in Java. This is a big plus, making it possible to take advantage of
Java's robustness, multithreading, and security features. JDBC is important to allow database
access from a Java middle tier.

JDBC connectivity

The JDBC provides database-independent connectivity between the J2EE platform


and a wide range of tabular data sources. JDBC technology allows an Application
Component Provider to:
Dept of CSE, Nandamuru Page 12
DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

 Perform connection and authentication to a database server


 Manager transactions
 Move SQL statements to a database engine for preprocessing and execution
 Execute stored procedures
 Inspect and modify the results from Select statements.

JDBC Driver Types

The JDBC drivers that we are aware of at this time fit into one of four categories:

 JDBC-ODBC bridge plus ODBC driver


 Native-API partly-Java driver
 JDBC-Net pure Java driver
 Native-protocol pure Java driver

4.5 Java Server Pages (JSP)

Java server Pages is a simple, yet powerful technology for creating and maintaining
dynamic-content web pages. Based on the Java programming language, Java Server Pages offers
proven portability, open standards, and a mature re-usable component model .The Java Server
Pages architecture enables the separation of content generation from content presentation. This
separation not eases maintenance headaches, it also allows web team members to focus on their
areas of expertise. Now, web page designer can concentrate on layout, and web application
designers on programming, with minimal concern about impacting each other’s work.

Components
It was mentioned earlier that the Java Server Pages architecture can include reusable
Java components. The architecture also allows for the embedding of a scripting language
directly into the Java Server Pages file. The components current supported include Java Beans,
and Servlets.

Processing

A Java Server Pages file is essentially an HTML document with JSP scripting or tags.
The Java Server Pages file has a JSP extension to the server as a Java Server Pages file. Before

Dept of CSE, Nandamuru Page 13


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

the page is served, the Java Server Pages syntax is parsed and processed into a Servlet on the
server side. The Servlet that is generated outputs real content in straight HTML for responding
to the client.

Steps in the execution of a JSP Application:

1. The client sends a request to the web server for a JSP file by giving the name of the JSP
file within the form tag of a HTML page.

2. This request is transferred to the JavaWebServer. At the server side JavaWebServer


receives the request and if it is a request for a jsp file server gives this request to the JSP
engine.
JSP engine is program which can understands the tags of the jsp and then it converts those tags into
a Servlet program and it is stored at the server side. This Servlet is loaded in the memory and then it
is executed and the result is given back to theJavaWebServer and then it is transferred back to the
result is givenback to the JavaWebServer and then it is transferred back to the client.

4.6 MODULES DESCRIPTION


 System Framework
 Social Interactions
 Attributes categorization
 Tweet level Attribute
 User-level Attribute

System Framework:
In this framework we propose a novel hybrid model - a factor graph model combined with
Convolution Neural Network to leverage tweet content and social interaction information for stress
detection. Experimental results show that the proposed model can improve the detection
performance by 6-9% in F1-score. By further analyzing the social interaction data, we also discover
several intriguing phenomena, i.e. the number of social structures of sparse connections (i.e. with no

Dept of CSE, Nandamuru Page 14


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

delta connections) of stressed users is around 14% higher than that of non-stressed users, indicating
that the social structure of stressed users’ friends tend to be less connected and less complicated than
that of non-stressed users.

Social Interactions:
We analyze the correlation of users’ stress states and their social interactions on the networks, and
address the problem from the standpoints of: (1) social interaction content, by investigating the
content differences between stressed and non-stressed users’ social interactions; and (2) social
interaction structure, by investigating the structure differences in terms of structural diversity, social
influence, and strong/weak tie. Our investigation unveils some intriguing social phenomena.
Attributes categorization
We first define two sets of attributes to measure the differences of the stressed and non-stressed
users on social media platforms: 1) tweet-level attributes from a user’s single tweet; 2) user level
attributes summarized from a user’s weekly tweets.
Tweet-level Attributes
Tweet-level attributes describe the linguistic and visual content, as well as social attention factors
(being liked, commented, and retweeted) of a single tweet. We can classify words into different
categories, e.g. positive/negative emotion words, degree adverbs. Furthermore, we extract linguistic
attributes of emoticons, so we can map the keyword in square brackets to find the emoticons.
Twitter adopts Unicode as the representation for all emojis, which can be extracted directly.
User-Level Attributes
Compared to tweet-level attributes extracted from a single tweet, user-level attributes are extracted
from a list of user’s tweets in a specific sampling period. We use one week as the sampling period in
this project. On one hand, psychological stress often results from cumulative events or mental states.
On the other hand, users may express their chronic stress in a series of tweets rather than one.
Besides, the aforementioned social interaction patterns of users in a period of time also contain
useful information for stress detection. Moreover, as aforementioned, the information in tweets is
limited and sparse. We need to integrate more complementary information around tweets, e.g.,
users’ social interactions with friends.

Dept of CSE, Nandamuru Page 15


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: System Architecture

DATA FLOW DIAGRAM:


1. The DFD is also called as bubble chart. It is a simple graphical formalism that can be used to
represent a system in terms of input data to the system, various processing carried out on this
data, and the output data is generated by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It is used to
model the system components. These components are the system process, the data used by
the process, an external entity that interacts with the system and the information flows in the
system.
3. DFD shows how the information moves through the system and how it is modified by a
series of transformations. It is a graphical technique that depicts information flow and the
transformations that are applied as data moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a system at any level
of abstraction. DFD may be partitioned into levels that represent increasing information flow
and functional detail.

Dept of CSE, Nandamuru Page 16


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Login

Admin U ser
Che ck

yes no
View All Users Exists

Create Account
Add Stressed words

View Account Details

An alyze Each User


Stress Level

Follow Friends

Analyze Overall
S tress State Tweet Posts

Like,Comment,Retweet

End

UML DIAGRAMS

UML stands for Unified Modeling Language. UML is a standardized general-purpose


modeling language in the field of object-oriented software engineering. The standard is managed,
and was created by, the Object Management Group.
The goal is for UML to become a common language for creating models of object oriented
computer software. In its current form UML is comprised of two major components: a Meta-model
and a notation. In the future, some form of method or process may also be added to; or associated
with, UML.
The Unified Modeling Language is a standard language for specifying, Visualization,
Constructing and documenting the artifacts of software system, as well as for business modeling and
other non-software systems.
The UML represents a collection of best engineering practices that have proven successful in
the modeling of large and complex systems.

Dept of CSE, Nandamuru Page 17


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

The UML is a very important part of developing objects oriented software and the software
development process. The UML uses mostly graphical notations to express the design of software
projects.

GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that they can develop
and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations, frameworks, patterns and
components.
7. Integrate best practices.

USE CASE DIAGRAM:


A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented as use
cases), and any dependencies between those use cases. The main purpose of a use case diagram is to
show what system functions are performed for which actor. Roles of the actors in the system can be
depicted.

Dept of CSE, Nandamuru Page 18


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Create an Account

Login

View Users

Add Stressed words

Admin
User Analyse User stress state

Analyze Overall Stress state

View Account Details

View Friends

Follow Friends

Like,Comment,Retweet

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 the classes. It explains which
class contains information.

Dept of CSE, Nandamuru Page 19


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Admin User
Username
Username
Password
Password EmailID
Login
Register
Login

View User Details() View Account Details()


View User Stress State() View Friends()
Overall Stress State() Follow Friends()
Add Stressed words() Tweet,Retweet,Like,
Comment Posts()

SEQUENCE DIAGRAM:
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and
timing diagrams.

Dept of CSE, Nandamuru Page 20


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

DataBase

User Admin

Create an Account

View Users

Add stressed words

Analyze Each User


Stressstate

Analyze Overall
Stress State

View Account Details

View Friends

Follow Friends

New Tweets

Like,Comment,Retweet

Dept of CSE, Nandamuru Page 21


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

ACTIVITY DIAGRAM:
Activity diagrams are graphical representations of workflows of stepwise activities and actions with
support for choice, iteration and concurrency. In the Unified Modeling Language, activity diagrams
can be used to describe the business and operational step-by-step workflows of components in a
system. An activity diagram shows the overall flow of control.

Login

Admin User
Check

View All Users No


Exists Register

Yes

Add Activity Rules View Account Details

View Friend Requests


Monitor User Behaviour

Search Friends &


Send Requests
Block Users

UpdateStatus

Dept of CSE, Nandamuru Page 22


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: E-R Diagram for Like

Fig: E-R Diagram for Follow

Dept of CSE, Nandamuru Page 23


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: E-R Diagram for Tweet

Fig: E-R Diagram for Stress

Dept of CSE, Nandamuru Page 24


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

CODING AND IMPLEMENTATION

6.1 Introduction

In this phase the designs are translated into code. Computer programs are written using a
conventional programming language or an application generator. Programming tools like
Compilers, Interpreters, and Debuggers are used to generate the code. Different high level
programming languages like C, C++, Pascal, Java, .Net are used for coding. With respect to the type
of application, the right programming language is chosen.

State
<%@page import="java.sql.*" %>
<%@page import="SourceCode.DbConnection" %>
<%

String block = (String) session.getAttribute("message");


System.out.println("Message check : " + block);

boolean bol = false;


Connection con = DbConnection.getConnection();
Statement st = con.createStatement();
String Query = "select * from stress";
ResultSet rs = st.executeQuery(Query);
while (rs.next()) {
String val1 = rs.getString("stresswords");
System.out.println("val1 is :" + val1);
if (block.indexOf(val1) >= 0) {

response.sendRedirect("state1.jsp");

bol = false;
break;
} else {
bol = true;
}
}
if (bol == true) {
response.sendRedirect("state2.jsp");
}

%>

Dept of CSE, Nandamuru Page 25


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

state1
<%@page import="java.sql.ResultSet"%>

<%@page import="java.sql.Statement"%>

<%@page import="java.sql.Connection"%>

<%@page import="SourceCode.DbConnection"%>

<%

Connection con = DbConnection.getConnection();

Statement st = con.createStatement();

String block = (String) session.getAttribute("message");

try {

int up = st.executeUpdate("update tweet set stress ='Stressd Tweet' where msg = '" + block + "'");

if (up != 0) {

response.sendRedirect("home.jsp?msg=success");

} else {

response.sendRedirect("home.jsp?msg=Failed");

} catch (Exception EX) {

EX.printStackTrace();

%>

Dept of CSE, Nandamuru Page 26


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

state 2

<%@page import="java.sql.ResultSet"%>

<%@page import="java.sql.Statement"%>

<%@page import="java.sql.Connection"%>

<%@page import="SourceCode.DbConnection"%>

<%

Connection con = DbConnection.getConnection();

Statement st = con.createStatement();

String block = (String) session.getAttribute("message");

try {

int up = st.executeUpdate("update tweet set stress ='Normal Tweet' where msg = '" + block + "'");

if (up != 0) {

response.sendRedirect("home.jsp?msg=success");

} else {

response.sendRedirect("home.jsp?msg=Failed");

} catch (Exception EX) {

EX.printStackTrace();

%>

Dept of CSE, Nandamuru Page 27


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of test. Each test
type addresses a specific testing requirement.

TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the application
.it is done after the completion of an individual unit before integration. This is a structural testing,
that relies on knowledge of its construction and is invasive. Unit tests perform basic tests at
component level and test a specific business process, application, and/or system configuration. Unit
tests ensure that each unique path of a business process performs accurately to the documented
specifications and contains clearly defined inputs and expected results.

Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic outcome
of screens or fields. Integration tests demonstrate that although the components were individually
satisfaction, as shown by successfully unit testing, the combination of components is correct and
consistent. Integration testing is specifically aimed at exposing the problems that arise from the
combination of components.

Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.

Functional testing is centered on the following items:

Dept of CSE, Nandamuru Page 28


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Valid Input : identified classes of valid input must be accepted.


Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or


special test cases. In addition, systematic coverage pertaining to identify Business process flows;
data fields, predefined processes, and successive processes must be considered for testing. Before
functional testing is complete, additional tests are identified and the effective value of current tests
is determined.

System Test
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions and
flows, emphasizing pre-driven process links and integration points.

White Box Testing


White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It is
used to test areas that cannot be reached from a black box level.

Black Box Testing


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests, must
be written from a definitive source document, such as specification or requirements document, such
as specification or requirements document. It is a testing in which the software under test is treated,
as a black box .you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software woks.

Dept of CSE, Nandamuru Page 29


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Test cases

Test case Test case Input Expected Output Status


output
S.NO
1. User User details Successful Successful success
registration registration registration
page of user of user
2. User login User name User home User home success
page and password page page
3. Admin login Admin name Admin home Admin home success
page and password page page

Dept of CSE, Nandamuru Page 30


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: User login page

Fig: User Registration page

Dept of CSE, Nandamuru Page 31


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: Home page of user

Fig: Tweet

Dept of CSE, Nandamuru Page 32


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: Registered user's

Fig: Stress level of a user

Dept of CSE, Nandamuru Page 33


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Fig: Overall stress level of a user

Dept of CSE, Nandamuru Page 34


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

Conclusion

We presented a framework for detecting user's psychological stress states from user's weekly social
media data, leveraging tweet's content as well as user's social interactions. Employing real-world
social media data as the basis, we studied the correlation between user's psychological stress states
and their social interaction behaviors. To fully leverage both content and social interaction
information of user’s tweets, we proposed a hybrid model which combines the factor graph model
(FGM) with a convolutional neural network (CNN).

Dept of CSE, Nandamuru Page 35


DETECTING STRESS BASED ON SOCIAL INTERACTIONS IN SOCIAL NETWORKS

REFERNECES
[1] Andrey Bogomolov, Bruno Lepri, Michela Ferron, Fabio Pianesi, and Alex Pentland. Daily
stress recognition from mobile phone data, weather conditions and individual traits. In ACM
International Conference on Multimedia, pages 477–486, 2014.

[2] ChrisBuckleyandEllenMVoorhees. Retrievalevaluationwithincompleteinformation.


InProceedingsofthe27thannualinternational ACM SIGIR conference on Research and development
in information retrieval, pages 25–32, 2004.

[3] Xiaojun Chang, Yi Yang, Alexander G Hauptmann, Eric P Xing, and Yao-Liang Yu. Semantic
concept discovery for large-scale zero-shot event detection. In Proceedings of International Joint
Conference on Artificial Intelligence, pages 2234–2240, 2015.

[4] Wanxiang Che, Zhenghua Li, and Ting Liu. Ltp: A chinese language technology platform. In
Proceedings of International Conference on Computational Linguistics, pages 13–16, 2010.

[5] Chih chung Chang and Chih-Jen Lin. Libsvm: a library for support vector machines. ACM
TRANSACTIONS ON INTELLIGENT SYSTEMS AND TECHNOLOGY, 2(3):389–396, 2001.

[6] Dan C Ciresan, Ueli Meier, Jonathan Masci, Luca Maria Gambardella, and J¨urgen
Schmidhuber. Flexible, high performance convolutional neural networks for image classification. In
Proceedings of International Joint Conference on Artificial Intelligence, pages 1237–1242, 2011.

[7] Sheldon Cohen and Thomas A. W. Stress, social support, and the buffering hypothesis.
Psychological Bulletin, 98(2):310–357, 1985.

[8] Glen Coppersmith, Craig Harman, and Mark Dredze. Measuring post traumatic stress disorder in
twitter. In Proceedings of the International Conference on Weblogs and Social Media, pages 579–
582, 2014.

[9] Rui Fan, Jichang Zhao, Yan Chen, and Ke Xu. Anger is more influential than joy: Sentiment
correlation in weibo. PLoS ONE, 2014.

[10] Zhanpeng Fang, Xinyu Zhou, Jie Tang, Wei Shao, A.C.M. Fong, Longjun Sun, Ying Ding,
Ling Zhou, , and Jarder Luo. Modeling paying behavior in game social networks. In In Proceedings
of the Twenty-Third Conference on Information and Knowledge Management (CIKM’14), pages
411–420, 2014.

Dept of CSE, Nandamuru Page 36

Potrebbero piacerti anche