Intelligent identification display method and device based on physical connection and virtual circuit relationship
By parsing SDD and SCD files to construct port mapping configuration files and generating associated index tables, the system achieves accurate display of the entire circuit and virtual circuit of physical connections of optical cables and tail cables in substations. This solves the maintenance problems in existing technologies and improves the efficiency of fault diagnosis and system debugging.
Patent Information
- Application Number
- CN202611449401.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot accurately display the physical connections of optical cables and tail cables in substations, including both complete and virtual circuits. This makes it difficult for maintenance personnel to quickly understand the route and connection status of the lines, affecting the efficiency of troubleshooting and system debugging.
By parsing SDD and SCD files, a device port mapping configuration file is constructed, a port mapping table and a physical fiber optic connection dataset are generated, and an association index table between virtual loops and physical connections is generated to achieve visualization of virtual loops and filtering of invalid loops.
It achieves precise association between physical connections and virtual loops, improving the accuracy and efficiency of communication loop management in smart substations and providing key technical support for the safe and stable operation of substations.
Smart Images

Figure CN123178786A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power communication and intelligent substation technology, specifically relating to an intelligent identification and display method and device based on the relationship between physical connections and virtual loops. Background Technology
[0002] In existing substation operation and maintenance, the physical connections of optical cables and pigtails are often only shown on the surface, failing to clearly depict the entire circuit. When troubleshooting or line modifications are needed, maintenance personnel struggle to quickly and comprehensively understand the entire line's route and connections, significantly increasing the difficulty and time cost of maintenance. For example, in some complex substation networks, optical cables and pigtails crisscross, making it difficult to determine the complete path of a specific signal from the transmitting end to the receiving end based solely on surface connection information.
[0003] Existing technologies also have serious shortcomings in the visualization of virtual circuits. Virtual circuits are logical paths for signal transmission in smart substations and are closely related to physical connections. However, existing visualization methods often fail to organically integrate virtual circuits with physical connections, resulting in a disconnect between them. This makes it difficult for maintenance personnel to locate the corresponding virtual circuit at the physical level or trace it back to the actual physical connection when analyzing and troubleshooting signal transmission problems, severely impacting the efficiency of fault diagnosis and system debugging.
[0004] In summary, the shortcomings of existing technologies in displaying physical connections of optical cables and pigtails, as well as virtual loops, severely restrict the operation and maintenance efficiency and safety of smart substations. Therefore, developing a technology that can accurately display the entire physical connection loop and internal virtual loops, and can filter based on the presence of virtual loops, has urgent practical needs and significant engineering application value. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems in the prior art by providing an intelligent identification and display method and device based on the relationship between physical connections and virtual loops.
[0006] The above-mentioned objectives of the present invention are achieved by the following technical means: The intelligent recognition and display method based on the relationship between physical connections and virtual loops includes the following steps: Step S1: Parse the SDD file and SCD file to construct a device port mapping configuration file that includes the mapping relationship between the physical optical port name and the logical port name of the device; Step S2: Parse the physical fiber connection relationships in the SDD file and construct a physical fiber connection relationship dataset that includes the physical optical port names at both ends of the fiber core. Step S3: Extract the virtual loop logic relationship from the SCD file and construct a valid virtual loop set including the names of the logic ports at both ends of the virtual loop; Step S4: Based on the device port mapping relationship configuration file, reverse map the logical port names in the effective virtual loop set and the physical optical port names in the physical fiber connection relationship dataset respectively to generate the port mapping table of the effective virtual loop set and the physical optical port mapping table of the physical fiber connection relationship dataset respectively; cross-associate the port mapping table and the physical optical port mapping table to generate an association index table. Step S5: Based on the associated index table, perform virtual loop connectivity judgment and port consistency verification for different scenarios, and mark the validity and consistency of the valid virtual loops according to the connectivity and consistency verification results. Step S6: Construct a secondary loop topology diagram for visualization of all virtual loop entries in the valid virtual loop set that are marked as having valid connectivity and have been marked as having successfully passed port consistency checks.
[0007] The port mapping table of the valid virtual circuit set, as described above, is obtained through the following steps: For each virtual loop entry in the valid virtual loop set, the physical optical port names corresponding to the transmitting logical port name and the receiving logical port name in the virtual loop entry are retrieved from the device port mapping relationship configuration file; and a corresponding virtual loop endpoint mapping entry is constructed. The virtual loop endpoint mapping entry records the virtual loop identifier, the initiating device IED name, the transmitting logical port name, the physical optical port name corresponding to the transmitting logical port name, the receiving device IED name, the receiving logical port name, the physical optical port name corresponding to the receiving logical port name, and the transmission direction; all virtual loop endpoint mapping entries constitute a port mapping table, thereby obtaining the physical optical ports corresponding to the logical ports connected at both ends of the virtual loop corresponding to each virtual loop identifier.
[0008] The physical optical port mapping table of the physical fiber optic connection relationship dataset, as described above, is obtained through the following steps: For each fiber core connection entry in the physical fiber connection relationship dataset, the logical port name corresponding to the physical optical port name connected at both ends of the fiber core in the fiber core connection relationship entry is retrieved from the device port mapping relationship configuration file, and the corresponding physical link endpoint mapping entry is constructed. The physical link endpoint mapping entry records the optical cable identifier, fiber core identifier, physical optical port name connected at both ends of the fiber core, device SCD model name of the device to which it belongs, transmit / receive type corresponding to the physical optical port name, switch name, and network affiliation identifier. All physical link endpoint mapping entries constitute the physical optical port mapping table, thereby obtaining the logical port corresponding to the physical optical port connected at both ends of each fiber core.
[0009] As described above, the process of cross-referencing the port mapping table and the physical optical port mapping table to generate the associated index table specifically includes the following steps: First, using the device SCD model name and physical optical port name in the port mapping table as the joint association key, the port mapping table and the physical optical port mapping table are cross-matched to obtain the correspondence between physical link endpoint mapping entries and virtual loop endpoint mapping entries. Secondly, the system determines whether the scenario is a switch scenario based on whether the switch name in the physical link endpoint mapping entry is empty. If the switch name in the physical link endpoint mapping entry is not empty, the scenario is determined to be a switch scenario. If the switch name in the physical link endpoint mapping entry is empty, the scenario is determined to be a direct connection scenario. Secondly, for direct connection scenarios, construct the associated index entries corresponding to the direct connection scenarios. The associated index entries corresponding to the direct connection scenarios record the virtual loop identifier and fiber core identifier in the physical link endpoint mapping entries and virtual loop endpoint mapping entries with corresponding relationships. For switch scenarios, cross-optical cable mapping is established through switch names and network affiliation identifiers, and associated index entries for switch scenarios are constructed. The associated index entries record the virtual loop identifiers in the corresponding physical link endpoint mapping entries and virtual loop endpoint mapping entries, the logical ports at both ends of the virtual loop corresponding to the virtual loop identifier, the fiber core identifiers of the physical optical ports at both ends of the virtual loop corresponding to the physical optical ports, and the network affiliation identifiers of the switches to which the fiber core identifiers belong; all associated index entries constitute an associated index table.
[0010] The scenarios described above include direct connection scenarios and switch scenarios; The scenario is determined by the following method: extract each physical fiber connection relationship entry from the physical fiber connection relationship dataset, retrieve the corresponding associated index entry in the associated index table through the fiber core identifier in the physical fiber connection relationship entry, and determine the scenario to which the associated index entry belongs. The virtual loop connectivity determination and port consistency verification in the direct connection scenario specifically include the following steps: The virtual loop connectivity determination in the direct connection scenario is as follows: directly determine the connectivity validity of the virtual loop corresponding to the virtual loop identifier in the associated index entry; then, based on the virtual loop identifier in the associated index entry, retrieve the corresponding virtual loop entry in the set of valid virtual loops, and assign a connectivity validity mark to the validity mark in the retrieved virtual loop entry; The port consistency verification in the direct connection scenario is as follows: First, based on the virtual loop identifier and fiber core identifier in the associated index entry, the corresponding virtual loop endpoint mapping entry and physical link endpoint mapping entry are retrieved in the port mapping table and physical optical port mapping table, respectively. Secondly, determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the physical link endpoint mapping entry, and determine whether the transmit / receive type corresponding to the physical optical port name in the physical link endpoint mapping entry is consistent with the transmission direction of the virtual loop endpoint mapping entry. Finally, if the physical optical port names are consistent and the transmission directions are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails.
[0011] As described above, the virtual loop connectivity determination and port consistency verification in a switch scenario specifically include the following steps: The virtual loop connectivity determination in the switch scenario is as follows: Based on whether the network domain type of the network affiliation identifier of the two fiber core identifiers in the associated index entry is the same network connection port, if they are the same network connection port, the connectivity of the virtual loop corresponding to the virtual loop identifier in the associated index entry is determined to be valid; then, based on the virtual loop identifier in the associated index entry, the corresponding virtual loop entry is retrieved in the set of valid virtual loops, and the validity marker in the retrieved virtual loop entry is assigned a valid connectivity marker. If they belong to different VLANs or one of them is not the same network connection port, the connectivity of the virtual circuit corresponding to the virtual circuit identifier in the associated index entry is determined to be invalid; then, the corresponding virtual circuit entry is retrieved in the set of valid virtual circuits according to the virtual circuit identifier in the associated index entry, and the validity flag in the retrieved virtual circuit entry is assigned the invalid connectivity flag. The port consistency verification in the switch scenario is as follows: First, based on the virtual loop identifier and the two fiber core identifiers in the associated index entry, the corresponding virtual loop endpoint mapping entry and the two physical link endpoint mapping entries are retrieved in the port mapping table and the physical optical port mapping table, respectively. Secondly, determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the two physical link endpoint mapping entries, and determine whether the transmit / receive types corresponding to the physical optical port names in the two physical link endpoint mapping entries are consistent with the transmit / receive types of the logical ports at both ends of the virtual loop. Finally, if the physical optical port names are consistent and the transmit / receive types are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails.
[0012] As described above, the device port mapping configuration file is hierarchically structured as device SCD model name - board number - mapping entry. Each device SCD model name node contains nodes for all board numbers of the corresponding device. Each board number node contains mapping entries for all physical optical ports and logical ports under the corresponding board number. Each mapping entry includes the physical optical port name and logical port name that form a correspondence. The logical port establishes a correspondence with the transmit optical port and receive optical port of the physical optical port with the corresponding board number and optical port identifier, and forms a corresponding mapping entry. The device port mapping configuration file is constructed through the following steps: Step S1.1: By comparing the device identifier hash values of the current SDD file and SCD file with the device identifier hash values recorded in the historical configuration file, determine whether to reuse the generated device port mapping relationship configuration file. If they match, it is determined that the current SDD file and SCD file have not undergone substantial changes, and the historically generated device port mapping relationship configuration file is directly reused to avoid repeatedly executing the complete cross-file port association mapping process. If they do not match, it is determined that the configuration status has changed, and steps S1.2 to S1.4 are executed to regenerate the device port mapping relationship configuration file. Step S1.2: Parse the SDD file to obtain all board numbers under the SCD model name of each device, as well as all physical optical port names, device numbers, and device descriptions under each board number; Step S1.3: Using the device SCD model name in the physical optical port mapping file as an index, parse the SCD file to obtain all logical port names under each device SCD model name; Step S1.4: Generate a device port mapping configuration file that includes the mapping relationship between physical optical ports and logical ports, using the board number and optical port identifier as indexes; If an anomaly occurs during the association process, such as a physical optical port not matching a logical port in the SCD file or a conflict where multiple physical optical ports match the same SCD logical port, the overall process will not be interrupted. Instead, a mark will be made at the corresponding mapping entry in the device port mapping relationship configuration file, indicating that the port allocation requires manual confirmation. An anomaly log will be generated for all abnormal mapping entries, recording the abnormal mapping entries and their corresponding anomaly details.
[0013] As described above, the physical fiber optic connection relationship dataset is constructed through the following steps: Step S2.2.1: Parse the nodes of valid cables and the sub-nodes of optical fiber cores in the SDD file. Construct the optical cable identification, optical cable type, starting cabinet reference, and ending cabinet reference of each cable obtained from the nodes of valid cables and the sub-nodes of optical fiber cores into the corresponding optical cable connection relationship entries. Construct the optical fiber core identification, starting port reference, ending port reference, physical optical port name, optical port type, and device number of the device to which the optical fiber core is connected into the corresponding optical fiber core connection relationship entries. Assign each optical fiber core connection relationship entry to the optical cable connection relationship entry of the cable to which it belongs. Step S2.2.2: Using the device number in the fiber core connection relationship entry as an index, extract the corresponding device SCD model name in the device port mapping relationship configuration file, and add the extracted device SCD model name to the corresponding fiber core connection relationship entry. Step S2.2.3: The optical cable connection relationship entries of all cables and the optical fiber core connection relationship entries of the optical fiber cores form the initial physical optical fiber connection relationship dataset; Step S2.3: If the device belongs to a switch, then further obtain the network ownership status of the switch from the SCD file. The network ownership status of the switch includes the switch IED name, network domain number, VLAN tag and network domain type. Specifically, for physical optical ports that have been assigned VLANs in the SCD file, different network domain numbers are assigned to them according to the VLAN identifier characters in the VLAN tag; according to the default configuration rules of the switch, the network affiliation status of all physical optical ports of the same switch that have not been explicitly assigned VLANs is initialized with the same network domain number, and the network domain type is initialized to the same network connection port. The network affiliation status of each switch is added to the corresponding fiber optic core connection relationship entry of the affiliated device to obtain a complete physical fiber optic connection relationship dataset.
[0014] As described above, the effective set of virtual circuits is constructed through the following steps: Step S3.1: Locate each device in the SCD file using the device SCD model name and physical optical port name in the device port mapping configuration file as indexes. <ied>Nodes and their subordinates <inputs>Child nodes; traversal <inputs>In child nodes <extref>Elements, Extract <extref>The elements include the logical port name and transmit / receive type of this device, the logical port name and transmit / receive type of the peer device, the device SCD model name of the peer device, the signal type, and the transmission direction; Step S3.2: Construct a set of valid virtual loops. Each virtual loop entry in the set of valid virtual loops includes a virtual loop identifier, initiating device IED name, transmitting logical port name, transmitting transceiver type, receiving device IED name, receiving logical port name, receiving transceiver type, signal type, transmission direction, optical cable identifier, unused validity flags to be processed, and unused consistency check flags to be processed. In this context, the name of the initiating device IED, the name of the transmitting logical port, and the transmitting transceiver type should be filled with the device SCD model name, the logical port name, and the transceiver type of the peer device, respectively; the name of the receiving device IED, the name of the receiving logical port, and the transceiver type should be filled with the device SCD model name, the logical port name, and the transceiver type of this device, respectively.
[0015] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the intelligent recognition and display method based on the relationship between physical connections and virtual loops as described above.
[0016] Compared with the prior art, the present invention has the following advantages: The structured mapping configuration file constructed in this invention achieves unified port identification, and the logical construction of the associated index table completes port conversion, connectivity determination in different scenarios, and port consistency verification, resulting in a set of valid virtual loops, items to be manually verified, and invalid item logs. Finally, the secondary topology diagram of the virtual loops is visualized in the form of a topology diagram. This invention realizes the accurate association between physical connections and virtual loops and the automatic screening of invalid loops, significantly improving the accuracy and efficiency of communication loop management in smart substations, and providing key technical support for the safe and stable operation of substations. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0018] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. The embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0019] Example 1:
[0020] like Figure 1 As shown, the intelligent recognition and display method based on the relationship between physical connections and virtual loops includes the following steps: Step S1: Parse the SDD and SCD files, establish the mapping relationship between the physical optical ports and logical ports of the device, and generate a device port mapping configuration file. This specifically includes the following steps: This step involves the collaborative processing of the smart substation physical circuit model file (SDD file) and the smart substation system description file (SCD file) to construct a precise mapping relationship between physical optical ports and logical ports. This generates a structured, fault-tolerant configuration file that supports incremental updates of device port mapping relationships, providing standardized data support for subsequent matching analysis of physical connections and virtual circuits.
[0021] Before implementing the steps, this invention first preprocesses and verifies the integrity of the SDD and SCD files. It checks the iedName attribute (IED name, device SCD model name) of the Entity (a general node describing physical devices, boards, and ports) node in the SDD file with class (type) as IED (Intelligent Electronic Device). It then searches for boards with class as Board under this Entity, the physical optical port name of the Pin node under the board, the iedName attribute of the ConnectedAP (connected access point) node in the SCD file, and the P type="cable" attribute (parameter type "cable") of the hysConn type="Connection" node. It filters out invalid records in the SDD file where the Cable node lacks startDeviceName (starting device name) or endDeviceName (ending device name). After verification, it proceeds to step S1.1. Step S1.1: By comparing the device identifier hash values of the current SDD file and SCD file with the device identifier hash values recorded in the historical configuration file, determine whether to reuse the generated device port mapping relationship configuration file. If they match, it is determined that the current SDD file and SCD file have not undergone substantial changes, and the historically generated device port mapping relationship configuration file is directly reused to avoid repeatedly executing the complete cross-file port association mapping process. If they do not match, it is determined that the configuration status has changed, and steps S1.2 to S1.4 are executed to regenerate the device port mapping relationship configuration file.
[0022] The device identifier hash value is generated by jointly calculating the device SCD model name, board number and physical optical port name of all Device nodes in the current SDD file with the logical port information of the corresponding ConnectedAP node in the SCD file. It is used to uniquely identify the overall device-port configuration status of the current SDD file and SCD file. Step S1.2: Parse the SDD file to obtain all board numbers under each device SCD model name and all physical optical port names under each board number, and generate a physical optical port mapping file. This specifically includes the following steps: Step S1.2.1: Parse the SDD file to obtain the physical optical ports of the device: First, parse the hierarchical relationship of "device iedName-board number-physical optical port" under a single Device node in the SDD file. From the name attribute value, desc attribute value, iedName attribute value, Board name attribute value and all Pin name attribute values under the Device node, respectively obtain the device number name, device description desc, device SCD model name iedName, board number Board name and all physical optical port names Pin name; The physical optical port name is composed of the optical port identifier and the optical port type. The optical port type includes the transmit optical port and the receive optical port. For example, the two physical optical ports with physical optical port names A-TX and A-RX are the transmit optical port and the receive optical port, respectively. Here, A is the optical port identifier, and TX and RX are the transmit optical port identifier and the receive optical port identifier, respectively.
[0023] Step S1.2.2: Generate physical optical port mapping file. The physical optical port mapping file is hierarchically classified by device iedName-board number-physical optical port. Each board number node sets up an entry for all physical optical port names under the corresponding board number. Each device SCD model name iedName node sets up nodes for all board numbers of the corresponding device. The device SCD model name iedName node also includes the device number name and device description desc.
[0024] Step S1.3: Parse the SCD file to obtain all logical port names under each device and generate a logical port mapping file. This specifically includes the following steps: Step S1.3.1: Using the device SCD model name iedName in the physical optical port mapping file as an index, locate the corresponding connected access point ConnectedAP node in the SCD file, filter out the valid logical ports of external connections under the connected access point ConnectedAP node with PhysConn type="Connection" and P type="cable" attribute not empty, record the port names of all logical ports, and obtain all logical port names under the device SCD model name iedName; According to the SCD port number structure rules, logical ports form corresponding port names using a hierarchical coding standard of board number-optical port identifier. The board number is used to locate specific boards within the device, and the optical port identifier is used to distinguish different optical ports within the board and associate them with paired physical optical ports. Step S1.3.2: Generate a logical port mapping file. The logical port mapping file is also hierarchically classified by device SCD model name iedName-logical port name. Under each device SCD model name iedName node, an entry for all logical port names of the corresponding device is set.
[0025] Step S1.4: Using the board number and optical port identifier as indexes, generate a device port mapping configuration file that includes the mapping relationships between physical optical ports and logical ports based on the physical optical port mapping file and the logical port mapping file. This specifically includes the following steps: Step S1.4.1: The device port mapping configuration file is hierarchically structured by device iedName-board number-mapping entry. Under the node of each device SCD model name iedName, nodes for all board numbers of the corresponding device are set. Under the node of each board number, mapping entries for all physical optical ports and logical ports under the corresponding board number are set. Each mapping entry includes the physical optical port name and logical port name that form a correspondence. The logical port establishes a correspondence with the transmit optical port and receive optical port of the physical optical port with the corresponding board number and optical port identifier, and forms a corresponding mapping entry. For example, the logical port named 1-A establishes mapping entries with the transmit optical port A-TX and receive optical port A-RX under the node of board number 1. The node of device SCD model name iedName also includes the device number name and device description desc.
[0026] Step S1.4.2: If an abnormality occurs during the association process, such as a physical optical port not matching a logical port in the SCD file or a conflict where multiple physical optical ports match the same SCD logical port, the overall process will not be interrupted. Instead, a mark will be made at the corresponding mapping entry in the device port mapping relationship configuration file, and it will be marked as "Manual confirmation of port allocation is required". An abnormal log will be generated for all abnormal mapping entries, and the abnormal mapping entries and corresponding abnormal details will be recorded in the abnormal log.
[0027] Step S1.4.3: Record the generation time, SDD version, SCD version and number of abnormal records in the device port mapping relationship configuration file. The number of abnormal records is obtained by counting all abnormal mapping entries.
[0028] Step S2: Parse the physical fiber connection relationships in the SDD file to construct a physical fiber connection relationship dataset that includes the physical optical port names at both ends of the fiber core. This specifically includes the following steps: This step aims to accurately extract the physical connection relationships of all valid optical fibers from the physical loop model file (SDD), forming a structured physical loop dataset. It clarifies the devices, ports, and network affiliations at both ends of the optical cable, providing a clear physical connection foundation for subsequent matching of virtual and physical loops.
[0029] Step S2.1: Parse the SDD file and extract the corresponding valid cable identifier (Cable name), cable class, starting cabinet reference (Cable startRef), and ending cabinet reference (Cable endRef) for each valid cable node. For each fiber core child node under a valid cable node, extract the corresponding fiber core identifier (Core name), start port reference (Core startRef), and end port reference (Core endRef) to obtain a complete fiber core record. Based on the port addresses recorded in the start port reference Core startRef and end port reference CoreendRef of each fiber core, the physical optical port name, optical port type, and device number of the corresponding fiber core can be found at both ends.
[0030] This invention focuses on the configuration information of the nodes of the cable and the child nodes of the fiber core in the SDD file, which represent the fiber connection relationship. It excludes the cable nodes with the class attribute marked as "discarded" or "standby not enabled", and only retains the valid cable nodes with the class attribute marked as "PigtailCable" or "OpticalCable" and the type attribute clearly defined.
[0031] Step S2.2: Construct a physical fiber optic connection relationship dataset, which specifically includes the following steps: Step S2.2.1: Construct the optical cable connection relationship entry for each cable using the cable name, cable class, starting cabinet reference (Cable startRef), and ending cabinet reference (Cable endRef); construct the optical core connection relationship entry for each optical core using the core name, starting port reference (Core startRef), ending port reference (Core endRef), physical optical port name (Pin name), optical port type, and device number (name) of the device to which the core belongs; and assign the optical core connection relationship entry of each optical core to the optical cable connection relationship entry of its respective cable. Step S2.2.2: Using the device number name in the fiber core connection relationship entry as an index, extract the corresponding device SCD model name iedName in the device port mapping relationship configuration file, and add the extracted device SCD model name iedName to the corresponding fiber core connection relationship entry to achieve unified device identification; Step S2.2.3: The optical cable connection relationship entries of all cables and the optical fiber core connection relationship entries form the initial physical optical fiber connection relationship dataset.
[0032] Step S2.3: If the device belongs to a switch, then further obtain the network ownership status of the switch from the SCD file. The network ownership status of the switch includes the switch IED name (switchIedName), network domain number (networkDomainId), VLAN tag (vlanTag), and network domain type (domainType). Specifically, for physical optical ports that have been assigned VLANs in the SCD file, different network domain numbers (networkDomainId) are assigned to them according to the VLAN ID characters in the VLAN tag. According to the default configuration rules of the switch, the network ownership status of all physical optical ports under the same switch that have not been explicitly assigned VLANs is initialized with the same network domain number (networkDomainId), and the network domain type (domainType) is initialized to the same network connection port. That is, the physical connection of the physical optical ports in the switch belongs to the same network domain, and the signal can be directly transmitted through the internal link of the switch without additional cross-network configuration. The network affiliation status of each switch is added to the corresponding fiber optic core connection relationship entry of the device to which the switch belongs, thus clarifying the connectivity boundary of the physical connection and obtaining a complete physical fiber optic connection relationship dataset.
[0033] Step S2.4: Record the generation time, SDD version, and SCD version of the physical fiber optic connection relationship dataset.
[0034] Step S3: Extract the virtual loop logic relationships from the SCD file and construct a valid virtual loop set including the logic port names at both ends of the virtual loop. This specifically includes the following steps: Step S3.1: Locate each device in the SCD file using the device SCD model name (iedName) and physical optical port name (Pin name) from the device port mapping configuration file as indexes. <ied>Nodes and their subordinates <inputs>Child nodes (virtual terminal external connection configuration core area); traversal <inputs>In child nodes <extref>Elements, Extract <extref>The elements include the logical port (LogicPort) and transmit / receive type (PortType) of this device, the logical port name (LogicPort) and transmit / receive type (PortType) of the peer device, the device SCD model name (iedName) of the peer device, the signal type (signalType), and the transmission direction (transDirection). Step S3.2: Construct a set of valid virtual loops. Each virtual loop entry in the set includes a virtual loop identifier, the name of the initiating device IED (sourceIedName), the name of the transmitting logical port (sourceLogicPort), the transmitting / receiving type (sourcePortType), the name of the receiving device IED (targetIedName), the name of the receiving logical port (targetLogicPort), the transmitting / receiving type (targetPortType), the signal type (signalType), the transmission direction (transDirection), the fiber optic cable identifier (cablename), an empty validity flag (validFlag) to be processed, and an empty consistency check flag to be processed.
[0035] In this context, the initiating device IED name (sourceIedName), the sending logical port name (sourceLogicPort), and the sending transmit / receive type (sourcePortType) should be filled with the peer device's SCD model name (iedName), logical port name (LogicPort), and transmit / receive type (PortType), respectively. The receiving device IED name (targetIedName), the receiving logical port name (targetLogicPort), and the receiving transmit / receive type (targetPortType) should be filled with the receiving device's SCD model name (iedName), logical port name (LogicPort), and transmit / receive type (PortType), respectively.
[0036] Among them, a valid virtual loop is a virtual loop excluding those with "no physical connection support". "No physical connection support" is specifically manifested as follows: <extref>There is no node with type='Cable'. The child node is either empty or has no matching record in the physical fiber connection relationship set extracted in step S2; any node meeting any of the above conditions is removed.
[0037] Step S3.3: Record the generation time, SDD version, and SCD version for the valid virtual circuit set.
[0038] Step S4: Based on the device port mapping relationship configuration file, reverse map the logical port names in the effective virtual loop set and the physical optical port names in the physical fiber connection relationship dataset, respectively, to generate a port mapping table for the effective virtual loop set and a physical optical port mapping table for the physical fiber connection relationship dataset; cross-associate the port mapping table and the physical optical port mapping table to generate an association index table, specifically including the following steps: Step S4.1: Extract the abnormal entries marked "Port allocation requires manual confirmation" from the device port mapping relationship configuration file in Step S1; mark the fiber core connection relationship entries in the physical fiber connection relationship dataset of Step S2 that correspond to the physical optical port name Pinname in the abnormal entries as "Items to be manually verified"; and mark the virtual loop entries in the effective virtual loop dataset of Step S3 that correspond to the logical port name in the abnormal entries as "Items to be manually verified"; in order to isolate abnormal interference.
[0039] Step S4.2: Simultaneously perform cross-step data version consistency verification, compare the versions of the SDD / SCD files used in steps S1-S3. If the versions are inconsistent, based on the incremental update feature of the configuration file in step S1, only the incremental data with updated versions will be filtered, and the historical valid matching results will be used for the data that has not been updated.
[0040] Constructing a structured relational index table includes the following steps: Step S4.2.1: Generate a port mapping table for the valid virtual loop set: Based on the device port mapping relationship configuration file generated in step S1, reverse map the transmitting logical port name (sourceLogicPort) and receiving logical port name (targetLogicPort) in each virtual loop entry of the valid virtual loop set in step S3 to the corresponding physical optical port names, and generate a port mapping table, specifically as follows: For each virtual loop entry in the valid virtual loop set, the physical optical port name (Pin name) corresponding to the transmitting logical port name (sourceLogicPort) and the receiving logical port name (targetLogicPort) in the virtual loop entry is retrieved from the device port mapping relationship configuration file. A corresponding virtual loop endpoint mapping entry is then constructed, recording the virtual loop identifier, the initiating device IED name (sourceIedName), the transmitting logical port name (sourceLogicPort), the physical optical port name (Pin name) corresponding to the transmitting logical port name (sourceLogicPort), the receiving device IED name (targetIedName), the receiving logical port name (targetLogicPort), the physical optical port name (Pin name) corresponding to the receiving logical port name (targetLogicPort), and the transmission direction (transDirection). All virtual loop endpoint mapping entries constitute a port mapping table, thereby obtaining the physical optical ports corresponding to the logical ports connected to both ends of each virtual loop identifier.
[0041] In the port mapping table, each virtual loop endpoint mapping entry of the virtual loop identifier corresponds one-to-one with the virtual loop entry of the corresponding virtual loop identifier in the set of valid virtual loops.
[0042] Step S4.2.2: Generate the physical optical port mapping table of the physical fiber connection relationship dataset: Based on the device port mapping relationship configuration file of step S1, convert the physical optical ports connected to both ends of the fiber cores in each fiber core connection relationship entry of the physical fiber connection relationship dataset in step S2 into corresponding logical ports, and generate the physical optical port mapping table, specifically as follows: For each fiber core connection entry in the physical fiber connection relationship dataset, the logical port name corresponding to the physical optical port name (Pin name) connected to both ends of the fiber core in the fiber core connection relationship entry is retrieved from the device port mapping relationship configuration file. The corresponding physical link endpoint mapping entry is then constructed. The physical link endpoint mapping entry records the cable identifier (Cable name), the fiber core identifier (Core name), the physical optical port name (Pin name) connected to both ends of the fiber core (Core), the device SCD model name (iedName), the transmit / receive type (PortType) corresponding to the physical optical port name (Pin name), the switch name (switchIedName), and the network domain identifier (networkDomainId). All physical link endpoint mapping entries constitute the physical optical port mapping table, thereby obtaining the logical port corresponding to the physical optical port connected to both ends of each fiber core.
[0043] If neither of the physical optical ports connected to the two ends of the optical fiber core belongs to a switch, then the switch name (switchIedName) and network domain identifier (networkDomainId) in the corresponding physical link endpoint mapping entry are set to empty.
[0044] In the physical optical port mapping table, the physical link endpoint mapping entries of each optical fiber core correspond one-to-one with the optical fiber core connection relationship entries of the corresponding optical fiber cores in the physical optical fiber connection relationship dataset.
[0045] Step S4.2.3: Perform cross-association between the port mapping table and the physical optical port mapping table to generate an association index table, specifically including the following steps: First, using (iedName, physPort) in the port mapping table as the joint association key, the port mapping table is cross-matched with the physical optical port mapping table to obtain the correspondence between physical link endpoint mapping entries and virtual loop endpoint mapping entries; Secondly, the system determines whether the scenario is a switch scenario based on whether the switch name (switchIedName) in the physical link endpoint mapping entry is empty. If the switch name (switchIedName) in the physical link endpoint mapping entry is not empty, the scenario is determined to be a switch scenario. If the switch name (switchIedName) in the physical link endpoint mapping entry is empty, the scenario is determined to be a direct connection scenario. Secondly, for direct connection scenarios, construct the associated index entries corresponding to the direct connection scenarios. The associated index entries corresponding to the direct connection scenarios record the virtual loop identifier and fiber core identifier Core name in the corresponding physical link endpoint mapping entries and virtual loop endpoint mapping entries. For switch scenarios, a cross-fiber cable mapping is established using the switch name switchIedName and networkDomainId. An associated index entry for the switch scenario is constructed. The associated index entry records the virtual loop identifier in the physical link endpoint mapping entry and the virtual loop endpoint mapping entry, the two logical ports of the virtual loop corresponding to the virtual loop identifier, the fiber core identifier Core name to which the physical optical ports corresponding to the two logical ports of the virtual loop belong, and the networkDomainId of the switch to which the fiber core identifier Core name belongs. All associated index entries (including associated index entries for all directly connected scenarios and associated index entries for switch scenarios) constitute an associated index table, providing a unified retrieval benchmark for subsequent physical connectivity determination and scenario-specific port consistency verification.
[0046] Step S5: Based on the associated index table, perform virtual loop connectivity judgment and port consistency verification for different scenarios, and mark the validity and consistency of the valid virtual loops according to the connectivity and consistency verification results. This includes the following steps: Step S5.1: Extract each physical fiber connection relationship entry from the physical fiber connection relationship dataset, retrieve the corresponding associated index entry in the associated index table by using the fiber core identifier Core name in the physical fiber connection relationship entry, and determine the scenario to which the associated index entry belongs; Step S5.2: If the associated index entry belongs to a direct connection scenario, then perform virtual loop connectivity judgment and port consistency verification for the direct connection scenario, specifically as follows: Step S5.2.1, Virtual loop connectivity judgment in direct connection scenario: directly determine the connectivity validity of the virtual loop corresponding to the virtual loop identifier in the associated index entry; then, according to the virtual loop identifier in the associated index entry, retrieve the corresponding virtual loop entry in the set of valid virtual loops, and assign the validFlag in the retrieved virtual loop entry a valid connectivity flag; Step S5.2.2, Port consistency verification for direct connection scenarios: Based on the virtual loop identifier and fiber core identifier Core name in the associated index entries, retrieve the corresponding virtual loop endpoint mapping entries and physical link endpoint mapping entries in the port mapping table and physical optical port mapping table, respectively. Determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the physical link endpoint mapping entry, and determine whether the transmit / receive type PortType corresponding to the physical optical port name Pin name in the physical link endpoint mapping entry is consistent with the transmission direction transDirection of the virtual loop endpoint mapping entry. Step S5.2.3: If the physical optical port names are consistent and the transmission directions are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails, the consistency check flag in the virtual loop entry is marked as failed, and a note indicating port mismatch or signal direction mismatch is recorded.
[0047] If the physical optical port names are different but the transmission directions are the same, then the port name is noted as mismatched; if the physical optical port names are all the same but the transmission directions are different, then the signal direction is noted as mismatched; if the physical optical port names are different and the transmission directions are also different, then the port name is noted as mismatched and the signal direction is mismatched.
[0048] Step S5.3: If the associated index entry belongs to the switch scenario, then perform virtual loop connectivity judgment and port consistency verification for the switch scenario, specifically as follows: Step S5.3.1, Virtual loop connectivity determination in the switch scenario: Based on whether the network domain type (domainType) of the network domain identifier (networkDomainId) of the two fiber core identifiers (Core name) in the associated index entry is the same network connection port, if they are both the same network connection port, it indicates that the two switch ports belong to the same network connection port, and the connectivity of the virtual loop corresponding to the virtual loop identifier in the associated index entry is determined to be valid; then, based on the virtual loop identifier in the associated index entry, the corresponding virtual loop entry is retrieved in the set of valid virtual loops, and the valid flag (validFlag) in the retrieved virtual loop entry is assigned a valid connectivity flag; If the two switch ports belong to different VLANs or are not on the same network connection port, it indicates that the two switch ports belong to different VLANs or are not on the same network connection port. In this case, the connectivity of the virtual circuit corresponding to the virtual circuit identifier in the associated index entry is determined to be invalid. Then, based on the virtual circuit identifier in the associated index entry, the corresponding virtual circuit entry is retrieved in the set of valid virtual circuits. The valid flag validFlag in the retrieved virtual circuit entry is marked as invalid connectivity, and the note "Network ownership conflict leads to insufficient connectivity" is recorded.
[0049] Step S5.3.2, Port consistency verification in switch scenarios: Based on the virtual loop identifier and the two fiber core identifiers in the associated index entries, retrieve the corresponding virtual loop endpoint mapping entries and the two physical link endpoint mapping entries in the port mapping table and the physical optical port mapping table, respectively. Determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the two physical link endpoint mapping entries, and determine whether the transmit / receive type PortType corresponding to the physical optical port name Pin name in the two physical link endpoint mapping entries is consistent with the transmit / receive type of the logical port at both ends of the virtual loop. Step S5.3.3: If the physical optical port names are consistent and the transmit / receive types are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails, the consistency check flag in the virtual loop entry is marked as failed, and a note indicating port mismatch or signal direction mismatch is recorded.
[0050] If the physical optical port names are different but the transmit / receive types are the same, then the port name is noted as mismatched; if the physical optical port names are all the same but the transmit / receive types are different, then the signal direction is noted as mismatched; if the physical optical port names are different and the transmit / receive types are also different, then the port name is noted as mismatched and the signal direction is noted as mismatched.
[0051] Step S5.4, Abnormal Port Completion: If the abnormal mapping entries marked "Port allocation requires manual confirmation" in the device port mapping relationship configuration file have been manually completed, then the associated index table in step S4 is supplemented according to the completed mapping entries, and the scenario-specific virtual loop connectivity judgment and port consistency verification in steps S5.1~S5.3 are executed.
[0052] Step S6: Retrieve all virtual loop entries in the valid virtual loop set whose validity flag (validFlag) indicates valid connectivity and successful consistency verification. Construct a secondary loop topology diagram for visualization of all virtual loop entries in the valid virtual loop set that have valid connectivity and successful port consistency verification.
[0053] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0054] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0055] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0056] It should be noted that the embodiments described in this invention are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims. < / extref> < / extref> < / extref> < / inputs> < / inputs> < / ied> < / extref> < / extref> < / inputs> < / inputs> < / ied>
Claims
1. An intelligent recognition and display method based on the relationship between physical connections and virtual loops, characterized in that, Includes the following steps: Step S1: Parse the SDD file and SCD file to construct a device port mapping configuration file that includes the mapping relationship between the physical optical port name and the logical port name of the device; Step S2: Parse the physical fiber connection relationships in the SDD file and construct a physical fiber connection relationship dataset that includes the physical optical port names at both ends of the fiber core. Step S3: Extract the virtual loop logic relationship from the SCD file and construct a valid virtual loop set including the names of the logic ports at both ends of the virtual loop; Step S4: Based on the device port mapping relationship configuration file, reverse map the logical port names in the effective virtual loop set and the physical optical port names in the physical fiber connection relationship dataset respectively to generate the port mapping table of the effective virtual loop set and the physical optical port mapping table of the physical fiber connection relationship dataset respectively; cross-associate the port mapping table and the physical optical port mapping table to generate an association index table. Step S5: Based on the associated index table, perform virtual loop connectivity judgment and port consistency verification for different scenarios, and mark the validity and consistency of the valid virtual loops according to the connectivity and consistency verification results. Step S6: Construct a secondary loop topology diagram for visualization of all virtual loop entries in the valid virtual loop set that are marked as having valid connectivity and have been marked as having successfully passed port consistency checks.
2. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 1, characterized in that, The port mapping table of the effective virtual circuit set is obtained through the following steps: For each virtual loop entry in the valid virtual loop set, retrieve the physical optical port name corresponding to the transmitting logical port name and the receiving logical port name in the virtual loop entry from the device port mapping relationship configuration file. The corresponding virtual loop endpoint mapping entries are constructed. Each virtual loop endpoint mapping entry records the virtual loop identifier, the initiating device IED name, the transmitting logical port name, the physical optical port name corresponding to the transmitting logical port name, the receiving device IED name, the receiving logical port name, the physical optical port name corresponding to the receiving logical port name, and the transmission direction. All virtual loop endpoint mapping entries constitute a port mapping table, thereby obtaining the physical optical port corresponding to the logical port connected to both ends of the virtual loop corresponding to each virtual loop identifier.
3. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 2, characterized in that, The physical optical port mapping table of the physical optical fiber connection relationship dataset is obtained through the following steps: For each fiber core connection entry in the physical fiber connection relationship dataset, the logical port name corresponding to the physical optical port name connected at both ends of the fiber core in the fiber core connection relationship entry is retrieved from the device port mapping relationship configuration file, and the corresponding physical link endpoint mapping entry is constructed. The physical link endpoint mapping entry records the optical cable identifier, fiber core identifier, physical optical port name connected at both ends of the fiber core, device SCD model name of the device to which it belongs, transmit / receive type corresponding to the physical optical port name, switch name, and network affiliation identifier. All physical link endpoint mapping entries constitute the physical optical port mapping table, thereby obtaining the logical port corresponding to the physical optical port connected at both ends of each fiber core.
4. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 3, characterized in that, The process of cross-referencing the port mapping table and the physical optical port mapping table to generate the associated index table specifically includes the following steps: First, using the device SCD model name and physical optical port name in the port mapping table as the joint association key, the port mapping table and the physical optical port mapping table are cross-matched to obtain the correspondence between physical link endpoint mapping entries and virtual loop endpoint mapping entries. Secondly, the system determines whether the scenario is a switch scenario based on whether the switch name in the physical link endpoint mapping entry is empty. If the switch name in the physical link endpoint mapping entry is not empty, the scenario is determined to be a switch scenario. If the switch name in the physical link endpoint mapping entry is empty, the scenario is determined to be a direct connection scenario. Secondly, for direct connection scenarios, construct the associated index entries corresponding to the direct connection scenarios. The associated index entries corresponding to the direct connection scenarios record the virtual loop identifier and fiber core identifier in the physical link endpoint mapping entries and virtual loop endpoint mapping entries with corresponding relationships. For switch scenarios, cross-optical cable mapping is established through switch names and network affiliation identifiers, and associated index entries for switch scenarios are constructed. The associated index entries record the virtual loop identifiers in the corresponding physical link endpoint mapping entries and virtual loop endpoint mapping entries, the logical ports at both ends of the virtual loop corresponding to the virtual loop identifier, the fiber core identifiers of the physical optical ports at both ends of the virtual loop corresponding to the physical optical ports, and the network affiliation identifiers of the switches to which the fiber core identifiers belong; all associated index entries constitute an associated index table.
5. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 4, characterized in that, The scenarios include direct connection scenarios and switch scenarios; The scenario is determined by the following method: extract each physical fiber connection relationship entry from the physical fiber connection relationship dataset, retrieve the corresponding associated index entry in the associated index table through the fiber core identifier in the physical fiber connection relationship entry, and determine the scenario to which the associated index entry belongs. The virtual loop connectivity determination and port consistency verification in the direct connection scenario specifically include the following steps: The virtual loop connectivity determination in the direct connection scenario is as follows: directly determine the connectivity validity of the virtual loop corresponding to the virtual loop identifier in the associated index entry; then, based on the virtual loop identifier in the associated index entry, retrieve the corresponding virtual loop entry in the set of valid virtual loops, and assign a connectivity validity mark to the validity mark in the retrieved virtual loop entry; The port consistency verification in the direct connection scenario is as follows: First, based on the virtual loop identifier and fiber core identifier in the associated index entry, the corresponding virtual loop endpoint mapping entry and physical link endpoint mapping entry are retrieved in the port mapping table and physical optical port mapping table, respectively. Secondly, determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the physical link endpoint mapping entry, and determine whether the transmit / receive type corresponding to the physical optical port name in the physical link endpoint mapping entry is consistent with the transmission direction of the virtual loop endpoint mapping entry. Finally, if the physical optical port names are consistent and the transmission directions are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails.
6. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 5, characterized in that, The virtual loop connectivity determination and port consistency verification in the switch scenario specifically include the following steps: The virtual loop connectivity determination in the switch scenario is as follows: Based on whether the network domain type of the network affiliation identifier of the two fiber core identifiers in the associated index entry is the same network connection port, if they are the same network connection port, the connectivity of the virtual loop corresponding to the virtual loop identifier in the associated index entry is determined to be valid; then, based on the virtual loop identifier in the associated index entry, the corresponding virtual loop entry is retrieved in the set of valid virtual loops, and the validity marker in the retrieved virtual loop entry is assigned a valid connectivity marker. If they belong to different VLANs or one of them is not the same network connection port, the connectivity of the virtual circuit corresponding to the virtual circuit identifier in the associated index entry is determined to be invalid; then, the corresponding virtual circuit entry is retrieved in the set of valid virtual circuits according to the virtual circuit identifier in the associated index entry, and the validity flag in the retrieved virtual circuit entry is assigned the invalid connectivity flag. The port consistency verification in the switch scenario is as follows: First, based on the virtual loop identifier and the two fiber core identifiers in the associated index entry, the corresponding virtual loop endpoint mapping entry and the two physical link endpoint mapping entries are retrieved in the port mapping table and the physical optical port mapping table, respectively. Secondly, determine whether the physical optical port names corresponding to the logical port names at both ends of the virtual loop in the virtual loop endpoint mapping entry are consistent with the physical optical port names in the two physical link endpoint mapping entries, and determine whether the transmit / receive types corresponding to the physical optical port names in the two physical link endpoint mapping entries are consistent with the transmit / receive types of the logical ports at both ends of the virtual loop. Finally, if the physical optical port names are consistent and the transmit / receive types are consistent, the port consistency check is successful, and the consistency check flag in the virtual loop entry is marked as successful; otherwise, the port consistency check fails.
7. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 6, characterized in that, The device port mapping configuration file is hierarchically structured as device SCD model name-board number-mapping entry. Each device SCD model name node contains nodes for all board numbers of the corresponding device. Each board number node contains mapping entries for all physical optical ports and logical ports of the corresponding board number. Each mapping entry includes the physical optical port name and logical port name that form a corresponding relationship. The logical port establishes a corresponding relationship with the transmit optical port and receive optical port of the physical optical port with the corresponding board number and optical port identifier, and forms a corresponding mapping entry. The device port mapping configuration file is constructed through the following steps: Step S1.1: By comparing the device identifier hash values of the current SDD file and SCD file with the device identifier hash values recorded in the historical configuration file, determine whether to reuse the generated device port mapping relationship configuration file. If they match, it is determined that the current SDD file and SCD file have not undergone substantial changes, and the historically generated device port mapping relationship configuration file is directly reused to avoid repeatedly executing the complete cross-file port association mapping process. If they do not match, it is determined that the configuration status has changed, and steps S1.2 to S1.4 are executed to regenerate the device port mapping relationship configuration file. Step S1.2: Parse the SDD file to obtain all board numbers under the SCD model name of each device, as well as all physical optical port names, device numbers, and device descriptions under each board number; Step S1.3: Using the device SCD model name in the physical optical port mapping file as an index, parse the SCD file to obtain all logical port names under each device SCD model name; Step S1.4: Generate a device port mapping configuration file that includes the mapping relationship between physical optical ports and logical ports, using the board number and optical port identifier as indexes; If an anomaly occurs during the association process, such as a physical optical port not matching a logical port in the SCD file or a conflict where multiple physical optical ports match the same SCD logical port, the overall process will not be interrupted. Instead, a mark will be made at the corresponding mapping entry in the device port mapping relationship configuration file, indicating that the port allocation requires manual confirmation. An anomaly log will be generated for all abnormal mapping entries, recording the abnormal mapping entries and their corresponding anomaly details.
8. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 7, characterized in that, The physical fiber optic connection relationship dataset is constructed through the following steps: Step S2.2.1: Parse the nodes of valid cables and the sub-nodes of optical fiber cores in the SDD file. Construct the optical cable identification, optical cable type, starting cabinet reference, and ending cabinet reference of each cable obtained from the nodes of valid cables and the sub-nodes of optical fiber cores into the corresponding optical cable connection relationship entries. Construct the optical fiber core identification, starting port reference, ending port reference, physical optical port name, optical port type, and device number of the device to which the optical fiber core is connected into the corresponding optical fiber core connection relationship entries. Assign each optical fiber core connection relationship entry to the optical cable connection relationship entry of the cable to which it belongs. Step S2.2.2: Using the device number in the fiber core connection relationship entry as an index, extract the corresponding device SCD model name in the device port mapping relationship configuration file, and add the extracted device SCD model name to the corresponding fiber core connection relationship entry. Step S2.2.3: The optical cable connection relationship entries of all cables and the optical fiber core connection relationship entries of the optical fiber cores form the initial physical optical fiber connection relationship dataset; Step S2.3: If the device belongs to a switch, then further obtain the network ownership status of the switch from the SCD file. The network ownership status of the switch includes the switch IED name, network domain number, VLAN tag and network domain type. Specifically, for physical optical ports that have been assigned VLANs in the SCD file, different network domain numbers are assigned to them according to the VLAN identifier characters in the VLAN tag; according to the default configuration rules of the switch, the network affiliation status of all physical optical ports of the same switch that have not been explicitly assigned VLANs is initialized with the same network domain number, and the network domain type is initialized to the same network connection port. The network affiliation status of each switch is added to the corresponding fiber optic core connection relationship entry of the affiliated device to obtain a complete physical fiber optic connection relationship dataset.
9. The intelligent recognition and display method based on the relationship between physical connections and virtual loops according to claim 8, characterized in that, The set of effective virtual circuits is constructed through the following steps: Step S3.1: Locate each device in the SCD file using the device SCD model name and physical optical port name in the device port mapping configuration file as indexes. <ied>Nodes and their subordinates <inputs>Child nodes; traversal <inputs>In child nodes <extref>Elements, Extract <extref>The elements include the logical port name and transmit / receive type of this device, the logical port name and transmit / receive type of the peer device, the device SCD model name of the peer device, the signal type, and the transmission direction;< / extref> < / extref> < / inputs> < / inputs> < / ied> Step S3.2: Construct a set of valid virtual loops. Each virtual loop entry in the set of valid virtual loops includes a virtual loop identifier, initiating device IED name, transmitting logical port name, transmitting transceiver type, receiving device IED name, receiving logical port name, receiving transceiver type, signal type, transmission direction, optical cable identifier, unused validity flags to be processed, and unused consistency check flags to be processed. In this context, the name of the initiating device IED, the name of the transmitting logical port, and the transmitting transceiver type should be filled with the device SCD model name, the logical port name, and the transceiver type of the peer device, respectively; the name of the receiving device IED, the name of the receiving logical port, and the transceiver type should be filled with the device SCD model name, the logical port name, and the transceiver type of this device, respectively.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent recognition and display method based on the relationship between physical connections and virtual loops as described in any one of claims 1 to 9.
