Summary of the invention
The object of the embodiment of the present invention is to provide a kind of electric power battalion based on ontology to join model checking method, is intended to solve the problem of the data interoperation data validity existing in current power system.
The embodiment of the present invention is achieved in that a kind of electric power based on ontology battalion joins model checking method, should electric power battalion based on ontology joins model checking method and comprises the following steps:
Step 1, is converted to network ontology language structure representation by the common information model of expansion identifiable language pattern statement, and the cim of XML Schemas statement is converted to OWL structure representation;
Step 2, the subset X SD model specification providing when mutual between two application systems is done verification with complete or collected works' model specification IEC cim_1968_61970 of standard, if there is incongruent place, feed back in time the mutual application system of participation;
Step 3, sets up complete or collected works' model specification, with IEC cim_61968_61970, as XSD2OWL, inputs, and obtains the complete or collected works OWL model specification of a standard;
Step 4, the agent model XSD that outer application system is submitted to, is converted to the OWL of subset;
Step 5, on the basis of Protege OWL Api, by the hierarchical relationship in OWL, the semantic informations such as attribute constraint extract, and the consistency checking of subset OWL and complete or collected works OWL is carried out at semantic hierarchies;
Step 6, carries out uniformity test to subset OWL and complete or collected works OWL, and verification is generated to uniformity test result feedback to external system.
Further, XML Schema has defined the element type of common information model, corresponding attribute and attribute constraint.
Further, OWL becomes OWL statement with explicit the showing of the understandable mode of computing machine by the message model normative translation of present XSD statement by the semanteme of first prime model and semantic relation.
Further, the subset X SD model specification providing when mutual between two application systems and complete or collected works' model specification IEC cim_1968_61970 of standard do the concrete grammar of verification:
First by XSD2OWL, with IEC cim_61968_61970, as input, obtain the complete or collected works OWL model specification of a standard, the agent model XSD that outer application system is submitted to, is converted to the OWL of subset;
Secondly, conversion is generated to OWL, minimum complete unit is class, by after the extracting of the hierarchical relationship of each class and other classes, attribute semantic constraints information completely, at Protege by each class extracting after semantic information, according to class name, in complete or collected works OWL, inquire about class of the same name, if do not leave class of the same name, illustrate that the name of the model in subset OWL and standard criterion are inconsistent, feedback error information; If inquired class of the same name, will do conforming relatively judgement to the direct parent of this class in the direct parent of class in subset OWL, indirect parent and complete or collected works OWL, indirect parent, if inconsistent, feedback error information, the method that attribute is retrained to conforming verification is basic with identical above, but in inconsistent situation, processing mode is more complex, each attribute of each class in subset OWL is inquired about in complete or collected works OWL attribute of the same name in class of the same name, if there is no attribute of the same name, feedback error; If there is attribute of the same name, to verify successively span, the constraint base of attribute constraint, if in full accord, be verified; If exist inconsistently, such as span, and the span of attribute in subset OWL constraint is in attribute span of corresponding complete or collected works OWL and so on, so also acquiescence by, the checking of constraint base is like this equally.
Further, the information interaction between application system is undertaken by data bus, and the form of the machine-processed assembly of the conforming checking of Model for Interoperability is deployed in power information bus platform.
Model checking method is joined by electric power battalion based on ontology provided by the invention, adopts the composition plug-in unit of data bus, can on the basis of not restarting bus service, carry out heat dispose at each Utilities Electric Co. scene, does not affect the operation conditions of original service; Flexible configuration is convenient, can to Knowledge Verification Model, carry out seamless reduction according to the concrete situation of Utilities Electric Co.'s data, meets the check demand of various electric power system models.Verification of the present invention basis is IEC61970/IEC61968 standard, meets international electric power standard, has effectively solved the data validity problem of data interoperation in the electric system of current existence, have and dispose simply, plug and play, flexible, verification is feature accurately.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Below in conjunction with drawings and the specific embodiments, application principle of the present invention is further described.
As shown in Figure 1, the electric power based on ontology of embodiment of the present invention battalion joins model checking method and comprises the following steps:
Step 1, is converted to network ontology language structure representation by the common information model of expansion identifiable language pattern statement, and the cim of XML Schemas statement is converted to OWL structure representation;
Step 2, the subset X SD model specification providing when mutual between two application systems is done verification with complete or collected works' model specification (IEC cim_1968_61970) of standard, if there is incongruent place, feed back in time the mutual application system of participation;
Step 3, sets up complete or collected works' model specification, with IEC cim_61968_61970, as XSD2OWL, inputs, and obtains the complete or collected works OWL model specification of a standard;
Step 4, the agent model XSD that outer application system is submitted to, is converted into the OWL of subset;
Step 5, on the basis of Protege OWL Api, by the hierarchical relationship in OWL, the semantic informations such as attribute constraint extract, and the consistency checking of subset OWL and complete or collected works OWL is carried out at semantic hierarchies;
Step 6, carries out uniformity test to subset OWL and complete or collected works OWL, and verification is generated to uniformity test result feedback to external system.
One of data bus forms plug-in unit in an embodiment of the present invention, can on the basis of not restarting bus service, carry out heat dispose at each Utilities Electric Co. scene, does not affect the operation conditions of original service; Basis is IEC61970/IEC61968 standard, meets international electric power standard.
Principle of work of the present invention:
(1) common information model of expansion identifiable language pattern statement is converted to network ontology language structure representation, the cim of XML Schemas statement is converted to OWL structure representation, make its semantic information clear;
(2) the subset X SD model specification providing when mutual between two application systems is done verification with complete or collected works' model specification (IEC cim_1968_61970) of standard, if there is incongruent place, feed back in time the mutual application system of participation;
(3) set up complete or collected works' model specification, with IEC cim_61968_61970, as XSD2OWL, input, obtain the complete or collected works OWL model specification of a standard;
(4) agent model XSD outer application system being submitted to, is converted into the OWL of subset;
(5), on the basis of Protege OWL Api, by the hierarchical relationship in OWL, the semantic informations such as attribute constraint extract, and the consistency checking of subset OWL and complete or collected works OWL is carried out at semantic hierarchies;
(6) subset OWL and complete or collected works OWL are carried out to uniformity test, and verification is generated to uniformity test result feedback to external system.
Specific embodiments of the invention:
External system is when requiring access service to information interactive bus, tend to the XSD (XML Schemas Definition) of subsidiary service, this XSD is the common model Schema of a subset, XML Schema has defined the element type of common information model, corresponding attribute and attribute constraint, but the hierarchical relationship between each element, the semantic relation of the attribute of class and attribute constraint is very unintelligible but, hard to understand, and be that machine itself can not be understood voluntarily, this brings very large difficulty just to the verification of the subset message model specification (XSD) of external system,
OWL (Web Ontology Language) is the network ontology language that W3C tissue is recommended, OWL has very strong statement ability, can be by the semanteme of first prime model and semantic relation with explicit the showing of the understandable mode of computing machine, if the message model normative translation of present XSD statement can be become to OWL statement, will bring great convenience to the consistency desired result of message model standard undoubtedly;
XML Schemas is obscure has implied a lot of semantic informations, such as the substitutionGroup between elements and the extension/restriction base in complexTypes, just to have implied hierarchical relationship semantic, so XML Schemas be mapped to OWL main order be exactly that explicit statement is out exactly by semanteme in pattern, semanteme in XML Schemas mainly lies in the middle of the combination of Schemas structure, the effect of mapping is exactly these structures to be converted to the syntactic structure of OWL, thereby make machine can better understand these semantemes, in the IEC CIM_61968_61970 document in xsd statement, the type of single cim model element is complexType, after converting OWL structure to, be expressed as owl:Class, xsd represents that the xs:extension base of derived relation is converted to rdfs:subClassOf, the mode of so just hierarchical relationship in secret in original XML Schemas being inherited with class is explained out clearly, say for another example in XML Schemas may be such to the statement of certain attribute constraint of single cim model: <xs:element name=" isDC " type=" xs:boolean " minOccurs=" 1 " maxOccurs=" 1 " sawsdl:modelReference=" http://iec.ch/TC57/CIM-generic#BaseVoltage.isDC " >, such statement is a kind of form of text completely, wherein semantic information in secret is very large, but very disorderly and unsystematic, do not say that machine cannot understand, people is also difficult to understand clearly, and convert the such structure bar of OWL structure representation to, put in order clear, semantic information is very clear, very convenient machine processing,
Described in before combining, the cim of XML Schemas statement is converted to OWL structure representation, make its semantic information clear, for the consistency desired result of the interoperability between distribution multiservice system, be very necessary, also must bring very large facility, XSLT (XML StyleSheet Language Translation) is the best implementation tool of this conversion, as Fig. 3;
The framework that to have formed a power information bus between present distribution operation system be middleware, interoperability between each application system all will be passed through bus, this is just for the mechanism in the conforming checking of bus deploy Model for Interoperability provides precondition, and the just model specification of subset that interoperability between between two application systems is often applied to, so the subset X SD model specification that being exactly of need to doing provides when mutual between two application systems and complete or collected works' model specification (IEC cim_1968_61970) of standard are done verification, if there is incongruent place, to feed back in time and participate in mutual application system, as Fig. 4,
And for model consistency desired result can be carried out in situation as far as possible clearly in semantic information, what first need is exactly the complete or collected works OWL model specification of a standard, by the XSD2OWL shown in Fig. 4, with IEC cim_61968_61970 as input, can obtain the complete or collected works OWL model specification of a standard, as Fig. 5; The agent model XSD that outer application system is submitted to, is converted into the OWL of subset, as Fig. 6;
In the enough situations clearly of semantic information, how to realize now the checking of subset OWL and complete or collected works OWL, Protege OWL Api is for the API of OWL operation, can realize efficiently the establishment of OWL document, inquiry, additions and deletions are changed, on its basis, can be by the hierarchical relationship in OWL, attribute constraint etc. semantic information extracts, and the consistency checking of subset OWL and complete or collected works OWL is carried out, as Fig. 7 at semantic hierarchies;
Conversion is generated to OWL, minimum complete unit is class, by the semantic informations such as the hierarchical relationship of each class and other classes, attribute constraint complete extract after, consistency checking between subset OWL and complete or collected works OWL easy easy enforcement that just become, under the help of Protege, can be by each class extracting after semantic information, according to class name, in complete or collected works OWL, inquire about class of the same name, if do not leave class of the same name, name and standard criterion that model in subset OWL is described are inconsistent, feedback error information; If inquired class of the same name, will do conforming relatively judgement to the direct parent of this class in the direct parent of class in subset OWL, indirect parent and complete or collected works OWL, indirect parent, if inconsistent, feedback error information, the method that attribute is retrained to conforming verification is basic with identical above, but in inconsistent situation, processing mode is more complex, each attribute of each class in subset OWL is inquired about in complete or collected works OWL attribute of the same name in class of the same name, if there is no attribute of the same name, feedback error; If there is attribute of the same name, to verify successively the span, constraint base of attribute constraint etc., if in full accord, be verified; If exist inconsistently, such as span, and the span of attribute in subset OWL constraint is in attribute span of corresponding complete or collected works OWL and so on, so also acquiescence by, the checking of constraint base is like this equally;
The framework that the power information bus that present distribution forms is middleware, information interaction between application system all will be undertaken by bus, the form of the machine-processed assembly of the conforming checking of Model for Interoperability is deployed in power information bus platform, can either supplement bus functionality, also can facilitate the enforcement of interoperability consistency checking mechanism, as Fig. 2.
Data bus of the present invention is one and forms plug-in unit, can on the basis of not restarting bus service, carry out heat dispose at each Utilities Electric Co. scene, does not affect the operation conditions of original service; Flexible configuration is convenient, can to Knowledge Verification Model, carry out seamless reduction according to the concrete situation of Utilities Electric Co.'s data, meets the check demand of various electric power system models; Verification basis is IEC61970/IEC61968 standard, meets international electric power standard; Reasonable in design, effectively solved the data validity problem of data interoperation in the electric system of current existence, have dispose simple, plug and play, flexible, the feature such as verification is accurate.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.