A method and device for matching function based on P4rt-ovs
By using the P4rt-ovs and OVS matching domain technology in the interval layer of the smart substation, the problems of low packet matching efficiency and poor stability in the existing technology are solved, and faster and more accurate packet matching and grid stability are achieved.
Patent Information
- Application Number
- CN202211021397.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the prior art, the interval layer of the intelligent substation has a large workload and a slow transmission rate during the message matching process, and functional matching errors may cause the entire power grid to be paralyzed.
Using the P4rt-ovs-based matching function method, the packet is encapsulated into Ethernet frames in the station control layer of the intelligent substation, and the OVS matching domain is used in the IED of the interval layer to match and parse packets based on the OpenFlow protocol, thereby improving matching efficiency and accuracy.
It realizes faster and accurate packet matching in the partition layer of the smart substation, reduces workload, improves transmission rate, and enhances the stability of the power grid.
Smart Images

Figure CN115499522B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electric power intelligent substation, and in particular relates to a method and a device for a matching function based on P4rt-ovs. Background Art
[0002] The information transmission between each IED (electronic intelligent device) in the substation is mainly realized by splicing the encapsulation of the message and sending the flow table. The information transmission between each IED is supported by Ethernet. In the prior art, the intelligent substation encapsulates the message from the station control layer and sends it to the interval layer through the flow table. The IED in the interval layer has achieved the function of obtaining the message content between each IED by identifying the header in the message and receiving the message. However, the retrieval and matching of the message in each IED increases the workload of the interval layer, the transmission rate is relatively slow, and if there is a functional matching error in the IED, it will cause the paralysis of the entire power grid. Therefore, there is an urgent need for an efficient and accurate matching method that can quickly and accurately match the IED in the interval layer to the corresponding message matching method. Summary of the invention
[0003] The purpose of the present invention is to propose a method and device based on the matching function of P4rt-ovs to solve one or more technical problems existing in the prior art and at least provide a beneficial choice or create conditions.
[0004] In order to achieve the above object, according to one aspect of the present invention, a method for matching function based on P4rt-ovs is provided, and the method comprises the following steps:
[0005] S100: In the station control layer of the smart substation, the message is forwarded through the device network support;
[0006] S200: Encapsulate the message into an Ethernet frame for transmission;
[0007] S300: Transmit the Ethernet frame from the station control layer to the IED in the bay layer;
[0008] S400: The message matched and parsed in the IED is sent to the process layer through the flow table.
[0009] Furthermore, the smart substation is composed of a station control layer, an interval layer and a process layer, wherein the station control layer is mainly responsible for the network connection of the substation secondary equipment and forwarding messages, the interval layer is mainly responsible for the information exchange between IEDs, and the process layer is mainly responsible for the electronic components receiving messages and operating. In the step S100, the header and timestamp of the message are encapsulated into a GOOSE message through the network interaction between the substation secondary equipment at the station control layer, and the substation secondary equipment network supports message forwarding.
[0010] Furthermore, in step S200, the network information interaction of the secondary equipment in the substation is included in the station control layer, the information interaction message is encapsulated, and the PTP message is encapsulated using the UDP protocol and the Ethernet protocol IPv4, and the method steps are as follows:
[0011] S201: In the application layer, the PTP message is encapsulated into a PTP message through the GOOSE message and the timestamp;
[0012] S202: encapsulating the PTP message with a UDP header into a UDP message at the transport layer;
[0013] S203: adding an IPv4 IP header at the network layer, and encapsulating the UDP message into an IP message;
[0014] S204: Encapsulating the IP message into an Ethernet frame for transmission in the data link layer;
[0015] Among them, the application layer, transport layer, network layer and data link layer all belong to the layers where different headers are encapsulated in the PTP message encapsulation. The PTP message consists of a header, a message body and a timestamp. The message body includes: synchronization message, delay request message, follow-up message and delay response message.
[0016] Furthermore, in step S300, the Ethernet frame is sent from the station control layer to the bay layer and transmitted to the IED of the bay layer. The method includes the following steps:
[0017] S301: Identify and screen the message in the Ethernet frame through the identification code in the IED, convert the message body of the Ethernet frame through the identification code, convert it into the message body corresponding to the identification code for transmission, and transmit the corresponding identified message body into the IED of the spacing layer;
[0018] S302: After the message transmission enters the IED of the interval layer, the Ethernet frame will enter the OVS matching domain in the IED, and the OVS matching domain is constructed in the IED based on the OpenFlow protocol. When the Ethernet frame transmission enters the IED, a new OVS matching domain is created in the IED based on the OpenFlow protocol, wherein the logical fields of the required functions defined in the OVS matching domain based on the OpenFlow protocol are compatible with the logical fields of the previous matching domain. The message encapsulated in the Ethernet frame selects the message body corresponding to the logic in the matching domain according to the logical fields in the matching domain to match with the IED, obtain a first matching result, and parse the message;
[0019] S303: In the ovs-ofctl module in the OVS matching domain, the first matching result is received and classified through an upcall processing flow, wherein the upcall processing flow extracts information from the key of the GOOSE message to form a Flow, fills the information of the upcall processing flow through the Flow, and adds goose_appid as a logical field in the command in the upcall processing flow, wherein the goose_appid is the GOOSE message in the Ethernet frame. The GOOSE message in the Ethernet frame needs to use appid as the key. E message is matched, and any message of PTP, UDP, and IPv4 in the message encapsulation is parsed, and it is classified according to the message type, and the parsed message is inserted into the table entry. The user layer sends a packet to the OVS, and the OVS receives the packet, parses the header field of the packet, forms a key, and performs a match search in the table entry according to the key. After the match is successful, the table entry is combined with the packet to form a second matching result, wherein the table entry and the packet are transmitted by the user layer to the OVS matching domain, and the user layer is the monitoring device of the smart substation;
[0020] S304: In the OVS matching domain, the second matching result is output, and the Flow is inserted into and executed in the packet to form a flow table, and the flow table is sent to the intelligent process layer in the IED.
[0021] Furthermore, in step S400, a matching domain is extracted from the OVS in the IED, the second matching result is found, and the second matching results of the matching domains in each of the IEDs are combined. After detecting the matching domains in each of the IEDs, the second matching result is inserted into the OVS flow table, and the OVS flow table is sent down to the process layer of the smart substation, where the process layer is a switch that receives the flow table sent down. When the packet in the flow table enters the switch, a table entry is matched inside the switch. When the switch table entry fails to match, the flow table is sent to the user layer, and the table entry of the flow table is searched at the user layer for matching. The packet that successfully matches at the user layer will send the matched packet down to the process layer.
[0022] Furthermore, a device for matching function based on P4rt-ovs is provided, and the device is based on a smart substation, wherein the smart substation comprises: a station control layer, an interval layer and a process layer, wherein the station control layer has a message encapsulation module, and the interval layer and the process layer have an OVS matching module and a flow table sending module, and the message encapsulation module, the OVS matching module and the flow table sending module implement the steps of any one of the above-mentioned methods for matching function based on P4rt-ovs when executing the computer program.
[0023] The beneficial effects of the present invention are as follows: in the IED of the interval layer, the message encapsulated in the Ethernet frame is matched through the OVS matching domain, and the message body is converted, so as to achieve better execution of the functions required by the IED, and by receiving and classifying the messages through the upcall processing flow, the message matching speed is accelerated, and the message matching can also be made more accurate. Through the user layer's monitoring of message matching and convection table distribution, problems in the information exchange process in the substation can be obtained in the first time, which is convenient for better maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and other features of the present invention will become more obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present invention represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0025] Figure 1 A system flow chart of a method and device for matching function based on P4rt-ovs;
[0026] Figure 2 A flow chart of a method and apparatus for generating a first matching result based on a matching function of P4rt-ovs;
[0027] Figure 3 The present invention is a flowchart of a method and device for generating a second matching result based on the matching function of P4rt-ovs. DETAILED DESCRIPTION
[0028] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0029] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0030] like Figure 1 As shown, a method for matching function based on P4rt-ovs is provided, and the method comprises the following steps:
[0031] S100: In the station control layer of the smart substation, the message is forwarded through the device network support;
[0032] S200: Encapsulate the message into an Ethernet frame for transmission;
[0033] S300: Transmit the Ethernet frame from the station control layer to the IED in the bay layer;
[0034] S400: The message matched and parsed in the IED is sent to the process layer through the flow table.
[0035] Furthermore, the smart substation is composed of a station control layer, an interval layer and a process layer, wherein the station control layer is mainly responsible for the network connection of the substation secondary equipment and forwarding messages, the interval layer is mainly responsible for the information exchange between IEDs, and the process layer is mainly responsible for the electronic components receiving messages and operating. In the step S100, the header and timestamp of the message are encapsulated into a GOOSE message through the network interaction between the substation secondary equipment of the station control layer, and the substation secondary equipment network supports message forwarding, wherein GOOSE is a special Ethernet message, and appid must be identified, so appid must be added as a key. The remote master station sends the GOOSE message, which passes through the station control layer and goes down to the IED in the interval layer to control the knife switch.
[0036] Furthermore, in step S200, the network information interaction of the secondary equipment in the substation is included in the station control layer, the information interaction message is encapsulated, and the PTP message is encapsulated using the UDP protocol and the Ethernet protocol IPv4, and the method steps are as follows:
[0037] S201: In the application layer, the PTP message is encapsulated into a PTP message through the GOOSE message and the timestamp;
[0038] S202: encapsulating the PTP message with a UDP header into a UDP message at the transport layer;
[0039] S203: adding an IPv4 IP header at the network layer, and encapsulating the UDP message into an IP message;
[0040] S204: Encapsulating the IP message into an Ethernet frame for transmission in the data link layer;
[0041] Among them, the application layer, transport layer, network layer and data link layer all belong to the layers where different headers are encapsulated in the PTP message encapsulation. The PTP message consists of a header, a message body and a timestamp. The message body includes: synchronization message, delay request message, follow-up message and delay response message. Among them, UDP is a non-connection protocol and IPv4 is a connection protocol. These two protocols are responsible for speed transmission and accurate transmission respectively.
[0042] Furthermore, in step S300, if Figure 2 and Figure 3 As shown, the Ethernet frame is sent from the station control layer to the bay layer and transmitted to the IED of the bay layer. The method includes the following steps:
[0043] S301: Identify and screen the message in the Ethernet frame through the identification code in the IED, convert the message body of the Ethernet frame through the identification code, convert it into the message body corresponding to the identification code for transmission, and transmit the corresponding identified message body into the IED of the spacing layer;
[0044] S302: After the message transmission enters the IED of the interval layer, the Ethernet frame will enter the OVS matching domain in the IED, and the OVS matching domain is constructed in the IED based on the OpenFlow protocol. When the Ethernet frame transmission enters the IED, a new OVS matching domain is created in the IED based on the OpenFlow protocol, wherein the logical fields of the required functions defined in the OVS matching domain based on the OpenFlow protocol are compatible with the logical fields of the previous matching domain. The message encapsulated in the Ethernet frame selects the message body corresponding to the logic in the matching domain according to the logical fields in the matching domain to match with the IED, obtain a first matching result, and parse the message;
[0045] S303: In the ovs-ofctl module in the OVS matching domain, the first matching result is received and classified through an upcall processing flow, wherein the upcall processing flow extracts information from the key of the GOOSE message to form a Flow, fills the information of the upcall processing flow through the Flow, and adds goose_appid as a logical field in the command in the upcall processing flow, wherein the goose_appid is the GOOSE message in the Ethernet frame. The GOOSE message in the Ethernet frame needs to use appid as the key. E message is matched, and any message of PTP, UDP, and IPv4 in the message encapsulation is parsed, and it is classified according to the message type, and the parsed message is inserted into the table entry. The user layer sends a packet to the OVS, and the OVS receives the packet, parses the header field of the packet, forms a key, and performs a match search in the table entry according to the key. After the match is successful, the table entry is combined with the packet to form a second matching result, wherein the table entry and the packet are transmitted by the user layer to the OVS matching domain, and the user layer is the monitoring device of the smart substation;
[0046] S304: In the OVS matching domain, the second matching result is output, and the Flow is inserted into and executed in the packet to form a flow table, and the flow table is sent to the intelligent process layer in the IED.
[0047] Furthermore, in step S400, a matching domain is extracted from the OVS in the IED, the second matching result is found, and the second matching results of the matching domains in each of the IEDs are combined. After detecting the matching domains in each of the IEDs, the second matching result is inserted into the OVS flow table, and the OVS flow table is sent down to the process layer of the smart substation, where the process layer is a switch that receives the flow table sent down. When the packet in the flow table enters the switch, a table entry is matched inside the switch. When the switch table entry fails to match, the flow table is sent to the user layer, and the table entry of the flow table is searched at the user layer for matching. The packet that successfully matches at the user layer will send the matched packet down to the process layer.
[0048] The detection of the matching domain includes the detection of the dependency of the matching domain, the detection of the duplication of the matching domain and the detection of the validity of the matching domain, and their functions are respectively:
[0049] Dependency detection of matching domains: Determine whether the fields meet the conditions in the flow;
[0050] Matching domain duplication detection: Make sure the field does not exist in the flow;
[0051] Matching domain validity check: Determine the scope validity of the field.
[0052] Furthermore, a method and device for matching function based on P4rt-ovs is characterized in that the smart substation includes: a station control layer, an interval layer and a process layer, the station control layer has a message encapsulation module, the interval layer and the process layer have an OVS matching module and a flow table sending module, and the message encapsulation module, the OVS matching module and the flow table sending module implement the steps in any one of the above-mentioned methods of matching function based on P4rt-ovs when executing the computer program.
[0053] The functions of the modules are:
[0054] Message encapsulation module: encapsulates and forwards the message with the support of the device network in the station control layer;
[0055] OVS matching module: The IED in the bay layer builds an OVS matching domain to match the corresponding functionality of the message;
[0056] Flow table sending module: sends the matching result of the message from the interval layer to the process layer through the flow table sending method.
[0057] The message encapsulation module, OVS matching module and flow table delivery module implement the steps in the above-mentioned method of matching function based on P4rt-ovs when executing the computer program. Those skilled in the art can understand that the example is only an example of a method and device based on the matching function of P4rt-ovs, and does not constitute a limitation on a device based on the matching function of P4rt-ovs. It may include more or less components than the example, or a combination of certain components, or different components. For example, the device based on the matching function of P4rt-ovs may also include input and output devices, network access devices, buses, etc.
[0058] Although the description of the present invention has been quite detailed and has been described in particular with respect to several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, so as to effectively cover the intended scope of the present invention. In addition, the present invention is described above with the embodiments foreseeable by the inventors, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that are not currently foreseen may still represent equivalent changes of the present invention.
[0059] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
Claims
1. A method based on the matching function of P4rt-ovs, characterized in that, The method comprises the following steps: S100: In the station control layer of the smart substation, the message is forwarded through the device network support; S200: Encapsulate the message into an Ethernet frame for transmission; S300: Transmit the Ethernet frame from the station control layer to the IED in the bay layer; S400: The message matched and parsed in the IED is sent to the process layer through the flow table; In step S300, the Ethernet frame is sent from the station control layer to the bay layer and transmitted to the IED of the bay layer. The method includes the following steps: S301: Identify and screen the message in the Ethernet frame through the identification code in the IED, convert the message body of the Ethernet frame through the identification code, convert it into the message body corresponding to the identification code for transmission, and transmit the corresponding identified message body into the IED of the spacing layer; S302: After the message transmission enters the IED of the interval layer, the Ethernet frame will enter the OVS matching domain in the IED, and the OVS matching domain is constructed in the IED based on the OpenFlow protocol. When the Ethernet frame transmission enters the IED, a new OVS matching domain is created in the IED based on the OpenFlow protocol, wherein the logical fields of the required functions defined in the OVS matching domain based on the OpenFlow protocol are compatible with the logical fields of the previous matching domain. The message encapsulated in the Ethernet frame selects the message body corresponding to the logic in the matching domain according to the logical fields in the matching domain to match with the IED, obtain a first matching result, and parse the message; S303: In the ovs-ofctl module in the OVS matching domain, the first matching result is received and classified through an upcall processing flow, wherein the upcall processing flow extracts information from the key of the GOOSE message to form a Flow, fills the information of the upcall processing flow through the Flow, and adds goose_appid as a logical field in the command in the upcall processing flow, wherein the goose_appid is the GOOSE message in the Ethernet frame. The GOOSE in the Ethernet frame needs to use appid as the key. The message is matched, and any message of PTP, UDP, and IPv4 in the message encapsulation is parsed, and it is classified according to the message type, and the parsed message is inserted into the table item. The user layer sends a packet to the OVS, and the OVS receives the packet, parses the header field of the packet, forms a key, and performs a match search in the table item according to the key. After the match is successful, the table item is combined with the packet to form a second matching result, wherein the table item and the packet are transmitted from the user layer to the OVS matching domain, and the user layer is a monitoring device of a smart substation; S304: In the OVS matching domain, the second matching result is output, and the Flow is inserted into and executed in the packet to form a flow table, and the flow table is sent to the intelligent process layer in the IED.
2. A method based on the matching function of P4rt-ovs according to claim 1, characterized in that: The smart substation consists of a station control layer, an interval layer and a process layer, wherein the station control layer is mainly responsible for the network connection of the substation secondary equipment and forwarding messages, the interval layer is mainly responsible for the information exchange between IEDs, and the process layer is mainly responsible for the electronic components receiving messages and operating. In step S100, the header and timestamp of the message are encapsulated into a GOOSE message through the network interaction between the substation secondary equipment at the station control layer, and the substation secondary equipment network supports message forwarding.
3. A method based on the matching function of P4rt-ovs according to claim 1, characterized in that: In step S200, the network information interaction of the secondary equipment in the substation is included in the station control layer, the information interaction message is encapsulated, and the PTP message is encapsulated using the UDP protocol and the Ethernet protocol IPv4. The method steps are as follows: S201: In the application layer, the PTP message is encapsulated into a PTP message through the GOOSE message and the timestamp; S202: encapsulating the PTP message with a UDP header into a UDP message at the transport layer; S203: adding an IPv4 IP header at the network layer, and encapsulating the UDP message into an IP message; S204: Encapsulating the IP message into an Ethernet frame for transmission in the data link layer; Among them, the application layer, transport layer, network layer and data link layer all belong to the layers where different headers are encapsulated in the PTP message encapsulation. The PTP message consists of a header, a message body and a timestamp. The message body includes: synchronization message, delay request message, follow-up message and delay response message.
4. A method based on the matching function of P4rt-ovs according to claim 1, characterized in that: In the step S400, a matching domain is extracted from the OVS in the IED, the second matching result is found, and the second matching results of the matching domains in each of the IEDs are combined. After detecting the matching domains in each of the IEDs, the second matching result is inserted into the OVS flow table, and the OVS flow table is sent down to the process layer of the smart substation. The process layer is a switch that receives the flow table sent down. When the packet in the flow table enters the switch, the table item is matched inside the switch. When the switch table item fails to match, the flow table is sent to the user layer, and the table item of the flow table is searched at the user layer for matching. The packet that successfully matches at the user layer will send the matched packet to the process layer through the flow table.
5. A device based on the matching function of P4rt-ovs, characterized in that: The device is based on a smart substation, which includes: a station control layer, an interval layer and a process layer, a message encapsulation module in the station control layer, an OVS matching module and a flow table sending module in the interval layer and the process layer, and the message encapsulation module, the OVS matching module and the flow table sending module implement the steps in any one of the methods of the matching function based on P4rt-ovs in claims 1-4 when executing a computer program.