Disclosure of Invention
The invention aims to provide an automatic testing system and method for an intelligent router, which can accurately and effectively screen out unqualified routers and mark the unqualified routers by comprehensively testing the routers through an electrical safety testing module, a hardware testing module, a software testing module and a performance testing module, thereby improving the testing efficiency of the router and bringing convenience for maintaining the unqualified routers.
The purpose of the invention can be realized by the following technical scheme:
an automatic testing system of an intelligent router comprises an electrical safety testing module, a hardware testing module, a software testing module, a registration logging module, a database, an alarm module, a maintenance distribution module and a performance testing module;
the electrical safety testing module is used for testing circuit parameters of the router and marking the circuit parameters as electrical data, and comprises the following specific testing steps:
s1: acquiring the withstand voltage of the router, and marking the withstand voltage of the router as Ni, i-1.. n;
s2: acquiring the resistance value of an insulation resistor in the router, and marking the resistance value of the insulation resistor in the router as Zi, i is 1.. n;
s3: acquiring leakage current in a router, and marking the leakage current as Li, i-1.. n;
s4: by the formula
Acquiring an electrical safety factor Ai of the router, wherein beta is an error correction factor and is taken as 0.9856741, d1, d2 and d3 are preset proportionality coefficients, d1+ d2+ d3 are 1, and d1 is larger than d2 and larger than d 3;
s5: comparing the electrical safety factor Ai of the router with an electrical safety factor threshold value:
if the electrical safety coefficient Ai of the router is larger than or equal to the electrical safety coefficient threshold value, judging that the router is electrically qualified, generating an electrical qualified signal, sending the electrical qualified signal to a test platform, and marking the router as an electrically qualified router;
if the electrical safety coefficient Ai of the router is smaller than the electrical safety coefficient threshold value, judging that the router is electrically unqualified, generating an electrical unqualified signal, sending the electrical unqualified signal to a test platform, and marking the router as an electrically unqualified router;
the hardware testing module is used for testing hardware parameters of the router and marking the hardware parameters as hardware data, and the specific testing steps are as follows:
SS 1: acquiring the number of router interfaces, and marking the number of the router interfaces as Ki, wherein i is 1.. n;
SS 2: acquiring the number of available slots of a user on a router, and marking the number of the available slots of the user on the router as Ci, i being 1.. n;
SS 3: acquiring the port density of a router, and marking the port density as Mi, i-1.. n;
SS 4: by the formula
Acquiring a hardware qualified coefficient Qi of the router, wherein o, v and w are preset proportionality coefficients, o is greater than v and greater than w, o + v + w is 1, and e is a natural constant;
SS 5: comparing the hardware qualification coefficient Qi of the router with a hardware qualification coefficient threshold:
if the hardware qualification coefficient Qi of the router is larger than or equal to the hardware qualification coefficient threshold value, judging that the router hardware is qualified, generating a hardware qualification signal, sending the hardware qualification signal to a test platform, and marking the router as the hardware qualification router;
if the hardware qualification coefficient Qi of the router is smaller than the hardware qualification coefficient threshold, judging that the router hardware is unqualified, generating a hardware unqualified signal, sending the hardware unqualified signal to a test platform, and marking the router as a hardware unqualified router;
the software testing module is used for testing software capability data of the router, the software capability data comprises throughput and time delay of the router, the throughput of the router is represented as the limit of forwarding a packet by the router every second under the condition of no packet loss, the time delay is represented as the time interval from receiving the packet to forwarding the packet by the router in the throughput range, and the specific steps are as follows:
t1: setting a forwarding packet of the router per second as a function f (x), marking an interval where a zero point of the function f (x) is positioned as [ a, b ], satisfying f (a) f (b) < 0, and indicating that the forwarded data is lost if the function f (x) < 0;
t2: dividing the interval [ a, b ] into two parts, marking the obtained intervals as [ a, m ] and [ m, b ], taking out the [ a, m ] or [ m, b ] where the zero point is located according to f (a) f (b) less than 0, and still marking as [ a, b ];
t3: repeating the steps until the interval [ a, b ] containing the zero point reaches a preset range, wherein the number in the [ a, b ] is a limit value, if the limit value is greater than or equal to S1, the throughput of the router is judged to be qualified, otherwise, the router is marked as a router with unqualified throughput, and S1 is a limit value threshold;
t4: testing the time interval from receiving a packet to forwarding the packet by the router in a throughput range, recording the time interval twenty times, calculating the average value of the time interval, if the average value of the time interval is greater than or equal to S2, judging that the time delay of the router is qualified, otherwise, marking the router as a router with unqualified time delay, and S2 is a time interval threshold value;
t5: if the throughput and the time delay of the router are judged to be qualified, generating a software capability qualified signal, sending the software capability qualified signal to a test platform, and marking the router as a router with qualified software capability, otherwise, generating a software capability unqualified signal, sending the software capability unqualified signal to the test platform, and marking the router as a router with unqualified software capability;
the performance testing module is used for testing the performance of the router, the number of the users connected with the router reaches the maximum value, the connected users are downloaded simultaneously and work continuously for a week for 24 hours each day, the downloaded network speed and network speed fluctuation are recorded in real time, and if the network speed and the network speed fluctuation are within a preset range, the stability of the router is qualified; testing the time for recovering the normal work of the router after overload, sending a smaller value between the throughput of 110% and the line speed to the port of the router, recording the time interval from the time when the rate is reduced to 50% to the last packet loss time after the router lasts for 60 seconds, and if the time interval is within a preset range, determining that the reliability of the router is qualified; if the stability and the reliability of the router are both qualified, generating a performance qualified signal, sending the performance qualified signal to a test platform, and marking the equipment as a performance qualified router, otherwise, generating a performance unqualified signal, sending the performance unqualified signal to the test platform, and marking the equipment as a performance unqualified router;
the testing platform sends router numbers with qualified electrical, hardware, software capabilities and performances to a database for storage, and sends electrical unqualified signals, hardware unqualified signals, software capability unqualified signals and performance unqualified signals to an alarm module, the alarm module sends router numbers with unqualified electrical, hardware, software and performance to a maintenance distribution module, the maintenance distribution module sets the router with unqualified electrical with a number 1, sets the router with unqualified hardware with a number 2, sets the router with unqualified software or performance with a number 3, and sends the router numbers and the numbers to a mobile phone terminal of a maintenance worker in the form of short messages, the maintenance worker immediately selects the equipment numbers and the numbers to be maintained after receiving the short messages, and marks the equipment corresponding to the numbers and the numbers as equipment to be maintained, and the selected serial number and the selected label are sent to a database together, the equipment to be maintained is changed and marked as maintained equipment after maintenance is finished, and equipment which is not maintained with the corresponding label of the maintenance type of the maintenance personnel is selected again.
The system comprises a registration login module, a database and a database, wherein the registration login module is used for a tester and a maintainer to submit tester information and maintainer information through a mobile phone terminal to register and send the tester information and the maintainer information which are successfully registered to the database to be stored, the tester information comprises test type data and tester data, the test type data is represented as an electrical safety test, a hardware test and a software test, the tester data is represented as a tester name, an enrollment time and a mobile phone number for personal real name authentication, the maintainer information comprises maintenance type data and maintainer data, the maintenance type data comprises electrical maintenance, hardware maintenance and software maintenance, and the maintainer data is represented as a maintainer name, an enrollment time and a mobile phone number for personal real name authentication.
Further, the electrical data comprise the withstand voltage of the router, the resistance value of the insulation resistor and the leakage current, wherein the withstand voltage is represented by the maximum voltage which can be borne by the circuit in the router, and the leakage current is represented by the current value for leakage protection in the router.
Further, the hardware data includes the number of router interfaces, the number of user-available slots, and the port density, expressed as the number of ports per inch on the router.
An automatic testing method for an intelligent router comprises the following specific steps:
the method comprises the following steps: testing circuit parameters of the router, obtaining an electrical safety coefficient Ai of the router through a formula, comparing the electrical safety coefficient Ai of the router with an electrical safety coefficient threshold, if the electrical safety coefficient Ai of the router is larger than or equal to the electrical safety coefficient threshold, generating an electrical qualified signal, sending the electrical qualified signal to a test platform, and meanwhile, marking the router as the electrically qualified router; otherwise, generating an electrical unqualified signal and sending the electrical unqualified signal to the test platform, and marking the router as an electrical unqualified router;
step two: testing hardware parameters of the router, acquiring a hardware qualification coefficient Qi of the router through a formula, and comparing the hardware qualification coefficient Qi of the router with a hardware qualification coefficient threshold: if the hardware qualification coefficient Qi of the router is larger than or equal to the hardware qualification coefficient threshold value, judging that the router hardware is qualified, generating a hardware qualification signal, sending the hardware qualification signal to a test platform, and marking the router as the hardware qualification router; otherwise, generating a hardware unqualified signal and sending the hardware unqualified signal to the test platform, and simultaneously marking the router as the hardware unqualified router;
step three: testing software capability data of the router, if the throughput and the time delay of the router are judged to be qualified, generating a software capability qualified signal, sending the software capability qualified signal to a testing platform, and marking the router as a router with qualified software capability, otherwise, generating a software capability unqualified signal, sending the software capability unqualified signal to the testing platform, and marking the router as a router with unqualified software capability;
step four: testing the performance of the router, and if the network speed and the network speed fluctuation are within a preset range, determining that the stability of the router is qualified; if the time interval is within the preset range, the reliability of the router is qualified; if the stability and the reliability of the router are both qualified, generating a performance qualified signal, sending the performance qualified signal to a test platform, and marking the equipment as a performance qualified router, otherwise, generating a performance unqualified signal, sending the performance unqualified signal to the test platform, and marking the equipment as a performance unqualified router;
step five: the testing platform sends the router numbers with qualified electrical, hardware, software capabilities and performance to the database for storage, and sends electrical disqualification signals, hardware disqualification signals, software capability disqualification signals and performance disqualification signals to the alarm module, the alarm module sends the router numbers with unqualified electrical, hardware disqualification, software capability disqualification and performance to the maintenance distribution module, and the maintenance distribution module performs maintenance for corresponding equipment by distribution personnel.
Compared with the prior art, the invention has the beneficial effects that:
1. the router is comprehensively tested through the electric safety testing module, the hardware testing module, the software testing module and the performance testing module, unqualified routers can be accurately and effectively screened out, the unqualified routers are marked, the router testing efficiency is improved, and convenience is brought to maintenance of unqualified routers;
2. the router numbers with unqualified electrical, unqualified hardware, unqualified software capability and unqualified performance are sent to a maintenance distribution module through an alarm module, the maintenance distribution module carries out maintenance on corresponding equipment by distribution personnel, the router with unqualified electrical is set with a number 1, the router with unqualified hardware is set with a number 2, the router with unqualified software capability or unqualified performance is set with a number 3, the numbers and the numbers of the routers are sent to a mobile phone terminal of maintenance personnel in a short message mode, the maintenance personnel immediately selects the numbers and the numbers of the equipment to be maintained after receiving the short message, the equipment with the corresponding numbers and the numbers is marked as equipment to be maintained, the selected numbers and the numbers are sent to a database together, the equipment to be maintained is changed and marked as maintained equipment after the maintenance is finished, and the equipment with the corresponding number of the maintenance type of maintenance personnel and the maintenance type of the equipment which is not maintained, can in time maintain unqualified router, maintenance personal can distinguish through the reference numeral when the maintenance equipment, marks equipment mark as the equipment of waiting to maintain simultaneously, prevents a plurality of maintenance personal duplicate selection, has improved the efficiency of maintenance.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an automatic testing system and method for an intelligent router includes an electrical safety testing module, a hardware testing module, a software testing module, a registration logging module, a database, an alarm module, a maintenance distribution module, and a performance testing module;
the system comprises a registration login module, a database and a database, wherein the registration login module is used for a tester and a maintainer to submit tester information and maintainer information to register through a mobile phone terminal and send the tester information and the maintainer information which are successfully registered to the database for storage, the tester information comprises test type data and tester data, the test type data is represented as an electrical safety test, a hardware test and a software test, the tester data is represented as the name, the time of entry and the mobile phone number of real name authentication of the tester, the maintainer information comprises the maintenance type data and the maintainer data, the maintenance type data comprises electrical maintenance, hardware maintenance and software maintenance, and the maintainer data is represented as the name, the time of entry and the mobile phone number of real name authentication of the person;
the electric safety test module is used for testing circuit parameters of the router and marking the circuit parameters as electric data, the electric data comprise withstand voltage of the router, resistance of an insulation resistor and leakage current, the withstand voltage represents the maximum voltage which can be borne by a circuit in the router, the leakage current represents the current value for leakage protection in the router, and the specific test steps are as follows:
s1: acquiring the withstand voltage of the router, and marking the withstand voltage of the router as Ni, i-1.. n;
s2: acquiring the resistance value of an insulation resistor in the router, and marking the resistance value of the insulation resistor in the router as Zi, i is 1.. n;
s3: acquiring leakage current in a router, and marking the leakage current as Li, i-1.. n;
s4: by the formula
Acquiring an electrical safety factor Ai of the router, wherein beta is an error correction factor and is taken as 0.9856741, d1, d2 and d3 are preset proportionality coefficients, d1+ d2+ d3 are 1, and d1 is larger than d2 and larger than d 3;
s5: comparing the electrical safety factor Ai of the router with an electrical safety factor threshold value:
if the electrical safety coefficient Ai of the router is larger than or equal to the electrical safety coefficient threshold value, judging that the router is electrically qualified, generating an electrical qualified signal, sending the electrical qualified signal to a test platform, and marking the router as an electrically qualified router;
if the electrical safety coefficient Ai of the router is smaller than the electrical safety coefficient threshold value, judging that the router is electrically unqualified, generating an electrical unqualified signal, sending the electrical unqualified signal to a test platform, and marking the router as an electrically unqualified router;
the hardware testing module is used for testing hardware parameters of the router and marking the hardware parameters as hardware data, the hardware data comprises the number of router interfaces, the number of available slots for users and port density, the port density is expressed as the number of ports per inch on the router, and the specific testing steps are as follows:
SS 1: acquiring the number of router interfaces, and marking the number of the router interfaces as Ki, wherein i is 1.. n;
SS 2: acquiring the number of available slots of a user on a router, and marking the number of the available slots of the user on the router as Ci, i being 1.. n;
SS 3: acquiring the port density of a router, and marking the port density as Mi, i-1.. n;
SS 4: by the formula
Acquiring a hardware qualified coefficient Qi of the router, wherein o, v and w are preset proportionality coefficients, o is greater than v and greater than w, o + v + w is 1, and e is a natural constant;
SS 5: comparing the hardware qualification coefficient Qi of the router with a hardware qualification coefficient threshold:
if the hardware qualification coefficient Qi of the router is larger than or equal to the hardware qualification coefficient threshold value, judging that the router hardware is qualified, generating a hardware qualification signal, sending the hardware qualification signal to a test platform, and marking the router as the hardware qualification router;
if the hardware qualification coefficient Qi of the router is smaller than the hardware qualification coefficient threshold, judging that the router hardware is unqualified, generating a hardware unqualified signal, sending the hardware unqualified signal to a test platform, and marking the router as a hardware unqualified router;
the software testing module is used for testing software capability data of the router, the software capability data comprises throughput and time delay of the router, the throughput of the router is represented as the limit of forwarding a packet by the router every second under the condition of no packet loss, the time delay is represented as the time interval from receiving the packet to forwarding the packet by the router in the throughput range, and the specific steps are as follows:
t1: setting a forwarding packet of the router per second as a function f (x), marking an interval where a zero point of the function f (x) is positioned as [ a, b ], satisfying f (a) f (b) < 0, and indicating that the forwarded data is lost if the function f (x) < 0;
t2: dividing the interval [ a, b ] into two parts, marking the obtained intervals as [ a, m ] and [ m, b ], taking out the [ a, m ] or [ m, b ] where the zero point is located according to f (a) f (b) less than 0, and still marking as [ a, b ];
t3: repeating the steps until the interval [ a, b ] containing the zero point reaches a preset range, wherein the number in the [ a, b ] is a limit value, if the limit value is greater than or equal to S1, the throughput of the router is judged to be qualified, otherwise, the router is marked as a router with unqualified throughput, and S1 is a limit value threshold;
t4: testing the time interval from receiving a packet to forwarding the packet by the router in a throughput range, recording the time interval twenty times, calculating the average value of the time interval, if the average value of the time interval is greater than or equal to S2, judging that the time delay of the router is qualified, otherwise, marking the router as a router with unqualified time delay, and S2 is a time interval threshold value;
t5: if the throughput and the time delay of the router are judged to be qualified, generating a software capability qualified signal, sending the software capability qualified signal to a test platform, and marking the router as a router with qualified software capability, otherwise, generating a software capability unqualified signal, sending the software capability unqualified signal to the test platform, and marking the router as a router with unqualified software capability;
the performance testing module is used for testing the performance of the router, the number of the users connected with the router reaches the maximum value, the connected users are downloaded simultaneously and work continuously for a week for 24 hours each day, the downloaded network speed and network speed fluctuation are recorded in real time, and if the network speed and the network speed fluctuation are within a preset range, the stability of the router is qualified; testing the time for recovering the normal work of the router after overload, sending a smaller value between the throughput of 110% and the line speed to the port of the router, recording the time interval from the time when the rate is reduced to 50% to the last packet loss time after the router lasts for 60 seconds, and if the time interval is within a preset range, determining that the reliability of the router is qualified; if the stability and the reliability of the router are both qualified, generating a performance qualified signal, sending the performance qualified signal to a test platform, and marking the equipment as a performance qualified router, otherwise, generating a performance unqualified signal, sending the performance unqualified signal to the test platform, and marking the equipment as a performance unqualified router;
the testing platform sends router numbers with qualified electrical, hardware, software capabilities and performances to a database for storage, and sends electrical unqualified signals, hardware unqualified signals, software capability unqualified signals and performance unqualified signals to an alarm module, the alarm module sends router numbers with unqualified electrical, hardware, software and performance to a maintenance distribution module, the maintenance distribution module sets the router with unqualified electrical with a number 1, sets the router with unqualified hardware with a number 2, sets the router with unqualified software or performance with a number 3, and sends the router numbers and the numbers to a mobile phone terminal of a maintenance worker in the form of short messages, the maintenance worker immediately selects the equipment numbers and the numbers to be maintained after receiving the short messages, and marks the equipment corresponding to the numbers and the numbers as equipment to be maintained, and the selected serial number and the selected label are sent to a database together, the equipment to be maintained is changed and marked as maintained equipment after maintenance is finished, and equipment which is not maintained with the corresponding label of the maintenance type of the maintenance personnel is selected again.
The environment testing module is used for testing the placement environment of the router, increasing the ambient temperature around the router in real time, calculating and recording the highest limit temperature on the premise of not influencing the operation of equipment, reducing the ambient temperature around the router in real time, calculating and recording the lowest limit temperature on the premise of not influencing the operation of the equipment, increasing the humidity of the ambient environment around the router in real time, calculating and recording the highest limit humidity on the premise of not influencing the operation of the equipment, judging that the environment test of the router is qualified when the highest limit temperature, the lowest limit temperature and the highest limit humidity of the tested router are all larger than preset values, marking the router as a qualified router for the environment test, sending the serial number of the router to a database for storage, otherwise, judging that the environment test of the router is unqualified, and marking the router as an unqualified router for the environment test, and sends the serial number of the router to the alarm module.
The working principle of the invention is as follows:
testing circuit parameters of the router through the electrical safety testing module, obtaining an electrical safety coefficient Ai of the router through a formula, if the electrical safety coefficient Ai of the router is larger than or equal to an electrical safety coefficient threshold value, generating an electrical qualified signal, sending the electrical qualified signal to the testing platform, and meanwhile, marking the router as the electrical qualified router; otherwise, generating an electrical unqualified signal and sending the electrical unqualified signal to the test platform, and marking the router as an electrical unqualified router; testing hardware parameters of the router through a hardware testing module, obtaining a hardware qualification coefficient Qi of the router through a formula, and comparing the hardware qualification coefficient Qi of the router with a hardware qualification coefficient threshold value: judging that the router hardware is qualified, generating a hardware qualified signal, sending the hardware qualified signal to a test platform, and marking the router as a hardware qualified router; otherwise, generating a hardware unqualified signal and sending the hardware unqualified signal to the test platform, and simultaneously marking the router as the hardware unqualified router; testing software capability data of the router through a software testing module, if the throughput and the time delay of the router are judged to be qualified, generating a software capability qualified signal, sending the software capability qualified signal to a testing platform, and marking the router as a router with qualified software capability, otherwise, generating a software capability unqualified signal, sending the software capability unqualified signal to the testing platform, and marking the router as a router with unqualified software capability; testing the performance of the router through a performance testing module, if the stability and the reliability of the router are both qualified, generating a performance qualified signal, sending the performance qualified signal to a testing platform, and marking the equipment as a performance qualified router, otherwise, generating a performance unqualified signal, sending the performance unqualified signal to the testing platform, and marking the equipment as a performance unqualified router; the router numbers with qualified electrical, hardware, software capabilities and performances are sent to a database through a test platform to be stored, meanwhile, electrical unqualified signals, hardware unqualified signals, software capability unqualified signals and performance unqualified signals are sent to an alarm module, the alarm module sends the router numbers with unqualified electrical, hardware unqualified, software capability unqualified and performance unqualified signals to a maintenance distribution module, and the maintenance distribution module carries out maintenance on corresponding equipment by distribution personnel.
The above formulas are all quantitative calculation, the formula is a formula obtained by acquiring a large amount of data and performing software simulation to obtain the latest real situation, and the preset parameters in the formula are set by the technical personnel in the field according to the actual situation.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.