An Efficient Image Processing Method Based on Web ... - IEEE Xplore

2 downloads 1168 Views 276KB Size Report
software had. Keywords-Web Service; image process; Qos; UDDI; mobile devices;. I. INTRODUCTION. The advent of web service technology has a significant.
An Efficient Image Processing Method Based on Web Services for Mobile Devices Yi Lianga,b

Yingyuan Xiaoa,b,Jing Huang a,b

a

Tianjin Key Lab of Intelligent Computing & Novel Software Technology, Tianjin University of Technology Tianjin, China e-mail:[email protected] Abstract—the resource limitation of mobile devices causes the problem that the existing image processing software based on the centralized computing mode had difficulty running in mobile devices. A solution is given in the paper by adopting web servicebased image processing method. For one thing, image processing tasks were distributed to service providers’ service registry and service requesters. For another, what the service providers should do was only to invocate the specific image processing services provided by service providers. Consequently, web service-based solution reduces the resource consumption of mobile devices by redistributing image processing tasks. Compared with traditional methods of image processing, Web service-based image processing method has the advantages of loose coupling and component oriented and can take full advantage of the computing resources in heterogeneous network. Thus web service-based image processing method can effectively solve the resource bottle-neck that traditional image processing software had. Keywords-Web Service; image process; Qos; UDDI; mobile devices;

I.

b

Key Laboratory of Computer Vision and System, Ministry of Education, Tianjin University of Technology Tianjin, China e-mail: [email protected] advantage of convenience, So many research studies and applications have been carried out on this topic. The aim of this paper is to put forward a web service-based image processing method to solve the problem of inefficiency of image processing in mobile devices. Web service technology is a new distributed computing model. So it can make ful use of heterogeneous network computing resources [2] and realize resources sharing effectively. Exactly speaking for the method, firstly image processing services’ registration, publication and discovery can be completed in the server-sides. Secondly the mobile clients only invocate specific services. So the mobile clients can reduce the computing resources consumption. However, the image processing effect was not affected any longer. In order to illuminate our program, this paper describes a prototype system of image processing for the analysis and discussion of the web service-based solution. Furthermore, a kind of web service discovery algorithm is proposed to improve the quality of image processing services. II.

INTRODUCTION

The advent of web service technology has a significant impact on the image processing. Because the image processing tasks become more complex than before, image processing software is increasingly large. The software also imposes harsh restrictions on hardware conditions. Therefore, traditional image processing methods have difficulty applying to resourceconstrained mobile devices. The above problem has been extensively explored; however, the solutions only have been based upon centralized computing model. For example, in order to adapt to the resource-constrained mobile devices, the emphases are only placed on the optimizing image processing algorithm and improving the idea of software and hardware co-design methodology. However, the corporation of hardware and software make software loss of portability. Although a lot of efforts are being spent on the problem of resource limitation in mobile devices, the efficient method has yet to be developed. Web service technology is characterized by a loosely coupled, component-oriented [1], updated to maintain the

RELATED WORK

Web service adopts a service-oriented architecture (services oriented architecture SOA [3]), as shown in Figure 1. Service providers are the owners of the services, which provide platforms for services to access, and services to publish in service registry center. Service requesters are the enterprises, organization and individuals that have needs of specific service functions. Service requesters can discover services and access the information services binding in the registry center. Service registry center is a database that can store service description information; in the registry center, service providers publish services, services requesters can discover and access binding information. So a web service-based prototype system consists of a registry center, a service provider and service requestors. Each of them is necessary and indispensable for the prototype system. Exactly speaking, service provider can publish their services’ address and description in the registry center. Registry center can provide services’ description information for the requestors. Requestors can invocate the specific service by the information the registry center offers.

978-1-4244-4131-0/09/$25.00 ©2009 IEEE

Definition 2. An image processing web service can be described as following four-tuple: WS = •

WS denotes image processing services names;



R denotes image processing requests.



Q denotes the entrance address and description of specific image processing services.

Figure 1. The framework of SOA



Res denotes image processing services’ memory usage.

Web service as a new distributed computing model has the following advantages:



Qos denotes WS’s quality of services. In this paper, Qos is related to image processing services’ response time.

Advantage of excellent encapsulation; they are the objects or components on the web. The users can only see a list of features objects provide. Advantage of loose coupling; when the web services change, the callers will not feel them. As to the service requesters, as long as the service interfaces do not change, any changes of services will make no influence on the service requesters; Advantage of standard protocols; all web services’ public agreements must be described by open and standard protocols such as SOAP [4], HTTP. Compared with the general objects, they are more standardized and easier to understand by the machine. Advantage of integration capabilities; web service technology adopts simple and easy-to-understand protocols to express its principal which is described by the WSDL [5-7]. So the technology fully shields the differences between different software platforms. Not only EJB but also CORBA can easily implement interoperability by standard protocols [8-9]. Considering the several advantages of web service, the technology can be applied to mobile devices in order to improve image processing efficiency. III.

DESIGN AND IMPLEMENTATION OF WEB SERVICE-BASED IMAGE PROCESSING SYSTEM

A.

Web service-based image processing model Before the introduction of the system, two definitions are given about image processing service. Definition 1. Image processing service requests: image processing request can be described as following two-tuple: R= •

R denotes image processing requests.



K denotes R’s known parameters set. In this paper, Set K is byte array of image files.



C denotes R’s parameters constraint set. It defines the constraints of image file’s format. Set C= {jepg, png, bmp, gif, jpg}; the system support these formats of image files.

B. Architecture of the system Web service-based image processing system consists of three logic layers, as shown in Figure 2. 1) User interface layer: it is the implementation platform of image processing system based on web service. Users can use the wireless transmission technologies (WIFI, BLUETOOTH, etc.) to process images through the image processing interfaces. 2) Services management layer: its functions are image processing services’ publication, discovery, and management. The layer is able to ensure the services’ Qos. 3) Services implementation layer: the layer finishes the specific image processing tasks. Image processing services are distributed to various locations. They are regarded as "black boxes" and provide a variety of interfaces but to hide the details of the image processing. C. Construction of the system A web service can be seen as an object on the Web, the system’s development is different from traditional software development. It involves the web service’s publication, discovery and invocation. The specific steps are as follows: 1) Construction stage: we completed definition and description of the image processing service interfaces. The system provided some service interfaces, such as anti-color, gentle services, black-and-white and so on. 2) Services deployment stage: service interfaces and their description are published to service registry center. UDDI defines the storage paths of services interfaces’, which are described by the WSDL. So the service requesters can use the address to discover the image processing services interfaces. 3) Services discovery and invocation stage: the tasks of services’ discovery and invocation are finished in the stage. Firstly, the mobile clients set up the IP address of the service registry center. Secondly, the mobile clients get service address and service description from service registry center. Finally, mobile clients invocate specific image processing services.

Figure 2. The Framework of image processing system based on Web service

Figure 3. Data flow diagram of image processing system based on Web service

4) Services management stage: services security problems are solved in the stage. The solution prevents the image data from being maliciously destructed by third party.

3)

D. Implementation of the system Obviously, there is a great difference between web servicebased and traditional imaging processing methods. The traditional methods are always implemented by the centralized computing model. However, the web service-based method is based on distributed computing model. The specific steps are as follows. The process of data flow diagram is shown in Figure 3.

4)

1) 2)

The mobile clients have to check the validity of image files formats. Picture files are compressed. Considering that transfer rate of mobile devices is limited, the prototype system has to compress image files in order to reduce the transmission time.

5)

6)

Compressed picture files are converted into the flow of bytes. And then, the mobile clients send the image processing service inquiry requests to the service registry center. According to the customers’ requests, service registry center searches the specific services. When the appropriate services are discovered, services’ entrance address and description will be sent to mobile clients. Mobile clients invocate specific image processing services by the services’ address and description. When image processing tasks are finished, the service providers will send results to mobile clients. The mobile clients convert image byte stream into image files.

in the aspects of response time and memory usage. The results are shown in Figure 5, 6. 2500

unit millisecond

E. Key algorithm-WSDA in the system The system’s key is image processing services’ discovery. According to the mobile clients’ requests, the image processing services and their description should be discovered by requesters immediately. Algorithms-WSDA is given as Figure 4: Let set R= {r1, r2...rm} be image processing service requests. ResultSet is a set that denotes services discovered in the service registry center. Let set P= {p1, p2…pn} be all kinds of services in the service registry center. Let set pi= {s1, s2…sk} (i=1…n) be a set of the services that finish the same tasks. But there are some differences in details such as parameters, Qos.

2000 1500 1000 500 0

gentle

b-and-w

sharpen

WSIPM response time

anticolor

emboss

CCIPM response time

Figure 5. Comparison of response time

2500

unit KB

2000 1500 1000 500 0 gentle

b-and-w

sharpen

WSIPM memory usage

anti-color

emboss

CCIPM memory usage

Figure 6. Comparison of memory usage

The experiment results shows that the web service-based method can save an average of nearly 30% of the memory usage, but response time was reduced by an average of about 25%. Two factors have been studied. 1)

Figure 4. Algorithm-WSDA

IV.

EXPERIMENT AND DISCUSSION

In order to test the viability and effectiveness of the approach the paper proposed, we conducts a simulation experiment. A laptop computer two small servers are used. Two servers’ configurations are the same. Their configurations are shown in table1. TABLE I.

Laptop Servers

Web service-based image processing method allocates complex image processing tasks to the server with relatively high hardware configuration. 2) WSDA is polynomial time complexity. So the specific image processing services could be discovered rapidly in the service registry. Thus mobile clients saved memory resources and improved the processing efficiency. Especially for sharpening service, it related to matrix multiplication and computational cost is excessive. But web service-based approach showed more obvious superiority.

CONFIGURATIONS TABLE

CPU

Memory

OS

700MHz 2.6GHz

128MB 2GB

Linux Win2003

network cards 54 Mbps 108Mbps

The laptop computer acts as a service requester. Two servers act as service registry center and service providers respectively. The mobile environment simulator Microsoft Pocket_PC is utilized to test performance of two approaches. One of them is based on web service (WSIPM) and the other is based on centralized computing (CCIPM). According to basic image processing functions (such as Sharpen, anti-color, embossed, etc.), the above-mentioned approaches is compared

V.

CONCLUSIONS

In this paper, a web service-based image processing approach is proposed. In order to illustrate it, a prototype system is implemented. Two image processing approaches, web service-based and centralized computation-based approaches are analyzed and discussed. Experimental results demonstrates that web servicebased image processing approach performs much better than centralized computation-based image processing approach in terms of response time and memory consumption. In addition, the WSDA, with polynomial time complexity, guarantees

specific image processing services can be discovered rapidly in the service registry centers. In the future, we will optimize the service discovery algorithm-WSDA and provide more image processing services. ACKNOWLEDGMENT This work is supported by the Natural Science Foundation of Tianjin under Grant No. 08JCYBJC12400 and the Innovative Foundation of Small and Medium Enterprises under Grant No. 08ZXCXGX15000. REFERENCES [1] [2]

[3]

[4]

[5]

[6]

[7]

[8] [9]

Yue K, Wang XL, Zhou AY. Underlying Techniques for Web Services: A Survey . Journal of software, 2004, 15(03): 429-441. Feng Liu, Gesan Wang, Li Li. Wu Chou. Web Service for Distributed Communication Systems. Service Operations and Logistics, and Informatics, 2006. SOLI '06. IEEE International Conference on, Shanghai,China June 2006. Jeng, J.J, Lianjun An. System Dynamics Modeling for SOA Project Management. Service-Oriented Computing and Applications, 2007. SOCA '07. IEEE International Conference on, Newport Beach, CA July 2007. Hua Lei, Wei Jun, Niu Chunlei. High Performance SOAP Processing Based on Dynamic template-Driven Mechanmism. Chinese Journal of Computer, 2006,29(7):1146-1156 Jaeger M C, Gregor R G, Gero. Qos aggregation for service composition using work flow pattern// Proceeding of 8th IEEE International Conference on Enterprise Distributed Object Computing. Montery,CA 2004:149-159. Christensen E, Curbera F, Meredith G, et al.Webservices description language (WSDL) 1.1 [EB/OL]. http://www.w3.org/TR/wsdl, 2001 - 03 -15. Hu Jianqing, Zou Peng, Wang Huaimin. Research on Web Service Description Language QWSDL and Service Matching Model. Chinese Journal of Computer, 2005,28(4):506-512 Yang Shengwen, Shi Meilin. A Model for Web Service discovery with Qos Constraints. Chinese Journal of Computer, 2005,28(4):590-594 Curbera F., Duftler M., Khalaf R. An introduction to SOAP, WSDL and UDDI. IEEE Internet Computing, 2002, 6(20):86-93