0% found this document useful (0 votes)
48 views

Design and Implementation of Web Services Based GPRS Automatic Meter Reading System

This document discusses a web services based GPRS automatic meter reading system. It proposes using GPRS communication technology and web services technology to enhance the management of power company meter reading. Specifically, it designs a system architecture that uses a GSM/GPRS network for the front-end and implements the master station system using web services. It also discusses the benefits of GPRS such as real-time data collection, wide coverage, and low construction costs. Finally, it describes implementing the front-end using Java multi-threading and sockets and the use of web services standards like XML, SOAP, UDDI and WSDL.

Uploaded by

kedar majethiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Design and Implementation of Web Services Based GPRS Automatic Meter Reading System

This document discusses a web services based GPRS automatic meter reading system. It proposes using GPRS communication technology and web services technology to enhance the management of power company meter reading. Specifically, it designs a system architecture that uses a GSM/GPRS network for the front-end and implements the master station system using web services. It also discusses the benefits of GPRS such as real-time data collection, wide coverage, and low construction costs. Finally, it describes implementing the front-end using Java multi-threading and sockets and the use of web services standards like XML, SOAP, UDDI and WSDL.

Uploaded by

kedar majethiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

20IO 3rd International Conference on Advanced Computer Theory and Engineering(ICACTE)

Design and Implementation of Web Services Based GPRS Automatic Meter

Reading System

Wu Kehe Zhang Xiaoliang, Wang Yuanhong, Xu Yuhan


School of Control and Computer Engineering School of Control and Computer Engineering
North China Electric Power University North China Electric Power University
Beijing, China Beijing, China
[email protected] [email protected]

Abstract-For the purpose of enhancing the management level


of the meter reading of power enterprises, web services based II. GPRS COMMUNICAnON TECHNOLOGY
GPRS automatic meter reading system is put forward. In this
GPRS, General Packet Radio Service, is a packet-based
paper, the characteristics of GPRS technology and Web
data bearer service for wireless communication service.
Services technology are analyzed, and the architecture of web
GPRS combines mobile access with Internet protocol(IP)­
services based GPRS automatic meter reading system is
based services, uses a packet radio principle to transfer user
designed. The front-end based on the GSM/GPRS network is
data packets in an efficient way between GSM mobile
implemented by Java multi-threading and socket technolog y,
stations and external packet data networks, gives almost
Master station system implemented using Web Services
technology. At the lost of this paper, we will give the model
instantaneous connection set-up and continuous connection
design and key codes based on the latest Java Web Services to the Internet. The overall benefits for power automatic
specifications JAX-WS. meter reading system adopting GPRS as follows:
• Real-time: Due to the characteristics of GPRS such
Keywords-Automatic Meter Reading: GPRS: Web Services as non-time-delay and real-time online, it can receive
Socket and process many data collection points
simultaneously and simply. So that, the real time
requirements of data collection and transmission of
1. INTRODUCTION
this system will be well satisfied.
Meter reading is an important part of the daily work of • Wide coverage: GPRS network has already cover the
power enterprises. Traditional meter reading, which depends whole station, without limit to expand and access. It
on manual reading on site at a fixed date, has many is quite qualified for the management and control of
deficiencies in real-time and accuracy. GPRS automatic automatic meter reading, as long as it is under the
meter reading system is a gradually developed intelligent coverage of wireless GSM / GPRS network.
system combined with the power meter reading • Low construction costs: By using China Mobile's
characteristics, it can collect the real time data of industrial GPRS wireless public network platform, it don't
and residential electricity, and then sends the data to the need to layout the wire specially, thus the
remote management through China Mobile's GSM/GPRS construction will be low and the network
network. By the system, it can not only save the human maintenance costs free.
resources, but also can supply accurate and reliable meter • Huge capacity and high transfer rate: The transfer
reading data for the power enterprises to do load prediction rate of GPRS theoretically can transfer rate
and control, so that the overall economic efficiency of the 171.2kbitls, and currently the actual transfer rate
power industries can be improved and the management level about 40Kbps, it can fully meet the data transfer rate
progressed. (>10Kbps) of the system demand.
Web Services is a technique that enables the application
• GPRS offers a number of security enhancements to
independent of programming language and platform. For
protect the data transmitted through the GPRS
development requirements of automatic meter reading
network.
system of the power enterprises, this paper builds a web
Services based GPRS automatic meter reading system with III. WEB SERVICES TECHNOLOGY
Web Services technology which is easy interactive,
Web Services technology as a component technology
extensible, open and easy maintenance. The real-time and
reliable front-end based on the GSMlGPRS network is provide a standard mean of interoperating between different
software applications, running on a variety of platforms
implemented by Java multi-threading and socket technology.
and/or frameworks.
Web Services combine XML(eXtended Markup
Language), Soap(Simple Object Access Protocol),

978-1-4244-6542-2/$26.00 © 2010 IEEE V4-360

Authorized licensed use limited to: SARDAR VALLABHBHAI NATIONAL INSTITUTE OF TECH. Downloaded on August 31,2023 at 12:04:47 UTC from IEEE Xplore. Restrictions apply.
2010 3rd International Conference on Advanced Computer Theory and Engineering(ICACTE)

UDDI(Universe Description Discovery Integration) and


WSDL (Web Service Description Language). Using these
technologies, Web Services offer a loosely coupled
distributed computing environment where every service is
encapsulated as a separate module to offer some function.
W3C Working Group defines a web service as follow:
A Web service is a software system designed to support
interoperable machine-to-machine interaction over a network.
It has an interface described in a machine-processable format
Meters
(specifically WSDL). Other systems interact with the Web
service in a manner prescribed by its description using SOAP
messages, typically conveyed using HTTP with an XML
serialization in conjunction with other Web-related standards.
Web Services technology has the following
characteristics:
• Interoperability of heterogeneous platforms: In Transformer
theory, the greatest advantage provided by Web Resident User Meters Meters
Service is seamless integration between
heterogeneous platforms. Since different users adopt Figure 1. the System Architecture.
diverse hardware and software platforms, that result
in the demand for heterogeneous platforms • Wireless terminals:
communicating with each other. Web Service Wireless terminals are smart communication devices that
enables any two applications to communicate with can collect multiple signals. In this system, wireless
each other, as long as they support XML. terminals include three types: the transformer meters, large
• Broader software reuse: Software Reuse builds user meters and resident user meter concentrators. They will
applications by combining existing modules, so that upload electric data to the front end, and response orders
it can significantly improve software productivity from front end simultaneously.
and quality. So long as users get the WSDL file, a • Front-ends:
description of Web Service, the client proxy can be Front-ends are configured with fixed IP address. They
easily generated through which web service can be gather data packets from wireless terminals through socket,
accessed. and provide the system with communication, data transfer
• Universal means of communication: Using standard and storage functions. When the meter collection points
protocol known as SOAP, Web Services can increase, we can start more front-ends, and they should
represent data and call requests easily. And through always be online 24-hour.
the HTTP protocol data in XML format can be • Master station:
transmitted. The master station is designed to manage front-ends and
• Rapid software distribution: Web Service will wireless terminals, it receives user operations and distributes
completely change the way software released. them to the right front-end. The master station based on Web
Vendors can decompose software into a number of Services technology provides data interfaces and Web
modules realized by Web Service, thus software will Services for other systems, it is a good solution for the power
be published in Web directly. enterprise sector integration among heterogeneous systems.
• GPRS/GSM network:
IV. THE ARCHITECTURE
The data acquired by wireless terminals is transferred
GPRS automatic meter reading system IS intelligent through China Mobile's GSM/GPRS network. After
system to read and control the wireless terminals, encoding by the GSM gateway, the data is converted into the
transformer meters, larger user meters and collectors for format transmitted in public network, at last get to the front
instance, through China Mobile's GSM/GPRS network. The end.
system consists of four parts: wireless terminals, front ends,
master station and GPRS/GSM network. The architecture of V. THE DESIGN AND IMPLEMENTION OF THE GPRS
this system shows in Fig.l: FRONT-END

As a connecting link between the preceding and the


following in the architecture of the automatic meter reading
system, the front end will be implemented with Java multi­
threading and socket technology to finish the GPRS
communication work.
Socket is the most common client/server model in
network programming, it is a software abstract for
expressing the connection terminal between two equipments.

V4-361

Authorized licensed use limited to: SARDAR VALLABHBHAI NATIONAL INSTITUTE OF TECH. Downloaded on August 31,2023 at 12:04:47 UTC from IEEE Xplore. Restrictions apply.
2010 3rd International Conference on Advanced Computer Theory and Engineering(ICACTE)

The Socket class and ServerSocket class in the Java.net connection will be closed after the data collection
package is used to realize Socket programming. The latter is process is finished.
used at the server-side while the former used at the client
side. The communication process between the front-end and VI. THE IMPLEMENTION OF WEB SERVICES BASED

the wireless terminals, which is GSM/GPRS network based, MASTER STATION


can be achieved by the Socket programming. The Master Station, the core of the automatic meter
In order to make full use of CPU resources, and increase reading system, adopt B/S structure based on MVC design
system performance, the thread pool-based multi-threading pattern, in which the model layer using the latest technology
technology is adopted in the implementation of the front end. of Web Services, JAX-WS specification to provide web
Figure 2 illustrates the multi-threaded mechanism. The main service interfaces.
thread is used to accept the connection request from the JAX-WS simplifies the development of Web Services by
master station and put them into a priority queue, the supporting annotations, it provides two types of
background thread to allocate the client interaction task to an programming model, EJB container programming model and
idle work thread. There are several work threads in the Web programming container model, for Web Services. The
thread pool and their tasks are to process the specific master advantage of using EJB programming container model is that
connection. The thread pool is able to allocate work threads the EJB container will provide security and transactions. So
dynamically according to the number of the concurrent work in this system, we use EJB programming container mode to
threads. develop Web Services. The following are key codes that
.----------------------------------------------------
Worker Threads in Thread Pool
show the advantages given by EJB3.0 and Web Services
.- -------------------------:
annotation.
r----------------------------------, ---------

LL
Main Thread ""kg,""" Th,,,d

___ � __ ..===-------;
-- @WebService
@Remote( {DataCollectionBeanRemote.class})
! @Stateless
public class DataCollectionBean implements
c_______________ - '
DataCollectionBeanRemote {
______________ -

.,� I
@WebMethod
public double getElectricQuality (Terminal n) throws
,_____"--- ----'r-'-
__________________
-______ u___ �- 1 I I I I �-! TransException {
Priority Queue
II Concrete operations }
II Other methods that will be published as Web
Services
}
@Stateless declares this class to be a Stateless Session
Figure 2_ Multi-threaded Mechanism Bean;
@Remote declares the EJB remote interface that will be
The meter data collection between the Master Station, the implemented;
Front ends and the Terminals is realized by command-driven @WebService declares this Session Bean to have one or
mode. The specific communication process is as follows: more methods published as Web Services;
• In order to get some terminal's meter data, the Mater @WebMethod declares the method to be published as
Station sends a Socket connection request to the Web Services.
front end; After publishing the above codes to the EJB container,
• After the connection between two sides established, such as JBoss server, the container will automatically publish
the Master Station send a data acquisition command them to be Web Services and generate a WSDL(Web Service
to the front end; Description Language) file.
• The Main thread of the front end will put the If a client wants call the published Web Services, it has to
command to the tail of Priority Queue; develop client applications. The wsimport command-line
• The Background Thread take a command out from tool can operate an existing WSDL file and generate the
the Priority Queue, then allocate it to a worker thread required portable artificial for developing lAX-WS Web
in the thread pool. The worker thread sends the Service applications. The following are the cliect key codes
command to the selected terminal; based on lAX-WS specification.
• The terminal will execute this command, and send DataCollectionBeanRemote dao new
the results to end of a data receiving queue of the DataCollectionBeanRemote 0;
front end; DataCollection dc = dao.getDataCollection PortO;llget
• The front end read the data from the data receiving Web Services endpoint
queue and send it to the Master Station; dc.getElectricQuality(Terminal n);/I call the Web Service
• The Master Station receives the data and parse it in method.
accordance with appropriate communication
protocol to get the meter data. At last the Socket

V4-362

Authorized licensed use limited to: SARDAR VALLABHBHAI NATIONAL INSTITUTE OF TECH. Downloaded on August 31,2023 at 12:04:47 UTC from IEEE Xplore. Restrictions apply.
2010 3rd International Conference on Advanced Computer Theory and Engineering(ICACTE)

VII. CONCLUSION

In this paper, we described the characteristics of GPRS


technology and Web Services technology, and introduced
how to build the Web Services based GPRS Automatic
Meter Reading System with these technologies. This system
has such merits as: real time, wide coverage, open and easy
to maintenance and extension. At present, this GPRS
Automatic Meter Reading System has gained good
application in practical work and been proved to be correct.

REFERENCES

[I) Cui Wei, Zhang Qishan, "Design and Implementation of Remote


Automatic Reading Meter Based on GPRS", Radio Engineering,
Shijiazhuang, Hebei, 2006,Vo1.36,No.2.
[2) Zhou Qiang, Zhang Shiqing, "A Wireless Meter Reading System
Based on GPRS", Instrumentation Technology, Shanghai, 2009,No.l.
[3) Tan Xiandong, Li Cunbin,Fan Jianping, Zhu Kai, "Study on
architecture of power marketing management information system
based on web service", Computer and Engineering Design, Beijing,
2008
[4) Sun Weiqin, "Java Network Programming refined solution",
Electronic Industry Press, Beijing, 2007
[5) https://jax-ws.devjava.net/

V4-363

Authorized licensed use limited to: SARDAR VALLABHBHAI NATIONAL INSTITUTE OF TECH. Downloaded on August 31,2023 at 12:04:47 UTC from IEEE Xplore. Restrictions apply.

You might also like