论文部分内容阅读
针对国内电能质量领域各厂家以及各省规范对电能质量数据交换格式(PQDIF)文件定义差异所造成的解析程序兼容性问题,提出并实现了一种PQDIF文件通用解析方案。通过总结已知PQDIF文件标签组合及其对应测量指标类型,进而构造可扩展标记语言(XML)格式存储的通道序列定义表;利用哈希表将待解析文件的标签组合在表中快速匹配对应的测量指标类型,并对未知标签组合进行差异匹配得到最相近组合。在无需修改解析程序源代码的前提下,不但可以实现对已知不同定义结构PQDIF文件的正确快速解析,而且只需用户进行简单配置,即可顺利解析包含未知标签组合的PQDIF文件。在某省电能质量一体化数据平台中的成功应用证明了此方案的可靠性和实用性。
Aiming at the problem of compatibility of resolving program caused by the difference between the definition of power quality data exchange format (PQDIF) and the specifications of each province in the domestic power quality field, a general resolution scheme of PQDIF file is proposed and implemented. By summarizing the label combinations of the known PQDIF files and the corresponding measurement index types, a channel sequence definition table stored in XML format is constructed; the hash table is used to quickly combine the labels of the files to be analyzed in the table to quickly match the corresponding The type of indicator is measured, and the most similar combination is obtained by performing the difference matching on the unknown label combination. Without modifying the source code of the parser, not only can the PQDIF file with different defined structure be correctly and quickly resolved, but also the PQDIF file containing the unknown label combination can be successfully parsed with simple configuration by the user. The successful application in a provincial power quality integrated data platform proves the reliability and practicability of this solution.