Model file automatic creation method and device, storage medium and electronic equipment

By obtaining the data forwarding point table and automatically creating ICD model files using the Pandas and lxml open-source libraries, the problem of gateway devices being unable to automatically generate model files was solved, ensuring the correctness and consistency of model files and reducing costs.

CN118733534BActive Publication Date: 2026-07-07DONGTU TECH (YICHANG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGTU TECH (YICHANG) CO LTD
Filing Date
2024-06-26
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Gateway devices cannot automatically generate the model files required for the IEC61850 protocol, resulting in low accuracy and high maintenance costs.

Method used

By obtaining the data forwarding point table, and according to the substation's protocol documents and file structure specifications, the model file is decomposed into multiple master nodes and child nodes are populated. The ICD model file is automatically created using the Pandas and lxml open-source libraries to ensure compliance with the IEC61850 standard.

Benefits of technology

It enables the automatic generation of model files, ensuring the correctness and consistency of the files and reducing the cost of creation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733534B_ABST
    Figure CN118733534B_ABST
Patent Text Reader

Abstract

The application relates to an automatic creation method and device of a model file, a storage medium and an electronic device. The method comprises the following steps: acquiring a data forwarding point table, wherein the data forwarding point table contains all data forwarding points of a transformer substation and data point information of the data forwarding points; creating a model file of the transformer substation according to a protocol document provision and a file structure provision of the transformer substation; sequentially performing primary filling on each main node of the model file; and sequentially performing secondary filling on each sub-node of the model file according to the data forwarding point table. The application solves the technical problem that a gateway device itself cannot automatically generate a model file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system technology, and in particular to a method, apparatus, storage medium, and electronic device for automatically creating model files. Background Technology

[0002] In recent years, with the rapid development of computer and network technologies, real-time monitoring technologies for various aspects of the power system have become increasingly mature, with intelligent and visual monitoring methods being key features. In numerous substations, various sensors collect data from various stages and critical electrical information from primary and secondary equipment, transmitting it in real-time to an intelligent operation and maintenance monitoring platform. Simultaneously, users can remotely, centrally, and in real-time monitor and manage the substations from the platform. As the only globally applicable standard in the field of power system automation, IEC 61850 plays a crucial role in regulating real-time monitoring and data transmission in substations.

[0003] According to the IEC 61850 protocol, an IED (Intelligent Electronic Device) must provide an ICD (IED Capability Description) file describing its capabilities and communication content (such as whether it has setpoints, pressure plates, and action signals). The system integration tool integrates and instantiates the ICD files of each IED to form a station-level SCD (Substation Configuration Description) model file for station-level applications. The IED device exports its relevant parts from the SCD file to form a CID (Configured IED Description) file. This CID file is the instantiated IED model file used by the IED during runtime.

[0004] Besides traditional IED devices, other types of devices also use the IEC 61850 protocol, such as smart protocol gateways. These gateways can function as both IEC 61850 clients and servers. However, the gateway devices themselves do not have the ability to generate ICD model files, requiring manual creation or modification of model files based on the specific project requirements. This not only results in generally lower accuracy but also in very high calibration and maintenance costs. Summary of the Invention

[0005] This application provides a method, apparatus, storage medium, and electronic device for automatically creating model files, in order to solve the technical problem that gateway devices themselves cannot automatically generate model files.

[0006] In a first aspect, this application provides a method for automatically creating a model file, comprising: obtaining a data forwarding point table, wherein the data forwarding point table contains all forwarding data points of the substation and their data point information; creating a model file of the substation according to the protocol document and file structure specifications of the substation; performing preliminary filling on each main node of the model file in sequence; and performing secondary filling on each child node of the model file in sequence according to the data forwarding point table.

[0007] Secondly, this application provides an automatic model file creation device, comprising: an acquisition module for acquiring a data forwarding point table, wherein the data forwarding point table contains all forwarding data points of the substation and their data point information; a creation module for creating a model file of the substation according to the protocol document and file structure specifications of the substation; a first filling module for initially filling each main node of the model file sequentially; and a second filling module for second-stage filling each child node of the model file sequentially according to the data forwarding point table.

[0008] As an optional example, the above apparatus further includes: a second acquisition module, configured to acquire the data type and read / write type of each forwarding data point from the data point information of each forwarding data point in the data forwarding point table after acquiring the data forwarding point table; and a classification module, configured to classify all forwarding data points in the data forwarding point table into multiple basic public data classes according to the data type and read / write type of each forwarding data point; wherein the multiple basic public data classes include single-point status data class, two-point status data class, measurement value data class, single-point control data class, two-point control data class, and cumulative value data class.

[0009] As an optional example, the first filling module includes: a first filling unit for filling the unique identifier, version information, revision information, file writing tool identifier, and file name mapping information of the model file into the header node of the model file; a second filling unit for filling the communication information of the intelligent electronic equipment of the substation into the communication configuration node of the model file, wherein the communication information includes the device name, network address, and physical address, and the device name uses an input parameter; a third filling unit for filling the configuration information of the intelligent electronic equipment of the substation into the intelligent electronic equipment configuration node of the model file; and a fourth filling unit for filling the data type definition node of the model file with default values.

[0010] As an optional example, the second filling module mentioned above includes: a fifth filling unit, used to create a subnet node under the communication configuration node, and fill the name and type of the subnet node with default values; a sixth filling unit, used to create a device connection node under the subnet node, and fill the device name of the device connection node with input parameters, and fill the access point name and access point address of the device connection node with default values.

[0011] As an optional example, the second filling module includes: a seventh filling unit, used to create an access point node under the smart electronic device configuration node and fill the name of the access point node with a default value; and an eighth filling unit, used to create a server node under the smart electronic device configuration node and fill the server node with a default value.

[0012] As an optional example, the second filling module includes: a creation unit for creating a logical node type node, a data object type node, and a data object node under the data type definition node; an association unit for associating the forwarding data points in the data forwarding point table with the logical node type node, the data object type node, and the data object node according to the data type of each forwarding data point in the data forwarding point table; and a ninth filling unit for creating a logical device node under the intelligent electronic device configuration node, and filling the forwarding data points in the data forwarding point table into the logical device node according to the logical node type node, the data object type node, and the data object node.

[0013] As an optional example, the second filling module includes: a determining unit, configured to determine the number of logical nodes under the logical device node based on the number of forwarding data points of each data type in the data forwarding point table; and a configuring unit, configured to configure the data set and report control block of the logical node based on each forwarding data point in the data forwarding point table.

[0014] As an optional example, the above apparatus further includes: a determination module, configured to determine the completeness and accuracy of the node content of each node in the model file according to the protocol document specifications and file semantic syntax rules of the model file after performing secondary filling on each sub-node of the model file in sequence according to the data forwarding point table.

[0015] Thirdly, this application provides a storage medium storing a computer program, wherein the computer program is executed by a processor to perform the above-described automatic creation method of the model file.

[0016] Fourthly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for automatically creating model files through the computer program.

[0017] In this embodiment, a method is employed to obtain a data forwarding point table, which contains all forwarding data points and their information in the substation; to create a model file for the substation according to the substation's protocol document and file structure; to initially fill each main node of the model file sequentially; and to subsequently fill each child node of the model file sequentially according to the data forwarding point table. This method, through analysis of the data forwarding point table content, decomposes the model file into multiple main nodes, then further decomposes these main nodes into smaller nodes, ultimately decomposing the model file into several child nodes. The preset data forwarding point table information is then filled into each main node and each child node of the model file, completing the model file creation. This achieves automatic model file generation, ensures the correctness and consistency of the model file, and reduces the cost of model file creation and maintenance to a certain extent, thus solving the technical problem that gateway devices themselves cannot automatically generate model files. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 This is a flowchart of an optional method for automatically creating model files according to an embodiment of this application;

[0022] Figure 2 This is a structural diagram of a model file according to an optional automatic model file creation method based on an embodiment of this application;

[0023] Figure 3This is a schematic diagram of an optional automatic model file creation device according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0027] Example 1: To address the technical problem that the gateway device itself cannot automatically generate model files, according to a first aspect of this application, a method for automatically creating model files is provided. Optionally, as follows: Figure 1 As shown, the above method includes:

[0028] S102, Obtain the data forwarding point table, which contains all forwarding data points of the substation and their data point information;

[0029] S104, Create the substation model file according to the substation's protocol documentation and file structure specifications;

[0030] S106, Perform preliminary filling on each main node of the model file in sequence;

[0031] S108, according to the data forwarding point table, each child node of the model file is filled in twice.

[0032] Optionally, in this first embodiment, the data forwarding point table is a preset template information Excel file, containing data point information such as the name, description, data type, and read / write type of all forwarding data points in the substation. The preset template information exists in the form of an Excel file, making it easy to align and revise in subsequent uses after the initial editing, and also facilitating the conversion of the communication point table into a logical node table. The model file is the ICD model file of the gateway device. The ICD model file (IEDCapability Description) describes the functions and communication capabilities of the gateway device; essentially, it is an XML-formatted Extensible Markup Language file. The preset template information Excel file is read using the Pandas open-source library, and the XML file is parsed and read / written using the Python language and the lxml open-source library.

[0033] Optionally, in this first embodiment, as Figure 2 The diagram shows the structure of the model file. The ICD model file has four main nodes: the Header node, the Communication configuration node, the IED (Intelligent Electronic Device) configuration node, and the DataTypeTemplates (Data Type Definition) node. Each main node has at least one child node. The data forwarding point table is read using the Pandas open-source library. Based on the XML file structure and the necessary elements required by the IEC 61850 protocol, the initial ICD model file is created using the lxml open-source library. The initial creation and filling of the four main nodes of the ICD model file are completed sequentially. Finally, the data forwarding point table is traversed, and each child node of the ICD model file is filled in according to the data point information of each forwarding data point in the table, completing the creation of the ICD model file.

[0034] Optionally, in this first embodiment, by analyzing the content of the data forwarding point table, the model file is decomposed into multiple main nodes, and then the multiple main nodes are further decomposed into smaller nodes, and finally the model file is decomposed into several child nodes. Subsequently, the preset data forwarding point table information is filled into each main node and each child node of the model file to complete the creation of the model file. This achieves the automatic generation of the model file and ensures the correctness and consistency of the model file, thereby reducing the cost of model file creation and maintenance to a certain extent, and solving the technical problem that the gateway device itself cannot automatically generate model files.

[0035] In Example 2, the IEC 61850 standard specifies that different types of data points should belong to specific logical node classes and data classes. In order to ensure that the generated ICD model file conforms to this standard and to guarantee the correct use and interoperability of each data point in the system, after obtaining the data forwarding point table, the forwarding data points in the data forwarding point table are classified into several basic common data classes according to the data type and read / write type of the forwarding data points.

[0036] Optionally, after obtaining the data forwarding point table, the above method further includes:

[0037] Obtain the data type and read / write type of each forwarding data point from the data point information of each forwarding data point in the data forwarding point table;

[0038] Based on the data type and read / write type of each forwarding data point, all forwarding data points in the data forwarding point table are classified into multiple basic common data classes;

[0039] Among them, several basic public data categories include single-point status data, two-point status data, measurement value data, single-point control data, two-point control data, and cumulative value data.

[0040] Optionally, in this second embodiment, the data type and read / write type of all forwarding data points in the data forwarding point table are read using the Pandas open-source library. Each forwarding data point is then categorized into six basic common data classes based on its data type and read / write type. These six basic common data classes include SPS (Single Point Status), DPS (Double Point Status), MV (Measured Value), SPC (Single Point Control), and INC (Accumulated Value). Specifically, SPS (Single Point Status) is suitable for single-point status data, typically Boolean type and read-only, such as the on / off state of a switch. DPS (Double Point Status) is suitable for double-point status data, typically integer type and read-only, such as the state of a double-position switch. MV (Measured Value) is suitable for measured value data, typically floating-point type and read-only, such as voltage and current measurements. SPC (Single Point Control) is suitable for single-point control data, typically Boolean type and readable / writable, such as the on / off state of a control switch. DPC (Double Point Control) is used for two-point control data, which is usually integer and readable and writable, such as controlling a two-position switch. INC (Integrated Total) is used for cumulative value data, which is usually floating-point and readable and writable, such as the cumulative energy value.

[0041] Optionally, in this second embodiment, classifying the data points ensures that the generated ICD model file conforms to the EC61850 standard, guaranteeing the correct use and interoperability of each data point in the system. It also simplifies the management and processing of data points. Different categories of data points have different attributes and behavioral characteristics; classification allows for appropriate processing methods to be applied to different types of data points, thereby improving the efficiency and accuracy of automated ICD model file generation.

[0042] Example 3: Using the lxml open-source library to write ICD model files, the content of each main node of the ICD model file is filled in sequentially to complete the initial creation of the ICD model file.

[0043] Optionally, the initial population of each main node in the model file may include:

[0044] Fill the header node of the model file with the model file's unique identifier, version information, revision information, file writing tool identifier, and file name mapping information;

[0045] The communication information of the intelligent electronic equipment in the substation is filled into the communication configuration node of the model file. The communication information includes the device name, network address and physical address. The device name is obtained by using the input parameter.

[0046] Fill the configuration information of the intelligent electronic equipment in the model file into the intelligent electronic equipment configuration node;

[0047] Use default values ​​to populate the data type definition nodes in the model file.

[0048] Optionally, in this third embodiment, as Figure 2The diagram shows the structure of the model file. The ICD model file has four main nodes: the Header node, the Communication configuration node, the IED (Intelligent Electronic Device) configuration node, and the DataTypeTemplates data type definition node. The Header node contains version and revision information, the file writing tool identifier, and name mapping information, describing the file itself. The Communication configuration node defines the communication information of the IED intelligent electronic device connection points in the subnet, including the network address and physical address of the intelligent electronic device. The IED intelligent electronic device configuration node describes the configuration of the IED intelligent electronic device, its included logical devices, logical node data objects, and communication service capabilities. The DataTypeTemplates data type definition node defines in detail the types of logical nodes appearing in the ICD model file, as well as the data objects and data attributes contained within those logical nodes. Based on the definition rules of the above four main nodes, information is automatically filled into the Header node, Communication configuration node, IED intelligent electronic device configuration node, and DataTypeTemplates data type definition node, with IEDName using an input parameter.

[0049] Optionally, in this third embodiment, the initial creation of the ICD model file can be automated by automatically filling each master node with content according to the definition rules of the master node of the ICD model file.

[0050] Example 4: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the Communication configuration node in the ICD model file is completed sequentially.

[0051] Optionally, the secondary filling of each child node of the model file according to the data forwarding point table includes:

[0052] Create a subnet node under the communication configuration node, and populate the name and type of the subnet node with default values;

[0053] Create a device connection node under the subnet node, and fill in the device name of the device connection node with the input parameters, and fill in the access point name and access point address of the device connection node with the default values.

[0054] Optionally, in this fourth embodiment, as Figure 2The diagram showing the model file structure illustrates the creation of a SubNetwork subnet node under the Communication configuration node. The name and type of the SubNetwork subnet node are filled with default values. Under this subnet node, a ConnectedAP device node is added, specifying the IEDName using the input parameter and filling in other information with default values, including the access point name APName and access point address. This allows for the automated completion of the Communication configuration node in the ICD model file.

[0055] Example 5: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the IED smart electronic device configuration node in the ICD model file is completed sequentially.

[0056] Optionally, the secondary filling of each child node of the model file according to the data forwarding point table includes:

[0057] Create an access point node under the smart electronic device configuration node, and populate the name of the access point node with default values;

[0058] Create a server node under the Smart Electronic Device Configuration node and populate the server node with default values.

[0059] Optionally, in this fifth embodiment, as Figure 2 The model file structure diagram shown includes an AccessPoint node under the IED node, with the name filled in using default values. Under the AccessPoint node, a Server node is added, with its basic information and structure filled in according to the default template; specific content can be further configured as needed.

[0060] Example 6: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the DataTypeTemplates data type definition node in the ICD model file is completed sequentially.

[0061] Optionally, the secondary filling of each child node of the model file according to the data forwarding point table includes:

[0062] Under the data type definition node, create logical node type nodes, data object type nodes, and data object nodes;

[0063] Based on the data type of each forwarding data point in the data forwarding point table, associate the forwarding data points in the data forwarding point table with logical node type nodes, data object type nodes, and data object nodes;

[0064] Create a logical device node under the intelligent electronic device configuration node, and fill the logical device node with the forwarding data points from the data forwarding point table according to the logical node type node, data object type node, and data object node.

[0065] Optionally, in this sixth embodiment, as Figure 2 The structure diagram of the model file shown indicates that the DataTypeTemplates data type definition node contains LNodeType logical node type nodes, DOType data object type nodes, and DAType data object nodes. The NodeType node defines the type of the logical node and its contained data object (DO), the DOType data object type node defines the type of the data object and its contained data attribute (DA), and the DAType data object node defines the type of the data attribute and its contained basic data attribute (BDA). Accordingly, LNodeType logical node type nodes, DOType data object type nodes, and DAType data object nodes are created under the DataTypeTemplates data type definition node. Based on the data type of each forwarding data point in the data forwarding point table, it is associated with the corresponding LNodeType logical node type node, DOType data object type node, and DAType data object node. Here, the data type is the data type of each forwarding data point in the data forwarding point table after it has been classified into the basic common data class. Under the IED intelligent electronic device configuration node, create an LDevice logical device node and set its basic attributes. Under the LDevice logical device node, populate the forwarding data points in the data forwarding point table according to the LNodeType logical node type node, DOType data object type node, and DAType data object node.

[0066] Optionally, in this sixth embodiment, by associating and populating the LNodeType logical node type node, DOType data object type node, and DAType data object node to the LDevice logical device node according to the data point type in the data forwarding point table, it can be ensured that the planning and configuration of the logical device are correct, and that the data set and report control information are complete and comply with the EC61850 standard requirements, thereby ensuring the correct configuration and operation of the IED device.

[0067] In Example 7, while associating and populating the LNodeType logical node type node, DOType data object type node, and DAType data object node to the LDevice logical device node according to the data point type in the data forwarding point table, the number of logical nodes is planned according to the number of data points of each type, and the data set report control information under each logical device is improved.

[0068] Optionally, the secondary filling of each child node of the model file according to the data forwarding point table includes:

[0069] The number of logical nodes under a logical device node is determined based on the number of forwarding data points for each data type in the data forwarding point table.

[0070] Configure the data set and report control block of the logical node according to each forwarding data point in the data forwarding point table.

[0071] Optionally, in this seventh embodiment, the number of logical nodes under each LDevice logical device node is determined based on the number of forwarded data points for each data type in the data forwarding point table. Data types include SPS single-point status data, DPS dual-point status data, MV measurement value data, SPC single-point control data, DPC dual-point control data, and INC cumulative value data. Each logical node can handle a specific number of data points of the same type. Each logical node is configured with a DataSet containing all data points to be forwarded, and a Report Control Block (RCB) is configured under each logical node to define the triggering conditions for reports and the specific data set for reports. This ensures the correct planning and configuration of the logical devices, and that the data sets and report control information are complete and meet standard requirements, thereby guaranteeing the correct configuration and operation of the IED devices.

[0072] Example 8: After performing secondary filling on each child node of the model file according to the data forwarding point table, the above method further includes:

[0073] Based on the protocol document specifications and semantic syntax rules of the model file, determine the completeness and accuracy of the node content of each node in the model file.

[0074] Optionally, in this embodiment eight, according to the file syntax and semantic rules specified in the IEC 61850 protocol document, every node of the ICD model file is read from beginning to end, and the completeness and correctness of the references of each node, data set, and report control block are checked. This ensures that all nodes and configurations comply with the requirements of the IEC 61850 standard.

[0075] To illustrate with an example, this application relates to a method for automatically creating model files, implemented using the AutoCID tool and a lightweight Python language. The specific implementation steps are as follows:

[0076] 1. Use the Pandas open-source library to read the data type and read / write type of all forwarding data points in the data forwarding point table, and classify each forwarding data point into SPS single-point status data class, DPS two-point status data class, MV measurement value data class, SPC single-point control data class, DPC two-point control data class, and INC cumulative value data class according to the data type and read / write type of the forwarding data point.

[0077] 2. Based on the XML file structure and the necessary elements required by the IEC61850 protocol, create the initial ICD model file using the lxml open-source library.

[0078] 3. Using the lxml open-source library, the initial creation and population of the four main nodes of the ICD model file are completed sequentially. Based on the definition rules of the four main nodes—Header, Communication, IED (Intelligent Electronic Device) configuration, and DataTypeTemplates—information is automatically populated, with IEDName using an input parameter.

[0079] 4. Under the Communication configuration node, create a SubNetwork subnet node, filling in the name and type of the SubNetwork subnet node with default values. Under the subnet node, add a ConnectedAP device connection node, specifying the IEDName using the input parameter, filling in other information with default values, including the access point name APName and access point address of the device connection node.

[0080] 5. Under the IED node, add an AccessPoint node, filling in the name of the AccessPoint node with the default value. Under the AccessPoint node, add a Server node. The basic information and structure of the Server node are filled in according to the default template, and the specific content can be further configured as needed.

[0081] 6. Under the DataTypeTemplates data type definition node, create the LNodeType logical node type node, DOType data object type node, and DAType data object node. Associate each forwarding data point in the data forwarding point table with its corresponding LNodeType logical node type node, DOType data object type node, and DAType data object node. Under the IED intelligent electronic device configuration node, create an LDevice logical device node and set its basic attributes. Under the LDevice logical device node, populate the forwarding data points in the data forwarding point table according to the LNodeType logical node type node, DOType data object type node, and DAType data object node.

[0082] 7. Based on the number of forwarded data points for each data type in the data forwarding point table, determine the number of logical nodes under each LDevice logical device node. Each logical node can handle a specific number of data points of the same type. Each logical node is configured with a DataSet containing all data points that need to be forwarded, and a Report Control Block (RCB) is configured under each logical node to define the triggering conditions for reports and the specific data set for the reports.

[0083] 8. According to the file syntax and semantic rules specified in the IEC61850 protocol document, read every node of the ICD model file from beginning to end, and check the completeness and correctness of the references of each node, data set and report control block.

[0084] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0085] To address the technical problem that the gateway device itself cannot automatically generate model files, according to another aspect of the embodiments of this application, an automatic model file creation device is also provided, such as... Figure 3 As shown, it includes:

[0086] The acquisition module 302 is used to acquire the data forwarding point table, which contains all forwarding data points of the substation and their data point information;

[0087] Create module 304 to create the substation model file according to the substation's protocol documentation and file structure specifications;

[0088] The first filling module 306 is used to perform preliminary filling on each main node of the model file in sequence.

[0089] The second filling module 308 is used to fill each child node of the model file in turn according to the data forwarding point table.

[0090] Optionally, in this first embodiment, the data forwarding point table is a preset template information Excel file, containing data point information such as the name, description, data type, and read / write type of all forwarding data points in the substation. The preset template information exists in the form of an Excel file, making it easy to align and revise in subsequent uses after the initial editing, and also facilitating the conversion of the communication point table into a logical node table. The model file is the ICD model file of the gateway device. The ICD model file (IEDCapabilityDescription) describes the functions and communication capabilities of the gateway device; essentially, it is an XML-formatted Extensible Markup Language file. The preset template information Excel file is read using the Pandas open-source library, and the XML file is parsed and read / written using the Python language and the lxml open-source library.

[0091] Optionally, in this first embodiment, as Figure 2 The diagram shows the structure of the model file. The ICD model file has four main nodes: the Header node, the Communication configuration node, the IED (Intelligent Electronic Device) configuration node, and the DataTypeTemplates (Data Type Definition) node. Each main node has at least one child node. The data forwarding point table is read using the Pandas open-source library. Based on the XML file structure and the necessary elements required by the IEC 61850 protocol, the initial ICD model file is created using the lxml open-source library. The initial creation and filling of the four main nodes of the ICD model file are completed sequentially. Finally, the data forwarding point table is traversed, and each child node of the ICD model file is filled in according to the data point information of each forwarding data point in the table, completing the creation of the ICD model file.

[0092] Optionally, in this first embodiment, by analyzing the content of the data forwarding point table, the model file is decomposed into multiple main nodes, and then the multiple main nodes are further decomposed into smaller nodes, and finally the model file is decomposed into several child nodes. Subsequently, the preset data forwarding point table information is filled into each main node and each child node of the model file to complete the creation of the model file. This achieves the automatic generation of model files and ensures the correctness and consistency of model files, thereby reducing the cost of model file creation and maintenance to a certain extent, and solving the technical problem that the gateway device itself cannot automatically generate model files.

[0093] In Example 2, the IEC 61850 standard specifies that different types of data points should belong to specific logical node classes and data classes. In order to ensure that the generated ICD model file conforms to this standard and to guarantee the correct use and interoperability of each data point in the system, after obtaining the data forwarding point table, the forwarding data points in the data forwarding point table are classified into several basic common data classes according to the data type and read / write type of the forwarding data points.

[0094] Optionally, the above-mentioned device further includes:

[0095] The second acquisition module is used to obtain the data type and read / write type of each forwarding data point from the data point information of each forwarding data point in the data forwarding point table after acquiring the data forwarding point table;

[0096] The classification module is used to classify all forwarding data points in the data forwarding point table into multiple basic common data classes based on the data type and read / write type of each forwarding data point;

[0097] Among them, several basic public data categories include single-point status data, two-point status data, measurement value data, single-point control data, two-point control data, and cumulative value data.

[0098] Optionally, in this second embodiment, the data type and read / write type of all forwarding data points in the data forwarding point table are read using the Pandas open-source library. Each forwarding data point is then categorized into six basic common data classes based on its data type and read / write type. These six basic common data classes include SPS (Single Point Status), DPS (Double Point Status), MV (Measured Value), SPC (Single Point Control), and INC (Accumulated Value). Specifically, SPS (Single Point Status) is suitable for single-point status data, typically Boolean type and read-only, such as the on / off state of a switch. DPS (Double Point Status) is suitable for double-point status data, typically integer type and read-only, such as the state of a double-position switch. MV (Measured Value) is suitable for measured value data, typically floating-point type and read-only, such as voltage and current measurements. SPC (Single Point Control) is suitable for single-point control data, typically Boolean type and readable / writable, such as the on / off state of a control switch. DPC (Double Point Control) is used for two-point control data, which is usually integer and readable and writable, such as controlling a two-position switch. INC (Integrated Total) is used for cumulative value data, which is usually floating-point and readable and writable, such as the cumulative energy value.

[0099] Optionally, in this second embodiment, classifying the data points ensures that the generated ICD model file conforms to the EC61850 standard, guaranteeing the correct use and interoperability of each data point in the system. It also simplifies the management and processing of data points. Different categories of data points have different attributes and behavioral characteristics; classification allows for appropriate processing methods to be applied to different types of data points, thereby improving the efficiency and accuracy of automated ICD model file generation.

[0100] Example 3: Using the lxml open-source library to write ICD model files, the content of each main node of the ICD model file is filled in sequentially to complete the initial creation of the ICD model file.

[0101] Optionally, the first filling module includes:

[0102] The first filling unit is used to fill the header node of the model file with the model file's unique identifier, version information, revision information, file writing tool identifier, and file name mapping information;

[0103] The second filling unit is used to fill the communication configuration node of the intelligent electronic equipment of the substation into the communication configuration node of the model file. The communication information includes the device name, network address and physical address. The device name is obtained by using input parameters.

[0104] The third filling unit is used to fill the configuration information of the intelligent electronic equipment of the substation into the intelligent electronic equipment configuration node of the model file.

[0105] The fourth filling unit is used to fill the data type definition nodes of the model file with default values.

[0106] Optionally, in this third embodiment, as Figure 2The diagram shows the structure of the model file. The ICD model file has four main nodes: the Header node, the Communication configuration node, the IED (Intelligent Electronic Device) configuration node, and the DataTypeTemplates data type definition node. The Header node contains version and revision information, the file writing tool identifier, and name mapping information, describing the file itself. The Communication configuration node defines the communication information of the IED intelligent electronic device connection points in the subnet, including the network address and physical address of the intelligent electronic device. The IED intelligent electronic device configuration node describes the configuration of the IED intelligent electronic device, its included logical devices, logical node data objects, and communication service capabilities. The DataTypeTemplates data type definition node defines in detail the types of logical nodes appearing in the ICD model file, as well as the data objects and data attributes contained within those logical nodes. Based on the definition rules of the above four main nodes, information is automatically filled into the Header node, Communication configuration node, IED intelligent electronic device configuration node, and DataTypeTemplates data type definition node, with IEDName using an input parameter.

[0107] Optionally, in this third embodiment, the initial creation of the ICD model file can be automated by automatically filling each master node with content according to the definition rules of the master node of the ICD model file.

[0108] Example 4: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the Communication configuration node in the ICD model file is completed sequentially.

[0109] Optionally, the second filling module includes:

[0110] The fifth fill unit is used to create subnet nodes under the communication configuration node and fill the name and type of the subnet nodes with default values;

[0111] The sixth fill unit is used to create a device connection node under the subnet node, and fill in the device name of the device connection node with input parameters, and fill in the access point name and access point address of the device connection node with default values.

[0112] Optionally, in this fourth embodiment, as Figure 2The diagram showing the model file structure illustrates the creation of a SubNetwork subnet node under the Communication configuration node. The name and type of the SubNetwork subnet node are filled with default values. Under this subnet node, a ConnectedAP device node is added, specifying the IEDName using the input parameter and filling in other information with default values, including the access point name APName and access point address. This allows for the automated completion of the Communication configuration node in the ICD model file.

[0113] Example 5: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the IED smart electronic device configuration node in the ICD model file is completed sequentially.

[0114] Optionally, the second filling module includes:

[0115] The seventh fill unit is used to create an access point node under the intelligent electronic device configuration node and fill the name of the access point node with the default value;

[0116] The eighth filling unit is used to create a server node under the smart electronic device configuration node and fill the server node with default values.

[0117] Optionally, in this fifth embodiment, as Figure 2 The model file structure diagram shown includes an AccessPoint node under the IED node, with the name filled in using default values. Under the AccessPoint node, a Server node is added, with its basic information and structure filled in according to the default template; specific content can be further configured as needed.

[0118] Example 6: Using the lxml open-source library to write ICD model files, the automatic filling of each child node under the DataTypeTemplates data type definition node in the ICD model file is completed sequentially.

[0119] Optionally, the second filling module includes:

[0120] The creation unit is used to create logical node type nodes, data object type nodes, and data object nodes under the data type definition node;

[0121] The association unit is used to associate the forwarding data points in the data forwarding point table with logical node type nodes, data object type nodes, and data object nodes based on the data type of each forwarding data point in the data forwarding point table.

[0122] The ninth filling unit is used to create a logical device node under the configuration node of the intelligent electronic device, and to fill the forwarding data points of the data forwarding point table into the logical device node according to the logical node type node, the data object type node, and the data object node.

[0123] Optionally, in this sixth embodiment, as Figure 2 The structure diagram of the model file shown indicates that the DataTypeTemplates data type definition node contains LNodeType logical node type nodes, DOType data object type nodes, and DAType data object nodes. The NodeType node defines the type of the logical node and its contained data object (DO), the DOType data object type node defines the type of the data object and its contained data attribute (DA), and the DAType data object node defines the type of the data attribute and its contained basic data attribute (BDA). Accordingly, LNodeType logical node type nodes, DOType data object type nodes, and DAType data object nodes are created under the DataTypeTemplates data type definition node. Based on the data type of each forwarding data point in the data forwarding point table, it is associated with the corresponding LNodeType logical node type node, DOType data object type node, and DAType data object node. Here, the data type is the data type of each forwarding data point in the data forwarding point table after it has been classified into the basic common data class. Under the IED intelligent electronic device configuration node, create an LDevice logical device node and set its basic attributes. Under the LDevice logical device node, populate the forwarding data points in the data forwarding point table according to the LNodeType logical node type node, DOType data object type node, and DAType data object node.

[0124] Optionally, in this sixth embodiment, by associating and populating the LNodeType logical node type node, DOType data object type node, and DAType data object node to the LDevice logical device node according to the data point type in the data forwarding point table, it can be ensured that the planning and configuration of the logical device are correct, and that the data set and report control information are complete and comply with the EC61850 standard requirements, thereby ensuring the correct configuration and operation of the IED device.

[0125] In Example 7, while associating and populating the LNodeType logical node type node, DOType data object type node, and DAType data object node to the LDevice logical device node according to the data point type in the data forwarding point table, the number of logical nodes is planned according to the number of data points of each type, and the data set report control information under each logical device is improved.

[0126] Optionally, the second filling module includes:

[0127] The determining unit is used to determine the number of logical nodes under the logical device node based on the number of forwarding data points for each data type in the data forwarding point table.

[0128] The configuration unit is used to configure the data set and report control block of the logical node according to each forwarding data point in the data forwarding point table.

[0129] Optionally, in this seventh embodiment, the number of logical nodes under each LDevice logical device node is determined based on the number of forwarded data points for each data type in the data forwarding point table. Data types include SPS single-point status data, DPS dual-point status data, MV measurement value data, SPC single-point control data, DPC dual-point control data, and INC cumulative value data. Each logical node can handle a specific number of data points of the same type. Each logical node is configured with a DataSet containing all data points to be forwarded, and a Report Control Block (RCB) is configured under each logical node to define the triggering conditions for reports and the specific data set for reports. This ensures the correct planning and configuration of the logical devices, and that the data sets and report control information are complete and meet standard requirements, thereby guaranteeing the correct configuration and operation of the IED devices.

[0130] Example 8: The above-mentioned device further includes:

[0131] The determination module is used to determine the completeness and accuracy of the node content of each node in the model file after performing secondary filling of each child node in the model file according to the data forwarding point table, based on the protocol document specifications and file semantic syntax rules of the model file.

[0132] Optionally, in this embodiment eight, according to the file syntax and semantic rules specified in the IEC 61850 protocol document, every node of the ICD model file is read from beginning to end, and the completeness and correctness of the references of each node, data set, and report control block are checked. This ensures that all nodes and configurations comply with the requirements of the IEC 61850 standard.

[0133] For other examples of this embodiment, please refer to the examples above, which will not be repeated here.

[0134] Figure 4 This is a schematic diagram of an optional electronic device according to an embodiment of this application, such as... Figure 4 As shown, it includes a processor 402, a communication interface 404, a memory 406, and a communication bus 408. The processor 402, communication interface 404, and memory 406 communicate with each other via the communication bus 408.

[0135] Memory 406 is used to store computer programs;

[0136] When processor 402 executes a computer program stored in memory 406, it performs the following steps:

[0137] Obtain the data forwarding point table, which contains all forwarding data points of the substation and their data point information;

[0138] Create a model file for the substation according to the substation's protocol documentation and file structure specifications;

[0139] Each main node of the model file is initially populated sequentially.

[0140] The model file's child nodes are populated twice according to the data forwarding point table.

[0141] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0142] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0143] As an example, the memory 406 described above may include, but is not limited to, the acquisition module 302, creation module 304, first filling module 306, and second filling module 308 from the automatic model file creation device described above. Furthermore, it may include, but is not limited to, other module units from the automatic model file creation device described above, which will not be elaborated upon in this example.

[0144] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0145] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0146] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. The device that implements the above-described method for automatically creating model files can be a terminal device, such as a smartphone (e.g., an Android phone, an iOS phone), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0147] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.

[0148] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program is executed by a processor to perform the steps in the above-described automatic model file creation method.

[0149] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0150] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0151] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0152] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0153] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0155] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0156] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for automatically creating model files, characterized in that, include: Obtain the data forwarding point table, wherein the data forwarding point table contains all forwarding data points of the substation and their data point information; Create a model file for the substation according to the protocol documentation and file structure specifications. Each main node of the model file is initially populated sequentially. The model file is populated twice according to the data forwarding point table. The initial filling of each main node of the model file in sequence includes: filling the header node of the model file with the unique identifier, version information, revision information, file writing tool identifier, and file name mapping information; filling the communication configuration node of the intelligent electronic equipment of the substation with the communication information, wherein the communication information includes the device name, network address, and physical address, and the device name uses an input parameter; filling the configuration information of the intelligent electronic equipment of the substation with the intelligent electronic equipment configuration node of the model file; and filling the data type definition node of the model file with default values.

2. The method according to claim 1, characterized in that, After obtaining the data forwarding point table, the method further includes: Obtain the data type and read / write type of each forwarding data point from the data point information of each forwarding data point in the data forwarding point table; Based on the data type and read / write type of each forwarding data point, all forwarding data points in the data forwarding point table are classified into multiple basic public data classes; The aforementioned basic public data classes include single-point status data class, two-point status data class, measurement value data class, single-point control data class, two-point control data class, and cumulative value data class.

3. The method according to claim 1, characterized in that, The step of performing secondary filling on each child node of the model file according to the data forwarding point table includes: Create a subnet node under the communication configuration node, and fill the name and type of the subnet node with default values; Create a device connection node under the subnet node, and fill the device name of the device connection node with input parameters, and fill the access point name and access point address of the device connection node with default values.

4. The method according to claim 1, characterized in that, The step of performing secondary filling on each child node of the model file according to the data forwarding point table includes: Create an access point node under the intelligent electronic device configuration node, and populate the name of the access point node with default values; Create a server node under the configuration node of the smart electronic device, and populate the server node with default values.

5. The method according to claim 1, characterized in that, The step of performing secondary filling on each child node of the model file according to the data forwarding point table includes: Under the data type definition node, create logical node type nodes, data object type nodes, and data object nodes; Based on the data type of each forwarding data point in the data forwarding point table, associate the forwarding data points in the data forwarding point table with the logical node type node, the data object type node, and the data object node; A logical device node is created under the intelligent electronic device configuration node, and the forwarding data points of the data forwarding point table are filled into the logical device node according to the logical node type node, the data object type node, and the data object node.

6. The method according to claim 5, characterized in that, The step of performing secondary filling on each child node of the model file according to the data forwarding point table includes: The number of logical nodes under the logical device node is determined based on the number of forwarding data points for each data type in the data forwarding point table. Configure the data set and report control block of the logical node according to each forwarding data point in the data forwarding point table.

7. The method according to claim 1, characterized in that, After performing secondary filling on each child node of the model file according to the data forwarding point table, the method further includes: Based on the protocol document specifications and file semantic syntax rules of the model file, the completeness and accuracy of the node content of each node in the model file are determined.

8. An automatic model file creation device, characterized in that, include: The first acquisition module is used to acquire a data forwarding point table, wherein the data forwarding point table contains all forwarding data points of the substation and their data point information; A creation module is used to create a model file for the substation according to the protocol document specifications and file structure specifications of the substation. The first filling module is used to perform preliminary filling on each main node of the model file in sequence; The second filling module is used to fill each child node of the model file twice according to the data forwarding point table. The initial filling of each main node of the model file in sequence includes: filling the header node of the model file with the unique identifier, version information, revision information, file writing tool identifier, and file name mapping information; filling the communication configuration node of the intelligent electronic equipment of the substation with the communication information, wherein the communication information includes the device name, network address, and physical address, and the device name uses an input parameter; filling the configuration information of the intelligent electronic equipment of the substation with the intelligent electronic equipment configuration node of the model file; and filling the data type definition node of the model file with default values.

9. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.