World Wide Web

, Volume 22, Issue 1, pp 1–37 | Cite as

An index structure supporting rule activation in pervasive applications

  • Yi QinEmail author
  • Xianping Tao
  • Yu Huang
  • Jian Lü


Rule mechanism has been widely used in many areas, such as databases, artificial intelligent and pervasive computing. In a rule mechanism, rule activation decides which rules are activated, when the rules are activated, and which tuples can be generated through the activation. Rule activation determines the efficiency of rule mechanism. In this article, we define the semantic constraints, constant constraint and variable constraint, of the rule according to the semantics of Datalog rules. Based on the constraints, we propose an index structure, named Yield index, to support the rule activation effectively. Yield index consists of the data index and semantic index, and records the complete information of a rule, including the matching relationship among the tuples of different relations in rule body. The index integrates tuple insertion and rule activation to directly determine whether the matching tuples of new inserted tuple exist. Due to this character, we perform effective rule activation only, avoiding ineffective rule activation that cannot generate new tuples, so that the efficiency of rule activation is improved. The article describes the structure of Yield index, the construction and maintenance algorithms, and the rule activation algorithm based on Yield index. The experimental results show that Yield index has better performance and improves activation efficiency of one order of magnitude, comparing with other index structures. In addition, we also discuss the possible extensions of Yield index in other applications.


Index Rule activation Dummy tuples Rule mechanism Pervasive systems 



This work was supported by National Natural Science Foundation of China(Grant Nos. 91318301, 61073031, 61321491, 61373011 and 61772258).


  1. 1.
    AbuDahab, K., Xu, D., Chen, Y.: A new belief rule base knowledge representation scheme and inference methodology using the evidential reasoning rule for evidence combination. Expert Syst. Appl. 51, 218–230 (2016)CrossRefGoogle Scholar
  2. 2.
    Agrawal, R.: Alpha: an extension of relational algebra to express a class of recursive queries. IEEE Trans. Softw. Eng. 14, 879–885 (1988)CrossRefGoogle Scholar
  3. 3.
    Alberto, C., Liu, J., Wang, H., Kashyap, A.: A new dynamic rule activation for extended belief rule bases. Proc. Int. Conf. Mach. Learn. Cybern. 18, 1836–1841 (2013)Google Scholar
  4. 4.
    Bettini, C., Brdiczka, O., Henricksen, K., Indulska, J., Nicklas, D., Ranganathanf, A., Riboni, D.: A survey of context modelling and reasoning techniques. Perv. Mob. Comput. 6(2), 161–180 (2010)CrossRefGoogle Scholar
  5. 5.
    Brant, D.A., Miranker, D.P.: Index support for rule activation. In: Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data(SIGMOD,’93), pp. 42–48. Washington, D.C. (1993)Google Scholar
  6. 6.
    Calvanese, D., Giacomo, G.D., Lembo, D., Lenzerini, M., Rosati, R.: Tractable reasoning and efficient query answering in description logics: The dl-lite family. J. Autom. Reason. 39(3), 385–429 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Calzada, A., Liu, J., Wang, H., Kashyap, A.: A new dynamic rule activation method for extended belief rule-based systems. ACM Trans. Knowl. Data Eng. 27, 880–893 (2015)CrossRefGoogle Scholar
  8. 8.
    Chandrasekaran, S., Franklin, M.J.: Psoup: A system for streaming queries over streaming data. VLDB J. 12, 140–156 (2003)CrossRefGoogle Scholar
  9. 9.
    Chu, D., Popa, L., Tavakoli, A., Hellerstein, J.M., Levis, P., Shenker, S., Stoica, I.: The design and implementation of a declarative sensor network system. In: Proceedings of the 5th International Conference on Embedded Networked Sensor Systems (SenSys’07), pp. 175–188. Sydney (2007)Google Scholar
  10. 10.
    Dlv: [Online]. Available:
  11. 11.
    Forgy, C.L.: Rete: A fast algorithm for the many pattern/many object pattern match problem. Artif. Intell. 19(1), 17–37 (1982)CrossRefGoogle Scholar
  12. 12.
    Gu, T., Pung, H., Zhang, D.: Toward an osgi-based infrastructure for context-aware applications. Perva. Comput. IEEE 3(4), 66–74 (2004)CrossRefGoogle Scholar
  13. 13.
    Gupta, N., Kot, L., Roy, S., Bender, G., Gehrke, J., Koch, C.: Entangled queries: enabling declarative data-driven coordination. In: Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data (SIGMOD’11), pp. 673–684. Athens (2011)Google Scholar
  14. 14.
    Hanson, E.: The design and implementation of the ariel active database rule system. IEEE Trans. Knowl. Data Eng. 8(1), 157–172 (1996)CrossRefGoogle Scholar
  15. 15.
    Hirvisalo, V., Nuutila, E., Soisalon-Soininen, E.: Transitive closure algorithm memtc and its performance analysis. Discret. Appl. Math. 110, 77–84 (2001)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Hu, H., Xu, J., Lee, D.L.: A generic framework for monitoring continuous spatial queries over moving objects. In: Proceedings of the 2005 ACM SIGMOD International Conference on Management of Data(SIGMOD,’05), pp. 479–490. Baltimore (2005)Google Scholar
  17. 17.
    Ioannidis, Y., Ramakrishnan, R., Winger, L.: Transitive closure algorithms based on graph traversal. ACM Trans. Database Syst. 18, 512–576 (1993)CrossRefGoogle Scholar
  18. 18.
    Jagadish, H.V., Agrawal, R., Ness, L.: A study of transitive closure as a recursion mechanism. In Proceedings of the 1987 ACM SIGMOD International Conference on Management of Data (SIGMOD’87) (1987)Google Scholar
  19. 19.
    Jena: [Online]. Available:
  20. 20.
    Liang, S., Fodor, P., Wan, H., Kifer, M.: Openrulebench: an analysis of the performance of rule engines. In: Proceedings of the 18th International Conference on World wide Web(WWW’09), pp. 601–610. Madrid (2009)Google Scholar
  21. 21.
    Liu, Y.A., Stoller, S.D.: From datalog rules to efficient programs with time and space guarantees. ACM Trans. Program. Lang. Syst. 31(6), 1–38 (2009)CrossRefGoogle Scholar
  22. 22.
    Loo, B.T., Condie, T., Garofalakis, M., Gay, D.E., Hellerstein, J.M., Maniatis, P., Ramakrishnan, R., Roscoe, T., Stoica, I.: Declarative networking: language, execution and optimization. In: Proceedings of the 2006 ACM SIGMOD International Conference on Management of Data(SIGMOD’06), pp. 97–108. Chicago (2006)Google Scholar
  23. 23.
    Mandl, S., Ludwig, B.: Multi-context systems with activation rules. In: Proceedings of the 33rd Annual German Conference on AI, LNAI vol. 6359, pp. 135–142. Karlsruhe (2010)Google Scholar
  24. 24.
    Miranker, D.P.: Treat:a better match algorithm for ai production systems. In: Proceedings of the Sixth National Conference on Artifical Intelligence (AAAI’87), pp. 42–47. Seattle (1987)Google Scholar
  25. 25.
    Miranker, D., Lofaso, B.: The organization and performance of a treat-based production system compiler. IEEE Trans. Knowl. Data Eng. 3(1), 3–10 (1991)CrossRefGoogle Scholar
  26. 26.
    Ontobroker: [Online]. Available:
  27. 27.
    Owlim: [Online]. Available:
  28. 28.
    Perera, C., Zaslavsky, A., Christen, P., Georgakopoulos, D.: Context aware computing for the internet of things: A survey. IEEE Commun. Surv. Tutor. 16(1), 414–454 (2014)CrossRefGoogle Scholar
  29. 29.
    Perttunen, M., Riekki, J., Lassila, O.: Context representation and reasoning in pervasive computing: A review. Int. J. Multimed. Ubiq. Eng. 4(4), 1–28 (2009)Google Scholar
  30. 30.
    Sagonas, K., Swift, T., Warren, D.S.: Xsb as an efficient deductive database engine. In: Proceedings of the 1994 ACM SIGMOD International Conference on Management of Data(SIGMOD,’94), pp. 442–453. Minneapolis (1994)Google Scholar
  31. 31.
    Segev, A., Zhao, J.: Rule activation techniques in database systems. J. Intell. Inf. Syst. 7, 173–194 (1996)CrossRefGoogle Scholar
  32. 32.
    Sellis, T., Lin, C.C., Raschid, L.: Implementing large production systems in a dbms environment: Concepts and algorithms. In: Proceedings of the 1988 ACM SIGMOD International Conference on Management of Data(SIGMOD’88), pp. 404–423. Chicago (1988)Google Scholar
  33. 33.
    Stonebraker, M.: The integration of rule systems and database systems. IEEE Trans. Knowl. Data Eng. 4(5), 415–423 (1992)CrossRefGoogle Scholar
  34. 34.
    Stonebraker, M., Jhingran, A., Goh, J., Potamianos, S.: On rules, procedure, caching and views in data base systems. In: Proceedings of the 1990 ACM SIGMOD International Conference on Management of Data(SIGMOD,’90), pp. 281–290. Atlantic City (1990)Google Scholar
  35. 35.
    Tarjan, R.: Depth first search and linear graph algorithms. SIAM J. Comput. 1, 146–160 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
  36. 36.
    Ullman, J.D.: Principles of Database and Knowledge-base Systems, vol. I. Computer Science Press Inc., New York (1988)Google Scholar
  37. 37.
    Wang, Y.M., Yang, J.B., Xu, D.L.: Environmental impact assessment using the evidential reasoning approach. Eur. J. Oper. Res. 174, 1885–1913 (2006)CrossRefzbMATHGoogle Scholar
  38. 38.
    Wolfson, O., Silberschatz, A.: Distributed processing of logic programs. In: Proceedings of the 1988 ACM SIGMOD International Conference on Management of Data (SIGMOD,’88), pp. 329–336. Chicago (1988)Google Scholar
  39. 39.
    Yap: [Online]. Available:
  40. 40.
    Zhang, W., Yu, C.T.: A necessary condition for a doubly recursive rule to be equivalent to a linear recursive rule. In: Proceedings of the 1987 ACM SIGMOD International Conference on Management of Data (SIGMOD’87). San Francisco (1987)Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.State Key Laboratory for Novel Software Technology and Department of Computer Science and TechnologyNanjing UniversityNanjingChina

Personalised recommendations