A method for testing the reliability of a switch
By simulating the actual operating environment of a switch in a closed test chamber, a fault prediction model was established, which solved the problem that traditional switch testing could not predict faults, and achieved accurate prediction of switch faults and improved maintenance efficiency.
Patent Information
- Application Number
- CN202510145367.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-02-10
AI Technical Summary
Traditional switch reliability testing is conducted under static conditions, which cannot fully simulate real-world complex environments and dynamic loads. The lack of predictive mechanisms leads to delayed fault detection, affecting maintenance efficiency and response speed.
An independent control environment data device is installed in a closed test chamber to simulate the actual operating conditions of the switch. The environmental data changes are set through LabVIEW, baseline data is recorded, a fault prediction model is established, performance characteristics are extracted, fault types are predicted and fault locations are located, and warnings are issued to maintenance personnel.
This improved the realism and accuracy of the tests, enabling precise prediction of future switch failures, guiding maintenance personnel to take proactive measures, and enhancing the reliability and maintenance efficiency of the switches.
Smart Images

Figure CN120034473B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network equipment testing, and in particular to a method for testing the reliability of switches. Background Technology
[0002] In the field of network communication, switches, as key nodes connecting different network devices, directly affect the stability and performance of the entire network system. With the rapid development of information technology and the increasing demands of enterprises for data transmission, the reliability and stability of switches have become important topics in research and application.
[0003] Traditional switch reliability testing primarily focuses on static conditions, i.e., setting fixed parameters such as temperature and humidity in a laboratory environment and manually injecting specific traffic patterns to evaluate the switch's basic performance. However, this testing method cannot fully simulate the various complex environmental conditions and dynamic load changes that may be encountered in actual operation. In addition, early testing methods relied heavily on post-event analysis and lacked predictive mechanisms, leading to delayed fault detection and impacting maintenance efficiency and response speed. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for testing the reliability of switches to solve the problem of delayed fault detection due to the lack of a predictive mechanism, which affects maintenance efficiency and response speed.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for testing the reliability of a switch, comprising,
[0008] Set up a switch test room that can regulate environmental data and traffic, and determine a preliminary test plan for switch performance based on the switch's operating specifications.
[0009] Restore the switch to its initial state and record the switch's performance data under normal conditions as baseline data;
[0010] Adjust the switch's traffic and environmental data according to the preliminary performance test plan, record the switch's performance index data, and compare it with the baseline data to obtain the preliminary performance analysis results of the switch.
[0011] The switch's performance metrics and preliminary performance analysis results are integrated into test data and preprocessed.
[0012] Based on the preprocessed test data, performance features are extracted, and a switch fault prediction model is established based on the extracted performance features to obtain the types of faults that will occur in the switch in the future. Furthermore, the location of the switch fault is determined based on the types of faults that will occur in the future.
[0013] Based on the location of the switch fault, a warning is issued, and maintenance personnel are notified to take corresponding measures in advance.
[0014] As a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the method includes: setting up a switch test chamber capable of regulating environmental data and traffic, and determining a preliminary test plan for switch performance based on the switch's operating specifications, specifically including the following steps.
[0015] Choose a completely enclosed test room as the location for testing the switches, and install equipment that can independently control environmental data;
[0016] The environmental data includes temperature, humidity, vibration, and electromagnetic interference;
[0017] Use LabVIEW to set time series variation curves for data from different environments;
[0018] Determine the operating specifications of the switch by referring to the switch manufacturer and industry standards, and then determine the initial test plan for the switch performance based on the operating specifications.
[0019] The preliminary test plan includes the specific range of traffic and environmental data, as well as the duration of each environmental condition and its cycle pattern;
[0020] The cyclic mode refers to a mode in which the switch continuously cycles through high and low temperature cycles, damp heat cycles, vibration tests, and EMI tests by adjusting environmental data.
[0021] In a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the switch is restored to its initial state and its performance data under normal conditions is recorded as baseline data. This specifically includes the following steps:
[0022] Execute the factory reset command through the switch's management interface;
[0023] Run the switch under normal environmental data conditions and record the switch performance metrics after running under normal environmental data conditions using NetFlow and SNMP;
[0024] The performance metrics of the switch refer to CPU utilization, memory usage, throughput, packet loss rate, and latency.
[0025] The performance metrics of the switches running under normal environmental data are sorted and saved by timestamp to form a baseline dataset, which is then saved in CSV format.
[0026] As a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the method includes: adjusting the switch's traffic and environmental data according to the preliminary switch performance test plan, recording the switch's performance index data, and comparing it with baseline data to obtain preliminary performance analysis results of the switch. Specifically, this includes the following steps:
[0027] Based on the preliminary test plan for switch performance, the environmental data of the switch is adjusted using a device that can independently control environmental data, and a loop mode is executed until the loop mode ends.
[0028] According to the preliminary test plan for switch performance, a traffic tester was used to inject traffic into the switch, and the difference between the actual sending rate and receiving rate at each stage was recorded.
[0029] The adjusted performance metrics of the switch environment and traffic were collected using NetFlow and SNMP, and compared item by item with the baseline dataset to obtain the difference between the adjusted performance metrics and the baseline dataset.
[0030] Set performance thresholds based on historical test data. If the difference between each adjusted performance metric and the baseline dataset is greater than the performance threshold, then that performance metric is marked as abnormal.
[0031] Plotly is used to plot the performance of each adjusted performance metric, and the performance metrics marked as abnormal are distinguished in red. This is the preliminary performance analysis result of the switch.
[0032] In a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the switch's performance index data and preliminary performance analysis results are integrated into test data and preprocessed, specifically including the following steps:
[0033] The adjusted performance metrics of the switch environment data and traffic collected by NetFlow and SNMP are combined with the corresponding performance graphs to form test data;
[0034] Based on the test data, statistical methods were used to identify and remove data points that deviated from the normal range, and missing values were filled in;
[0035] Standardize the test data.
[0036] In a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the following steps are included: extracting performance features from preprocessed test data, establishing a switch fault prediction model based on the extracted performance features to obtain the types of future switch faults, and further determining the location of the switch fault based on the types of future switch faults.
[0037] Based on the preprocessed test data, information gain analysis is used to extract CPU utilization, memory usage, throughput, packet loss rate, and latency as switch characteristics.
[0038] Define the fault types of the switch based on its characteristics;
[0039] For each switch feature, calculate its mean and standard deviation in the baseline dataset;
[0040] Based on the mean and standard deviation of each switch feature, an information filtering function is introduced to obtain the deviation value between the performance feature and the normal state.
[0041] Calculate the weighted sum for each type of fault in the switch, and apply the softmax function and the deviation of performance characteristics from the normal state to obtain the probability distribution of future faults in the switch. The expression is as follows:
[0042]
[0043] Among them, Z j Let m represent the probability of the switch experiencing the j-th type of failure in the future, m represent the total number of failure types, n represent the total number of performance characteristics, and w represent the probability of the switch experiencing the j-th type of failure in the future. ij F represents the weighting factor of the i-th performance feature for the j-th fault type. i Let φ represent the value of the i-th performance characteristic, φ() represent the information filtering function, and k represent the index for traversing the fault types.
[0044] Based on the probability distribution of future failures of the switch, the failure type with the highest failure probability is taken as the failure type of the switch in the future.
[0045] Diagnostic tools and troubleshooting methods are used to pinpoint the location of the fault based on the types of faults that the switch is likely to experience.
[0046] In a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the step of introducing an information filtering function based on the mean and standard deviation of each switch characteristic to obtain the deviation value of the performance characteristic from the normal state specifically includes the following steps.
[0047] Based on the mean and standard deviation of each switch characteristic, the deviation of the current performance characteristic from its mean is calculated. Then, using an exponential function and the standard deviation, further calculations are performed to obtain the degree of deviation of the performance characteristic from the normal state. The expression is as follows:
[0048]
[0049] Wherein, φ(F iThe value of the i-th performance characteristic deviates from its value after processing by the information filtering function.
[0050] μ i Let σ represent the mean of the i-th performance characteristic under normal conditions. i Let represent the standard deviation of the i-th performance characteristic.
[0051] In a preferred embodiment of the method for testing the reliability of a switch according to the present invention, the following steps are included: issuing a warning based on the location of the switch fault and notifying maintenance personnel to take corresponding measures in advance.
[0052] Create a test report that reflects the reliability of the switch based on the location of the switch failure;
[0053] The test report includes the type of switch fault, the location of the fault, the affected performance indicators, the changes in the switch's performance indicators under different traffic and environmental data, and adjustment suggestions.
[0054] The test report will be sent to maintenance personnel for maintenance reference.
[0055] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the method for testing the reliability of a switch as described in the first aspect of the present invention.
[0056] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein, when the computer program is executed by a processor, it implements any step of the method for testing the reliability of a switch as described in the first aspect of the present invention.
[0057] The beneficial effects of this invention are as follows: by selecting a completely enclosed test chamber and installing equipment for independently controlling environmental data, it is possible to accurately simulate various extreme working conditions that may be encountered in actual operation. This not only improves the realism of the test, but also makes the performance of the switch more closely resemble the actual application scenario. In addition, by establishing a switch fault prediction model, it is possible to accurately predict the future fault types of the switch, and can also guide maintenance personnel to take targeted measures to prevent potential problems from occurring, significantly improving the reliability and maintenance efficiency of the switch. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a flowchart of the method for testing the reliability of a switch in Example 1.
[0060] Figure 2 This is a schematic diagram of the switch fault prediction results obtained in Example 1. Detailed Implementation
[0061] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0063] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0064] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a method for testing the reliability of a switch, including the following steps:
[0065] S1. Set up a switch test room that can control environmental data and traffic, and determine a preliminary test plan for switch performance based on the switch's operating specifications.
[0066] Specifically, the steps include the following:
[0067] S1.1 Select a fully enclosed and well-insulated test chamber to ensure that external environmental factors will not affect the test results. Install environmental control equipment in the test chamber that can independently control temperature, humidity, vibration, and electromagnetic interference (EMI). For example, use precision heaters to accurately regulate the room temperature; use humidifiers and dehumidifiers to maintain specific humidity levels; install vibration tables to simulate mechanical vibrations in actual operation; and deploy shielded enclosures or EMI generators to introduce or eliminate electromagnetic interference.
[0068] To further explain, by selecting a completely enclosed test chamber and installing equipment to independently control environmental data, a high degree of controllability and consistency of the switch testing environment was achieved. This not only ensures the consistency of test conditions for each test but also avoids interference from external factors on the test results, thereby improving the accuracy and reliability of the test results.
[0069] S1.2 By connecting LabVIEW with the interface of environmental control equipment, the automatic control of temperature, humidity, vibration and EMI environmental data can be realized.
[0070] Carefully study the technical and maintenance manuals provided by the switch manufacturer to understand the specific operating parameters and technical requirements of the switch, and combine them with the relevant standards issued by the IEC organization to ensure that the test plan complies with industry standards.
[0071] A detailed preliminary test plan should be developed based on the specific operating parameters, technical requirements, and industry standards of the switch. The preliminary test plan includes traffic testing, environmental testing, and loopback testing.
[0072] Traffic testing refers to setting different traffic modes (such as constant traffic, pulsed traffic, and random traffic) to evaluate the switching capacity and stability of a switch under network load.
[0073] Environmental testing refers to defining the specific ranges of temperature, humidity, vibration, and EMI, as well as the duration and cycle patterns of each environmental condition.
[0074] Cyclic mode refers to a continuous cycle of high and low temperature alternation (e.g., once every 4 hours), damp heat cycle (e.g., once every 8 hours), vibration test (e.g., once every 2 hours), and EMI test (e.g., once every hour) to simulate various extreme conditions that may be encountered during long-term operation.
[0075] For example, set the temperature range: based on the switch's operating specifications (e.g., commercial-grade equipment typically ranges from 0°C to 40°C), determine the specific test temperature range to be -10°C to 60°C. Humidity range: set the relative humidity range to 20% to 90% to cover various conditions from dry to humid. Vibration frequency: set the vibration frequency range to 10Hz to 500Hz to simulate mechanical vibrations of varying intensities. Electromagnetic interference (EMI) intensity: set the EMI intensity range to 80dBμV to 120dBμV, covering common electromagnetic interference levels. Inject different types of Layer 2 data streams into the switch, including but not limited to data packets with frame lengths of 64B, 128B, and 256B. Set the initial transmission rate to 1Gbps and gradually increase it to the maximum design capacity (e.g., 10Gbps) to evaluate the switch's performance under different loads. Test continuously for at least 30 minutes at each rate level to ensure the data fully reflects the device's performance.
[0076] High and low temperature alternation cycle: During the high temperature phase, the temperature is maintained at 60℃ for 4 hours. During the low temperature phase, the temperature drops to -10℃ for 4 hours. Number of cycles: A total of 10 complete high and low temperature alternation cycles are performed.
[0077] To further explain, by specifying the detailed range of traffic and environmental data, as well as the duration and cycle mode of each environmental condition, the standardization and repeatability of the testing process are ensured. This approach not only improves the reliability of test results but also provides strong support for evaluating the long-term performance of switches in complex dynamic environments. In particular, the design of the cycle mode can more realistically reproduce the actual conditions of the switch during long-term operation, providing an important basis for evaluating its reliability and durability.
[0078] S2. Restore the switch to its initial state and record the switch's performance data under normal conditions as baseline data.
[0079] Specifically, the steps include the following:
[0080] Using the switch's built-in web management interface, and following the guidelines provided by the switch manufacturer, select "Restore Factory Settings" or a similar option. By executing the factory reset command, you ensure that each test is performed under the same and known initial conditions, eliminating result deviations caused by different configurations.
[0081] Adjust the temperature, humidity, vibration, and electromagnetic interference in the test chamber to the standard range, for example, maintain the temperature at 25℃±2℃, control the humidity at 40%-60%, and ensure there is no significant vibration or electromagnetic interference.
[0082] NetFlow is a widely used traffic monitoring technology, while SNMP is mainly used to manage and monitor the status and performance of network devices. Using NetFlow and SNMP, the CPU utilization, memory usage, throughput, packet loss rate and latency of the switch are collected by running the switch continuously under normal conditions for a period of time (such as 24 hours) to collect sufficient performance data.
[0083] Performance metrics data from the switch are collected periodically (e.g., every minute) using NetFlow and SNMP to ensure data continuity and integrity. Precise timestamps are added to each set of performance metrics to ensure the data's chronological order is clear. All collected performance metrics data are organized into a table, with each row representing a data record at a specific time point and each column corresponding to a performance metric (e.g., CPU utilization, memory usage). The organized data is then exported as a CSV file for easy subsequent data processing and analysis.
[0084] By sorting the performance metrics data by timestamp and saving it in CSV format, a structured baseline dataset was created. This dataset not only facilitates management and analysis but also provides a solid foundation for subsequent performance comparisons and fault prediction.
[0085] S3. Adjust the switch's traffic and environmental data according to the preliminary performance test plan, record the switch's performance index data, and compare it with the baseline data to obtain the preliminary performance analysis results of the switch.
[0086] Specifically, the steps include the following:
[0087] S3.1. Execute the test tasks according to the preliminary test plan. First, set a data collection cycle (e.g., 5 minutes), duration (at least 15 minutes for each load level), and total test duration (e.g., 15 minutes per scenario, 45 minutes in total). When starting the test tasks, begin with low traffic, gradually increasing to medium traffic, and finally reaching high traffic. For environmental conditions, simulate different environmental conditions (e.g., high temperature, high humidity, strong electromagnetic interference) and record their impact on switch performance. Record the current time each time switch performance indicators are collected to ensure that each set of performance indicators has an accurate timestamp.
[0088] Load the baseline dataset established in the normal environment, compare the currently collected performance metrics with the baseline dataset item by item, calculate the difference, and for each performance metric, calculate its change at different time points.
[0089] To further illustrate, by comparing with a baseline dataset, the performance changes of the switch under different environmental conditions can be accurately assessed.
[0090] S3.2. Based on historical test data, calculate the mean and standard deviation of each performance indicator, and set the performance threshold range according to the mean and standard deviation. For each performance indicator, if the difference between the currently collected performance indicator and the baseline dataset exceeds the set performance threshold, it is marked as an anomaly.
[0091] Plotly was chosen as the visualization tool because of its powerful interactivity and rich chart types. Bar charts were used to compare performance metrics at different time points, and performance metrics marked as abnormal were highlighted in red for easy and quick identification.
[0092] To further explain, displaying performance data graphically makes the analysis results more intuitive and easier to understand.
[0093] S4. Integrate the switch's performance metrics data and preliminary performance analysis results into test data and perform preprocessing.
[0094] Specifically, the steps include the following:
[0095] The performance metrics data of the switches collected by NetFlow and SNMP after the preliminary test plan is executed are associated and merged with the performance graphs according to the timestamps to form test data.
[0096] To further explain, by merging the data collected by NetFlow and SNMP with the corresponding performance graphs, a complete test dataset containing all relevant information was formed. This not only improved the completeness of the data but also provided rich information support for subsequent analysis.
[0097] Based on the test data, statistical methods were used to calculate the Z-score (standardized score) for each performance metric to identify data points that deviated from the normal range. The LOF algorithm was used to identify data points with locally low density, which may be outliers. Data points marked as outliers were removed directly from the dataset to prevent them from interfering with subsequent analysis.
[0098] For a small number of missing values, the mean or median of the data in that column can be used to fill the gaps.
[0099] Each performance indicator is converted into a Z-score and standardized so that its mean is 0 and its standard deviation is 1. Standardization eliminates the influence of different dimensions between performance indicators, making the comparison between indicators more fair and reasonable.
[0100] S5. Based on the preprocessed test data, extract performance features and establish a switch fault prediction model based on the extracted performance features to obtain the types of faults that will occur in the switch in the future. Based on the types of faults that will occur in the switch in the future, further determine the location of the switch fault.
[0101] Specifically, the steps include the following:
[0102] Based on the preprocessed test data, information gain analysis is used to extract CPU utilization, memory usage, throughput, packet loss rate, and latency as switch features. Information gain measures the amount of information a feature provides in distinguishing different categories. In this example, for the performance prediction task, it is used to measure the contribution of each performance metric to distinguishing between normal and abnormal states.
[0103] Define switch fault types based on switch characteristics (e.g., hardware faults, software faults, configuration problems, external environmental influences);
[0104] Hardware failures include CPU overload, insufficient memory, network card failure, and power supply failure.
[0105] Software malfunctions such as operating system or firmware problems, or application errors;
[0106] Configuration issues such as incorrect routing configuration, incorrect VLAN configuration, or improper QoS settings;
[0107] External environmental factors such as excessively high temperatures and electromagnetic interference (EMI).
[0108] Using a baseline dataset representing the normal operating state of the switches, the mean and standard deviation of each switch feature are calculated, expressed as follows:
[0109]
[0110] Where, μ i Let represent the mean of the i-th performance feature in the baseline dataset, and n represent the total number of performance features, which is also the number of calculations. σ represents the i-th performance characteristic in the b-th calculation. i This represents the standard deviation of the i-th performance characteristic;
[0111] Based on the mean and standard deviation of each switch characteristic, an information filtering function is introduced to calculate the deviation of the current performance characteristic from its mean. Then, based on the calculated deviation, an exponential function and standard deviation are used to further calculate the degree of deviation of the performance characteristic from the normal state. The expression for this is:
[0112]
[0113] Wherein, φ(F i ) represents the deviation value of the i-th performance characteristic after processing by the information filtering function, μ i Let σ represent the mean of the i-th performance characteristic under normal conditions. i Let represent the standard deviation of the i-th performance characteristic.
[0114] To further clarify, the deviation of performance characteristics from the baseline dataset was quantified in numerical form, facilitating comparison and further analysis.
[0115] Calculate the weighted sum for each fault type j, and apply the softmax function and the deviation value φ(F) of the performance characteristic from the normal state. i The probability distribution of future failures of the switch is obtained, and its expression is:
[0116]
[0117] Among them, Z j Let m represent the probability of the switch experiencing the j-th type of failure in the future, m represent the total number of failure types, n represent the total number of performance characteristics, and w represent the probability of the switch experiencing the j-th type of failure in the future. ij F represents the weighting factor of the i-th performance feature for the j-th fault type. i Let φ represent the value of the i-th performance characteristic, φ() represent the information filtering function, and k represent the index for traversing the fault types.
[0118] Based on the probability distribution of future switch failures Z j The type of failure with the highest probability is taken as the type of failure that will occur in the future for the switch; the probability distribution of future failures Z j The value range is [0,1], and the sum of all probabilities is 1. This is combined with specialized diagnostic tools and techniques (such as network packet capture analysis, hardware testing, etc.) and logical elimination methods to narrow down the fault range and ultimately pinpoint the exact location of the fault.
[0119] For example, if the probabilities of three fault types are obtained [0.344, 0.336, 0.320], the first fault type has the highest probability, which corresponds to insufficient memory. First, use the built-in management interface of the switch to check the current memory usage. Use a network packet capture tool (such as Wireshark) to capture traffic and analyze whether there are abnormally large data packets or continuous data transmission, which may cause memory buffer overflow. Further check whether the physical memory module is working properly to ensure that there is no hardware failure. At this point, the comprehensive judgment confirms that the specific cause of insufficient memory is the physical memory module. Upon inspection, it was found that one of the memory modules had a hardware problem.
[0120] S6. Based on the location of the switch fault, issue a warning and notify maintenance personnel to take corresponding measures in advance.
[0121] Specifically, the steps include the following:
[0122] Based on the identified location of the switch fault, create a test report for the switch, including the type of switch fault, the location of the fault, the affected performance metrics, the changes in the switch's performance metrics under different traffic and environmental data, and adjustment recommendations.
[0123] For example, the test report states the switch fault type as: insufficient memory; fault location: a memory module within the physical memory module; affected performance metrics are: CPU utilization, normal state: average 50%, standard deviation 10%, fault state: peaking at 85%; memory usage, normal state: average 60%, standard deviation 15%, fault state: consistently exceeding 90%. In low-traffic environments, CPU utilization: slight fluctuations, remaining around 60%; memory usage: close to 90%, but not completely exhausted. In medium-traffic environments, CPU utilization: significantly increased, reaching 75%; memory usage: consistently close to 100%. In high-traffic environments, CPU utilization: close to 100%; memory usage: reached 100%, with memory allocation failure. In high-temperature environments (>40℃), CPU utilization: due to heat dissipation issues, CPU frequency decreased, leading to increased utilization; memory usage: no significant change. The recommended adjustment is to immediately replace the faulty memory module to ensure normal hardware operation, and consider adding additional memory modules to cope with future higher load demands.
[0124] Send the complete test report to the maintenance personnel so they can take corrective action.
[0125] This embodiment also provides a computer device suitable for a method of testing the reliability of a switch, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method of testing the reliability of a switch as proposed in the above embodiment.
[0126] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0127] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for testing the reliability of a switch as described in the above embodiments. The 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 Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0128] In summary, this invention achieves the following: by selecting a completely enclosed test chamber and installing equipment to independently control environmental data, it can accurately simulate various extreme operating conditions that may be encountered in actual operation. This not only improves the realism of the test but also makes the performance of the switch more closely resemble actual application scenarios. Furthermore, by establishing a switch fault prediction model, it enables accurate prediction of future switch fault types and guides maintenance personnel to take targeted measures to prevent potential problems, significantly improving the reliability and maintenance efficiency of the switch.
[0129] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for testing the reliability of a switch, characterized in that: include, Set up a switch test room capable of controlling environmental data and traffic, and determine a preliminary test plan for switch performance based on the switch's operating specifications. This plan includes the following steps: Choose a completely enclosed test room as the location for testing the switches, and install equipment that can independently control environmental data; The environmental data includes temperature, humidity, vibration, and electromagnetic interference; Use LabVIEW to set time series variation curves for data from different environments; Determine the operating specifications of the switch by referring to the switch manufacturer and industry standards, and then determine the initial test plan for the switch performance based on the operating specifications. The preliminary test plan includes the specific range of traffic and environmental data, as well as the duration of each environmental condition and its cycle pattern; The cycle mode refers to the mode in which the switch continuously cycles through high and low temperature cycles, damp heat cycles, vibration tests, and EMI tests by adjusting environmental data. Restore the switch to its initial state and record the switch's performance data under normal conditions as baseline data; Adjust the switch's traffic and environmental data according to the preliminary performance test plan, record the switch's performance index data, and compare it with the baseline data to obtain the preliminary performance analysis results of the switch. The switch's performance metrics and preliminary performance analysis results are integrated into test data and preprocessed. Based on the preprocessed test data, performance features are extracted, and a switch fault prediction model is established based on the extracted performance features to obtain the types of faults that will occur in the switch in the future. Based on the types of faults that will occur in the switch in the future, the location of the switch fault is further determined. Based on the location of the switch fault, a warning is issued, and maintenance personnel are notified to take corresponding measures in advance.
2. The method for testing the reliability of a switch as described in claim 1, characterized in that: To restore the switch to its initial state and record its performance data under normal conditions as baseline data, the following steps are involved. Execute the factory reset command through the switch's management interface; Run the switch under normal environmental data conditions and record the switch performance metrics after running under normal environmental data conditions using NetFlow and SNMP; The performance metrics of the switch refer to CPU utilization, memory usage, throughput, packet loss rate, and latency. The performance metrics of the switches running under normal environmental data are sorted and saved by timestamp to form a baseline dataset, which is then saved in CSV format.
3. The method for testing the reliability of a switch as described in claim 2, characterized in that: Adjust the switch's traffic and environmental data according to the preliminary performance testing plan, record the switch's performance metrics, and compare them with baseline data to obtain preliminary performance analysis results. The specific steps include the following: Based on the preliminary test plan for switch performance, the environmental data of the switch is adjusted using a device that can independently control environmental data, and a loop mode is executed until the loop mode ends. According to the preliminary test plan for switch performance, a traffic tester was used to inject traffic into the switch, and the difference between the actual sending rate and receiving rate at each stage was recorded. The adjusted performance metrics of the switch environment and traffic were collected using NetFlow and SNMP, and compared item by item with the baseline dataset to obtain the difference between the adjusted performance metrics and the baseline dataset. Set performance thresholds based on historical test data. If the difference between each adjusted performance metric and the baseline dataset is greater than the performance threshold, then that performance metric is marked as abnormal. Plotly is used to plot the performance of each adjusted performance metric, and the performance metrics marked as abnormal are distinguished in red. This is the preliminary performance analysis result of the switch.
4. The method for testing the reliability of a switch as described in claim 3, characterized in that: The switch's performance metrics and preliminary performance analysis results are integrated into test data, which is then preprocessed. This process includes the following steps: The adjusted performance metrics of the switch environment data and traffic collected by NetFlow and SNMP are combined with the corresponding performance graphs to form test data; Based on the test data, statistical methods were used to identify and remove data points that deviated from the normal range, and missing values were filled in; Standardize the test data.
5. The method for testing the reliability of a switch as described in claim 4, characterized in that: Based on the preprocessed test data, performance features are extracted, and a switch fault prediction model is established based on these features to determine the types of faults that the switch will likely experience in the future. The location of the switch fault is then further determined based on these future fault types. The specific steps include the following: Based on the preprocessed test data, information gain analysis is used to extract CPU utilization, memory usage, throughput, packet loss rate, and latency as switch characteristics. Define the fault types of the switch based on its characteristics; For each switch feature, calculate its mean and standard deviation in the baseline dataset; Based on the mean and standard deviation of each switch feature, an information filtering function is introduced to obtain the deviation value between the performance feature and the normal state. Calculate the weighted sum for each type of fault in the switch, and apply the softmax function and the deviation of performance characteristics from the normal state to obtain the probability distribution of future faults in the switch. The expression is as follows: ; in, Indicates the future occurrence of the switch. The probability of each type of failure This indicates the total number of fault types. This represents the total number of performance characteristics. Indicates the first The performance characteristic for the first Weighting factors for each type of fault. Indicates the first The value of each performance characteristic This represents an information filtering function. Indicates the index for traversing fault types; Based on the probability distribution of future failures of the switch, the failure type with the highest failure probability is taken as the failure type of the switch in the future. Diagnostic tools and troubleshooting methods are used to pinpoint the location of the fault based on the types of faults that the switch is likely to experience.
6. The method for testing the reliability of a switch as described in claim 5, characterized in that: The process involves introducing an information filtering function based on the mean and standard deviation of each switch's characteristics to obtain the deviation value between the performance characteristics and the normal state. Specifically, this includes the following steps: Based on the mean and standard deviation of each switch characteristic, the deviation of the current performance characteristic from its mean is calculated. Then, using an exponential function and the standard deviation, further calculations are performed to obtain the degree of deviation of the performance characteristic from the normal state. The expression is as follows: ; in, Indicates the first The deviation value of each performance characteristic after being processed by the information filtering function Indicates the first The mean of each performance characteristic under normal conditions. Indicates the first The standard deviation of each performance characteristic.
7. The method for testing the reliability of a switch as described in claim 6, characterized in that: Based on the location of the switch fault, a warning is issued, and maintenance personnel are notified to take corresponding measures in advance. The specific steps include the following: Create a test report that reflects the reliability of the switch based on the location of the switch failure; The test report includes the type of switch fault, the location of the fault, the affected performance indicators, the changes in the switch's performance indicators under different traffic and environmental data, and adjustment suggestions. The test report will be sent to maintenance personnel for maintenance reference.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for testing the reliability of a switch as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for testing the reliability of a switch as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Automated test apparatus and test method of switch
CN106789423A
Automatic test method and system for switch
CN115208787A