CN110708218B - Power failure protection equipment switching time detection method, device, equipment and system - Google Patents

Power failure protection equipment switching time detection method, device, equipment and system Download PDF

Info

Publication number
CN110708218B
CN110708218B CN201911042774.XA CN201911042774A CN110708218B CN 110708218 B CN110708218 B CN 110708218B CN 201911042774 A CN201911042774 A CN 201911042774A CN 110708218 B CN110708218 B CN 110708218B
Authority
CN
China
Prior art keywords
switch
power
test data
state
data packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911042774.XA
Other languages
Chinese (zh)
Other versions
CN110708218A (en
Inventor
盛佳宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911042774.XA priority Critical patent/CN110708218B/en
Publication of CN110708218A publication Critical patent/CN110708218A/en
Application granted granted Critical
Publication of CN110708218B publication Critical patent/CN110708218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/10Current supply arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Abstract

The application provides a method, a device, equipment and a system for detecting the switching time of power-down protection equipment, wherein the method is executed by a tester, the tester is connected with a switch, and the method comprises the following steps: sending a test data packet to a switch, wherein the switch is used for sending the test data packet to power-down protection equipment, and the power-down protection equipment is used for carrying out power-down protection on connected protected equipment; receiving a test data packet returned by the switch, wherein the switch is used for receiving the test data packet returned by the power failure protection equipment; calculating the quantity of lost packets according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the receiving switch; and determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to the switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched. Therefore, the switching time can be accurately detected when the switching time of the power-off protection equipment is longer.

Description

Power failure protection equipment switching time detection method, device, equipment and system
Technical Field
The present application relates to the field of network security technologies, and in particular, to a method, an apparatus, a device, and a system for detecting a switching time of a power down protection device.
Background
With the development of internet technology, network security devices are also receiving much attention. In order to provide power down protection measures for network security devices, related power down protection devices are successively developed. The power down protection device needs a certain switching time to switch between the working state and the closed state. The switching time is used as an important parameter of the power failure protection device and needs to be accurately detected.
A mode for detecting the switching time of power-down protection equipment is characterized in that two ends of the power-down protection equipment are connected with two computers, the computers continuously send ping packets, and the switching time is calculated according to the number of the ping packets overtime. This approach leads to inaccurate detected handoff times due to long packet transmission intervals and low packet transmission rates. Another way to detect the switching time of the power down protection device is to directly connect the power down protection device with a tester, the tester can continuously and stably send packets at a high rate, and the switching time is calculated according to the number of the packet loss. The mode can more accurately detect the switching time, but when the switching time is longer, the interface of the power failure protection equipment is in a blocking state for a long time, and the directly connected interface of the tester is closed, so that the package sending script of the tester stops running, and the longer switching time cannot be detected. That is, the prior art either has inaccurate handover time measurement or can accurately detect but cannot realize measurement of long handover time.
Disclosure of Invention
At least one embodiment of the present specification provides a scheme for detecting the switching time of a power down protection device, so as to accurately detect the switching time of the power down protection device.
In a first aspect, a method for detecting switching time of power down protection equipment is provided, where the method is performed by a tester, the tester is connected to a switch, and the method includes:
sending a test data packet to the switch, wherein the switch is used for sending the test data packet to power-down protection equipment, and the power-down protection equipment is used for performing power-down protection on connected protected equipment;
receiving a test data packet returned by the switch, wherein the switch is used for receiving the test data packet returned by the power failure protection equipment;
calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch;
and determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to the switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched.
In a second aspect, a device for detecting switching time of power down protection equipment is provided, the device is applied to a tester, the tester is connected with a switch, and the device includes:
the system comprises a sending module, a power failure protection device and a receiving module, wherein the sending module is used for sending a test data packet to the switch, the switch is used for sending the test data packet to the power failure protection device, and the power failure protection device is used for performing power failure protection on connected protected equipment;
the receiving module is used for receiving the test data packet returned by the switch, and the switch is used for receiving the test data packet returned by the power failure protection equipment;
the calculation module is used for calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch;
and the determining module is used for determining the switching time of the power-fail protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to the switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-fail protection equipment when the working state of the protected equipment is switched.
In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for detecting a switching time of a power down protection device according to any embodiment of the present specification is implemented.
In a fourth aspect, a system for detecting a switching time of a power down protection device is provided, where the system includes: the system comprises a tester and a switch, wherein the tester is directly connected with the switch; the switch is used for being connected with the power failure protection equipment; the power failure protection equipment is used for being connected with protected equipment;
the tester is used for sending a test data packet to the switch; receiving a test data packet returned by the switch; calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch; determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to a switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched;
the switch is used for receiving the test data packet sent by the tester; sending a test data packet sent by the tester to the power failure protection equipment; receiving a test data packet returned by the power failure protection equipment; sending a test data packet returned by the power failure protection equipment to the tester; the power-down protection device is used for performing power-down protection on the connected protected device.
According to the technical scheme, in at least one embodiment of the specification, the tester is directly connected with the switch, the switch is used for sending the test data packet to the power failure protection equipment, the switch is used for receiving the test data packet returned by the power failure protection equipment, and the switching time of the power failure protection equipment is calculated according to the sent test data packet, the returned test data packet and the packet sending rate. When the power-fail protection device is switched between the working state and the closing state, the interface on the switch directly connected with the tester is always in the connection state, and the tester is always in the normal working state, so that the embodiment of the specification not only realizes the measurement accuracy of the switching duration, but also can accurately detect the switching time when the switching time of the power-fail protection device is longer.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
Fig. 1 is a flow chart illustrating a method for detecting a switching time of a power down protection device according to an exemplary embodiment;
fig. 2 is a schematic diagram illustrating a device for detecting switching time of a power down protection apparatus according to an exemplary embodiment;
fig. 3 is a schematic diagram illustrating a system for detecting switching time of a power down protection device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the switching time detection scheme of the power down protection device provided in this specification clearer, the following describes in detail an implementation process of the scheme provided in this specification with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for detecting a switching time of a power down protection device according to an embodiment provided in this specification. In this embodiment, a tester is used as an execution main body for description, but it can be understood that any main body capable of implementing the power down protection device switching time detection scheme provided in this specification may be used as a "tester" as an execution main body, and this specification does not limit this. It should also be understood that any device that can perform the relevant functions in place of the switch in this embodiment may be regarded as the "switch" mentioned in this embodiment.
First, a connection relationship in the present embodiment is explained, and fig. 3 may be referred to as a specific connection relationship. The specific connection relationship is as follows: the tester is directly connected with the switch, the switch is connected with the power-down protection device, and the power-down protection device is connected with the protected device. In this embodiment, the protected device is described by taking a network security device as an example, and it can be understood that all devices that perform power down protection by using a power down protection device may be regarded as "protected devices" in this embodiment. And the switch can be always ensured to be in a normal working state, and an interface which is directly connected with the tester on the switch is always in a communication state. In the testing process, the tester continuously sends test data packets to the switch and receives the test data packets returned by the switch.
When the network safety equipment works normally, the power failure protection equipment sends a test data packet received from the switch to the network safety equipment, the network safety equipment returns the test data packet to the power failure protection equipment, and the power failure protection equipment returns the returned test data packet to the switch.
When the network safety equipment is suddenly powered off in a normal working state, the power failure protection equipment is triggered to be in a starting switching state so as to start the power failure protection equipment to work, and at the moment, because the power failure protection equipment is in the switching state, the power failure protection equipment cannot work normally, the test data packet sent by the switch is lost at the power failure protection equipment.
When the network safety equipment is powered off and the power failure protection equipment is started successfully and works normally, the power failure protection equipment can directly forward the test data packet to the switch, so that the smoothness of the network is ensured under the condition that the network safety equipment is powered off.
When the network safety equipment is plugged from a power-off state, the power-down protection equipment is triggered to be in a closing switching state to close the power-down protection equipment so as to enable the network safety equipment to normally work, and at the moment, because the power-down protection equipment is in the switching state, the power-down protection equipment cannot normally work, a test data packet sent by the switch is lost at the power-down protection equipment.
When the network security equipment is normally plugged and works and the power failure protection equipment is successfully closed, the power failure protection equipment sends the test data packet to the network security equipment, the network security equipment returns the processed test data packet to the power failure protection equipment, and the power failure protection equipment returns the returned test data packet to the switch.
As can be seen, the switching states of the power down protection device include a start switching state and a close switching state. In the starting switching state, when the network safety equipment is powered off, the power failure protection equipment is triggered to start so as to ensure the smooth network; in the switching-off state, the network safety equipment is triggered to be switched off when power is plugged into the network safety equipment, so that the normal work of the network safety equipment is ensured. Both the two switching states may cause the test data packet sent from the switch to be lost at the power down protection device, so that the packet loss time may be considered as the switching time of the power down protection device.
The method is executed by a tester, the tester is directly connected with a switch, as shown in fig. 1, the process includes:
step 101, sending a test data packet to the switch, wherein the switch is used for sending the test data packet to a power failure protection device, and the power failure protection device is used for performing power failure protection on connected protected equipment.
When the tester detects the switching time of the power-down protection equipment, the sending interface of the tester sends a test data packet to the switch, and after the receiving interface of the switch receives the test data packet, the received test data packet is sent to the power-down protection equipment from the sending interface of the switch. The power failure protection equipment is connected with the network safety equipment, and when the network safety equipment is powered off, the network is ensured to be smooth.
In one example, the sending a test packet to the switch includes: and sending a Transmission Control Protocol (TCP) layer data packet to the switch. The tester constructs a TCP layer data packet as a test data packet, and forwards the test data packet at a stable speed. For example, it may be sent out continuously at a rate of ten thousand test packets per second. The sending rate of the test data packet can be set according to the actual detection scene, and generally follows a rule: the greater the rate, the more accurate the detected switching time.
And 102, receiving a test data packet returned by the switch, wherein the switch is used for receiving the test data packet returned by the power failure protection equipment.
And the switch sends the test data packet returned by the power failure protection equipment to the tester, and the tester finally receives the returned test data packet.
In step 101 and step 102, in the process of switching the power down protection device, the interface on the switch directly connected to the tester is always in a connected state, so that the tester is always in a normal working state. When the switching time is longer, even if the power-down protection equipment interface is in a blocking state for a long time, the switch interface directly connected with the tester is always in a communicating state, the tester interface cannot be closed, and the tester cannot be caused to send a package script to stop running, so that the normal work of the tester is ensured, and the switching time is detected.
Step 103, calculating the packet loss number according to the number of the test data packets sent to the switch and the number of the test data packets received from the switch.
In the switching process of the power failure protection device, the test data packet cannot be normally forwarded to the tester, and the test data packet is lost. In this step, the number of test packets received by the tester from the switch is subtracted from the number of test packets sent by the tester to the switch to obtain the number of lost packets.
In an example, before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received from the switch, the method further includes: when the protected device is converted from the power-on state to the power-off state, continuously receiving a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-down protection device switched from the off state to the working state; when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched; the switching time is used for indicating the switching duration of switching the power failure protection device from the off state to the working state when the protected device is switched from the power-on state to the power-off state.
In this example, the protected device is switched from a plugged-in state to a powered-down state, and the tester detects the start-up switching time of the powered-down protection device. When the tester starts to detect, the protected equipment works normally, the power failure protection equipment is closed, and the sending rate and the receiving rate of the test data packet are consistent; when the protected equipment is powered off and the power failure protection equipment is in a starting switching state, the sending rate of the test data packet is greater than the receiving rate; when the protected device is powered off and the power fail safeguard device is started successfully and normally, the sending rate and the receiving rate of the test data packet are consistent again, and the power fail safeguard device can be confirmed to complete starting switching at the moment.
In another example, before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received from the switch, the method further includes: when the protected device is converted from a power-off state to a power-on state, continuing to receive a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-off protection device switched from a working state to a closed state; when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched; the switching time is used for indicating the switching duration of switching the power failure protection device from a working state to a closing state when the protected device is switched from a power failure state to a power plugging state.
In this example, the protected device is switched from a power-down state to a power-on state and the tester detects the off-switch time of the power-down protection device. When the tester starts to detect, the protected equipment is in a closed state and the power failure protection equipment is in a working state, and the sending rate and the receiving rate of the test data packet are consistent; when the protected equipment is plugged and the power failure protection equipment is in a switching-off state, the sending rate of the test data packet is greater than the receiving rate; when the protected device is plugged in and the power down protection device is successfully closed, the sending rate and the receiving rate of the test data packet are consistent again, and the power down protection device can be confirmed to complete closing switching.
And 104, determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to the switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched.
And dividing the packet loss quantity by the packet sending rate of the tester for stably sending the test data packet to obtain the time of losing the data packet. When the power failure protection device is in a switching state (a switching starting state or a switching closing state), the test data packet is lost, so that the time for losing the test data packet is consistent with the switching time of the power failure protection device, and the switching time is obtained by utilizing the packet loss time.
In an example, after determining the switching time of the power down protection device according to the packet sending rate and the packet loss number of the test data packet sent by the tester to the switch, the method further includes: and clearing all test data used for the switching time detection. For example, the test data may include, but is not limited to: the method comprises the following steps of starting switching time of the power failure protection device, closing switching time of the power failure protection device, total quantity of sending test data packets, total quantity of receiving test data packets or rate of sending data packets and the like. Because, after the switching time of the power down protection device is detected, a detection process is already completed. The relevant test data should be cleared at this time to facilitate the next test.
The method shown in fig. 1 may be used to detect a switching duration from an off state to an on state of the power down protection device when the network security device is powered off from power on, or may be used to detect a switching duration from an on state to an off state of the power down protection device when the network security device is powered off from power off to power on.
On one hand, the switching time detection method of the power failure protection equipment has high speed and can ensure the test accuracy by still using the tester to send the test data packet; on the other hand, the switch is connected between the power-down protection device and the tester, and in the switching process of the power-down protection device, the interface on the switch directly connected with the tester can be always in a connection state, so that the tester is always in a normal working state, and the switching time of the power-down protection device during any switching time can be accurately detected.
Fig. 2 illustrates, this specification provides a device for detecting switching time of power down protection equipment, where the device is applied to a tester, the tester is connected to a switch, and the device includes:
a sending module 201, configured to send a test data packet to the switch, where the switch is configured to send the test data packet to a power-down protection device, and the power-down protection device is configured to perform power-down protection on a connected protected device;
a receiving module 202, configured to receive a test data packet returned by the switch, where the switch is configured to receive the test data packet returned by the power failure protection device;
a calculating module 203, configured to calculate a packet loss amount according to the number of test packets sent to the switch and the number of test packets received from the switch;
a determining module 204, configured to determine a switching time of the power down protection device according to a packet sending rate and the packet loss number of the test data packet sent by the tester to a switch, where the switching time is used to indicate a state switching duration corresponding to the power down protection device when the working state of the protected device is switched.
Optionally, the calculating module 203 is configured to, before calculating the number of packet losses according to the number of test packets sent to the switch and the number of test packets received from the switch, further include:
when the protected device is converted from the power-on state to the power-off state, continuously receiving a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-down protection device switched from the off state to the working state; when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched; the switching time is used for indicating the switching duration of switching the power failure protection device from the off state to the working state when the protected device is switched from the power-on state to the power-off state.
Optionally, the calculating module 203 is configured to, before calculating the number of packet losses according to the number of test packets sent to the switch and the number of test packets received from the switch, further include:
when the protected device is converted from a power-off state to a power-on state, continuing to receive a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-off protection device switched from a working state to a closed state; when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched; the switching time is used for indicating the switching duration of switching the power failure protection device from a working state to a closing state when the protected device is switched from a power failure state to a power plugging state.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of at least one embodiment of the present specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The present specification further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for detecting the switching time of the power down protection device according to any embodiment of the present specification.
Fig. 3 shows that this specification provides a system for detecting the switching time of the power down protection device, and the system may execute the method for detecting the switching time of the power down protection device according to any embodiment of this specification. The system can comprise a tester 301 and a switch 302, wherein the tester 301 is directly connected with the switch 302; the switch 302 is used for connecting with a power down protection device 303; the power down protection device 303 is used for connecting with a protected device 304;
the tester 301 is configured to send a test data packet to the switch 302; receiving a test data packet returned by the switch 302; calculating the packet loss number according to the number of the test data packets sent to the switch 302 and the number of the test data packets returned by the switch 302; determining the switching time of the power down protection device 303 according to the packet sending rate and the packet loss number of the test data packet sent by the tester 301 to the switch 302, where the switching time is used to indicate a state switching duration corresponding to the power down protection device 303 when the working state of the protected device 304 is switched;
the switch 302 is configured to receive a test data packet sent by the tester 301; sending the test data packet sent by the tester 301 to the power down protection device 303; receiving a test data packet returned by the power failure protection device 303; sending the test data packet returned by the power down protection device 303 to the tester 301; the power down protection device 303 is used to power down protect a connected protected device 304.
Illustratively, the tester 301 is connected to the first interface and the fourth interface of the switch 302, the second interface and the third interface of the switch 302 are connected to the power down protection device 303, and the power down protection device 303 is connected to the protected device 304. In the system for detecting the switching time of the power down protection device, a tester 301 is directly connected with a first interface and a fourth interface of a switch 302. When the power down protection device 303 is switched, even if the interface of the power down protection device 303 is in a blocking state for a long time, the first interface and the fourth interface of the switch 302 directly connected to the tester 301 are always in a connection state, so that the interface of the tester 301 is not closed, and the normal operation of the package sending script of the tester 301 is ensured, so that the tester 301 can normally work and accurately detect the switching time of the power down protection device 303.
Optionally, the switch 302 includes:
a first interface, configured to receive a test data packet sent by the tester 301;
a second interface, configured to send a test data packet sent by the tester 301 to the power down protection device 303; the first interface and the second interface are both in a preset first virtual local area network VLAN 1;
a third interface, configured to receive a test data packet returned by the power down protection device 303;
a fourth interface, configured to send the test data packet returned by the power down protection device 303 to the tester 301; the third interface and the fourth interface are both within a preset second virtual local area network VLAN 2.
By setting the first virtual local area network VLAN1 in the switch 302, the first interface and the second interface of the switch 302 are fixedly connected, so that the first interface of the switch 302 directly forwards a test data packet sent by the tester 301 through the second interface of the switch 302 after receiving the test data packet; by setting the second virtual local area network VLAN2 in the switch 302, the third interface and the fourth interface of the switch 302 are fixedly connected, so that the third interface of the switch 302 directly forwards the test data packet through the fourth interface of the switch 302 after receiving the test data packet returned by the power down protection device 303.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (11)

1. A method for detecting switching time of power failure protection equipment is characterized in that the method is executed by a tester, the tester is connected with a switch, and the method comprises the following steps:
sending a test data packet to the switch, wherein the switch is used for sending the test data packet to power-down protection equipment, and the power-down protection equipment is used for performing power-down protection on connected protected equipment;
receiving a test data packet returned by the switch, wherein the switch is used for receiving the test data packet returned by the power failure protection equipment;
calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch;
determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to a switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched;
and the interface on the switch directly connected with the tester is always in a connected state.
2. The method of claim 1, wherein sending test packets to the switch comprises:
and sending a Transmission Control Protocol (TCP) layer data packet to the switch.
3. The method of claim 1, wherein before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received back from the switch, the method further comprises:
when the protected device is converted from the power-on state to the power-off state, continuously receiving a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-down protection device switched from the off state to the working state;
when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched;
the switching time is used for indicating the switching duration of switching the power failure protection device from the off state to the working state when the protected device is switched from the power-on state to the power-off state.
4. The method of claim 1, wherein before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received back from the switch, the method further comprises:
when the protected device is converted from a power-off state to a power-on state, continuing to receive a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-off protection device switched from a working state to a closed state;
when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched;
the switching time is used for indicating the switching duration of switching the power failure protection device from a working state to a closing state when the protected device is switched from a power failure state to a power plugging state.
5. The method according to claim 1, wherein after determining the switching time of the power down protection device according to the packet sending rate and the packet loss number of the test data packet sent by the tester to the switch, the method further comprises:
and clearing all test data used for the switching time detection.
6. The utility model provides a power down protection equipment switching time detection device which characterized in that, the device is applied to the tester, the switch is connected to the tester, the device includes:
the system comprises a sending module, a power failure protection device and a receiving module, wherein the sending module is used for sending a test data packet to the switch, the switch is used for sending the test data packet to the power failure protection device, and the power failure protection device is used for performing power failure protection on connected protected equipment;
the receiving module is used for receiving the test data packet returned by the switch, and the switch is used for receiving the test data packet returned by the power failure protection equipment;
the calculation module is used for calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch;
a determining module, configured to determine a switching time of the power down protection device according to a packet sending rate and the packet loss number of the test data packet sent by the tester to a switch, where the switching time is used to indicate a state switching duration corresponding to the power down protection device when the working state of the protected device is switched;
and the interface on the switch directly connected with the tester is always in a connected state.
7. The apparatus of claim 6, wherein the calculating module, before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received from the switch, further comprises:
when the protected device is converted from the power-on state to the power-off state, continuously receiving a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-down protection device switched from the off state to the working state;
when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched;
the switching time is used for indicating the switching duration of switching the power failure protection device from the off state to the working state when the protected device is switched from the power-on state to the power-off state.
8. The apparatus of claim 6, wherein the calculating module, before calculating the number of dropped packets according to the number of test packets sent to the switch and the number of test packets received from the switch, further comprises:
when the protected device is converted from a power-off state to a power-on state, continuing to receive a test data packet returned by the switch, wherein the test data packet is returned to the switch through the power-off protection device switched from a working state to a closed state;
when detecting that the current packet receiving rate is consistent with the packet sending rate, determining that the power failure protection equipment is switched;
the switching time is used for indicating the switching duration of switching the power failure protection device from a working state to a closing state when the protected device is switched from a power failure state to a power plugging state.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 5 when executing the program.
10. A system for detecting switching time of a power down protection device, the system comprising: the system comprises a tester and a switch, wherein the tester is directly connected with the switch; the switch is used for being connected with the power failure protection equipment; the power failure protection equipment is used for being connected with protected equipment;
the tester is used for sending a test data packet to the switch; receiving a test data packet returned by the switch; calculating the packet loss quantity according to the quantity of the test data packets sent to the switch and the quantity of the test data packets returned by the switch; determining the switching time of the power-down protection equipment according to the packet sending rate and the packet loss quantity of the test data packets sent to a switch by the tester, wherein the switching time is used for indicating the state switching duration corresponding to the power-down protection equipment when the working state of the protected equipment is switched;
the switch is used for receiving the test data packet sent by the tester; sending a test data packet sent by the tester to the power failure protection equipment; receiving a test data packet returned by the power failure protection equipment; sending a test data packet returned by the power failure protection equipment to the tester; the power-down protection equipment is used for performing power-down protection on connected protected equipment;
and the interface on the switch directly connected with the tester is always in a connected state.
11. The system of claim 10, wherein the switch comprises:
the first interface is used for receiving a test data packet sent by the tester;
the second interface is used for sending the test data packet sent by the tester to the power failure protection equipment; the first interface and the second interface are both in a preset first virtual local area network;
the third interface is used for receiving a test data packet returned by the power failure protection equipment;
the fourth interface is used for sending the test data packet returned by the power failure protection equipment to the tester; and the third interface and the fourth interface are both in a preset second virtual local area network.
CN201911042774.XA 2019-10-30 2019-10-30 Power failure protection equipment switching time detection method, device, equipment and system Active CN110708218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911042774.XA CN110708218B (en) 2019-10-30 2019-10-30 Power failure protection equipment switching time detection method, device, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911042774.XA CN110708218B (en) 2019-10-30 2019-10-30 Power failure protection equipment switching time detection method, device, equipment and system

Publications (2)

Publication Number Publication Date
CN110708218A CN110708218A (en) 2020-01-17
CN110708218B true CN110708218B (en) 2021-11-02

Family

ID=69202796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911042774.XA Active CN110708218B (en) 2019-10-30 2019-10-30 Power failure protection equipment switching time detection method, device, equipment and system

Country Status (1)

Country Link
CN (1) CN110708218B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102235A (en) * 2007-07-26 2008-01-09 北京交通大学 A method and device for measuring switching time
CN102055597A (en) * 2009-11-03 2011-05-11 中兴通讯股份有限公司 Stability test platform and method
CN102316038A (en) * 2011-09-09 2012-01-11 福建星网锐捷网络有限公司 Method for determining hot backup main /standby switching time, apparatus and system thereof
CN102684946A (en) * 2012-05-25 2012-09-19 中国舰船研究设计中心 Dual-network-interface-card switching performance testing method for information integration system
CN105337815A (en) * 2015-12-15 2016-02-17 北京奇虎科技有限公司 Testing method and device for master-slave switching time
CN108777600A (en) * 2018-05-21 2018-11-09 Oppo广东移动通信有限公司 A kind of wireless test system and test method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102235A (en) * 2007-07-26 2008-01-09 北京交通大学 A method and device for measuring switching time
CN102055597A (en) * 2009-11-03 2011-05-11 中兴通讯股份有限公司 Stability test platform and method
CN102316038A (en) * 2011-09-09 2012-01-11 福建星网锐捷网络有限公司 Method for determining hot backup main /standby switching time, apparatus and system thereof
CN102684946A (en) * 2012-05-25 2012-09-19 中国舰船研究设计中心 Dual-network-interface-card switching performance testing method for information integration system
CN105337815A (en) * 2015-12-15 2016-02-17 北京奇虎科技有限公司 Testing method and device for master-slave switching time
CN108777600A (en) * 2018-05-21 2018-11-09 Oppo广东移动通信有限公司 A kind of wireless test system and test method

Also Published As

Publication number Publication date
CN110708218A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN104796298B (en) A kind of method and device of SDN network accident analysis
US10365960B2 (en) Providing a watchdog timer to enable collection of crash data
CN109714221B (en) Method, device and system for determining network data packet
CN104731701A (en) Test system and method and device for executing test tasks
CN109733238B (en) Fault detection method, device, storage medium and processor
CN108052094A (en) A kind of extension card identification method, device and frequency converter
CN104866418A (en) Automatic testing method and system
CN106100939A (en) The network equipment starts time test method and test console
CN104734904A (en) Automatic detection method and system of by-pass equipment
CN110708218B (en) Power failure protection equipment switching time detection method, device, equipment and system
CN105528261A (en) Method and system for intelligently outputting debugging information for embedded device
CN103763137A (en) Device configuration connection protective method, system and device
CN103983955B (en) Power monitoring method in receiving and transmitting module test
CN106973398B (en) Method and system for testing wireless connection performance of wireless module
CN110008165B (en) NTB link management method, system and related device
CN105263179B (en) Electric quantity controlling method and user terminal when a kind of file transmits
EP4246913A2 (en) Method, device and computer-readable medium for measuring traffic hit time during path switch
CN105530110A (en) Network failure detection method and related network elements
CN103441894A (en) Method and system for L2TP concurrent connection performance test
CN108234156B (en) Method and equipment for transmitting message
US7788546B2 (en) Method and system for identifying communication errors resulting from reset skew
CN109446002A (en) A kind of jig plate, system and method for server crawl SATA hard disc
CN105183656B (en) Method, system and device for detecting package stop failure of application program
CN112787889A (en) Switch cold start test method, system and medium
CN108664361A (en) The nontransparent channel restorative procedures of PCIE and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant