A kind of hybrid access method of electric network data model based on XML native database
Technical field
The present invention relates to and belong to power system information technical field, be specifically related to a kind of hybrid access method of electric network data model based on XML native database.
Background technology
CIM (Common Information Model, common information model) and model data are the significant data types of power domain, describe the information such as power network topology and component parameters.Along with intelligent grid development, between system, model data exchanges day by day frequent, the electric network data of relational data library storage faces the problem of inefficiency to the conversion of XML (Extensible Markup Language, extend markup language) form electrical network exchange model data.
At present, the storage of grid model data mainly adopts relevant database, and model exchanges and then mainly adopts XML format (CIM/RDF, CIM/XSD).Relational data is conventional storage means, strict logic but there is fragmentation problem, and the reconstruction of relations efficiency between power network object and attribute is not high.Although XML format clear in structure, relation is directly perceived, and query conversion efficiency is lower.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art, the invention provides a kind of hybrid access method of electric network data model based on XML native database, based on OO strategy, the advantage of comprehensive utilization relevant database and XML format, realizes the quick storage of grid model data, inquiry and conversion.
In order to realize foregoing invention object, the present invention takes following technical scheme:
The invention provides a kind of hybrid access method of electric network data model based on XML native database, it is characterized in that: said method comprising the steps of:
Determine electric network data model, and described electric network data model is divided into basic data type and complex data type;
Basic data type is stored with relational database basic data type, and complex data type is stored with XML native data type;
Complex data type is carried out multistage fractionation, repeats above-mentioned steps;
Electric network data model is extracted according to unique number.
Determine described electric network data model according to IEC 61970/61968, described electric network data model is feeder line model.
When basic data type and complex data type store, need to be stored in the unique number in electric network data model.
Complex data type is stored in the XML Body field of relation database table with XML native data type.
Described relation database table comprises database isolating switch table, database switch list, database plant stand table, database AC line table and database fuse table.
In each database table, basic data type and complex data type are stored as String basic data type and XML native data type respectively.
In described database isolating switch table, field name mRID represents that isolating switch identifies, and field name name represents isolating switch title, and field name aliasName represents isolating switch alias name, and field name XML Body represents isolating switch details.
In described database switch list, field name mRID represents switch mark, and field name name represents switch names, and field name aliasName represents switch alias name, and field name XML Body represents switch details.
In described database plant stand table, field name mRID represents that plant stand identifies, and field name name represents plant stand title, and field name aliasName represents product station alias name, and field name XML Body represents plant stand details.
In described database AC line table, field name mRID represents that AC line identifies, and field name name represents AC line title, and field name aliasName represents AC line alias name, and field name XML Body represents AC line details.
In described database fuse table, field name mRID represents that fuse identifies, and field name name represents fuse title, and field name aliasName represents fuse alias name, and field name XML Body represents fuse details.
Compared with prior art, beneficial effect of the present invention is:
The present invention take power network object as storage unit, and conventional determinant attribute is as the field of relation database table, and the XML part of power network object is then direct stored in XML field.This hybrid storage means combines the advantage of relevant database and XML format, make use of the fast query advantage of relational database on the one hand, on the other hand power network object is directly saved as XML, compared with carrying out storage mode with traditional being broken by data model, improve the decomposition of grid model data and assembled efficiency, effectively can promote model data inquiry and the conversion efficiency of application system.
Accompanying drawing explanation
Fig. 1 is feeder line model structure figure in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
The present invention proposes the hybrid storage means of electric network data model based on XML native database: take power network object as storage unit, and conventional determinant attribute is as the field of relation database table, and the XML part of power network object is then direct stored in XML field.This hybrid storage means combines the advantage of relevant database and XML format, make use of the fast query advantage of relational database on the one hand, on the other hand power network object is directly saved as XML, compared with carrying out storage mode with traditional being broken by data model, improve the decomposition of grid model data and assembled efficiency, effectively can promote model data inquiry and the conversion efficiency of application system.
Grid model data is widely used in power system information construction, and when electrical production needs to carry out exchanges data between business, model data, as connection object, is carried out reading and storing, and then completed power business stream between business.Now for distribution feeder, introduce and how to utilize relational database and the primary mixed mode of XML to carry out data storage electric network model.
The invention provides a kind of hybrid access method of electric network data model based on XML native database, it is characterized in that: said method comprising the steps of:
Determine electric network data model, and described electric network data model is divided into basic data type and complex data type;
Basic data type is stored with relational database basic data type, and complex data type is stored with XML native data type;
Complex data type is carried out multistage fractionation, repeats above-mentioned steps;
Electric network data model is extracted according to unique number.
Determine described electric network data model according to IEC 61970/61968, described electric network data model is feeder line model (as Fig. 1).
When basic data type and complex data type store, need to be stored in the unique number in electric network data model.
Complex data type is stored in the XML Body field of relation database table with XML native data type.Relational database feeder line table is as table 1:
Table 1
Field name |
Type |
Remarks |
mRID |
String |
Feeder line identifies |
name |
String |
Feeder line title |
aliasName |
String |
Feeder line alias name |
breaker |
XML |
Isolating switch details belonging to feeder line |
switch |
XML |
Switch details belonging to feeder line |
Substation |
XML |
Plant stand details belonging to feeder line |
ACLineSegment |
XML |
Alternating current circuit details belonging to feeder line |
Fuse |
XML |
Fuse details belonging to feeder line |
…… |
XML |
Other details belonging to feeder line |
Described relation database table comprises database isolating switch table, database switch list, database plant stand table, database AC line table and database fuse table.
In each database table, basic data type and complex data type are stored as String basic data type and XML native data type respectively.
In described database isolating switch table, field name mRID represents that isolating switch identifies, and field name name represents isolating switch title, and field name aliasName represents isolating switch alias name, and field name XML Body represents isolating switch details.As table 2:
Table 2
Field name |
Type |
Remarks |
mRID |
String |
Isolating switch identifies |
name |
String |
Isolating switch title |
aliasName |
String |
Isolating switch alias name |
XMLBody |
XML |
Isolating switch details |
In described database switch list, field name mRID represents switch mark, and field name name represents switch names, and field name aliasName represents switch alias name, and field name XML Body represents switch details.As table 3:
Table 3
Field name |
Type |
Remarks |
mRID |
String |
Switch mark |
name |
String |
Switch names |
aliasName |
String |
Switch alias name |
XMLBody |
XML |
Switch details |
In described database plant stand table, field name mRID represents that plant stand identifies, and field name name represents plant stand title, and field name aliasName represents product station alias name, and field name XML Body represents plant stand details.As table 4:
Table 4
Field name |
Type |
Remarks |
mRID |
String |
Plant stand identifies |
name |
String |
Plant stand title |
aliasName |
String |
Plant stand alias name |
XMLBody |
XML |
Plant stand details |
In described database AC line table, field name mRID represents that AC line identifies, and field name name represents AC line title, and field name aliasName represents AC line alias name, and field name XML Body represents AC line details.As table 5:
Table 5
Field name |
Type |
Remarks |
mRID |
String |
AC line identifies |
name |
String |
AC line title |
aliasName |
String |
AC line alias name |
XMLBody |
XML |
AC line details |
In described database fuse table, field name mRID represents that fuse identifies, and field name name represents fuse title, and field name aliasName represents fuse alias name, and field name XML Body represents fuse details.As table 6:
Table 6
Field name |
Type |
Remarks |
mRID |
String |
Fuse identifies |
name |
String |
Fuse title |
aliasName |
String |
Fuse alias name |
XMLBody |
XML |
Fuse details |
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; those of ordinary skill in the field still can modify to the specific embodiment of the present invention with reference to above-described embodiment or equivalent replacement; these do not depart from any amendment of spirit and scope of the invention or equivalent replacement, are all applying within the claims of the present invention awaited the reply.