Modular design method and system for communication protocol of power system
Through the modular design method, communication data is separated from specific devices, virtual devices and analysis interfaces are built, and the layered architecture of communication protocols is realized, which solves the problem of maintaining communication protocols in traditional power systems and improves the flexibility and efficiency of the power system.
Patent Information
- Application Number
- CN202510500677.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-08
AI Technical Summary
The tight coupling of traditional power system communication protocols with business applications leads to large maintenance workloads and lack of flexibility, which cannot meet the growing demand for information fusion.
The modular design method is adopted to map communication data to the preset communication model, build a private virtual device of the communication module, design a model file analysis interface and an external data interaction interface, establish an independent dynamic library of communication protocols, and perform layered design.
The separation of the communication module and specific devices is realized, versatility and adaptability are improved, maintenance workload is reduced, the flexibility and scalability of the system are enhanced, and the adaptability and efficiency of the communication protocol are improved.
Smart Images

Figure CN120455552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system communications, and in particular to a modular design method and system for a power system communication protocol. Background Art
[0002] With the proliferation of smart substations and the increasing demand for information fusion, power system communication protocols face numerous challenges. Traditional power system communication protocols generally use point-to-table data descriptions. These protocols are tightly coupled with business applications, resulting in significant maintenance workloads and a lack of flexibility. These protocols are no longer able to meet the growing demand for power system information. Summary of the Invention
[0003] The purpose of the present invention is to provide a modular design method and system for a power system communication protocol in order to solve at least one of the above technical problems.
[0004] In the first aspect, an embodiment of the present invention provides a modular design method for a power system communication protocol, comprising: mapping the communication data of a target communication device to a preset communication model to construct a virtual device private to the communication module; the target communication device is a device of the power system; based on the fixed format of the model file and the communication protocol access requirements, a model file parsing interface is constructed; based on the classification of communication business functions, an external data interaction interface of the communication module is constructed; based on modular design, an independent communication protocol dynamic library is constructed; and the communication protocol is designed in layers to obtain a layered architecture communication protocol.
[0005] Furthermore, mapping the communication data of the target communication device to a preset communication model includes: assembling and applying a plurality of preset attributes in the communication data of the target communication device based on a JSOM method; the preset attributes are attributes in the preset communication model.
[0006] Furthermore, based on the fixed format of the model file and the access requirements of the communication protocol, a model file parsing interface is constructed, including: based on the fixed format of the model file and the access requirements of the communication protocol, the data access interface provided by the JSON library is encapsulated to construct the model file parsing interface.
[0007] Furthermore, the communication protocol dynamic library includes multiple independent communication protocol modules, and each communication protocol module corresponds to a communication protocol.
[0008] Furthermore, the layered architecture communication protocol includes a data layer, a functional layer, a coding layer, a security layer and a link layer.
[0009] In the second aspect, an embodiment of the present invention also provides a modular design system for a power system communication protocol, comprising: a communication data mapping unit, a parsing interface construction unit, an external interface construction unit, a communication protocol independent unit and a hierarchical design unit; wherein, the communication data mapping unit is used to map the communication data of the target communication device to a preset communication model to construct a virtual device private to the communication module; the target communication device is a device of the power system; the parsing interface construction unit is used to construct a model file parsing interface based on the fixed format of the model file and the communication protocol access requirements; the external interface construction unit is used to construct an external data interaction interface of the communication module based on the classification of communication business functions; the communication protocol independent unit is used to construct an independent communication protocol dynamic library based on modular design; the hierarchical design unit is used to perform hierarchical design on the communication protocol to obtain a hierarchical architecture communication protocol.
[0010] Furthermore, the communication data mapping unit is further configured to assemble and apply a plurality of preset attributes in the communication data of the target communication device based on a JSOM method; the preset attributes are attributes in a preset communication model.
[0011] Furthermore, the parsing interface construction unit is further used to encapsulate the data access interface provided by the JSON library based on the fixed format of the model file and the access requirements of the communication protocol, and to construct a model file parsing interface.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method provided in the embodiment of the present invention when executing the computer program.
[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0014] The present invention provides a method and system for modular design of power system communication protocols. By mapping device data onto a communication model, a private virtual device of the communication module is established, thereby separating the communication data from the specific device. By designing a model file parsing interface, the communication module is separated from the model file. By designing an external data interaction interface of the communication module, the real-time data of the device can be acquired and set, thereby separating the communication module from the specific device. Through modular design, the communication protocol is separated in the form of a dynamic library, thereby achieving flexible version management and expansion when requirements change. By performing a layered design on the communication protocol, the architecture reuse and local expansion of the communication code are achieved. The present invention can improve the versatility, adaptability, and scalability of the communication module, while also providing a strong guarantee for the stability and efficiency of the system, thereby alleviating the technical problems of the existing technology such as the large maintenance workload and lack of flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] Figure 1 A flowchart of a modular design method for a power system communication protocol provided by an embodiment of the present invention;
[0017] Figure 2 A schematic diagram of the overall design architecture of a communication module provided by an embodiment of the present invention;
[0018] Figure 3 A schematic diagram of a communication model file provided by an embodiment of the present invention;
[0019] Figure 4 A schematic diagram of a layered architecture communication protocol provided by an embodiment of the present invention;
[0020] Figure 5 A schematic diagram of a modular design system for a power system communication protocol provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0022] Example 1
[0023] Figure 1 This is a flow chart of a modular design method for a power system communication protocol according to an embodiment of the present invention. Figure 1 As shown, the method specifically includes the following steps:
[0024] Step S102 : Mapping the communication data of the target communication device to a preset communication model to construct a virtual device private to the communication module; the target communication device is a device of the power system.
[0025] Step S104: constructing a model file parsing interface based on the fixed format of the model file and the communication protocol access requirements.
[0026] Step S106: constructing an external data interaction interface of the communication module based on the communication service function classification.
[0027] Step S108: Building an independent communication protocol dynamic library based on modular design.
[0028] Step S110 , performing layered design on the communication protocol to obtain a layered architecture communication protocol.
[0029] Figure 2 Schematic diagram of the overall design architecture of a communication module provided according to an embodiment of the present invention. Figure 2 As shown, the target communication device in the embodiment of the present invention includes protection equipment, measurement and control equipment, stabilization and control equipment and other equipment.
[0030] Specifically, step S102 further includes the following steps: assembling and applying a plurality of preset attributes in the communication data of the target communication device based on the JSOM method; the preset attributes are attributes in the preset communication model.
[0031] Traditional communication data comes from the device's configuration file, which is the external representation of the device but is not designed specifically for communication. The configuration file contains a lot of information that is not related to communication, such as the device's hardware characteristics, protection function configuration, operating parameters, etc.
[0032] To avoid tightly integrating communication with specific devices, the communication module requires a universal model, independent of device-specific customization. This model should be able to separate communication data. Actual devices need to map data to the communication model. This embodiment of the present invention uses JavaScript Object Notation (JSON) to assemble and apply defined properties. If the attribute data type is a structure, multi-level nested representation is supported.
[0033] Figure 3Schematic diagram of a communication model file provided according to an embodiment of the present invention. Figure 3 As shown, the JSON file of the communication model is divided into the Protocol parameter area, the Dataset point table parameter area, and the Device parameter area. The specific contents of each parameter area are as follows:
[0034] Protocol: Records the name and version of the communication protocol used.
[0035] Dataset: A table of information points displayed according to the data format defined by the communication protocol. Traditional communication protocols such as 103, 104, and Modbus are actually based on the concept of point tables. Each different group contains several objects.
[0036] Device: This section is designed based on device configuration and aims to display static configuration information for all device data. Currently, devices are displayed using data types and data points. Therefore, we use data objects such as events, alarms, telesignaling, telemetering, protection calculations, pressure plates, and fixed values. Each object contains an ordered set of values, known as a data point, which contains the static configuration for that type of data. The device template is independent of the protocol used or the configuration of the communication point table; it is only relevant to the device's data description capabilities.
[0037] Different devices only need to select the data information they need to communicate in the Dataset part and realize the mapping with the model, which can realize the separation of communication data and specific devices, thereby improving the versatility and adaptability of the communication module.
[0038] Specifically, step S104 also includes: based on the fixed format of the model file and the access requirements of the communication protocol, encapsulating the data access interface provided by the JSON library, and constructing a model file parsing interface.
[0039] The model file parsing interface is used to obtain configuration information within the communication module. Its parameters and return values are derived solely from the model file. The data access interface provided by the JSON library is encapsulated based on the fixed file format and traditional protocol access requirements. The access data types are categorized according to Table 1. This allows the interface description to remain unchanged when the model file description format changes, thus achieving separation between the model file parsing interface and the model file.
[0040] Table 1 Communication model file parsing interface
[0041]
[0042]
[0043] Specifically, in step S106, the communication module's external data exchange interface is used to retrieve or set information in real time through the device. This data changes dynamically during device operation. The communication module's primary task is to identify and transmit this data and to interact with the monitoring system. The data exchange interface shown in Table 2 is designed based on business function classification for the communication module to call. This ensures that regardless of changes in device data format, storage location, or acquisition method, the communication module uses a unified interface to retrieve and set data.
[0044] Table 2 Communication module external data interaction interface
[0045]
[0046]
[0047] Specifically, the communication protocol dynamic library includes multiple independent communication protocol modules, and each communication protocol module corresponds to a communication protocol.
[0048] Currently, the code for traditional communication protocols, such as serial port 103, Ethernet 103, Modbus 104, and 101, is often developed and compiled alongside business applications. This lacks a clear distinction between these two applications and prevents them from being fully independent. By separating communication modules from business applications through the method provided by the present invention, each independent communication module is designed as a dynamic library and made available to business applications. Each communication protocol module has independent naming and versioning. For example, Ethernet 103 is named libnet103.so.1.0.1. Independent communication protocol dynamic libraries enable convenient business expansion and flexible versioning.
[0049] Specifically, the layered architecture communication protocol includes a data layer, a functional layer, a coding layer, a security layer and a link layer.
[0050] Traditional communication protocols are relatively simple in functionality, leading to a lack of layered design during coding, often including all aspects together. This prevents reuse of different communication protocols, even though they may have similar functionality. New communication protocols must be developed from scratch, and the quality of their development depends on the developer's own skills.
[0051] Figure 4 Schematic diagram of a layered architecture communication protocol provided according to an embodiment of the present invention. Figure 4 As shown in the figure, the communication code is designed in layers: data layer, function layer, coding layer, security layer, and link layer. In this way, the architecture of the communication code can be reused and partially replaced. When developing a new communication protocol, it is possible to selectively expand the corresponding layer based on the differences, greatly improving development efficiency.
[0052] The modular design method for a power system communication protocol provided by the present invention can adapt to a variety of relay protection products, operating systems, and hardware architectures, meeting the ever-increasing demands for power system functionality and information. By adopting the modular design method for a communication protocol, the maintenance workload can be reduced. Due to the modular design characteristics of the present invention, maintenance and upgrades become simpler and more efficient.
[0053] The present invention can support a variety of different power system equipment, operating systems and hardware architectures, ensure protocol standardization, and promote device interoperability; the present invention also takes into account the integration of device information and new communication technologies, such as cloud platforms and Internet of Things protocols. This integration helps to improve the operational efficiency, reliability and safety of the power system; by adopting this novel communication protocol modular design method and integrating new technologies, the present invention can promote the technological progress of the power system and further improve the overall operational efficiency.
[0054] As can be seen from the above description, the method provided by the present invention provides a communication protocol solution for the power system that is highly adaptable, flexible, easy to maintain and upgrade, meets the growing communication needs of modern power systems, and promotes the advancement of related technologies and efficiency improvements.
[0055] Example 2
[0056] Figure 5 Schematic diagram of a modular design system for a power system communication protocol according to an embodiment of the present invention. Figure 5 As shown, the system includes: a communication data mapping unit 10, a parsing interface construction unit 20, an external interface construction unit 30, a communication protocol independent unit 40 and a layered design unit 50.
[0057] Specifically, the communication data mapping unit 10 is used to map the communication data of the target communication device to a preset communication model to construct a virtual device private to the communication module; the target communication device is a device of the power system.
[0058] The parsing interface building unit 20 is used to build a model file parsing interface based on the fixed format of the model file and the communication protocol access requirements.
[0059] The external interface construction unit 30 is used to construct the external data interaction interface of the communication module based on the communication service function classification.
[0060] The communication protocol independent unit 40 is used to build an independent communication protocol dynamic library based on modular design.
[0061] The layered design unit 50 is used to perform layered design on the communication protocol to obtain a layered architecture communication protocol.
[0062] Specifically, the communication data mapping unit 10 is further configured to assemble and apply a plurality of preset attributes in the communication data of the target communication device based on the JSOM method; the preset attributes are attributes in the preset communication model.
[0063] Specifically, the parsing interface construction unit 20 is further configured to encapsulate the data access interface provided by the JSON library based on the fixed format of the model file and the access requirements of the communication protocol, and to construct a model file parsing interface.
[0064] The present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the embodiment of the present invention when executing the computer program.
[0065] The present invention also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0066] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0067] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A modular design method for a power system communication protocol, characterized in that: include: Mapping the communication data of the target communication device to a preset communication model to construct a virtual device private to the communication module; The target communication device is a device of a power system; Build a model file parsing interface based on the fixed format of the model file and the communication protocol access requirements; Based on the classification of communication business functions, build the external data interaction interface of the communication module; Based on modular design, build an independent communication protocol dynamic library; The communication protocol is designed in layers to obtain a layered architecture communication protocol.
2. The method according to claim 1, wherein: Mapping the communication data of the target communication device to the preset communication model includes: assembling and applying multiple preset attributes in the communication data of the target communication device based on the JSOM method; the preset attributes are attributes in the preset communication model.
3. The method according to claim 1, wherein: Based on the fixed format of the model file and the access requirements of the communication protocol, a model file parsing interface is constructed, including: based on the fixed format of the model file and the access requirements of the communication protocol, the data access interface provided by the JSON library is encapsulated to construct the model file parsing interface.
4. The method according to claim 1, wherein: The communication protocol dynamic library includes multiple independent communication protocol modules, and each communication protocol module corresponds to a communication protocol.
5. The method according to claim 1, wherein: The layered architecture communication protocol includes a data layer, a functional layer, a coding layer, a security layer and a link layer.
6. A modular design system for power system communication protocols, characterized in that: include: Communication data mapping unit, parsing interface construction unit, external interface construction unit, communication protocol independent unit and layered design unit; among them, The communication data mapping unit is used to map the communication data of the target communication device to a preset communication model to construct a virtual device private to the communication module; the target communication device is a device of the power system; The parsing interface construction unit is used to construct a model file parsing interface based on the fixed format of the model file and the communication protocol access requirements; The external interface construction unit is used to construct an external data interaction interface of the communication module based on the communication service function classification; The communication protocol independent unit is used to build an independent communication protocol dynamic library based on modular design; The layered design unit is used to perform layered design on the communication protocol to obtain a layered architecture communication protocol.
7. The system according to claim 6, characterized in that: The communication data mapping unit is further configured to assemble and apply a plurality of preset attributes in the communication data of the target communication device based on a JSOM method; the preset attributes are attributes in a preset communication model.
8. The system according to claim 6, characterized in that: The parsing interface construction unit is further used to encapsulate the data access interface provided by the JSON library based on the fixed format of the model file and the communication protocol access requirements, and to construct the model file parsing interface.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.