CN104112015A - DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method - Google Patents

DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method Download PDF

Info

Publication number
CN104112015A
CN104112015A CN201410343891.0A CN201410343891A CN104112015A CN 104112015 A CN104112015 A CN 104112015A CN 201410343891 A CN201410343891 A CN 201410343891A CN 104112015 A CN104112015 A CN 104112015A
Authority
CN
China
Prior art keywords
node
dom
intelligent substation
xml
path language
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410343891.0A
Other languages
Chinese (zh)
Inventor
李功新
王永明
林国贤
林鹏程
陈大凤
张丰
朱菁
郭碧媛
高秋锋
谢东方
邹宝钦
郭飞云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XIAMEN GREAT POWER GEO INFORMATION TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
State Grid Fujian Electric Power Co Ltd
Management and Training Center of State Grid Fujian Electric Power Co Ltd
Fuzhou Power Supply Co of State Grid Fujian Electric Power Co Ltd
Original Assignee
XIAMEN GREAT POWER GEO INFORMATION TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
State Grid Fujian Electric Power Co Ltd
Management and Training Center of State Grid Fujian Electric Power Co Ltd
Fuzhou Power Supply Co of State Grid Fujian Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XIAMEN GREAT POWER GEO INFORMATION TECHNOLOGY Co Ltd, State Grid Corp of China SGCC, State Grid Fujian Electric Power Co Ltd, Management and Training Center of State Grid Fujian Electric Power Co Ltd, Fuzhou Power Supply Co of State Grid Fujian Electric Power Co Ltd filed Critical XIAMEN GREAT POWER GEO INFORMATION TECHNOLOGY Co Ltd
Priority to CN201410343891.0A priority Critical patent/CN104112015A/en
Publication of CN104112015A publication Critical patent/CN104112015A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML

Abstract

The invention relates to a DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method. The intelligent substation SCD file parsing method is characterized by including the steps: S01, displaying data in an SCD file in the form of a tree in a DOM API (application programming interface); S02, accessing any node in the tree by means of traversing from a root node; S03, searching a required node set according to the XML path language technology and processing the node set so as to parse virtual terminals, a virtual terminal connection relation and telemetering, remote signaling, remote regulating and remote control systems of an intelligent substation. The DOM and XML path language based intelligent substation SCD file parsing method has the advantages that by the aid of the XML path language technology, the required node set is searched directly at first and then is processed, direct access and filtering operations of all the nodes are avoided, a program is simplified, and data processing efficiency is improved substantially.

Description

Intelligent substation SCD document analysis method based on DOM and XML path language
Technical field
The present invention relates to intelligent substation technology, particularly the intelligent substation SCD document analysis method based on DOM and XML Path Language.
Background technology
Existing intelligent substation SCD document analysis technology, resolves based on TinyXML analytical tool.Read SCD file by TinyXML and build up a DOM and set, this DOM tree adopts firstchild-nextsibling tree to realize.In TinyXML, each node is all preserved first child (first child node), last child (last child node), next sibling (next adjacent node), these 5 relevant node pointers of previous sibling (previous adjacent node), parent (father node) of this node, thereby builds up whole tree construction being convenient to traversal.This comes from Guo Jiansheng, Wu Wenxuan, Wang Yunmao, Liang Manshu, Zhang Huahui. the parsing of the intelligent substation SCD file based on TinyXML. and electric power and the 31st the 3rd phase of volume of electrician .2011 in September.
Existing intelligent substation SCD document analysis technology, need to add third party's instrument and use cumbersomely, and when information extraction, the cumbersome execution efficiency of secondary development is low.
Summary of the invention
In view of this, the object of this invention is to provide a kind of intelligent substation SCD document analysis method based on DOM and XML Path Language, avoided directly, to the filter operation that conducts interviews of all nodes, having simplified program, and significantly having improved data-handling efficiency.
The present invention adopts following scheme to realize: a kind of intelligent substation SCD document analysis method based on DOM and XML path language, is characterized in that: step S01: by DOM API, the data in SCD document are shown with the form of tree;
Step S02: by the traversal starting from root node, have access to the arbitrary node in tree;
Step S03: search the set of node needing by XML Path Language technology, then set of node is processed, to resolve the empty terminal of intelligent substation, empty terminal annexation and four distant.
In an embodiment of the present invention, in described step S01, the data in SCD document being shown with the form of tree is to adopt C# language, needs to add XML header file; With LoadXmlFile (SCD) function loading SCD file, can in internal memory, form a dom tree.
In an embodiment of the present invention, the mode that described step SO2S realizes: search the root node of an XML document, according to the tag name providing find out corresponding element, obtain to all child nodes of egress, obtain to the father node of egress, obtain an element tag name, obtain the associated data of an element and obtain the value of an element.
In an embodiment of the present invention, in described step S03, searching by XML Path Language technology the set of node needing is to utilize SelectNode(Xpath, namespace) function searches the set of node of feature NameSpace.
In an embodiment of the present invention, the described SelectNode(Xpath that utilizes, namespace) the conventional function of set of node that function is searched feature NameSpace has: search present node whole child nodes, determine node according to given label, and find this node all father nodes, determine node according to given attribute, and find out n node of this node and obtain all nodes without specified attribute.
In an embodiment of the present invention, after described step S03, also comprise the reference list reference of output matching, described reference list is a form, first of form is classified dataset name as, the run after fame reference of the IED that is called PL2201B of secondary series, the 4th classifies the annotation of reference as, and the 5th classifies the Chinese of IED as, and the tenth classifies the model of IED as.
The present invention utilizes XML Path Language technology, first directly searches the set of node needing, and then set of node is processed, and has avoided directly, to the filter operation that conducts interviews of all nodes, having simplified program, and significantly having improved data-handling efficiency.
Brief description of the drawings
Fig. 1 is the inventive method flow process simplified diagram.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can more be become apparent, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Set forth detail in the following description so that fully understand the present invention.But the present invention can be different from alternate manner described here and implements with multiple, and those skilled in the art can do similar popularization without prejudice to intension of the present invention in the situation that.Therefore the present invention is not subject to the restriction of following public embodiment.
As shown in Figure 1, it is a kind of based on DOM and XML path language (XML Path Language that the present embodiment provides, Xpath) intelligent substation SCD document analysis method, is characterized in that: step S01: by DOM API, the data in SCD document are shown with the form of tree;
Step S02: by the traversal starting from root node, have access to the arbitrary node in tree;
Step S03: search the set of node needing by XML Path Language technology, then set of node is processed, to resolve the empty terminal of intelligent substation, empty terminal annexation and four distant.
In order better to realize the foundation of tree, in the present embodiment, in described step S01, the data in SCD document being shown with the form of tree is to adopt C# language, needs to add XML header file; With LoadXmlFile (SCD) function loading SCD file, can in internal memory, form a dom tree.
In an embodiment of the present invention, the mode that described step SO2S realizes: search the root node of an XML document, according to the tag name providing find out corresponding element, obtain to all child nodes of egress, obtain to the father node of egress, obtain an element tag name, obtain the associated data of an element and obtain the value of an element.
In an embodiment of the present invention, in described step S03, searching by XML Path Language technology the set of node needing is to utilize SelectNode(Xpath, namespace) function searches the set of node of feature NameSpace.
In an embodiment of the present invention, the described SelectNode(Xpath that utilizes, namespace) the conventional function of set of node that function is searched feature NameSpace has: search present node whole child nodes, determine node according to given label, and find this node all father nodes, determine node according to given attribute, and find out n node of this node and obtain all nodes without specified attribute.
Refer to table 1, in an embodiment of the present invention, after described step S03, also comprise the reference list reference of output matching, described reference list is a form, first of form is classified dataset name as, the run after fame reference of the IED that is called PL2201B of secondary series, and the 4th classifies the annotation of reference as, the 5th classifies the Chinese of IED as, and the tenth classifies the model of IED as.
Table 1
Although the present invention with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can utilize method and the technology contents of above-mentioned announcement to make possible variation and amendment to technical solution of the present invention; therefore; every content that does not depart from technical solution of the present invention; any simple modification, equivalent variations and the modification above embodiment done according to technical spirit of the present invention, all belong to the protection domain of technical solution of the present invention.The foregoing is only preferred embodiment of the present invention, all equalizations of doing according to the present patent application the scope of the claims change and modify, and all should belong to covering scope of the present invention.

Claims (6)

1. the intelligent substation SCD document analysis method based on DOM and XML path language, is characterized in that: step S01: by DOM API, the data in SCD document are shown with the form of tree;
Step S02: by the traversal starting from root node, have access to the arbitrary node in tree;
Step S03: search the set of node needing by XML Path Language technology, then set of node is processed, to resolve the empty terminal of intelligent substation, empty terminal annexation and four distant.
2. the intelligent substation SCD document analysis method based on DOM and XML path language according to claim 1, it is characterized in that: in described step S01, the data in SCD document being shown with the form of tree is to adopt C# language, needs to add XML header file; With LoadXmlFile (SCD) function loading SCD file, can in internal memory, form a dom tree.
3. the intelligent substation SCD document analysis method based on DOM and XML path language according to claim 1, is characterized in that: the mode that described step SO2S realizes: search the root node of an XML document, according to the tag name providing find out corresponding element, obtain to all child nodes of egress, obtain to the father node of egress, obtain an element tag name, obtain the associated data of an element and obtain the value of an element.
4. the intelligent substation SCD document analysis method based on DOM and XML path language according to claim 1, it is characterized in that: in described step S03, searching by XML Path Language technology the set of node needing is to utilize SelectNode(Xpath, namespace) function searches the set of node of feature NameSpace.
5. the intelligent substation SCD document analysis method based on DOM and XML path language according to claim 4, it is characterized in that: the described SelectNode(Xpath of utilization, namespace) the conventional function of set of node that function is searched feature NameSpace has: search present node whole child nodes, determine node according to given label, and find this node all father nodes, determine node according to given attribute, and find out n node of this node and obtain all nodes without specified attribute.
6. the intelligent substation SCD document analysis method based on DOM and XML path language according to claim 1, it is characterized in that: the reference list reference that also comprises output matching after described step S03, described reference list is a form, first of form is classified dataset name as, the run after fame reference of the IED that is called PL2201B of secondary series, the 4th classifies the annotation of reference as, and the 5th classifies the Chinese of IED as, and the tenth classifies the model of IED as.
CN201410343891.0A 2014-07-19 2014-07-19 DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method Pending CN104112015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410343891.0A CN104112015A (en) 2014-07-19 2014-07-19 DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410343891.0A CN104112015A (en) 2014-07-19 2014-07-19 DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method

Publications (1)

Publication Number Publication Date
CN104112015A true CN104112015A (en) 2014-10-22

Family

ID=51708806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410343891.0A Pending CN104112015A (en) 2014-07-19 2014-07-19 DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method

Country Status (1)

Country Link
CN (1) CN104112015A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346474A (en) * 2014-11-19 2015-02-11 国家电网公司 Quick analysis method for intelligent substation SCD (System Configuration Description) file
CN104750825A (en) * 2015-03-31 2015-07-01 国家电网公司 Intelligent substation SCD document rapid analysis method
CN105468856A (en) * 2015-11-27 2016-04-06 中国电力科学研究院 Electric energy metering device identification method in SCD (Substation Configuration Description) file on the basis of multi-keyword matching
CN106533777A (en) * 2016-11-29 2017-03-22 广东工业大学 Intelligent transformer station information flow path determination method based on matrix ranks and system
CN107506339A (en) * 2017-08-08 2017-12-22 许继集团有限公司 A kind of SCD nodes verification error localization method and device based on character skew
CN108874985A (en) * 2018-06-12 2018-11-23 东方电子股份有限公司 The distributed parsing configuration method of intelligent substation SCD file
WO2019148671A1 (en) * 2018-01-30 2019-08-08 平安科技(深圳)有限公司 Xml file parsing method, device, computer apparatus, and storage medium
CN110908962A (en) * 2019-11-22 2020-03-24 南昌科晨电力试验研究有限公司 SCD model rapid data processing method for intelligent substation
CN113079049A (en) * 2021-03-31 2021-07-06 国网浙江省电力有限公司电力科学研究院 Automatic network message aggregation analysis method, equipment and medium for intelligent substation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706816A (en) * 2009-12-22 2010-05-12 广东电网公司电力科学研究院 Method for detecting digitized transformer station model
CN103324693A (en) * 2013-06-05 2013-09-25 国电南瑞科技股份有限公司 Modeling method based on international electro technical commission (IEC) 61850 protocol and extensive makeup language (XML) database
US8631028B1 (en) * 2009-10-29 2014-01-14 Primo M. Pettovello XPath query processing improvements

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8631028B1 (en) * 2009-10-29 2014-01-14 Primo M. Pettovello XPath query processing improvements
CN101706816A (en) * 2009-12-22 2010-05-12 广东电网公司电力科学研究院 Method for detecting digitized transformer station model
CN103324693A (en) * 2013-06-05 2013-09-25 国电南瑞科技股份有限公司 Modeling method based on international electro technical commission (IEC) 61850 protocol and extensive makeup language (XML) database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
邹小虎等: "基于纯XML数据库的SCL文件管理", 《计算机工程》 *
郭健生等: "基于TinyXML的智能变电站SCD文件的解析", 《电力与电工》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346474A (en) * 2014-11-19 2015-02-11 国家电网公司 Quick analysis method for intelligent substation SCD (System Configuration Description) file
CN104346474B (en) * 2014-11-19 2017-10-24 国家电网公司 A kind of fast resolving method of intelligent substation SCD file
CN104750825A (en) * 2015-03-31 2015-07-01 国家电网公司 Intelligent substation SCD document rapid analysis method
CN104750825B (en) * 2015-03-31 2017-11-21 国家电网公司 A kind of intelligent substation SCD file fast resolving method
CN105468856A (en) * 2015-11-27 2016-04-06 中国电力科学研究院 Electric energy metering device identification method in SCD (Substation Configuration Description) file on the basis of multi-keyword matching
CN105468856B (en) * 2015-11-27 2020-03-10 中国电力科学研究院 Method for identifying electric energy metering equipment in SCD file based on multi-keyword matching
CN106533777A (en) * 2016-11-29 2017-03-22 广东工业大学 Intelligent transformer station information flow path determination method based on matrix ranks and system
CN107506339A (en) * 2017-08-08 2017-12-22 许继集团有限公司 A kind of SCD nodes verification error localization method and device based on character skew
WO2019148671A1 (en) * 2018-01-30 2019-08-08 平安科技(深圳)有限公司 Xml file parsing method, device, computer apparatus, and storage medium
CN108874985A (en) * 2018-06-12 2018-11-23 东方电子股份有限公司 The distributed parsing configuration method of intelligent substation SCD file
CN110908962A (en) * 2019-11-22 2020-03-24 南昌科晨电力试验研究有限公司 SCD model rapid data processing method for intelligent substation
CN113079049A (en) * 2021-03-31 2021-07-06 国网浙江省电力有限公司电力科学研究院 Automatic network message aggregation analysis method, equipment and medium for intelligent substation

Similar Documents

Publication Publication Date Title
CN104112015A (en) DOM (document object model) and XML (extensible markup language) path language based intelligent substation SCD (substation configuration description) file parsing method
EP3400540B1 (en) Database operation using metadata of data sources
US8250101B2 (en) Ontology guided reference data discovery
US10394862B2 (en) Method and system for semantically querying a database by a machine-to-machine application
DE102017111438A1 (en) API LEARNING
CN106372176B (en) A method of it supports to carry out nested document unified SQL query
US8024353B2 (en) Method and system for sequentially accessing compiled schema
CN109325009A (en) The method and device of log parsing
CN102779186B (en) Whole process modeling method of unstructured data management
CN103294652A (en) Data conversion method and system
CN104572978A (en) User behavior counting method for power scheduling automatic system based on log
CN104750825A (en) Intelligent substation SCD document rapid analysis method
CN104021147B (en) A kind of code stream analyzing method and device
US8996991B2 (en) System and method for displaying an acceptance status
Lunesu et al. Approach to Manage Semantic Informations from UGC.
CN103902651A (en) Cloud code query method and device based on MongoDB
CN102063501B (en) Internet web page conversion method and device
KR101499571B1 (en) Method of conversion to semantic documents through auto hierarchy classification of general documents, recording medium and device for performing the method
CN104598628A (en) Intelligent substation SCD (substation configuration description) resolving method based on SAX
CN111090417A (en) Binary file analysis method, device, equipment and medium
CN103136304B (en) Article processing method and device
Mäs et al. Generic schema descriptions for comma-separated values files of environmental data
CN103631951A (en) Batch access function merging method and device based on metadata
CN104537078B (en) A kind of directory index optimization method based on sliding block
CN104424334A (en) Method and device for constructing nodes of XML (eXtensible Markup Language) documents

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141022