Detection and repair method, device and equipment of switch and medium

By determining the connection status of ports and modules in the switch and configuring and repairing using mapping relationships, the problem of low detection and repair efficiency of switch port modules in the prior art is solved, which improves fault handling efficiency and reduces maintenance costs.

CN119094331APending Publication Date: 2024-12-06XIAN YIPU COMM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344654.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the prior art, the detection and repair efficiency of switch ports and their modules is low, making it difficult to ensure the stability of the network.

Method used

By determining the connection status and module type of each port in the switch, reconfiguring and repairing the target port and cable module according to the mapping relationship, using EEPROM information for fault location and repair, gradually troubleshooting problems, and improving the accuracy of fault location and repair. .

Benefits of technology

It improves the efficiency of switch fault handling, reduces the need for manual intervention, significantly reduces maintenance costs, and ensures the stable operation of the switch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094331A_ABST
    Figure CN119094331A_ABST
Patent Text Reader

Abstract

The invention provides a switch detection and repair method and device, equipment and a medium, and the method comprises the steps: firstly, determining the connection state of each port in a switch, and the type of a module inserted into each port; then, for the target port of which the connection state is connection interruption and the module type is cable, reconfiguring the target port according to the first mapping relation and the target port; then, if the connection state of the configured target port is still connection interruption, target EEPROM information of a target cable module is determined according to a second mapping relation and the target cable module inserted into the target port, and the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information; and finally, repairing the target cable module according to the target EEPROM information. According to the method provided by the invention, the efficiency of detecting and repairing the port and the module of the switch is improved, the labor cost is reduced, and the stability of network connection is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network switch communication technology, and in particular to a switch detection and repair method, device, equipment and medium. Background Art

[0002] Network infrastructure needs to be highly scalable and stable to handle more device connections and greater data traffic. The switch is the core device of the network infrastructure, responsible for data transmission between different devices, and the corresponding modules connected to it can make data transmission more efficient and accurate. Therefore, in network management, it is crucial to detect and maintain the ports and modules of the switch, which not only maintains the stability of the network, but also ensures the continuity and security of various network services.

[0003] In the prior art, the detection of switch ports and their modules relies on manual inspection and maintenance. Usually, relevant maintenance personnel are dispatched to inspect some switches or faulty switches regularly or when a switch fails. After the fault is found, the status of the switch ports and modules are checked and repaired one by one to ensure the normal operation of the switch ports and their modules.

[0004] However, the detection and repair methods of the ports and modules of the switches in the prior art are inefficient, time-consuming and labor-intensive, and it is difficult to ensure the stability of the network. Summary of the invention

[0005] The present application provides a switch detection and repair method, device, equipment and medium to solve the problem that the detection and repair methods of switch ports and modules in the prior art are inefficient, time-consuming and labor-intensive, and difficult to ensure network stability.

[0006] In a first aspect, the present application provides a switch detection and repair method, comprising:

[0007] Determine the connection status of each port in the switch and the type of module inserted into each port;

[0008] For a target port whose connection state is disconnected and whose module type is cable, reconfigure the target port according to a first mapping relationship and the target port, wherein the first mapping relationship is used to indicate a correspondence between a port and Serdes information;

[0009] If the connection state of the configured target port is still disconnected, determining the target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port, wherein the second mapping relationship is used to indicate the mapping relationship between the cable module and the EEPROM information;

[0010] The target cable module is repaired according to the target EEPROM information.

[0011] Optionally, the reconfiguring the target port according to the first mapping relationship and the target port includes:

[0012] According to the first mapping relationship and the target port identifier corresponding to the target port, acquiring the target Serdes information corresponding to the target port identifier;

[0013] Reconfigure the target port according to the target Serdes information;

[0014] Control the configured target port to power on and off again.

[0015] Optionally, determining the target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port includes:

[0016] Obtaining a target data transmission rate of the target port;

[0017] The target EEPROM information corresponding to the target cable module is determined according to the target data transmission rate and the second mapping relationship.

[0018] Optionally, before repairing the target cable module according to the target EEPROM information, the method further includes:

[0019] Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;

[0020] The abnormal sub-EEPROM information and the identifier corresponding to the target cable module are stored in a fault module table;

[0021] The value of the first binary bit of the first field corresponding to the target cable module in the faulty module table is set to "repairing".

[0022] Optionally, after repairing the target cable module according to the target EEPROM information, the method further includes:

[0023] Detecting the target port and re-determining the connection status of the target port;

[0024] If the re-determined connection state is connected, the value of the second binary bit of the first field is set to repaired successfully;

[0025] If the re-determined connection status is disconnected, the value of the second binary bit of the first field is set to repaired but failed.

[0026] Optionally, after determining the connection status of each port in the switch and the type of module inserted into each port, the method further includes:

[0027] The target port identifier of the target port is stored in the fault port table.

[0028] Optionally, the method further includes:

[0029] Determining, according to the target EEPROM information, release sub-information of the target cable module, wherein the release sub-information is used to indicate whether the target cable module is a release version;

[0030] The release sub-information is stored in the second field corresponding to the target cable module in the fault module table.

[0031] In a second aspect, the present application provides a detection and repair device for a switch, comprising:

[0032] A first determination module is used to determine the connection status of each port in the switch and the type of module inserted into each port;

[0033] a configuration module, configured to reconfigure the target port, whose connection state is disconnected and whose module type is cable, according to a first mapping relationship and the target port, wherein the first mapping relationship is used to indicate a correspondence between the port and the Serdes information;

[0034] a second determining module, configured to determine the target EEPROM information of the target cable module according to a second mapping relationship and a target cable module inserted into the target port if the connection state of the configured target port is still disconnected, wherein the second mapping relationship is used to indicate a mapping relationship between the cable module and the EEPROM information;

[0035] A repair module is used to repair the target cable module according to the target EEPROM information.

[0036] Optionally, the configuration module is specifically used to:

[0037] According to the first mapping relationship and the target port identifier corresponding to the target port, acquiring the target Serdes information corresponding to the target port identifier;

[0038] Reconfigure the target port according to the target Serdes information;

[0039] Control the configured target port to power on and off again.

[0040] Optionally, the second determining module is specifically configured to:

[0041] Obtaining a target data transmission rate of the target port;

[0042] The target EEPROM information corresponding to the target cable module is determined according to the target data transmission rate and the second mapping relationship.

[0043] Optionally, the detection and repair device of the switch further includes a processing device, and before repairing the target cable module according to the target EEPROM information, the processing device is used to:

[0044] Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;

[0045] The abnormal sub-EEPROM information and the identifier corresponding to the target cable module are stored in a fault module table;

[0046] The value of the first binary bit of the first field corresponding to the target cable module in the faulty module table is set to "repairing".

[0047] Optionally, after repairing the target cable module according to the target EEPROM information, the processing module is further used to:

[0048] Detecting the target port and re-determining the connection status of the target port;

[0049] If the re-determined connection state is connected, the value of the second binary bit of the first field is set to repaired successfully;

[0050] If the re-determined connection status is disconnected, the value of the second binary bit of the first field is set to repaired but failed.

[0051] Optionally, after determining the connection status of each port in the switch and the type of module inserted into each port, the first determining module is further configured to:

[0052] The target port identifier of the target port is stored in the fault port table.

[0053] Optionally, the processing module is further used to:

[0054] Determining, according to the target EEPROM information, release sub-information of the target cable module, wherein the release sub-information is used to indicate whether the target cable module is a release version;

[0055] The release sub-information is stored in the second field corresponding to the target cable module in the fault module table.

[0056] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0057] Memory stores computer-executable instructions;

[0058] The processor executes the computer-executable instructions stored in the memory to implement the switch detection and repair method as described in the first aspect and various possible implementations of the first aspect.

[0059] In a fourth aspect, the present application provides a computer-readable storage medium, comprising computer-executable instructions. When a processor executes the computer-executable instructions, the switch detection and repair method as described in the first aspect and various possible implementations of the first aspect is executed.

[0060] The switch detection and repair method, device, equipment and medium provided by the present application first determine the connection status of each port in the switch and the type of module inserted into each port; then, for the target port whose connection status is disconnected and whose module type is cable, reconfigure the target port according to the first mapping relationship and the target port; then, if the connection status of the configured target port is still disconnected, determine the target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port; finally, repair the target cable module according to the target EEPROM information. The method takes into account the various possible fault conditions of the faulty port and cable module of the switch, detects the ports and modules in sequence, and gradually troubleshoots the problems, thereby improving the accuracy of fault location and repair, ensuring the stable operation of the equipment, reducing manual intervention, and thus reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0062] Figure 1 A system diagram of a switch detection and repair method provided in an embodiment of the present application;

[0063] Figure 2 A schematic diagram of the structure of the detection and repair module provided in the embodiment of the present application;

[0064] Figure 3 Schematic diagram of the process of the switch detection and repair method provided in the embodiment of the present application Figure 1 ;

[0065] Figure 4 Schematic diagram of the process of the switch detection and repair method provided in the embodiment of the present application Figure 2 ;

[0066] Figure 5 A schematic diagram of the structure of a detection and repair device for a switch provided in an embodiment of the present application;

[0067] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0068] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0069] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0071] Network infrastructure needs to be highly scalable and stable to cope with the increasing demand for device connections and the growing data traffic. In modern network architecture, switches, as core devices, undertake critical data transmission tasks. Switches efficiently route and exchange data between different devices through their ports, while the matching modules (such as optical modules and copper cable modules) further optimize the efficiency and accuracy of data transmission. Therefore, in network management, regular inspection and maintenance of switch ports and modules is not only a key link to ensure network stability, but also the basis for ensuring the continuity and security of various network services.

[0072] In the prior art, the switch detection and repair method mainly relies on manual inspection and maintenance. Usually, the network administrator or maintenance team will regularly inspect the switch, or send relevant technicians to inspect some switches or faulty switches when there is a problem with the network or a switch fails. The inspection process includes a preliminary inspection of the physical status of the switch, and then the status of the switch port and module. Once a fault is found, the technician will check the status of the switch port and module one by one, and gradually eliminate possible sources of faults to ensure the normal operation of the switch.

[0073] However, the detection and repair methods in the prior art that rely on manual work are complex and inefficient. First, since manual inspection requires one-by-one investigation and manual operation, the efficiency of the entire process is low. Especially in large-scale network equipment environments, there are a large number of switches. Manual inspection is not only time-consuming and labor-intensive, but also prone to failure to cover all devices in a timely manner due to manpower limitations, thereby extending the fault repair time. Secondly, manual inspection methods are easily affected by human factors. For example, inexperienced technicians may find it difficult to accurately locate complex problems, or miss inspections under heavy workloads, resulting in failure to completely eliminate faults or problems that are not discovered in a timely manner.

[0074] Based on this, the present application proposes a switch detection and repair method, device, equipment and medium. The reason for the switch failure is usually due to errors in the configuration of the switch port or the configuration of the module inserted into each port. For example, the serializer / deserializer (Serdes) information of the port is inconsistent with the standard Serdes information configuration, or the electrically erasable programmable read-only memory (EEPROM) information of the cable module inserted into each port is inconsistent with the standard EEPROM information, which causes the network device to be unable to perform data transmission normally, and the above fault causes can be detected and repaired through an automated mechanism. Therefore, when detecting most faulty switches, the switch port and the module connected to it can be detected and repaired first, which can not only accurately locate the cause of the fault, but also reduce labor costs. Firstly, the faulty port is determined according to the connection status of each port in the switch; then, for the faulty port, the target Serdes information of the faulty port is obtained and the target Serdes information is used to reconfigure the faulty port to repair the port fault; finally, if the connection status of the configured target port is still disconnected, the target EEPROM information of the target cable module inserted into the faulty port is obtained, and the target EEPROM information is used to reconfigure the cable module to repair the cable fault, thereby realizing the detection and fault repair of the switch ports and modules in most cases, which not only improves the efficiency of switch fault handling, but also reduces the need for full manual intervention, thereby significantly reducing maintenance costs and ensuring the correct operation of the switch.

[0075] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0076] Figure 1 A system diagram of a switch detection and repair method provided in an embodiment of the present application. Figure 1 As shown, the system includes: a switch and a cable module inserted into the switch port.

[0077] The switch also includes a detection and repair module, the Serdes information of the switch and a physical port for connecting a cable module; the Serdes information contains important parameters that affect the quality of signal transmission, such as pre-emphasis parameters and equalizer parameters for adjusting signal transmission; the cable module also includes the module's own EEPROM information, which includes basic information, extended information and custom information of the module, etc., and is used to quickly identify module information and use the information to reset the port information for normal data transmission.

[0078] It should be noted that the switch supports a variety of switching chips, and the port data transmission rate supports 100G, 200G, and 400G; the cable module inserted into the physical port of the switch supports standard protocols such as Small Form-Factor pluggable (SFF) 8472 / SFF8436 / SFF8024 / Common Management Interface Specification (CMIS); in actual use, first traverse the ports of the switch, then use the software package of the built-in switching chip to obtain the data transmission rate of the port, and read the current EEPROM information of the cable module through the serial communication bus.

[0079] Figure 2 A schematic diagram of the structure of the detection and repair module provided in the embodiment of the present application; Figure 2 As shown, the module includes: Serdes information tables of different ports, EEPROM information tables of cable modules of different standards, fault port tables and fault port states, fault module tables and fault module states.

[0080] Among them, the Serdes information table of different ports pre-stores different pre-emphasis values ​​of digital-to-analog converters and optical modules at different data transmission rates, which is used to improve the high-frequency components of the switch in the high-speed serial data signal, offset the high-frequency loss of the signal during the transmission process, and ensure the correct transmission of the signal. The information table of the EEPROM of cable modules of different standards pre-stores the standard information table of the EEPROM of cable modules at different data transmission rates. The fault port table and fault port status are automatically generated according to the Serdes information table of different ports and are used to record the port fault log and the abnormal signal status of the fault port. Correspondingly, the fault module table and fault module status are automatically generated according to the information table of the EEPROM of the cable module and are used to record the fault module log and the abnormal information status of the fault module.

[0081] Figure 3Schematic diagram of the process of the switch detection and repair method provided in the embodiment of the present application Figure 1 The method comprises:

[0082] S301: Determine the connection status of each port in the switch and the type of module inserted into each port.

[0083] Among them, the connection status of each port includes connection success or connection failure; the module type may include a digital-to-analog converter, an optical module, or other modules, and the embodiments of the present application do not make specific restrictions here.

[0084] It is understandable that during the switch maintenance and detection process, based on the connection status of each port and the type of module inserted into each port, it is possible to quickly determine whether each port is operating normally, providing a basis for subsequent fault repair.

[0085] S302: For a target port whose connection state is disconnected and whose module type is cable, reconfigure the target port according to the first mapping relationship and the target port.

[0086] The first mapping relationship is used to indicate the corresponding relationship between the port and the Serdes information.

[0087] In one achievable manner, the specific process of reconfiguring the target port includes:

[0088] First, according to the first mapping relationship and the target port identifier corresponding to the target port, the target Serdes information corresponding to the target port identifier is obtained; then, the target port is reconfigured according to the target Serdes information; finally, the configured target port is controlled to be powered on and off again.

[0089] It can be understood that when it is determined that the connection state of the port is disconnected and the model type inserted into the port is a cable type, the port is identified as a target port; then, the first mapping relationship is used to obtain the target Serdes information corresponding to the target port identifier in the first mapping relationship according to the target port identifier; finally, the target Serdes information is written into the Serdes module of the port through the management interface of the switch (such as the Command Line Interface (CLI), Simple Network Management Protocol (SNMP), or a dedicated application programming interface (API)), and reconfiguration is performed, and the target port is controlled to perform power-on and power-off operations to ensure that the reconfigured Serdes information takes effect. This configuration process can automatically match the target Serdes information of the target port, avoid the complexity and errors of manual configuration, improve operation and maintenance efficiency, and reduce fault repair time.

[0090] S303: If the connection state of the configured target port is still disconnected, determine the target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port.

[0091] The second mapping relationship is used to indicate the mapping relationship between the cable module and the EEPROM information;

[0092] It should be understood that after completing the Serdes information reconfiguration of S302 and the port power-on and power-off operation for the target port, the connection state of the target port is re-determined. If the target port is still in the disconnected state, it indicates that the cause of the target port failure may be due to the failure of the target cable module inserted into the target port. Therefore, it is necessary to further obtain the target EEPROM information of the target cable module to check and repair the target cable module. By gradually narrowing the scope of the failure, the problem can be accurately located and the accuracy of fault repair can be improved.

[0093] In one achievable manner, the specific process of determining the target EEPROM information of the target cable module includes:

[0094] First, a target data transmission rate of a target port is obtained; then, target EEPROM information corresponding to a target cable module is determined according to the target data transmission rate and a second mapping relationship.

[0095] It should be understood that, since the EEPROM information of the cable module includes standard configuration information at different rates, when determining the target EEPROM information of the target cable module, it is necessary to first obtain the target data transmission rate of the target port, and then obtain the target cable module information with the same target data transmission rate as the target port according to the second mapping relationship, and further determine the target EEPROM information corresponding to the target cable module. In this way, it can be ensured that the configuration between the cable module and the port is correct, and transmission errors or performance degradation caused by configuration mismatch can be effectively avoided.

[0096] S304: Repair the target cable module according to the target EEPROM information.

[0097] It can be understood that the built-in EEPROM information of the target cable module is checked and compared according to the determined target EEPROM information, and the inconsistent information is reconfigured to repair the target cable module.

[0098] The present application provides a detection and repair method for a switch, which first determines the connection status of each port in the switch and the type of module inserted into each port; then, for a target port whose connection status is disconnected and whose module type is cable, reconfigures the target port according to a first mapping relationship and the target port; then, if the connection status of the configured target port is still disconnected, the target EEPROM information of the target cable module is determined according to a second mapping relationship and the target cable module inserted into the target port; finally, the target cable module is repaired according to the target EEPROM information. The method takes into account the various possible fault conditions of the faulty port and cable module of the switch, detects the ports and modules in sequence, and gradually troubleshoots the problems, thereby improving the accuracy of fault location and repair, ensuring the stable operation of the equipment, reducing manual intervention, and thus reducing maintenance costs.

[0099] In one achievable method, after determining the connection status of each port in the switch and the type of module inserted into each port, the status of the port needs to be recorded. The specific process is as follows:

[0100] The target port identifier of the target port is stored in the fault port table.

[0101] The port identifier is a tag used to uniquely identify a physical port or a logical port on a switch.

[0102] It is understandable that during the switch maintenance and detection process, based on the connection status of each port and the type of module inserted into each port, it is possible to quickly determine whether each port is operating normally, and promptly store the port identifier of the faulty port in the faulty port table, providing reliable data support for subsequent fault analysis and troubleshooting.

[0103] Figure 4 Schematic diagram of the process of the switch detection and repair method provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, this embodiment is Figure 3 Based on the embodiment, before repairing the target cable module, a method of marking the module for failure is described in detail, which specifically includes the following steps:

[0104] S401: Compare the current EEPROM information of the target cable module with the target EEPROM information, and determine abnormal sub-EEPROM information that is inconsistent with the current EEPROM information from the target EEPROM information.

[0105] Among them, since the EEPROM information includes different pages, and different pages contain different data information, for example, the EEPROM information includes the contents of page0 to page7, these information may include the module's manufacturer ID, basic information, calibration data, pre-emphasis value, temperature sensor data, and user-defined module information, etc.

[0106] It should be noted that the user-defined module information may include the user's customized information on the module. For example, page 7 in the EEPROM information is the user-defined module information page, and includes different fields (bits), such as bit0-bit2. Accordingly, bit0: can define whether it is a formally released module mark; for example, 1 represents an officially released module; 0 represents an unofficial module; bit1: can define a mark that indicates whether it has been repaired during use; for example: 1 can represent a module repaired during testing; 0 can represent a repaired module; bit2: can define a mark that indicates whether it works normally after repair; for example, 1 can represent a module that was repaired during testing and the port was successfully connected; 0 can represent a module that has been repaired during testing but the port still fails to connect and needs to be checked again.

[0107] It should be understood that the current EEPROM information of the target cable module is checked and compared with the target EEPROM information one by one, and the inconsistent information between the current EEPROM information and the target EEPROM information is used as abnormal sub-EEPROM information. This method can effectively identify the abnormality in the configuration. This method can help quickly locate and repair configuration errors, thereby ensuring the correct communication between the switch port and the cable module and improving the stability and performance of the network equipment.

[0108] S402: Store the abnormal sub-EEPROM information and the identifier corresponding to the target cable module into a fault module table.

[0109] It is understandable that after obtaining the abnormal sub-EEPROM information, it is necessary to associate the identified abnormal sub-EEPROM information with the identification information of the target Cable module and store it in the faulty module table, so that the EEPROM information configuration problems of the cable module can be effectively tracked and managed later.

[0110] S403: Set the value of the first binary bit of the first field corresponding to the target cable module in the faulty module table to "repairing".

[0111] It should be understood that when there is inconsistency between the current EEPROM information and the target EEPROM information, it means that there is an error in the configuration information of the target cable module, and the EEPROM information of the target cable module needs to be repaired to ensure the normal connection of the port. Therefore, it is necessary to write the faulty module table into the user-defined module information page of the current EEPROM information, and set the value of the first binary bit of the first field corresponding to the target cable module to being repaired, so that the system can effectively manage and track the configuration repair process of the target cable module.

[0112] For example, when detecting a cable module, it is found that there is an inconsistency between the current EEPROM information and the target EEPROM information, for example: the pre-emphasis value in the current EEPROM information of the target cable module is 0x03, while the pre-emphasis value in the target EEPROM information is 0x02, then the pre-emphasis value is the abnormal sub-EEPROM information; then, the identification information of this cable module (such as module serial number, manufacturer ID) and the abnormal sub-EEPROM information (pre-emphasis value of 0x03) are associated and written into the fault module table; thereafter, in the fault table module, the first binary bit of the first field is set to 1 (that is, bit1 is 1), indicating that the module is in the "under repair" state.

[0113] It should be noted that after the target cable module is repaired according to the target EEPROM information, the repaired port needs to be retested and the repair result needs to be marked so as to quickly identify the status of the port later.

[0114] In one achievable manner, the specific process of marking the repair result of the repaired port is as follows:

[0115] The target port is detected and the connection status of the target port is re-determined; if the re-determined connection status is connected, the value of the second binary bit of the first field is set to successfully repaired; if the re-determined connection status is disconnected, the value of the second binary bit of the first field is set to repaired but failed.

[0116] For example, if the re-detected port connection status is connected, the value of the second binary bit of the first field is set to successfully repaired, that is, bit2 is 1; if the re-detected port connection status is failed to connect, the value of the second binary bit of the first field is set to repaired but failed, that is, bit2 is 0.

[0117] It can be understood that after reconfiguring the current EEPROM information of the target cable module, the target port is re-detected to obtain the connection status of the target port. If the connection status is connected, it means that the port failure is caused by an error in the current EEPROM information configuration of the port cable module, and it has been successfully connected after reconfiguration, and then the value of the second binary bit of the first field is set to successfully repaired; if the connection status is connected, it means that the port failure may be caused by other physical reasons, and maintenance personnel are required to further troubleshoot the target port, and set the value of the second binary bit of the first field to repaired but failed. In this way, the system can automatically track the results of each repair attempt. Whether the repair is successful or failed, these status information are accurately recorded, reducing the need for human intervention and significantly improving the efficiency of fault management and repair work.

[0118] Optionally, after obtaining the target EEPROM information, the module version needs to be marked. The specific process includes:

[0119] First, the release sub-information of the target cable module is determined according to the target EEPROM information; then, the release sub-information is stored in the second field corresponding to the target cable module in the fault module table.

[0120] The release sub-information is used to indicate whether the target cable module is a release version.

[0121] It can be understood that according to the target EEPROM information, different page information (e.g., page0-page7) of the target cable module is obtained. If the page information does not include the manufacturer information (e.g., page0 is empty), it means that the cable module is an unofficial version and needs further testing; if the page information includes the manufacturer information (e.g., page0 contains the supplier information and the module version), it means that the cable module is an officially released version and has passed detailed testing; then, the release sub-information is stored in the second field corresponding to the target cable module in the fault module table (e.g., if the cable module is an officially released version, the mark bit0 is 1; if the cable module is an unofficial version, the mark bit0 is 0). In this way, in the subsequent fault handling, the management personnel can quickly obtain the module information and further repair and manage the faulty module.

[0122] Figure 5 A schematic diagram of the structure of a detection and repair device for a switch provided in an embodiment of the present application; Figure 5 As shown, the detection and repair device 50 of the switch includes:

[0123] The first determination module 501 is used to determine the connection status of each port in the switch and the type of module inserted into each port;

[0124] The configuration module 502 is used for reconfiguring the target port according to the first mapping relationship and the target port, with the connection state being disconnected and the module type being cable, wherein the first mapping relationship is used to indicate the correspondence between the port and the Serdes information;

[0125] A second determining module 503 is used to determine the target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port if the connection state of the configured target port is still disconnected, wherein the second mapping relationship is used to indicate the mapping relationship between the cable module and the EEPROM information;

[0126] The repair module 504 is used to repair the target cable module according to the target EEPROM information.

[0127] In a possible implementation, the configuration module 502 is specifically configured to:

[0128] According to the first mapping relationship and the target port identifier corresponding to the target port, obtain the target Serdes information corresponding to the target port identifier;

[0129] Reconfigure the target port according to the target Serdes information;

[0130] Control the configured target port and power it on and off again.

[0131] In a possible implementation, the second determining module 503 is specifically configured to:

[0132] Get the target data transmission rate of the target port;

[0133] According to the target data transmission rate and the second mapping relationship, the target EEPROM information corresponding to the target cable module is determined.

[0134] In a possible implementation, the detection and repair device of the switch further includes a processing device. Before repairing the target cable module according to the target EEPROM information, the processing module is used to:

[0135] Compare the current EEPROM information of the target cable module with the target EEPROM information, and determine the abnormal sub-EEPROM information that is inconsistent with the current EEPROM information from the target EEPROM information;

[0136] The abnormal sub-EEPROM information and the identification corresponding to the target cable module are stored in the fault module table;

[0137] The value of the first binary bit of the first field corresponding to the target cable module in the fault module table is set to being repaired.

[0138] In a possible implementation, after repairing the target cable module according to the target EEPROM information, the processing module is further configured to:

[0139] Detect the target port and re-determine the connection status of the target port;

[0140] If the re-determined connection state is connected, the value of the second binary bit of the first field is set to repaired successfully;

[0141] If the re-determined connection status is disconnected, the value of the second binary bit of the first field is set to repaired but failed.

[0142] In a possible implementation, after determining the connection status of each port in the switch and the type of module inserted into each port, the first determining module 501 is further configured to:

[0143] The target port identifier of the target port is stored in the fault port table.

[0144] In a possible implementation, the processing module is further configured to:

[0145] Determine the release sub-information of the target cable module according to the target EEPROM information, where the release sub-information is used to indicate whether the target cable module is a release version;

[0146] The release sub-information is stored in the second field corresponding to the target cable module in the fault module table.

[0147] The switch detection and repair device provided in the embodiment of the present application can be used to execute the switch detection and repair method in any of the above embodiments. Its implementation principle and technical effect are similar and will not be repeated here.

[0148] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0149] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. The device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.

[0150] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that the at least one processor 601 executes the above switch detection and repair method.

[0151] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0152] The electronic device provided in the embodiment of the present application can be used to execute the switch detection and repair method provided in any of the above method embodiments. Its implementation principle and technical effect are similar and will not be repeated here.

[0153] In the above Figure 6In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0154] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0155] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0156] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned switch detection and repair method is implemented.

[0157] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0158] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0159] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0163] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0164] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application, are not limited to the precise structures described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A detection and repair method for a switch, characterized in that: include: Determine the connection status of each port in the switch and the type of module inserted into each port; For a target port whose connection state is disconnected and whose module type is cable, reconfigure the target port according to a first mapping relationship and the target port, wherein the first mapping relationship is used to indicate a corresponding relationship between the port and serializer / deserializer Serdes information; If the connection state of the configured target port is still disconnected, determining the target electrically erasable programmable read-only memory (EEPROM) information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port, wherein the second mapping relationship is used to indicate the mapping relationship between the cable module and the EEPROM information; The target cable module is repaired according to the target EEPROM information.

2. The method according to claim 1, characterized in that The reconfiguring the target port according to the first mapping relationship and the target port includes: According to the first mapping relationship and the target port identifier corresponding to the target port, acquiring the target Serdes information corresponding to the target port identifier; Reconfigure the target port according to the target Serdes information; Control the configured target port to power on and off again.

3. The method according to claim 1 or 2, characterized in that: The step of determining target EEPROM information of the target cable module according to the second mapping relationship and the target cable module inserted into the target port includes: Obtaining a target data transmission rate of the target port; The target EEPROM information corresponding to the target cable module is determined according to the target data transmission rate and the second mapping relationship.

4. The method according to claim 1 or 2, characterized in that: Before repairing the target cable module according to the target EEPROM information, the method further includes: Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information; The abnormal sub-EEPROM information and the identifier corresponding to the target cable module are stored in a fault module table; The value of the first binary bit of the first field corresponding to the target cable module in the faulty module table is set to "repairing".

5. The method according to claim 4, characterized in that After repairing the target cable module according to the target EEPROM information, the method further includes: Detecting the target port and re-determining the connection status of the target port; If the re-determined connection state is connected, the value of the second binary bit of the first field is set to repaired successfully; If the re-determined connection status is disconnected, the value of the second binary bit of the first field is set to repaired but failed.

6. The method according to claim 1 or 2, characterized in that: After determining the connection status of each port in the switch and the type of module inserted into each port, the method further includes: The target port identifier of the target port is stored in the fault port table.

7. The method according to claim 4, characterized in that The method further comprises: Determining, according to the target EEPROM information, release sub-information of the target cable module, wherein the release sub-information is used to indicate whether the target cable module is a release version; The release sub-information is stored in the second field corresponding to the target cable module in the fault module table.

8. A detection and repair device for a switch, comprising: A first determination module is used to determine the connection status of each port in the switch and the type of module inserted into each port; a configuration module, configured to reconfigure the target port, whose connection state is disconnected and whose module type is cable, according to a first mapping relationship and the target port, wherein the first mapping relationship is used to indicate a correspondence between the port and the Serdes information; a second determining module, configured to determine the target EEPROM information of the target cable module according to a second mapping relationship and a target cable module inserted into the target port if the connection state of the configured target port is still disconnected, wherein the second mapping relationship is used to indicate a mapping relationship between the cable module and the EEPROM information; A repair module is used to repair the target cable module according to the target EEPROM information.

9. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the switch detection and repair method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the switch detection and repair method according to any one of claims 1 to 7.