Disclosure of Invention
The invention provides an automatic speed measurement method, an automatic speed measurement system and a storage medium for router down-hanging equipment, which improve the speed measurement universality of the router down-hanging equipment, adapt to various scene requirements and automatically generate test reports.
In order to achieve the above object, the present invention provides an automatic speed measurement method for a router down-hanging device, including:
determining a preset speed measuring tool and a speed measuring strategy according to the current environment of the router hanging equipment;
according to the speed measurement strategy, continuously measuring the speed of the router down-hanging equipment according to a preset time period;
and according to the time period, counting a plurality of rates and average rates of the router down-hanging equipment, and automatically generating a speed measurement report of the router down-hanging equipment.
The invention provides an automatic speed measuring method for router down-hanging equipment, which comprises the steps of analyzing the current network environment of the router down-hanging equipment, selecting a corresponding speed measuring tool according to the network environment to measure the speed, overcoming the defect that the prior art only focuses on the speed measurement of a public network, improving the universality of the speed measuring method, selecting different speed measuring strategies after the speed measuring tool is selected, measuring the speed of the router down-hanging equipment according to the different speed measuring strategies in a preset time period, and meeting the requirements of different scenes, so that the speed of the router down-hanging equipment can be measured when the down-hanging equipment is in different scenes, counting a plurality of speeds of the router down-hanging equipment and the average speed in the time period after the speed measurement is continuously finished according to the time period, and automatically generating a speed measuring report of the router down-hanging equipment, so that the original data and the statistic result can be conveniently stored, and the analysis according to the test report in the later period is convenient.
As a preferred example, determining a preset speed measuring tool according to the current environment of the router hanging device specifically includes:
determining a speed measuring tool used by the router under-hanging equipment according to the current network environment of the router under-hanging equipment;
if the network environment where the router down-hanging device is currently located is a public network, the router down-hanging device uses a speed measuring tool;
if the network environment where the router down-hanging device is currently located is a private network, the router down-hanging device uses a library-cli speed measuring tool.
According to the invention, whether the equipment is in the public network or the private network is judged by analyzing the current network environment in which the router is hung down, and a unified interface is provided according to different environments, so that when the type of the environment is identified, different speed measuring tools are automatically called to measure the speed, the defect that the prior art only supports the speed measurement of the public network is overcome, and the universality of the test method is improved.
As a preferred example, when the speed measurement is performed according to the speed measurement policy and according to a preset time period, the method includes:
determining a corresponding speed measurement strategy to measure the speed according to the test scene of the router down-hanging equipment; the speed measurement strategy comprises specified times of speed measurement, periodic speed measurement and uninterrupted speed measurement;
and obtaining the speed measurement times of the router down-hanging equipment according to the speed measurement frequency contained in the speed measurement strategy and the preset time period, and controlling the router down-hanging equipment to continuously measure the speed according to the speed measurement times.
The invention provides a plurality of strategy modes, so that different testing strategy modes are selected according to different testing scenes to test the speed of the router under-hanging equipment, thereby not only ensuring that the speed measurement is smoothly carried out, but also avoiding the manual repeated starting of the speed measurement test and reducing the labor cost.
As a preferred example, the counting the several rates and average rates of the router under-hook device in a preset time period specifically includes:
the router hanging equipment is used for measuring the speed according to the speed measurement times to obtain a plurality of speeds; the rate comprises an uploading rate and a downloading rate;
and obtaining the average speed of the router hanging equipment according to the plurality of speeds and the speed measurement times.
According to the method, the device and the system for measuring the speed of the router under-hook, the speed obtained after the router under-hook device performs a plurality of times of speed measurement according to the speed measurement strategy is automatically counted in the time period, and then the average speed of the router under-hook device is obtained according to the speed and the speed measurement times, so that on one hand, the accuracy of the speed measurement result is ensured through a plurality of times of speed measurement, on the other hand, the plurality of times of speed measurement result is counted, and a speeder can conveniently and clearly know the router under-hook device.
As a preferred example, the automatically generating a speed measurement report of the router hanging device specifically includes:
according to the time period, a speed measurement result of each time of the router hanging equipment is automatically obtained; the speed measurement result comprises a serial number, a speed measurement starting time, a speed measurement ending time, a downloading rate, an uploading rate and a speed measurement server node ID;
and according to the speed measurement result, storing the speed measurement result through a preset file format to obtain a speed measurement report of the router hanging equipment.
According to the invention, each piece of speed measurement information when the router down-hanging equipment carries out speed measurement is automatically counted in each time period, the speed measurement information is stored through a preset file format, and a speed measurement report of the router down-hanging equipment is automatically generated, so that the manual generation is replaced, the labor cost is reduced, and a line graph is conveniently drawn for the speed measurement of the router down-hanging equipment to analyze the speed stability of the line graph.
The invention provides an automatic speed measurement system of router down-hanging equipment, which comprises a selection module, a speed measurement module and a reporting module;
the selection module is used for selecting a preset speed measuring tool and a speed measuring strategy according to the current environment of the router hanging equipment;
the speed measuring module is used for continuously measuring the speed of the router hanging equipment according to the speed measuring strategy and a preset time period;
and the reporting module is used for counting a plurality of rates and average rates of the router down-hanging equipment according to the time period and automatically generating a speed measurement report of the router down-hanging equipment.
The invention provides an automatic speed measuring system of router down-hanging equipment, which is characterized in that a corresponding speed measuring tool is selected to measure the speed according to the network environment where the router down-hanging equipment is currently located by analyzing the network environment, the defect that the prior art only focuses on the speed measurement of a public network is overcome, the universality of the speed measuring method is improved, then after the speed measuring tool is selected, different speed measuring strategies are selected, the speed of the router down-hanging equipment is measured according to the different speed measuring strategies within a preset time period, the requirements of different scenes are met, so that the speed of the router down-hanging equipment can be measured when the down-hanging equipment is in different scenes, a plurality of speeds of the router down-hanging equipment and the average speed are counted within the time period after the speed measurement is continued according to the time period, and a speed measuring report of the router down-hanging equipment is automatically generated, so that original data and statistical results are conveniently stored, and analysis according to the test report in the later period is convenient.
As a preferred example, the selection module includes a tool unit and a policy unit;
the tool unit is used for determining a speed measuring tool used by the router under-hanging equipment according to the current network environment of the router under-hanging equipment; if the network environment where the router down-hanging device is currently located is a public network, the router down-hanging device uses a speed measuring tool; if the current network environment of the router down-hanging device is a private network, the router down-hanging device uses a library-cli speed measuring tool;
the strategy unit is used for selecting a corresponding speed measurement strategy to measure the speed according to the test requirement of the router hanging equipment; the speed measurement strategy comprises specified times of speed measurement, periodic speed measurement and uninterrupted speed measurement; and obtaining the speed measurement times of the router down-hanging equipment according to the speed measurement frequency contained in the speed measurement strategy and the preset time period, and controlling the router down-hanging equipment to continuously measure the speed according to the speed measurement times.
According to the method, the current network environment where the router is hung down is analyzed to judge whether the router is in the public network or the private network, and a unified interface is provided according to different environments, so that when the type of the environment is identified, different speed measuring tools are automatically called to measure the speed, the defect that only the public network speed measurement is supported in the prior art is overcome, the universality of the test method is improved, different test strategy modes are selected according to the provided various strategy modes, the speed of the router hung down device is measured according to different test scenes, the smooth speed measurement is ensured, the manual repeated speed measurement starting test is avoided, and the labor cost is reduced.
As a preferable example, the report module includes a rate unit and a report generation unit;
the speed unit is used for measuring the speed according to the speed measurement times through the router hanging equipment to obtain a plurality of speeds; the rate comprises an uploading rate and a downloading rate; obtaining the average speed of the router hanging equipment according to the plurality of speeds and the speed measurement times;
the report generating unit is used for automatically obtaining a speed measurement result when the router hanging equipment measures the speed in each album according to the time period; the speed measurement result comprises a serial number, a speed measurement starting time, a speed measurement ending time, a downloading rate, an uploading rate and a speed measurement server node ID; and according to the speed measurement result, storing the speed measurement result through a preset file format to obtain a speed measurement report of the router hanging equipment.
According to the method, the device and the system, the speed obtained after the router under-hanging device carries out speed measurement for a plurality of times according to the speed measurement strategy is automatically counted, then the average speed of the router under-hanging device is obtained according to the speed and the speed measurement times, on one hand, the accuracy of the speed measurement result is ensured through a plurality of times of speed measurement, on the other hand, the plurality of times of speed measurement results are counted, a person can conveniently and clearly know the router under-hanging device, and each speed measurement information when the router under-hanging device carries out speed measurement is automatically counted in each time period, the speed measurement information is stored through a preset file format, and a speed measurement report of the router under-hanging device is automatically generated instead of manual generation, so that the labor cost is reduced, and a line graph is conveniently drawn for the subsequent speed measurement of the current wheel so as to analyze the speed stability of the line graph.
In a third aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as described in the first aspect.
In a fourth aspect, the present invention provides an electronic device, comprising: at least one processor; a storage device configured to store at least one program which, when executed by the at least one processor, causes the at least one processor to implement the method of the first aspect.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment of the invention provides an automatic speed measurement method for router down-hanging equipment, the main flow of which is shown in FIG. 1, and the method mainly comprises steps 101 to 103, and each step specifically comprises the following steps:
step 101: and determining a preset speed measuring tool and a speed measuring strategy according to the current environment of the router hanging equipment.
In this embodiment, the steps specifically include: determining a speed measuring tool used by the router under-hanging equipment according to the current network environment of the router under-hanging equipment; if the network environment where the router down-hanging device is currently located is a public network, the router down-hanging device uses a speed measuring tool; if the network environment where the router down-hanging device is currently located is a private network, the router down-hanging device uses a library-cli speed measuring tool.
Step 102: and continuously measuring the speed of the router down-hanging equipment according to the speed measurement strategy and a preset time period.
In this embodiment, the steps specifically include: determining a corresponding speed measurement strategy to measure the speed according to the test scene of the router down-hanging equipment; the speed measurement strategy comprises specified times of speed measurement, periodic speed measurement and uninterrupted speed measurement; and obtaining the speed measurement times of the router down-hanging equipment according to the speed measurement frequency contained in the speed measurement strategy and the preset time period, and controlling the router down-hanging equipment to continuously measure the speed according to the speed measurement times.
In this embodiment, the steps specifically include: according to the test scene of the router hanging equipment, determining a corresponding speed measurement strategy to measure the speed, and in the embodiment, supporting 3 speed measurement strategies: speed measurement for designated times: the user inputs the times to be measured before measuring the speed, and the speed measuring software automatically stops after reaching the appointed times; periodic speed measurement: the user inputs a speed measuring interval (unit: minutes), and the speed measuring software executes speed measurement once every time the interval time passes; uninterrupted speed measurement: and after the speed measuring software executes the speed measuring once, immediately initiating the next speed measuring until the user stops manually. After the network environment and the speed measurement strategy are selected, the speed test can be started by clicking a start button, and the process between the clicking start and the clicking stop is called one-round speed measurement. Each round of speed measurement may contain multiple times. Each time was 30 seconds in duration, with a test download rate of 15 seconds and a test upload rate of 15 seconds.
Step 103: and according to the time period, counting a plurality of rates and average rates of the router down-hanging equipment, and automatically generating a speed measurement report of the router down-hanging equipment.
In this embodiment, the steps specifically include: the router hanging equipment is used for measuring the speed according to the speed measurement times to obtain a plurality of speeds; the rate comprises an uploading rate and a downloading rate; and obtaining the average speed of the router hanging equipment according to the plurality of speeds and the speed measurement times. According to the time period, a speed measurement result of each time of the router hanging equipment is automatically obtained; the speed measurement result comprises a serial number, a speed measurement starting time, a speed measurement ending time, a downloading rate, an uploading rate and a speed measurement server node ID; and according to the speed measurement result, storing the speed measurement result through a preset file format to obtain a speed measurement report of the router hanging equipment.
In this embodiment, the steps specifically include: after each speed measurement is completed, the proposal can automatically count the average value of the download speed and the average value of the upload speed of the current wheel speed measurement, as shown in fig. 3, and the average value of the speed and each speed measurement result are used for starting or stopping one wheel speed measurement through a start/stop button. The speed measurement result is displayed as one row each time, and the content comprises: serial number, speed measurement start time, speed measurement end time, download rate (unit: mbps), upload rate (unit: mbps), speed measurement server node ID, etc. After the speed measurement is completed every 30 seconds, one row of records is automatically additionally displayed to form a list. And displaying the average value of the download rate and the average value of the upload rate of the multiple speed measurement of the round. After clicking the stop button, the proposal can automatically output a speed measurement report, and the file format is csv, which is supported to be directly opened in Excel. Besides the final statistical result, the report also keeps the original data of each speed measurement, and is convenient for the subsequent line drawing of the speed measurement of the present wheel to analyze the speed stability.
In this embodiment, an automatic speed measurement system for a router hanging device is also provided, which mainly includes a selection module 201, a speed measurement module 202, and a report module 203.
The selection module 201 is configured to determine a preset speed measuring tool and a speed measuring strategy according to the current environment of the router down-hanging device;
the speed measurement module 202 is configured to continuously measure the speed of the router down-hanging device according to the speed measurement policy and a preset time period;
the report module 203 is configured to count a plurality of rates and average rates of the router down-hanging device according to the time period, and automatically generate a speed measurement report of the router down-hanging device.
In this embodiment, the selection module 201 includes a tool unit and a policy unit;
the tool unit is used for determining a speed measuring tool used by the router under-hanging equipment according to the current network environment of the router under-hanging equipment; if the network environment where the router down-hanging device is currently located is a public network, the router down-hanging device uses a speed measuring tool; if the current network environment of the router down-hanging device is a private network, the router down-hanging device uses a library-cli speed measuring tool;
the strategy unit is used for determining a corresponding speed measurement strategy to measure the speed according to the test requirement of the router hanging equipment; the speed measurement strategy comprises specified times of speed measurement, periodic speed measurement and uninterrupted speed measurement; and obtaining the speed measurement times of the router down-hanging equipment according to the speed measurement frequency contained in the speed measurement strategy and the preset time period, and controlling the router down-hanging equipment to continuously measure the speed according to the speed measurement times.
In this embodiment, the report module 203 includes a rate unit and a report generating unit;
the speed unit is used for measuring the speed according to the speed measurement times through the router hanging equipment to obtain a plurality of speeds; the rate comprises an uploading rate and a downloading rate; obtaining the average speed of the router hanging equipment according to the plurality of speeds and the speed measurement times;
the report generating unit is used for automatically obtaining a speed measurement result when the router hanging equipment measures the speed in each album according to the time period; the speed measurement result comprises a serial number, a speed measurement starting time, a speed measurement ending time, a downloading rate, an uploading rate and a speed measurement server node ID; and according to the speed measurement result, storing the speed measurement result through a preset file format to obtain a speed measurement report of the router hanging equipment.
In this embodiment, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for automatically measuring a speed of a router downhanging device provided in this embodiment, and further provides an electronic device, including: at least one processor; and the storage device is configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor is enabled to realize the automatic speed measurement method for the router hanging-down equipment.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.