A method and system for verifying a converter station model
Through preset rule files and SAX analysis technology, automated verification of the converter station model is realized, the problem of lack of business logic rules verification in the existing technology is solved, and the accuracy and efficiency of model verification is improved.
Patent Information
- Application Number
- CN202111277171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The prior art lacks verification methods for specific business logic rules in the model verification of converter stations, especially the verification of the correlation relationship of equipment, components and measurement point encoding depends on manual and cannot achieve automation and standardization.
The preset physical model rule files and logical model rule files are used to verify the naming, attributes, primary keys and enumeration values of the database physical tables, and the information model configuration files are parsed through SAX to verify the version number, syntax, semantics, grid resource asset rules, boundary models and topology to realize automated model verification.
It realizes automated and standardized verification of the converter station model, can accurately detect the association relationship between instantiated entities and attributes, adapt to various business types, and improves management efficiency and model stability.
Smart Images

Figure CN113987815B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of converter stations in power systems, and relates to a method and system for verifying a converter station model. Background Art
[0002] With the gradual increase in the number of converter stations, the workload of equipment operation and maintenance management has increased significantly, but there is still much room for improvement in management efficiency. Against the backdrop of new technologies such as the Internet of Things, artificial intelligence, and digital twins, intelligent devices such as 3D imaging, high-definition cameras, inspection robots, and drones have been widely used. To support the digital construction of converter stations, a unified data model of converter stations has been constructed based on SG-CIM (Common Information Model), including static information such as equipment resources, assets, and measurement points, as well as entity and attribute information in aspects such as personnel and safety. Based on the concept of "portable and replaceable" for advanced applications of digital converter stations, the model of the converter station requires a high degree of standardization. Therefore, a method for verifying the converter station model is needed to support the stable and efficient operation of the converter station.
[0003] The content of verifying the converter station model includes: Schema syntax verification, semantic verification, and verification based on power system rules. To date, various verification methods for CIM RDF model files have been proposed. For example, a network ontology language is introduced to construct an IEC61968 standard semantic information model, and the consistency verification of the IEC 61968 semantic model is carried out on the IEC 61968 standard message bus. Some scholars have also proposed to develop a model verification tool using the model interface (RDF API) and ontology interface provided by Apache Jena to achieve the semantic-level verification of the power grid model.
[0004] However, most of the above methods propose parsing and verification methods for CIM RDF files from the perspective of computer implementation, and there are few verification methods for specific business logic rules. Among them, the association relationship verification between some entity classes is even verified manually. In addition, the instantiated entities and instantiated attributes should also be important content of model verification, especially the equipment, components, and measurement point codes defined in the converter station, as well as the association relationships between them. The existing verification methods cannot achieve the verification of the above content. Summary of the Invention
[0005] The purpose of the present invention is to overcome the above-mentioned disadvantages of the prior art and provide a method and system for verifying a converter station model.
[0006] To achieve the above purpose, the present invention adopts the following technical solutions:
[0007] In the first aspect of the present invention, a method for verifying a converter station model includes the following steps:
[0008] Obtain the physical tables of the converter station database, and according to the preset physical model rule file, perform the verification of the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumeration values of the database physical tables to obtain the physical model verification result;
[0009] Obtain the information model configuration file of the converter station and parse it to obtain the parsed file; and according to the preset logical model rule file, perform the verification of the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the parsed file to obtain the logical model verification result;
[0010] Take the physical model verification result and the logical model verification result as the converter station model verification result and output it.
[0011] A further improvement of the converter station model verification method of the present invention lies in:
[0012] The specific method for performing the verification of the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumeration values of the database physical tables is as follows: Obtain the physical table naming of the database physical table, and compare the physical table naming of the database physical table with the physical table naming in the preset physical model rule file. If they are the same, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal; Obtain the physical table attributes of the database physical table, and compare the physical table attributes of the database physical table with the physical table attributes in the preset physical model rule file. If they are the same, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal; According to the non-null fields set in the preset physical model rule file, verify whether the non-null fields in the database physical table are null. When the non-null fields in the database physical table are null, the non-null element verification is abnormal; otherwise, the non-null element verification is normal; According to the primary key fields set in the preset physical model rule file, obtain the primary key identifier of the database physical table, and detect whether the main resource identifier attribute in the database physical table has the primary key identifier. When the main resource identifier attribute has the primary key identifier, the physical table primary key verification is normal; otherwise, the physical table primary key verification is abnormal; Obtain the enumeration value table in the database physical table, and judge whether the data in the enumeration value table is non-null according to the main resource identifier, name, and alias attributes of the enumeration value table. When the data in the enumeration value table is not non-null, the physical table enumeration value verification is normal; otherwise, the physical table enumeration value verification is abnormal.
[0013] When obtaining and parsing the information model configuration file of the converter station, the SAX parsing method is adopted.
[0014] The specific method for performing the verification of the version number of the parsed file is as follows: Obtain the version number of the parsed file, and compare the version number of the parsed file with the version number in the preset logical model rule file. If they are the same, the version number verification is normal; otherwise, the version number verification is abnormal.
[0015] The verification of the syntax of the parsing file includes format detection, root element detection, and namespace detection. Among them, the specific method of format detection is: obtaining the element tags in the parsing file and determining whether the element tags are consistent with the tags in the preset logical model rule file; the specific method of root element detection is: obtaining the root element information in the parsing file and determining whether the root element information is the preset root element value in the preset logical model rule file; the specific method of namespace detection is: obtaining the namespace information in the parsing file and determining whether the namespace information is consistent with the namespace information in the preset logical model rule file. When the element tags are consistent with the tags in the preset logical model rule file, the root element information is the preset root element value in the preset logical model rule file, and the namespace information is consistent with the namespace information in the preset logical model rule file, the syntax verification is normal; otherwise, the syntax verification is abnormal. The verification of the semantics of the parsing file includes class declaration detection, attribute declaration detection, and relationship declaration detection. Among them, the specific method of class declaration detection is: obtaining the entity classes in the parsing file and comparing them with several preset entity classes in the logical model rule file to determine whether the entity classes in the parsing file exist in the logical model rule file; the specific method of attribute declaration detection is: obtaining the attributes of each entity class in the parsing file and comparing them with several preset attributes under the same entity class in the logical model rule file to determine whether the attributes of each entity class in the parsing file exist in the logical model rule file; the specific method of relationship declaration detection is: obtaining the logical relationships of each entity class in the parsing file and comparing them with several preset logical relationships under the same entity class in the logical model rule file to determine whether the logical relationships of each entity class in the parsing file exist in the logical model rule file. When the entity classes in the parsing file exist in the logical model rule file, the attributes of each entity class in the parsing file exist in the logical model rule file, and the logical relationships of each entity class in the parsing file exist in the logical model rule file, the semantic verification is normal; otherwise, the semantic verification is abnormal.
[0016] The verification of the grid resource asset rules for parsing files includes element verification, verification of the correctness of association relationships, verification of the standardization of equipment / components, verification of the standardization of measuring points, and verification of the standardization of in-station geographical areas. Among them, the specific method of element verification is as follows: obtain the classes that must be exported according to the logical model rule file, traverse each element in the parsing file, and determine whether the classes that must be exported exist in the parsing file; the specific method of verifying the correctness of association relationships is as follows: obtain the equipment logical relationship attributes that must exist according to the logical model rule file, traverse each element in the parsing file, and determine whether the equipment logical relationship attributes that must exist exist in the parsing file; the specific method of verifying the standardization of equipment / components is as follows: obtain the Chinese and English name information of each equipment / component in the parsing file, and compare it with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file to determine whether the Chinese and English name information of each equipment / component in the parsing file is consistent with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file; the specific method of verifying the standardization of measuring points is as follows: obtain the measuring point information under the entity classes of analog quantity class, discrete quantity class, string quantity class, and cumulative quantity class in the parsing file, and compare each piece of measuring point information with the corresponding preset measuring point information in the logical model rule file one by one, and determine whether each piece of measuring point information is consistent with the corresponding preset measuring point information in the logical model rule file; the specific method of verifying the standardization of in-station geographical areas is as follows: obtain the geographical area information of each geographical area in the parsing file, and compare it with the preset geographical area information of each geographical area in the logical model rule file to determine whether the geographical area information of each geographical area in the parsing file is consistent with the preset geographical area information of each geographical area in the logical model rule file; when the classes that must be exported exist in the parsing file, the equipment logical relationship attributes that must exist exist in the parsing file, the Chinese and English name information of each equipment / component in the parsing file is consistent with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file, each piece of measuring point information is consistent with the corresponding preset measuring point information in the logical model rule file, and the geographical area information of each geographical area in the parsing file is consistent with the preset geographical area information of each geographical area in the logical model rule file, the verification of the grid resource asset rules is normal; otherwise, the verification of the grid resource asset rules is abnormal.
[0017] The verification of the boundary model for parsing files includes entity class detection, container class detection, and primary-secondary equipment association relationship detection. Among them, the specific method for entity class detection is as follows: Obtain the entity classes corresponding to entity objects of each preset type in the converter station in the parsing file, and the modeling rules for entity objects of each preset type in the converter station in the logical model rule file; and determine whether the entity classes corresponding to entity objects of each preset type satisfy the modeling rules for entity objects of each preset type. The specific method for main container class detection is as follows: Obtain the entity classes corresponding to container class objects of each preset type in the converter station in the parsing file and their ownership relationships with equipment, and the ownership relationships between container class objects of each preset type and equipment in the converter station in the logical model rule file; and determine whether the entity classes corresponding to container class objects of each preset type in the converter station in the parsing file and their ownership relationships with equipment are consistent with the ownership relationships between container class objects of each preset type and equipment in the converter station in the logical model rule file. The specific method for primary-secondary equipment association relationship detection is as follows: Obtain the association relationship between secondary equipment and primary equipment in the converter station in the parsing file, and the measurement ownership relationship rule for primary-secondary equipment in the logical model rule file, and determine whether the association relationship between secondary equipment and primary equipment in the converter station in the parsing file satisfies the measurement ownership relationship rule for primary-secondary equipment in the logical model rule file. When the entity classes corresponding to entity objects of each preset type satisfy the modeling rules for entity objects of each preset type, the entity classes corresponding to container class objects of each preset type and their ownership relationships with equipment are consistent with the ownership relationships between container class objects of each preset type and equipment in the converter station in the logical model rule file, and the association relationship between secondary equipment and primary equipment in the converter station in the parsing file satisfies the measurement ownership relationship rule for primary-secondary equipment in the logical model rule file, the boundary model verification is normal; otherwise, the boundary model verification is abnormal.
[0018] The verification of the topology of the parsed file includes topology connectivity verification, multi-terminal device verification, and device terminal floating verification; among them, the specific method of topology connectivity verification is: obtain the information of the intervals in the converter station in the parsed file, as well as the terminal information and connection point information of each conductive device in the interval, and judge whether the terminals of each conductive device in the interval are associated with the connection point and whether all conductive devices in the interval are connected according to the terminal information and connection point information of each conductive device in the interval; the specific method of multi-terminal device verification is: according to the terminal information and connection point information of each conductive device in the interval, when the number of terminals of the current conductive device is greater than 2, judge whether the connection points of the current conductive device are the same connection point; the specific method of device terminal floating verification is: according to the terminal information and connection point information of each conductive device in the interval, judge whether the current conductive device is connected to the connection point and whether the connection point is connected to other devices; when the terminals of each conductive device in the interval are associated with the connection point, all conductive devices in the interval are connected, when the number of terminals of the conductive device is greater than 2, the connection points of the conductive device are not the same connection point, and the conductive device is connected to the connection point or the connection point is connected to other devices, the topology verification is normal; otherwise, the topology verification is abnormal.
[0019] It also includes: obtaining the physical model rule file modification information and modifying the preset physical model rule file according to the physical model rule file modification information; obtaining the logical model rule file modification information and modifying the preset logical model rule file according to the logical model rule file modification information; visually displaying the physical model verification result, the parsed file, and the logical model verification result.
[0020] In the second aspect of the present invention, a converter station model verification system includes:
[0021] A physical model verification module, configured to obtain the physical database tables of the converter station and perform verification on the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumerated values of the physical database tables according to the preset physical model rule file, so as to obtain a physical model verification result;
[0022] A logical model verification module, configured to obtain the information model configuration file of the converter station and parse it to obtain a parsed file; and perform verification on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the parsed file according to the preset logical model rule file, so as to obtain a logical model verification result;
[0023] A result output module, configured to output the physical model verification result and the logical model verification result as the converter station model verification result.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] The method for validating the converter station model of the present invention performs validation on the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumerated values of the physical tables in the database of the converter station through a preset physical model rule file, thereby realizing physical model validation; and performs validation on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the information model configuration file of the converter station through a preset logical model rule file, thereby realizing logical model validation. Among them, through the validation of grid resource asset rules, boundary model, and topology, the validation of the device component model and geographical area model is realized, and deeper-level model validation is completed. At the same time, based on the configurability of the physical model rule file and the logical model rule file, it can adapt to model detection under various business types. For instantiated entities and instantiated attributes, as well as the devices, components, and measurement point codes defined by the converter station, and the association relationships between them, accurate automated validation can be achieved by configuring the physical model rule file and the logical model rule file. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of the method for validating the converter station model according to an embodiment of the present invention;
[0027] Figure 2 It is a schematic diagram of the relationship between the devices / components of the converter station and the measurement points;
[0028] Figure 3 It is a detailed flowchart of the method for validating the converter station model according to an embodiment of the present invention;
[0029] Figure 4 It is a structural block diagram of the converter station model validation system according to an embodiment of the present invention;
[0030] Figure 5 It is a structural block diagram of the converter station model validation system according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] The present invention will be further described in detail below with reference to the drawings:
[0034] See Figure 1 , in an embodiment of the present invention, a method for verifying a converter station model is provided, which realizes physical model verification and syntax verification, semantic verification, grid resource asset rule verification, boundary model verification and topology verification of the logical model file, and supports the standardization and correctness verification of the converter station model. Specifically, the method for verifying the converter station model includes the following steps.
[0035] S1: Obtain the physical tables of the database of the converter station, and perform verification on the physical table naming, physical table attributes, non-null elements, physical table primary keys and physical table enumerated values of the physical tables of the database according to the preset physical model rule file, so as to obtain the physical model verification result.
[0036] S2: Obtain the information model configuration file of the converter station and parse it to obtain a parsed file; and perform verification on the version number, syntax, semantics, grid resource asset rules, boundary model and topology of the parsed file according to the preset logical model rule file, so as to obtain the logical model verification result.
[0037] S3: Output the physical model verification result and the logical model verification result as the converter station model verification result.
[0038] First, in this embodiment, the specific content of the converter station information model is introduced.
[0039] Based on the SG-CIM unified data model, the converter station constructs a converter station data model. The model objects include devices or systems such as transformers, circuit breakers, converter transformers, synchronous condensers, fire protection systems and valve hall water cooling systems, describe the attributes of device grid resources and device assets, etc., and clarify the unique name, ID identifier, data type, whether it is a primary key, whether it is non-null of the attribute elements. The Chinese name is only used to describe the Chinese meaning of the information, and the naming format refers to GB / T 33601. Other requirements are as follows:
[0040] (1) The English names of equipment objects, components, and measurement point objects shall be defined according to the terms, and the equipment, component, or measurement point shall be uniquely identified by an English name with practical meaning.
[0041] (2) The naming of physical tables shall follow the English naming rules, and the naming format shall be "Abbreviation of Subject Area_Table Name". The "Abbreviation of Subject Area" shall be in uppercase, the table name shall adopt the camel case structure, and the total length shall not exceed 30 characters; English words shall preferably use common words. When an English word is too long, appropriate abbreviations can be used. For complex phrases, the first letter of each word can be combined into an abbreviated word. If the English name has only one word, it is required not to use abbreviations but to use the complete word. Each subject area shall follow the "Q / GDW 10703 State Grid Corporation of China Common Information Model (SG-CIM)".
[0042] (3) The naming format of the English names of equipment entities and attributes shall be consistent with the English names of the entity attributes in the SG-CIM logical model. For the content not covered, it shall be executed according to the naming format of the entity attributes in the logical model, and the content shall be extended by itself. The English names of the model entity attributes shall adopt the camel case structure.
[0043] (4) The English names of entity attributes, components, and measurement points shall preferably use the full English name. The length of the English field name shall not exceed 32 characters. When the full English name exceeds 32 characters, abbreviations shall be used. The English name of the component shall adopt the camel case structure, with the first letter in uppercase.
[0044] (5) The equipment measurement points shall be identified by the method of "Equipment ID + Component + Unique English Name of Measurement Point". When there are two or more similar components or measurement points, two-digit numbers shall be used as the suffix, and the number range is "1 - 99". If the measurement point comes from different equipment or systems, the identification information of the equipment where the measurement point comes from shall be carried. The converter station data model follows the DL / T890.301 and DL / T 1080.11 specifications. Therefore, the model file shall also follow the requirements of DL / T 890.501-2007, the grammar shall meet the Schema verification rules, and the semantics shall comply with the CIM vocabulary. For the power system resource part, the hierarchical relationship and the association relationship shall meet the logical rules of the power system resources; for the power system asset part, the hierarchical relationship and the association relationship shall meet the logical rules of the power system equipment assets.
[0045] In addition, on the basis of DL / T 890.301 and DL / T 1080.11, the converter station data model has been further extended according to business requirements, and the extended content is as follows:
[0046] (1) Measurement type extension. In the IEC 61970-301 standard, there is a clear definition for the measurement model, but the modeling granularity is relatively coarse. The measurement model is only divided into four categories: analog quantity, discrete quantity, cumulative quantity, and string quantity. For measurement points, there is no complete model modeling rule defined, but the measurement type is used to distinguish the sub-categories of measurements, which is quite different from the definition of the measurement point model in the automation system. In IEC61970-301 CIM 15, more than 20 types of measurement types are defined. Most of these measurement types describe the power grid topology information, do not involve data such as device telemetry and tele-signaling, nor include protection information, and even less the information collected by the auxiliary equipment monitoring system, which completely cannot meet the application of the converter station data model. Therefore, the measurement type is extended. The measurement type is extended based on the IEC61970-301 domain package, the data name description extension in Chapter 6 of IEC 61850 7-4, and business requirements.
[0047] (2) Standardized splitting and coding of equipment components.
[0048] The equipment components are split into three levels (level 0, level 1, level 2, level 3), and a unique digital code within the converter station is assigned to the equipment components according to Table 1.
[0049] Table 1 Schematic diagram of the splitting and coding of converter station equipment components
[0050]
[0051] (3) Standardized naming and representation of measurement points.
[0052] The measurements in the converter station are identified with standardized Chinese and English names. The Chinese naming follows the GB / T33601-2017 "Specification for Naming of General Model Data of Power Grid Equipment". An example of the measurement point naming is "Power Grid / Substation / Voltage Level. Bay. Equipment / Component. Attribute". The English naming uses a camel case English combination, with the first letter in lowercase, and the English name of the measurement is unique under the equipment.
[0053] (4) Association relationship between measurement points and equipment components.
[0054] See Figure 2 , the converter station model extension defines the association relationship between the measurement points and components in the converter station. The measurement points are attached to the equipment / components, and each measurement point includes a standardized Chinese name, English name, and measurement type.
[0055] The requirements for model verification are as follows. The configuration file of the converter station information model adopts the CIM RDF file format. CIM RDFSchema is applied to IEC 61970-501 as a meta-model framework to construct XML files, which contain power system model information and allow the definition of application-specific vocabularies to describe the classes, attributes of classes, and relationships between classes in CIM. The syntax of the document adopts the CIM XML format.
[0056] DL / T 890.501-2007 "Energy Management System Application Programming Interface (EMS-API) Part 501: Resource Description Framework (CIM RDF) Schema for Common Information Model" details the mapping relationship between the conceptual model represented by the Unified Modeling Language (UML) in DL / T 890.301 and the XML language. The conceptual model classes defined by UML in DL / T 1080.11-2015 "Power Enterprise Application Integration Distribution Management System Interface Part 11: Distribution Common Information Model" can also be mapped to the XML language to express the classes, attributes, and relationships represented by the conceptual model through XML.
[0057] Based on the above specific introduction of the converter station information model, in a possible implementation, the specific method for obtaining the physical tables of the converter station's database is as follows: Read the physical tables of the converter station's database through the QPSQL interface and store them. Among them, the physical model rule file defines the rules for the standardized physical table names, physical table attribute fields, non-null fields, primary key fields, and enumeration value tables required in the physical model. Among them, the enumeration value tables are the PSRType table and the AssetType table.
[0058] In a possible implementation manner, the specific method for verifying the physical table naming, physical table attributes, non-null elements, physical table primary key, and physical table enumerated values of the database physical table is as follows: Obtain the physical table naming of the database physical table, and compare the physical table naming of the database physical table with the physical table naming in the preset physical model rule file. If they are the same, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal. Obtain the physical table attributes of the database physical table, and compare the physical table attributes of the database physical table with the physical table attributes in the preset physical model rule file. If they are the same, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal. According to the non-null fields set in the preset physical model rule file, verify whether the non-null fields in the database physical table are null. When the non-null fields in the database physical table are null, the non-null element verification is abnormal; otherwise, the non-null element verification is normal. According to the primary key fields set in the preset physical model rule file, obtain the primary key identifier of the database physical table, and detect whether the main resource identifier attribute in the database physical table has the primary key identifier. When the main resource identifier attribute has the primary key identifier, the physical table primary key verification is normal; otherwise, the physical table primary key verification is abnormal. Obtain the PSRType table and AssetType table in the database physical table, and judge whether the data in the PSRType table and AssetType table is non-null according to the main resource identifier, name, and alias attributes of the PSRType table and AssetType table. When the data in the PSRType table and AssetType table is not non-null, the physical table enumerated value verification is normal; otherwise, the physical table enumerated value verification is abnormal.
[0059] Among them, the specific implementation manner of the physical table naming verification is: By obtaining the database physical table of the converter station and comparing it with the preset physical model rule file, the physical table naming is compared. Among them, the physical table naming uses English naming, and the naming format uses the format of "subject domain abbreviation_table name", where the "subject domain abbreviation" is in uppercase and the table name uses the camel case structure. The specific implementation manner of the physical table attribute verification is: Obtain the database physical table of the converter station and compare it with the preset physical model rule file to check whether the physical table attributes are the same. The specific implementation manner of the non-null element verification is: Read the database physical table and check whether the non-null parts required in the physical table rule file are non-null through non-null tests. The specific implementation manner of the physical table primary key verification is: Read the primary and foreign key identifiers of the database physical table and check whether the "main resource identifier" attribute in the table has the primary key identifier. The specific implementation manner of the physical table enumerated value verification is: Read the database physical table, check whether there are PSRType table and AssetType table, and then read the "main resource identifier", "name", and "alias" attributes of the PSRType table and AssetType table to judge whether the data in these two tables is non-null.
[0060] In a possible implementation, when obtaining and parsing the information model configuration file of the converter station, the SAX parsing method is adopted. While reading the information model configuration file, it is processed simultaneously, quickly parsing the information model configuration file in XML format. Preferably, visual display can also be performed simultaneously. Among them, SAX, whose full name is Simple API for XML, is both an interface and a software package. It is an alternative method for XML parsing. Different from DOM parsing, SAX scans the document line by line and parses it while scanning. Since the application only checks the data when reading the data, there is no need to store the data in memory, which is a great advantage for parsing large documents.
[0061] In a possible implementation, the specific method for verifying the version number of the parsed file is as follows: Obtain the version number of the parsed file, compare the version number of the parsed file with the version number in the preset logical model rule file. If they are the same, the version number verification is normal; otherwise, the version number verification is abnormal. Specifically, verify whether the value of the "rdf:Description" attribute in the parsed file matches the version number in the logical model rule file.
[0062] In a possible implementation, the verification of the syntax of the parsed file includes format detection, root element detection, and namespace detection; among them, the specific method for format detection is: Obtain the element tags in the parsed file and determine whether the element tags are the same as the tags in the preset logical model rule file; the specific method for root element detection is: Obtain the root element information in the parsed file and determine whether the root element information is the preset root element default value in the logical model rule file; the specific method for namespace detection is: Obtain the namespace information in the parsed file and determine whether the namespace information is the same as the namespace information in the preset logical model rule file; when the element tags are the same as the tags in the preset logical model rule file, the root element information is the preset root element default value in the logical model rule file, and the namespace information is the same as the namespace information in the preset logical model rule file, the syntax verification is normal; otherwise, the syntax verification is abnormal.
[0063] Specifically, for the format detection, by reading and parsing the file, extracting the element tags in the parsed file, and comparing them with the tags in the logical model rule file, it is verified whether the tags in the parsed file are consistent with the tags defined in the logical model rule file. Extract the elements and attributes from the parsed file, compare them with the elements and attributes defined in the logical model rule file, and verify whether the elements and attributes in the parsed file are correct; mark the order in which the elements and attributes appear, compare it with the order in which the elements and attributes appear in the parsed file, and verify whether the order of the elements and attributes is correct; read the attribute values of the elements required to be non-empty in the logical model rule file, and determine whether the attribute values of the elements are "Null" to verify whether each element is empty; read the data types of the values of each element and attribute in the parsed file, compare them with the definitions of the data types of the elements and attributes in the logical model rule file, and verify whether the data types of the elements and attributes are consistent with the requirements. For the root element detection, extract the root element information from the parsed file and determine whether the root element in the model file is <rdf:rdf>, check whether the root element in the verification and parsing file is in accordance with <rdf:rdf>Definition. The namespace detection extracts the xmlns:cim and xmlns:rdf attribute declaration information of the root element in the parsed file, compares it with the logical model rule file, and verifies whether the xmlns:cim and xmlns:rdf attribute declarations are correct. For example, it verifies whether the namespace of xmlns:cim is "xmlns:cim = \"http: / / iec.ch / TC57 / 2017 / CIM-schema-cim17#\"" and whether the namespace of xmlns:rdf is "xmlns:rdf = \"http: / / www.w3.org / 1999 / 02 / 22-rdf-syntax-ns#\"".
[0064] In a possible implementation manner, the verification of the semantics of the parsed file includes class declaration detection, attribute declaration detection, and relationship declaration detection. Among them, the specific method of class declaration detection is: obtain the entity classes in the parsed file, compare them with several preset entity classes in the logical model rule file, and determine whether the entity classes in the parsed file exist in the logical model rule file; the specific method of attribute declaration detection is: obtain the attributes of each entity class in the parsed file, compare them with several preset attributes under the same entity class in the logical model rule file, and determine whether the attributes of each entity class in the parsed file exist in the logical model rule file; the specific method of relationship declaration detection is: obtain the logical relationships of each entity class in the parsed file, compare them with several preset logical relationships under the same entity class in the logical model rule file, and determine whether the logical relationships of each entity class in the parsed file exist in the logical model rule file; when the entity classes in the parsed file exist in the logical model rule file, the attributes of each entity class in the parsed file exist in the logical model rule file, and the logical relationships of each entity class in the parsed file exist in the logical model rule file, the semantic verification is normal; otherwise, the semantic verification is abnormal.
[0065] Specifically, for the class declaration detection, that is, the device entities appearing in the model file must have corresponding classes in the model specification. Write the classes defined in the model specification into the logical model rule file, read and parse the entity classes in the file, search for the classes in the logical model rule file, and check whether the entity classes exist in the logical model rule file. If they exist, the verification passes; if not, an error of missing entity classes is reported. For the attribute declaration detection, that is, the basic type attributes of the devices appearing in the model file must have attribute definitions in the corresponding classes of the model specification file, or in the classes with inheritance relationships. Write the attributes defined in the model specification into the logical model rule file, read the attributes of each entity class in the parsed file, search for the attributes under the entity classes in the logical model rule file, and check whether a certain attribute under the entity class exists in the logical model rule file. If it exists, the verification passes; if not, an error of missing attributes is reported. For the relationship declaration detection, the logical relationship attributes of the device entity classes in the model file must have definitions of logical relationships in the corresponding classes of the model specification, or in the classes with inheritance relationships. Write the logical relationships defined in the model specification into the logical model rule file, read the logical relationships of each entity class in the parsed file, search for the logical relationship expressions under the entity classes in the logical model rule file, and judge whether a certain logical relationship under the entity class exists in the logical model rule file. If it exists, the verification passes; otherwise, an error of missing logical relationships is reported.
[0066] In a possible implementation manner, the verification of the grid resource asset rules of the parsed file includes element verification, verification of the correctness of association relationships, verification of the standardization of devices / components, verification of the standardization of measuring points, and verification of the standardization of in-station geographical areas.
[0067] Among them, the specific method of element verification is: obtain the classes that must be exported according to the logical model rule file, traverse each element in the parsed file, and judge whether the classes that must be exported exist in the parsed file. Specifically, for the element verification, that is, the classes that must be exported required by the model specification, these classes should be instantiated once in the model file. Express the classes that must be exported required by the model specification in the logical model rule file, read the parsed file, traverse the elements, and search for whether each class that must be exported exists in the parsed file.
[0068] The specific method for checking the correctness of the association relationship is: obtain the device logical relationship attributes that must exist according to the logical model rule file, traverse each element in the parsed file, and determine whether the device logical relationship attributes that must exist exist in the parsed file. Specifically, the correctness check of the association relationship requires that the logical relationship attribute value of the device in the model file cannot be empty, the class corresponding to the logical relationship attribute must be defined in the model specification, and the value referenced by the logical relationship attribute must be consistent with the type defined in the model specification. Write the logical relationship attribute value of the device defined in the model specification into the logical model rule file as a basis for verification. Read the parsed file, traverse the elements, read the information defined in the logical model rule file that requires the device logical relationship to be non-empty, and find out whether each device logical relationship attribute that must exist is non-empty in the model file. If it is non-empty, read the value referenced by the logical relationship attribute again, and search in the parsed file. The type corresponding to the value referenced by the logical relationship attribute exists, and perform fuzzy matching of Chinese semantics on the logical relationship attribute and the corresponding type.
[0069] The specific method for checking the standardization of equipment / components is as follows: obtain the Chinese and English name information of each equipment / component in the parsed file, and compare it with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file, and determine whether the Chinese and English name information of each equipment / component in the parsed file is consistent with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file. Specifically, the standardization check of the equipment / components is to write the standardized splitting, Chinese and English naming and component coding data of the equipment by the converter station into the logical model rule file, extract the Chinese and English name information of the component entity class from the parsed file, and retrieve each component information by the English name, and compare it with the corresponding component in the logical model rule file to verify whether the name of the equipment component is standardized and whether the component coding is standardized. Traverse the model file to check whether the component coding is unique in the parsed file.
[0070] The specific method for measuring point standardization verification is to obtain the measuring point information under the analog quantity class, discrete quantity class, string quantity class, and cumulative quantity class entity class in the parsed file, and compare each measuring point information with the corresponding preset measuring point information in the logical model rule file, and determine whether each measuring point information is consistent with the corresponding preset measuring point information in the logical model rule file. Specifically, the converter station uses standardized Chinese and English names for the measuring points, defines the measurement type of the measuring points, and defines the association between equipment / components and measuring points. Based on the above design, a unique coding rule for the measuring points is defined. The measuring point standardization verification is to verify the four types of elements and attributes of the analog quantity class, discrete quantity class, string quantity class, and cumulative quantity class.
[0071] Write the Chinese and English naming information and ID coding information of the measurement type into the logic model rule file, and judge whether the elements of PSRType in the parsing file are consistent with the logic model rule file. Read the measurement point information under the four entity classes of analog quantity class, discrete quantity class, string quantity class, and cumulative quantity class in the CIM RDF file, and perform the following measurement point verification process item by item for each measurement point information:
[0072] 1) Extract the Chinese description of each measurement point, and judge whether the measurement point name meets the naming requirements of "power grid / substation / voltage level. bay. equipment / component / attribute"; read the English name of the measurement point and verify whether it is non-empty. Read the "measurement type" attribute of each measurement point and judge whether the value of its measurement type is empty; 2) Perform fuzzy recognition of the Chinese semantics between the name of the measurement type and the Chinese name of the measurement point, judge whether the measurement type is semantically consistent with the Chinese name, and verify whether the association relationship between the equipment / component and the measurement point is correct; 3) Read the main resource identifier of the measurement point, truncate the first 24-bit code, and compare it with the equipment ID associated with the measurement point to judge whether the "equipment-measurement point" association relationship is correct; truncate the first 36-bit code and compare it with the component ID associated with the measurement point to judge whether the "equipment-component" association relationship is correct; truncate the last 8-bit code and compare it with the equipment measurement data ID defined in the model specification to verify whether the code of the measurement point is standardized.
[0073] The specific method for verifying the standardization of the geographical areas within the station is as follows: Obtain the geographical area information of each geographical area in the parsing file, and compare it with the preset geographical area information of each geographical area in the logic model rule file to judge whether the geographical area information of each geographical area in the parsing file is consistent with the preset geographical area information of each geographical area in the logic model rule file. Among them, the preset geographical areas include the fence within the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, cubicle, and sub-bay area.
[0074] Specifically, the verification of the standardization of the geographical areas within the station includes verifying the naming standardization, identification standardization, and logical relationship correctness of the fence within the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, cubicle, and sub-bay area. Enter the Chinese and English naming rules, area identification coding rules, and logical relationship attributes of the entity classes of the fence within the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, cubicle, and sub-bay area into the logic model rule file.
[0075] Among them, the naming standardization refers to obtaining the names of the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area from the parsing file; obtaining the naming rules of the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area in the logic model rule file; according to the naming rules in the logic model rule file, verifying whether the naming meets the naming rules. When it meets the rules, it passes the inspection; otherwise, naming exception information is generated and recorded. The identification standardization verification refers to obtaining the area identifications of the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area from the parsing file; obtaining the area identification coding rules of the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area in the logic model rule file; according to the area identification coding rules in the logic model rule file, verifying whether the identifications of the geographical areas in the station meet the area identification coding rules. When it meets the rules, it passes the inspection; otherwise, area identification coding exception information is generated and recorded. The correctness verification of the logical relationship, that is, verifying whether the relationship between the geographical areas and sub-geographical areas in the station is correct, refers to obtaining the logical relationship attributes between the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area from the parsing file; obtaining the logical relationship attribute rules between the inner wall of the converter station, AC yard, converter transformer area, DC yard, main control building, auxiliary control building, small room, and sub-bay area in the logic model rule file; according to the logical relationship attribute rules in the logic model rule file, verifying whether the logical relationship between the geographical areas and sub-geographical areas in the station meets the logical relationship attribute rules. When it meets the rules, it passes the inspection; otherwise, logical relationship attribute exception information is generated and recorded.
[0076] Finally, when the classes that must be exported exist in the parsing file, the device logical relationship attributes that must exist exist in the parsing file, the Chinese and English name information of each device / component in the parsing file is consistent with the preset Chinese and English name information of the corresponding device / component in the logic model rule file, each measurement point information is consistent with the corresponding preset measurement point information in the logic model rule file, and the geographical area information of each geographical area in the parsing file is consistent with the preset geographical area information of each geographical area in the logic model rule file, the grid resource asset rule verification is normal; otherwise, the grid resource asset rule verification is abnormal.
[0077] In a possible real-time mode, the verification of the boundary model of the parsing file includes entity class detection, container class detection, and primary-secondary equipment association relationship detection.
[0078] Among them, the specific method for entity class detection is as follows: Obtain the entity classes corresponding to the entity objects of each preset type in the converter station in the parsed file, and the modeling rules of the entity objects of each preset type in the converter station in the logical model rule file; and determine whether the entity classes corresponding to the entity objects of each preset type meet the modeling rules of the entity objects of each preset type. Specifically, obtain the entity classes corresponding to the main entity objects in the converter station from the parsed file, including the converter station, voltage level, bay, DC pole, and converter valve entity classes; obtain the modeling rules of the entity classes of the converter station (ConverterStation), voltage level (VoltageLevel), bay (Bay), DC pole (DCPole), and converter valve (ConValve) in the converter station in the logical model rule file; according to the entity class modeling rules in the logical model rule file, verify whether the entity classes corresponding to the main objects in the converter station meet the entity class modeling rules. When they meet, the inspection is passed; otherwise, generate abnormal information for the main entity classes and record it.
[0079] The specific method for main container class detection is as follows: Obtain the entity classes corresponding to the container class objects of each preset type in the converter station in the parsed file and their belonging relationships with the devices, and the belonging relationships between the container class objects of each preset type in the converter station and the devices in the logical model rule file; and determine whether the entity classes corresponding to the container class objects of each preset type in the converter station in the parsed file and their belonging relationships with the devices are consistent with the belonging relationships between the container class objects of each preset type in the converter station and the devices in the logical model rule file. Specifically, obtain the entity classes corresponding to the main container class objects in the converter station from the parsed file and their belonging relationships with the devices, including the belonging relationships between the converter station, voltage level, bay, DC pole and the devices; obtain the belonging relationship rules between the container classes of the converter station (ConverterStation), voltage level (VoltageLevel), bay (Bay), and DC pole (DCPole) and the devices in the logical model rule file; according to the belonging relationship rules between the container classes and the devices in the logical model rule file, verify whether the belonging relationships between the container classes and the devices in the converter station meet the belonging relationship rules between the container classes and the devices. When they meet, the inspection is passed; otherwise, generate abnormal information for the belonging relationships between the container classes and the devices and record it.
[0080] The specific method for detecting the association relationship between primary and secondary equipment is as follows: Obtain the association relationship between secondary equipment and primary equipment in the converter station from the parsed file, as well as the measurement ownership relationship rules of primary and secondary equipment in the logical model rule file, and determine whether the association relationship between secondary equipment and primary equipment in the parsed file meets the measurement ownership relationship rules of primary and secondary equipment in the logical model rule file. Specifically, obtain the association relationship between secondary equipment and primary equipment in the converter station from the parsed file, including the ownership relationship between equipment, components, RemoteUnit, RemoteSource, Measurement, MeasurementValue, and PSR (PowerSystemResource); obtain the measurement ownership relationship rules of primary and secondary equipment between primary equipment, secondary equipment, components, RemoteUnit, RemoteSource, Measurement, MeasurementValue, and PSR (PowerSystemResource) in the converter station in the logical model rule file; according to the measurement ownership relationship rules of primary and secondary equipment in the logical model rule file, verify whether the association relationship between secondary equipment and primary equipment in the converter station meets the measurement ownership relationship rules of primary and secondary equipment. When it meets the requirements, it passes the inspection; otherwise, generate and record the abnormal information of the measurement ownership relationship of primary and secondary equipment.
[0081] Finally, when the entity classes corresponding to the entity objects of each preset type meet the modeling rules of the entity objects of each preset type, the entity classes corresponding to the container class objects of each preset type and their ownership relationship with the equipment are consistent with the ownership relationship between the container class objects of each preset type and the equipment in the converter station in the logical model rule file, and the association relationship between secondary equipment and primary equipment in the parsed file of the converter station meets the measurement ownership relationship rules of primary and secondary equipment in the logical model rule file, the boundary model verification is normal; otherwise, the boundary model verification is abnormal.
[0082] In a possible real-time mode, the verification of the topology of the parsed file includes topology connectivity verification, multi-terminal equipment verification, and equipment terminal suspension verification.
[0083] Among them, the specific method for topological connectivity verification is as follows: Obtain the information of the intervals in the converter station from the parsed file, as well as the terminal information and connection point information of each conductive device within the interval. Based on the terminal information and connection point information of each conductive device within the interval, determine whether the terminals of each conductive device within the interval are associated with the connection points, and whether all the conductive devices within the interval are connected. Specifically, obtain the information of the intervals in the converter station from the parsed file. Taking the interval as a unit, assuming the switches within the interval are in the closed position, extract the terminal and connection point information of each conductive device within the interval, check whether the terminals of the conductive devices within the interval are associated with the connection points, and determine whether all the devices within the interval are connected. If there is a device within the interval that is not in the topology, prompt that this device is not connected to the starting point of the interval.
[0084] The specific method for multi-terminal device verification is as follows: According to the terminal information and connection point information of each conductive device within the interval, when the number of terminals of the current conductive device is greater than 2, determine whether the connection points of the current conductive device are the same connection point. Specifically, obtain the information of the conductive device terminals from the parsed file, determine whether the number of conductive device terminals is greater than 2. If it is greater than 2, find the connection points to which different terminals of the same device are connected, and determine whether these connection points are the same connection point. If they are different connection points, pass the inspection; otherwise, generate and record the abnormal information of the connection between the multi-terminal device endpoints and the connection points.
[0085] The specific method for verifying the suspension of device terminals is as follows: According to the terminal information and connection point information of each conductive device within the interval, determine whether the current conductive device is connected to the connection point and whether the connection point is connected to other devices. Specifically, obtain the information of the conductive device terminals from the parsed file, detect whether the device is connected to the connection point, and whether the connection point is connected to other devices. If the terminal is not connected to the connection point, or the connection point is not connected to other devices, then prompt that the device is suspended and record it.
[0086] Finally, when the terminals of each conductive device within the interval are associated with the connection points, all the conductive devices within the interval are connected, when the number of terminals of the conductive device is greater than 2, the connection points of the conductive device are not the same connection point, and the conductive device is connected to the connection point or the connection point is connected to other devices, the topology check is normal; otherwise, the topology check is abnormal.
[0087] In a possible implementation manner, the converter station model verification method further includes: obtaining the modification information of the physical model rule file, and modifying the preset physical model rule file according to the modification information of the physical model rule file; obtaining the modification information of the logical model rule file, and modifying the preset logical model rule file according to the modification information of the logical model rule file, so as to adapt to different model rules.
[0088] In a possible implementation, the converter station model verification method further includes: visually displaying the physical model verification result, the parsed file, and the logical model verification result, facilitating an intuitive understanding of the verification result.
[0089] See Figure 3 , which shows the implementation process of the converter station model verification method of the present invention, including the following processes:
[0090] (1) Online read the physical tables of the database of the converter station.
[0091] (2) Verify the physical tables of the database. If there are abnormalities, record the abnormalities; if not, record them in the verification report.
[0092] (3) Import and parse the information model configuration file of the converter station.
[0093] (4) At the same time, perform syntax verification, semantic verification, grid resource asset rule verification, boundary model verification, and topology verification on the parsed file.
[0094] (5) If there are abnormalities, record the abnormalities; if not, record them in the verification report.
[0095] (6) Output the verification report.
[0096] In summary, the converter station model verification method of the present invention performs verification on the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumerated values of the physical tables of the converter station database through a preset physical model rule file, realizing physical model verification; through a preset logical model rule file, it performs verification on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the information model configuration file of the converter station, realizing logical model verification. Among them, through the verification of grid resource asset rules, boundary model, and topology, the verification of the device component model and geographical area model is realized, completing a deeper level of model verification. At the same time, based on the configurability of the physical model rule file and the logical model rule file, it can adapt to model detection under various business types. For instantiated entities and instantiated attributes, as well as the device, component, and measurement point codes defined by the converter station, and their association relationships, accurate automated verification can be achieved by configuring the physical model rule file and the logical model rule file.
[0097] The following is an apparatus embodiment of the present invention, which can be used to execute the method embodiment of the present invention. For details not disclosed in the apparatus embodiment, please refer to the method embodiment of the present invention.
[0098] See Figure 4 , in another embodiment of the present invention, a converter station model verification system is provided, which can be used to implement the above-mentioned converter station model verification method. Specifically, the converter station model verification system includes a physical model verification module, a logical model verification module, and a result output module.
[0099] Among them, the physical model verification module is used to obtain the physical tables of the converter station's database, and perform verification on the naming of physical tables, physical table attributes, non-null elements, physical table primary keys, and physical table enumerated values of the physical tables of the database according to the preset physical model rule file, so as to obtain the physical model verification result; the logical model verification module is used to obtain and parse the information model configuration file of the converter station to obtain the parsed file; and perform verification on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the parsed file according to the preset logical model rule file to obtain the logical model verification result; the result output module is used to take the physical model verification result and the logical model verification result as the converter station model verification result and output it.
[0100] See Figure 5 , in a possible implementation manner, the converter station model verification system includes a UI interface display module, a physical model verification module, a logical model verification module, and a result output module. During verification, the converter station model verification system reads the physical model and logical model configuration files of the converter station respectively, and outputs a verification report after normalization and correctness verification.
[0101] Among them, the UI interface display module is used to display the parsing result of the model file; display the verification result of the model file version management; display the verification results of the syntax, semantics, and grid resource asset rules of the model; display the configuration module of the model output function; display the configuration interfaces of the physical model rule file and the logical model rule file of the converter station. The physical model verification module includes a physical model rule file module for storing the physical model rule file; a physical model communication module for obtaining the physical model of the converter station; and a physical model verification module for verifying the physical model of the converter station. The logical model verification module includes a CIM RDF model file import module for importing the logical model configuration file; a version verification module for version verification; a syntax verification module for syntax verification; a semantics verification module for semantics verification; a grid resource asset rule verification module for verifying grid resource asset rules; a boundary model verification module for boundary model verification; a topology verification module for topology verification; and a logical model rule file module for storing the logical model rule file.
[0102] All relevant content of each step involved in the embodiment of the foregoing converter station model verification method can be cited in the function description of the corresponding functional module of the converter station model verification system in the embodiment of the present invention, and will not be repeated here. The division of modules in the embodiments of the present invention is illustrative, only a logical function division. In actual implementation, there may be other division methods. In addition, in each embodiment of the present invention, each functional module may be integrated in a processor, may also exist physically alone, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0103] In another embodiment of the present invention, a computer device is provided. The computer device includes a processor and a memory. The memory is used to store a computer program. The computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function. The processor described in the embodiment of the present invention can be used for the operation of the converter station model verification method.
[0104] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device, used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the operating system of the terminal. And, in this storage space, there is also stored one or more instructions suitable for being loaded and executed by the processor. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the converter station model verification method in the above embodiments.
[0105] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0106] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0107] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions in Figure 1 one flow or multiple flows and / or blocks Figure 1 The functions specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in Figure 1 one process or more processes and / or boxes Figure 1 the functions specified in one box or more boxes.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the specific implementation manners of the present invention can still be modified or equivalently replaced, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.< / rdf:rdf> < / rdf:rdf>
Claims
1. A method for verifying a converter station model, characterized in that, The method includes the following steps: Obtain the physical tables of the database of the converter station, and perform checks on the naming, attributes, non-null elements, primary keys, and enumerated values of the physical tables according to the preset physical model rule file to obtain the physical model check result; Obtain and parse the information model configuration file of the converter station to obtain the parsed file; and perform checks on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the parsed file according to the preset logical model rule file to obtain the logical model check result; Output the physical model check result and the logical model check result as the converter station model check result; The check of the grid resource asset rules for the parsed file includes element check, correctness check of association relationships, standardization check of equipment / components, standardization check of measurement points, and standardization check of in-station geographical areas; Among them, the specific method for element check is: obtain the classes that must be exported according to the logical model rule file, traverse each element in the parsed file, and determine whether the classes that must be exported exist in the parsed file; The specific method for correctness check of association relationships is: obtain the device logical relationship attributes that must exist according to the logical model rule file, traverse each element in the parsed file, and determine whether the device logical relationship attributes that must exist exist in the parsed file; The specific method for standardization check of equipment / components is: obtain the Chinese and English name information of each equipment / component in the parsed file, and compare it with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file to determine whether the Chinese and English name information of each equipment / component in the parsed file is consistent with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file; The specific method for standardization check of measurement points is: obtain the measurement point information under the entity classes of analog quantity class, discrete quantity class, string quantity class, and accumulated quantity class in the parsed file, compare each piece of measurement point information item by item with the corresponding preset measurement point information in the logical model rule file, and determine whether each piece of measurement point information is consistent with the corresponding preset measurement point information in the logical model rule file; The specific method for standardization check of in-station geographical areas is: obtain the geographical area information of each geographical area in the parsed file, and compare it with the preset geographical area information of each geographical area in the logical model rule file to determine whether the geographical area information of each geographical area in the parsed file is consistent with the preset geographical area information of each geographical area in the logical model rule file; When the classes that must be exported exist in the parsed file, the device logical relationship attributes that must exist exist in the parsed file, the Chinese and English name information of each equipment / component in the parsed file is consistent with the preset Chinese and English name information of the corresponding equipment / component in the logical model rule file, each piece of measurement point information is consistent with the corresponding preset measurement point information in the logical model rule file, and the geographical area information of each geographical area in the parsed file is consistent with the preset geographical area information of each geographical area in the logical model rule file, the grid resource asset rule check is normal; otherwise, the grid resource asset rule check is abnormal; The verification of the boundary model for parsing the file includes entity class detection, container class detection, and primary-secondary equipment association relationship detection; Among them, the specific method for entity class detection is: obtain the entity classes corresponding to the entity objects of each preset type in the converter station in the parsed file, and the modeling rules of the entity objects of each preset type in the converter station in the logical model rule file; and determine whether the entity classes corresponding to the entity objects of each preset type meet the modeling rules of the entity objects of each preset type; The specific method for main container class detection is: obtain the entity classes corresponding to the container class objects of each preset type in the converter station in the parsed file and their ownership relationships with the equipment, and the ownership relationships between the container class objects of each preset type in the converter station and the equipment in the logical model rule file; and determine whether the entity classes corresponding to the container class objects of each preset type in the converter station in the parsed file and their ownership relationships with the equipment are consistent with the ownership relationships between the container class objects of each preset type in the converter station and the equipment in the logical model rule file; The specific method for primary-secondary equipment association relationship detection is: obtain the association relationship between the secondary equipment and the primary equipment in the converter station in the parsed file, and the measurement ownership relationship rule of the primary-secondary equipment in the logical model rule file, and determine whether the association relationship between the secondary equipment and the primary equipment in the converter station in the parsed file meets the measurement ownership relationship rule of the primary-secondary equipment in the logical model rule file; When the entity classes corresponding to the entity objects of each preset type meet the modeling rules of the entity objects of each preset type, the entity classes corresponding to the container class objects of each preset type and their ownership relationships with the equipment are consistent with the ownership relationships between the container class objects of each preset type and the equipment in the logical model rule file of the converter station, and the association relationship between the secondary equipment and the primary equipment in the converter station in the parsed file meets the measurement ownership relationship rule of the primary-secondary equipment in the logical model rule file, the boundary model verification is normal; otherwise, the boundary model verification is abnormal.
2. The commutation station model verification method according to claim 1, wherein The specific method for verifying the physical table naming, physical table attributes, non-null elements, physical table primary key, and physical table enumeration values of the database physical table is as follows: Obtain the physical table naming of the database physical table, compare the physical table naming of the database physical table with the physical table naming in the preset physical model rule file. If they are consistent, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal; Obtain the physical table attributes of the database physical table, compare the physical table attributes of the database physical table with the physical table attributes in the preset physical model rule file. If they are consistent, the physical table naming verification is normal; otherwise, the physical table naming verification is abnormal; According to the non-null fields set in the preset physical model rule file, verify whether the non-null fields in the database physical table are null. When the non-null fields in the database physical table are null, the non-null element verification is abnormal; Otherwise, the non-null element verification is normal; According to the primary key fields set in the preset physical model rule file, obtain the primary key identifier of the database physical table, and detect whether the main resource identifier attribute in the database physical table has the primary key identifier. When the main resource identifier attribute has the primary key identifier, the physical table primary key verification is normal; Otherwise, the physical table primary key verification is abnormal; Obtain the enumerated value table in the database physical table. According to the main resource identifier, name, and alias attributes of the enumerated value table, determine whether the data in the enumerated value table is non-empty. When the data in the enumerated value table is non-empty, the physical table enumerated value verification is normal; otherwise, the physical table enumerated value verification is abnormal.
3. The commutation station model verification method according to claim 1, characterized in that When obtaining and parsing the information model configuration file of the converter station, the SAX parsing method is adopted.
4. The commutation station model verification method according to claim 1, wherein The specific method for verifying the version number of the parsed file is as follows: Obtain the version number of the parsed file, and compare the version number of the parsed file with the version number in the preset logical model rule file. If they are the same, the version number verification is normal; otherwise, the version number verification is abnormal.
5. The commutation station model verification method according to claim 1, characterized in that The verification of the syntax of the parsed file includes format detection, root element detection, and namespace detection; among them, the specific method for format detection is: obtain the element tags in the parsed file, and determine whether the element tags are the same as the tags in the preset logical model rule file; the specific method for root element detection is: obtain the root element information in the parsed file, and determine whether the root element information is the preset root element preset value in the logical model rule file; the specific method for namespace detection is: obtain the namespace information in the parsed file, and determine whether the namespace information is the same as the namespace information in the preset logical model rule file; when the element tags are the same as the tags in the preset logical model rule file, the root element information is the preset root element preset value in the logical model rule file, and the namespace information is the same as the namespace information in the preset logical model rule file, the syntax verification is normal; otherwise, the syntax verification is abnormal; The verification of the semantics of the parsed file includes class declaration detection, attribute declaration detection, and relationship declaration detection; among them, the specific method for class declaration detection is: obtain the entity classes in the parsed file, and compare them with several preset entity classes in the logical model rule file to determine whether the entity classes in the parsed file exist in the logical model rule file; the specific method for attribute declaration detection is: obtain the attributes of each entity class in the parsed file, and compare them with several preset attributes of the same entity class in the logical model rule file to determine whether the attributes of each entity class in the parsed file exist in the logical model rule file; the specific method for relationship declaration detection is: obtain the logical relationships of each entity class in the parsed file, and compare them with several preset logical relationships of the same entity class in the logical model rule file to determine whether the logical relationships of each entity class in the parsed file exist in the logical model rule file; when the entity classes in the parsed file exist in the logical model rule file, the attributes of each entity class in the parsed file exist in the logical model rule file, and the logical relationships of each entity class in the parsed file exist in the logical model rule file, the semantics verification is normal; otherwise, the semantics verification is abnormal.
6. The commutation station model verification method according to claim 1, wherein The verification of the topology of the parsed file includes topology connectivity verification, multi-terminal device verification, and device terminal suspension verification; Among them, the specific method for topological connectivity verification is as follows: Obtain the information of the intervals in the converter station in the parsed file, as well as the terminal information and connection point information of each conductive device in the interval. According to the terminal information and connection point information of each conductive device in the interval, determine whether the terminals of each conductive device in the interval are associated with the connection point, and whether all the conductive devices in the interval are connected; The specific method for multi-terminal device verification is as follows: According to the terminal information and connection point information of each conductive device in the interval, when the number of terminals of the current conductive device is greater than 2, determine whether the connection points of the current conductive device are the same connection point; The specific method for device terminal suspension verification is as follows: According to the terminal information and connection point information of each conductive device in the interval, determine whether the current conductive device is connected to the connection point and whether the connection point is connected to other devices; When the terminals of each conductive device in the interval are associated with the connection point, all the conductive devices in the interval are connected, when the number of terminals of the conductive device is greater than 2, the connection points of the conductive device are not the same connection point, and the conductive device is connected to the connection point or the connection point is connected to other devices, the topological verification is normal; otherwise, the topological verification is abnormal.
7. The commutation station model verification method according to claim 1, characterized in that It also includes: Obtain the modification information of the physical model rule file, and modify the preset physical model rule file according to the modification information of the physical model rule file; Obtain the modification information of the logical model rule file, and modify the preset logical model rule file according to the modification information of the logical model rule file; Visually display the physical model verification result, the parsed file, and the logical model verification result.
8. A commutation station model verification system, characterized in that It includes: A physical model verification module, which is used to obtain the physical database tables of the converter station, and perform verification on the physical table naming, physical table attributes, non-null elements, physical table primary keys, and physical table enumeration values of the physical database tables according to the preset physical model rule file, to obtain the physical model verification result; A logical model verification module, which is used to obtain the information model configuration file of the converter station and parse it to obtain the parsed file; and perform verification on the version number, syntax, semantics, grid resource asset rules, boundary model, and topology of the parsed file according to the preset logical model rule file, to obtain the logical model verification result; A result output module, which is used to output the physical model verification result and the logical model verification result as the converter station model verification result; The verification of the grid resource asset rules of the parsed file includes element verification, verification of the correctness of the association relationship, verification of the standardization of devices / components, verification of the standardization of measuring points, and verification of the standardization of the in-station geographical area; Among them, the specific method for element verification is as follows: Obtain the classes that must be exported according to the logical model rule file, traverse each element in the parsed file, and determine whether the classes that must be exported exist in the parsed file; The specific method for verification of the correctness of the association relationship is as follows: Obtain the device logical relationship attributes that must exist according to the logical model rule file, traverse each element in the parsed file, and determine whether the device logical relationship attributes that must exist exist in the parsed file; The specific method for verifying the standardization of devices / components is as follows: Obtain the Chinese and English name information of each device / component in the parsing file, compare it with the preset Chinese and English name information of the corresponding device / component in the logic model rule file, and determine whether the Chinese and English name information of each device / component in the parsing file is consistent with the preset Chinese and English name information of the corresponding device / component in the logic model rule file; The specific method for verifying the standardization of measuring points is as follows: Obtain the measuring point information under the entity classes of analog quantity type, discrete quantity type, string quantity type, and cumulative quantity type in the parsing file, compare each piece of measuring point information item by item with the corresponding preset measuring point information in the logic model rule file, and determine whether each piece of measuring point information is consistent with the corresponding preset measuring point information in the logic model rule file; The specific method for verifying the standardization of the geographical regions within the station is as follows: Obtain the geographical region information of each geographical region in the parsing file, compare it with the preset geographical region information of each geographical region in the logic model rule file, and determine whether the geographical region information of each geographical region in the parsing file is consistent with the preset geographical region information of each geographical region in the logic model rule file; When the classes that must be exported exist in the parsing file, the device logical relationship attributes that must exist exist in the parsing file, the Chinese and English name information of each device / component in the parsing file is consistent with the preset Chinese and English name information of the corresponding device / component in the logic model rule file, each piece of measuring point information is consistent with the corresponding preset measuring point information in the logic model rule file, and the geographical region information of each geographical region in the parsing file is consistent with the preset geographical region information of each geographical region in the logic model rule file, the grid resource asset rule verification is normal; otherwise, the grid resource asset rule verification is abnormal; The verification of the boundary model of the parsing file includes entity class detection, container class detection, and primary-secondary equipment association relationship detection; Among them, the specific method for entity class detection is as follows: Obtain the entity classes corresponding to the entity objects of each preset type in the converter station in the parsing file, and the modeling rules of the entity objects of each preset type in the converter station in the logic model rule file; and determine whether the entity classes corresponding to the entity objects of each preset type meet the modeling rules of the entity objects of each preset type; The specific method for main container class detection is as follows: Obtain the entity classes corresponding to the container class objects of each preset type in the converter station in the parsing file and their belonging relationships with devices, and the belonging relationships between the container class objects of each preset type in the converter station and devices in the logic model rule file; and determine whether the entity classes corresponding to the container class objects of each preset type in the converter station in the parsing file and their belonging relationships with devices are consistent with the belonging relationships between the container class objects of each preset type in the converter station and devices in the logic model rule file; The specific method for primary-secondary equipment association relationship detection is as follows: Obtain the association relationship between secondary equipment and primary equipment in the converter station in the parsing file, and the measurement belonging relationship rule of primary-secondary equipment in the logic model rule file, and determine whether the association relationship between secondary equipment and primary equipment in the converter station in the parsing file meets the measurement belonging relationship rule of primary-secondary equipment in the logic model rule file; When the entity classes corresponding to the entity objects of each preset type satisfy the modeling rules of the entity objects of each preset type, the entity classes corresponding to the container class objects of each preset type and their ownership relationship with the device are consistent with the ownership relationship between the container class objects of each preset type and the device in the conversion station in the logic model rule file, and the association relationship between the secondary devices and the primary devices in the conversion station in the parsing file satisfies the measurement ownership relationship rule of the primary and secondary devices in the logic model rule file, the boundary model verification is normal; otherwise, the boundary model verification is abnormal.
Citation Information
Patent Citations
Multi-type data verification method and device, computer system and readable storage medium
CN110764942A
Energy management system graph-model bidirectional verification method and device
CN112580178A