CN112637018B - Network equipment testing method and device - Google Patents

Network equipment testing method and device Download PDF

Info

Publication number
CN112637018B
CN112637018B CN202011592359.4A CN202011592359A CN112637018B CN 112637018 B CN112637018 B CN 112637018B CN 202011592359 A CN202011592359 A CN 202011592359A CN 112637018 B CN112637018 B CN 112637018B
Authority
CN
China
Prior art keywords
test
port
test result
optical power
flow
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
CN202011592359.4A
Other languages
Chinese (zh)
Other versions
CN112637018A (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.)
Beijing Teletest Technology Co ltd
Original Assignee
Beijing Teletest Technology 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 Beijing Teletest Technology Co ltd filed Critical Beijing Teletest Technology Co ltd
Priority to CN202011592359.4A priority Critical patent/CN112637018B/en
Publication of CN112637018A publication Critical patent/CN112637018A/en
Application granted granted Critical
Publication of CN112637018B publication Critical patent/CN112637018B/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/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
    • H04B10/079Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using measurements of the data signal
    • H04B10/0795Performance monitoring; Measurement of transmission parameters
    • H04B10/07955Monitoring or measuring power
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/065Generation of reports related to network devices
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a network equipment testing method and a device, wherein the method comprises the following steps: sending a first test instruction for representing flow test so that a first port of an external flow tester sends flow test information to a second port of the network equipment according to the first test instruction; receiving a flow test result from a third port of the flow tester; further comprising: after receiving indication information from an external optical line terminal, sending a second test instruction for representing optical power test, so that the first port sends optical power test information to the second port according to the second test instruction; receiving an optical power test result from the first port; and generating a test report of the network equipment according to the flow test result, the optical power test result and the preset range. The scheme can improve the efficiency of testing the network equipment.

Description

Network equipment testing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for testing network devices.
Background
Network devices such as switches, routers, and firewalls often need to be tested to verify that a given function can be achieved. At present, when various tests are performed on network equipment, the network equipment and instrument equipment need to be connected one by one for testing, so that when the number of the network equipment to be tested is large, the testing process is complicated, and the testing efficiency of the network equipment is low.
Therefore, in view of the above disadvantages, it is desirable to provide a network device testing scheme to improve the efficiency of testing the network device.
Disclosure of Invention
The invention provides a network equipment testing method and device, which can improve the efficiency of testing network equipment.
In a first aspect, an embodiment of the present invention provides a network device testing method, including:
sending a first test instruction for representing a flow test so that a first port of an external flow tester sends flow test information to a second port of network equipment according to the first test instruction, wherein the first port is used for representing any one port in the flow tester, and the first port is connected with the second port;
receiving a flow test result from a third port of the flow tester, wherein the flow test result is returned by a fourth port of the network device according to the flow test information;
further comprising:
after receiving indication information from an external optical line terminal, sending a second test instruction for representing an optical power test, so that the first port sends optical power test information to the second port according to the second test instruction, wherein the indication information is generated after the optical line terminal registers the network equipment through a telecommunication network protocol;
receiving an optical power test result from the first port, wherein the optical power test result is returned by the second port according to the optical power test information;
and generating a test report of the network equipment according to the flow test result, the optical power test result and a preset range.
In one possible design of the system, the system may be,
before the generating a test report of the network device according to the traffic test result, the optical power test result, and a preset range, the method further includes:
sending a third test instruction for representing a physical property test, so that the first port sends physical property test information to the second port according to the third test instruction, wherein the physical property test comprises at least one of a current test, a voltage test and a temperature test;
receiving a physical attribute test result from the first port, wherein the physical attribute test result is returned by the second port according to the physical attribute test information;
the generating a test report of the network device includes:
and generating a test report of the network equipment according to the flow test result, the optical power test result, the physical attribute test result and the preset range.
In a possible design, the generating a test report of the network device according to the traffic test result, the optical power test result, the physical attribute test result, and the preset range includes:
reading the flow test result, the optical power test result and the physical attribute test result by using a regular expression, and generating a test result for representing the network equipment by using the following first type;
the first type includes:
Figure GDA0003674498130000031
wherein R is used for characterizing the test result of the network device, S k For characterizing the kth test instruction, t for characterizing the number of said test instructions, Q ij The flow meter is used for characterizing the jth test result from the ith port of the flow meter, m is used for characterizing the number of ports for receiving the test result, and n is used for characterizing the number of the test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
In one possible design, when the test results include flow test results,
the generating a test report of the network device according to the test result of the network device and the preset range includes:
acquiring a time difference value in the flow test result, wherein the time difference value is used for representing a difference value between a time point when the third port receives the flow test result and a time point when the first port sends the flow test information;
and generating a test report for representing the flow test result according to the time difference value and the preset range.
In one possible design, when the test results include optical power test results,
the generating a test report of the network device according to the test result of the network device and the preset range includes:
calculating the optical power test result by the following second formula to obtain an optical power loss value;
the second equation includes:
Figure GDA0003674498130000041
wherein (delta P) i Is used for representing the optical power loss value corresponding to the ith optical power test result, A i An input value for characterizing the optical power corresponding to the ith optical power test result, B i The output value is used for representing the optical power corresponding to the ith optical power test result;
and generating a test report for representing the optical power test result according to the optical power loss value and the preset range.
In a second aspect, an embodiment of the present invention further provides a network device testing apparatus, including: the device comprises a first sending module, a receiving module, a second sending module and a generating module;
the first sending module is configured to send a first test instruction for characterizing a flow test, so that a first port of an external flow tester sends flow test information to a second port of a network device according to the first test instruction, where the first port is used for characterizing any one of the ports in the flow tester, and the first port is connected to the second port;
the receiving module is configured to receive a flow test result from a third port of the flow tester, where the flow test result is returned by a fourth port of the network device according to the flow test information;
the second sending module is configured to send a second test instruction for characterizing an optical power test after receiving indication information from an external optical line terminal, so that the first port sends the optical power test information to the second port according to the second test instruction, where the indication information is generated after the optical line terminal registers the network device through a telecommunication network protocol;
the receiving module is further configured to receive an optical power test result from the first port, where the optical power test result is returned by the second port according to the optical power test information;
the generating module is configured to generate a test report of the network device according to the traffic test result, the optical power test result, and a preset range, which are received by the receiving module.
In one possible design, the network device testing apparatus further includes: a third sending module;
the third sending module is configured to send a third test instruction for characterizing a physical property test, so that the first port sends physical property test information to the second port according to the third test instruction, where the physical property test includes at least one of a current test, a voltage test, and a temperature test;
the receiving module is further configured to receive a physical attribute test result from the first port, where the physical attribute test result is returned by the second port according to the physical attribute test information;
the generating module is further configured to generate a test report of the network device according to the traffic test result, the optical power test result, the physical attribute test result, and the preset range.
In one possible design, the generating module is further configured to perform the following:
reading the flow test result, the optical power test result and the physical attribute test result by using a regular expression, and generating a test result for representing the network equipment by using the following first type;
the first type includes:
Figure GDA0003674498130000061
wherein R is used for characterizing the test result of the network device, S k For characterizing the kth test instruction, t for characterizing the number of said test instructions, Q ij The flow tester is used for characterizing the jth test result from the ith port of the flow tester, m is used for characterizing the number of ports receiving the test result, and n is used for characterizing the number of the test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
In a third aspect, the present invention further provides an intelligent device, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to execute the network device testing method provided by the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, the present invention also provides a computer-readable medium,
the computer readable medium has stored thereon computer instructions, which, when executed by a processor, cause the processor to perform the network device testing method provided by the first aspect or any of the possible implementations of the first aspect.
According to the technical scheme, the external flow tester performs the flow test on the network equipment according to the first test instruction by sending the first test instruction, and performs the optical power test on the network equipment according to the second test instruction by sending the second test instruction after receiving the indication information from the external optical line terminal. And generating a test report of the network equipment based on the received flow test result, the received optical power test result and a preset range. Therefore, the flow test and the optical power test of the network equipment can be realized by using the flow tester, the flow and the optical power of the network equipment are not required to be tested by using an additional test instrument, the test procedure is simple, and the test efficiency of the network equipment is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a network device testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for testing network devices according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a device in which a network device testing apparatus according to an embodiment of the present invention is located;
fig. 4 is a schematic diagram of a network device testing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a network device testing method, which may include the following steps:
step 101: sending a first test instruction for representing a flow test so that a first port of an external flow tester sends flow test information to a second port of the network equipment according to the first test instruction, wherein the first port is used for representing any one port in the flow tester, and the first port is connected with the second port;
step 102: receiving a flow test result from a third port of the flow tester, wherein the flow test result is returned by a fourth port of the network device according to the flow test information;
step 103: after receiving indication information from an external optical line terminal, sending a second test instruction for representing an optical power test, so that the first port sends the optical power test information to the second port according to the second test instruction, wherein the indication information is generated after the optical line terminal registers network equipment through a telecommunication network protocol;
step 104: receiving an optical power test result from the first port, wherein the optical power test result is returned by the second port according to the optical power test information;
step 105: and generating a test report of the network equipment according to the flow test result, the optical power test result and the preset range.
In the embodiment of the present invention, an external traffic tester performs traffic testing on a network device according to a first test instruction by sending the first test instruction, and performs optical power testing on the network device according to a second test instruction by sending the second test instruction after receiving indication information from an external optical line terminal. And generating a test report of the network equipment based on the received flow test result, the received optical power test result and a preset range. Therefore, the flow test and the optical power test of the network equipment can be realized by using the flow tester, the flow and the optical power of the network equipment are not required to be tested by using an additional test instrument, the test procedure is simple, and the test efficiency of the network equipment is improved.
It can be understood that there is no sequence between sending the first test instruction to perform the traffic test and sending the second test instruction to perform the optical power test, that is, the traffic test may be performed first and then the optical power test may be performed according to the actual requirement, and of course, the optical power test may be performed first and then the traffic test may be performed.
In an embodiment of the present invention, based on the network device testing method shown in fig. 1, before step 105, the method may further include the following steps:
sending a third test instruction for representing a physical property test, so that the first port sends physical property test information to the second port according to the third test instruction, wherein the physical property test comprises at least one of a current test, a voltage test and a temperature test;
receiving a physical attribute test result from the first port, wherein the physical attribute test result is returned by the second port according to the physical attribute test information;
step 105 generates a test report for the network device, including:
and generating a test report of the network equipment according to the flow test result, the optical power test result, the physical attribute test result and the preset range.
In the embodiment of the present invention, by sending the third test instruction, the external traffic tester performs the physical attribute test on the network device according to the third test instruction, and includes the test report of the physical attribute test in the test report of the network device based on the preset range and the received physical attribute test result. Therefore, the physical attributes of the network equipment can be tested by using the flow tester, the current, the voltage and the temperature of the network equipment do not need to be tested by means of additional testing instruments, namely the flow tester can be used for testing the flow, the optical power and the physical attributes of the network equipment in parallel, the testing process is simple, the testing efficiency of the network equipment is further improved, and the cost of testing the network equipment by a user can be greatly reduced by supporting the parallel testing.
It should be noted that the physical property test includes one or more of current, voltage, temperature and the like, and the multiple physical property tests can be performed simultaneously, and it is not necessary to separately test the same network device by using a current test device, a voltage test device and a temperature test device, so that the parallel test of the physical property of the network device by using the network tester is realized, and the test efficiency of the network device is further improved.
It can be understood that the traffic test result, the optical power test result, and the physical property test result of the network device are independent from each other, so that the traffic test, the optical power test, and the physical property test can be performed on the network device by using the traffic tester. For example, the traffic tester may be used to perform a traffic test on the network device, or the traffic tester may be used to perform an optical power test on the network device. And, the flow test result can not cause the influence to the optical power test result. Therefore, the optical power test and/or the physical property test can be seamlessly connected before and after the flow test according to the requirement, so that the test efficiency of the network equipment is further improved.
It should be noted that, by using the multi-port characteristic of the flow tester, parallel testing of one network device can be realized, and parallel testing of multiple network devices can also be realized, thereby reducing hardware cost and further improving efficiency of testing the network devices.
In an embodiment of the present invention, based on the network device testing method shown in fig. 1, step 105 may further include the following steps:
reading a flow test result, an optical power test result and a physical attribute test result by using a regular expression, and generating a test result for representing network equipment by using the following first type;
the first type includes:
Figure GDA0003674498130000111
wherein R is used for representing the test result of the network equipment, S k For characterizing the kth test instruction, t for characterizing the number of test instructions, Q ij For characterizing a jth test result from an ith port of the flow tester, m for characterizing a number of ports receiving the test result, and n for characterizing a number of test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
In the embodiment of the invention, the regular expression and the first type are used for obtaining the test result of the network equipment aiming at the flow test result, the optical power test result and the physical attribute test result, and then the test report of the network equipment is generated according to the preset range. Therefore, corresponding test reports can be obtained based on a plurality of test results obtained after the network equipment is tested in parallel, a user does not need to record each test result respectively, and each test result does not need to be analyzed one by one, redundant operation is avoided, and the efficiency of testing the network equipment is improved.
In an embodiment of the present invention, based on the network device testing method shown in fig. 1, when the test result includes a traffic test result, the method may further include generating a test report of the network device according to the test result of the network device and a preset range, and specifically includes the following steps:
acquiring a time difference value in the flow test result, wherein the time difference value is used for representing a difference value between a time point of receiving the flow test result by the third port and a time point of sending flow test information by the first port;
and generating a test report for representing the flow test result according to the time difference value and the preset range.
In the embodiment of the invention, for each flow test result, a time difference value in the flow test result is read, whether the time difference value is within a preset range is judged, and a test report of the flow test result is generated based on the judgment result. Therefore, the corresponding test report is generated according to each received flow test result, a user does not need to analyze the flow test results respectively, the efficiency of testing the network equipment is improved, and meanwhile the condition of high error rate caused by manual data analysis when the flow test results are more is avoided, so that the accuracy of the result of testing the network equipment is improved.
It should be understood that, since the test of the network device may include a flow test, an optical power test, a physical property test (a temperature test, a current test, and a voltage test), the prediction range may also include various parameter value ranges during the flow test, an input value range of the optical power, an output value range of the optical power, a loss value range of the optical power, a voltage range, a current range, a temperature range, and the like.
In an embodiment of the present invention, based on the network device testing method shown in fig. 1, when the test result includes an optical power test result, the method may further include generating a test report of the network device according to the test result of the network device and a preset range, and specifically includes the following steps:
calculating an optical power test result through a second formula to obtain an optical power loss value;
the second equation includes:
Figure GDA0003674498130000131
wherein (delta P) i Is used for representing the optical power loss value, A, corresponding to the ith optical power test result i Input value for characterizing the optical power corresponding to the ith optical power test result, B i The output value is used for representing the optical power corresponding to the ith optical power test result;
and generating a test report for representing the optical power test result according to the optical power loss value and the preset range.
In the embodiment of the invention, for each optical power test result, a corresponding optical power loss value is obtained according to the second equation, whether the optical power loss value is within a preset range is judged, and a test report for representing the optical power test result is generated based on the judgment result. Therefore, corresponding test reports are generated according to each received optical power test result, a user does not need to analyze the optical power test results respectively, the efficiency of testing the network equipment is improved, meanwhile, the situation that the error rate is high due to manual data analysis when the optical power test results are more is avoided, and the reliability of the result of testing the network equipment is improved.
In order to make the network device testing method provided by the embodiment of the present invention clearer, the following describes the network device testing method provided by the embodiment of the present invention in further detail with reference to specific examples, as shown in fig. 4, the method may include the following steps:
step 201: and sending a first test instruction for representing the flow test so that a first port of an external flow tester sends the flow test information to a second port of the network equipment according to the first test instruction.
In this step, a plurality of ports in the network device are respectively connected with a plurality of ports of the flow tester in a one-to-one correspondence manner, and the plurality of ports in the network device are sequentially connected end to end. The first port is used for representing any port in the flow tester, and the second port is connected with the first port.
For example, the network device has three ports, which are a port a, a port B, and a port C, respectively, (where the port a and the port B are considered to be connected and the port B and the port C are considered to be connected and the port C and the port a are considered to be connected inside the network device.) the three ports of the network device are connected with three ports (a port 1, a port 2, and a port 3, respectively) of the flow tester in a one-to-one correspondence, that is, the port a is connected with the port 1, the port B is connected with the port 2, and the port C is connected with the port 3. The first port may be any one of port 1, port 2 and port 3. That is, when the first port is port 1, port a is the second port; when the first port is port 2, port B is a second port; when the first port is port 3, port C is the second port.
For example, when the first port is port 1, a first test instruction for characterizing the traffic test is sent, so that port 1 sends traffic test information to port a according to the first test instruction.
Step 202: and receiving a flow test result from the third port of the flow tester, wherein the flow test result is returned by the fourth port of the network equipment according to the flow test information.
For example, in the previous example, the third port is port 2, and the fourth port is port B. The port a (second port) transmits the traffic test information to the port 2 (third port) through the port B (fourth port), and the port 2 (third port) takes the received traffic test information as a traffic test result.
In an embodiment of the present invention, the traffic test information sent by the port 1 (the first port) may also be sent to the port 1 (the first port) through the port a (the second port), that is, the traffic test result may also be returned after the traffic test information sent by the port 1 (the first port) passes through the port a (the second port).
Step 203: and after receiving the indication information from the external optical line terminal, sending a second test instruction for representing the optical power test, so that the first port sends the optical power test information to the second port according to the second test instruction.
In this step, the network device may perform the optical power test only after the external optical path terminal is registered, and the indication information is generated after the optical line terminal registers the network device through the telecommunication network protocol.
Specifically, in the previous example, the second test command is sent, so that the port 1 sends the optical power test information to the port a according to the second test command.
Step 204: and receiving an optical power test result from the first port, wherein the optical power test result is returned by the second port according to the optical power test information.
Specifically, in the example described above, the port 1 (first port) uses the optical power information returned by the port a (second port) based on the received optical power test information as the optical power test result.
Step 205: and sending a third test instruction for representing the physical attribute test, so that the first port sends the physical attribute test information to the second port according to the third test instruction.
In this step, the physical property test includes one or more of a current test, a voltage test, and a temperature test.
Specifically, when the network device supports temperature, current, and voltage tests, a third test instruction is sent to cause port 1 to send physical property test information to port a according to the third test instruction.
Step 206: and receiving a physical attribute test result from the first port, wherein the physical attribute test result is returned by the second port according to the physical attribute test information.
In this step, the physical property test result includes one or more of a temperature test result, a current test result, and a voltage test result.
For example, when the physical property test information includes temperature test information, the physical property test result includes a temperature test result.
For another example, when the physical attribute test information includes temperature test information, current test information, and voltage test information, the physical attribute test result includes a temperature test result, a current test result, and a voltage test result.
Step 207: and generating test information of the network equipment according to the flow test result, the optical power test result and the physical attribute test result.
In this step, reading a traffic test result, an optical power test result, and a physical attribute test result by using a regular expression, and generating a test result for characterizing network equipment by using a first equation, where the first equation includes:
Figure GDA0003674498130000161
wherein R is used for representing the test result of the network equipment, S k For characterizing the kth test instruction, t for characterizing the number of test instructions, Q ij For characterizing the jth test result from the ith port of the flow tester, m for characterizing the number of ports receiving the test result, and n for characterizing the number of test results.
Step 208: and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
Specifically, in this step, when the test result includes the flow test result, a time difference value in the flow test result is obtained, whether the time difference value is within a preset flow parameter range is determined, and a test report for representing the flow test result is generated based on the determination result, where the time difference value is used to represent a difference value between a time point at which the third port receives the flow test result and a time point at which the first port sends the flow test information.
Specifically, in this step, when the test result includes the optical power test result, the optical power test result is calculated by a second equation below, so as to obtain an optical power loss value, determine whether the optical power loss value is within a preset optical power parameter range, and generate a test report for representing the optical power test result based on the determination result, where the second equation includes:
Figure GDA0003674498130000171
wherein (delta P) i Is used for representing the optical power loss value, A, corresponding to the ith optical power test result i Input value for characterizing the optical power corresponding to the ith optical power test result, B i And the output value is used for representing the optical power corresponding to the ith optical power test result.
Specifically, in this step, when the test result includes the temperature test result, it is determined whether a parameter in the temperature test result is within a preset temperature parameter range, and a test report for characterizing the temperature test result is generated based on the determination result; when the test result comprises a current test result, judging whether parameters in the current test result are within a preset current parameter range, and generating a test report for representing the current test result based on the judgment result; and when the test result comprises a voltage test result, judging whether the parameters in the voltage test result are within a preset voltage parameter range, and generating a test report for representing the voltage test result based on the judgment result.
As shown in fig. 3 and 4, an embodiment of the present invention provides a network device testing apparatus. The embodiment of the network device testing apparatus may be implemented by software, or may be implemented by hardware, or a combination of hardware and software. From a hardware level, as shown in fig. 3, a hardware structure diagram of a device in which a network device testing apparatus provided in the embodiment of the present invention is located is shown, where in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3, the device in which the apparatus is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing a packet, and the like. Taking a software implementation as an example, as shown in fig. 4, as a logical apparatus, the apparatus is formed by reading a corresponding computer program instruction in a non-volatile memory into a memory by a CPU of a device in which the apparatus is located and running the computer program instruction.
As shown in fig. 4, an embodiment of the present invention provides a network device testing apparatus, including: a first sending module 401, a receiving module 402, a second sending module 403 and a generating module 404;
a first sending module 401, configured to send a first test instruction for characterizing a flow test, so that a first port of an external flow tester sends flow test information to a second port of a network device according to the first test instruction, where the first port is used for characterizing any port in the flow tester, and the first port is connected to the second port;
a receiving module 402, configured to receive a flow test result from a third port of the flow tester, where the flow test result is returned by a fourth port of the network device according to the flow test information;
a second sending module 403, configured to send a second test instruction for characterizing an optical power test after receiving indication information from an external optical line terminal, so that the first port sends the optical power test information to the second port according to the second test instruction, where the indication information is generated after the optical line terminal registers the network device through a telecommunication network protocol;
a receiving module 402, configured to receive an optical power test result from the first port, where the optical power test result is returned by the second port according to the optical power test information;
a generating module 404, configured to generate a test report of the network device according to the traffic test result and the optical power test result received by the receiving module 402 and a preset range.
In an embodiment of the present invention, based on the network device testing apparatus shown in fig. 4, the network device testing apparatus further includes: a third sending module;
the third sending module is used for sending a third test instruction for representing the physical property test so that the first port sends the physical property test information to the second port according to the third test instruction, wherein the physical property test comprises at least one of a current test, a voltage test and a temperature test;
a receiving module 402, configured to receive a physical attribute test result from the first port, where the physical attribute test result is returned by the second port according to the physical attribute test information;
the generating module 404 is further configured to generate a test report of the network device according to the traffic test result, the optical power test result, the physical attribute test result, and the preset range received by the receiving module 402.
In an embodiment of the present invention, the generating module 404 is further configured to perform the following processing:
reading the traffic test result, the optical power test result and the physical attribute test result received by the receiving module 402 by using a regular expression, and generating a test result for representing the network equipment by using the following first type;
the first type includes:
Figure GDA0003674498130000201
wherein R is used for representing the test result of the network equipment, S k For characterizing the kth test instruction, t for characterizing the number of test instructions, Q ij For characterizing a jth test result from an ith port of the flow tester, m for characterizing a number of ports receiving the test result, and n for characterizing a number of test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
In an embodiment of the present invention, the generating module 404 is specifically configured to, when the test result includes a traffic test result, perform the following processing:
acquiring a time difference value in the flow test result, wherein the time difference value is used for representing a difference value between a time point of receiving the flow test result by the third port and a time point of sending flow test information by the first port;
and generating a test report for representing the flow test result according to the time difference value and the preset range.
In an embodiment of the present invention, the generating module 404 is specifically configured to, when the test result includes an optical power test result, perform the following processing:
calculating an optical power test result through a second formula to obtain an optical power loss value;
the second equation includes:
Figure GDA0003674498130000202
wherein (delta P) i Is used for representing the optical power loss value, A, corresponding to the ith optical power test result i Input value for characterizing the optical power corresponding to the ith optical power test result, B i The output value is used for representing the optical power corresponding to the ith optical power test result;
and generating a test report for representing the optical power test result according to the optical power loss value and the preset range.
It should be noted that the schematic structure of the embodiment of the present invention does not specifically limit the network device testing apparatus. In other embodiments of the invention, the network device testing apparatus may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the content of information interaction, execution process, and the like among the modules in the device is based on the same concept as the method embodiment of the present invention, specific content can be referred to the description in the method embodiment of the present invention, and is not described herein again.
An embodiment of the present invention further provides an intelligent device, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the network device testing method in any of the embodiments.
An embodiment of the present invention further provides a computer-readable medium, where the computer-readable medium stores computer instructions, and when the computer instructions are executed by a processor, the processor is caused to execute the network device testing method described in any of the above embodiments.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware module may be implemented mechanically or electrically. For example, a hardware module may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. A hardware module may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (8)

1. The network equipment testing method is characterized in that a first testing instruction used for representing flow testing is sent, so that a first port of an external flow tester sends flow testing information to a second port of network equipment according to the first testing instruction, wherein the first port is used for representing any one port in the flow tester, and the first port is connected with the second port;
receiving a flow test result from a third port of the flow tester, wherein the flow test result is returned by a fourth port of the network device according to the flow test information;
further comprising:
after receiving indication information from an external optical line terminal, sending a second test instruction for representing an optical power test, so that the first port sends optical power test information to the second port according to the second test instruction, wherein the indication information is generated after the optical line terminal registers the network equipment through a telecommunication network protocol;
receiving an optical power test result from the first port, wherein the optical power test result is returned by the second port according to the optical power test information;
generating a test report of the network equipment according to the flow test result, the optical power test result and a preset range;
generating a test report of the network device according to the traffic test result, the optical power test result and a preset range, wherein the generating the test report of the network device comprises:
reading the traffic test result or the optical power test result by using a regular expression, and generating a test result for representing the network equipment by using the following first type;
the first type includes:
Figure FDA0003674498120000021
wherein R is used for characterizing the test result of the network device, S k For characterizing the kth test instruction, t for characterizing the number of said test instructions, Q ij For characterizing a jth test result from an ith port of the flow tester, m for characterizing a number of ports receiving the test result,n is used to characterize the number of test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
2. The method of claim 1,
before the generating a test report of the network device according to the traffic test result, the optical power test result, and a preset range, the method further includes:
sending a third test instruction for representing a physical property test, so that the first port sends physical property test information to the second port according to the third test instruction, wherein the physical property test comprises at least one of a current test, a voltage test and a temperature test;
receiving a physical attribute test result from the first port, wherein the physical attribute test result is returned by the second port according to the physical attribute test information;
the generating a test report of the network device includes:
and generating a test report of the network equipment according to the flow test result, the optical power test result, the physical attribute test result and the preset range.
3. The method of claim 1,
when the test results include a traffic test result,
the generating a test report of the network device according to the test result of the network device and the preset range includes:
acquiring a time difference value in the flow test result, wherein the time difference value is used for representing a difference value between a time point when the third port receives the flow test result and a time point when the first port sends the flow test information;
and generating a test report for representing the flow test result according to the time difference value and the preset range.
4. The method of claim 1,
when the test results include optical power test results,
the generating a test report of the network device according to the test result of the network device and the preset range includes:
calculating the optical power test result by the following second formula to obtain an optical power loss value;
the second equation includes:
Figure FDA0003674498120000031
wherein (delta P) i Is used for representing the optical power loss value corresponding to the ith optical power test result, A i An input value for characterizing the optical power corresponding to the ith optical power test result, B i The output value is used for representing the optical power corresponding to the ith optical power test result;
and generating a test report for representing the optical power test result according to the optical power loss value and the preset range.
5. Network equipment testing arrangement, its characterized in that includes: the device comprises a first sending module, a receiving module, a second sending module and a generating module;
the first sending module is configured to send a first test instruction for characterizing a flow test, so that a first port of an external flow tester sends flow test information to a second port of a network device according to the first test instruction, where the first port is used for characterizing any one of the ports in the flow tester, and the first port is connected to the second port;
the receiving module is configured to receive a flow test result from a third port of the flow tester, where the flow test result is returned by a fourth port of the network device according to the flow test information;
the second sending module is configured to send a second test instruction for characterizing an optical power test after receiving indication information from an external optical line terminal, so that the first port sends the optical power test information to the second port according to the second test instruction, where the indication information is generated after the optical line terminal registers the network device through a telecommunication network protocol;
the receiving module is further configured to receive an optical power test result from the first port, where the optical power test result is returned by the second port according to the optical power test information;
the generating module is configured to generate a test report of the network device according to the traffic test result, the optical power test result, and a preset range, which are received by the receiving module;
wherein the generating module is further configured to perform the following processing:
reading the traffic test result or the optical power test result by using a regular expression, and generating a test result for representing the network equipment by using the following first type;
the first type includes:
Figure FDA0003674498120000051
wherein R is used for characterizing the test result of the network device, S k For characterizing the kth test instruction, t for characterizing the number of said test instructions, Q ij The flow tester is used for characterizing the jth test result from the ith port of the flow tester, m is used for characterizing the number of ports receiving the test result, and n is used for characterizing the number of the test results;
and generating a test report of the network equipment according to the test result of the network equipment and the preset range.
6. The apparatus of claim 5, further comprising: a third sending module;
the third sending module is configured to send a third test instruction for characterizing a physical property test, so that the first port sends physical property test information to the second port according to the third test instruction, where the physical property test includes at least one of a current test, a voltage test, and a temperature test;
the receiving module is further configured to receive a physical attribute test result from the first port, where the physical attribute test result is returned by the second port according to the physical attribute test information;
the generating module is further configured to generate a test report of the network device according to the traffic test result, the optical power test result, the physical attribute test result, and the preset range.
7. Smart device, characterized in that it comprises: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the network device testing method of any of claims 1 to 4.
8. Computer readable medium, characterized in that it has stored thereon computer instructions which, when executed by a processor, cause the processor to execute the network device testing method of any of claims 1 to 4.
CN202011592359.4A 2020-12-29 2020-12-29 Network equipment testing method and device Active CN112637018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011592359.4A CN112637018B (en) 2020-12-29 2020-12-29 Network equipment testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011592359.4A CN112637018B (en) 2020-12-29 2020-12-29 Network equipment testing method and device

Publications (2)

Publication Number Publication Date
CN112637018A CN112637018A (en) 2021-04-09
CN112637018B true CN112637018B (en) 2022-08-09

Family

ID=75286070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011592359.4A Active CN112637018B (en) 2020-12-29 2020-12-29 Network equipment testing method and device

Country Status (1)

Country Link
CN (1) CN112637018B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742358A (en) * 2009-12-22 2010-06-16 重庆重邮东电通信技术有限公司 Method and device for testing quality of network television
CN204119386U (en) * 2014-09-18 2015-01-21 南京轨道交通系统工程有限公司 Multifunctional testing instrument apparatus
CN107395462A (en) * 2017-08-30 2017-11-24 深圳市瑞研通讯设备有限公司 A kind of IPTV testers
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN111200544A (en) * 2020-03-23 2020-05-26 北京信而泰科技股份有限公司 Network port flow testing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8213002B2 (en) * 2009-03-04 2012-07-03 Fluke Corporation PON tester
CN105978754B (en) * 2016-05-13 2019-05-17 中国联合网络通信集团有限公司 A kind of network quality detection method and gateway
TW201939985A (en) * 2018-03-16 2019-10-01 亞旭電腦股份有限公司 Computer system and Wi-Fi test method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742358A (en) * 2009-12-22 2010-06-16 重庆重邮东电通信技术有限公司 Method and device for testing quality of network television
CN204119386U (en) * 2014-09-18 2015-01-21 南京轨道交通系统工程有限公司 Multifunctional testing instrument apparatus
CN107395462A (en) * 2017-08-30 2017-11-24 深圳市瑞研通讯设备有限公司 A kind of IPTV testers
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN111200544A (en) * 2020-03-23 2020-05-26 北京信而泰科技股份有限公司 Network port flow testing method and device

Also Published As

Publication number Publication date
CN112637018A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN109491905A (en) Head end test method, apparatus and electronic equipment
KR100857862B1 (en) The file mutation method and system using file section information and mutation rules
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
CN112367680A (en) External communication test method and device based on intelligent electric meter and computer equipment
CN110518990A (en) Calibration method, system and the computer readable storage medium of multiple antennas WiFi product
US7216273B2 (en) Method for testing non-deterministic device data
CN113608692A (en) Method, system, equipment and medium for verifying data consistency of storage system
CN112637018B (en) Network equipment testing method and device
CN108595320B (en) Test method and device
CN115684894B (en) Test method and test platform for chip testability design
CN113407444B (en) Interface test case generation method, device, equipment and storage medium
WO2023116110A1 (en) Verification system and method for non-security level dcs logic loop of nuclear power station
CN108089987B (en) Function verification method and device
CN110788029B (en) Method and device for testing chip
CN111818096B (en) Network protocol analysis method and device
CN112445712B (en) Method and device for generating test source code
CN115987821A (en) Gateway routing test method and device
CN114064505A (en) Test method, system, device and storage medium for decoding unit
CN111258838B (en) Verification component generation method, device, storage medium and verification platform
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN111858198A (en) Multi-scheme memory plugging test method, system, terminal and storage medium
CN112737831A (en) Firmware upgrade package processing method and device, electronic equipment and storage medium
CN110795338A (en) Automatic testing method and device based on front-end and back-end interaction and electronic equipment
CN116256620B (en) Chiplet integrated chip detection method and device, electronic equipment and storage medium
CN115426301B (en) Device detection method, device, equipment and storage medium based on self-generated message

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