11
Multi-layer optimization in service-oriented sensor grid Li Chunlin , Li LaYuan Department of Computer Science, Wuhan University of Technology, Wuhan 430063, PR China article info Keywords: Service oriented Sensor grid Multi-layer optimization abstract Sensor devices such as video cameras, infrared sensors and microphones are being widely exploited in grid application. The paper deals with multi-layer optimization in service oriented sensor grid to opti- mize utility function of sensor grid, subject to resource constraints at resource layer, service composition constraints at service layer and user preferences constraints at application layer respectively. The multi- layer optimization problem can be decomposed into three subproblems: sensor grid resource allocation problem, service composing problem, and user satisfaction degree maximization problem, all of which interact through the optimal variables for capacities of sensor grid resources and service demand. The proposed algorithm decomposes global sensor grid optimization problem into a sequence of three sub- problems at three layers via an iterative algorithm. The simulations are conducted to validate the effi- ciency of the multi-layer optimization algorithm. The experiments compare the performance of the multi-layer global optimization approach with application layer local optimization and resource layer local optimization approach respectively. Ó 2012 Elsevier Ltd. All rights reserved. 1. Introduction The emerging domain of sensor grids extends the grid comput- ing paradigm to the sharing of sensor resources in wireless sensor networks. A sensor grid is the result of the integration of wireless sensor networks with the conventional wired grid fabric (Tham & Buyya, 2005). Sensor devices such as video cameras, infrared sen- sors and microphones are being widely exploited in grid applica- tion. For example, these are applications such as surveillance cameras in stores or cameras showing traffic flow with fixed point cameras, but the sensor data is available only to the owners and se- lected employees. Sensor grid is to enable people to share sensors in a wide-area network. The goal of the sensor grid is to allow peo- ple to access actual sensor data in the same way they access the traditional grid environment. The layered sensor grid architecture has been developed for the establishment and management of sensor grid resource and ser- vice sharing. From the bottom to top, the layers of service oriented sensor grid are resource layer, service layer and application layer. The resource layer defines the interface to local resources, which may be shared. The resources include sensor resource, computa- tional resources, data storage, networks and other system re- sources. The resource layer uses the communication protocols to control negotiation, monitoring, accounting, and payment for the sharing of functions of individual sensor grid resources. The service layer is used to coordinate multiple sensor grid resources. Service layer services include directory and brokering services for resource discovery and allocation; monitoring services; membership and policy services for keeping track of who in a community is allowed to access sensor grid resources. The application layer enables the user to exploit resources in sensor grid environment through var- ious collaboration and resource access protocols. Most of the existing sensor grid resource allocation and sched- uling algorithms mainly focus on isolated layers of the layered grid architecture. This results in an inefficient utilization of the re- sources. Multi-layer design is based on information exchange and joint optimization among multiple layers. It is especially well sui- ted to sensor grid environments where the sensor grid resources are dynamic, autonomous and heterogeneous and the sensor grid user requirements vary over time. In order to maximize perfor- mance of sensor grid, optimization of all system parameters need to be considered. In particular, achieving optimal application layer performance requires looking at the system as a whole, as the per- formance experienced at the application layer strongly depends on the lower layers such as resource layer and service layer. In sensor grid system, each layer by itself represents a complex sub-system. At the lower layers such as resource layer, resource scheduling has to allocate resources to users in an optimal manner. At the applica- tion layer, multiple users are served with potentially different applications. Each application may be adaptable to the setup of the lower layers. The paper deals with multi-layer optimization in service ori- ented sensor grid to optimize utility function of sensor grid, subject to resource constraints at resource layer, service composition con- straints at service layer and user preferences constraints at applica- 0957-4174/$ - see front matter Ó 2012 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2012.01.011 Corresponding author. E-mail addresses: [email protected], [email protected] (L. Chunlin). Expert Systems with Applications 39 (2012) 6846–6856 Contents lists available at SciVerse ScienceDirect Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa

Multi-layer optimization in service-oriented sensor grid

Embed Size (px)

Citation preview

Expert Systems with Applications 39 (2012) 6846–6856

Contents lists available at SciVerse ScienceDirect

Expert Systems with Applications

journal homepage: www.elsevier .com/locate /eswa

Multi-layer optimization in service-oriented sensor grid

Li Chunlin ⇑, Li LaYuanDepartment of Computer Science, Wuhan University of Technology, Wuhan 430063, PR China

a r t i c l e i n f o

Keywords:Service orientedSensor gridMulti-layer optimization

0957-4174/$ - see front matter � 2012 Elsevier Ltd. Adoi:10.1016/j.eswa.2012.01.011

⇑ Corresponding author.E-mail addresses: [email protected], jwtu@

a b s t r a c t

Sensor devices such as video cameras, infrared sensors and microphones are being widely exploited ingrid application. The paper deals with multi-layer optimization in service oriented sensor grid to opti-mize utility function of sensor grid, subject to resource constraints at resource layer, service compositionconstraints at service layer and user preferences constraints at application layer respectively. The multi-layer optimization problem can be decomposed into three subproblems: sensor grid resource allocationproblem, service composing problem, and user satisfaction degree maximization problem, all of whichinteract through the optimal variables for capacities of sensor grid resources and service demand. Theproposed algorithm decomposes global sensor grid optimization problem into a sequence of three sub-problems at three layers via an iterative algorithm. The simulations are conducted to validate the effi-ciency of the multi-layer optimization algorithm. The experiments compare the performance of themulti-layer global optimization approach with application layer local optimization and resource layerlocal optimization approach respectively.

� 2012 Elsevier Ltd. All rights reserved.

1. Introduction

The emerging domain of sensor grids extends the grid comput-ing paradigm to the sharing of sensor resources in wireless sensornetworks. A sensor grid is the result of the integration of wirelesssensor networks with the conventional wired grid fabric (Tham &Buyya, 2005). Sensor devices such as video cameras, infrared sen-sors and microphones are being widely exploited in grid applica-tion. For example, these are applications such as surveillancecameras in stores or cameras showing traffic flow with fixed pointcameras, but the sensor data is available only to the owners and se-lected employees. Sensor grid is to enable people to share sensorsin a wide-area network. The goal of the sensor grid is to allow peo-ple to access actual sensor data in the same way they access thetraditional grid environment.

The layered sensor grid architecture has been developed for theestablishment and management of sensor grid resource and ser-vice sharing. From the bottom to top, the layers of service orientedsensor grid are resource layer, service layer and application layer.The resource layer defines the interface to local resources, whichmay be shared. The resources include sensor resource, computa-tional resources, data storage, networks and other system re-sources. The resource layer uses the communication protocols tocontrol negotiation, monitoring, accounting, and payment for thesharing of functions of individual sensor grid resources. The servicelayer is used to coordinate multiple sensor grid resources. Service

ll rights reserved.

public.wh.hb.cn (L. Chunlin).

layer services include directory and brokering services for resourcediscovery and allocation; monitoring services; membership andpolicy services for keeping track of who in a community is allowedto access sensor grid resources. The application layer enables theuser to exploit resources in sensor grid environment through var-ious collaboration and resource access protocols.

Most of the existing sensor grid resource allocation and sched-uling algorithms mainly focus on isolated layers of the layered gridarchitecture. This results in an inefficient utilization of the re-sources. Multi-layer design is based on information exchange andjoint optimization among multiple layers. It is especially well sui-ted to sensor grid environments where the sensor grid resourcesare dynamic, autonomous and heterogeneous and the sensor griduser requirements vary over time. In order to maximize perfor-mance of sensor grid, optimization of all system parameters needto be considered. In particular, achieving optimal application layerperformance requires looking at the system as a whole, as the per-formance experienced at the application layer strongly depends onthe lower layers such as resource layer and service layer. In sensorgrid system, each layer by itself represents a complex sub-system.At the lower layers such as resource layer, resource scheduling hasto allocate resources to users in an optimal manner. At the applica-tion layer, multiple users are served with potentially differentapplications. Each application may be adaptable to the setup ofthe lower layers.

The paper deals with multi-layer optimization in service ori-ented sensor grid to optimize utility function of sensor grid, subjectto resource constraints at resource layer, service composition con-straints at service layer and user preferences constraints at applica-

L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856 6847

tion layer respectively. Using decomposition techniques, the multi-layer optimization problem decomposes into three subproblems:sensor grid resource allocation problem, service composing prob-lem, and user satisfaction degree maximization problem, all ofwhich interact through the optimal variables for capacities of sen-sor grid resources and service demand. The proposed algorithmdecomposes global sensor grid optimization problem into a se-quence of three sub-problems at three layers via an iterative algo-rithm. The simulations are conducted to validate the efficiency ofthe multi-layer optimization algorithm. The experiments comparethe performance of the multi-layer optimization approach withapplication layer optimization and resource layer optimization ap-proach respectively.

The rest of the paper is structured as followings. Section 2 dis-cusses the related works. Section 3 presents multi-layer optimiza-tion in service oriented sensor grid. Section 4 discusses multi-layeroptimization algorithm. In Section 5 the experiments are con-ducted and discussed. Section 6 gives the application example ofproposed model. Section 7 gives the conclusions to the paper.

2. Related works

There are certain researches aiming to combining grid environ-ments with wireless sensor network (Avilés-López & García-Mací-as, 2007; Fox, Ho, Wang, Chu, & Kwan, 2008; Gaynor & Moulton,2004; Humble, Greenhalgh, Hamsphire, Muller, & Stefan, 2005; Iq-bal, Lim, Wang, & Yao, 2008; Ji, Zhang, Xu, & Wu, 2007; Johnsonet al., 2008; Kanbayashi & Sato, 2009; Li, Liu, Zhao, Jiang, & Para-shar, 2008; Lim & Lee, 2007; Lim, Iqbal, Wang, & Yao, 2009; Miri-dakis, Giotsas, Vergados, & Douligeris, 2009; Oh & Lee, 2008; Rao,Imran, Khan, Huh, & Chung, 2007; Sanabria et al., 2009; Tham &Buyya, 2005; Yan, Wang, & Hao, 2005), which incorporate sensorsinto the existing grid systems as the consumers of grid resourcesand provide sensor services to other grid nodes. Lim and Lee(2007) design an integrated and flexible scheduler for a sensor gridtestbed based on the SPRING framework. Several scheduling andload balancing algorithms were implemented within this sched-uler to suit the unique characteristics of sensor jobs. The schedulercan use an appropriate scheduling or load balancing algorithm tosuit the requirements of the resource owner and users. Li et al.(2008) propose an autonomic management framework (ASGrid)to address the requirements of emerging large-scale applicationsin hybrid grid and sensor network systems. They proposed theautonomic sensor grid system concept in a holistic manner tar-geted at non-trivial large applications. Kanbayashi and Sato(2009) proposed a distributed architecture named SW-agent as aprototype system of Sensing Web Protection of privacy can be real-ized with elimination of privacy information and an access controlmechanism. Iqbal et al. (2008) present the idea that large-scaleambient intelligence takes the vision of anytime-anywhere to any-time-anywhere-anything. They propose a sensor grid infrastruc-ture that forms the key resource sharing backbone and providessecure access to valuable sensor, computational, data, and storageresources for supporting large-scale ambient intelligence. Fox et al.(2008) propose a collaborative sensor grid framework to supportthe integration of a sensor grid with collaboration and other grids.The framework includes a grid builder tool for discovering andmanaging grid services and remote, distributed sensors. It providesa real-time collaborative client to enable distributed stakeholdersto have a consistent view of displayed sensor streams. They illus-trate the versatility of the framework by constructing a robot basedcustomizable application for shared situational awareness. Basedon semantics-based service-oriented model, Lim et al. (2009) aimto build a large-scale sensor grid infrastructure that can seamlesslyintegrate heterogeneous sensor resources from different projects

distributed across a wide geographical area. Sanabria et al.(2009) discussed a deployment framework, which leverages onexisting grid computing technologies to provide middleware thatintegrates wireless sensor networks and grid infrastructures. Theydemonstrated the work on enabling a sensor grid infrastructure foracoustic surveillance applications. Rao et al. (2007) identify servicerequirements for the sensor grid to efficiently process data usinggrid technology and also propose an end-to-end adaptive andreconfigurable resource manager for wireless sensors using gridtechnology to enable resource constrained sensor nodes to connectto the grid. Avilés-López and García-Macías (2007) proposed Tiny-SOA, a service-oriented architecture that allows programmers toaccess wireless sensor networks from their applications by usinga simple service-oriented API via the language of their choice.Yan et al. (2005) described the architecture of wireless sensor grid,also designed a connecting platform named MPAS. The advantageof MPAS is that it is based on Web service resource framework,with the ability of integrating multiple sensor networks with grid;also it can actuate sensor network and support interoperabilityamong multiple sensor networks. Johnson et al. (2008) definednew sensor-assignment problems motivated by frugality and con-servation of resources, in both static and dynamic settings. Theyproposed schemes to match sensing resources to missions in bothsettings and evaluated the schemes through simulations. Oh andLee (2008) presented the design and implementation a u-Health-care SensorGrid gateway to connect transparently a sensor net-work and a Grid network for providing convenient and speedy u-Healthcare services to users. They implement a mobile monitoringsystem for monitoring patient’s status by using a mobile devicesuch as PDA. Humble et al. (2005) describes the design and imple-mentation of a model of how to integrate sensors and devices intoa Grid infrastructure. They describe its proxy-based approach, theport-type requirements and the set of tools implemented to facil-itate configuration of experimental scenarios. Miridakis et al.(2009) analyze the challenges present in the integration of WSNsand the Grid considering a distributed approach managed locallyin each sensor area; also describe a power awareness middlewarearchitectures for sensor grids. Ji et al. (2007) discuss the selfishproblems of Sensor Web and resolve them using specific designedmechanism, and describe several scenarios of the applications inSensor Web. The works (Li & Li, 2005; Li & Li, 2007a, 2007b) mainlydeal with resource allocation, QoS optimization in the computa-tional grid and don not consider exploiting services of sensor tosupport sensor enabled grid.

The methods and contributions of this paper are different fromabove related works. The paper deals with multi-layer optimiza-tion in service oriented sensor grid to optimize utility function ofsensor grid. Using decomposition techniques, the multi-layer opti-mization problem decomposes into three subproblems. Seldomwork considers this topic in the research area of sensor grid. Thecontributions don’t appear in other related works.

3. Multi-layer optimization in service-oriented sensor grid

3.1. Model description

Fig. 1 illustrates a sensor grid model. It is based on sensor net-work, which consists of a number of sensor nodes. A sensor gridconsists of sensor networks and conventional grid resources likecomputers, servers, and disk arrays for the processing and storageof sensor data. The resources in the sensor grid are shared by sev-eral virtual organizations (VOs). In fact, certain resources might be-long to more than one VO. Users from various VOs may access theresources in the sensor grid, even if the resources are not owned bytheir VO. Sensor nodes have constrained resources as they monitor

Sensor network

Grid site Grid site

Grid site

Sensor network

Sensor network

Sensor grid proxy

Fig. 1. Sensor grid model.

6848 L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856

the environment on a real-time basis while the resource-full gridinfrastructure can satisfy computational and communication tasks.Sensor nodes can be used as both resource consumers and resourceproviders of sensor grid. In sensor grid, submitting jobs and receiv-ing the results back is not straightforward, since power constraintsand frequent disconnections are prevalent in wireless sensor com-munications. The sensor grid proxy is used which acts as gatewayto the grid environment. The sensor grid proxy acts as the interfacebetween a sensor network and the grid. The proxy exposes the sen-sor resources as grid services that can be discovered and accessedas other compute or data resources by any grid application. It alsotranslates the sensor data from its native format to a suitable griddata format. The proxy coordinates the network connectivity be-tween the wireless sensor network and the grid. These sensor gridproxies undertake the role of the mediator between the sensornodes and the grid system, and try to hide the instability of thewireless environment by acting on behalf of the sensor nodes. A re-quest can either come from a sensor or another grid client. Theproxy can act as a mediator capable of hiding the heterogeneityof the participating sensors from the requesting node, coordinatingthe overall execution of the submitted job and allowing the sensorto appear to the rest of the network as an ordinary grid node. Asensor grid node willing to provide service with resource capabilityand power is called as a resource provider node and the nodewhich requests for the service is called as a user node.

Fig. 2 shows the conceptual scheme of the proposed multi-layeroptimization in sensor grid. The mode involves variables from theresource layer, service layer and the application layer. In sensorgrid, applications (users) cannot directly communicate with sensorgrid resources, because the users cannot know the complex detailsof sensor grid resources under fluctuating sensor grid environment.The sensor grid user also needs composite services which are ob-tained from multiple sensor grid resources, but it is hard for usersto obtain and compose multiple sensor grid resources. So we con-sider a service layer between sensor grid resources and the users.The service layer middleware is a bridge between sensor grid

Fig. 2. Proposed multi-layer op

resource and sensor grid users, which enable sensor grid users totransparently and efficiently exploit the sensor resources. Sensorgrid service agent as the broker is located in the service layer be-tween sensor grid resources and the users. Sensor grid systemscan be modeled by both sensor grid resources and applicationsrunning on those resources. The resources in sensor grid system in-clude the sensor resource, computation resource, communicationand storage resources of the system. Our multi-layer optimizationmodel in sensor grid is studied by considering the global problemas decomposed into three sub-problems: resource allocation at theresource layer, service composing at the service layer, and user sat-isfaction degree at the application layer. The proposed policy pro-duces an optimal set of user’s payments, service compositions, andgrid resources at the application layer, service layer and resourcelayers respectively to maximize sensor grid utility. The decomposi-tion of multi-layer optimization problem is according to the verti-cal organization of sensor grid layers. Three subproblemscorrespond to resource layer, service layer and application layerrespectively. The owner of each layer obtains inputs from otherlayers, tries to maximize its own utility and provides outputs backto other layers.

The proposed multi-layer optimization model consists of threetype of agents: the sensor grid resource agents that represent theeconomic interests of the underlying resources of the sensor gridat the resource layer, the sensor grid user agents that representthe interests of sensor grid user using the sensor grid to achievegoals at the application layer, and sensor grid service agents actas both a buyer of sensor grid resources and a seller of sensor gridservices for the users at the service layer. Interactions between thethree agent types at three layers are mediated by means of marketmechanisms. Market mechanism in economics is based on distrib-uted self-determination, the variation of price reflects the supplyand demand of resources, and market theory in economics pro-vides precise depiction for efficiency of resource scheduling andservice allocation. The resource layer problem is a resource alloca-tion problem. Different sensor grid resource providers computeoptimal resource allocation for maximizing the revenue of theirown under constrains of resource capacity. The sensor grid serviceprovider not only acts as a consumer which pays resource providerat the resource layer for available resources, but also acts as sup-plier which provides composed services for the users at applicationlayer. So, the resource layer and application layer are interacted bythe sensor grid service provider at the service layer.

3.2. Mathematic formulation

The notations used in the following sections are listed onTable 1.

Multi-layer design is based on information exchange and jointoptimization among multiple sensor grid layers. The objective ofthe paper is to optimize the parameters of all layers in a decentral-ized optimization problem and decompose multi-layer into three

timization in sensor grid.

Table 1The description of notations.

Notations Meanings

pli

Processor obtained by sensor service provider i from the processor resource provider l

Tm Time limits given by the sensor grid user m to complete its all jobssk

iSensor obtained by sensor grid service provider i from the sensor provider k

Si Capacity of sensor grid service provider iSCk Capacity of sensor resource kPCl Capacity of processor resource ltn

m The time taken by the sensor grid user m to complete nth job

SPki

The payments of the sensor grid service provider i to the sensor provider k

PPli

The payments of the sensor grid service provider i to processor resource provider l

Em The budget of sensor grid user men

m The energy dissipation used by the mth sensor grid user to complete nth jobEBm Limited energy budget of sensor grid user mer Energy consumption rateSBi The budget of sensor grid service provider iv i

mThe sensor grid service sold to sensor grid user m by sensor grid service provider i

APim

The payments of the sensor grid user m to the sensor grid service provider i

LSi Allocation delay limit of sensor required by sensor grid service provider iLPi Allocation delay limit of processor resource by sensor grid service provider i

L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856 6849

sub problems at resource layer, service layer and application layer.The proposed multi-layer optimization strategy for resourcescheduling and service allocation mechanisms enable resourceproviders and service providers to partition their resource and ser-vices based on quality criteria such as application efficiency and re-source efficiency. Sensor grid users are allowed to specify theirrequirements and preference parameters by a utility model. Inour model, a utility function can be specified for QoS parameters.Associated with each QoS dimension at three layers is a utilityfunction, which defines benefit or utility in choosing certain valueof QoS choices in that dimension. Formally, the utility functionsassociated with the resource layer, service layer, and applicationlayer are Uresource(qresource), Uservice(qservice) and Uapplication(qapp)respectively. Sensor grid application layer is composed of twodimensions: payment and deadline. The parameters of sensor gridapplication layer can be formulated as QSA = [payment,deadline].The parameter of sensor grid service layer is related with price, de-noted as QSS = [price]. Sensor grid resource layer is composed oftwo parameters: sensor demand and processor demand, denotedas QSR = [sensor,processor].

This multi-layer optimization strategy is to allocate resourcesand services to result in the best QoS such that the sensor grid sys-tem utility USensorGrid is maximized subject to resource constraintsat resource layer, user preferences constraints at application layer,and service constraints at service layer respectively. The problemof multi-layer optimization in sensor grid is formulated as thefollows:

MaxUSensorGrid

s:t: Em PX

i

APim; Tm P

XN

n¼1

tnm;

SCk PX

i

ski ; PCl P

Xi

pli

SBi PX

k

SPki þ

Xl

PPli;

LSi PX

k

SDki ; LP P

Xl

PDli

The multi-layer optimization in sensor grid aims to maximize USen-

sorGrid subject to three layers’ QoS constraints. In this problem, thefirst type of constraints is related with resource layer. pl

i is processorallocation obtained by sensor grid service provider i from the pro-cessor resource provider l; sk

i is the sensor allocation obtained byservice provider i from the sensor resource provider k. The QoS con-

straint implies that the aggregate sensor does not exceed the totalcapacity SCk of sensor provider k, aggregate processor resource unitsdo not exceed the total resource PCl of processor resource provider l.The second type of constraints is related with application layer. Sen-sor grid user should complete all its jobs under time limits and cer-tain payment. Sensor grid user needs to complete a sequence of jobsin a specified amount of time, Tm, while the payment overhead ac-crued cannot exceed the budget Em;APi

m is the payments of the sen-sor grid user m to the sensor grid service provider i. SPk

i ; PPli are the

payments of the sensor grid service provider i to the sensor providerk and processor resource provider l respectively. SBi is the budget ofsensor grid service provider i. SDk

i ; PDli represent resource allocation

delays from the sensor provider k and processor resource provider lrespectively. LSi, LPi are resource allocation delay limits of sensor re-source and processor resource.

MaxUSensorGrid¼X

SPki logsk

i þPPli logpl

i

� �þX

m

APim logv i

mþ EBm�XN

n¼1

enm

!

s:t: Em PX

i

APim;Tm P

XN

n¼1

tnm;

SCk PX

i

ski ;PCl P

Xi

pli

SBi PX

k

SPki þX

l

PPli;

LSi PX

k

SDki ;LP P

Xl

PDli

Global sensor grid utility functions are maximally optimized withspecific QoS constraints. In USensorGrid; SPk

i log ski þ PPl

i log pli present

the revenue of processor and sensor resource provider.PmAPi

m log v im presents the revenue obtained by sensor grid service

provider i from sensor grid user m. EBm �PN

n¼1enm

� �is remaining

energy of sensor grid users.We can apply the Lagrangian method to above problem. Let us

consider the Lagrangian form of this optimization problem:

L ¼X

SPki log sk

i þ PPli log pl

i

� �þ k SBi �

Xk

SPki þ

Xl

PPli

! !

þX

m

APim log v i

m þ b Em �X

i

APim

!þ c Tm �

XN

n¼1

tnm

!

Since the Lagrangian is separable, the maximization of the Lagrang-ian can be processed in parallel at resource layer, service layer andapplication layer respectively. The multi-layer optimization natu-

6850 L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856

rally leads to a decomposition of problem MaxUSensorGrid amongthree layers. The problem can be decomposed into three subprob-lems S1, S2 and S3 which are respectively conducted at the resourcelayer, service layer and application layer as follows:

S1 ¼ MaxX

SPki log sk

i þ PPli log pl

i

� �s:t: SCk P

Xi

ski ;

PCl PX

i

pli

S2 ¼ Max SBi �X

k

SPki �

Xl

PPli

!þX

m

APim log v i

m

( )

s:t: Si PX

m

v im;

LSi PX

k

SDki ;

LPi PX

l

PDli

S3 ¼ Max Em �X

i

APim

!þ Tm �

Xn

tnm

!þ EBm �

XN

n¼1

enm

!( )

Problem S1 is conducted at the sensor grid resource layer, differentsensor grid resource providers compute optimal resource allocationfor maximizing the revenue of their own. Problem S2 is conducted atthe sensor grid service layer, the sensor grid service provider payssensor grid resource provider for available resources and also pro-vides composed services for sensor grid users to maximize the ben-

efits. Sensor grid service provider i submits the payment SPki to

sensor provider k and PPli to processor resource provider l.

SBi �P

kSPki �

PlPPl

i

� �represents surpluses of sensor grid service

provider’s budget. APim is the payments of the sensor grid user m

to the sensor grid service provider i.P

mAPim log v i

m presents the rev-enue obtained by sensor grid service provider i from sensor griduser m. The objective of Problem S2 is to maximize the surplus ofsensor grid service providers that pays grid resource provider atthe resource layer for available resources and also revenue that isobtained by providing composed services for sensor grid user. Prob-lemS3is conducted at the application layer, the sensor grid usergives the unique optimal payment to service provider under dead-

line constraint to maximize the user’s satisfaction. Em �P

iAPim

� �represents the surplus of sensor grid user, which is obtained bybudgets subtracting the payments to sensor grid service providers.

Ti �PN

n¼1tnm

� �represents the saving times for user, which is gotten

by time limit subtracting actual spending time. EBm �PN

n¼1eni

� �is

remaining energy of sensor grid users. So, the objective of ProblemS3 is to get more surpluses of money and energy, and complete taskfor sensor grid user as soon as possible.

3.3. Resource layer optimization

Global optimization problem involves variables from the re-source layer, service layer and the application layer. Sensor gridoptimization problem can be decomposed into a sequence of threesub-problems at three layers, each only involving variables fromresource layer, service layer and the application layer. Interactionsbetween the three sub-problems are through optimal variables forcapacities of sensor grid resources and service demand.

The resource layer problem is a resource allocation problem.Different senor grid resource providers compute optimal resourceallocation for maximizing the revenue of their own under con-strains of resource capacity. In following, Problem S1 is conducted

at the resource layer, different resource providers compute optimalresource allocation for maximizing the revenue of their own, theobjective of sensor grid resource providers is to maximizeSPk

i log ski þ PPl

i log pli under the constraints of their provided

amounts at the resource layer.

S1 ¼ MaxX

SPki log sk

i þ PPli log pl

i

� �s:t: SCk P

Xi

ski ;

PCl PX

i

pli

Uresource ski ; p

li

� �¼X

SPki log sk

i þ PPli log pl

i

� �We take derivative and second derivative with respect to sk

i :

U0resource ski

� �¼ SPk

i =ski ; U00resource sk

i

� �¼ �SPk

i =sk2

i

U00resource ski

� �< 0 is negative due to 0 < sk

i . The extreme point is theunique value maximizing the revenue of sensor grid resource pro-vider. The Lagrangian for S1 problem is L1 sk

i ; pli

� �.

L1 ski ;p

li

� �¼X

SPki logsk

i þPPli logpl

i

� �þb SCk�

Xi

ski

!

þc PCl�X

i

pli

!¼X

SPki logsk

i þPPli logpl

i�bski �cpl

i

� �þcPClþbSCk

where b, c is the Lagrangian constant. From Karush–Kuhn–TuckerTheorem we know that the optimal solution is given @L1(s,p)/@s = 0 for k > 0.

Let @L1(s,p)/@s = 0 to obtain

ski ¼ SPk

i =b

Using this result in the constraint equation SCk PPPsk

i , we candetermine b as

b ¼Pn

d¼1SPdi

SCk

We substitute b into ski to obtain

sk�

i ¼SPk

i SCkPnd¼1SPd

i

sk�i is the unique optimal sensor allocation for maximizing the rev-

enue of sensor provider k.Let us consider processor resource allocation optimization

problem, using the similar method.Let @L1(s,p)/@p = 0 to obtain

pl�

i ¼PPd

i PClPnd¼1PPd

i

pl�i is unique optimal processor resource allocation for maximizing

the revenue of processor provider l.

3.4. Service layer optimization

Service composition with sensor grid global optimization refersto composing a specific service by selecting various sensor grid re-sources to construct an executable service for sensor grid users toachieve the goals. Sensor grid utility functions are maximally opti-mized with specific QoS constraints. The sensor grid service pro-vider not only acts as a consumer which pays sensor gridresource provider at the resource layer, but also acts as a supplierwhich provides composed sensor grid services for sensor grid usersat application layer. So, the resource layer and application layer areinteracted by the sensor grid service provider at the service layer.

L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856 6851

S2 ¼ Max SBi �X

k

SPki �

Xl

PPli

!þX

m

APim log v i

m

( )

s:t: Si PX

m

v im;

LSi PX

k

SDki ;

LPi PX

l

PDli

In above formula, v im is the sensor grid service sold to sensor grid

user m by sensor grid service provider i. APim is the payments of

the sensor grid user m to the sensor grid service provider i.PmAPi

m log v im presents the revenue obtained by service provider i

from sensor grid user m. Sensor grid service provider cannot sell sen-sor grid service to user more than Si, which is the upper limit of ser-vice owned by sensor grid service provider i. We assume that sensor

grid service provider i submits payment SPki to the sensor resource

provider k, and PPli to processor resource provider l. Let

mi ¼ PPli þ SPk

i ;mi is the total payment of the ith sensor grid serviceprovider. N service providers compete for sensor grid resources with

finite capacity. SDki ; PDl

i represent resource allocation delay from thesensor provider k and processor resource provider l respectively. LSi,LPi is resource allocation delay limit of sensor resource and processorresource. The resource is allocated using a market mechanism,where the partitions depend on the relative payments sent by thesensor grid service providers. The Lagrangian associated with prob-

lem S2 for the sensor grid service provider’s utility is L SPki ; PPl

i;v im

� �.

L SPki ;PPl

i;vim

� �¼SBi�

Xk

SPki �X

l

PPliþX

m

APim logv i

m

þd Si�X

m

v im

!þg LSi�

Xk

SDki

!

þb LPi�X

l

PDli

!¼ SBi�

Xk

SPki �X

l

PPli�g

Xk

SDki �b

Xl

PDli

!

þX

m

APim logv i

m�dv im

� �þdSiþgLSiþbLPi

Since the Lagrangian is separable, this maximization of the Lagrang-ian over SPk

i ; PPli;v i

m can be conducted in parallel as following twoproblems:

Subp1 : L1 ¼ Max SBi �X

k

SPki �

Xl

PPli � g

Xk

SDki � b

Xl

PDli

!

Subp2 : L2 ¼ MaxX

m

APim log v i

m � dv im

� �

The first subproblem is conducted with the resource layer, the ser-vice provider acts as a consumer, which pays grid resource providerfor available resources. The second subproblem is conducted withthe application layer, the service provider acts as supplier, whichprovides composed services for sensor grid users.

Firstly, we consider the first subproblem. Let srki ; prl

i denote theprice of the resource unit of sensor resource k and processorresource l respectively. Let the pricing policy, sr = (sr1,sr2, . . . ,srk)is set of sensor resource unit prices, pr = (pr1,pr2, . . . ,prl) is set ofprocessor resource unit prices. The ith sensor grid service providerreceives resources proportional to its payment relative to the sumof the resource provider’s revenue. Let sk

i ; pli be the resource units

allocated to service provider i by sensor resource k and processorresource l

ski ¼ SCk

SPki

srki

; pli ¼ PCl

PPli

prl

Resource allocation delay from the sensor provider k and processorresource provider l for the ith sensor grid service provider is:

SDki ¼

srk

SPki SCk

; PDli ¼

prl

PPliPCl

We reformulate Subp1 as follows:

L1 ¼ Max SBi �X

k

SPki �

Xl

PPli � g

Xk

srk

SPki SCk

� bX

l

prl

PPliPCl

!

where g, b are the Lagrangian constants. From Karush–Kuhn–Tuck-er Theorem we know that the optimal solution is given@L1=@SPk

i ¼ 0We can get

SPki ¼

gsrk

SCk

� �1=2

Using this result in the constraint equation, we can determine g as

ðkÞ�1=2 ¼ LSiPNm¼1

srmSCm

� �1=2

We substitute g to obtain

SPk�

i ¼srk

SCk

� �1=2PN

m¼1srmSCm

� �1=2

LSi

It means that sensor grid service provider i want to pay SPk�

i to sen-sor provider k for needed resource to maximize the benefits of sen-sor grid service provider i.

Using the similar method, we can solve processor allocation.PPl�

i is unique optimal payment to processor resource l to maximizethe benefits of sensor grid service provider.

PPl�

i ¼prl

PCl

� �1=2PN

m¼1prmPCm

� �1=2

LPi

Secondly, we consider the second sub problem. L2 ¼ MaxP

m

APim log v i

m � dv im

� �Where d is the Lagrangian constant. From Karush–Kuhn–Tucker

Theorem we know that the optimal solution is given @L2=@v im ¼ 0

for d > 0.Let @L2=@v i

m ¼ 0 to obtain

v im ¼ APi

m=d

Using this result in the constraint equation, we can determine d as

Si ¼1d

Xn

k¼1APi

k; d ¼Pn

k¼1APik

Si

We substitute d to obtain

v i�

m ¼APi

mSiPnk¼1APi

k

v i�m is the unique optimal solution to the subproblem2. It means that

sensor grid service provider allocates v i�m to sensor grid user to max-

imize its revenue.

3.5. Application layer optimization

S3 ¼ Max Em �X

i

APim

!þ Tm �

XN

n¼1

SRnm

v im

!þ EBm �

XN

n¼1

enm

!( )

s:t: Tm PX

n

tnm

STnm is the sensor requirement of mth sensor grid user’s nth job, and

PTnm is the processor requirement of mth sensor grid user’ s nth job.

Table 2Simulation parameters.

Simulation parameter Value

Number of nodes 200Network area 500 m⁄500 mNetwork transferring time 200 msTotal number of sensor users 600Total number of sensor providers 150Initial price (grid dollar) [10,500]Deadline [100,400]Expense budget [100,1500]Power [0.1,1.0]

0

0.2

0.4

0.6

0.8

1

0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6Job arrival rate

Res

ourc

e ut

iliza

tion

MLOA ALOA RLOA

Fig. 3. Resource utilization vs job arrival rate.

6852 L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856

SRnm ¼ STn

m þ PTnm; SRn

m is total service requirement of sensor griduser m’s nth job. Let psi denote the price of the service unit of sensorgrid service provider i, Let the pricing policy, ps = (ps1,ps2, . . . ,psj),denote the set of service unit prices of all the sensor grid serviceproviders at the service layer. The sensor grid user m receives ser-vices proportional to its payment relative to the sum of the sensorgrid service provider’s revenue. Let v i

m be the fraction of serviceunits allocated to sensor grid user m by sensor grid service provideri. The sensor service units v i

m allocated to sensor grid user m are

v im ¼ Si

APim

psi

The time taken by the mth grid user to complete nth job is:tn

m ¼SRn

mpsi

SiAPim

The energy dissipation used by the mth sensor grid user to com-plete nth job is:

enm ¼ er � tn

m ¼ern

mSRnmpsi

SiAPim

We reformulate

Max Em �X

i

APim

!þ Tm �

XN

n¼1

SRnmpsi

SiAPim

!þ EBm �

erSRnmpsi

SiAPim

!( )

We take derivative and second derivative of S3 with respect to APim:

S03 APim

� �¼ dS3

dAPim

¼XN

n¼1

SRnmpsi

APim

� �2Si

� 1 S003 APim

� �¼

d2S3 APim

� �d APi

m

� �2

¼ �XN

n¼1

SRnmpsi

APim

� �3Si

S003 APim

� �< 0 is negative due to 0 < APi

m. The extreme point is theunique value minimizing the sensor grid user’s payment under

completed time limits. The Lagrangian for the sensor grid user’sutility is L APi

m

� �.

L APim

� �¼ Em �

Xi

APim

!þ Tm �

XN

n¼1

SRnmpsi

SiAPim

!

þ EBm �erSRn

mpsi

SiAPim

!þ k Tm �

XN

n¼1

tnm

!

Where k is the Lagrangian constant. From Karush–Kuhn–TuckerTheorem we know that the optimal solution is given@L APi

m

� �=@APi

m ¼ 0 for k > 0.Let

@L APim

� �=@APi

m ¼ 0 to obtain APim ¼

ð1þ kþ erÞSRnmpsi

Si

� �1=2

Using this result in the constraint equation, we can determineh = 1 + k + er as

ðhÞ�1=2 ¼ TmPNk¼1

pskSRnm

Sk

� �1=2

We substitute h to APim obtain

APi�

m ¼SRn

mpsi

Si

� �1=2PN

k¼1SRn

mpskSk

� �1=2

Tm

APi�

m is the unique optimal payment of sensor grid user m to sensorgrid service provider i under completion time constraint to maxi-mize the sensor grid user’s benefits.

4. Multi-layer optimization algorithms in sensor grid

Multi-layer optimization algorithm in sensor grid produces anoptimal set of sensor grid resources, sensor grid services, and user’spayments at the resource layer, service layer and application layerrespectively to maximize sensor grid utility. The proposed algo-rithm decomposes global sensor grid optimization problem into asequence of three sub-problems at three layers via an iterativealgorithm. In each iteration, at the application layer, the sensor griduser computes the unique optimal payment to sensor grid serviceprovider under completion time constraint to maximize the sensorgrid user’s satisfaction. The sensor grid user individually solves itsfees to pay for sensor grid services to complete its all jobs, adjustsits sensor grid service demand and notifies the sensor grid serviceprovider about this change. At the service layer, the sensor grid ser-vice provider pays sensor grid resource provider for available sen-sor grid resources, provides composed services to sensor grid usersto maximize the benefits. After the new sensor grid service de-mand is observed by the sensor grid service provider, it updatesits price accordingly and communicates the new prices to the sen-sor grid user. The sensor grid service provider never sells a servicefor less than the cost paid to the sensor grid resource providers toacquire suitable resources. So the sensor grid service provider ad-justs its grid resource demand under budget constraint. At the re-source layer, different sensor grid resource providers computeoptimal resource allocation for maximizing the revenue of theirown. Sensor grid resource provider updates its price according tosensor grid resource demands, and then sends the new prices tothe sensor grid service provider to compose the service for sensorgrid user, and the cycle repeats.

The iterative algorithm that achieves multi-layer optimizationalgorithm is described as follows.

L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856 6853

Algorithm 1: Multi-layer optimization algorithm in sensorgrid (MLOA)

Sensor grid user m at application layer

Receives from the sensor grid service provider i the price psðnÞi ;

APi�

m ¼ Max S3 APim

� �n o¼ Max Em �

PiAPi

m

� �þ Tm �

Pntn

m

� �nþ EBm �

PNn¼1en

m

� �g;

//calculates APi�

m to maximize Max S3 APim

� �n o;

If Em PP

iAPim

Then v iðnþ1Þ

m ¼ APi�ðnÞ

m =psðnÞi ; // compute new sensor gridservice demand

Return v iðnþ1Þ

m to sensor grid service provider i;Else Return Null;Sensor grid service provider i at service layerReceives sensor grid service demand v i

m from sensor grid userm;

Receives from prices of sensor resource k and processor

resource l; srkðnÞi ; prlðnÞ

i ;

If Si PP

mv im

Then

psðnþ1Þi ¼max e; psðnÞi þ g

Pmv i

m � Si� �n o

; == Computes a

new sensor grid service price// g > 0 is a small step size parameter, n is iteration

number.

Return new sensor grid service price psðnþ1Þi to all sensor

grid users;Else Return Null;

SPk�

i ; PPl�

i ¼ Max S2 SPki ; PPl

i

� �n o;

//calculates SPk�

i ; PPl�

i to maximize MaxfS2 SPki ; PPl

i;v im

� �g;

If SBi PP

kSPki þ

PlPPl

i

Then skðnþ1Þ

i ¼ SPk�ðnÞ

i =srkðnÞi ; plðnþ1Þ

i ¼ PPl�ðnÞ

i =prlðnÞi ;

// Compute new sensor demand and processor demand

Return skðnþ1Þ

i ; plðnþ1Þ

i to sensor resource k and processorresource l.

Else Return Null;Sensor provider k, processor provider l at resource layer

Receives skðnÞ

i ; plðnÞ

i from sensor grid service provider i;

If SCk PP

iski ; PCl P

Pip

li

Then

srkðnþ1Þ

i ¼max e; srkðnÞ

i þ gP

iski � SCk

� �n o;

prlðnþ1Þ

i ¼max e; prlðnÞi þ g

Pip

li � PCl

� �n o;

Return new price srkðnþ1Þ

i ; prlðnþ1Þ

i to all sensor grid serviceproviders;

Else Return Null;

5. Experiments and analysis

5.1. Experiments environment

In order to verify the efficiency of the proposed multi-layeroptimization algorithm, we compare the performance of the mul-ti-layer optimization algorithm in sensor grid (MLOA) with appli-cation layer optimization algorithm (ALOA) and resource layeroptimization algorithm (RLOA) respectively. ALOA and RLOA are

to only consider one layer’s benefit and maximize single layer’sutility function. In the experiments, 150 sensors are uniformly de-ployed in a field that is 500 m � 500 m in area. There are also 16base stations that are deployed based on a uniformly random dis-tribution. Sensor tasks are created in uniformly distributed loca-tions in the field. There are a total of 150 sensor resources and600 sensor users are taken for experimental evaluation of the sys-tem. Energy consumption is represented as a percentage of the to-tal energy required to execute all job and meet deadlines. Assumethat the maximum power, Pmax, corresponds to running all jobswith the maximum processing frequency. The maximum fre-quency is assumed to be fmax = 1 and the maximum frequency-dependent power is Pmax = 1. When the power capacity for eachinterval is limited, we can only consume a fraction of Pmax whenprocessing requests during a given interval. Jobs arrive at each sitesi, i = 1,2, . . . ,n according to a Poisson process with rate a. The en-ergy cost can be expressed in grid dollar that can be defined as unitenergy processing cost. The initial price of energy is set from 10 to500 grid dollars. Sensor users submit their jobs with varying dead-lines. The deadlines of sensor user application are chosen from 100to 400 ms. The budgets of sensor applications are set from 100 to1500 grid dollars. Each experiment is repeated 6 times and 95%confidence intervals are obtained. The simulation results shownin the figures represent mean values. Simulation parameters arelisted in Table 2.

We use four metrics to evaluate the effectiveness of MLOA suchas resource utilization, execution success ratio, user satisfaction ra-tio and allocation efficiency when comparing with applicationlayer optimization algorithm (ALOA) and resource layer optimiza-tion algorithm (RLOA) respectively. Resource utilization is the ratioof the resources consumed to the total resources available as a per-centage, commonly refers to the percent of time a resource is busy.Execution success ratio is the percentage of tasks executed suc-cessfully before their deadline. User satisfaction ratio measuresthe level of utility for satisfying job requests. It is computed asthe proportion of jobs that required QoS are fulfilled out of all sub-mitted jobs. A higher user satisfaction ratio represents better per-formance. Allocation efficiency is defined as the percentage ofallocated sensor among total available sensor resources. The simu-lation was carried out by varying some parameters: varying taskbudget denoted by b; varying job arrival rate denoted by a. Job ar-rival rate is job arrival speed, which will affect the system load.

The impacts of job arrival rate on resource utilization, user sat-isfaction ratio, allocation efficiency and execution success ratiowere illustrated in Figs. 3–6 respectively. Fig. 3 shows whenincreasing job arrival rate, the resource utilization of MLOA be-comes higher than ALOA and RLOA. For three algorithms, as job ar-rival rate increases, resource utilization ratio increases. For MLOA,When a = 0.6, the resource utilization is as much as 42% more thanutilization by a = 0.10. When job arrival rate was very large, manysensor grid tasks will be sent to system, sensor grid resources arebusier. Fig. 4 shows that the user satisfaction ratio decreases whenjob arrival rate increases. For MLOA, when a = 0.4, user satisfactionratio is as much as 28% less than that by a = 0.10. The smaller is a,system load is low, sensor grid resources are available for gridusers. The requirements of the users can be processed on timeand these users experience higher user satisfaction. So the largeris a, the lower is user satisfaction ratio. When decreasing job arrivalrate, the user satisfaction ratio of MLOA becomes higher than ALOAand RLOA. From the results in Fig. 5, when increasing job arrivalrate, the allocation efficiency become lower. When job arrival rateincreases, the allocation efficiency of MLOA decreases more slowlythan ALOA and RLOA. For MLOA, when a = 0.6, the allocation effi-ciency is as much as 24% less than that with a = 0.10. Fig. 6 showsfor all three algorithms, the execution success ratio is larger whenjob arrival rate is smaller. For MLOA, when job arrival rate in-

0

0.2

0.4

0.6

0.8

1

0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6Job arrival rate

Use

r sa

tisfa

ctio

n ra

tioMLOA ALOA RLOA

Fig. 4. User satisfaction ratio vs job arrival rate.

0

0.2

0.4

0.6

0.8

1

100 250 500 800 1000 1500Budget

Res

ourc

e ut

iliza

tion

MLOA ALOA RLOA

Fig. 7. Resource utilization vs budget.

0

0.2

0.4

0.6

0.8

1

0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6Job arrival rate

Allo

catio

n ef

fici

ency

MLOA ALOA RLOA

Fig. 5. Allocation efficiency vs job arrival rate.

0

0.2

0.4

0.6

0.8

1

100 250 500 800 1000 1500Budget

Use

r sa

tifac

tion

ratio

MLOA ALOA RLOA

Fig. 8. User satisfaction ratio vs budget.

0

0.2

0.4

0.6

0.8

1

0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6Job arrival rate

Exe

cutio

n su

cces

s ra

tio

MLOA ALOA RLOA

Fig. 6. Execution success ratio vs job arrival rate.

0

0.2

0.4

0.6

0.8

1

100 250 500 800 1000 1500Budget

Exe

cutio

n su

cces

s ra

tio MLOA ALOA RLOA

Fig. 9. Execution success ratio vs budget.

6854 L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856

creases by a = 0.6, execution success ratio is as much as 24% lessthan that with a = 0.1. When job arrival rate increases, system loadincreases; some sensor grid user’s requirements can’t be processedon time. Some sensor grid task with low budget can’t be completedbefore deadline; this leads to low execution success ratio.

How the budget effects on resource utilization, user satisfactionratio, execution success ratio and allocation efficiency were illus-trated in Figs. 7–10 respectively. The sensor grid user budget isset from 100 to 1500, considering the resource utilization, fromthe results in Fig. 7, when increasing budget values, the resourceutilization of MLOA becomes higher than ALOA and RLOA. A largerbudget brings out higher resource utilization. When b = 1500, theresource utilization is as much as 21% more than utilization byb = 100. Because when the budget decreases quickly, the sensor

grid users will be prevented from obtain sensor grid resources.Considering the user satisfaction ratio, from the results in Fig. 8,when increasing budget values, the user satisfaction ratio of MLOAbecomes higher than RLOA by 27% when b = 800. For all three algo-rithms, a larger budget brings out user satisfaction ratio. Becausesensor grid user can use the more expensive sensor resources tocomplete tasks within deadline. Fig. 9 is to show the effect of bud-get on execution success ratio. When increasing budget values, theexecution success ratio becomes higher. A larger budget enablessensor grid user to afford more expensive resources to completethe task before its deadline. For MLOA, when the budget increases(b = 1000), the execution success ratio is as much as 31% more thanthat with b = 100. Under the same task budget (b = 800), MLOA hashigher execution success ratio than RLOA by 19%. The results ofFig. 10 show that when increasing b, the allocation efficiency be-come higher. Increasing budget will facilitate users to be admittedby the system. For MLOA, when increasing budget by b = 1000, theallocation efficiency is as much as 35% more than that with b = 100.For RLOA, when b = 1000, the allocation efficiency increase tonearly 30% compared with b = 100. For all three algorithms, a largerbudget brings out allocation efficiency.

The above experiment results show that the multi layer optimi-zation approach yields significantly better QoS than the singlelayer optimization approach. Since the availability of sensor gridservices is dynamic, some sensor grid services selected by the sen-sor grid user may become unavailable when the task needs to beexecuted, it makes the entire scheduling sub-optimal. Multi layeroptimization is superior when it comes to selecting sensor grid ser-vices that satisfy certain global constraints. Multi layer optimiza-tion considers both local and global constraints.

6. Examples of service oriented sensor grid

In service oriented sensor grid, some sensors can be controlledremotely, sensor providers can publish the control interface whichmakes other sensor users can also control and adjust the sensor. Inthe following part, we take the sensor of camera as an example insensor grid environment, and apply our mechanism to sensor gridenvironment. Example of camera as the sensor in sensor grid envi-ronment is shown Fig. 11. A camera provider can also publish theinterface to control the camera, like rotation, zooming in, zoomingout and so on. In this case, only one sensor grid user can control the

0

0.2

0.4

0.6

0.8

1

100 250 500 800 1000 1500Budget

Allo

catio

n ef

fici

ency

MLOA ALOA RLOA

Fig. 10. Allocation efficiency vs budget.

Camera resource agent Camera service agentSensor grid user agent

Get connected Forward resource request

Sensor service approval

Send resource prices Service demand

Send service prices

Forward service request

resource demand

resource approval

Fig. 12. The process of camera service provisioning in sensor grid.

L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856 6855

camera at a time. When several requests of control arrive at onecamera at the same time, the competition among sensor grid userswill happen. In this case, the camera owner may want to provide re-source in order to maximize the benefits. In order to get the camera,every user will calculate how much it would like to pay for utilizingthe camera. And the camera service provider will consider eachuser’s payment and the cost of itself and then make a decision.The camera service provider can also maximize its benefits, in orderto sell the service to the user and get benefits, every camera serviceprovider will give a price to show how much it would like to chargefor the service. And the sensor grid user will consider the each cam-era service’s price and value of the service and then make a decision.The sensor grid user can also maximize its benefits.

In our approach, different agents are used namely camera re-source agents, sensor grid user agents and camera service agent.Camera resource agent, camera service agent and sensor user agentare the agents that act on behalf of camera provider, service pro-vider and users. Camera service provision negotiation is the pro-cess by which sensor grid user agent and camera service agentand camera resource agent interact to reach an agreement throughsensor grid market. After an agreement is reached, sensor gridusers are given a sensor service approval. Camera service provisionnegotiation consists of the sending of a series of proposals to thenegotiation marketplace. If a proposal does not conflict with thenegotiation rules, the sensor grid marketplace will accept and pro-cess the proposal appropriately. Camera service provisioning insensor grid consists of the following steps:

(1) Service user agents submit proposals to camera service pro-vider according to the rules of the negotiation. Sensor griduser computes the unique optimal payment to camera ser-vice provider, adjusts its service demand and notifies thecamera service provider about this change.

(2) Camera service provider pays camera resource provider andprovides composed services to sensor grid users to maxi-mize the benefits. Camera service provider adjusts itsresource demand under budget constraint.

(3) Camera service provider updates its price accordingly andcommunicates the new prices to the sensor grid user.

Service layer

Camera resource agent

Sensor grid user agent

Price/payment Resource layer

Application layer

Camera service agent

Fig. 11. Camera service provisioning in service oriented sensor grid environment.

(4) Camera resource providers compute optimal resource allo-cation for maximizing the revenue of their own. Cameraresource provider updates its price according to resourcedemands, and then sends the new prices to the camera ser-vice provider to compose the service for sensor grid user,

(5) During negotiation, the camera service agent informs sensorgrid user agents of the current status of the negotiation,either by sending them current proposals, or by sendingsome short messages such as the current best proposal.

(6) After negotiation completes, the camera service agent notifysensor service approval to sensor grid user agents.

The process of camera service provisioning in sensor grid isshown in Fig. 12.

7. Conclusions

The paper deals with multi-layer optimization in service orientedsensor grid to optimize utility function of sensor grid, subject to re-source constraints at resource layer, service composition constraintsat service layer and user preferences constraints at application layerrespectively. Using decomposition techniques, the multi-layer opti-mization problem decomposes into three subproblems: sensor gridresource allocation problem, service composing problem, and usersatisfaction degree maximization problem, all of which interactthrough the optimal variables for capacities of sensor grid resourcesand service demand. The proposed algorithm decomposes globalsensor grid optimization problem into a sequence of three sub-prob-lems at three layers via an iterative algorithm. The simulations areconducted to validate the efficiency of the multi-layer optimizationalgorithm. The experiments compare the performance of the multi-layer optimization approach with application layer optimizationand resource layer optimization approach respectively.

Acknowledgements

The work was partly supported by the National Natural ScienceFoundation of China (NSF) under grant (Nos. 60970064,61171075), National Key Basic Research Program of China (973Program) under Grant No. 2011CB302601, Open Fund of the StateKey Laboratory of Software Development Environment underGrant (No. SKLSDE-2011KF-01), Fok Ying Tong Education Founda-tion, China (Grant No. 121067), Program for New Century ExcellentTalents in University, China (NCET-08-0806). Any opinions,findings, and conclusions are those of the authors and do notnecessarily reflect the views of the above agencies.

References

Avilés-López, E., & García-Macías, J. A. (2007). Providing service-orientedabstractions for the wireless sensor grid. In GPC 2007, LNCS (Vol. 4459, pp.710–715).

Fox, G., Ho, A., Wang, R., Chu, E., & Kwan, I. (2008). A collaborative sensor gridsframework; collaborative technologies and systems. In International symposiumon CTS 2008, 19–23 May (pp. 29–38).

Gaynor, M., & Moulton, S. (2004). Integrating wireless sensor networks with thegrid. Journal of IEEE Internet Computing, 7, 32–39.

6856 L. Chunlin, L. LaYuan / Expert Systems with Applications 39 (2012) 6846–6856

Humble, J., Greenhalgh, C., Hamsphire, A., Muller, H. L., & Stefan, R. E. (2005). Ageneric architecture for sensor data integration with the grid. In SAG, LNCS (Vol.3458, pp. 99–107).

Iqbal, M., Lim, H. B., Wang, W., & Yao, Y. (2008). A sensor grid infrastructure forlarge-scale ambient intelligence; parallel and distributed computing,applications and technologies. In Ninth international conference on PDCAT2008, 1–4 December (pp. 468–473).

Ji, Y.-K., Zhang, Y., Xu, Z., & Wu, M.-Y. (2007). Truthful resource allocation in selfishsensor web, In MSN, LNCS (Vol. 4864, pp. 683–693).

Johnson, M. P., Rowaihy, H., Pizzocaro, D., Bar-Noy, A., Chalmers, S., La Porta, T., et al.(2008). Frugal sensor assignment, In DCOSS 2008, LNCS (Vol. 5067, pp. 219–236).

Kanbayashi, R., & Sato, M. (2009). A distributed architecture of sensing web forsharing open sensor nodes. In GPC 2009, LNCS (Vol. 5529, pp. 340–352).

Li, X., Liu, X., Zhao, H., Jiang, N., & Parashar, M. (2008). Autonomic management ofhybrid sensor grid systems and applications computer communications andnetworks, In Proceedings of 17th international conference on ICCCN’08, 3–7 August(pp. 1–6).

Li, C., & Li, L. (2005). A distributed utility-based two level market solution for optimalresource scheduling in computational grid. Parallel Computing, 31(3–4), 332–351.

Li, C., & Li, L. (2007a). Joint QoS optimization for layered computational grid.Information Sciences, 177(15), 3038–3059.

Li, C., & Li, L. (2007b). Utility based QoS optimisation strategy for multi-criteriascheduling on the grid. Journal of Parallel and Distributed Computing, 67(2),142–153.

Lim, H. B., & Lee, D. (2007). An integrated and flexible scheduler for sensor grids, InUIC 2007, LNCS (Vol. 4611, pp. 567–578).

Lim, H. B., Iqbal, M., Wang, W., & Yao, Y. (2009). A large-scale service-orientedsensor grid infrastructure, In 6th IEEE consumer communications and networkingconference CCNC 2009 (pp. 1–2).

Miridakis, N. I., Giotsas, V., Vergados, D. D. & Douligeris, C. (2009). A novel power-efficient middleware scheme for sensor grid applications. In QShine/AAA-IDEA2009, LNICST (Vol. 22, pp. 476–492).

Oh, S.-J., & Lee, C.-W. (2008). U-healthcare sensorgrid gateway for connectingwireless sensor network and grid network, advanced communicationtechnology. In 10th International conference on ICACT 2008 (Vol. 1, pp. 827–831).

Rao, I., Imran, N., Khan, S., Huh, E.-N. & Chung, T. (2007). Adaptive andreconfigurable resource management for wireless sensors using gridtechnology, communication systems software and middleware. In Secondinternational conference on COMSWARE 2007 (pp. 1–5).

Sanabria, J., Rivera, W., Rodriguez, D., Yunes, Y., Ross, G., & Sandoval, C. (2009). Asensor grid framework for acoustic surveillance applications, INC, IMS and IDC,In Fifth international joint conference on NCM’09 (pp. 31–38).

Tham, C.-K., & Buyya, R. (2005). SensorGrid: Integrating sensor networks and gridcomputing. CSI Communications, 0970-647X, 29(1), 24–29.

Yan, Y. J., Wang, S. & Hao, Z. (2005). MPAS: A connecting platform for integratingwireless sensor network with grid. In Asia-Pacific conference on communications(pp. 1000–1004).