Method for dynamically configuring GOOSE / SV forwarding path of switch based on message analysis and switch
By adopting a dynamic configuration method based on message resolution in switches in the power industry, dynamically updating GOOSE/SV forwarding path information is solved, and the cumbersome problem of switch communication port replacement in the existing technology is achieved, and the effect of simplifying configuration and improving network stability is achieved.
Patent Information
- Application Number
- CN202411802141.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-25
AI Technical Summary
The existing GOOSE/SV forwarding path configuration solution in the power industry cannot conveniently replace the switch communication port, resulting in cumbersome engineering configuration and large maintenance workload.
Through a dynamic configuration method based on message analysis, the input GOOSE/SV packets are parsed in real time, forwarding path information is dynamically updated, switch operation configuration is automatically updated, and network maintenance workload is reduced.
The dynamic configuration of GOOSE/SV paths is realized, the project site configuration is simplified, the network reliability and stability is improved, the maintenance complexity is reduced, and economic benefits are brought.
Smart Images

Figure CN119697023A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to, but is not limited to, the fields of power systems and industrial automation, and in particular to a method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing and a switch. Background Art
[0002] GOOSE / SV forwarding path configuration is an effective solution for the current power industry to solve the problems of rapid message flooding and accurate message replication and transmission. It solves the problems of transmission bandwidth occupation during multicast flooding and packet loss caused by busy switching chip bus, avoids the impact of flooded messages in the network on other devices in the network, and improves the stability of the network.
[0003] In order to implement GOOSE / SV forwarding path configuration, a series of engineering configurations are generally required. 1. First, you need to establish the connection relationship between the communication ports of switches, protection, measurement and control devices in the SCD configuration tool; 2. Then export the switch configuration file containing the port input and output GOOSE / SV, that is, the CSD file; 3. Download the CSD configuration file into the switch to complete the configuration of the entire site.
[0004] The CSD configuration file is based on the switch port. Once generated by the tool, a certain switch port is specified. If the business needs to change the port, the switch communication port cannot be quickly changed and must be started from step 1 above. This introduces a lot of engineering configuration and greatly increases the maintenance workload of the switch. Summary of the invention
[0005] When the GOOSE / SV forwarding path configuration scheme is used for switches in the power industry, there is a problem that the switch communication port cannot be conveniently replaced. The present invention provides a method and a switch for dynamically configuring the GOOSE / SV forwarding path of the switch based on message parsing. The method can dynamically discover the replacement of the switch port, sample the input GOOSE / SV messages in real time, obtain the changed GOOSE / SV forwarding path information, and automatically update the running configuration of the switch, thereby reducing the workload of network maintenance.
[0006] To solve the above problems, the present invention adopts the following technical solutions.
[0007] A first aspect of the present invention provides a method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing, comprising:
[0008] The step of initializing the forwarding path information includes: parsing the GOOSE / SV forwarding path static configuration file CSD of the switch, extracting the forwarding path information table; downloading the forwarding path information table to the preset sampling module and the switching chip as pre-configuration information and switching chip configuration information respectively;
[0009] The steps of dynamically configuring the forwarding path information include: the pre-configuration module parses the input GOOSE / SV message in real time, extracts the forwarding path information of the GOOSE / SV message, compares it with the pre-configuration information, and when there is a difference, updates the forwarding path information table, pre-configuration information and switching chip configuration in the CPU cache, and generates a switch configuration log.
[0010] Optionally, the forwarding path information table is a three-element forwarding path information table including a multicast address, an input port, and an output port.
[0011] Optionally, the multicast address is used as an index to parse the Switch element content of the CSD file, and the GOOSEIN, GOOSEOUT, SVIN, and SVOUT attribute contents of each port are traversed to obtain a three-element forwarding path information table including the multicast address, input port, and output port.
[0012] Optionally, the step of dynamically configuring the forwarding path information specifically includes:
[0013] The GOOSE / SV message is input from the switch port, and the PHY transmits the message to the preset sampling module;
[0014] The preset sampling module parses the GOOSE / SV message in real time and extracts the forwarding path information table of the three elements of multicast address, input port and output port;
[0015] The preset sampling module compares the three-element forwarding path information table with the pre-configured information; if there is no difference, it continues to monitor the GOOSE / SV message input by the switch port; if there is a difference, the preset sampling module triggers the recalculation of the forwarding path information signal and regenerates the three-element forwarding path information table including the multicast address, input port, and output port;
[0016] The forwarding path information table in the CPU cache, the pre-configured information in the preset sampling module, and the switch chip configuration in the switch chip are updated.
[0017] Optionally, the difference includes an input port change and / or an output port change.
[0018] Optionally, the preset sampling module is implemented in software form, using the domain field ACL matching function of the switching chip, taking the same part 01-0C-CD of the GOOSE / SV message multicast address as the key field, and sending this type of message to the CPU controller in a sampling or periodic manner. The CPU controller completes the parsing of the message and obtains the real-time multicast address and input port.
[0019] Optionally, the preset sampling module is implemented in the form of hardware FPGA, and an FPGA device is placed between the general PHY chip and the switching chip to receive the GOOSE / SV message input by the PHY, parse the first 64 bytes of the message and then pass it into the switching chip, thereby obtaining the multicast address and input port transmitted by the port.
[0020] A second aspect of the present invention provides a switch, comprising: a PHY, a switching chip and a CPU controller, the switch further comprising: a preset sampling module;
[0021] The preset sampling module directly communicates with the switching chip and the CPU controller respectively; the switching chip directly communicates with the CPU controller;
[0022] The preset sampling module includes a forwarding path information table generated by parsing the GOOSE / SV forwarding path static configuration file CSD as the initialized pre-configuration information;
[0023] The pre-configuration module is used to parse the input GOOSE / SV messages in real time, extract the GOOSE / SV message forwarding path information, and compare it with the pre-configuration information. If there is a difference, it dynamically updates the forwarding path information table, pre-configuration information and switching chip configuration in the CPU cache, and generates a switch configuration log.
[0024] Optionally, the preset sampling module is a software module, including a sampling unit, a comparison unit and a trigger unit;
[0025] The sampling unit uses the domain field ACL matching function of the switching chip, takes the same part 01-0C-CD of the GOOSE / SV message multicast address as the key field, and sends this type of message to the CPU controller in a sampling or periodic manner;
[0026] The comparison unit is used to compare the forwarding path information extracted from the GOOSE / SV message with the pre-configuration information to generate a comparison result;
[0027] The trigger unit is used to trigger recalculation of the forwarding path information signal according to the comparison result.
[0028] Optionally, the preset sampling module is an FPGA device, which is arranged between the general PHY chip and the switching chip, receives the GOOSE / SV message input by the PHY, parses the first 64 bytes of the message and then transmits it to the switching chip, thereby obtaining the multicast address transmitted by the port.
[0029] The present invention has the following beneficial effects:
[0030] The method of the present invention can realize the dynamic configuration of GOOSE / SV paths in the power industry, effectively reducing the on-site configuration of the project. At the same time, it improves the reliability of the network, reduces the complexity of maintenance, and brings economic benefits to the current substation construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the framework of the present invention;
[0032] Figure 2 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0034] Embodiment 1 of the present invention provides a method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing, comprising the following steps: first, parsing the GOOSE / SV forwarding path static configuration file CSD of the switch, extracting a three-element forwarding path information table of a multicast address, an input port, and an output port; then downloading the three-element forwarding path information table into a preset sampling module and a switching chip implemented by software or hardware as pre-configuration information and a switching chip configuration; then, the pre-configuration sampling module parses the input GOOSE / SV message in real time, obtains information such as the multicast address of the GOOSE / SV message, and compares it with the pre-configuration information in real time. If there is a difference, the three-element forwarding path information table of the multicast is recalculated, and the pre-configuration information of the pre-configuration module and the switching chip configuration of the switching chip are updated, and the saved configuration of the switch operation is updated at the same time.
[0035] Embodiment 2 of the present invention provides a method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing, Figure 2 The principle flow chart of the method of the present invention is shown. First, the configuration file CSD in the switch is parsed, the switching chip and the preset sampling module are configured, and then the preset sampling module is entered to parse the input message comparison status in real time. If no change occurs, a consistent comparison is performed. If a change is found, the cache configuration and the switch storage configuration, as well as the preset sampling module configuration and the switching chip configuration are updated.
[0036] Specifically, the method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing comprises the following steps:
[0037] Step 1: The CPU controller of the switch parses the GOOSE / SV forwarding path static configuration file CSD of the switch and extracts the forwarding path information table.
[0038] Preferably but not restrictively, the forwarding path information table is a three-element forwarding path information table including a multicast address, an input port, and an output port.
[0039] Further preferably but not restrictively, the CSD file contains more information, and the multicast address is used as an index to parse the content of the Switch element of the CSD file, traverse the GOOSEIN, GOOSEOUT, SVIN, and SVOUT attribute content of each port, obtain the three-element forwarding path information table, and record the three-element forwarding path information table in the CPU cache to facilitate path calculation. It is worth noting that other elements can be added in addition to the three elements. The three-element forwarding path information table containing the multicast address, input port, and output port is only a preferred embodiment, not the only embodiment of the present invention. More element forwarding path information tables containing multicast addresses, input ports, and output ports also fall within the scope of the present invention.
[0040] Step 2: The CPU controller downloads the forwarding path information table to the preset sampling module and the switching chip. The preset sampling module stores the path information table as pre-configuration information, and the switching chip stores the path information table as switching chip configuration information.
[0041] It is worth noting that, as one of the outstanding essential features of the present invention, the preset sampling module should be understood as a module that completes the message parsing, comparison, and triggering update calculation of the present invention, and its specific functions are described as follows.
[0042] Step 3: The pre-configuration module parses the input GOOSE / SV message in real time, extracts the GOOSE / SV message forwarding path information, compares it with the pre-configuration information, and updates the forwarding path information table, pre-configuration information and switch chip configuration in the CPU cache if there is a difference.
[0043] Preferably but not limiting, step 3 specifically comprises the following steps:
[0044] Step 3.1: The GOOSE / SV message is input from the switch port, and the PHY transmits the message to the preset sampling module, such as Figure 1 As shown;
[0045] Step 3.2: The preset sampling module parses the GOOSE / SV message in real time and extracts the forwarding path information table of the three elements of multicast address, input port and output port;
[0046] Step 3.3: The preset sampling module compares the extracted forwarding path information table of the three elements of the multicast address, input port, and output port with the pre-configured information; if there is a difference, continue to step 3.4; if there is no difference, keep the forwarding path information table in the CPU cache, the pre-configured information in the preset sampling module, and the switching chip configuration, return to step 3.1, and continue to monitor the GOOSE / SV messages input by the switch port; the difference refers to the input port and the output port, and does not include the multicast address.
[0047] Step 3.4: Based on the direct communication between the preset sampling module, the switch chip and the CPU controller, the preset sampling module triggers the recalculation of the forwarding path information signal, and the CPU controller recalculates the forwarding path information and regenerates the three-element forwarding path information table including the multicast address, input port, and output port;
[0048] Step 3.5: The CPU controller updates the forwarding path information table in the CPU cache, the pre-configured information in the preset sampling module, the switch chip configuration in the switch chip, and the switch operation saved configuration to generate a switch configuration log.
[0049] As one of the outstanding essential features of the present invention, the preset sampling module can be implemented by software or hardware, and the hardware implementation is preferably, but not limited to, implemented by hardware FPGA coding. It can be understood that downloading the path information table to the preset sampling module includes downloading the path information table to the software preset sampling module or the hardware preset sampling module, for example, but not limited to, downloading the path information table to the hardware FPGA preset sampling module.
[0050] Further preferably but not restrictively, the implementation scheme of the preset sampling module software is to use the domain field ACL matching function of the switching chip, take the same part 01-0C-CD of the multicast address of the GOOSE / SV message as the key field, and send this type of message to the CPU controller in a sampling or periodic manner, and the CPU controller completes the parsing of the message to obtain the real-time multicast address and input port. The CPU controller compares the corresponding relationship between the multicast address and the input port obtained each time, and triggers the path update signal if it is inconsistent. It can be understood that the present invention adopts an input trigger mechanism, and the output is that the switch sends a message to the outside, so the CPU controller parses and obtains the multicast address and input port in real time.
[0051] Also further preferably but not restrictively, the scheme of hardware FPGA implementation of the preset sampling module is to place an FPGA device between the general PHY chip and the switching chip, receive the GOOSE / SV message input by the PHY, parse the first 64 bytes of the message and then pass it to the switching chip, so as to obtain the multicast address and input port of the port transmission. Run the pre-configuration module logic to quickly implement the update of the three-element forwarding path information table.
[0052] The path information is converted into a multicast address that the switching chip can recognize, and the registered output port information is downloaded to the switching chip to complete the configuration of the forwarding path, that is, the switching chip configuration is updated, and the cached path information is converted into the configuration of the switching chip. It can be understood that after the CPU controller recalculates the forwarding path information, it records the three-element forwarding path information table in the CPU cache and downloads it to the preset sampling module and the switching chip. The preset sampling module stores the path information table as pre-configuration information, and the switching chip stores the path information table as the switching chip configuration information. Based on external input, the path change inside the switch is triggered, and the change will update the pre-configuration module, the switch chip, and the switch operation save configuration, and a log record of the path change will be generated.
[0053] It is worth noting that in the prior art, the configuration of the substation is executed from top to bottom, and the CSD cannot be easily changed. Every time a business needs to change the port, it is necessary to generate the CSD from the SCD and then download it into the switch to complete the configuration. In the present invention, the first configuration of the pre-configuration module comes from the imported CSD file. The subsequent input and output ports change. The pre-configuration module receives the message and parses it to find that the port changes from a certain port to another port. This will trigger the update of the information in the cache, which will cause the configuration to be re-sent to the switch chip. The new path will be saved, but it will not be written back to the CSD. The next time the power is turned on, the update will be triggered again and it can run normally. This not only solves the cumbersome process of rewriting the CSD when changing the port, but also avoids easily modifying the CSD to cause errors in the substation configuration. That is, it is possible to replace the connection port between the switch and the process layer device without modifying the smart substation system configuration file SCD file to create a new port connection relationship and generate a new CSD process, which simplifies the configuration of the switch.
[0054] like Figure 1 As shown, embodiment 3 of the present invention provides a switch, including: a CPU core board; the CPU core board includes: a PHY (Port Physical Layer), a preset sampling module, a switching chip and a CPU controller; wherein the PHY includes N ports, namely port 1, port 2 to port N.
[0055] The preset sampling module directly communicates with the switching chip and the CPU controller respectively; the switching chip directly communicates with the CPU controller;
[0056] The preset sampling module includes a forwarding path information table generated by parsing the GOOSE / SV forwarding path static configuration file CSD as the initialized pre-configuration information;
[0057] The pre-configuration module is used to parse the input GOOSE / SV messages in real time, extract the GOOSE / SV message forwarding path information, and compare it with the pre-configuration information. If there is a difference, it dynamically updates the forwarding path information table, pre-configuration information and switching chip configuration in the CPU cache, and generates a switch configuration log.
[0058] Preferably but not restrictively, the preset sampling module is a software module, comprising a sampling unit, a comparison unit and a trigger unit; the sampling unit uses the domain field ACL matching function of the switching chip, takes the same part 01-0C-CD of the GOOSE / SV message multicast address as the key field, and sends this type of message to the CPU controller in a sampling or periodic manner; the comparison unit is used to compare the forwarding path information extracted from the GOOSE / SV message with the pre-configured information to generate a comparison result; the trigger unit is used to trigger the recalculation of the forwarding path information signal according to the comparison result.
[0059] Preferably but not restrictively, the preset sampling module is an FPGA device, which is arranged between the general PHY chip and the switching chip, receives the GOOSE / SV message input by the PHY, parses the first 64 bytes of the message and then transmits it to the switching chip, thereby obtaining the multicast address and input port of the port transmission.
[0060] By adopting the method described in the present invention, the connection port between the switch and the process layer device can be replaced without modifying the smart substation system configuration file SCD file to create a new port connection relationship and generate a new CSD process, which simplifies the configuration of the switch and improves the stability of the switch network.
[0061] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing, characterized in that: include: The step of initializing the forwarding path information includes: parsing the GOOSE / SV forwarding path static configuration file CSD of the switch, extracting the forwarding path information table; downloading the forwarding path information table to the preset sampling module and the switching chip as pre-configuration information and switching chip configuration information respectively; The steps of dynamically configuring the forwarding path information include: the pre-configuration module parses the input GOOSE / SV message in real time, extracts the forwarding path information of the GOOSE / SV message, compares it with the pre-configuration information, and when there is a difference, updates the forwarding path information table, pre-configuration information and switching chip configuration in the CPU cache, and generates a switch configuration log.
2. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1, characterized in that: The forwarding path information table is a three-element forwarding path information table including a multicast address, an input port, and an output port.
3. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1 or 2, characterized in that: Using the multicast address as the index, parse the Switch element content of the CSD file, traverse the GOOSEIN, GOOSEOUT, SVIN, and SVOUT attribute content of each port, and obtain the three-element forwarding path information table including the multicast address, input port, and output port.
4. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1, characterized in that: The step of dynamically configuring the forwarding path information specifically includes: The GOOSE / SV message is input from the switch port, and the PHY transmits the message to the preset sampling module; The preset sampling module parses the GOOSE / SV message in real time and extracts the forwarding path information table of the three elements of multicast address, input port and output port; The preset sampling module compares the three-element forwarding path information table with the pre-configured information; if there is no difference, it continues to monitor the GOOSE / SV message input by the switch port; if there is a difference, the preset sampling module triggers the recalculation of the forwarding path information signal and regenerates the three-element forwarding path information table including the multicast address, input port, and output port; The forwarding path information table in the CPU cache, the pre-configured information in the preset sampling module, and the switch chip configuration in the switch chip are updated.
5. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1 or 4, characterized in that: The differences include input port changes and / or output port changes.
6. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1 or 2, characterized in that: The preset sampling module is implemented in software form, using the domain field ACL matching function of the switching chip, taking the same part 01-0C-CD of the GOOSE / SV message multicast address as the key field, and sending this type of message to the CPU controller in a sampling or periodic manner. The CPU controller completes the parsing of the message and obtains the real-time multicast address and input port.
7. A method for dynamically configuring a switch GOOSE / SV forwarding path based on message parsing as claimed in claim 1 or 2, characterized in that: The preset sampling module is implemented in the form of hardware FPGA. An FPGA device is placed between the general PHY chip and the switching chip to receive the GOOSE / SV message input by the PHY, parse the first 64 bytes of the message and then pass it into the switching chip, thereby obtaining the multicast address and input port of the port transmission.
8. A switch, comprising: PHY, switching chip and CPU controller, characterized in that the switch also includes: a preset sampling module; The preset sampling module directly communicates with the switching chip and the CPU controller respectively; the switching chip directly communicates with the CPU controller; The preset sampling module includes a forwarding path information table generated by parsing the GOOSE / SV forwarding path static configuration file CSD as the initialized pre-configuration information; The pre-configuration module is used to parse the input GOOSE / SV messages in real time, extract the GOOSE / SV message forwarding path information, and compare it with the pre-configuration information. If there is a difference, it dynamically updates the forwarding path information table, pre-configuration information and switching chip configuration in the CPU cache, and generates a switch configuration log.
9. A switch according to claim 7, characterized in that: The preset sampling module is a software module, including a sampling unit, a comparison unit and a trigger unit; The sampling unit uses the domain field ACL matching function of the switching chip, takes the same part 01-0C-CD of the GOOSE / SV message multicast address as the key field, and sends this type of message to the CPU controller in a sampling or periodic manner; The comparison unit is used to compare the forwarding path information extracted from the GOOSE / SV message with the pre-configuration information to generate a comparison result; The trigger unit is used to trigger recalculation of the forwarding path information signal according to the comparison result.
10. A switch according to claim 7, characterized in that: The preset sampling module is an FPGA device, which is arranged between the general PHY chip and the switching chip, receives the GOOSE / SV message input by the PHY, parses the first 64 bytes of the message and then transmits it to the switching chip, thereby obtaining the multicast address transmitted by the port.