CN114071544B - Network testing method and device and electronic equipment - Google Patents

Network testing method and device and electronic equipment Download PDF

Info

Publication number
CN114071544B
CN114071544B CN202111285675.1A CN202111285675A CN114071544B CN 114071544 B CN114071544 B CN 114071544B CN 202111285675 A CN202111285675 A CN 202111285675A CN 114071544 B CN114071544 B CN 114071544B
Authority
CN
China
Prior art keywords
network
data packet
tested
packet
echo request
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
CN202111285675.1A
Other languages
Chinese (zh)
Other versions
CN114071544A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202111285675.1A priority Critical patent/CN114071544B/en
Publication of CN114071544A publication Critical patent/CN114071544A/en
Application granted granted Critical
Publication of CN114071544B publication Critical patent/CN114071544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The embodiment of the invention discloses a network testing method, a network testing device and electronic equipment. One embodiment of the method comprises the following steps: receiving a network test instruction, wherein the network test instruction comprises a network address to be tested; testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and processing the test results of at least two network parameters, and outputting the processed test results. According to the embodiment, the integrated test result is presented to the user, so that the reliability of the test result is improved.

Description

Network testing method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a network testing method, a network testing device and electronic equipment.
Background
Currently, network functions on electronic devices are dominated by cellular data network and wireless network (Wi-Fi) technologies. Cellular data networks refer to mobile communication technologies, typically 4G or 5G, which require electronic devices to connect to the internet through base stations. Wi-Fi refers to 802.11 protocol-based near field communication technology that requires an electronic device to connect to the internet through a router or hotspot. When the network is connected, there are some users or applications that want to know the current network performance.
Disclosure of Invention
This disclosure is provided in part to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a network test method, a network test device and an electronic device, which can integrate test results by themselves and present overall results to a user, so that the user can obtain network test results related to the device to be tested more easily, and the reliability of the test results can be improved.
In a first aspect, an embodiment of the present disclosure provides a network testing method, including: receiving a network test instruction, wherein the network test instruction comprises a network address to be tested; testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and processing the test results of at least two network parameters, and outputting the processed test results.
In a second aspect, embodiments of the present disclosure provide a network testing apparatus, including: the network test device comprises a receiving unit, a test unit and a test unit, wherein the receiving unit is used for receiving a network test instruction, and the network test instruction comprises a network address to be tested; the testing unit is used for testing at least two network parameters by utilizing the network address to be tested to obtain a testing result; and the processing unit is used for processing the test results of the at least two network parameters and outputting the processed test results.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the network test method as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the network test method according to the first aspect.
The network testing method, the network testing device and the electronic equipment provided by the embodiment of the disclosure are characterized by receiving a network testing instruction comprising a network address to be tested; then, testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and finally, processing the test results of the at least two network parameters and outputting the processed test results. By the method, the test results can be automatically integrated and presented to the user, so that the user can obtain the network test results of the equipment to be tested more easily, and the reliability of the test results can be improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is an exemplary system architecture diagram in which various embodiments of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a network testing method according to the present disclosure;
FIG. 3 is a flow chart of one embodiment of testing network parameters in a network testing method according to the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of testing network parameters in a network testing method according to the present disclosure;
FIG. 5 is a schematic diagram of the structure of one embodiment of a network testing device according to the present disclosure;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Fig. 1 illustrates an exemplary system architecture 100 in which embodiments of the network testing methods of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include test equipment 1011, 1012, 1013, a network 102, and network nodes 1031, 1032, 1033. Network 102 is the medium used to provide communication links between test equipment 1011, 1012, 1013 and network nodes 1031, 1032, 1033. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the network nodes 1031, 1032, 1033 over the network 102 using the test devices 1011, 1012, 1013 to send or receive messages, etc., e.g., the test devices 1011, 1012, 1013 may receive network test instructions sent by the user, and the network nodes 1031, 1032, 1033 may receive data packets sent by the test devices 1011, 1012, 1013. The test devices 1011, 1012, 1013 may have various communication client applications installed thereon, such as a network test class application, instant messaging software, and the like.
The test equipment 1011, 1012, 1013 may first receive a network test instruction comprising a network address to be tested; then, at least two network parameters can be tested by utilizing the network address to be tested, and a test result is obtained; and finally, processing the test results of the at least two network parameters, and outputting the processed test results.
The test equipment 1011, 1012, 1013 may be hardware or software. When the test devices 1011, 1012, 1013 are hardware, they may be various electronic devices having a display screen and supporting information interaction, including but not limited to smartphones, tablets, laptop portable computers, and the like. When the test devices 1011, 1012, 1013 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The network nodes 1031, 1032, 1033 may be nodes in the internet that receive data packets sent by the test equipment 1011, 1012, 1013. The network nodes 1031, 1032, 1033 may be hardware or software. When the network nodes 1031, 1032, 1033 are hardware, they may be various electronic devices including, but not limited to, smartphones, tablets, laptop computers, routers, servers, etc. When the network nodes 1031, 1032, 1033 are software, they may be installed in the electronic devices listed above. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
It should be noted that, the network testing method provided by the embodiments of the present disclosure is generally performed by the testing devices 1011, 1012, 1013, and the network testing apparatus is generally disposed in the testing devices 1011, 1012, 1013.
It should be understood that the number of test devices, networks and network nodes in fig. 1 is merely illustrative. There may be any number of test devices, networks, and network nodes as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a network testing method according to the present disclosure is shown. The network testing method comprises the following steps:
step 201, a network test instruction is received.
In this embodiment, an execution body of the network test method (for example, the test apparatus shown in fig. 1) may receive the network test instruction. The network test instruction may include a network address to be tested. Network performance may also be referred to as a network performance index. The network test instruction may also include at least two network parameters to be tested, where the network parameters may include, but are not limited to, at least one of the following: network packet loss rate, network rate, and network bandwidth.
Here, the network address to be tested may include an IP address (Internet Protocol Address, an internet protocol address or an internet protocol address) or a Domain Name (Domain Name). The IP address is a unified address format provided by the IP protocol, which allocates a logical address to each network and each host on the internet, so as to mask the difference of physical addresses. A domain name, which may also be referred to as a network domain, is the name of a computer or group of computers on the internet that is formed by a series of names separated by dots, and is used to identify the location (sometimes referred to as the geographic location) of the computer during data transmission. Because the IP addresses have the disadvantages of inconvenient memorization and inability to display names and properties of address organizations, people design domain names and map the domain names and the IP addresses to each other through DNS (Domain Name System ), so that people can access the internet more conveniently without memorizing the number strings of the IP addresses which can be directly read by a machine.
It should be noted that, the network test function of the present embodiment may be set in the user terminal system or in an application program (APP).
As an example, a user may input a network address to be tested in a network parameter configuration page, and at least two network parameters to be tested may be input or selected by the user or default by the system, and the user may implement testing of multiple network parameters by clicking an icon for testing.
Step 202, testing at least two network parameters by using the network address to be tested, and obtaining a test result.
In this embodiment, the execution body may test the at least two network parameters by using the network address to be tested, so as to obtain a test result. Here, the network parameters to be tested may include, but are not limited to, at least one of: network fluctuation conditions, network delays to the target server, and network bandwidth statistics.
And 203, processing the test results of at least two network parameters, and outputting the processed test results.
In this embodiment, the execution body may process the test results of the at least two network parameters obtained in step 202, and output the processed test results to present the processed test results. Here, processing the test results may include integrating the test results, which may be understood as combining the resulting plurality of test results together to ultimately form a whole. Processing the test results may further include validating the integrated test results. As an example, the integrated test result may be input into a pre-trained test result verification model, to obtain the accuracy of the integrated test result, and if the accuracy is greater than a preset accuracy threshold, the integrated test result may be output; if the accuracy is smaller than the preset accuracy threshold, the network parameters can be tested again until the accuracy of the test result is larger than the accuracy threshold.
The method provided by the above-described embodiments of the present disclosure is performed by receiving a network test instruction including a network address to be tested; then, testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and finally, processing the test results of the at least two network parameters and outputting the processed test results. By the method, the test results can be automatically integrated and presented to the user, so that the user can obtain the network test results of the equipment to be tested more easily, and the reliability of the test results can be improved.
In some alternative implementations, the network parameters to be tested may include network node probing. Network node probing generally refers to probing of IP addresses between a target address and a smart device for a range of nodes including gateway/router/operator server/CDN (Content Delivery Network ) server, etc. The execution body may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the execution body may send a plurality of echo request (echo request) packets to the network address to be tested. The executing entity may then receive the data packets returned from the at least one network node. The data packet generally includes a network address (IP address) of the node. The execution body may then parse the network address of the network node from the returned data packet.
As an example, the data packet may be an ICMP (Internet Control Message Protocol ) data packet. In this case, the packet is usually a time-to-live packet.
As another example, the data packet may be a TCP (Transmission Control Protocol )/UDP (User Datagram Protocol, user datagram protocol) data packet. At this time, the packet is typically a port unreachable packet.
In some alternative implementations, the network parameters to be tested may include network delay. The execution body may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the execution body may send a response request packet to the parsed network address of at least one network node, and record the sending time in the sending process. Thereafter, a response packet returned from the at least one network node may be received. For each of the at least one network node, the executing body may determine, as the network delay of the network node, a time difference between a time of sending the echo request packet and a time of returning the echo reply packet corresponding to the network node. The above-described test method of the network delay may be repeated a plurality of times, and an average value of the network delays may be obtained as the network delay of the network node. Here, the network node detection and the network delay can be tested at the same time, so that the testing efficiency is improved.
In some alternative implementations, the network parameters to be tested may include wireless network (WiFi) throughput. Throughput refers to the amount of successfully transferred data per unit time. The execution body may be further configured to test at least two network parameters by using a network address to be tested in the following manner, to obtain a test result: the execution body may send a speed measurement instruction to the target router. The target router is typically a router in the wireless network where the execution subject is located. And then, the execution subject can perform data transmission with the target router based on the speed measurement instruction. Finally, the executing entity may determine a total amount of data and a time consumption for transmission with the target router, and determine a wireless network throughput using the total amount of data and the time consumption. Here, the execution body may determine a ratio of the total data amount to the time consuming as a wireless network throughput. The test server is erected on the router, so that the wireless network speed measurement can be carried out locally, the condition that an independent server is needed for speed measurement is avoided, in addition, because the test equipment and the router are directly connected with the network, network delay influenced by other factors (such as network line quality, speed limit of broadband by a broadband operator, peak time bandwidth utilization ratio and the like) is reduced, and the reliability of a speed measurement result is improved.
In some alternative implementations, the speed measurement instructions may indicate uploading data. Namely, the execution body transmits data to the target router. The execution body may further perform data transmission with the target router based on the speed measurement instruction in the following manner: the execution body may send data to the target router for data transmission.
In some alternative implementations, the above-described tachometer instructions may indicate that data is to be downloaded. That is, the target router transmits data to the execution body. The execution body may be further configured to perform data transmission with the target router based on the speed measurement instruction in the following manner: the execution body may receive data sent by the target router to perform data transmission.
The network test function of the scheme can be arranged in a system or an application program of the electronic equipment, network parameters such as network delay, network node detection, wireless network throughput, maximum transmission unit, network fluctuation condition and the like are tested, and finally test results of the network parameters are output, so that the test results are integrated together, and the test results are more reliable. As an example, if the network delay in the test results is large, the Wi-Fi throughput test results may be combined, and if the Wi-Fi throughput is small, then a problem may occur on the Wi-Fi link between the electronic device and the router.
With continued reference to FIG. 3, a flow 300 of one embodiment of testing network parameters in a network test method is shown. The test flow 300 for testing network parameters includes the following steps:
step 301, sequentially sending a plurality of first echo request data packets to the network address to be tested until receiving the echo response data packet returned by the network address to be tested.
In this embodiment, the execution body of the network testing method (e.g., the testing device shown in fig. 1) may sequentially send a plurality of first echo request packets to the network address to be tested until receiving an echo reply (echo reply) packet returned by the network node indicated by the network address to be tested. Here, the execution body may sequentially send ICMP packets of ttl=1, ttl=2, and ttl=3 … to the network address to be tested. The first echo request packet may be an internet control message protocol packet. Generally, a Time-To-Live (TTL) value of a first echo request packet with a preceding transmission Time is smaller than a Time-To-Live value of a first echo request packet with a following transmission Time.
Here, TTL is used to specify the maximum number of segments that the IP packet is allowed to pass before being dropped by the router. The maximum value of TTL is 255 and the recommended value of TTL is 64. In practice, the TTL is the maximum number of hops an IP packet can forward in a computer network. The TTL field is set by the sender of the IP data packet, and the network node modifies the TTL field value every time a network node passes through the whole forwarding path from the source address to the destination address of the IP data packet, specifically, the TTL value is reduced by 1, and then the IP data packet is forwarded. If the TTL is reduced to 0 before the IP packet reaches the destination IP address, the router discards the received IP packet with ttl=0 and sends a time-to-live timeout packet to the sender of the IP packet.
Step 302, a first exception packet returned from at least one network node is received.
In this embodiment, the executing entity may receive a first exception packet returned from at least one network node. The first exception packet may include a time-to-live timeout packet.
Step 303 determines if the number of received first exception packets is less than a target number.
In this embodiment, the executing body may determine whether the number of the received first abnormal data packets is smaller than the target number. The target number may be the difference between the number of first echo request packets sent and a first value (typically 1). The number of the received time-to-live timeout data packets is compared with the number of the other first echo request data packets except the first echo request data packet sent to the network address to be tested.
In step 304, if the number of the received first abnormal data packets is smaller than the target number, a difference between the target number and the number of the received abnormal data packets is determined.
In this embodiment, if it is determined in step 303 that the number of the received first abnormal data packets is smaller than the target number, which indicates that there is an unresponsive network node, the executing entity may determine a difference between the target number and the number of the received abnormal data packets.
Step 305, sending a differential number of second echo request packets to the network address to be tested.
In this embodiment, the executing entity may send the differential second echo request packets to the network address to be tested. The second echo request packet may be a transmission control protocol packet or a user datagram protocol packet.
Step 306, a second exception packet returned from the at least one network node is received.
In this embodiment, the executing entity may receive a second exception packet returned from at least one network node. The second abnormal data packet may include a port unreachable data packet.
Step 307, resolving the network address of the network node from the first abnormal data packet and the second abnormal data packet.
In this embodiment, the executing entity may parse the network address of the network node from the first abnormal data packet received in step 302 and the second abnormal data packet received in step 306.
As an example, the execution body may sequentially send ICMP packets with ttl=1, ttl=2, and ttl=3 … to the destination IP address, and after sending the ICMP packet with ttl=20, receive a response packet returned by the destination IP address; the executing body receives 15 time-to-live time-out data packets, and then determines that the number 15 of the received time-to-live time-out data packets is smaller than the target number 19 (the difference between the number 20 of the sent ICMP data packets and 1), and can send 4 TCP data packets or UDP data packets (the difference between the number 15 of the time-to-live time-out data packets and the target number 19) to the target IP address; then, port unreachable data packets returned from the 4 network nodes can be received; finally, the network addresses of 19 network nodes can be resolved from 15 out-of-life time data packets and 4 out-of-reach data packets.
The method provided by the embodiment of the disclosure adopts a detection mode of mixing the ICMP data packet and the TCP/UDP data packet, so that the accuracy of network node detection is improved. Because of some network nodes, ICMP data packets can be detected, but TCP/UDP data packets cannot be detected; whereas some network nodes TCP/UDP packets may be detected, ICMP packets may not.
With further reference to fig. 4, a flow 400 of yet another embodiment of a network testing method for testing network parameters. The test flow 400 for testing network parameters includes the following steps:
step 401, the following adjustment steps are performed: transmitting a reverberation request data packet with the packet length of N and the setting of a non-fragmentation zone bit to a network address to be tested; responding to the received returned echo response data packet and the received target data packet, and determining the packet length N of the transmitted echo request data packet as the maximum transmission unit; responding to the response data packet received back at this time and the response data packet received at the previous time, and increasing the packet length N of the response request data packet; responding to the received returned target data packet and the received target data packet last time, reducing the packet length N of the echo request data packet; and in response to the fact that the returned target data packet is received this time and the echo response data packet is received last time, determining the packet length of the echo request data packet sent last time as the maximum transmission unit.
In this embodiment, step 401 may include sub-steps 4011, 4012, 4013, 4014, and 4015. Wherein:
step 4011, send a ring request packet with a packet length of N and set a non-fragmentation flag to the network address to be tested.
In this embodiment, the network performance to be tested may also include a maximum transmission unit (Maximum Transmission Unit, MTU). The maximum transmission unit is used for informing the opposite party of the maximum size of the acceptable data service unit and indicating the size of the payload acceptable by the sender. The maximum transmission unit is the maximum length of a packet or frame, typically in bytes. If the maximum transmission unit is too large, forwarding is rejected when encountering the router because it cannot handle too large a packet. If too small, the amount of data actually transferred is too small, and thus not practical, because the protocol must have a header added to the packet (or frame).
In this embodiment, the execution body of the network test method (for example, the test apparatus shown in fig. 1) may send a ring request packet with a packet length of N and a set non-fragmentation flag to the network address to be tested. The echo request packet with the non-fragmentation flag bit set sets the non-allowed fragmentation flag DF (Don't Fragment) bit of the echo request packet to 1. Here, the types of the echo request packets are generally as follows: type=8, code=0, df=1.
Step 4012, determining whether the received returned data packet is a echo reply data packet.
In this embodiment, the executing body may determine whether the data packet received and returned at this time is a response data packet. Here, the types of the above-mentioned echo reply packet are generally as follows: type=0, code=0.
Step 4013, if the returned echo response data packet is received this time, determining whether the data packet received last time is the target data packet.
In this embodiment, if it is determined in step 4012 that the echo reply packet is received this time, the execution body may determine whether the previously received packet is the target packet. The target packet is usually a packet that needs to be fragmented but does not allow the flag bit to be set (Fragmentation needed but no flag. Bit set), and the type of the target packet is usually as follows: type=3, code=4.
If the target packet was received the previous time, the execution body may execute step 4014.
If the target packet has not been received the previous time, the execution body may execute step 4015.
In step 4014, if the target data packet is received last time, the packet length N of the echo request data packet sent this time is determined as the maximum transmission unit.
In this embodiment, if it is determined in step 4013 that the target packet was received last time, the execution body may determine the packet length N of the echo request packet sent this time as the maximum transmission unit.
Here, after the maximum transmission unit is determined, the current value of the maximum transmission unit may be changed to the determined value of the maximum transmission unit.
In step 4015, if the target packet was not received the previous time, it is determined whether the previously received packet is a response packet.
In this embodiment, if it is determined in step 4013 that the target packet has not been received last time, the execution body may determine whether the previously received packet is a response packet.
In step 4016, if the echo reply packet is received last time, the packet length N of the echo request packet is increased.
In this embodiment, if it is determined in step 4015 that the echo reply packet was received last time, the execution body may increase the packet length N of the echo request packet. Here, the increased packet length may be M, that is, the packet length of the increased echo request packet is n+m. It should be noted that the maximum value of the packet length is generally not more than 1500.
Step 4017, if the received returned data packet is not the echo response data packet, determining whether the received returned data packet is the target data packet.
In this embodiment, if it is determined in step 4012 that the received returned packet is not a echo reply packet, the execution body may determine whether the received returned packet is a target packet.
If the target packet is received this time, the execution body may execute step 4018.
Step 4018, if the returned target packet is received this time, it is determined whether the previous received packet is a response packet.
In this embodiment, if it is determined in step 4017 that the target packet is received this time, the executing body may determine whether the previously received packet is a response packet.
If a response packet is received the previous time, the execution body may execute step 4019.
In step 4019, if the echo reply packet is received last time, the packet length of the echo request packet sent last time is determined as the maximum transmission unit.
In this embodiment, if it is determined in step 4018 that the echo reply packet was received last time, the execution body may determine the packet length of the echo request packet sent last time as the maximum transmission unit. And then, outputting the determined numerical value of the maximum transmission unit as a test result.
Here, after the maximum transmission unit is determined, the current value of the maximum transmission unit may be changed to the determined value of the maximum transmission unit.
In step 40110, if no echo reply packet has been received in the previous time, it is determined whether the previously received packet is the target packet.
In this embodiment, if it is determined in step 4018 that the echo reply packet was received last time, the execution body may determine whether the packet received last time is the target packet.
If the target packet was received the previous time, the execution body may execute step 40111.
In step 40111, if the target packet is received last time, the packet length N of the echo request packet is reduced.
In this embodiment, if it is determined in step 40110 that the target packet was received last time, the execution body may reduce the packet length N of the echo request packet. Here, the reduced packet length may be I, i.e., the reduced echo request packet has a packet length of N-I. It should be noted that I may be equal to M or I may be equal to M.
Step 402, the echo request packet with the adjusted packet length is taken as the echo request packet with the packet length of N, and the adjustment step is continuously executed.
In this embodiment, the execution body may use the echo request packet with the adjusted packet length as the echo request packet with the packet length N, that is, may use the echo request packet with the increased packet length in step 4016 or the echo request packet with the reduced packet length in step 40111 as the echo request packet with the packet length N, and continue to execute the adjustment step (i.e., sub-steps 4011-40111). It should be noted that, the echo request packet after the packet length adjustment also needs to set the non-fragmentation flag bit to 1.
The method provided by the embodiment of the present disclosure confirms the type of the data packet returned this time and the type of the data packet returned last time, so as to adjust the packet length of the transmitted echo request data packet until the maximum transmission unit is determined, thereby providing a detection mode of the maximum transmission unit.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a network testing apparatus, where the apparatus embodiment corresponds to the method embodiment shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the network testing apparatus 500 of the present embodiment includes: a receiving unit 501, a testing unit 502 and a processing unit 503. The receiving unit 501 is configured to receive a network test instruction, where the network test instruction includes a network address to be tested; the test unit 502 is configured to test at least two network parameters by using a network address to be tested, so as to obtain a test result; the processing unit 503 is configured to process the test results of at least two network parameters, and output the processed test results.
In this embodiment, specific processes of the receiving unit 501, the testing unit 502, and the processing unit 503 of the network testing apparatus 500 may refer to steps 201, 202, and 203 in the corresponding embodiment of fig. 2.
In some alternative implementations, the network parameters to be tested may include network node probing; and the testing unit 502 may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the test unit 502 may send a plurality of echo request packets to the network address to be tested, and receive the packets returned from at least one network node; the network address of the network node may then be resolved from the returned data packet.
In some alternative implementations, the testing unit 502 may be further configured to send a plurality of echo request packets to the network address to be tested, and receive the packets returned from at least one network node by: the test unit 502 may sequentially send a plurality of first echo request packets to the network address to be tested until receiving an echo response packet returned by the network address to be tested, where the first echo request packet is an internet control message protocol packet, and a survival time value of the first echo request packet with a preceding sending time is smaller than a survival time value of the first echo request packet with a subsequent sending time; then, a first abnormal data packet returned from at least one network node can be received, wherein the first abnormal data packet comprises a time-to-live overtime data packet; then, determining whether the number of the received first abnormal data packets is smaller than a target number, wherein the target number is the difference between the number of the sent first echo request data packets and the first value; if yes, determining a difference value between the target number and the number of the received abnormal data packets; then, the difference value second echo request data packets can be sent to the network address to be tested, wherein the second echo request data packets are transmission control protocol data packets or user datagram protocol data packets; finally, a second exception packet returned from the at least one network node may be received, wherein the second exception packet includes a port unreachable packet.
In some alternative implementations, the network parameters to be tested may include network delay; and the testing unit 502 may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the test unit 502 may send a response request packet to the parsed network address of at least one network node, and record the sending time; then, a response data packet returned from the at least one network node can be received; then, for each network node of the at least one network node, a time difference between a time of sending the echo request data packet and a time of returning the echo reply data packet corresponding to the network node may be determined as a network delay of the network node.
In some alternative implementations, the network parameters to be tested may include a maximum transmission unit; and the testing unit 502 may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the test unit 502 may perform the following adjustment steps: transmitting a reverberation request data packet with the packet length of N and the setting of a non-fragmentation zone bit to the network address to be tested; responding to the received returned echo response data packet and the received target data packet, and determining the packet length N of the transmitted echo request data packet as the maximum transmission unit; responding to the response data packet received back at this time and the response data packet received at the previous time, and increasing the packet length N of the response request data packet; responding to the received returned target data packet and the received target data packet last time, reducing the packet length N of the echo request data packet; responding to the received returned target data packet and the received echo response data packet at the previous time, and determining the packet length of the echo request data packet sent at the previous time as a maximum transmission unit, wherein the target data packet is a data packet which needs to be fragmented but is not provided with a flag bit; and then, the echo request data packet with the adjusted packet length can be used as the echo request data packet with the packet length of N, and the adjustment step can be continuously executed.
In some alternative implementations, the network parameters to be tested may include wireless network throughput; and the testing unit 502 may be further configured to test at least two network parameters by using the network address to be tested in the following manner, to obtain a test result: the test unit 502 may send a speed measurement command to the target router, and perform data transmission with the target router based on the speed measurement command; thereafter, a total amount of data and a time consumption for transmission with the target router may be determined, and a wireless network throughput may be determined using the total amount of data and the time consumption.
In some optional implementations, the speed measurement instruction may indicate uploading data; and the test unit 502 may be further configured to perform data transmission with the target router based on the speed measurement command in the following manner: the test unit 502 may send data to the target router.
In some alternative implementations, the speed measurement instruction may indicate to download data; and the test unit 502 may be further configured to perform data transmission with the target router based on the speed measurement command in the following manner: the test unit 502 may receive data transmitted from the target router.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the test device of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. Test devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601. It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a network test instruction, wherein the network test instruction comprises a network address to be tested; testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and processing the test results of at least two network parameters, and outputting the processed test results.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
According to one or more embodiments of the present disclosure, there is provided a network testing method including: receiving a network test instruction, wherein the network test instruction comprises a network address to be tested; testing at least two network parameters by utilizing the network address to be tested to obtain a test result; and processing the test results of at least two network parameters, and outputting the processed test results.
According to one or more embodiments of the present disclosure, the network parameters to be tested include network node probing; and testing at least two network parameters by utilizing the network address to be tested to obtain a test result, wherein the test result comprises the following steps: transmitting a plurality of echo request data packets to a network address to be tested, and receiving the data packets returned from at least one network node; and resolving the network address of the network node from the returned data packet.
According to one or more embodiments of the present disclosure, sending a plurality of echo request packets to a network address to be tested, receiving packets returned from at least one network node, includes: sequentially sending a plurality of first reverberation request data packets to a network address to be tested until a reverberation response data packet returned by the network address to be tested is received, wherein the first reverberation request data packet is an internet control message protocol data packet, and the survival time value of the first reverberation request data packet with the front sending time is smaller than that of the first reverberation request data packet with the rear sending time; receiving a first abnormal data packet returned from at least one network node, wherein the first abnormal data packet comprises a time-to-live overtime data packet; determining whether the number of the received first abnormal data packets is smaller than a target number, wherein the target number is the difference between the number of the sent first echo request data packets and a first value; if yes, determining a difference value between the target quantity and the quantity of the received abnormal data packets; sending a difference number of second reverberation request data packets to the network address to be tested, wherein the second reverberation request data packets are transmission control protocol data packets or user datagram protocol data packets; and receiving a second abnormal data packet returned from the at least one network node, wherein the second abnormal data packet comprises a port unreachable data packet.
According to one or more embodiments of the present disclosure, the network parameters to be tested include network delay; and testing at least two network parameters by utilizing the network address to be tested to obtain a test result, wherein the test result comprises the following steps: sending a echo request data packet to the analyzed network address of at least one network node, and recording the sending time; receiving a response data packet returned from at least one network node; for each of the at least one network node, determining a time difference between a time of sending the echo request data packet and a time of returning the echo reply data packet corresponding to the network node as a network delay of the network node.
According to one or more embodiments of the present disclosure, the network parameters to be tested include a maximum transmission unit; and testing at least two network parameters by utilizing the network address to be tested to obtain a test result, wherein the test result comprises the following steps: the following adjustment steps are performed: transmitting a reverberation request data packet with the packet length of N and the setting of a non-fragmentation zone bit to a network address to be tested; responding to the received returned echo response data packet and the received target data packet, and determining the packet length N of the transmitted echo request data packet as the maximum transmission unit; responding to the response data packet received back at this time and the response data packet received at the previous time, and increasing the packet length N of the response request data packet; responding to the received returned target data packet and the received target data packet last time, reducing the packet length N of the echo request data packet; responding to the received returned target data packet and the received echo response data packet at the previous time, and determining the packet length of the echo request data packet sent at the previous time as a maximum transmission unit, wherein the target data packet is a data packet which needs to be fragmented but is not provided with a flag bit; and taking the echo request data packet with the adjusted packet length as an echo request data packet with the packet length of N, and continuously executing the adjustment step.
According to one or more embodiments of the present disclosure, the network parameters to be tested include wireless network throughput; and testing at least two network parameters by utilizing the network address to be tested to obtain a test result, wherein the test result comprises the following steps: sending a speed measuring instruction to a target router, and carrying out data transmission with the target router based on the speed measuring instruction; the total data volume and the time consumption of transmissions with the target router are determined, and the wireless network throughput is determined using the total data volume and the time consumption.
According to one or more embodiments of the present disclosure, the tachometer instructions indicate uploading data; and based on the speed measurement instruction, carrying out data transmission with the target router, including: and sending the data to the target router.
According to one or more embodiments of the present disclosure, the tachometer instructions indicate that data is to be downloaded; and based on the speed measurement instruction, carrying out data transmission with the target router, including: and receiving the data sent by the target router.
According to one or more embodiments of the present disclosure, there is provided a network test apparatus including: the network test device comprises a receiving unit, a test unit and a test unit, wherein the receiving unit is used for receiving a network test instruction, and the network test instruction comprises a network address to be tested; the testing unit is used for testing at least two network parameters by utilizing the network address to be tested to obtain a testing result; and the processing unit is used for processing the test results of the at least two network parameters and outputting the processed test results.
According to one or more embodiments of the present disclosure, the network parameters to be tested include network node probing; the test unit is further configured to test at least two network parameters by using the network address to be tested in the following manner, so as to obtain a test result: transmitting a plurality of echo request data packets to a network address to be tested, and receiving the data packets returned from at least one network node; and resolving the network address of the network node from the returned data packet.
According to one or more embodiments of the present disclosure, the test unit is further configured to send a plurality of echo request packets to the network address to be tested, and receive the packets returned from the at least one network node by: sequentially sending a plurality of first reverberation request data packets to a network address to be tested until a reverberation response data packet returned by the network address to be tested is received, wherein the first reverberation request data packet is an internet control message protocol data packet, and the survival time value of the first reverberation request data packet with the front sending time is smaller than that of the first reverberation request data packet with the rear sending time; receiving a first abnormal data packet returned from at least one network node, wherein the first abnormal data packet comprises a time-to-live overtime data packet; determining whether the number of the received first abnormal data packets is smaller than a target number, wherein the target number is the difference between the number of the sent first echo request data packets and a first value; if yes, determining a difference value between the target quantity and the quantity of the received abnormal data packets; sending a difference number of second reverberation request data packets to the network address to be tested, wherein the second reverberation request data packets are transmission control protocol data packets or user datagram protocol data packets; and receiving a second abnormal data packet returned from the at least one network node, wherein the second abnormal data packet comprises a port unreachable data packet.
According to one or more embodiments of the present disclosure, the network parameters to be tested include network delay; the test unit is further configured to test at least two network parameters by using the network address to be tested in the following manner, so as to obtain a test result: sending a echo request data packet to the analyzed network address of at least one network node, and recording the sending time; receiving a response data packet returned from at least one network node; for each of the at least one network node, determining a time difference between a time of sending the echo request data packet and a time of returning the echo reply data packet corresponding to the network node as a network delay of the network node.
According to one or more embodiments of the present disclosure, the network parameters to be tested include a maximum transmission unit; the test unit is further configured to test at least two network parameters by using the network address to be tested in the following manner, so as to obtain a test result: the following adjustment steps are performed: transmitting a reverberation request data packet with the packet length of N and the setting of a non-fragmentation zone bit to a network address to be tested; responding to the received returned echo response data packet and the received target data packet, and determining the packet length N of the transmitted echo request data packet as the maximum transmission unit; responding to the response data packet received back at this time and the response data packet received at the previous time, and increasing the packet length N of the response request data packet; responding to the received returned target data packet and the received target data packet last time, reducing the packet length N of the echo request data packet; responding to the received returned target data packet and the received echo response data packet at the previous time, and determining the packet length of the echo request data packet sent at the previous time as a maximum transmission unit, wherein the target data packet is a data packet which needs to be fragmented but is not provided with a flag bit; and taking the echo request data packet with the adjusted packet length as an echo request data packet with the packet length of N, and continuously executing the adjustment step.
According to one or more embodiments of the present disclosure, the network parameters to be tested include wireless network throughput; the test unit is further configured to test at least two network parameters by using the network address to be tested in the following manner, so as to obtain a test result: sending a speed measuring instruction to a target router, and carrying out data transmission with the target router based on the speed measuring instruction; the total data volume and the time consumption of transmissions with the target router are determined, and the wireless network throughput is determined using the total data volume and the time consumption.
According to one or more embodiments of the present disclosure, the tachometer instructions indicate uploading data; and the test unit is further used for transmitting data with the target router based on the speed measurement instruction in the following manner: and sending the data to the target router.
According to one or more embodiments of the present disclosure, the tachometer instructions indicate that data is to be downloaded; and the test unit is further used for transmitting data with the target router based on the speed measurement instruction in the following manner: and receiving the data sent by the target router.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit, a testing unit, and a processing unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, the receiving unit may also be described as "unit receiving network test instructions".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (9)

1. A network testing method, comprising:
receiving a network test instruction, wherein the network test instruction comprises a network address to be tested;
testing at least two network parameters by using the network address to be tested to obtain a test result, wherein the network parameters to be tested comprise network node detection;
processing the test results of the at least two network parameters, and outputting the processed test results; and
and testing at least two network parameters by using the network address to be tested to obtain a test result, wherein the method comprises the following steps:
Sending a plurality of echo request data packets to the network address to be tested, and receiving the data packets returned from at least one network node;
resolving a network address of a network node from the returned data packet; and
the sending a plurality of echo request data packets to the network address to be tested, and receiving the data packets returned from at least one network node, including:
sequentially sending a plurality of first echo request data packets to the network address to be tested until receiving an echo response data packet returned by the network address to be tested, wherein the first echo request data packet is an internet control message protocol data packet, and the survival time value of the first echo request data packet with the front sending time is smaller than that of the first echo request data packet with the rear sending time;
receiving a first abnormal data packet returned from at least one network node, wherein the first abnormal data packet comprises a time-to-live overtime data packet;
determining whether the number of the received first abnormal data packets is smaller than a target number, wherein the target number is the difference between the number of the sent first echo request data packets and a first numerical value, and the first numerical value is 1;
If yes, determining a difference value between the target number and the number of the received abnormal data packets;
sending the difference value second echo request data packets to the network address to be tested, wherein the second echo request data packets are transmission control protocol data packets or user datagram protocol data packets;
and receiving a second abnormal data packet returned from at least one network node, wherein the second abnormal data packet comprises a port unreachable data packet.
2. The method of claim 1, wherein the network parameter to be tested comprises a network delay; and
and testing at least two network parameters by using the network address to be tested to obtain a test result, wherein the method comprises the following steps:
sending a echo request data packet to the analyzed network address of at least one network node, and recording the sending time;
receiving a echo response data packet returned from the at least one network node;
for each network node of the at least one network node, determining a time difference between a time of sending the echo request data packet and a time of returning the echo response data packet corresponding to the network node as a network delay of the network node.
3. The method according to claim 1, characterized in that the network parameters to be tested comprise a maximum transmission unit; and
and testing at least two network parameters by using the network address to be tested to obtain a test result, wherein the method comprises the following steps:
the following adjustment steps are performed: transmitting a reverberation request data packet with the packet length of N and the setting of a non-fragmentation zone bit to the network address to be tested; responding to the received returned echo response data packet and the received target data packet, and determining the packet length N of the transmitted echo request data packet as the maximum transmission unit; responding to the response data packet received back at this time and the response data packet received at the previous time, and increasing the packet length N of the response request data packet; responding to the received returned target data packet and the received target data packet last time, reducing the packet length N of the echo request data packet; responding to the received returned target data packet and the received echo response data packet at the previous time, and determining the packet length of the echo request data packet sent at the previous time as a maximum transmission unit, wherein the target data packet is a data packet which needs to be fragmented but is not provided with a flag bit;
And taking the echo request data packet with the adjusted packet length as an echo request data packet with the packet length of N, and continuously executing the adjustment step.
4. The method of claim 1, wherein the network parameter to be tested comprises wireless network throughput; and
and testing at least two network parameters by using the network address to be tested to obtain a test result, wherein the method comprises the following steps:
a speed measuring instruction is sent to a target router, and data transmission is carried out with the target router based on the speed measuring instruction;
determining a total amount of data and time spent for transmission with the target router, and determining wireless network throughput using the total amount of data and the time spent.
5. The method of claim 4, wherein the tachometer instructions indicate uploading data; and
based on the speed measurement instruction, the data transmission with the target router comprises the following steps:
and sending data to the target router.
6. The method of claim 4, wherein the tachometer instructions indicate downloading data; and
based on the speed measurement instruction, the data transmission with the target router comprises the following steps:
And receiving the data sent by the target router.
7. A network testing apparatus, comprising:
the network test device comprises a receiving unit and a test unit, wherein the receiving unit is used for receiving a network test instruction, and the network test instruction comprises a network address to be tested;
the test unit is used for testing at least two network parameters by utilizing the network address to be tested to obtain a test result, wherein the network parameters to be tested comprise network node detection;
the processing unit is used for processing the test results of the at least two network parameters and outputting the processed test results; and
the test unit is further configured to test at least two network parameters by using the network address to be tested in the following manner, so as to obtain a test result:
sending a plurality of echo request data packets to the network address to be tested, and receiving the data packets returned from at least one network node;
resolving a network address of a network node from the returned data packet; and
the test unit is further configured to send a plurality of echo request packets to the network address to be tested, and receive packets returned from at least one network node by:
Sequentially sending a plurality of first echo request data packets to the network address to be tested until receiving an echo response data packet returned by the network address to be tested, wherein the first echo request data packet is an internet control message protocol data packet, and the survival time value of the first echo request data packet with the front sending time is smaller than that of the first echo request data packet with the rear sending time;
receiving a first abnormal data packet returned from at least one network node, wherein the first abnormal data packet comprises a time-to-live overtime data packet;
determining whether the number of the received first abnormal data packets is smaller than a target number, wherein the target number is the difference between the number of the sent first echo request data packets and a first numerical value, and the first numerical value is 1;
if yes, determining a difference value between the target number and the number of the received abnormal data packets;
sending the difference value second echo request data packets to the network address to be tested, wherein the second echo request data packets are transmission control protocol data packets or user datagram protocol data packets;
and receiving a second abnormal data packet returned from at least one network node, wherein the second abnormal data packet comprises a port unreachable data packet.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202111285675.1A 2021-11-01 2021-11-01 Network testing method and device and electronic equipment Active CN114071544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111285675.1A CN114071544B (en) 2021-11-01 2021-11-01 Network testing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111285675.1A CN114071544B (en) 2021-11-01 2021-11-01 Network testing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114071544A CN114071544A (en) 2022-02-18
CN114071544B true CN114071544B (en) 2024-03-15

Family

ID=80236386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111285675.1A Active CN114071544B (en) 2021-11-01 2021-11-01 Network testing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114071544B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037664B (en) * 2022-05-31 2023-09-08 深圳市共进电子股份有限公司 Network connection testing method and device, repeater and storage medium
CN115022207B (en) * 2022-06-01 2023-03-28 山东云天安全技术有限公司 Network stability determination method and device, computer equipment and readable storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931565A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Network segment detection method and device
CN102625332A (en) * 2011-11-01 2012-08-01 北京小米科技有限责任公司 Method for detecting network routing
US8856211B1 (en) * 2010-09-30 2014-10-07 Amazon Technologies, Inc. Flexible network testing
CN106067854A (en) * 2016-08-16 2016-11-02 中国联合网络通信集团有限公司 A kind of network quality detection method and equipment
CN106452949A (en) * 2016-09-27 2017-02-22 上海斐讯数据通信技术有限公司 Equipment, system and method for detecting network delay of router
CN107172648A (en) * 2017-07-13 2017-09-15 京信通信系统(中国)有限公司 A kind of network test method and equipment
CN107181644A (en) * 2017-06-16 2017-09-19 北京小度信息科技有限公司 For the method and apparatus for the network performance for monitoring network application
CN108737204A (en) * 2017-04-18 2018-11-02 阿里巴巴集团控股有限公司 A kind of acquisition method and communication terminal of network performance information
CN108737206A (en) * 2017-04-24 2018-11-02 中兴通讯股份有限公司 Route selecting method, device and its computer equipment of network channel
CN112311620A (en) * 2019-10-25 2021-02-02 北京京东尚科信息技术有限公司 Method, apparatus, electronic device and readable medium for diagnosing network
CN112491654A (en) * 2020-11-19 2021-03-12 广州力挚网络科技有限公司 Performance test method and device, electronic equipment and storage medium
CN112583663A (en) * 2020-12-08 2021-03-30 吉林大学 Automatic network performance testing method based on domestic operating system
CN112953791A (en) * 2021-01-29 2021-06-11 北京字节跳动网络技术有限公司 Network detection method and device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8953479B2 (en) * 2012-08-07 2015-02-10 Ca, Inc. System and method for license enforcement for data center monitoring applications
SE540705C2 (en) * 2017-02-27 2018-10-16 Airmobile Ab Mobile radio network node and method for estimating the capacity of a link in a radio communications network

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931565A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Network segment detection method and device
US8856211B1 (en) * 2010-09-30 2014-10-07 Amazon Technologies, Inc. Flexible network testing
CN102625332A (en) * 2011-11-01 2012-08-01 北京小米科技有限责任公司 Method for detecting network routing
CN106067854A (en) * 2016-08-16 2016-11-02 中国联合网络通信集团有限公司 A kind of network quality detection method and equipment
CN106452949A (en) * 2016-09-27 2017-02-22 上海斐讯数据通信技术有限公司 Equipment, system and method for detecting network delay of router
CN108737204A (en) * 2017-04-18 2018-11-02 阿里巴巴集团控股有限公司 A kind of acquisition method and communication terminal of network performance information
CN108737206A (en) * 2017-04-24 2018-11-02 中兴通讯股份有限公司 Route selecting method, device and its computer equipment of network channel
CN107181644A (en) * 2017-06-16 2017-09-19 北京小度信息科技有限公司 For the method and apparatus for the network performance for monitoring network application
CN107172648A (en) * 2017-07-13 2017-09-15 京信通信系统(中国)有限公司 A kind of network test method and equipment
CN112311620A (en) * 2019-10-25 2021-02-02 北京京东尚科信息技术有限公司 Method, apparatus, electronic device and readable medium for diagnosing network
CN112491654A (en) * 2020-11-19 2021-03-12 广州力挚网络科技有限公司 Performance test method and device, electronic equipment and storage medium
CN112583663A (en) * 2020-12-08 2021-03-30 吉林大学 Automatic network performance testing method based on domestic operating system
CN112953791A (en) * 2021-01-29 2021-06-11 北京字节跳动网络技术有限公司 Network detection method and device, electronic equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DNS服务质量评价模型研究;胡鹏;《中国优秀硕士学位论文全文数据库 信息科技辑》;全文 *
基于ICMP和UDP的非合作网络拓扑发现技术研究与实现;杨时茂;《中国优秀硕士学位论文全文数据库 信息科技辑》;全文 *

Also Published As

Publication number Publication date
CN114071544A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN114071544B (en) Network testing method and device and electronic equipment
US10602399B2 (en) Dynamic content distribution in mobile telecommunications network
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
US20210051112A1 (en) Method and system for determining a path maximum transmission unit (mtu) between endpoints of a generic routing encapsulation (gre) tunnel
CN112788060A (en) Data packet transmission method and device, storage medium and electronic equipment
CN113872870B (en) Method for controlling network congestion and related device
CN110545230B (en) Method and device for forwarding VXLAN message
US20170171092A1 (en) Network analysis and monitoring tool
CN110913270B (en) Live broadcasting method and device
CN108809549B (en) Data transmission method and equipment
CN113114535A (en) Network fault detection method and device and electronic equipment
WO2017135254A1 (en) Terminal, relay device selection device, communication method, relay device selection method, and program
WO2024060408A1 (en) Network attack detection method and apparatus, device and storage medium
WO2023173876A1 (en) Data communication method and apparatus, device and medium
CN108259576B (en) Software and hardware real-time information transmission system and method
CN111309497B (en) Information calling method and device, server, terminal and storage medium
US20170222904A1 (en) Distributed Business Transaction Specific Network Data Capture
CN114039926A (en) Transmission control protocol determining method and device, readable medium and electronic equipment
CN112769593A (en) Network monitoring system and network monitoring method
CN112436951A (en) Method and device for predicting flow path
CN115632995B (en) Data feature extraction method, equipment and computer medium for industrial control network
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN111953804B (en) Network data transmission method, device, medium and electronic equipment
CN115396355A (en) Network path detection method and device and electronic equipment
CN115150333B (en) Congestion control method, congestion control device, computer equipment and storage medium

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