基于文档对象模型的改进SCL文件解析算法  

Improved SCL File Parsing Algorithm Based on Document Object Model

在线阅读下载全文

作  者:王友钊[1] 温琪[1] 黄静[2] 

机构地区:[1]浙江大学数字技术及仪器研究所,杭州310027 [2]浙江理工大学信息电子学院,杭州310018

出  处:《计算机工程》2014年第9期32-36,共5页Computer Engineering

基  金:国家自然科学基金资助项目(51375459)

摘  要:基于文档对象模型(DOM)的变电站配置描述语言(SCL)文件解析算法在解析文件时会将整个SCL文档内容在内存中展开,并将文件内容转化为树状节点的结构,占用较大的内容空间。针对该问题,对传统DOM算法进行改进,利用SCL文件的文本节点信息存在冗余的特性,分别使用动态数组、散列表以及二叉平衡查找树3种数据结构为文本节点建立索引并去除冗余,避免相同的信息重复使用内存。实验结果表明,对于普通的SCL文件,使用基于二叉平衡查找树的改进算法能在原算法的基础上减少46%~66%的内存使用;对于较大的SCL文件,使用基于散列表的改进算法能在原算法的基础上减少40%~59.8%的内存使用;2种针对不同大小SCL文件的改进算法,能够在保证SCL文件解析速度的前提下,有效减少DOM算法的内存消耗。The traditional method of parsing Substation Configuration Description Language(SCL)files based on Document Object Model(DOM)expands the whole file in memory and makes a tree structure which has the defect of height memory utilization. According to the redundancy of text nodes information in SCL,improved algorithms are proposed by using the data structures of dynamic array,hash table and binary balance search tree to build index for the text nodes. Experimental results show that the DOM algorithm based on binary balance search tree can reduce46%~66%of the memory utilization for the common SCL files,and the DOM algorithm based on hash table can cut down40%~59.8% of the bigger SCL files. The two improved algorithms all perform well in reducing the memory utilization of parsing SCL files on the premise of guarantee the SCL file parsing speed.

关 键 词:文档对象模型 变电站配置描述语言 数据结构 索引 解析速度 内存使用率 

分 类 号:TM734[电气工程—电力系统及自动化]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象