Fault diagnosis method, device and equipment in switch port test
Patent Information
- Application Number
- CN202310389056.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-04-12
AI Technical Summary
[0003]然而,在使用ELOAD对业务端口进行测试的过程中,若ELOAD采集到一次异常数据则会直接输出异常结果(如一直亮红灯),难以实现故障的准确定位和实时提示
[0034] Fifthly, embodiments of this application also provide a computer program product, including a computer program/instruction that, when executed by a processor, implements the fault diagnosis method in switch port testing as described in the first aspect.
Smart Images

Figure CN116436833B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of switch technology, and in particular to a fault diagnosis method, apparatus and equipment for switch port testing. Background Technology
[0002] Before a switch product leaves the factory, its service ports need to be tested. If fiber optic cables are used for testing directly, the cost is huge and it is not easy to operate. Therefore, optical port testing tools (ELOAD) are usually used to loop-test various signals and states of the service ports, thereby quantifying various functional indicators before the product leaves the factory and improving the product's test indicators.
[0003] However, when using ELOAD to test the service port, if ELOAD collects abnormal data, it will directly output the abnormal result (such as a red light that stays on), making it difficult to accurately locate the fault and provide real-time prompts. Summary of the Invention
[0004] The purpose of this application is to provide a fault diagnosis method, apparatus, and device for switch port testing, which can accurately locate and provide real-time prompts for faults during ELOAD operation.
[0005] To address the aforementioned technical problems, in a first aspect, embodiments of this application provide a fault diagnosis method for switch port testing, the method comprising:
[0006] Based on the information type collected by the optical port testing tool, determine each anomaly type and the corresponding anomaly judgment conditions for each anomaly type.
[0007] Set a counter corresponding to each of the aforementioned exception types;
[0008] The switch port is tested using the optical port testing tool. After each test data corresponding to the target anomaly type is collected by the optical port testing tool, it is determined whether the test data meets the anomaly judgment condition corresponding to the target anomaly type. The target anomaly type is any one of the anomaly types.
[0009] If the test data meets the anomaly determination conditions corresponding to the target anomaly type, the value of the counter corresponding to the target anomaly type is increased;
[0010] If the test data does not meet the anomaly determination criteria corresponding to the target anomaly type, reduce the value of the counter corresponding to the target anomaly type;
[0011] For the first counter whose value meets the first threshold, output the fault diagnosis result of the abnormal type corresponding to the first counter;
[0012] For the second counter whose value meets the second threshold, output the normal diagnosis result of the abnormal type corresponding to the second counter, where the first threshold is greater than the second threshold.
[0013] Optionally, the method further includes:
[0014] Based on the most recently collected test data corresponding to the first counter, abnormal data is identified;
[0015] The exception type corresponding to the first counter and the exception data are stored in the memory of the optical port testing tool.
[0016] Optionally, if the test data meets the anomaly determination criteria corresponding to the target anomaly type, the value of the counter corresponding to the target anomaly type is increased, including:
[0017] Determine whether the value of the counter corresponding to the target anomaly type is less than the first threshold;
[0018] If the value of the counter corresponding to the target anomaly type is less than the first threshold, the value of the counter corresponding to the target anomaly type is increased.
[0019] Optionally, the information acquisition type includes at least one of the following: low-speed link signal, power consumption status, temperature status, and voltage status; the anomaly type includes at least one of the following: low-speed link signal anomaly, power consumption status anomaly, temperature status anomaly, and voltage status anomaly.
[0020] Optionally, the abnormality determination condition corresponding to the low-speed link signal abnormality is: the voltage of the low-speed link signal is within a first set threshold range.
[0021] Optionally, the abnormal judgment condition corresponding to the power consumption status is: the power consumption load return value of the optical port test tool for the switch port is inconsistent with the set value.
[0022] Optionally, the abnormality determination condition corresponding to the temperature state is: the temperature value of the optical port testing tool is outside the second set threshold range.
[0023] Optionally, the abnormal judgment condition corresponding to the voltage state is: the power supply voltage is less than a third preset threshold.
[0024] Secondly, embodiments of this application also provide a fault diagnosis device for switch port testing, the device comprising:
[0025] The first processing module is used to determine each anomaly type and the anomaly judgment conditions corresponding to each anomaly type based on the type of information collected by the optical port testing tool.
[0026] The first setting module is used to set the counters corresponding to each of the aforementioned exception types;
[0027] The first judgment module is used to test the switch port through the optical port testing tool. After each time the test data corresponding to the target anomaly type is collected through the optical port testing tool, it is determined whether the test data meets the anomaly judgment condition corresponding to the target anomaly type. The target anomaly type is any anomaly type among the various anomaly types.
[0028] The first counting module is used to increment the value of the counter corresponding to the target anomaly type when the test data meets the anomaly judgment condition corresponding to the target anomaly type.
[0029] The second counting module is used to reduce the value of the counter corresponding to the target anomaly type when the test data does not meet the anomaly judgment condition corresponding to the target anomaly type.
[0030] The first output module is used to output the fault diagnosis result of the abnormal type corresponding to the first counter for the first counter whose value meets the first threshold.
[0031] The second output module is used to output a normal diagnosis result for the abnormal type corresponding to the second counter, where the value of the second counter in each of the counters meets the second threshold, and the first threshold is greater than the second threshold.
[0032] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the fault diagnosis method in switch port testing as described in the first aspect.
[0033] Fourthly, embodiments of this application also provide a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the fault diagnosis method in the switch port test as described in the first aspect.
[0034] Fifthly, embodiments of this application also provide a computer program product, including a computer program / instruction that, when executed by a processor, implements the fault diagnosis method in switch port testing as described in the first aspect.
[0035] As can be seen from the above technical solution, before testing the switch port using the optical port testing tool, the various anomaly types that may occur during the switch port test are determined based on the information collection type of the optical port testing tool, as well as the corresponding anomaly judgment conditions for each anomaly type. A separate counter is set for each anomaly type so that during the switch port test using the optical port testing tool, continuous fault diagnosis can be performed by collecting test data multiple times for each anomaly type, using the corresponding anomaly judgment conditions and the corresponding counter. The diagnostic results for each anomaly type are output based on the counter values, which can improve the accuracy of fault diagnosis for each anomaly type and achieve accurate fault location and real-time fault prompts during switch port testing. Attached Figure Description
[0036] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A flowchart illustrating the implementation of a fault diagnosis method in switch port testing, provided in an embodiment of this application;
[0038] Figure 2 A flowchart illustrating the implementation of a fault diagnosis method provided in this application embodiment;
[0039] Figure 3 This is a schematic diagram of a fault diagnosis device for switch port testing provided in an embodiment of this application;
[0040] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0043] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0044] Intelligent switch products have various network service ports used for data transmission and reception. Therefore, these service ports need to be tested before the switch products leave the factory. During testing, it is typically necessary to monitor the high-speed link signal, low-speed link signal, power consumption, temperature, and voltage status of the service ports. Direct testing using fiber optic cables would be extremely costly and difficult to implement. Therefore, ELOAD loopback testing is usually used to measure these various signals and statuses of the service ports, quantifying the functional indicators before the product leaves the factory and refining the product's testing specifications.
[0045] However, when using ELOAD to test service ports on a switch, because ELOAD is completely enclosed except for the interface that interacts with the switch host, it is difficult to determine whether the status of ELOAD is normal during operation. Therefore, for faults that occur during the test, ELOAD has difficulty in determining whether the fault is a port fault or a problem with Eload itself. In addition, ELOAD will keep the red light on after detecting a data anomaly (regardless of whether the anomaly disappears), making it difficult to provide accurate and real-time fault prompts.
[0046] To address the problems existing in the aforementioned related technologies, this application proposes a method that pre-analyzes possible anomaly types and corresponding anomaly judgment conditions before testing switch ports using optical port testing tools. During the testing process of switch ports using optical port testing tools, a counter is introduced to perform fault diagnosis and output the diagnosis results for each anomaly type separately. This enables a fault diagnosis method that can reflect anomalies and locate faults in real time during switch port testing.
[0047] The following description, in conjunction with the accompanying drawings, details a load balancing method for multi-controller array storage provided in this application through some embodiments and application scenarios.
[0048] Firstly, see [the following] Figure 1 The diagram shown is an implementation flowchart of a fault diagnosis method for switch port testing provided in this application embodiment. The method may include the following steps:
[0049] Step S101: Based on the information type collected by the optical port testing tool, determine each anomaly type and the corresponding anomaly judgment conditions for each anomaly type.
[0050] In practical implementation, the fault diagnosis method for switch port testing provided in this application can be deployed in ELOAD in the form of an ELOAD fault diagnosis firmware module. Based on the data types that ELOAD needs to collect when testing a switch port (mainly a service port) (such as low-speed link signals, power consumption status, temperature status, voltage status, etc.), or based on all data types that ELOAD can collect during the testing process, the system analyzes the possible fault types that may occur during the testing of that switch port or during the operation of ELOAD, as well as the corresponding anomaly judgment conditions. It is understood that the possible fault types refer to faults that can be diagnosed based on the data collected by ELOAD.
[0051] As one possible implementation, the type of information acquired by ELOAD and the anomaly detection conditions can be determined based on the protocol type used by the optical port testing tool.
[0052] Step S102: Set the counter corresponding to each of the aforementioned exception types.
[0053] In practical implementation, after identifying each exception type, each exception type can be numbered. Based on these numbers, corresponding counter arrays can be defined to set the counters for each exception type. The index value of this counter array is the number of the corresponding exception type, and the array value corresponding to each index value is the number of times the corresponding exception type occurred during the test.
[0054] For example, the counter array can be defined as follows:
[0055] uint8_t flag_times[8] = {0}
[0056] The defined counter array `flag_times` has a length of 8, and the index represents the exception type number. For ease of use, index 0 is omitted by default. The array value corresponding to each index represents the number of times the exception occurred. The exception type numbers are shown in Table 1.
[0057]
[0058] Table 1
[0059] Step S103: Test the switch port using the optical port testing tool. After each time test data corresponding to the target anomaly type is collected using the optical port testing tool, determine whether the test data meets the anomaly judgment conditions corresponding to the target anomaly type.
[0060] Wherein, the target anomaly type is any one of the anomaly types.
[0061] In practice, ELOAD is first used to test the switch ports. Test data related to each anomaly type (such as low-speed link signal, power consumption status, temperature status, and voltage status) are collected multiple times. Then, it is determined whether the test data corresponding to each anomaly type meets the anomaly judgment conditions corresponding to each anomaly type, thereby realizing real-time anomaly detection for each anomaly type.
[0062] Step S104: If the test data meets the anomaly determination conditions corresponding to the target anomaly type, increment the value of the counter corresponding to the target anomaly type.
[0063] In practice, after each collection of test data corresponding to a certain anomaly type (i.e., the target anomaly type), it is determined whether the test data meets the anomaly judgment conditions corresponding to the target anomaly type. If the test data meets the anomaly judgment conditions corresponding to the target anomaly type, it indicates that the test data under that fault type is abnormal. However, considering that the anomaly may be a temporary anomaly caused by data fluctuations or other interference, the anomaly is recorded by increasing the value of the counter corresponding to the target anomaly type, so as to continuously diagnose the anomaly and reduce the possibility of misjudgment of the fault.
[0064] Step S105: If the test data does not meet the anomaly judgment conditions corresponding to the target anomaly type, reduce the value of the counter corresponding to the target anomaly type.
[0065] In practice, if the test data does not meet the anomaly judgment conditions corresponding to the target anomaly type, it means that the anomaly in the test data under the fault type is a temporary anomaly (most likely interference). Therefore, the judgment of the temporary anomaly is recorded by reducing the value of the counter corresponding to the target anomaly type, so as to avoid misdiagnosing the temporary anomaly as a fault.
[0066] Step S106: For the first counter whose value meets the first threshold, output the fault diagnosis result of the abnormal type corresponding to the first counter.
[0067] It is understandable that when the value of the counter meets the first threshold, it means that the anomaly type corresponding to the counter has occurred multiple times in a row. Therefore, it can be determined that a fault corresponding to the anomaly type has occurred during the testing of the switch port. The fault diagnosis result of the anomaly type is output to enable fault location and fault indication.
[0068] As one possible implementation, if after outputting the fault diagnosis result for the anomaly type, the anomaly disappears from the test data collected under the anomaly type (e.g., fault repair operations are performed), causing the value of the corresponding counter to drop to a set threshold (e.g., the second threshold), then a normal diagnosis result can be output for the anomaly type to further provide real-time fault indication.
[0069] Step S107: For the second counter whose value meets the second threshold, output the normal diagnosis result of the abnormal type corresponding to the second counter.
[0070] Wherein, the first threshold is greater than the second threshold.
[0071] It is understandable that when the counter value meets the second threshold, it means that the anomaly type corresponding to the counter has not occurred or has occurred in small numbers. Therefore, it can be determined that no fault corresponding to the anomaly type has occurred during the testing of the switch port. At this time, the normal diagnostic result of the anomaly type is output so that users can combine the diagnostic results of various anomaly types to perform fault analysis.
[0072] As can be seen from the above technical solution, before testing the switch port using the optical port testing tool, the various anomaly types that may occur during the switch port test are determined based on the information collection type of the optical port testing tool, as well as the corresponding anomaly judgment conditions for each anomaly type. A separate counter is set for each anomaly type so that during the switch port test using the optical port testing tool, continuous fault diagnosis can be performed by collecting test data multiple times for each anomaly type, using the corresponding anomaly judgment conditions and the corresponding counter. The diagnostic results for each anomaly type are output based on the counter values, which can improve the accuracy of fault diagnosis for each anomaly type and achieve accurate fault location and real-time fault prompts during switch port testing.
[0073] Optionally, in one embodiment, the method further includes:
[0074] Based on the most recently collected test data corresponding to the first counter, abnormal data is identified;
[0075] The abnormal type corresponding to the first counter and the abnormal data are stored in the memory of the optical port testing tool for the switch to view, so that the switch can know the current fault type (i.e. abnormal type) in a timely manner and analyze and process the abnormal data in a timely manner.
[0076] Optionally, in one embodiment, if the test data meets the anomaly determination criteria corresponding to the target anomaly type, the value of the counter corresponding to the target anomaly type is increased, including:
[0077] Determine whether the value of the counter corresponding to the target anomaly type is less than the first threshold;
[0078] If the value of the counter corresponding to the target anomaly type is less than the first threshold, the value of the counter corresponding to the target anomaly type is increased.
[0079] In this embodiment, to prevent the counter value from overflowing, the counter value will no longer be increased when it reaches a first threshold.
[0080] As one possible implementation, when the counter value reaches the first threshold, test data for the corresponding anomaly type continues to be collected until the test of the switch service port is completed. If the collected test data does not meet the anomaly judgment conditions corresponding to the target anomaly type, the counter value is reduced. When the test of the switch service port is completed, the corresponding diagnostic result is output based on the counter value.
[0081] As another possible implementation, when the counter value reaches the first threshold, a fault diagnosis result corresponding to the anomaly type is output. After outputting the fault diagnosis result, the collection of test data for the corresponding anomaly type can be stopped, or test data collection can continue until the test of the switch service port is completed. Before the test of the switch service port is completed, if the counter value meets the second threshold, a correct diagnosis result is output.
[0082] It should be noted that the fault diagnosis results described in this embodiment can be prompts indicating the presence of a fault under a corresponding abnormal type, while the normal diagnosis results can be prompts indicating the absence of a fault under a corresponding abnormal type. Different prompts can be output through the color, position, and flashing frequency of the indicator lights on ELOAD.
[0083] Optionally, the information acquisition type includes at least one of the following: low-speed link signal, power consumption status, temperature status, and voltage status; the anomaly type includes at least one of the following: low-speed link signal anomaly, power consumption status anomaly, temperature status anomaly, and voltage status anomaly.
[0084] In one embodiment, the abnormality determination condition corresponding to the low-speed link signal abnormality is: the voltage of the low-speed link signal is within a first set threshold range.
[0085] In one embodiment, the abnormal judgment condition corresponding to the power consumption status is: the power consumption load return value of the optical port test tool for the switch port is inconsistent with the set value.
[0086] In one embodiment, the abnormality determination condition corresponding to the temperature state is: the temperature value of the optical port testing tool is outside the second set threshold range.
[0087] In one embodiment, the abnormal condition corresponding to the voltage state is: the power supply voltage is less than a third preset threshold.
[0088] The following is combined with Figure 2 The flowchart illustrating the fault diagnosis method during ELOAD operation is provided below. Taking ELOAD based on the MSA standard-defined 10G point-to-point application optical module (DSFP, Dual Channel Small Form-factor Pluggable) protocol as an example, the above embodiments are further explained. It is understood that the fault diagnosis method provided in this application is also applicable to ELOAD based on other protocols such as optical modules (SFP, Small Form Pluggable), quad-channel optical module interfaces (QSFP, Quad Small Form-factor Pluggable), and dual-density quad-channel small form-factor Pluggable packages (QSFP-DD, Quad Small Form Factor Pluggable-Double Density).
[0089] The main function of ELOAD is to monitor low-speed link signals, power consumption, temperature, and voltage status of service ports. For ELOAD based on the DSFP protocol, the associated anomaly types and anomaly detection conditions are as follows:
[0090] Low-speed link signals (mainly LPMODE and RESET signals) use voltage values to determine signal validity.
[0091] The LPMODE voltage is a 3.3V divider. LPMODE voltage below 1.1V is 0, and LPMODE voltage above 1.4V is 1. If the LPMODE voltage is between 1.1V and 1.4V (i.e., the LPMODE voltage meets the first set threshold range corresponding to LPMODE voltage abnormality), then an LPMODE voltage abnormality is determined to exist.
[0092] The RESET voltage is a 3.3V divider. A RESET voltage below 1.0V is 0, a RESET voltage above 1.5V is 1, and a RESET voltage between 1.0V and 1.5V (i.e., the RESET voltage meets the first set threshold range corresponding to an abnormal RESET voltage) is considered an abnormal RESET voltage.
[0093] The power consumption status mainly refers to whether the corresponding load return value of ELOAD after the switch host performs power consumption load on ELOAD is consistent with the set value. If they are inconsistent, the power consumption load is judged to be abnormal.
[0094] Temperature status mainly refers to the temperature of ELOAD. During use, the temperature of ELOAD will change. ELOAD can detect the temperature through its own temperature sensor. If the temperature is higher than 80 degrees Celsius or lower than -40 degrees Celsius (that is, the temperature value of the optical port test tool is outside the second set threshold range), the temperature is determined to be abnormal.
[0095] Voltage status mainly refers to the status of supply voltages Vcc0 and Vcc1. Vcc0 and Vcc1 being greater than 3.0V is normal. If Vcc0 or Vcc1 is lower than 3.0V (i.e., the supply voltage is less than the third set threshold), then Vcc0 or Vcc1 is judged to be abnormal.
[0096] It is understandable that fault diagnosis of voltage, temperature, load conditions, etc. is a continuous process. If the relevant technology adopts the method of directly lighting up a red light when an abnormality occurs, there will be a situation where the abnormality has disappeared but the red light remains on. In this case, it is impossible to determine the type of abnormality, and it is not conducive to the implementation of fault indication.
[0097] This application implements continuous fault detection through a counter and can automatically store the fault type and fault data. Specifically, addresses can be selected in the electrically erasable programmable read-only memory (EEPROM) of ELOAD (e.g., three addresses on page 0: Bytes 68, 69, and 70) to store the fault type and fault data. This allows the switch to determine the current fault type and analyze the fault data by obtaining the value of the address. The data recorded at each address is shown in Table 2.
[0098]
[0099] Table 2
[0100] During the ElOAD test, a counter is incremented by 1 when an exception occurs.
[0101] When five or more consecutive anomalies occur (i.e., the counter value is greater than 5), the counter stops counting and remains at five counts (to prevent counter overflow). The ElOAD's LED illuminates as a red anomaly indicator, and the current anomaly type and data are stored in the ElOAD's memory. This allows the switch to quickly identify the anomaly type and retrieve the anomaly data for timely response.
[0102] If there are fewer than 5 consecutive abnormalities (i.e., the counter value is not greater than 5), the normal data processing flow is entered. The counter value is checked to see if it is greater than 0. If it is greater than 0, the counter value is decremented by 1. When the counter value returns to 0, it means that there is no abnormality in data acquisition, and the LED light is changed to the normal green indicator.
[0103] The abnormal data will be recorded in the ElOAD's memory in a timely manner for the switch host to view, and after the fault is recovered, the LED can continue to alarm for other abnormalities normally.
[0104] The following example illustrates the first type of Vcc0 voltage anomaly:
[0105] After acquiring voltage data, the voltage data is first processed. The lower 8 bits are stored in AD_Low and the higher 8 bits are stored in AD_High. It is then determined whether the voltage data is less than 3.0V. If it is less than 3.0V, the array value with index 1 in the counter array (i.e., the counter value) is incremented by 1. When abnormal voltage data is continuously acquired, the counter value continues to increase until the counter value is greater than or equal to 5. At this point, the LED is turned on red and the counter is paused. The abnormal data is recorded, and the fault type is filled into Byte68. In AD_Curr (i.e., the fault data at the time of the abnormality), AD_Low is stored in byte69 and AD_High is stored in byte70.
[0106] If the voltage data is greater than 3.0V, it indicates that the voltage data is normal. At this time, check whether the counter value is greater than 0. If it is greater than 0, decrement the counter value by 1 and continue to collect voltage data until it reaches 0, then turn the LED light green.
[0107] Based on the above embodiments, this application provides a fault diagnosis module for the ELOAD firmware module based on the DSFP protocol. Before testing the switch port through the ELOAD firmware module, the various abnormal types that may occur during the switch port test are determined according to the information collection type of the ELOAD firmware module, as well as the corresponding abnormal judgment conditions for each abnormal type. A separate counter is set for each abnormal type so that continuous fault diagnosis can be performed by collecting test data multiple times for each abnormal type, using the corresponding abnormal judgment conditions and the corresponding counter when testing the switch port through the ELOAD firmware module. The diagnostic results for each abnormal type are output based on the counter values, which can improve the accuracy of fault diagnosis for each abnormal type, realize accurate fault location and real-time fault prompts in switch port testing, and record abnormal types and abnormal data in a timely manner, facilitating rapid location of the cause of faults when Eload occurs during operation and improving troubleshooting efficiency.
[0108] Secondly, embodiments of this application provide a fault diagnosis device for switch port testing, such as... Figure 3 As shown, the device includes:
[0109] The first processing module 11 is used to determine each anomaly type and the anomaly judgment conditions corresponding to each anomaly type based on the type of information collected by the optical port testing tool.
[0110] The first setting module 12 is used to set the counters corresponding to each of the aforementioned exception types;
[0111] The first judgment module 13 is used to test the switch port through the optical port test tool. After each time the test data corresponding to the target abnormality type is collected through the optical port test tool, it is determined whether the test data meets the abnormality judgment condition corresponding to the target abnormality type. The target abnormality type is any abnormality type among the various abnormality types.
[0112] The first counting module 14 is used to increase the value of the counter corresponding to the target anomaly type when the test data meets the anomaly judgment condition corresponding to the target anomaly type.
[0113] The second counting module 15 is used to reduce the value of the counter corresponding to the target anomaly type when the test data does not meet the anomaly judgment condition corresponding to the target anomaly type.
[0114] The first output module 16 is used to output the fault diagnosis result of the abnormal type corresponding to the first counter for the first counter whose value meets the first threshold.
[0115] The second output module 17 is used to output a normal diagnosis result of the abnormal type corresponding to the second counter for the second counter whose value meets the second threshold, wherein the first threshold is greater than the second threshold.
[0116] Optionally, the device further includes:
[0117] The second processing module is used to determine abnormal data based on the most recently collected test data corresponding to the first counter;
[0118] The third processing module is used to store the exception type corresponding to the first counter and the exception data into the memory of the optical port testing tool.
[0119] Optionally, the first counting module 14 includes:
[0120] The second judgment module is used to determine whether the value of the counter corresponding to the target anomaly type is less than the first threshold.
[0121] The first counting submodule is used to increase the value of the counter corresponding to the target anomaly type when the value of the counter corresponding to the target anomaly type is less than the first threshold.
[0122] Optionally, the information acquisition type includes at least one of the following: low-speed link signal, power consumption status, temperature status, and voltage status; the anomaly type includes at least one of the following: low-speed link signal anomaly, power consumption status anomaly, temperature status anomaly, and voltage status anomaly.
[0123] Optionally, the abnormality determination condition corresponding to the low-speed link signal abnormality is: the voltage of the low-speed link signal is within a first set threshold range.
[0124] Optionally, the abnormal judgment condition corresponding to the power consumption status is: the power consumption load return value of the optical port test tool for the switch port is inconsistent with the set value.
[0125] Optionally, the abnormality determination condition corresponding to the temperature state is: the temperature value of the optical port testing tool is outside the second set threshold range.
[0126] Optionally, the abnormal judgment condition corresponding to the voltage state is: the power supply voltage is less than a third preset threshold.
[0127] As can be seen from the above technical solution, before testing the switch port using the optical port testing tool, the various anomaly types that may occur during the switch port test are determined based on the information collection type of the optical port testing tool, as well as the corresponding anomaly judgment conditions for each anomaly type. A separate counter is set for each anomaly type so that during the switch port test using the optical port testing tool, continuous fault diagnosis can be performed by collecting test data multiple times for each anomaly type, using the corresponding anomaly judgment conditions and the corresponding counter. The diagnostic results for each anomaly type are output based on the counter values, which can improve the accuracy of fault diagnosis for each anomaly type and achieve accurate fault location and real-time fault prompts during switch port testing.
[0128] It should be noted that the device embodiments are similar to the method embodiments, so the description is relatively simple. For relevant details, please refer to the method embodiments.
[0129] This application also provides an electronic device, which is described in reference to... Figure 4 , Figure 4 This is a schematic diagram of the electronic device proposed in an embodiment of this application. For example... Figure 4 As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication connection. The memory 110 stores a computer program that can run on the processor 120 to implement the steps in the fault diagnosis method for switch port testing disclosed in the embodiments of this application.
[0130] This application also provides a computer-readable storage medium, see [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of a computer-readable storage medium proposed in an embodiment of this application. Figure 5 As shown, a computer-readable storage medium 200 stores a computer program / instruction 210, which, when executed by a processor, implements the steps in the fault diagnosis method for switch port testing as disclosed in the embodiments of this application.
[0131] This application also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the steps in the fault diagnosis method for switch port testing as disclosed in this application.
[0132] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] This application describes embodiments of methods, systems, devices, storage media, and program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0137] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0139] The above provides a detailed description of a fault diagnosis method, apparatus, and device for switch port testing provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A fault diagnosis method in switch port testing, characterized in that, The method includes: Based on the information type collected by the optical port testing tool, determine each anomaly type and the corresponding anomaly judgment conditions for each anomaly type. Set a counter corresponding to each of the aforementioned exception types; The switch port is tested using the optical port testing tool. After each test data corresponding to the target anomaly type is collected by the optical port testing tool, it is determined whether the test data meets the anomaly judgment condition corresponding to the target anomaly type. The target anomaly type is any one of the anomaly types. If the test data meets the anomaly determination conditions corresponding to the target anomaly type, the value of the counter corresponding to the target anomaly type is increased; If the test data does not meet the anomaly judgment conditions corresponding to the target anomaly type, reduce the value of the counter corresponding to the target anomaly type; For the first counter whose value meets the first threshold, output the fault diagnosis result of the abnormal type corresponding to the first counter; For the second counter whose value meets the second threshold, output the normal diagnosis result of the abnormal type corresponding to the second counter, where the first threshold is greater than the second threshold; If the test data meets the anomaly determination criteria corresponding to the target anomaly type, the value of the counter corresponding to the target anomaly type is increased, including: Determine whether the value of the counter corresponding to the target anomaly type is less than the first threshold; If the value of the counter corresponding to the target anomaly type is less than the first threshold, the value of the counter corresponding to the target anomaly type is increased; when the value of the counter reaches the first threshold, the increase of the counter value is stopped.
2. The method according to claim 1, characterized in that, The method further includes: Based on the most recently collected test data corresponding to the first counter, abnormal data is identified; The exception type corresponding to the first counter and the exception data are stored in the memory of the optical port testing tool.
3. The method according to any one of claims 1-2, characterized in that, The types of information collected include at least one of the following: low-speed link signal, power consumption status, temperature status, and voltage status; the types of anomalies include at least one of the following: low-speed link signal anomaly, power consumption status anomaly, temperature status anomaly, and voltage status anomaly.
4. The method according to claim 3, characterized in that, The abnormality determination condition corresponding to the low-speed link signal abnormality is: the voltage of the low-speed link signal is within the first set threshold range.
5. The method according to claim 3, characterized in that, The abnormal judgment condition corresponding to the power consumption status is: the power consumption load return value of the optical port test tool for the switch port is inconsistent with the set value.
6. The method according to claim 3, characterized in that, The abnormal condition corresponding to the temperature state is: the temperature value of the optical port testing tool is outside the second set threshold range.
7. The method according to claim 3, characterized in that, The abnormal judgment condition corresponding to the voltage state is: the power supply voltage is less than the third set threshold.
8. A fault diagnosis device for switch port testing, characterized in that, The device includes: The first processing module is used to determine each anomaly type and the anomaly judgment conditions corresponding to each anomaly type based on the type of information collected by the optical port testing tool. The first setting module is used to set the counters corresponding to each of the aforementioned exception types; The first judgment module is used to test the switch port through the optical port testing tool. After each time the test data corresponding to the target anomaly type is collected through the optical port testing tool, it is determined whether the test data meets the anomaly judgment condition corresponding to the target anomaly type. The target anomaly type is any anomaly type among the various anomaly types. The first counting module is used to increment the value of the counter corresponding to the target anomaly type when the test data meets the anomaly judgment condition corresponding to the target anomaly type. The second counting module is used to reduce the value of the counter corresponding to the target anomaly type when the test data does not meet the anomaly judgment condition corresponding to the target anomaly type. The first output module is used to output the fault diagnosis result of the abnormal type corresponding to the first counter for the first counter whose value meets the first threshold. The second output module is used to output a normal diagnosis result of the abnormal type corresponding to the second counter for the second counter whose value meets the second threshold, wherein the first threshold is greater than the second threshold; The first counting module includes: The second judgment module is used to determine whether the value of the counter corresponding to the target anomaly type is less than the first threshold. The first counting submodule is used to increment the value of the counter corresponding to the target anomaly type when the value of the counter is less than the first threshold; and to stop incrementing the value of the counter when the value of the counter reaches the first threshold.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the fault diagnosis method in switch port testing as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle error signal control system and method and storage medium
CN108279663A
Fault processing method and device, electronic equipment and storage medium
CN112798951A