A transmission link fault location method and system based on physical signal monitoring

By adding MCU, LCD display and Console interfaces to the Layer 2 switch, combining physical signal monitoring and neural network fault positioning models, the problem of inconvenient fault positioning of Layer 2 switches is solved, and fast and efficient fault positioning and recovery are achieved.

CN119676197BActive Publication Date: 2025-04-22X-SPEED INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510180829.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-04-22
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

The prior art is difficult to quickly locate and resolve the faults of Layer 2 switches in the transmission link, resulting in inconvenient operation and maintenance.

Method used

By adding MCU, LCD display and Console interfaces to the Layer 2 switch, the physical signal monitoring and register group of the Layer 2 switch chip are used for fault location, and combined with the neural network fault location model for cloud detection and fault recovery.

Benefits of technology

It realizes rapid positioning and timely recovery of transmission link failures, and improves the convenience and efficiency of operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676197B_ABST
    Figure CN119676197B_ABST
Patent Text Reader

Abstract

The present invention provides a transmission link fault location method and system based on physical signal monitoring in the field of transmission link fault location technology, the method includes: step S1, the second layer switching chip creates a register group, and the MCU creates a MAC address table; step S2, when accessing a new network device, the MCU updates the MAC address table after performing an abnormality check on the new MAC address through the MAC address table; step S3, fault location is performed through the queue controller watchdog event, and the event register is updated based on the fault type; step S4, the MCU reads the fault type from the event register to match the fault handling measures from the fault management table; step S5, the fault handling measures are matched, and the transmission link recovery operation is performed based on the fault handling measures; if not matched, the switch data is read from the register group and uploaded to the server for fault location, or the fault location is performed based on the console command input from the console interface. The advantages of the present invention are: greatly improving the convenience and timeliness of transmission link fault location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transmission link fault location, and in particular to a transmission link fault location method and system based on physical signal monitoring. Background Art

[0002] The transmission link involves many types of physical nodes (network transmission equipment). When a physical node fails, it will cause abnormal network transmission, and fault location is required. The Layer 2 switch is a physical node on the transmission link. Currently, the Layer 2 switch based on low-end Layer 2 switching chips does not have a management interface and only has the necessary clock, power supply, storage and other components. Therefore, when the Layer 2 switch, a physical node, fails to forward data, the interface cannot establish a link, or the transmission link is blocked due to compatibility issues, the problem cannot be quickly located, which brings great inconvenience to the operation and maintenance of the transmission link.

[0003] After searching, the Chinese invention patent with application number CN202310073106.3 and classification number H04B10 / 073 discloses a switch testing method, device, communication equipment and storage medium. This patent is for testing the switch to determine whether the transmission link is normal.

[0004] Therefore, how to provide a transmission link fault location method and system based on physical signal monitoring to improve the convenience and timeliness of transmission link fault location has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a transmission link fault locating method and system based on physical signal monitoring, so as to improve the convenience and timeliness of transmission link fault locating.

[0006] In a first aspect, the present invention provides a transmission link fault location method based on physical signal monitoring, comprising the following steps:

[0007] Step S1, the layer 2 switching chip of the layer 2 switch located in the transmission link creates a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register;

[0008] Step S2, the MCU of the layer 2 switch creates a MAC address table for storing the MAC addresses of the existing network, wherein the MAC address table stores MsbMac and LsbMac of the MAC addresses in a two-dimensional array structure, and sets a sorting rule for the MAC address table; the MsbMac and LsbMac are respectively the high 3-byte data and the low 3-byte data of the MAC address, and are represented by a 32-bit integer;

[0009] Step S3: When the layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read and sent to the MCU through the SMI interface; the MCU performs an abnormality check on the new MAC address through the MAC address table, generates a MAC check result, displays the MAC check result in real time through an LCD display, and updates the MAC address table based on the MAC check result and the sorting rule;

[0010] Step S4: During the operation of the layer 2 switch, the layer 2 switching chip monitors the physical signal in real time, and locates the fault based on the physical signal through the queue controller watchdog event. When the fault is located, the event register is updated based on the fault type, and an interrupt event is sent to the MCU through the interrupt pin.

[0011] Step S5, the MCU reads the fault type from the event register of the layer 2 switching chip through the SMI interface based on the received interrupt event, matches the fault handling measures from the preset fault management table according to the fault type, and displays the fault type in real time through the LCD display screen;

[0012] Step S6: When the MCU matches the fault handling measure, the transmission link recovery operation is performed based on the fault handling measure; when the fault handling measure is not matched, the switch data is read from the register group, and the switch data is uploaded to the server through the Console interface for fault location, or the fault location and transmission link recovery operation are performed based on the console command input from the Console interface.

[0013] Furthermore, in step S1, the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; and the global reset register is used to identify whether to perform a global reset.

[0014] Furthermore, in step S2, the sorting rule is specifically:

[0015] First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

[0016] Furthermore, the step S3 is specifically as follows:

[0017] When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

[0018] Further, in step S6, uploading the switch data to the server through the Console interface for fault location is specifically as follows:

[0019] The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set;

[0020] The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test;

[0021] The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

[0022] In a second aspect, the present invention provides a transmission link fault location system based on physical signal monitoring, comprising the following modules:

[0023] A register group creation module, used for a layer 2 switch chip of a layer 2 switch located in a transmission link to create a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register, and a global reset register;

[0024] A MAC address table creation module is used for the MCU of the layer 2 switch to create a MAC address table for storing the MAC addresses of the existing network. The MAC address table stores MsbMac and LsbMac of the MAC address in a two-dimensional array structure, and sets the sorting rules of the MAC address table; the MsbMac and LsbMac are respectively the high 3 bytes data and the low 3 bytes data of the MAC address, and are represented by 32-bit integers;

[0025] The MAC address verification module is used for reading the new MAC address of the new network device and sending it to the MCU through the SMI interface when the second-layer switching chip accesses the new network device through the physical port. The MCU performs abnormality verification on the new MAC address through the MAC address table, generates a MAC verification result, displays the MAC verification result in real time through the LCD display screen, and updates the MAC address table based on the MAC verification result and the sorting rule;

[0026] The fault location module is used in the operation of the layer 2 switch. The layer 2 switch chip monitors the physical signal in real time and locates the fault based on the physical signal through the queue controller watchdog event. When the fault is located, the event register is updated based on the fault type, and an interrupt event is sent to the MCU through the interrupt pin;

[0027] A fault handling measure matching module is used for the MCU to read the fault type from the event register of the layer 2 switching chip through the SMI interface based on the received interrupt event, match the fault handling measure from the preset fault management table according to the fault type, and display the fault type in real time through the LCD display screen;

[0028] A fault recovery module is used for executing a transmission link recovery operation based on the fault handling measures when the MCU matches the fault handling measures; when the fault handling measures are not matched, reading switch data from the register group, uploading the switch data to the server through the Console interface for fault location, or executing fault location and transmission link recovery operations based on the console command input from the Console interface.

[0029] Furthermore, in the register group creation module, the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; and the global reset register is used to identify whether to perform a global reset.

[0030] Furthermore, in the MAC address table creation module, the sorting rule is specifically as follows:

[0031] First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

[0032] Furthermore, the MAC address verification module is specifically used for:

[0033] When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

[0034] Further, in the fault recovery module, uploading the switch data to the server through the Console interface for fault location is specifically as follows:

[0035] The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set;

[0036] The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test;

[0037] The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

[0038] The advantages of the present invention are:

[0039] 1. A register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register is created through a layer 2 switching chip of a layer 2 switch located in a transmission link; the MCU of the layer 2 switch creates a MAC address table and sets a sorting rule for the MAC address table; when the layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read and sent to the MCU through the SMI interface; the MCU performs an abnormality check on the new MAC address through the MAC address table, displays the MAC check result in real time through an LCD display, and updates the MAC address table based on the MAC check result and the sorting rule; during the operation of the layer 2 switch, the layer 2 switching chip monitors the physical signal in real time, and locates the fault based on the physical signal through the queue controller watchdog event, updates the event register based on the fault type when the fault is located, and sends an interrupt event to the MCU through the interrupt pin; based on the interrupt event, the MCU reads the fault type from the event register of the layer 2 switching chip through the SMI interface, matches the fault handling measures from the preset fault management table according to the fault type, and displays the fault type in real time through the LCD display; when the MCU matches the fault handling measures, the transmission link recovery is performed based on the fault handling measures operation; when no fault handling measures are matched, the switch data is read from the register group, and the switch data is uploaded to the server through the Console interface for fault location, or the fault location and transmission link recovery operations are performed based on the console command input from the Console interface; that is, the present invention adds an MCU, an LCD display screen and a Console interface on the basis of a traditional two-layer switch. When a fault occurs, the two-layer switching chip sends an interrupt event to the MCU through an interrupt pin. After receiving the interrupt event, the MCU reads the fault type from the two-layer switching chip through the SMI interface, and matches the fault handling measures based on the fault management table. When no fault handling measures are matched, the switch data can also be uploaded through the Console interface for fault location, or the fault location and transmission link recovery operations are performed based on the console command input from the Console interface; the MCU also stores a MAC address table for address conflict and loop verification, and displays relevant data in the fault location process through the LCD display screen, that is, the two-layer switch first detects and handles the fault locally, and if the fault cannot be eliminated, it performs cloud detection through the server, and can also be combined with console commands, and relevant data is displayed in real time through the LCD display screen, which ultimately greatly improves the convenience and timeliness of transmission link fault location.

[0040] 2. By creating a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register in the second-layer switching chip; the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset. The switch data stored in the register group can be used to quickly and comprehensively locate the fault, thereby greatly improving the timeliness and accuracy of the second-layer switch fault location.

[0041] 3. The MAC address table is set to store the MsbMac and LsbMac of the MAC address in a two-dimensional array structure, that is, each row of data in the MAC address table contains two columns, each column stores MsbMac and LsbMac respectively, and MsbMac and LsbMac constitute a complete MAC address, and the sorting rule of the MAC address table is to sort each MAC address based on LsbMac first, and then sort the MAC address based on MsbMac for MAC addresses with the same LsbMac. Subsequently, the MAC address can be quickly searched from the MAC address table through the binary search method, or the MAC address can be quickly inserted into the MAC address table, thereby greatly improving the management efficiency of the MAC address.

[0042] 4. By setting the MAC address to a 32-bit integer, it has the advantages of small space occupation, high calculation efficiency, easy integration and indexing, which further improves the management efficiency of the MAC address.

[0043] 5. Create a fault location model based on a neural network through a server, set the loss function of the fault location model to the cross entropy loss function, obtain a large amount of historical switch data for preprocessing and annotation, and then build a data set. The data set is divided into a training set, a validation set, and a test set. The fault location model is trained through the training set until the loss value of the cross entropy loss function is less than the preset loss function. The hyperparameters of the fault location model are continuously optimized during the training process; the trained fault location model is then verified through the validation set, and the verified fault location model is tested through the test set. The tested fault location model is deployed, and the uploaded switch data is subsequently input into the deployed fault location model to quickly locate the fault; since the neural network can effectively learn fault characteristics and is trained with big data (a large amount of historical switch data), combined with model optimization, verification, and testing, the fault location accuracy is ultimately greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0045] Figure 1 It is a flow chart of a transmission link fault locating method based on physical signal monitoring of the present invention.

[0046] Figure 2 It is a structural schematic diagram of a transmission link fault locating system based on physical signal monitoring of the present invention.

[0047] Figure 3 It is a hardware architecture diagram of the layer 2 switch of the present invention. DETAILED DESCRIPTION

[0048] The technical solution in the embodiment of the present application has the following overall idea: an MCU, an LCD display and a Console interface are added on the basis of a traditional Layer 2 switch. When a fault occurs, the Layer 2 switching chip sends an interrupt event to the MCU through an interrupt pin. After receiving the interrupt event, the MCU reads the fault type from the Layer 2 switching chip through the SMI interface, and matches the fault handling measures based on the fault management table. When no fault handling measures are matched, the switch data can be uploaded through the Console interface for fault location, or the fault location and transmission link recovery operations can be performed based on the console commands input from the Console interface. The MCU also stores a MAC address table for address conflict and loop verification, and displays relevant data in the fault location process through the LCD display to improve the convenience and timeliness of transmission link fault location.

[0049] Please refer to Figures 1 to 3 As shown, the present invention needs to use the following two-layer switch, including a two-layer switching chip (Switch), an MCU, an LCD display, a Console interface (RJ45 interface), a power module, a clock module and a memory;

[0050] The layer 2 switching chip is connected to the MCU via an interrupt pin (INT) and an SMI interface; the MCU is connected to the Console interface via UART and to the LCD display via an I2C bus; the layer 2 switching chip is also connected to a power module, a clock module and a memory;

[0051] The LCD display screen is used to display the current network status, abnormal information, the number of terminals in the local area network, MAC address conflicts, changes in interface connection status, etc.

[0052] A preferred embodiment of a transmission link fault location method based on physical signal monitoring of the present invention comprises the following steps:

[0053] Step S1, the layer 2 switching chip of the layer 2 switch located in the transmission link creates a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register;

[0054] Step S2, the MCU of the layer 2 switch creates a MAC address table for storing the MAC addresses of the existing network, wherein the MAC address table stores MsbMac and LsbMac of the MAC addresses in a two-dimensional array structure, and sets a sorting rule for the MAC address table; the MsbMac and LsbMac are respectively the high 3-byte data and the low 3-byte data of the MAC address, and are represented by a 32-bit integer;

[0055] By setting the MAC address to be represented by a 32-bit integer, it has the advantages of small space occupation, high calculation efficiency, easy integration, and convenient indexing, which further improves the management efficiency of the MAC address.

[0056] Step S3: When the layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read and sent to the MCU through the SMI interface; the MCU performs an abnormality check on the new MAC address through the MAC address table, generates a MAC check result, displays the MAC check result in real time through an LCD display, and updates the MAC address table based on the MAC check result and the sorting rule;

[0057] In specific implementation, there may be multiple Layer 2 switches in the network topology, and multiple network devices may be connected to each Layer 2 switch, resulting in multiple MAC addresses appearing in a Layer 2 network at the same time. Some MAC addresses have been entered into the MAC address table. At this time, it is necessary to distinguish which MAC address is the MAC address of the newly connected network device and verify the MAC address. Specifically:

[0058] When a new network device is connected, all the MAC addresses are read and the CRC check value is calculated. The CRC check value is compared with the CRC check value calculated last time. Inconsistent values ​​indicate that there is a change in the MAC address. Then, based on the sorting rule, each MAC address is sorted to update the MAC address table. The newly connected MAC address is located by comparing the updated MAC address table with the MAC address table before the update, and then the MAC address is verified.

[0059] Step S4: During the operation of the layer 2 switch, the layer 2 switch chip locates the fault through the queue controller watchdog event, updates the event register based on the fault type when a fault is detected, and sends an interrupt event to the MCU through the interrupt pin;

[0060] The Layer 2 switching chip provides a fault location mechanism (abnormal detection mechanism), such as whether an internal interrupt caused by abnormal forwarding logic of the Layer 2 switching chip is triggered, or whether abnormal traffic in the network triggers an abnormal buffer waterline in the Layer 2 switching chip.

[0061] Step S5, based on the received interrupt event, the MCU reads the fault type from the event register of the layer 2 switching chip through the SMI interface, matches the fault handling measures from the preset fault management table according to the fault type, and displays the fault type in real time through the LCD display screen; in specific implementation, if the specific fault type cannot be determined, the MCU can also determine which port's interface status has changed through the status register to assist in fault location;

[0062] Step S6: When the MCU matches the fault handling measures, it performs transmission link recovery operations based on the fault handling measures, and can quickly respond to and handle the Layer 2 switch chip fault through the interrupt trigger mechanism, and can complete network self-recovery in milliseconds; when the fault handling measures are not matched, the switch data is read from the register group, and the switch data is uploaded to the server through the Console interface for fault location, or the fault location and transmission link recovery operations are performed based on the console command input from the Console interface. The switch data is the data stored in each register in the register group.

[0063] In step S1, the control register is used to identify the interface configuration mode, including whether to enable auto-negotiation, rate and duplex mode configuration, etc.; the status register is used to identify the interface status, including the auto-negotiation status and link status; the auto-negotiation capability register is used to identify the interface auto-negotiation status, including the auto-negotiation capability enabled on this end and the auto-negotiation capability and status of the remote end; the master-slave mode register is used to identify the master-slave status, that is, used to view and configure the status of the master-slave mode in 1000base-T and 100base-T2 modes; the PHY register is used to identify the PHY manufacturer and model, and the PHY manufacturer and model can also be used for fault location. For example, when a certain situation occurs in a layer 2 switch of a certain manufacturer and model, big data analysis technology can be used to determine what kind of fault is most likely and how to handle it; the custom register is used to identify custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset.

[0064] By creating a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register in the second-layer switching chip; the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset. The switch data stored in the register group can be used to quickly and comprehensively locate the fault, thereby greatly improving the timeliness and accuracy of the second-layer switch fault location.

[0065] In step S2, the sorting rule is specifically:

[0066] First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

[0067] By setting the MAC address table to store the MsbMac and LsbMac of the MAC address in a two-dimensional array structure, that is, each row of data in the MAC address table contains two columns, each column stores MsbMac and LsbMac respectively, and MsbMac and LsbMac constitute a complete MAC address, and the sorting rule of the MAC address table is to sort each MAC address based on LsbMac first, and then sort the MAC address based on MsbMac for MAC addresses with the same LsbMac. Subsequently, the MAC address can be quickly searched from the MAC address table through the binary search method, or the MAC address can be quickly inserted into the MAC address table, thereby greatly improving the management efficiency of the MAC address.

[0068] The step S3 is specifically as follows:

[0069] When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

[0070] That is, if the new MAC address does not exist in the MAC address table, the new MAC address is stored; if it exists, an abnormality is prompted.

[0071] In step S6, uploading the switch data to the server through the console interface for fault location is specifically as follows:

[0072] The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set;

[0073] The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test;

[0074] The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

[0075] A fault location model is created based on a neural network through a server, and the loss function of the fault location model is set to the cross entropy loss function. A large amount of historical switch data is obtained for preprocessing and annotation to construct a data set, and the data set is divided into a training set, a validation set, and a test set. The fault location model is trained with the training set until the loss value of the cross entropy loss function is less than the preset loss function. The hyperparameters of the fault location model are continuously optimized during the training process; the trained fault location model is then verified with the validation set, and the verified fault location model is tested with the test set, and the tested fault location model is deployed. Subsequently, the uploaded switch data is input into the deployed fault location model to quickly locate the fault; since the neural network can effectively learn fault characteristics and is trained with big data (a large amount of historical switch data), combined with model optimization, verification, and testing, the fault location accuracy is ultimately greatly improved.

[0076] The MCU records the operation log including at least the switch data, fault location report, and fault handling results in real time, encrypts the operation log into an encrypted log through the SDES algorithm and the ChaCha20 algorithm, stores the encrypted log and backs it up to the server. Storing the operation log facilitates later tracing, and encrypting and storing the operation log through two encryption algorithms prevents it from being stolen and tampered with in plain text, thereby greatly improving the security of the operation log storage.

[0077] A preferred embodiment of a transmission link fault location system based on physical signal monitoring of the present invention includes the following modules:

[0078] A register group creation module, used for a layer 2 switch chip of a layer 2 switch located in a transmission link to create a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register, and a global reset register;

[0079] A MAC address table creation module is used for the MCU of the layer 2 switch to create a MAC address table for storing the MAC addresses of the existing network. The MAC address table stores MsbMac and LsbMac of the MAC address in a two-dimensional array structure, and sets the sorting rules of the MAC address table; the MsbMac and LsbMac are respectively the high 3 bytes data and the low 3 bytes data of the MAC address, and are represented by 32-bit integers;

[0080] By setting the MAC address to be represented by a 32-bit integer, it has the advantages of small space occupation, high calculation efficiency, easy integration, and convenient indexing, which further improves the management efficiency of the MAC address.

[0081] The MAC address verification module is used for reading the new MAC address of the new network device and sending it to the MCU through the SMI interface when the second-layer switching chip accesses the new network device through the physical port. The MCU performs abnormality verification on the new MAC address through the MAC address table, generates a MAC verification result, displays the MAC verification result in real time through the LCD display screen, and updates the MAC address table based on the MAC verification result and the sorting rule;

[0082] In specific implementation, there may be multiple Layer 2 switches in the network topology, and multiple network devices may be connected to each Layer 2 switch, resulting in multiple MAC addresses appearing in a Layer 2 network at the same time. Some MAC addresses have been entered into the MAC address table. At this time, it is necessary to distinguish which MAC address is the MAC address of the newly connected network device and verify the MAC address. Specifically:

[0083] When a new network device is connected, all the MAC addresses are read and the CRC check value is calculated. The CRC check value is compared with the CRC check value calculated last time. Inconsistent values ​​indicate that there is a change in the MAC address. Then, based on the sorting rule, each MAC address is sorted to update the MAC address table. The newly connected MAC address is located by comparing the updated MAC address table with the MAC address table before the update, and then the MAC address is verified.

[0084] The fault location module is used in the operation of the layer 2 switch. The layer 2 switch chip locates the fault through the queue controller watchdog event. When a fault is detected, the event register is updated based on the fault type, and an interrupt event is sent to the MCU through the interrupt pin.

[0085] The Layer 2 switching chip provides a fault location mechanism (abnormal detection mechanism), such as whether an internal interrupt caused by abnormal forwarding logic of the Layer 2 switching chip is triggered, or whether abnormal traffic in the network triggers an abnormal buffer waterline in the Layer 2 switching chip.

[0086] A fault handling measure matching module is used for the MCU to read the fault type from the event register of the layer 2 switching chip through the SMI interface based on the received interrupt event, match the fault handling measure from the preset fault management table according to the fault type, and display the fault type in real time through the LCD display screen; in specific implementation, if the specific fault type cannot be determined, the MCU can also determine which port's interface status has changed through the status register to assist in fault location;

[0087] The fault recovery module is used for executing the transmission link recovery operation based on the fault handling measures when the MCU matches the fault handling measures, and can quickly respond to and handle the fault of the layer 2 switch chip through the interrupt trigger mechanism, and can complete the network self-recovery in milliseconds; when the fault handling measures are not matched, the switch data is read from the register group, and the switch data is uploaded to the server through the console interface for fault location, or the fault location and transmission link recovery operation are executed based on the console command input from the console interface. The switch data is the data stored in each register in the register group.

[0088] In the register group creation module, the control register is used to identify the interface configuration mode, including whether to enable auto-negotiation, rate and duplex mode configuration, etc.; the status register is used to identify the interface status, including the auto-negotiation status and link status; the auto-negotiation capability register is used to identify the interface auto-negotiation status, including the auto-negotiation capability enabled on this end and the auto-negotiation capability and status of the remote end; the master-slave mode register is used to identify the master-slave status, that is, it is used to view and configure the status of the master-slave mode in 1000base-T and 100base-T2 modes; the PHY register is used to identify the PHY manufacturer and model, and the PHY manufacturer and model can also be used for fault location. For example, when a certain situation occurs in a layer 2 switch of a certain manufacturer and model, big data analysis technology can be used to determine what kind of fault is most likely and how to handle it; the custom register is used to identify custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset.

[0089] By creating a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register in the second-layer switching chip; the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset. The switch data stored in the register group can be used to quickly and comprehensively locate the fault, thereby greatly improving the timeliness and accuracy of the second-layer switch fault location.

[0090] In the MAC address table creation module, the sorting rule is specifically as follows:

[0091] First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

[0092] By setting the MAC address table to store the MsbMac and LsbMac of the MAC address in a two-dimensional array structure, that is, each row of data in the MAC address table contains two columns, each column stores MsbMac and LsbMac respectively, and MsbMac and LsbMac constitute a complete MAC address, and the sorting rule of the MAC address table is to sort each MAC address based on LsbMac first, and then sort the MAC address based on MsbMac for MAC addresses with the same LsbMac. Subsequently, the MAC address can be quickly searched from the MAC address table through the binary search method, or the MAC address can be quickly inserted into the MAC address table, thereby greatly improving the management efficiency of the MAC address.

[0093] The MAC address verification module is specifically used for:

[0094] When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

[0095] That is, if the new MAC address does not exist in the MAC address table, the new MAC address is stored; if it exists, an abnormality is prompted.

[0096] In the fault recovery module, uploading the switch data to the server through the Console interface for fault location is specifically as follows:

[0097] The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set;

[0098] The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test;

[0099] The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

[0100] A fault location model is created based on a neural network through a server, and the loss function of the fault location model is set to the cross entropy loss function. A large amount of historical switch data is obtained for preprocessing and annotation to construct a data set, and the data set is divided into a training set, a validation set, and a test set. The fault location model is trained with the training set until the loss value of the cross entropy loss function is less than the preset loss function. The hyperparameters of the fault location model are continuously optimized during the training process; the trained fault location model is then verified with the validation set, and the verified fault location model is tested with the test set, and the tested fault location model is deployed. Subsequently, the uploaded switch data is input into the deployed fault location model to quickly locate the fault; since the neural network can effectively learn fault characteristics and is trained with big data (a large amount of historical switch data), combined with model optimization, verification, and testing, the fault location accuracy is ultimately greatly improved.

[0101] The MCU records the operation log including at least the switch data, fault location report, and fault handling results in real time, encrypts the operation log into an encrypted log through the SDES algorithm and the ChaCha20 algorithm, stores the encrypted log and backs it up to the server. Storing the operation log facilitates later tracing, and encrypting and storing the operation log through two encryption algorithms prevents it from being stolen and tampered with in plain text, thereby greatly improving the security of the operation log storage.

[0102] In summary, the advantages of the present invention are:

[0103] 1. A register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register is created through a layer 2 switching chip of a layer 2 switch located in a transmission link; the MCU of the layer 2 switch creates a MAC address table and sets a sorting rule for the MAC address table; when the layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read and sent to the MCU through the SMI interface; the MCU performs an abnormality check on the new MAC address through the MAC address table, displays the MAC check result in real time through an LCD display, and updates the MAC address table based on the MAC check result and the sorting rule; during the operation of the layer 2 switch, the layer 2 switching chip monitors the physical signal in real time, and locates the fault based on the physical signal through the queue controller watchdog event, updates the event register based on the fault type when the fault is located, and sends an interrupt event to the MCU through the interrupt pin; based on the interrupt event, the MCU reads the fault type from the event register of the layer 2 switching chip through the SMI interface, matches the fault handling measures from the preset fault management table according to the fault type, and displays the fault type in real time through the LCD display; when the MCU matches the fault handling measures, the transmission link recovery is performed based on the fault handling measures operation; when no fault handling measures are matched, the switch data is read from the register group, and the switch data is uploaded to the server through the Console interface for fault location, or the fault location and transmission link recovery operations are performed based on the console command input from the Console interface; that is, the present invention adds an MCU, an LCD display screen and a Console interface on the basis of a traditional two-layer switch. When a fault occurs, the two-layer switching chip sends an interrupt event to the MCU through an interrupt pin. After receiving the interrupt event, the MCU reads the fault type from the two-layer switching chip through the SMI interface, and matches the fault handling measures based on the fault management table. When no fault handling measures are matched, the switch data can also be uploaded through the Console interface for fault location, or the fault location and transmission link recovery operations are performed based on the console command input from the Console interface; the MCU also stores a MAC address table for address conflict and loop verification, and displays relevant data in the fault location process through the LCD display screen, that is, the two-layer switch first detects and handles the fault locally, and if the fault cannot be eliminated, it performs cloud detection through the server, and can also be combined with console commands, and relevant data is displayed in real time through the LCD display screen, which ultimately greatly improves the convenience and timeliness of transmission link fault location.

[0104] 2. By creating a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register in the second-layer switching chip; the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; the global reset register is used to identify whether to perform a global reset. The switch data stored in the register group can be used to quickly and comprehensively locate the fault, thereby greatly improving the timeliness and accuracy of the second-layer switch fault location.

[0105] 3. The MAC address table is set to store the MsbMac and LsbMac of the MAC address in a two-dimensional array structure, that is, each row of data in the MAC address table contains two columns, each column stores MsbMac and LsbMac respectively, and MsbMac and LsbMac constitute a complete MAC address, and the sorting rule of the MAC address table is to sort each MAC address based on LsbMac first, and then sort the MAC address based on MsbMac for MAC addresses with the same LsbMac. Subsequently, the MAC address can be quickly searched from the MAC address table through the binary search method, or the MAC address can be quickly inserted into the MAC address table, thereby greatly improving the management efficiency of the MAC address.

[0106] 4. By setting the MAC address to a 32-bit integer, it has the advantages of small space occupation, high calculation efficiency, easy integration and indexing, which further improves the management efficiency of the MAC address.

[0107] 5. Create a fault location model based on a neural network through a server, set the loss function of the fault location model to the cross entropy loss function, obtain a large amount of historical switch data for preprocessing and annotation, and then build a data set. The data set is divided into a training set, a validation set, and a test set. The fault location model is trained through the training set until the loss value of the cross entropy loss function is less than the preset loss function. The hyperparameters of the fault location model are continuously optimized during the training process; the trained fault location model is then verified through the validation set, and the verified fault location model is tested through the test set. The tested fault location model is deployed, and the uploaded switch data is subsequently input into the deployed fault location model to quickly locate the fault; since the neural network can effectively learn fault characteristics and is trained with big data (a large amount of historical switch data), combined with model optimization, verification, and testing, the fault location accuracy is ultimately greatly improved.

[0108] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A transmission link fault location method based on physical signal monitoring, characterized in that: The steps include: Step S1, the layer 2 switching chip of the layer 2 switch located in the transmission link creates a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register and a global reset register; Step S2, the MCU of the layer 2 switch creates a MAC address table for storing the MAC addresses of the existing network, wherein the MAC address table stores MsbMac and LsbMac of the MAC addresses in a two-dimensional array structure, and sets a sorting rule for the MAC address table; the MsbMac and LsbMac are respectively the high 3-byte data and the low 3-byte data of the MAC address, and are represented by a 32-bit integer; Step S3: When the layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read and sent to the MCU through the SMI interface; the MCU performs an abnormality check on the new MAC address through the MAC address table, generates a MAC check result, displays the MAC check result in real time through an LCD display, and updates the MAC address table based on the MAC check result and the sorting rule; Step S4: During the operation of the layer 2 switch, the layer 2 switching chip monitors the physical signal in real time, and locates the fault based on the physical signal through the queue controller watchdog event. When the fault is located, the event register is updated based on the fault type, and an interrupt event is sent to the MCU through the interrupt pin. Step S5, the MCU reads the fault type from the event register of the layer 2 switching chip through the SMI interface based on the received interrupt event, matches the fault handling measures from the preset fault management table according to the fault type, and displays the fault type in real time through the LCD display screen; Step S6: When the MCU matches the fault handling measure, the transmission link recovery operation is performed based on the fault handling measure; when the fault handling measure is not matched, the switch data is read from the register group, and the switch data is uploaded to the server through the Console interface for fault location, or the fault location and transmission link recovery operation are performed based on the console command input from the Console interface.

2. A transmission link fault location method based on physical signal monitoring as claimed in claim 1, characterized in that: In step S1, the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; and the global reset register is used to identify whether to perform a global reset.

3. A transmission link fault location method based on physical signal monitoring as claimed in claim 1, characterized in that: In step S2, the sorting rule is specifically: First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

4. A transmission link fault location method based on physical signal monitoring as claimed in claim 1, characterized in that: The step S3 is specifically as follows: When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

5. A transmission link fault location method based on physical signal monitoring as claimed in claim 1, characterized in that: In step S6, uploading the switch data to the server through the console interface for fault location is specifically as follows: The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set; The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test; The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

6. A transmission link fault location system based on physical signal monitoring, characterized in that: Includes the following modules: A register group creation module, used for a layer 2 switch chip of a layer 2 switch located in a transmission link to create a register group including a control register, a status register, an auto-negotiation capability register, a master-slave mode register, a PHY register, a custom register, an event register, and a global reset register; A MAC address table creation module is used for the MCU of the layer 2 switch to create a MAC address table for storing the MAC addresses of the existing network. The MAC address table stores MsbMac and LsbMac of the MAC address in a two-dimensional array structure, and sets the sorting rules of the MAC address table; the MsbMac and LsbMac are respectively the high 3 bytes data and the low 3 bytes data of the MAC address, and are represented by 32-bit integers; The MAC address verification module is used for reading the new MAC address of the new network device and sending it to the MCU through the SMI interface when the second-layer switching chip accesses the new network device through the physical port. The MCU performs abnormality verification on the new MAC address through the MAC address table, generates a MAC verification result, displays the MAC verification result in real time through the LCD display screen, and updates the MAC address table based on the MAC verification result and the sorting rule; The fault location module is used in the operation of the layer 2 switch. The layer 2 switch chip monitors the physical signal in real time and locates the fault based on the physical signal through the queue controller watchdog event. When the fault is located, the event register is updated based on the fault type, and an interrupt event is sent to the MCU through the interrupt pin; A fault handling measure matching module is used for the MCU to read the fault type from the event register of the layer 2 switching chip through the SMI interface based on the received interrupt event, match the fault handling measure from the preset fault management table according to the fault type, and display the fault type in real time through the LCD display screen; A fault recovery module is used for executing a transmission link recovery operation based on the fault handling measures when the MCU matches the fault handling measures; when the fault handling measures are not matched, reading switch data from the register group, uploading the switch data to the server through the Console interface for fault location, or executing fault location and transmission link recovery operations based on the console command input from the Console interface.

7. A transmission link fault location system based on physical signal monitoring as claimed in claim 6, characterized in that: In the register group creation module, the control register is used to identify the interface configuration mode; the status register is used to identify the interface status; the auto-negotiation capability register is used to identify the interface auto-negotiation status; the master-slave mode register is used to identify the master-slave status; the PHY register is used to identify the PHY manufacturer and model; the custom register is used to identify the custom content; the event register is used to identify the fault type; and the global reset register is used to identify whether to perform a global reset.

8. A transmission link fault location system based on physical signal monitoring as claimed in claim 6, characterized in that: In the MAC address table creation module, the sorting rule is specifically as follows: First, the MAC addresses are sorted based on the LsbMac, and for MAC addresses with the same LsbMac, the MAC addresses are sorted based on the MsbMac.

9. A transmission link fault location system based on physical signal monitoring as claimed in claim 6, characterized in that: The MAC address verification module is specifically used for: When the Layer 2 switching chip accesses a new network device through a physical port, the new MAC address of the new network device is read in real time and sent to the MCU through the SMI interface. The MCU matches the new MAC address from the MAC address table through a binary search method to perform an address conflict check, and performs a MAC address loop check based on the MAC address table to generate a MAC check result, which is displayed in real time on an LCD display. When the MAC check result is normal, the new MAC address is updated to the MAC address table based on the sorting rule.

10. A transmission link fault location system based on physical signal monitoring as claimed in claim 6, characterized in that: In the fault recovery module, uploading the switch data to the server through the Console interface for fault location is specifically as follows: The server creates a fault location model based on a neural network, sets the loss function of the fault location model to be a cross entropy loss function, obtains a large amount of historical switch data, performs data cleaning preprocessing on each of the historical switch data, and then labels the preprocessed historical switch data with fault type, fault level, and fault handling measures to construct a data set; The server divides the data set into a training set, a validation set, and a test set based on a preset ratio, trains the fault location model through the training set until the loss value of the cross entropy loss function is less than the preset loss function, and continuously optimizes the hyperparameters of the fault location model during the training process; then calculates the fault location accuracy through the validation set to verify the trained fault location model, calculates the confidence through the test set to test the verified fault location model, and deploys the fault location model that has passed the test; The MCU uploads the switch data to the server through the Console interface. The server uses the deployed fault location model to locate the fault of the switch data, and generates a fault location report carrying the fault type, fault level, fault handling measures and detection time. The server stores and backs up the fault location report and feeds the fault location report back to the MCU. The MCU performs a transmission link recovery operation based on the received fault location report.

Citation Information

Patent Citations

  • Switch test method and device, communication equipment and storage medium

    CN116094585A

  • System capable of quickly discovering and processing network fault, and processing method thereof

    CN107819633A

  • System and method for evaluating related transmission performance of network node and related equipment

    CN112311614A