Efficient Mobile Reasoning for Pervasive Discovery - Semantic Scholar

6 downloads 708 Views 379KB Size Report
900 Dandenong Road, Caulfield East, VIC, Australia. + 61 3 990 ... present a performance evaluation of the m-Tableaux optimisation ... of our engine. General ... service discovery are quickly overwhelmed when the search space in terms of ...
Efficient Mobile Reasoning for Pervasive Discovery Luke Steller

Shonali Krishnaswamy

Faculty of Information Technology, Monash University 900 Dandenong Road, Caulfield East, VIC, Australia + 61 3 990 32000

Faculty of Information Technology, Monash University 900 Dandenong Road, Caulfield East, VIC, Australia + 61 3 990 32000

[email protected]

[email protected] resource constrained devices, such as PDAs and mobile phones. These small devices which are typical in the context of mobile service discovery are quickly overwhelmed when the search space in terms of the size of ontologies and reasoning complexity increases.

ABSTRACT Semantic service discovery architectures that operate in mobile environments must cope with the significant challenges of finding relevant services rapidly, while facing constrained computational resources. This paper presents our m-Tableaux algorithm for enabling cost-efficient and optimised semantic reasoning to support semantic service matching, on the device itself. We present a performance evaluation of the m-Tableaux optimisation strategies which clearly demonstrate its operational feasibility on a mobile device. We also present comparative evaluations with other semantic reasoners and establish the improved performance of our engine.

Gu et. al. [11] have developed a mobile reasoning framework for J2ME, however it is forward chaining only and does not support backward chaining or OWL-DL reasoning. KRHyper [12] implements a First Order Logic (FOL) reasoner using Tableaux. KRHyper performs better than Racer, however it is still quickly overwhelmed (as ontologies/complexity grows), out of memory exceptions occur and no response is provided. Clearly, this shows that current reasoners cannot be directly ported to a mobile device in their current form.

General Terms Algorithms, Performance, Experimentation, Languages, Theory.

The reality of mobile environments is a world characterised by an ad-hoc intermittent connectivity where such reliance on remote/centralised processing (and continuous interaction) may not always be possible or desirable given the need for rapid processing and dynamically changing context (e.g. a driver has gone past a parking area). Pervasive service discovery has to necessarily be under-pinned by the current context to meet the allimportant criteria of relevance in constantly changing situations. The communication overhead (not to mention the infeasibility/impracticability) of constantly relaying contextual and situational changes of the user/device to a central server will lead to inevitable delays. Thus there is a clear imperative that for semantically driven pervasive service discovery to meet the very real response-time challenges of a mobile environment, the capacity to perform matching and reasoning must occur on the resource limited device itself. Therefore, there is a need for an optimised semantic reasoner, which performs better than currently available reasoners.

Keywords Scalable semantic reasoning, Context-aware discovery, ServiceOriented Pervasive discovery architecture.

1. INTRODUCTION Service discovery architectures that operate in mobile environments must cope with the very significant challenges of not merely finding relevant services, but being able to do so rapidly in a highly dynamic and varying context. The limitations of syntactic, string-based matching for web service discovery coupled with the emergence of the semantic web implies that next generation web services will be matched based on semantically equivalent meaning, even when they are described differently. While current service discovery architectures such as Jini [1], UPnP [2] and UDDI use either interface or string based syntactic matching, there is a growing emergence of semantically enabled pervasive, context-aware architectures such as MobiShare [3] and EASY [4], as well as DAML-S/OWL-S semantic matchmakers such as CMU Matchmaker [5], IRS-III [6] and DIANE [7]. However, all of these architectures rely on the presence of a centralised high-end node, which can clearly be attributed to the fact that semantic reasoners used by these architectures (such as FaCT++ [8], RacerPro [9] and KAON2 [10]) are all resource intensive. As such, they are unsuitable for deployment on small

In this paper we define our mTableaux algorithm, which incorporates a weighted approach to reasoning and implements strategies to optimise reasoning tasks to function on small devices. The remainder of the paper is structured as follows. In section 2 we outline our approach to reasoning and provide several optimisations and ranking strategies. In section 3 we formally define our strategies, in section 4 we provide an implementation and performance evaluation and in section 5 we conclude the paper.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SAC’09, March 8-12, 2009, Honolulu, Hawaii, U.S.A. Copyright 2009 ACM 978-1-60558-166-8/09/03…$5.00.

2. mTABLEAUX – REASONING FOR PERVASIVE SERVICE DISCOVERY In this section we discuss current Tableaux semantic reasoners and present mTableaux, our algorithm for enabling Tableaux reasoning on mobile devices.

1247

a universal quantifier expression av =  P.D. Let AV denote the set of all universal quantifier expressions which have been applied to individual I such that AV = {av1, av2, …, avn}. Let ri denote the r avi i . Let R role relation to which avi applies to such that ri = denote a set of all distinct r role relations relating to any av in AV, such that R = {r1, r2, …, rn}, where rj  rj+1…m. Let ok denote an

2.1 Semantic Reasoners The effective employment of semantic languages requires the use of semantic reasoners such as Pellet [13], FaCT++ [8], RacerPro [9] and KAON2 [10]. Most of these reasoners utilise the widely used Tableaux [14] algorithm. Tableaux is a branching algorithm, reduces all reasoning tasks to a consistency check. Disjunctions form combinations of branches in the tree. If all branches contain a clash, in which a fact and its negation are both asserted, then a clash exists for all models of the knowledge base and the model is inconsistent. Implicit inferences, such as instance class membership, I  RQ, where I is an individual and RQ is a class, is checked by adding the negation of the class RQ as a class type for I. If all models are inconsistent, the inference is proven.

I

For example for the type check LaserPrinter1  RQ (see case study in section 4.1), initially, LaserPrinter1 is added to S, S = {LaserPrinter1}. The application of the first element: ™ PhModem, in a the disjunction rule results in the assertion of:

2.2 mTableaux Strategies

 hasComm. ™ (Modem š 1phNumber) to LaserPrinter1. Applying selective consistency, then results in all objects of the role: hasComm for LaserPrinter1 being added to S, S = {LaserPrinter1, Modem1, Fax, BT}. Expansion rules relating to Modem1 are then applied, resulting in a clash for all branches, while rules relating to all other individuals in the ontology are not applied (expansion rules are not applied to them).

The work in this paper concentrates on optimisations using the Tableaux algorithm for inference checks of the form I  RQ, where I denotes an individual and RQ a class denoting the user request. Our mTableaux algorithm involves a range of optimisation strategies such as: 1 selective application of consistency rules, 2. skipping disjunctions, 3. establishing pathways of individuals and disjunctions which if applied would lead to potential clashes and associating weights values to these elements such that the most likely disjunctions are applied first, by 3a. ranking individuals and 3b. ranking disjunctions.

3.2 Disjunction Skipping The disjunction skipping strategy determines whether disjunctions, are applied to create a new branch in the reasoner, or skipped. Let RQ denote the service request type definition, which is a conjunction of the form RQ = {rq1 š rq2 š … š rqo}. Let C = {c1, c2, ..., cn} denote a set of class type names and logical expressions defined in the ontology. Let D denote a disjunction, of the form D = {d1 › d2 › … › dm}, where di is a disjunction element. Let d´i denote di in non-negated form. Let non-negated form be defined as t´ = t such that t = ™ t, where t is a class type name or logical expression. Where C contains any disjunct element d´i comprising the disjunction D, then D is applied (and branched on), otherwise it is skipped.

1. Application of consistency rules to a subset of individuals only, reduces the size of the reasoning task. Consider the universal quantifier construct of the form  R.C = {  b.(a, b)  R b  C} [15], where R denotes a relation and C denotes a class concept, which implies the object filler for R must be of type C. We denote the individual subset to contain I and those individuals which are R-neighbours of any individual J in the subset, where R relates to a universal quantifier in the individual J.

2. Disjunctions are only applied when they contain a concept which is contained within or can be unfolded from the request type RQ, including role restriction quantifier role filler types, eg C in

o1.. p

individual object connected to I by rj, such that r . Let O = {o1, o2, op}, where ok  ok+1..p. Add all of the elements in O to the set C, C = C + O.

Populating C is as follows: Initially, C = {} and is filled using the following population algorithm. Let E donate a conjunction or disjunction of elements e, of the form E = {e1 š e2 š ... š em} or E = {e1 › e2 › ... › em}, initially: E = RQ. Let e´ denote e in non-negated form. Add all elements e´ [1..m], to C, such that C = C + e´j. In the case that ei is a primitive class type name, unfold each ej, as well as its negation e´j, into the set U such that U = {u1, u2..up}, where uk denotes a class type name or logical expression and recursively reapply this population algorithm for each unfolded type u1…p, after setting E = uj.

 R.C and  R.C.

3. A weighted queue is established to rank individuals, disjunctions and logic expressions such that the highest are applied first. Rankings are established by recursively checking the class types to see whether these potentially lead to future clash. In the next section we more formally describe these strategies.

3. mTABLEAUX ALGORITHM – OPTIMISATION AND RANKING STRATEGIES

For example, assume the following class types derived from request RQ (see section 4.1): C = {Request, PhModem, Modem, {Black}, .. }. The disjunction: { ™ PhModem ›  hasColour. ™ {Black}} is applied because the first element: PhModem, is in

In this section we formally describe the strategies from the previous section.

C. A disjunction: { ™ WiredNet › would be skipped.

3.1 Selectively Consistency In the selective consistency strategy, Tableaux logic expressions are only applied to a subset of individuals, rather than all those individuals in the ontology, let S denote this set. Let RQ denote the service request. When matching RQ Request, the set S initially contains the individual I, S = {I}. Loop all the individuals in set S and let Y denote the current individual from the set. Let av denote

 hasColour. ™ {Blue}},

3.3 Weighted Individuals and Disjunctions In this section we describe the weighted queue used to establish the order in which individuals, disjunctions and role restrictions

1248

For example (see section 4.1), where the individual LaserPrinter1

are evaluated and applied and we provide the strategy for ranking these.

has a disjunction: {PhModem ›  hasColour. {Black}}, which via its first element relates to Modem1 which has a disjunction: {Modem › ( 1 phNumber)}. If the disjunctions in this pathway are applied, a clash occurs. Therefore, each individual and disjunctions involved in this path is incremented as shown in figure 1 (Qrest not shown). Note that all weight objects WO are first initialised to a weight value WV of 1.

A queue contains a weighted object and weight value object value pair. Let WOi denote a weighted object. Let WVi denote an object value. Let Q denote the weighted queue and let WOnext denote the next WO to be returned by the queue. Each WV object is associated with an integer weight value representing the objects current weight, let IVi denote this weight. Let MV denote the highest IV in the queue. MV = max(IV[1..n]) and IV has the range 1  IV[1..n]  MV. Let NW denote a decimal normalised weight value normalised weight decimal value where, 0  NW  1, calculated on the fly, given by: NW = IVi / MV. Let Qind denote the individual queue. Let Qdisj denote a disjunction queue. Let Qrest the role restriction queue, which defines the order in which existential quantifiers and cardinality role restriction expressions are applied to individuals. Universal quantifiers are applied as soon as they are unfolded. Let WOind denote a weighted individuas. Let WOdisj denote a weighted disjunction. Let WOrest denote a weighted role restrictions. Let Qind = {WOind1, WOind2, ..., WOindn}, Qdisj = {WOdisj1, WOdisj2 , ..., WOdisjm} and Qrest = {WOrest1, WOrest2 , ..., WOresto}. There is only one Qind and only one Qrest in the reasoner. There are multiple Qdisj, as each WOindi contains one single Qdisj. The objects WOi in any queue Q, are ordered by their NWi in descending order [1..0] and multiple WOi objects can have the same NWi. When a WOdisj or WOrest is applied to an individual, it is removed from the queue.

Figure 1. Example individual and disjunction queue. ClashDetect: Inputs: I, C, CP. Outputs: CP. Let I be an individual. Let C be a type. Let CP be a set of individuals and logical expressions involved in a clash. Switch(C) Case C is primitive or negation: /* clash if C is a type for I /* Return CheckType(I, C, CP). Case C is a disjunction: Return CheckDisj (I, C, CP). Case C is a conjunction: Return CheckConj (I, C, CP). Case C is a universal quantifier: Return CheckUnivQuant (I, C, CP). Case C is an existential quantifier: Return CheckExistQuant (I, C, CP). Case C is a maximum role restriction: Return CheckMaxRest(I, C, CP).

In a Qdisj and Qrest the next weighted object is WOnext = WO1. The individual queue Qind has a floating weight threshold value, let WT denote this threshold. WT is initially set to the highest weight in the queue, WT = max(NWind[1..n]). Let WTS denote the set of individuals WOindi, with NWi  WT. The next individual WOindnext is the next element in WTS, where WTS is repeatedly iterated over. When Qdisj of all the WOindi elements in WTS contain Qdisji = {}, WT is set to the next highest weight NW, in Qind, NW = max(NWind[1..n]) < WT.

CheckUnivQuant: Inputs: I, av, CP. Outputs: CP. Let I be an individual. Let C be a type. Let CP be a clash path. Let avR be the role of av. Let avR be the role which av applies to. Let avC be the role filler in av for avR. Let oi be an individual object or literal

The ClashDetect algorithm (see below) is used to detect a pathway to a potential clash. Let CP denote this path. The path may be via conjunctions, disjunctions and role fillers of universal quantifiers, and it includes any existential quantifiers or maximum number role restrictions involved in the path. When ranking individuals: execute the ClashDetect algorithm (see below) with the inputs let C denote the last applied non-clashing disjunction element, let I denote the individual to which the disjunction relates: I = WOind, and let CP = {}. When ranking disjunctions: execute the ClashDetect algorithm for each disjunction WOdisjj in the disjunction queue Qdisjk, of each individual WOindk in the individual queue Qind. Let the ClashDetect algorithm inputs be I = WOindk, C = WOdisji , CP = {}. If the algorithm returns a nonempty clash path set CP  {}, increment the weight value WV for all the weighted object WO elements (individuals WOind, disjunctions WOdisj and role restrictions WOrest) within CP by 1. We assume that all WO elements are already added to their respective weighted queue Q.

value connected to I by avR, where Let O = {o1, o2, on}. Let S be a set S = {}. For each oi in O: S  ClashDetect(Oi, avC, CS). If S  null: CP  S + CP. Return CP. Return null.

I avR

o1.. n

.

4. IMPLEMENTATION AND PERFORMANCE EVALUATION

ClashDetect calls various sub-functions which we did not include due to lack of space. CheckType, CheckExistQuant and CheckMaxRest may detect a clash a return a new clash path, while CheckDisj, CheckConj and CheckUnivQuant result in recursive calls to CheckClash.

In this section we provide two case studies in order to evaluate our mTableaux algorithm, with particular attention to whether it enables successful inference completion on resource constrained devices, the magnitude of performance improvements, which strategies work best together, how mTableaux performs when

1249

compared to other widely available reasoners, and whether result accuracy is reduced.

4.2 Mobile Performance Evaluation We performed an evaluation on a HP iPAQ hx2700, 624Mhz PDA. A more detailed description of this evaluation can be found in [16]. Table 1 presents four type checks, comprising a matching and non-matching individual compared with the request of each case study. Each test was also executed using various randomly selected combinations of our optimisation strategies. Successfully executed tests returned the expected result shown in table 1.

4.1 Implementation and Case Studies We implemented the selective consistency, rank individuals, rank disjunctions and skip disjunctions strategies defined in section 3, in the open source Pellet v1.5 reasoner. We selected Pellet because unlike FaCT++ it is written in Java allowing it to be easily ported to heterogeneous devices such as PDAs. We also impplemented two case studies in order to use in our evaluation of mTableaux, in the next section. These case studies are as follows:

Figure 2 shows two graphs, which each show the consistency time to perform a type check for individual A and B (indicated in the legend) against the request, and the optimisation overhead required, for the tests in table 1. Each test in figure 2 is marked with initials, to indicate which optimisation strategies were enabled in the test. C, S, D and I, denotes selective Consistency, Skip disjunctions, rank Disjunctions and rank Individuals respectively. Pellet with no optimisations did not complete due to “Out Of Memory” errors while the best results with mTableaux, for case study 1 and 2 was 18 and 35-70 seconds, respectively, clearly demonstrating that mTableaux enables mobile reasoning. The best results were achieved when selective consistency and skip disjunction strategies were used together, while although rank disjunctions and individuals were found to reduce the number of branches applied, this did not translate into performance improvements.

Searching for a Printer: Bob wishes to send a fax from his PDA and issues a service request for a listing of black and white, laser printers (with toner cartridge) which support a wireless network protocol (Bluetooth, WiFi or IrDA), a Fax protocol and which have a dialup modem with a phone number. The ontologies for this case study comprise 141 classes, 337 individuals and 126 roles. Equations 1-4 illustrate a simplification of the request RQ and (5) illustrates a simplification of matching LaserPrinter1 individual. RQ  PhModem š  hasColour.{Black} š hasComm.{Fax} š LaserPrinterOperational š WNet PhModem   hasComm.(Modem

š

 1 phNumber)

LaserPrinterOperational  Printer š  hasCartridge. {Toner} ˆ  1 hasOperationalContext WNet 

 hasComm.{BT} ›  hasComm.{WiFi} ›  hasComm.{IrDA}

Printer(LaserPrinter1), hasColour(LaserPrinter1, Black), hasCartridge(LaserPrinter1, Toner), hasComm(LaserPrinter1, BT), hasComm(LaserPrinter1, Fax), hasOperationalContext(LaserPrinter1, Ready), Modem(Modem1), hasComm(LaserPrinter1, Modem1), phNumber (Modem1, “9903 9999”)

(1)

(2)

Table 1. Type checks.

(3)

Case Study 1

Request Printer

(4)

2

Cinema

Individual A LaserPrinter1 B LaserPrinter2 A Village B GreaterUnion

Exp. Result Match No Match Match No Match

4.3 Desktop Performance Evaluation

(5)

In this section we provide a performance comparison of mTableaux with Pellet 1.5 and with RacerPro 1.9.2 beta. Since RacerPro cannot be deployed to mobile devices, we have undertaken a performance evaluation on a Pentium Centrino 1.82GHz computer with Java 1.5 (J2SE) allocated maximum of 500MB for each experiment. All timings presented are computed as the average of 10 independent runs. Since Racer automatically performs classification of a class type hierarchy, we provide separate results for Pellet with and without classification enabled (without classification involved type checks only). We expanded our case studies to include 20 potential services where 3 are matching (positive) and 17 are not (negative). Each service was checked to see if it matched the request, to provide a set of matching services. Figure 3 illustrates the processing time required to check the 20 services using each reasoner. It showed

Searching for a Movie Cinema: Bob wishes to find a movie cinema with Internet café and phone. He issues a request for a retail outlet which has at least 5 cinemas attached that each screen movies, has a section which sells coffee and tea, sells an Internet service which supports access using the WiFi protocol and sells a fixed phone service. The ontologies for this case study comprise 204 classes, 241 individuals and 93 roles.

Figure 2. Processing time taken to perform each test.

1250

Time (seconds)

that Pellet out performed RacerPro and that mTableaux performed in less than half the time of Pellet without classification for the Printer case study, with less substantial improvements for the Product case study. However, we observed that the number of branches applied when executing the Product case study using mTableaux was less than half that of Pellet, suggesting that when the amount of available memory available is constrained, as on a small device, the difference in performance will be significantly enlarged. 15

6. REFERENCES [1]

Arnold K., O'Sullivan B., Scheifler RW., Waldo J. and Woolrath A. The Jini Specification, Addison-Wesley 1999.

[2]

UPnP. Universal Plug and Play (UPnP). http://www.upnp.org

[3]

Doulkeridis C., Loutas N. and Vazirgiannis M. A System Architecture for Context-Aware Service Discovery. 2005.

[4]

Mokhtar SB., Preuveneers D., Georgantas N. and Issarny V. EASY: Efficient SemAntic Service DiscoverY in Pervasive Computing Environments with QoS and Context Support. Journal Of System and Software. 2008, 81(5).

[5]

Srinivasan N., Paolucci M. and Sycara K. Semantic Web Service Discovery in the OWL-S IDE. In proc. 39th Hawaii International Conference on System Sciences, Hawaii, 2005.

[6]

Cabral L., Domingue J., Galizia S., Gugliotta A., Tanasescu V., Pedrinaci C, et al. IRS-III: A Broker for Semantic Web Services based Applications. In proc. 5th International Semantic Web Conference (ISWC 2006), Athens, GA, USA, 2006.

[7]

Küster U., König-Ries B. and Klein M. Discovery and Mediation using DIANE Service Descriptions. In proc. Second Semantic Web Service Challenge 2006 Workshop, June 15 - 16, Budva, Montenegro, 2006.

[8]

FaCT++. (2008), http://owl.man.ac.uk/factplusplus/

[9]

RacerPro. (2008), http://www.racer-systems.com

Racer

10 5 0 Product

Printer

Pellet (classification) Pellet (no classification) mTableaux

Case Study

Figure 3. Reasoner Comparison. We used recall (which measures how effectively all relevant services were found), and precision (which measures how effectively irrelevant services were not discovered) to measure accuracy. These are listed in equations 6 and 7. Let x denote the number of relevant services returned to the user. Let n denote the total number of relevant services available. Let N denote the total number of services returned. In our tests all reasoners returned perfect recall and precision of 1, effectively discovering only the three relevant printer and product services in the printer and product case studies, respectively. Recall = x / n .

(6)

Precision = x / N

(7)

(2007),

[10] KAON2. (2008), http://kaon2.semanticweb.org [11] Gu T., Kwok Z., Koh KK. and Pung HK. A Mobile Framework Supporting Ontology Processing and Reasoning. In proc. 2nd Workshop on Requirements and Solutions for Pervasive Software Infrastructure (RSPS) in conjunction with the 9th International Conference on Ubiquitous Computing (Ubicomp '07), September, Austria, 2007.

4.4 Summary In summary, we have demonstrated that, mTableaux enables successful completion of reasoning tasks on resource limited devices with significant improvements to performance, 2. selective consistency and skip disjunction stratgies work best while the ranking algorithms failed to show performance benefits, 3. checking negative individuals was more time consuming, 3. mTableaux out performs RacerPro and Pellet, 4 mTableaux did not reduce the accuracy of results in terms of recall and precision.

[12] Kleemann T. Towards Mobile Reasoning. In proc. International Workshop on Description Logics (DL2006), May 30 - June 1, Windermere, Lake District, UK, 2006. [13] Pellet. (2003), http://www.mindswap.org/2003/pellet/ [14] Horrocks I. and Sattler U. A Tableaux Decision Procedure for SHOIQ. In proc. 19th International Conference on Artificial Intelligence (IJCAI 2005), 2005.

5. CONCLUSION AND FUTURE WORK mTableaux was shown to significantly improve the performance of pervasive discovery reasoning, to enable deployment to mobile resource constrained devices. It was also shown to out perform RacerPro without reducing the quality of results returned.

[15] Baader F., Calvanese D., McGuinness DL., Nardi D. and Patel-Schneider PF. The Description Logic Handbook: Theory, Implementation, and Applications, Cambridge University Press 2003.

Although, mTableaux significantly improves performance, it is still possible to get “Out of Memory” errors if the ontology size is too large. Therefore, to avoid this, we are also developing a resource-aware reasoning strategies, which leverage our ranking strategies to improve efficiency when resources availability becomes low, by reducing result accuracy. In addition we will pre-emptively weight and prune the set of potential services to check, using sampling strategies and user preferences collected using historical data.

[16] Steller L. and Krishnaswamy S. Optimised Semantic Reasoning for Pervasive Service Discovery. International Conference on Service Oriented Computing (ICSOC). Sydney, Australia 2008.

1251