基于文件系统的PROLOG数据持久化研究与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着信息时代发展,具有处理海量数据的能力,是当今信息化社会对各种信息处理系统的基本要求之一,而数据持久化是应用软件处理海量数据的基本途径。
     Prolog是当代最有影响的人工智能语言之一,由于该语言很适合表达人的思维和推理规则,在自然语言理解、机器定理证明、专家系统等方面得到了广泛的应用,已经成为人工智能应用领域的强有力的开发语言。在Prolog中,数据主要是以事实(fact)的形式,存放在内存中。但随着需要处理的数据量不断扩大以及数据要求永久保存,仅仅依靠内存已不能满足这些要求。所以研究Prolog的数据持久化问题对于Prolog语言处理能力的提升和应用范围的扩大具有重要意义。
     近年来,对Prolog的数据持久化研究也取得了一定的进展。如SWI-Prolog提供odbc接口、在Ciao-Prolog中实现了基于MySQL关系数据库的持久化模块等等,但这些都是基于第三方的关系数据库管理系统的。由于关系数据库管理系统依赖于特定的数据库接口,使用其作为Prolog持久化手段必然增加系统的复杂性、使用和维护的成本,降低了系统的效率。
     本文在研究了现有的文件存储技术基础上,提出了一个基于文件系统的Prolog数据持久化模型,设计并实现了一个可完成Prolog数据持久化的模块(PFM:Persistent Fact Module)。本文主要研究内容包括以下几个方面:
     1.研究和分析现有基于关系数据库的数据持久化技术,分析表明它们存在效率低于文件系统的问题。
     2.提出了基于文件系统的Prolog数据持久化模型。这个模型采用了分层的设计思想。将模型由底至上分为:数据持久化层、外部谓词层。
     3.采用当前数据库使用最广泛的B+树算法,设计和实现了数据持久化层。
     4.应用SWI-Prolog的外部语言接口和C语言混合编程实现了外部谓词层。
     5.将PFM系统应用到高校学生信息管理系统中,经测试表明:在保证了系统总体效率的前提下,PFM成功的降低了数据持久化的复杂性。
In the development of information systems, the ability to handle massive data is one of the basic requirements where the basic way is data persistence.
     Prolog is nowadays one of the most influential artificial intelligence languages, which is very suitable for expression of human thought and reasoning rules and has been widely used in the natural language understanding, machine theorem proving, expert system, etc. In Prolog, data is mainly stored as facts in memory and obviously this approach cannot meet the need of the growth and permanent preservation of data. Therefore, the study of Prolog data persistence is significant.
     In recent years, some progresses have been made in the study of Prolog data persistence, such as odbc-interface in SWI Prolog, data persistent module based on MySQL in Ciao Prolog, and so on. These approaches are based on third-party relational database management system, wherein data access is through specific database interface with high complexity of the system and maintenance costs and low system efficiency.
     Based on study of the existing file storage techniques, this paper proposes a persistent model of file system for Prolog data, designs and implements a Persistent Fact Module(PFM) to carry out Prolog data persistence. The outlines of this paper include:
     1. Research and analysis of existing Prolog data persistence techniques based on relational data systems with the inclusion that such approaches have low efficiency than ones based on file system.
     2. Proposal of Prolog data persistence model based on file system. By layered design the model is divided into, from bottom to top, the data persistence and the external predicates layers.
     3. Design and implementation of the data persistence layer by using B+ tree algorithm that is most widely used in rational database management systems.
     4. Implementation of the external predicates layer through external language interface of SWI-Prolog and programming in C language.
     5. Application of the PFM system to the university student information management system, indicating that with the same overall efficiency, PFM successful reduces the data persistence complexity.
引文
[1]P.Lyma,H.Rvarian,J.Dunn,A.Strygin,and K.Searingen.How much information,October 2000
    [2]白晓虹等.Prolog语言特点综述[J].延安大学学报,1999(3)
    [3]周立柱.Prolog逻辑程序设计及应用[M].清华大学出版社,1991
    [4]Jan Wielemaker.SWI-Prolog5.2 ReferenceManual.http://www.swi-prolog.org
    [5]Gray,J.,and Reuter,A.,Transaction Processing:Concepts and Techniques,Morgan-Kaufman Publishers,1993
    [6]Comer,D.,"The Ubiquitous B-tree," ACM Computing Surveys Volume 11,number 2,June 1979
    [7]Cliford A.Shaffer.A Practical Introduction to Data Structures and Algorithm Analysis (Second Edition),.电子工业出版社,2002
    [8]Mark Allen Weiss著;冯舜玺译.数据结构与算法分析.机械工业出版社,2004
    [9]宫海林.支持事务的文件存储技术研究与系统实现[D].国防科学技术大学,2006
    [10]张友生.系统分析师之路.电子工业出版社,2006.06
    [11]李安东.PROLOG事实库的持久化研究与实现[D].安徽理工大学.2007
    [12]李明,陈广平.Prolog语言在采矿方法选择设计中的应用[J].矿业工程.2003,(02)
    [13]廉师友.人工智能技术导论(第二版).西安电子科技大学出版社.2002
    [14]张龙祥,黄正瑞,龙军.数据库原理与设计.人民邮电出版社,2002.7
    [15]高荣芳.数据库原理.西安电子科技大学出版社,2003
    [16]吴洪潭.数据库原理.北京:国防工业出版社,2003.1
    [17]严蔚敏,吴伟民.数据结构(C语言版).清华大学出版社,2002.9
    [18]戚志峰.B树及其在MINISIS中的应用.情报学报,第3卷第2期,1984
    [19]刘方鑫.数据库原理与技术.电子工业出版社,2002.5
    [20]邵佩英.分布式数据库系统及其应用.科学出版社,2000.6
    [21]赖朝安,孙延明,郑时雄.结合C++与Prolog语言快速开发专家系统[J].计算机工程与应用,2002,(03).
    [22]Lars Jacobsen,Kim S.Larsen.Variants of(A,B)-tree with relaxed balance.International Journal of Foundations of Computer Science,2001,12(4)
    [23]Yuetang Deng,Phyllis Frankl,Zhongqiang Chen.Testing Database Transaction Concurrency.Department of Computer and Information Science,Polytechnic University(USA), 2003
    [24]The Intelligent Systems Laboratory.Quintus Prolog User's Manual.Swedish Institute of Computer Science,2003
    [25]D.L.Bowen,L.Byrd,F.C.N.Pereira,L.M.Pereira,D.H.D.Warren.SICStus Prolog User's Manual.Swedish Institute of Computer Science,2007
    [26]Adam Drozdek著;周翔,王建芬,黄小青等译.数据结构与算法.机械工业出版社,2003.7
    [27]王珊,吴鸥琦.B树及其在文件组织中的应用[J].计算机研究与发展,1981,(09)
    [28]白天锐等.基于持久层的技术在开发中的应用.计算机工程.2002,28(3)
    [29]徐震,张敏,冯登国.支持多策略的安全数据库系统体系结构[J].华中科技大学学报(自然科学版),2005,(S1)
    [30]文俊浩,徐玲,李立新等.安全增强的数据库系统的模型构建[J].计算机应用,2005,(08)
    [31]代崴,周剑锋.B-+树索引文件研究与应用[J].软件导刊,2006,(21)
    [32]李军,孙智锋,王鑫.B-树在数据存储与搜索中的应用[J]信息技术,2000,(02)
    [33]胡杰.数据库应用系统的性能分析与优化方法研究[D]河海大学,2002
    [34]朱玉珑.并发进程中的一个问题[J]小型微型计算机系统,1982,(04)
    [35]凌迎春.结构化的在线目录和文件组织管理系统[J].计算机应用研究,1996,(02)
    [36]周可,吉永光,冯丹,王芳.简单树结构存储系统数据分块标准及其证明[J].华中科技大学学报(自然科学版),2007,(03)
    [37]骆吉洲,李建中.一种索引结构的压缩存储及其查询处理技术[J].计算机工程与应用,2007,(08)
    [38]李刚,孙华,张新林.Prolog与C程序连接的实现技术[J]上海大学学报(自然科学版),1998,(06)
    [39]沙胜贤,康顺哲.Prolog语言的特点及其编程技术[J]长春光学精密机械学院学报,1999,(03)
    [40]刘兴荣,宋志国,商同,李光辉.采用Prolog和C联合开发专家系统的一种实用方法[J].河北工业大学学报,1999,(06)
    [41]李树一.逻辑程序设计语言-PROLOG[J].机器人,1984,(01)
    [42]霍佳震;郭凤鸣;李虎.基于SWI-Prolog开发铁水运输调度专家系统[J].物流技术,2006,(01)
    [43]陶文祥,曾湘燕.Prolog模糊推理机[J]微电子学与计算机,1997,(01)
    [44]张鸿雁.多层数据库体系结构的开发与研究[J].甘肃科技,2006,(07)
    [45]Michael A.Covington,Some Coding Guidelines for Prolog.http://www.ai.uga.edu/mc/plcoding.pdf
    [46]J.P.E Hodgson.Prolog Web Pages:The ISO Standard,http://pauillac.inria.fr/~deransar/prollog/overview.html

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700