1. INTRODUCTION Location cloaking is one typical approach to protect the user location privacy in LBS. Upon receiving a location-based spatial query (e.g., a range query or a kNN query) from the user, the system cloaks the user’s current location into a cloaking region based on the user’s privacy requirement. The location-based spatial query is, thus, transformed into a region-based spatial query before being sent to the LBS server. The LBS server then evaluates the region- based query and returns a result superset, which contains the query results for all possible location points in the cloaking region. Finally, the system refines the result superset to generate the exact results for the query location. In the literature, a variety of cloaking algorithms based on snapshot user 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1. INTRODUCTION
Location cloaking is one typical approach to protect the user
location privacy in LBS. Upon receiving a location-based spatial
query (e.g., a range query or a kNN query) from the user, the system
cloaks the user’s current location into a cloaking region based on the
user’s privacy requirement. The location-based spatial query is, thus,
transformed into a region-based spatial query before being sent to the
LBS server.
The LBS server then evaluates the region-based query and
returns a result superset, which contains the query results for all
possible location points in the cloaking region. Finally, the system
refines the result superset to generate the exact results for the query
location. In the literature, a variety of cloaking algorithms based on
snapshot user locations have been developed for different privacy
metrics.
1
2. SYSTEM ANALYSIS
2.1 EXISTING SYSTEM
In existing system though we have many web sites portal, and
through high end mobile phones or PDAs we can get information
about the needed sometimes. But these systems are not available to all
and not all time. And also, this information does not reach people at
the time of emergencies. It cannot be accessed by people who don’t
know to access the device. Other wise we have to make a call to some
one or to make an enquiry to know about the current location. Thus it
fails to provide privacy for the user.
2
2.2 PROPOSED SYSTEM
Proposed system provides more easy and efficient way to get
answer about the location and other related queries via J2ME mobile.
In this system we can get the answer about What, When, and how the
queries are. To use this system, there is no need of using any extra
devices or searching in websites. Thus it is used by people who are
living in rural areas also.
2.2.1. ADVANTAGES:
• Easy to access
• Provide information as fast
• Keep the user information confidentially
3
3. SYSTEM REQUIREMENTS
3.1 SOFTWARE REQUIREMENTS
• Java1.6 or More
• J2ME
• Wireless toolkit 2.5.1
• Windows XP
• MS-SQL Server
3.2 HARDWARE REQUIREMENTS
• Hard disk : 40 GB
• RAM : 128mb
• Processor : Pentium
4
3.3 TECHNOLOGIES USED
3.3.1. JAVA
It is a Platform Independent. Java is an object-oriented programming
language developed initially by James Gosling and colleagues at Sun
Microsystems. The language, initially called Oak (named after the oak
trees outside Gosling's office), was intended to replace C++, although
the feature set better resembles that of Objective C.
3.3.2. WORKING OF JAVA:
Java is two things:
▪ A programming language and
▪ A platform
3.3.3 The Java Programming Language
Java is a high-level programming language that is all of the
following:
• Simple
• Object oriented
• Distributed
• Interpreted
5
• Robust
• Secure
• Architecture-neutral
• Portable
• High-performance
• Multithreaded
• Dynamic
Java is also unusual in that each Java program is both compiled
and interpreted. With a compiler, you translate a Java program into an
intermediate language called Java byte codes--the platform-
independent codes interpreted by the Java interpreter. With an
interpreter, each Java byte code instruction is parsed and run on the
computer. Compilation happens just once; interpretation occurs each
time the program is executed. This figure illustrates how this works.
(FIG 3.1) WORKING OF JAVA
6
Java byte codes can be considered as the machine code
instructions for the Java Virtual Machine (Java VM). Every Java
interpreter, whether it's a Java development tool or a Web browser
that can run Java applets, is an implementation of the Java VM. The
Java VM can also be implemented in hardware.
Java byte codes help make "write once, run anywhere" possible.
The Java program can be compiled into byte codes on any platform
that has a Java compiler. The byte codes can then be run on any
implementation of the Java VM. For example, the same Java program
can run on Windows NT, Solaris, and Macintosh.
3.3.4. The Java Platform
A platform is the hardware or software environment in which a
program runs. The Java platform differs from most other platforms in
that it's a software-only platform that runs on top of other, hardware-
7
based platforms. Most other platforms are described as a combination
of hardware and operating system.
The Java platform has two components:
• The Java Virtual Machine (Java VM)
• The Java Application Programming Interface (Java API)
The Java API is a large collection of ready-made software
components that provide many useful capabilities, such as graphical
user interface (GUI) widgets. The Java API is grouped into libraries
(packages) of related components.
The following figure depicts a Java program, such as an
application or applet, that's running on the Java platform. As the
figure shows, the Java API and Virtual Machine insulates the Java
program from hardware dependencies.
As a platform-independent environment, Java can be a bit slower than
native code. However, smart compilers, well-tuned interpreters, and
just-in-time byte code compilers can bring Java's performance close to
that of native code without threatening portability.
8
ADDITIONAL FEATURES OF JAVA
Accessibility from any location in the world: Java is an internet
programming language The web provides accessibility to a computer
from anywhere in the world Virus free System:
1.)Java is secure
2.)That is any changes made to the computer are tagged as
errors and the program will not execute
Platform Independent Language:
1.)java compiler compiles java code to an intermediate byte
code that is understood by JVM(java virtual machine)
2.) To execute the byte codes the system should have java
interpreter or java enabled internet browser
Speed:
1.) Java is a High performance language.
2.) Faster than programs written in other interpreter languages,
such as BASIC.
3.) Faster than C, C++.
Development time:
1.) Java is simple.
2.) In java programmers do not need to manipulate memory.
GARBAGE COLLECTION
It’s the process that automatically frees the memory of
objects that are no more in use. There is no specification of a
technique for garbage collection
9
How Will Java Technology Change My Life?
We can't promise you fame, fortune, or even a job if you learn
the Java programming language. Still, it is likely to make your
programs better and requires less effort than other languages. We
believe that Java technology will help you do the following:
Get started quickly: Although the Java programming language
is a powerful object-oriented language, it's easy to learn, especially for
programmers already familiar with C or C++.
Write less code: Comparisons of program metrics (class counts,
method counts, and so on) suggest that a program written in the Java
programming language can be four times smaller than the same
program written in C++.
Write better code: The Java programming language encourages
good coding practices, and automatic garbage collection helps you
avoid memory leaks. Its object orientation, its JavaBeansTM
component architecture, and its wide-ranging, easily extendible API
let you reuse existing, tested code and introduce fewer bugs.
Develop programs more quickly: The Java programming
language is simpler than C++, and as such, your development time
could be up to twice as fast when writing in it. Your programs will
also require fewer lines of code.
Avoid platform dependencies: You can keep your program
portable by avoiding the use of libraries written in other languages.
Write once, run anywhere: Because applications written in the
Java programming language are compiled into machine-independent
bytecodes, they run consistently on any Java platform.
10
Distribute software more easily: With Java Web Start software,
users will be able to launch your applications with a single click of the
mouse. An automatic version check at startup ensures that users are
always up to date with the latest version of your software. If an update
is available, the Java Web Start software will automatically update
their installation.
What Can Java Do?
Probably the most well-known Java programs are Java applets.
An applet is a Java program that adheres to certain conventions that
allow it to run within a Java-enabled browser.
However, Java is not just for writing cute, entertaining applets
for the World Wide Web ("Web"). Java is a general-purpose, high-
level programming language and a powerful software platform. Using
the generous Java API, we can write many types of programs.
The most common types of programs are probably applets and
applications, where a Java application is a standalone program that
runs directly on the Java platform.
How does the Java API support all of these kinds of programs?
With packages of software components that provide a wide range of
functionality. The core API is the API included in every full
implementation of the Java platform. The core API gives you the
following features:
11
The Essentials: Objects, strings, threads, numbers, input and output,
data structures, system properties, date and time, and so on.
Applets: The set of conventions used by Java applets.
Networking: URLs, TCP and UDP sockets, and IP addresses.
Internationalization: Help for writing programs that can be localized
for users worldwide. Programs can automatically adapt to specific
locales and be displayed in the appropriate language.
Security: Both low-level and high-level, including electronic
signatures, public/private key management, access control, and
certificates.
Software components: Known as JavaBeans, can plug into existing
component architectures such as Microsoft's OLE/COM/Active-X
architecture, OpenDoc, and Netscape's Live Connect.
Object serialization: Allows lightweight persistence and
communication via Remote Method Invocation (RMI).
Java Database Connectivity (JDBC): Provides uniform access to a
wide range of relational databases.
3.3.5. About the J2ME Language
What is J2ME?
Sun Microsystems defines J2ME as "a highly optimized Java run-time
environment targeting a wide range of consumer products, including
pagers, cellular phones, screen-phones, digital set-top boxes and car
navigation systems."
12
Announced in June 1999 at the JavaOne Developer Conference, J2ME
brings the cross-platform functionality of the Java language to smaller
devices, allowing mobile wireless devices to share applications. With
J2ME, Sun has adapted the Java platform for consumer products that
incorporate or are based on small computing devices.
Devices J2ME targets:
Target devices for J2ME applications developed using CLDC
generally have the following characteristics:
* 160 to 512 kilobytes of total memory available for the Java platform
* Limited power, often battery powered
* Network connectivity, often with a wireless, inconsistent connection
and with limited bandwidth
* User interfaces with varying degrees of sophistication; sometimes
with no interface at all. Some devices supported by CLDC include
wireless phones, pagers, mainstream personal digital assistants
(PDAs), and small retail payment terminals.
According to Sun Microsystems, target devices for CDC generally
have the following characteristics:
* Powered by a 32-bit processor
* Two megabytes or more of total memory available for the Java
platform
* Devices that require the full functionality of the Java 2 "Blue Book"
virtual machine
* Network connectivity, often with a wireless, inconsistent connection
and with limited bandwidth
13
* User interfaces with varying degrees of sophistication; sometimes
with no interface.
3.4. DATABASE
3.4.1. JDBC API 2.0
The JDBC API lets you invoke SQL commands from Java
programming language methods. You use the JDBC API in an
enterprise bean when you override the default container-managed
persistence or have a session bean access the database. With
container-managed persistence, database access operations are
handled by the container, and your enterprise bean implementation
contains no JDBC code or SQL commands. You can also use the
JDBC API from a servlet or JSP page to access the database directly
without going through an enterprise bean.
The JDBC API has two parts: an application-level interface
used by the application components to access a database, and a
service provider interface to attach a JDBC driver to the J2EE
platform.
3.4.2. JAVA DATABASE CONNECTIVITY (JDBC)
JDBC AND ODBC IN JAVA:
Most popular and widely accepted database
connectivity called Open Database Connectivity (ODBC) is
used to access the relational databases. It offers the ability to
14
connect to almost all the databases on almost all platforms. Java
applications can also use this ODBC to communicate with a
database. Then we need JDBC why? There are several reasons:
▪ ODBC API was completely written in C language and
it makes an extensive use of pointers. Calls from Java to
native C code have a number of drawbacks in the security,
implementation, robustness and automatic portability of
applications.
▪ ODBC is hard to learn. It mixes simple and advanced
features together, and it has complex options even for simple
queries.
▪ ODBC drivers must be installed on client’s machine.
3.4.3. Architecture of JDBC:
Application Layer:
Java program wants to get a connection to a database. It needs the
information from the database to display on the screen or to modify
the existing data or to insert the data into the table.
Driver Manager:
The layer is the backbone of the JDBC
architecture. When it receives a connection-request form.
The JDBC Application Layer:
It tries to find the appropriate driver by iterating through all the
available drivers, which are currently registered with Device Manager.
15
After finding out the right driver it connects the application to
appropriate database.
JDBC Driver layers: This layer accepts the SQL calls from
the application and converts them into native calls to the database and
vice-versa. A JDBC Driver is responsible for ensuring that an
application has consistent and uniform m access to any database.
When a request received by the application, the JDBC driver
passes the request to the ODBC driver, the ODBC driver
communicates with the database and sends the request and gets the
results. The results will be passed to the JDBC driver and in turn to
the application. So, the JDBC driver has no knowledge about the
actual database, it knows how to pass the application request o the
ODBC and get the results from the ODBC.
The JDBC and ODBC interact with each other, how? The
reason is both the JDBC API and ODBC are built on an interface
called “Call Level Interface” (CLI). Because of this reason the JDBC
driver translates the request to an ODBC call. The ODBC then
converts the request again and presents it to the database. The results
of the request are then fed back through the same channel in reverse.
3.4.4. Structured Query Language (SQL)
SQL (Pronounced Sequel) is the programming language
that defines and manipulates the database. SQL databases are
relational databases; this means simply the data is store in a set of
simple relations. A database can have one or more table. You can
define and manipulate data in a table with SQL commands. You use
the data definition language (DDL) commands to creating and altering
16
databases and tables.
You can update, delete or retrieve data in a table with
data manipulation commands (DML). DML commands include
commands to alter and fetch data.
The most common SQL commands include commands is
the SELECT command, which allows you to retrieve data from the
database.
In addition to SQL commands, the oracle server has a
procedural language called PL/SQL. PL/SQL enables the programmer
to program SQL statement. It allows you to control the flow of a SQL
program, to use variables, and to write error-handling procedures.
17
Response to the user
Location Based Services Server
Location cloaking Agent
Location based queries
4. SYSTEM DESIGN
4.1. SYSTEM ARCHITECTURE:
18
FIG 4.1
4.2. DATAFLOW DIAGRAMS:
19
FIG 4.2
User
Type Query
Send Query
Location cloaking agent receives the query and passes to LBS
process Query
Stop
Location cloaking agent Send Result
User Get Location Information
User LBS Mobile
Login and registration
Level 0- login and registration module
20
FIG 4.2.1
FIG4.2.2
4.3. UML DIAGRAMS
4.3.1. USE CASE DIAGRAM:
User LBS Mobile
Location cloaking agent
Captures the query
Send query for any place
LBS Server
Search the particular query
Send response
Send the location
information
Get immediate and valid information
Level 1- Query and response
21
4.3.2. SEQUENCE DIAGRAM:
User
Login
Query with GPS value
Only one Nearest output Send to user
Region with Query
Cloaking Server
N-Number Nearest output Send to Chocking server
Location Server
1.Query means SBI ATM Center2. Automatic GPS Value Send
22
UserUser Cloaking ServerCloaking Server Location ServerLocation Server
1: Login
2: Query with Gps value
3: Region with Query value
4: N-Number of Nearest output
5: Only one output send to the user Mobile
23
4.3.3. COLLABORATION DIAGRAM:
User
Cloaking Server
Location Server
1: Login2: Query with Gps value
5: Only one output send to the user Mobile
3: Region with Query value
4: N-Number of Nearest output
24
4.3.4. ACTIVITY DIAGRAM:
5. SYSTEM IMPLEMENTATION
25
Login
Query With Gps value to cloaking server
Query with Region to Location Server
N-number of Nearest OutputQuery send to cloaking server
Only one Nearest Send to user Mobile
5.1. MODULES
1. User Registration
2. User Authentication & Query Process
3. User Location Identification
4. Safe Region Manipulation
5. Query Request to the Data Location Server
6. Retrieve of results in according to safe region
7. Find the nearest location
5.2. MODULE DESCRIPTION
26
1. USER REGISTRATION
In the Location base query system we have to register the user for his
future query search. Without registering a user can’t access the
clocking agent. For register the user should give his details such as his
name, address, age, sex, ext., once a user register his details he can get
useful information from the clocking server. Each user will identify
by a unique username and password. REF[1].
2. USER AUTHENTICATION & QUERY PROCESS
If a client want to arise a query first he should be authenticated by the
server for this he have to login by his user name and password after he
got sign-in he can arise query to the server. This query will go the
clocking agent and the clocking agent will send the query to the
location server. REF[2].
3. USER LOCATION IDENTIFICATION
The clocking agent will get user location and then it will find the user
is moving towards the location or moving outwards the location. The
current location is obtained using GPS from the mobile user. The
mobile user will carry with the GPS for getting the longitude &
latitude values. These values are obtained via satellite communication.
So once the user sends the query to the Cloaking Agent, the Cloaking
agent will get the exact location of the user via GPS values of the
user. REF[3]&[4].
27
4. SAFE REGION MANIPULATION
When ever a clocking agent receives a query from the client it
will check the query and find the safe region for the client. Safe region
is calculated from the exact user location. We apply Max Cloak
Algorithm, to fetch the direction of the user. If the direction of the
user is towards forward then the cloaking agent will calculate the safe
region with respect to the main location. For example user sends a
request from Habibullah Road, user is moving towards T.Nagar, then
the Safe region T.Nagar, if the user is moving in the opposite direction
then the cloaking agent will specify the safe region as
Nungambakkam.. After find safe region the clocking agent will send
the request to the Location Server. The location server will send the
result for the safe region the clocking agent receives the result from
the Location server and then it find the nearest Location from the
result and send the location to the client.REF[5]
5. QUERY REQUEST TO THE DATA LOCATION SERVER
The Clocking agent Manipulate the Safe region for the client and the
send the query to the Location server. The location server checks the
Query and Retrieve the results according to the safe region and then
send the result to the clocking agent. If the user is requested for ATM
Bank from Habibullah Road, first the query is sent to the Cloaking
28
Agent. Cloaking agent will manipulate the safe region as T.Nagar,
then the query is forwarded to the Data Location Server. REF[6]&[7].
6. RETRIEVE OF RESULTS IN ACCORDING TO SAFE
REGION
Clocking agent will send the query to the Location server. The
Location server manipulates the user query and it will send the results
to the clocking server. The main data server will retrieve the nearest
results that are fit into the safe region area calculation. If the query for
ATM Bank from the T,nagar as safe Region, then the Location server
will find the nearest ATM bank with respect to T.nagar. The location
based is retrieved and the results are given back to the Cloaking agent.
REF[8].
7. FIND THE NEAREST LOCATION
After getting the query result from the Location server, the clocking
server will filter the results in accordance to the user exact location.
The Location server will retrieve the ATM bank information in
accordance to T. Nagar to the cloaking agent. But the cloaking agent
knows user is in Habibullah Road. So the cloaking agent will apply
KNN Query Algorithm to fetch the nearest ATM bank in accordance
to Habibullah Road. So user will be receving the exact information, as
requested but then the user’s Location Privacy is still maintained,
because the Location server will update in its table as the query is
29
from T.anagr not from Habibullah Road. By this way we ensure
Privacy in the user’s location. REF[9].
30
6. TESTING
6.1. 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.
6.2. 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
input produces 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,
31
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 a systematic demonstration 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:
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.
32
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.
33
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 works.
Unit Testing:
Unit testing is usually conducted as part of a combined code
and unit test phase of the software lifecycle, although it is not
uncommon for coding and unit testing to be conducted as two distinct
phases.
Test strategy and approach
Field testing will be performed manually and functional tests
will be written in detail.
34
Integration Testing
Software integration testing is the incremental integration
testing of two or more integrated software components on a single
platform to produce failures caused by interface defects.
The task of the integration test is to check that components or
software applications, e.g. components in a software system or – one
step up – software applications at the company level – interact without
error.
Test Results:
All the test cases mentioned above passed successfully. No defects
encountered.
35
7. CONCLUSION
The representation of cloaking regions and circular region leads to a
small result superset. Experimental result shows that the mobility
aware cloaking algorithms are robust against trace analysis attack
without compromising much on query latency or communication
cost.The progressive query processing algorithm generally achieves
shorter response time than the bulk algorithm.
36
8. APPENDIX
8.1 Source Code
Login:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
public class Login extends Form implements CommandListener
{
TextField txtUser,txtPwd,txtIPAddress;
Display disp;
Command cmdSubmit,cmdBack;
Form welScreen;
String userpassword;
public Login(String strTitle,Display disp1,Form welScreen)
{
super(strTitle);
this.disp = disp1;
37
this.welScreen = welScreen;
cmdSubmit = new Command("Submit",Command.OK,1);
cmdBack = new Command("Back",Command.BACK,1);
txtUser = new TextField("UserName","",40,TextField.ANY);
txtPwd = new TextField("PassWord","",40,TextField.PASSWORD);
txtIPAddress = new TextField("IPAddress","",40,TextField.ANY);
this.append(txtUser);
this.append(txtPwd);
this.append(txtIPAddress);
this.setTicker(new Ticker("Login Form"));
this.addCommand(cmdSubmit);
this.addCommand(cmdBack);
this.setCommandListener(this);
}
public void commandAction(Command com,Displayable d1){