Disclosure of Invention
The purpose of the invention is as follows: in order to overcome the defects of the prior art, the invention provides a method for quickly constructing a transformer substation model by using an interval template based on CIM (common information model), which realizes the effect of automatically generating the transformer substation model and an in-station wiring diagram by simply configuring a plurality of parameters by pre-drawing the interval template, reduces the workload of data maintainers and improves the field data maintenance efficiency.
The technical scheme is as follows: the method for quickly constructing the transformer substation model and generating the in-station wiring diagram by using the interval template based on the CIM comprises the following steps of: 1) establishing mapping from CIM classes and attributes to a relational database; 2) establishing inter-class relation mapping of a CIM model; 3) drawing a corresponding icon of the CIM object; 4) establishing an interval template maintenance interface, and drawing an interval template; 5) and (4) establishing a templated maintenance substation interface, so that a user can select a wiring mode and an interval template and configure related parameters to call a mapping algorithm, and the generation of a substation model and an in-station wiring diagram is automatically completed based on the interval template drawn in the step 4).
Further, the step 1) specifically comprises: 11) mapping a base class IdentifiedObject in the CIM class into a table, wherein the table name is the same as the class name, mapping the attribute of the class into a list with the same name, and using mRID as a main key of the table; 12) and when mapping the derived classes, directly converting the derived classes into a relation table, converting non-inherited attributes into a table column, only preserving mRID for inherited attributes, converting the mRID into the table column, taking the mRID column as a main key of the current relation table, using the main key as a foreign key, referring to the mRID column of a corresponding table of a parent class of the mRID, and setting cascade deletion and update constraints for the reference.
Further, the step 2) specifically comprises: 21) analyzing the relationship among CIM classes, three relationships among CIM classes can be known: inheritance/generalization, aggregation, and simple association; 22) for inheritance/generalization relationships, this has been done in step (12); 23) regarding the aggregation relation, the aggregation relation is regarded as that an integral object contains or has 0, 1 or a plurality of partial objects, when the integral object is mapped to the relation among tables, the integral object is simply regarded as a one-to-many relation, and the partial object corresponding table is added with an external key and quoted to a main key of the integral object corresponding table; when the whole object is responsible for controlling the life cycle of part of objects, setting cascade deletion constraint for the main foreign key relation, if the life cycle control is not carried out on part of objects, adding 'setting null' constraint for deletion; 24) for the simple association relationship, when the relationship between the classes is 'one-to-one' association, according to the reference frequency of the application scene, setting the foreign key in a table with higher reference frequency in the two associated tables, and if the reference frequency of the two tables is greater than a specific threshold value, adding the foreign key in the two associated tables to provide bidirectional association; for the association mapping of 'one-to-many', the foreign key is set in the 'multi-terminal' corresponding table; for the association mapping of 'many-to-many', an association table is introduced, two external keys are arranged in the association table, and the main keys of the two association class corresponding tables are respectively referred; the reference relationships between tables employ cascading constraints to maintain data integrity and consistency.
Further, the step 3) specifically comprises: 31) counting and analyzing all CIM classes required by the establishment of the transformer substation model and needing to draw corresponding icons; 32) and statistically analyzing all the terminal information and the icon styles of the CIM classes needing drawing the corresponding icons, and drawing the corresponding icons.
Further, the step 4) specifically comprises: 41) developing an implementation template editor; in a tool box of a developed template editor, providing all CIM object corresponding icons drawn in the step 3), dragging the CIM object corresponding icons to a scene, and establishing a topological connection relation between the icons to finish drawing of an interval template; after the drawing is finished, clicking a menu of 'saving as a template' to save the drawn transformer substation interval as an interval template; 42) and (4) carrying out statistical analysis on typical wiring modes of the transformer substation intervals, and drawing an interval template.
Further, the step 5) specifically comprises: 51) developing a user interface for realizing templated maintenance of the transformer substation, and automatically completing generation of a transformer substation model and an in-station wiring diagram by selecting a voltage grade, a wiring mode corresponding to the voltage grade, interval templates and the number of each bus segment, inter-bus-to-bus interval templates and main transformer types and the number and calling a layout algorithm; 52) the method comprises the following steps of establishing a transformer substation by using a templated maintenance transformer substation interface, wherein the method specifically comprises the following steps: 521) determining the number of voltage grades, reference voltage and a bus wiring mode; clicking an icon corresponding to the newly-added voltage grade in the voltage grade maintenance; selecting a reference voltage of a voltage grade and a bus wiring mode; configuring a numbering rule of a bus; if a plurality of bus sections will appear in the table by selecting the sectional bus, each bus section can be operated separately; 522) maintaining the interval type and the interval number of each bus or each bus section under the voltage class; clicking an operation button of the bus section in the table to add a new row of intervals for configuring the template type and the template number of the intervals, or clicking an operation button for deleting to delete the interval template; each bus-section can be configured with a plurality of different bay types; 523) maintaining the type of the transformer, the name of the transformer and the topological connection between the transformer and the bus; clicking an icon corresponding to the newly added transformer in the transformer maintenance, and maintaining the name and the model of each transformer; respectively connecting the windings of the transformer to corresponding voltage levels, selecting whether the windings are connected to the outgoing line intervals of the corresponding voltage levels, and automatically maintaining the topology of the transformer after maintenance; if the bus contains multiple segments, then the topology is correctly created after associating the transformer windings with the outgoing line spacing of a particular bus segment.
Has the advantages that: compared with the prior art, the method is based on the IEC61970 CIM standard, solves the problem of power grid system modeling standardization, and establishes a standardized power grid system model by adopting a standardized modeling method, so that the method improves the development efficiency of power grid application software and promotes interconnection and intercommunication among systems. Meanwhile, the invention can efficiently and normatively establish a standard transformer substation model and generate an in-station wiring diagram, can improve the data maintenance efficiency, saves resources and reduces the maintenance cost of the basic data of the power grid.
Detailed Description
The invention is further described with reference to the following detailed description of embodiments and drawings.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
In the present invention, terms such as "upper", "lower", "left", "right", "front", "rear", "vertical", "horizontal", "side", "bottom", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only terms of relationships determined for convenience of describing structural relationships of the parts or elements of the present invention, and are not intended to refer to any parts or elements of the present invention, and are not to be construed as limiting the present invention.
In the present invention, terms such as "fixedly connected", "connected", and the like are to be understood in a broad sense, and mean either a fixed connection or an integrally connected or detachable connection; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be determined according to specific situations by persons skilled in the relevant scientific or technical field, and are not to be construed as limiting the present invention.
As introduced by the background technology, most of existing software is not modeled based on a CIM standard, or a user is required to manually edit a power system station wiring diagram, and in the face of numerous stations and equipment, the situations of large maintenance workload and high possibility of errors exist. According to the method, the inter-station interval template is drawn in advance, then the wiring mode and the interval template are selected and relevant parameters are configured, the standard transformer substation model is efficiently and normatively established, and the inter-station wiring diagram is generated, so that the data maintenance efficiency is improved, the resources are saved, and the maintenance cost of the basic data of the power grid is reduced.
Specifically, the method for quickly constructing the transformer substation model and generating the in-station wiring diagram by using the interval template based on the CIM comprises the following steps of:
step 1): establishing mapping from CIM classes and attributes to a relational database;
in the class of CIM models, the IdentifiedObject class is the base class for almost all model types. The class establishes a naming system for the derived class object, the mrID attribute of the class object is the identifier of the object and requires global uniqueness, and the name attribute represents the name of the object and does not require uniqueness. In the inheritance system of the class, the derived class can define the attribute and the association of the derived class, and inherits the attribute and the association of the base class. The leaf node classes in the inheritance hierarchy will have the properties and associations of all classes on the inheritance chain. If only the leaf node classes are converted into tables in the relational database, all the associations between the classes can be dropped to the leaf nodes, and the association complexity between the leaf node classes is increased. Thus, in addition to mapping leaf node classes into tables, other abstract classes are also mapped into tables.
The method specifically comprises the following steps:
11) mapping the IdentifiedObject of the base class into a table, wherein the table name is the same as the class name, mapping the attribute of the class into a list with the same name, and taking mRID as a main key of the table;
12) and other CIM classes are all derived classes of the IdentifiedObject class, when the derived classes are mapped, the derived classes are directly converted into the relation table, local attributes (non-inherited attributes) are converted into the table columns, only the mRID is reserved for the inherited attributes, the mRID is converted into the table columns, the mRID columns are used as main keys of the current relation table, the main keys are also external keys at the same time, the mRID columns of the corresponding tables of the parent classes are referred, and cascade deletion and update constraints are set for the reference.
Step 2): establishing inter-class relation mapping of a CIM model; the method specifically comprises the following steps:
21) analyzing the relationship among CIM classes, three relationships among CIM classes can be known: inheritance/generalization, aggregation and simple association, as shown in FIG. 1;
22) for inheritance/generalization relationships, the mapping of CIM classes to relational databases is completed, see step 12);
23) for the aggregation relationship, a whole object can be regarded as containing or having a plurality of (also can be 1 or 0) partial objects, and when the relation is mapped to the table, the relation can be simply regarded as a one-to-many relation, so that an external key can be added into a partial object corresponding table and is referred to a main key of the whole object corresponding table; when the whole object is responsible for controlling the life cycle of part of objects, setting cascade deletion constraint for the main foreign key relation, if the life cycle control is not carried out on part of objects, adding 'setting null' constraint for deletion;
24) for the simple association relationship between the class objects, when the relationship between the classes is 'one-to-one' association, the foreign key needs to be set in a table with higher reference frequency according to the reference frequency of the application scene, and if the reference frequencies are both higher, the foreign key can be added in both the associated tables to provide bidirectional association; for the 'one-to-many' association mapping, the external key is arranged in a 'multi-end' corresponding table, for example, one transformer substation can supply power to a plurality of feeder lines, and a plurality of feeder lines can share one power supply transformer substation, so that the external key is added into the feeder line table, and the main key of the transformer substation table is referred; the 'many-to-many' association mapping needs to be introduced into an association table, two external keys are arranged in the association table, and the two external keys refer to the main keys of the two association class corresponding tables respectively; the reference relationships between tables employ cascading constraints to maintain data integrity and consistency.
Step 3): drawing a corresponding icon of the CIM object; the method specifically comprises the following steps:
31) counting and analyzing all CIM classes required by the establishment of the transformer substation model and needing to draw corresponding icons;
32) and statistically analyzing all the terminal information and the icon styles of the CIM classes needing drawing the corresponding icons, and drawing the corresponding icons.
Step 4): establishing an interval template maintenance interface, and drawing an interval template; the method specifically comprises the following steps:
41) developing an implementation template editor; in a tool box of a developed template editor, providing all CIM object corresponding icons drawn in the step 3), dragging the CIM object corresponding icons to a scene, and establishing a topological connection relation between the icons to finish drawing of an interval template; after the drawing is finished, clicking a menu of 'saving as a template' to save the drawn transformer substation interval as an interval template, as shown in fig. 2;
42) and (4) carrying out statistical analysis on typical wiring modes of the transformer substation intervals, and drawing an interval template.
Step 5): and (4) establishing a templated maintenance substation interface, so that a user can select a wiring mode and an interval template and configure related parameters to call a mapping algorithm, and the generation of a substation model and an in-station wiring diagram is automatically completed based on the interval template drawn in the step 4). The method specifically comprises the following steps:
51) developing a user interface for realizing templated maintenance of the transformer substation, and automatically completing generation of a transformer substation model and an in-station wiring diagram by selecting a voltage grade, a wiring mode corresponding to the voltage grade, interval templates and the number of each bus segment, inter-bus-to-bus interval templates and main transformer types and the number and calling a layout algorithm;
52) the method for creating the substation by using the templated maintenance substation interface, as shown in fig. 3, specifically includes the following sub-steps:
521) determining the number of voltage grades, reference voltage and a bus wiring mode;
clicking an icon corresponding to the newly-added voltage grade in the voltage grade maintenance; selecting a reference voltage of a voltage grade and a bus wiring mode; configuring a numbering rule of a bus; if a plurality of bus sections will appear in the table by selecting the sectional bus, each bus section can be operated separately;
522) maintaining the interval type and the interval number of each bus or each bus section under the voltage class;
clicking an operation button of the bus section in the table to add a new row of intervals for configuring the template type and the template number of the intervals, or clicking an operation button for deleting to delete the interval template; each bus-section can be configured with a plurality of different bay types;
523) maintaining the type of the transformer, the name of the transformer and the topological connection between the transformer and the bus;
clicking an icon corresponding to the newly added transformer in the transformer maintenance, and maintaining the name and the model of each transformer; respectively connecting the windings of the transformer to corresponding voltage levels, selecting whether the windings are connected to the outgoing line intervals of the corresponding voltage levels, and automatically maintaining the topology of the transformer after maintenance; if the bus contains multiple segments, then the topology is correctly created after associating the transformer windings with the outgoing line spacing of a particular bus segment.