Research Article

An Extensible Data Enrichment Scheme for Providing Intelligent Services in Internet of Things Environments

Algorithm 1

A procedure for building reduced isNow or has<key> triplets with an SWRL rule.
Let G be a finite group and T = (s,p,o) be a triplet from the RDF data model, which is a subset of G.
Define V= {s,p,o |T = (s,p,o) UB × U × UBL, where TG}
 Consider each ThingsMetadata document as an input.
 Consider a particular triplet Tz = (“ThingsMetadata”, ofA, the assigned literal of “Entity”) as a root triplet denoted as Tz = (sz, pz, oz).
 Consider TyGy, where Ty represents triplets of all adjacent individual and their predicates.
Generate Tx into Gx, where Tx contains both Ty-i and Ty-j when subject(Ty-j) = = object(Ty-i) after applying the transition rule with chain-reductions.
Iterate all triplets Txas Tx = (sx, px, ox) in the given set Gx.
  if (equalsTo(getSubject(Ty-j) = = getObject(Ty-i) ) = = result)
   Make a copy of the Ty-i, denoted by Tx onto Gx, and set the predicate and object of Tx as isNow and the result of getObject(Ty-j), respectively.
  else if (!( equalsTo(getSubject(Ty-j) = = getObject(Ty-i) ) = = result)
    && (IsLiteral(getObject(Ty-j)) = = true)
   Make a copy of the Ty-i, denoted by Tx onto Gx, set the predicate of the Tx as has< getSubject(Ty-i)>
  else
   Set the predicate of the Tx as hasA
  merge G′ into G
 end
     result indicates a key name itself in ThingsMetadata structure.    Tm’s object oi contains user-defined literals.