CN109921962B - Bandwidth measuring method, device, computer readable storage medium and computer equipment - Google Patents

Bandwidth measuring method, device, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN109921962B
CN109921962B CN201910301810.3A CN201910301810A CN109921962B CN 109921962 B CN109921962 B CN 109921962B CN 201910301810 A CN201910301810 A CN 201910301810A CN 109921962 B CN109921962 B CN 109921962B
Authority
CN
China
Prior art keywords
link
icmp
internet protocol
network
user terminal
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
CN201910301810.3A
Other languages
Chinese (zh)
Other versions
CN109921962A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910301810.3A priority Critical patent/CN109921962B/en
Publication of CN109921962A publication Critical patent/CN109921962A/en
Application granted granted Critical
Publication of CN109921962B publication Critical patent/CN109921962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a bandwidth measurement method, a device, a computer readable storage medium and a computer device, wherein the method comprises the following steps: acquiring an internet protocol address corresponding to an object identifier to be detected; sending a User Datagram Protocol (UDP) message to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to an object identifier to be detected; when the link is detected to be changed from a first network state to a second network state, acquiring the maximum broadband rate corresponding to the link in the network available state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state; and processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link with the target network equipment. The scheme provided by the application can improve the accuracy of bandwidth measurement.

Description

Bandwidth measuring method, device, computer readable storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a bandwidth measurement method and apparatus, a computer-readable storage medium, and a computer device.
Background
The available bandwidth from the server to the operator is affected by the factors such as load balance of the machine room upper link, speed limit of the upper link operator, and bandwidth short board of the middle path, and the condition that the construction bandwidth of the operator link is inconsistent with the real available bandwidth often occurs. Then the available bandwidth from the server to the operator needs to be re-measured. In the traditional bandwidth measuring method, an operator needs to deploy network equipment with the maximum bandwidth in advance, a server sends a message to the network equipment of the operator, the network equipment receives the message and returns a response message to a server, and the server calculates the maximum available bandwidth according to the received information. However, the conventional method has a problem that the bandwidth measurement is inaccurate.
Disclosure of Invention
Based on this, it is necessary to provide a bandwidth measurement method, apparatus, computer-readable storage medium and computer device to solve the technical problem of inaccurate bandwidth measurement in the conventional method.
A bandwidth measurement method, comprising: acquiring an internet protocol address corresponding to an object identifier to be detected; sending a User Datagram Protocol (UDP) message to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to an object identifier to be detected; when the link is detected to be changed from a first network state to a second network state, acquiring the maximum broadband rate corresponding to the link in the network available state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state; and processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link with the target network equipment.
A bandwidth measuring device comprising: the acquisition module is used for acquiring an internet protocol address corresponding to the identification of the object to be detected; the sending module is used for sending a User Datagram Protocol (UDP) message to a user terminal corresponding to the internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to the object identifier to be detected; the detection module is used for acquiring the maximum broadband rate corresponding to the link in the available state when the link is detected to be changed from the first network state to the second network state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state; and the processing module is used for processing the maximum available bandwidth of the link between the target network equipment and the link according to the maximum broadband rate corresponding to the link in the network available state.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of: acquiring an internet protocol address corresponding to an object identifier to be detected; sending a User Datagram Protocol (UDP) message to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to an object identifier to be detected; when the link is detected to be changed from a first network state to a second network state, acquiring the maximum broadband rate corresponding to the link in the network available state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state; and processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link with the target network equipment.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of: acquiring an internet protocol address corresponding to an object identifier to be detected; sending a User Datagram Protocol (UDP) message to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to an object identifier to be detected; when the link is detected to be changed from a first network state to a second network state, acquiring the maximum broadband rate corresponding to the link in the network available state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state; and processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link with the target network equipment.
According to the bandwidth measuring method, the bandwidth measuring device, the computer readable storage medium and the computer equipment, the internet protocol address corresponding to the identification of the object to be detected is obtained, and the UDP message is sent to the terminal corresponding to the internet protocol address at an adjustable broadband speed; when the link is detected to change from the first network state to the second network state, the maximum broadband rate corresponding to the available state is obtained, the maximum available bandwidth is obtained through processing, the process of using the flow of the user terminal in the actual situation can be simulated, the measurement scene is close to the actual usage scene, and the accuracy of bandwidth measurement is improved.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a bandwidth measurement method;
FIG. 2 is a flow diagram illustrating a method for bandwidth measurement in one embodiment;
fig. 3 is a schematic flowchart illustrating a process of obtaining a packet loss rate of a link according to an embodiment;
fig. 4 is a schematic flowchart of obtaining a packet loss rate of a link in another embodiment;
FIG. 5 is a flow chart illustrating a bandwidth measurement method according to another embodiment;
fig. 6 is a schematic flow chart illustrating a process of sending a UDP packet to a user equipment corresponding to an ip address in an embodiment;
fig. 7 is a schematic flowchart illustrating a process of obtaining an internet protocol address corresponding to an identifier of an object to be detected in one embodiment;
FIG. 8 is a block diagram showing the structure of a bandwidth measuring apparatus according to an embodiment;
FIG. 9 is a block diagram showing the structure of a bandwidth measuring apparatus according to another embodiment;
FIG. 10 is a block diagram showing a configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a diagram of an application environment of a bandwidth measurement method in one embodiment. The bandwidth measuring method is applied to a bandwidth measuring system. The bandwidth measurement system includes a computer device 110, a target network device 120, and a user terminal 130. The computer device 110, the target network device 120 and the user terminal 130 are connected through a network. The network may be implemented by the computer device 110 as a stand-alone server or as a server cluster comprising a plurality of servers. The computer device 110 may be, for example, a CDN (Content Delivery Network) server, another server, or a terminal. The target network device 120 may be a network device corresponding to the object identifier to be detected, for example, a switch, a server, a routing device, a gateway, or an infinite access point corresponding to the object identifier to be detected. The user terminal 130 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The number of the computer devices 110, the target network devices 120 and the user terminals 130 is not limited. The bandwidth measurement procedure may be applied to the computer device 110.
In one embodiment, as shown in FIG. 2, a bandwidth measurement method is provided. The embodiment is mainly illustrated by applying the method to the computer device 110 in fig. 1. Referring to fig. 2, the bandwidth measurement method specifically includes the following steps:
step 202, acquiring an internet protocol address corresponding to the object identifier to be detected.
The object to be detected may be an operator or an enterprise. Such as mobile, internet, telecommunication or radio, etc. The object to be detected may particularly also distinguish nationalities, for example, china, usa or europe. The object identification to be detected is a unique identification used for distinguishing the object to be detected. The object identifier to be detected may specifically be composed of at least one of characters, numbers or symbols. The Internet Protocol Address refers to an IP Address (Internet Protocol Address) used for marking a computer in a network. The number of internet protocol addresses is not limited, and may be any number of internet protocol addresses.
Specifically, when the bandwidth measurement program receives a bandwidth measurement instruction, a large number of internet protocol addresses corresponding to the object identifier to be detected are acquired from a service access log stored in the server or from an internet protocol address database. For example, the bandwidth measurement program acquires a large number of internet protocol addresses corresponding to the mobile operator.
And 204, sending a User Datagram Protocol (UDP) message to a user terminal corresponding to the Internet protocol address at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to the object identifier to be detected.
The adjustable broadband rate means that the broadband rate is variable, for example, the broadband rate may be a broadband rate preset in the server, such as 5GB/s (Gigabyte per second), 6GB/s, and the like, but is not limited thereto. The broadband rate may specifically also be adjusted according to network congestion conditions. The wideband rate may specifically be presented in the form of a value of the wideband rate or in a hierarchical manner. For example, the primary wideband rate may correspond to 5GB/s, the secondary wideband rate may correspond to 6GB/s, etc. without limitation. The UDP packet may include a header and any packet data. After the UDP packet is sent, the server corresponding to the bandwidth measurement program cannot know whether the UDP packet arrives safely and completely. The size of the message data may be set according to the bandwidth or broadband rate between the target network device and the user. Network congestion is an overloaded network condition. The demand of user terminals on network resources, such as link bandwidth, during network congestion exceeds the inherent bandwidth capacity.
Specifically, the bandwidth measurement program establishes a network connection with the target network device and the user terminal corresponding to the internet protocol address. When the bandwidth measurement program is located in a server, the bandwidth measurement program serially sends a UDP message to a user terminal corresponding to an Internet protocol address through the target network device at a first broadband speed. The bandwidth measurement program may also send UDP packets serially to the user terminal corresponding to the internet protocol address at, but not limited to, the second broadband rate, the third broadband rate, etc. And sending the UDP message at least once correspondingly at each broadband rate. The UDP packet corresponding to the adjustable broadband rate may be used to cause a link between the server and the target network device corresponding to the object identifier to be detected to generate network congestion. The UDP packet corresponding to the adjustable broadband rate may also be used to enable a link between the server and the target network device corresponding to the object identifier to be detected to be in a network available state.
In this embodiment, the adjustment method of the broadband rate includes: and the broadband rate is adjusted by controlling the sending frequency of the UDP message. Specifically, the bandwidth measurement procedure increases the broadband rate by increasing the transmission frequency of UDP packets. Alternatively, the bandwidth measurement procedure reduces the broadband rate by reducing the transmission frequency of UDP packets. For example, the bandwidth measurement program may control the sending frequency of the UDP packet to be one thousand times per second, that is, 0.001GB/ms, and then the broadband rate is 1 GB/s. The bandwidth measurement program can increase the sending frequency of the UDP message to be two thousand times per second, that is, 0.002GB/s, and then the broadband rate is 2 GB/s.
In this embodiment, the adjustment method of the broadband rate includes: and the broadband rate is adjusted by controlling the message data size in the UDP message. Specifically, the bandwidth measurement procedure increases the broadband rate by increasing the packet data size in the UDP packet. Or the bandwidth measurement procedure reduces the broadband rate by reducing the message data size in the UDP message. For example, the bandwidth measurement program may set the size of the UDP packet to 4M, and then 256 UDP packets with the size of 4M are sent within 1 second, so that the broadband rate is 1 GB/s. The bandwidth measurement program can set the size of the UDP message to be 8M, and then 256 UDP messages with the size of 8M are sent within 1 second, so that the broadband rate can be 2 GB/s.
In this embodiment, when each of the plurality of servers runs the bandwidth measuring program, the bandwidth measuring program in the plurality of servers concurrently sends the UDP packet to the terminal corresponding to the internet protocol address.
Step 206, when detecting that the link changes from the first network state to the second network state, acquiring the maximum broadband rate corresponding to the link in the available state, wherein one of the first network state and the second network state is the network available state, and the other is the network congestion state.
Specifically, when it is detected that the link between the server and the target network device changes from the network available state to the network congestion state through a packet loss condition or a delay condition, the bandwidth measurement program acquires the maximum broadband rate corresponding to the link in the available state. Or, when detecting that the link between the server and the target network device changes from the network congestion state to the network available state through a packet loss condition or a delay condition, the bandwidth measurement program acquires the maximum broadband rate corresponding to the link in the available state. The packet loss condition refers to the packet loss rate or the corresponding packet loss number when the total number of the transmitted data packets is the same, and the like. For example, 1000 data packets are fixedly sent, and 900 data packets are returned, the number of packet loss is 100, and the packet loss rate is 10%, and the bandwidth measurement program can obtain the packet loss condition through the number of received data packets or the packet loss rate.
And step 208, processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link with the target network device.
The maximum available bandwidth refers to the maximum amount of data that can pass through the link per unit time.
Specifically, the bandwidth measurement program processes the maximum bandwidth rate corresponding to the link in the network available state according to the conversion relationship between the bandwidth rate and the bandwidth to obtain the maximum available bandwidth of the link before the target network device. For example, a wideband rate of 256KB/s corresponds to a bandwidth of 2M/s.
According to the bandwidth measuring method, the internet protocol address corresponding to the to-be-detected object identifier is obtained, the UDP message is sent to the terminal corresponding to the internet protocol address at an adjustable broadband speed, and the UDP message is a connectionless-oriented protocol and has the characteristics of low resource consumption and high processing speed, so that network equipment does not need to be deployed in advance, the user terminals do not need to be kept in an online state for interaction, and all the user terminals do not need to receive the UDP message, and the bandwidth measuring method is low in cost, high in operability and good in universality; when the link is detected to change from the first network state to the second network state, the maximum broadband rate corresponding to the available state is obtained, the maximum available bandwidth is obtained through processing, the process of using the flow of the user terminal in the actual situation can be simulated, the measurement scene is close to the actual usage scene, and the accuracy of bandwidth measurement is improved.
In one embodiment, when each server in the plurality of servers runs the bandwidth measurement program, and the target network devices corresponding to one object identifier to be detected are multiple, the bandwidth measurement program adds the maximum available bandwidth of the link measured by each server for each target network device to obtain the maximum available bandwidth of the link between all the servers and all the target network devices. The bandwidth measuring method can be applied to the condition that a plurality of links are arranged between the server and the target network equipment, and has high operability and simple calculation.
In one embodiment, the detection method of the congestion status includes: acquiring the packet loss rate of a link; and when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in a network congestion state.
The packet loss rate is a ratio of the number of lost packets to the number of transmitted packets. The data packet may specifically be an ICMP (Internet Control Message Protocol) packet or a TCP (Transmission Control Protocol) packet. The specific expression of the packet loss rate can be percentage, decimal, fraction, or the like. The packet loss rate threshold may refer to an upper limit value of packet loss.
Specifically, the bandwidth measurement program may obtain the packet loss rate of the link through the ping command. The Ping command refers to a command under the Windows, Unix or Linux system. ping also belongs to a communication protocol, and it is possible to check whether the network is connected or not by using a "ping" command. And when the packet loss rate of the link is detected to be greater than the packet loss rate threshold value, determining that the link is in a network congestion state by the bandwidth measurement program. For example, if the packet loss rate threshold is 5%, when the packet loss rate of the link is greater than 5%, the bandwidth measurement program determines that the link is in a network congestion state.
In this embodiment, when the packet loss rate of the link is less than or equal to the packet loss rate threshold, it is determined that the link is in a network available state. For example, if the packet loss rate threshold is 5%, the bandwidth measurement procedure determines that the link is in a network available state when the packet loss rate of the link is less than or equal to 5%.
According to the bandwidth measurement method, the packet loss rate of the link is obtained, when the packet loss rate of the link is greater than the packet loss rate threshold, the link is determined to be in the congestion state, whether the network is in the congestion state or not can be checked, the packet loss rate error caused by reasons except network congestion can be avoided to a certain extent through the packet loss rate threshold, and the accuracy of bandwidth measurement is improved.
In an embodiment, as shown in fig. 3, obtaining a packet loss rate of a link includes:
step 302, sending an internet control message protocol ICMP message to at least one of the target network devices.
Wherein, one object identifier to be detected can correspond to a plurality of target network devices. The ICMP packet is mainly used for transmitting control information, including packet loss rate, between the ue and the network device. The ICMP message includes an IP address and an ICMP header corresponding to the target network device. The number of ICMP messages is not limited.
Specifically, the bandwidth measurement program obtains an IP address corresponding to the target network device. When the bandwidth measuring program sends the UDP message to the user terminal corresponding to the Internet protocol address at an adjustable broadband speed, the predetermined number of ICMP messages are also sent to at least one target network device through the Ping command and the IP address.
Step 304, receiving the ICMP echo message returned by the target network device.
Specifically, after receiving the ICMP message sent by the bandwidth measurement program, the target network device returns an ICMP echo message to the target network device. And the bandwidth measuring program receives an ICMP echo message returned by the target network equipment.
Step 306, determining the packet loss rate of the link between the target network device and the destination network device according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
Specifically, the bandwidth measurement program acquires the number of ICMP messages sent. And the bandwidth measuring program counts the quantity of ICMP echo messages returned by the target network equipment. And the bandwidth measuring program determines the packet loss rate of a link between the server and the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP messages. The calculation method may specifically be that the packet loss rate is (the number of ICMP messages to be sent-the number of ICMP messages to be returned)/the number of ICMP messages to be sent × 100%.
The bandwidth measuring method transmits the ICMP message to at least one target network device in the target network devices, receives the ICMP response message returned by the target network devices, determines the packet loss rate according to the number of the transmitted messages and the response message, and can detect the network state only by transmitting the ICMP message to at least one target network device, thereby having strong operability and low cost.
In an embodiment, as shown in fig. 4, obtaining a packet loss rate of a link includes:
step 402, selecting at least one user terminal capable of responding ICMP message as target user terminal from user terminals corresponding to Internet protocol address.
The ue capable of responding ICMP message also refers to a ue capable of responding ping command.
Specifically, before the internet protocol address corresponding to the object identifier to be detected is acquired, or after the internet protocol address corresponding to the object identifier to be detected is acquired, the bandwidth measurement program may send an ICMP message to the user terminal corresponding to the IP address corresponding to the object identifier to be detected through the Ping instruction. The user terminal receives ICMP message and returns ICMP echo message to the bandwidth measuring program. The bandwidth measurement program determines that the IP address is a live (alive) IP address. When the user terminal corresponding to the IP address cannot return the ICMP response message to the server, the bandwidth measurement program determines that the IP address is not a live IP address, so that the bandwidth measurement program cannot send the ICMP message to the user terminal corresponding to the IP address which cannot return the ICMP response message when detecting the network state.
And when the bandwidth measurement program receives the ICMP response message, selecting at least one user terminal capable of responding the ICMP message as a target user terminal.
Step 404, sending ICMP message to the target user terminal.
Specifically, when the bandwidth measurement program sends a UDP message to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, an ICMP message is also sent to at least one target user terminal through the target network device.
Step 406, receiving the ICMP echo message returned by the target ue.
Specifically, after receiving the ICMP message sent by the bandwidth measurement program, the target user terminal returns an ICMP echo message to the server where the bandwidth measurement program is located. And the bandwidth measuring program receives an ICMP response message returned by the target user terminal.
Step 408, determining the packet loss rate of the link between the target network device and the destination network device according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
Specifically, the bandwidth measurement program acquires the number of ICMP messages sent. And the bandwidth measuring program counts the quantity of ICMP echo messages returned by the target user terminal. And the bandwidth measuring program determines the packet loss rate of a link between the server and the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP messages. The calculation method may specifically be that the packet loss rate is (the number of ICMP messages to be sent-the number of ICMP messages to be returned)/the number of ICMP messages to be sent × 100%.
According to the bandwidth measuring method, at least one user terminal capable of responding ICMP messages is selected from user terminals corresponding to Internet protocol addresses as a target user terminal, the target terminal can be ensured to be in an alive (alive) state, the ICMP messages are sent to the online user terminal at least, the ICMP response messages returned by the target user terminal are received, the packet loss rate of a link between the user terminal and the target network equipment is determined according to the number of the sent ICMP messages and the number of the returned ICMP response messages, the packet loss rate of the link between the user terminal and the target network equipment can also be determined, the network state can be detected, and the method is strong in operability and low in cost.
In one embodiment, obtaining the packet loss rate of the link includes: receiving an ICMP message sent by a user terminal; sending an ICMP response message to the user terminal; and receiving a packet loss rate value returned by the user terminal, wherein the packet loss rate value is determined by the user terminal according to the number of the sent ICMP messages and the number of the ICMP echo messages.
Specifically, the user terminal sends an ICMP message to the server where the bandwidth measurement program is located through the Ping command. And the bandwidth measuring program receives an ICMP message sent by the user terminal. The bandwidth measuring program returns ICMP response message to the user terminal. And the user terminal obtains the value of the packet loss rate according to the number of the sent ICMP messages and the number of the received ICMP response messages. And the user terminal sends the value of the packet loss rate to a server where the bandwidth measuring program is located. And the bandwidth measuring program receives the value of the packet loss rate returned by the user terminal.
According to the bandwidth measuring method, the ICMP message sent by the user terminal is received, the ICMP response message is returned to the user terminal, and the value of the sent packet loss rate is received, so that not only can the packet loss rate of the link between the user terminal and the target network equipment be determined, but also the packet loss rate of the link between the user terminal and the target network equipment can be determined, the network state can be detected, and the bandwidth measuring method is high in operability and low in cost.
In one embodiment, the method for detecting the network status includes: acquiring delay time of a link; when the delay time of the link is greater than the delay time threshold, determining that the link is in a network congestion state; when the delay time of a link is less than or equal to a delay time threshold, the link is determined to be in a network available state.
Specifically, for example, if the delay time threshold is 100ms, when the delay time is greater than 100ms, it is determined that the link is in a network congestion state; and when the delay time is 0-100 ms, determining that the link is in a network available state.
According to the bandwidth measuring method, the delay time of the link is obtained, when the delay time is larger than the delay time threshold, the congestion state of the network is determined, when the delay time is smaller than the delay time threshold, the congestion state of the network is determined, the network state can be obtained according to the delay time detection, and therefore the bandwidth of the link is obtained.
In one embodiment, the detection method of the congestion status includes: acquiring the packet loss rate and the delay time of a link; and when the packet loss rate of the link is greater than the packet loss rate threshold and the delay time is greater than the delay time threshold, determining that the link is in a network congestion state. According to the bandwidth measuring method, the packet loss rate and the delay time are detected simultaneously, the congestion state of the network can be judged more accurately, and the accuracy of bandwidth measurement is improved.
In one embodiment, obtaining the delay time of the link comprises: sending an ICMP message to at least one target network device in the target network devices or at least one target user terminal capable of responding the ICMP message, and acquiring corresponding sending time; when receiving ICMP response message returned by target network equipment or target user terminal, obtaining the receiving time of ICMP response message; and obtaining the delay time of the link according to the sending time and the receiving time.
The sending time and the receiving time may be accurate to milliseconds or even microseconds.
Specifically, the bandwidth measurement program obtains a transmission time for transmitting an ICMP message to at least one of the target network devices. And when receiving the ICMP echo message returned by the target network equipment, acquiring the receiving time of the received ICMP echo message. The bandwidth measurement procedure derives the delay time of the link from the transmission time and the reception time. Or the bandwidth measurement program obtains the sending time of sending the ICMP message by at least one target user terminal which can echo the ICMP message. And when receiving the ICMP response message returned by the target user terminal, acquiring the receiving time of the received ICMP response message. The bandwidth measurement procedure derives the delay time of the link from the transmission time and the reception time.
According to the bandwidth measuring method, the delay time of the link is obtained by obtaining the sending time and the receiving time, the phenomenon that the ICMP message data volume is large due to the fact that the time stamp is added into the ICMP message can be avoided, the ICMP message data volume is small, network congestion is not prone to increase, and the accuracy of bandwidth measurement is improved.
In one embodiment, sending a user datagram protocol UDP packet to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, includes: sending User Datagram Protocol (UDP) messages to user terminals corresponding to Internet protocol addresses at the sequentially increased broadband rates; the first network state is a network available state; the second network state is a network congestion state.
Specifically, the bandwidth measurement program sends UDP packets to the user terminal corresponding to the internet protocol address at the successively increased bandwidth rate. For example, the bandwidth measuring program sends UDP messages to the user terminal corresponding to the Internet protocol address at the bandwidth rate of 1GB/s, 2GB/s, 3GB/s … … and the like. When detecting that a link between the server and the target network device changes from a network available state to a network congestion state, acquiring a broadband rate corresponding to the last time the link is in the network available state, namely acquiring a maximum broadband rate corresponding to the link in the network available state.
According to the bandwidth measuring method, the UDP messages are sent to the user terminal corresponding to the Internet protocol address at the sequentially increased bandwidth rates, the UDP messages can be sent in a certain sequence, the rate can be adjusted, the accurate bandwidth rate can be obtained, and the accuracy of bandwidth measurement is improved.
In one embodiment, as shown in fig. 5, a schematic flow chart of a bandwidth measurement method in another embodiment includes:
step 502, an IP address list corresponding to the object identifier to be detected is obtained.
Specifically, the IP addresses may be stored in a list.
Step 504, sending UDP message to any user terminal corresponding to the IP address in the IP address list at the broadband rate S.
The initial wideband rate S may specifically be a predicted wideband rate value.
Step 506, detecting whether a link between the server and the target network device loses packets.
Specifically, the server may detect whether a packet loss occurs in a link between the server and the target network device through the congestion information. The congestion information includes at least one of a packet loss rate and a delay time.
And step 508, when no packet loss occurs in the link between the server and the target network device, increasing the broadband rate S.
Specifically, after the broadband rate S is increased, the obtained broadband rate is S +1, and then the server sends the UDP packet to any user terminal corresponding to the IP address in the IP address list at the broadband rate of S + 1.
And step 510, processing according to the broadband rate of the last non-packet loss to obtain the maximum available bandwidth.
Specifically, for example, when the broadband rate is S +5, and the bandwidth measurement program detects that a packet loss occurs in a link between the target network device and the bandwidth measurement program, the broadband rate S +4 at which the packet loss does not occur at the last time is obtained, and the maximum available bandwidth of the link is calculated according to the broadband rate S + 4.
In this embodiment, the principle of determining whether the maximum available bandwidth is reached through the congestion information is as follows: when the transmission rate of the data message on the link is less than the maximum available bandwidth of the network link, the transmitted message is not congested, the delay of the message is stable and no packet is lost; if the sending rate of a certain end is greater than the maximum available bandwidth of the network link, the link is congested, the delay time for transmitting a message on the link is increased, and the packet loss rate is increased, so that whether the current bandwidth of the link reaches the maximum available bandwidth or not can be judged according to congestion information such as the delay time, the packet loss rate and the like of the message.
According to the bandwidth measuring method, the IP address list corresponding to the to-be-detected object identification is obtained, the UDP message is sent to any user terminal corresponding to the IP address in the IP address list at the adjustable broadband speed S, whether a link is lost or not is detected, when the packet is not lost, the broadband speed is increased, the UDP message is sent again, the broadband speed which is not lost at the last time is obtained, the maximum available bandwidth is obtained through processing, network equipment does not need to be deployed in advance, the user terminals do not need to be kept on-line for interaction, all the user terminals do not need to receive the UDP message, the cost is low, the operability is high, the universality is good, the process of using flow of the user terminals in actual conditions can be simulated, the measuring scene is close to the actual using scene, and the accuracy of.
In one embodiment, sending a user datagram protocol UDP packet to a user terminal corresponding to an internet protocol address at an adjustable broadband rate, includes: sending User Datagram Protocol (UDP) messages to user terminals corresponding to Internet protocol addresses at a sequentially decreasing broadband rate; the first network state is a network congestion state; the second network state is a network available state.
Specifically, the bandwidth measurement program sends UDP packets to the user terminal corresponding to the internet protocol address at the successively decreasing bandwidth rate. For example, the bandwidth measuring program sends UDP messages to the user terminal corresponding to the Internet protocol address at the bandwidth rate of 20GB/s, 19GB/s, 18GB/s … … and the like, but not limited to the bandwidth rate. When detecting that a link between a server and a target network device changes from a network congestion state to a network available state, acquiring a corresponding broadband rate when the link is in the network available state for the first time, namely acquiring a corresponding maximum broadband rate when the link is in the network available state.
According to the bandwidth measuring method, the UDP messages are sent to the user terminal corresponding to the Internet protocol address at the successively descending broadband speed, the UDP messages can be sent in a certain sequence, the speed is adjustable, the accurate broadband speed can be obtained, and the accuracy of bandwidth measurement is improved.
In one embodiment, as shown in fig. 6, sending UDP messages to a user terminal corresponding to an internet protocol address at an adjustable broadband rate includes:
step 602, a random number identifier is generated.
Specifically, before the internet protocol address corresponding to the object identifier to be detected is acquired, the bandwidth measurement program imports the whole internet protocol address corresponding to the object identifier to be detected into the memory array and stores the whole internet protocol address. Each number corresponds to an internet protocol address. The bandwidth measurement program randomly generates a random number identification.
Step 604, an internet protocol address corresponding to the random number identifier is obtained.
Specifically, the bandwidth measurement program acquires an internet protocol address corresponding to the random number identifier. For example, if the random number is 5 and the corresponding IP address is 123.123.1.1, the bandwidth measurement program obtains an IP address of 123.123.1.1.
Step 606, sending UDP packets to the user terminal corresponding to the ip address corresponding to the random number identifier at an adjustable broadband rate.
Specifically, the bandwidth measurement program serially sends UDP packets to the user terminal corresponding to the IP address corresponding to the random number identifier at a sequentially increasing or sequentially decreasing bandwidth rate. For example, a server corresponding to the bandwidth measurement program generates a random number identifier, for example, 10, 8, 11, 19, 5 …, etc., but not limited thereto, when the broadband rate is 5GB/s, the bandwidth measurement program sends UDP packets to the user terminal corresponding to the IP address corresponding to 10, 8, 11, 19, 5 in serial at the broadband rate of 5 GB/s.
In this embodiment, when the plurality of servers all have the bandwidth measurement program, the IP address corresponding to the object identifier to be detected may be an IP address shared by the plurality of servers. The bandwidth measurement programs all generate random number identifiers, acquire the IP addresses corresponding to the random number identifiers, and send UDP messages to the user terminals corresponding to the IP addresses corresponding to the random number identifiers, so that the condition that a plurality of machines send UDP messages to the same IP address at the same time can be avoided.
In this embodiment, acquiring the internet protocol address corresponding to the identifier of the object to be detected includes: generating a random number identification, and acquiring an internet protocol address corresponding to the random number identification corresponding to the object identification to be detected; sending a UDP message to a user terminal corresponding to an Internet protocol address at an adjustable broadband rate, wherein the UDP message comprises the following steps: and sending the UDP message to the user terminal corresponding to the IP address corresponding to the random number identifier at an adjustable broadband rate.
According to the bandwidth measuring method, the random number identification is generated, the internet protocol address corresponding to the random number identification is obtained, the UDP message is sent to the terminal corresponding to the internet protocol address corresponding to the random number identification at the adjustable broadband speed, the randomness of the random number can be utilized to evenly send the UDP message, a plurality of devices are prevented from sending the UDP message to the user terminal corresponding to the same internet protocol address at the same time, and the sending accuracy of the UDP message is improved.
In one embodiment, the bandwidth measurement method further comprises: when the broadband rate is greater than the preset broadband rate, obtaining the dormancy duration according to a first sending duration corresponding to the broadband rate and a second sending duration corresponding to the preset broadband rate; and when the dormancy duration is obtained, beginning dormancy, and when the timing reaches the dormancy duration, re-executing the step of sending the UDP message to the user terminal corresponding to the Internet protocol address at the adjustable broadband rate.
And in the dormancy duration, the bandwidth measuring program does not send the UDP message to the user terminal corresponding to the Internet protocol address. The preset broadband rate may be any one of preset broadband rate values stored in the server. The first sending duration corresponding to the broadband rate is a duration taken to time or send a certain number of UDP packets according to the broadband rate. The second sending time length corresponding to the preset broadband rate is the time length spent for sending a certain number of UDP packets according to the preset broadband rate.
Specifically, for example, the number of bytes of the UDP packet is K1, the broadband rate is S1, and the corresponding first transmission duration is T1 — K1/S1. The preset wideband rate is S2, and the corresponding second transmission duration is T2. When the broadband rate is greater than the preset broadband rate, the bandwidth measurement program obtains a sleep duration | T1-T2| according to a first sending duration T1 corresponding to the broadband rate and a second sending duration T2 corresponding to the preset broadband rate. And when the bandwidth measuring program obtains the dormancy duration, starting dormancy and timing, and when the timing reaches the dormancy duration, executing the step of sending a UDP message to the user terminal corresponding to the IP address at an adjustable broadband rate.
According to the bandwidth measuring method, when the broadband rate is greater than the preset broadband rate, the dormancy duration is obtained according to the first sending duration corresponding to the broadband rate and the second sending duration corresponding to the preset broadband rate, after the dormancy duration is obtained, dormancy is started, and when the dormancy duration is reached in timing, the step of sending the UDP message to the user terminal corresponding to the Internet protocol address at the adjustable broadband rate is executed again, so that the broadband rate can be controlled, and the accuracy of bandwidth measurement is improved.
In one embodiment, as shown in fig. 7, before acquiring the internet protocol address corresponding to the target network device, the bandwidth measurement method further includes:
step 702, obtain a service access log.
The service access log refers to log information generated when the user terminal accesses the server. The service access log comprises an internet protocol address and a corresponding object identifier to be detected.
Specifically, the bandwidth measurement program obtains a service access log from the server.
Step 704, obtain the internet protocol address from the service access log.
Specifically, the bandwidth measurement program obtains the IP address from the service access log. The number of IP addresses is not limited, and may be a large number of IP addresses, for example.
Step 706, acquiring the to-be-detected object identifier corresponding to the internet protocol address.
Specifically, the bandwidth measurement program obtains an object identifier to be detected corresponding to each internet protocol address. For example, the object to be detected corresponding to the IP address a is identified as china mobile, the object to be detected corresponding to B is identified as china unicom, the object to be detected corresponding to C is identified as china telecom, the object to be detected corresponding to D is identified as china mobile …, and the like, but not limited thereto.
Step 708, classifying the internet protocol address according to the object identifier to be detected to obtain the internet protocol address corresponding to the object identifier to be detected.
Specifically, the bandwidth measuring program classifies the IP addresses according to the object identifier to be detected, and obtains the internet protocol address corresponding to the object identifier to be detected with the same IP address as the object identifier to be detected as one class. For example, the IP address A and the IP address D belong to China Mobile and are classified into one category. The IP address corresponding to the object identifier to be detected as china mobile contains A, D, F …, etc., but is not limited to this.
In this embodiment, the bandwidth measurement program imports the whole internet protocol address corresponding to the object identifier to be detected into the memory array. For example, the bandwidth measurement program guides the whole quantity of the IP addresses corresponding to the object to be detected, which is identified as the china mobile, into the memory array a. And the bandwidth measurement program leads the total quantity of the IP addresses corresponding to the object to be detected, which is marked as the China Unicom, into the memory array B. And the bandwidth measuring program leads the total IP addresses of the objects to be detected, which are marked as corresponding to China telecom, into the memory array C.
According to the bandwidth measuring method, the Internet protocol address is obtained from the service access log, the object identification to be detected corresponding to the Internet protocol address is obtained, the Internet protocol address is classified according to the object identification to be detected, the Internet protocol address corresponding to the object identification to be detected is obtained, the classification can be carried out according to requirements, and a UDP packet is sent to the user terminal corresponding to the IP address, so that the bandwidth of a link is obtained, and the accuracy of bandwidth measurement is improved.
In one embodiment, acquiring an internet protocol address corresponding to an identifier of an object to be detected includes: and acquiring the internet protocol address corresponding to the identification of the object to be detected from the internet protocol address database.
Specifically, the internet protocol address database includes an internet protocol address and a corresponding object identifier to be detected. The internet protocol address database may further include nationality corresponding to the internet protocol address. And the bandwidth measuring program acquires the Internet protocol address corresponding to the mark of the object to be detected from the IP database. The bandwidth measurement procedure may also retrieve the nationality corresponding to the internet protocol address from the IP database.
According to the bandwidth measuring method, the internet protocol address corresponding to the identification of the object to be detected is obtained from the internet protocol address database, a large number of internet protocol addresses can be obtained, the UDP message is sent, and the accuracy of bandwidth measurement is improved.
In one embodiment, a bandwidth measurement method includes:
and (a1) acquiring a service access log.
And a step (a2) of obtaining an internet protocol address from the service access log.
And (a3) acquiring the object identification to be detected corresponding to the Internet protocol address.
And (a4) classifying the Internet protocol addresses according to the object identifiers to be detected to obtain the Internet protocol addresses corresponding to the object identifiers to be detected.
And (a5) acquiring the Internet protocol address corresponding to the object identifier to be detected.
And (a6) generating a random number identifier.
And (a7) acquiring the corresponding internet protocol address of the random number identification.
And (a8) sending a User Datagram Protocol (UDP) message to a user terminal corresponding to an internet protocol address corresponding to the random number identifier at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to the object identifier to be detected.
And (a9) when the broadband rate is greater than the preset broadband rate, obtaining the dormancy duration according to a first sending duration corresponding to the broadband rate and a second sending duration corresponding to the preset broadband rate.
And (a10), when the dormancy duration is obtained and then the dormancy is started, and the timing reaches the dormancy duration, re-executing the step of sending the UDP message to the user terminal corresponding to the Internet protocol address corresponding to the random number identification at the sequentially increased broadband speed.
Step (a11), sending an Internet Control Message Protocol (ICMP) message to at least one of the target network devices.
And (a12) receiving the ICMP echo message returned by the target network equipment.
And (a13) determining the packet loss rate of the link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
And (a14), when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in a network congestion state.
And (a15) acquiring the maximum broadband rate corresponding to the link in the network available state.
And (a16) processing according to the maximum broadband rate corresponding to the link in the network available state to obtain the maximum available bandwidth of the link with the target network device.
Although the above-described steps (a1) to (a16) are sequentially displayed in the order of numerals, the steps are not necessarily sequentially performed in the order of numerals. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise.
According to the bandwidth measuring method, the internet protocol address corresponding to the to-be-detected object identifier is obtained, the UDP message is sent to the terminal corresponding to the internet protocol address at an adjustable broadband speed, and the UDP message is a connectionless-oriented protocol and has the characteristics of low resource consumption and high processing speed, so that network equipment does not need to be deployed in advance, the user terminal does not need to be kept in an online state, and all the user terminals do not need to receive the UDP message, and the bandwidth measuring method is low in cost, high in operability and good in universality; the randomness of the random number is utilized to send the UDP messages in a balanced manner, so that the condition that a plurality of devices send the UDP messages to the user terminals corresponding to the same Internet protocol address at the same time is avoided, and the sending accuracy of the UDP messages is improved; when the link is detected to change from the first network state to the second network state, at least one ICMP message needs to be sent to a target network device, the maximum broadband rate corresponding to the available state is obtained, the maximum available bandwidth is obtained through processing, the process of using flow of the user terminal in actual conditions can be simulated, the measurement scene is close to the actual usage scene, and the accuracy of bandwidth measurement is improved.
In one embodiment, a bandwidth measurement method includes:
and (b1) acquiring the service access log.
And (b2) acquiring the Internet protocol address from the service access log.
And (b3) acquiring the object identification to be detected corresponding to the Internet protocol address.
And (b4) classifying the Internet protocol addresses according to the object identifiers to be detected to obtain the Internet protocol addresses corresponding to the object identifiers to be detected.
And (b5) acquiring the internet protocol address corresponding to the object identifier to be detected.
And (b6) generating a random number identifier.
And (b7) acquiring the corresponding internet protocol address of the random number identification.
And (b8) sending a User Datagram Protocol (UDP) message to the user terminal corresponding to the Internet protocol address corresponding to the random number identifier at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between target network equipment corresponding to the object identifier to be detected.
And (b9), when the broadband rate is greater than the preset broadband rate, obtaining the dormancy duration according to the first sending duration corresponding to the broadband rate and the second sending duration corresponding to the preset broadband rate.
And (b10), when the dormancy duration is obtained and the dormancy is started, and the timing reaches the dormancy duration, re-executing the step of sending the UDP message to the user terminal corresponding to the Internet protocol address corresponding to the random number identifier at the sequentially increased broadband speed.
And (b11) selecting at least one user terminal capable of responding ICMP message as target user terminal from the user terminals corresponding to the Internet protocol address.
And (b12), sending ICMP message to the target user terminal.
And (b13) receiving the ICMP echo message returned by the target user terminal.
And (b14), determining the packet loss rate of the link between the target network equipment and the ICMP according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
And (b15), when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in the network congestion state.
And (b16) acquiring the maximum broadband rate corresponding to the link in the network available state.
And (b17), processing according to the maximum broadband rate corresponding to the link in the network available state to obtain the maximum available bandwidth of the link with the target network device.
Although the above-described steps (b1) to (b17) are sequentially displayed in the order of numerals, the steps are not necessarily sequentially performed in the order of numerals. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise.
According to the bandwidth measuring method, the internet protocol address corresponding to the to-be-detected object identifier is obtained, the UDP message is sent to the terminal corresponding to the internet protocol address at an adjustable broadband speed, and the UDP message is a connectionless-oriented protocol and has the characteristics of low resource consumption and high processing speed, so that network equipment does not need to be deployed in advance, the user terminal does not need to be kept in an online state, and all the user terminals do not need to receive the UDP message, and the bandwidth measuring method is low in cost, high in operability and good in universality; the randomness of the random number is utilized to send the UDP messages in a balanced manner, so that the condition that a plurality of devices send the UDP messages to the user terminals corresponding to the same Internet protocol address at the same time is avoided, and the sending accuracy of the UDP messages is improved; the ICMP message is sent to the target user terminal, at least the ICMP message only needs to be sent to one online user terminal, and the packet loss rate of a link between the target user terminal and the user terminal can be determined; when the link is detected to change from the first network state to the second network state, the maximum broadband rate corresponding to the available state is acquired, the maximum available bandwidth is obtained through processing, the process of using the flow of the user terminal in the actual situation can be simulated, the measurement scene is close to the actual usage scene, and the accuracy of bandwidth measurement is improved.
It should be understood that, although the steps in the flowcharts of fig. 2 to 7 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, a block diagram of a bandwidth measuring apparatus in one embodiment is shown. A bandwidth measurement apparatus, the apparatus comprising an obtaining module 802, a sending module 804, a detecting module 806, and a processing module 808, wherein:
the obtaining module 802 is configured to obtain an internet protocol address corresponding to an identifier of an object to be detected.
A sending module 804, configured to send a user datagram protocol UDP packet to a user terminal corresponding to the internet protocol address at an adjustable broadband rate, where the UDP packet corresponding to the adjustable broadband rate is used to cause a network congestion to occur in a link between the target network device corresponding to the object identifier to be detected.
The detecting module 806 is configured to, when it is detected that the link changes from the first network state to the second network state, obtain a maximum broadband rate corresponding to the link being in an available state, where one of the first network state and the second network state is a network available state, and the other is a network congestion state.
And the processing module 808 is configured to process the maximum available bandwidth of the link with the target network device according to the maximum broadband rate corresponding to the link in the network available state.
The bandwidth measuring device acquires the internet protocol address corresponding to the object identifier to be detected, and sends the UDP message to the terminal corresponding to the internet protocol address at an adjustable broadband rate, and the UDP message is a connectionless-oriented protocol and has the characteristics of low resource consumption and high processing speed, so that network equipment does not need to be deployed in advance, the user terminals do not need to be kept in an online state, and all the user terminals do not need to receive the UDP message, and the bandwidth measuring device is low in cost, high in operability and good in universality; when the link is detected to change from the first network state to the second network state, the maximum broadband rate corresponding to the available state is obtained, the maximum available bandwidth is obtained through processing, the process of using the flow of the user terminal in the actual situation can be simulated, the measurement scene is close to the actual usage scene, and the accuracy of bandwidth measurement is improved.
In one embodiment, the detecting module 806 is configured to obtain a packet loss rate of the link; and when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in a network congestion state.
The bandwidth measuring device obtains the packet loss rate of the link, determines that the link is in the congestion state when the packet loss rate of the link is greater than the packet loss rate threshold, can check whether the network is in the congestion state, can avoid packet loss rate errors caused by reasons except network congestion to a certain extent through the packet loss rate threshold, and improves the accuracy of bandwidth measurement.
In one embodiment, the detecting module 806 is configured to send an internet control message protocol ICMP message to at least one of the target network devices; receiving an ICMP response message returned by the target network equipment; and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
The bandwidth measuring device sends the ICMP message to at least one target network device in the target network devices, receives the ICMP response message returned by the target network devices, determines the packet loss rate according to the quantity of the sent message and the response message, and can detect the network state only by sending the ICMP message to at least one target network device, thereby having strong operability and low cost.
In an embodiment, the detecting module 806 is configured to select at least one ue capable of responding an ICMP message from the ues corresponding to the internet protocol address as a target ue; sending an ICMP message to a target user terminal; receiving an ICMP response message returned by a target user terminal; and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
The bandwidth measuring device selects at least one user terminal capable of responding ICMP messages from user terminals corresponding to Internet protocol addresses as a target user terminal, can ensure that the target terminal is in an alive (alive) state, at least only needs to send the ICMP messages to one online user terminal, receives ICMP response messages returned by the target user terminal, determines the packet loss rate of a link between the user terminal and the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP response messages, can also determine the packet loss rate of the link between the user terminal and the target network equipment, can detect the network state, and has strong operability and low cost.
In an embodiment, the obtaining module 802 is configured to receive an ICMP message sent by a user equipment; sending an ICMP response message to the user terminal; and receiving a packet loss rate value returned by the user terminal, wherein the packet loss rate value is determined by the user terminal according to the number of the sent ICMP messages and the number of the ICMP echo messages.
According to the bandwidth measuring device, the ICMP response message is returned to the user terminal by receiving the ICMP message sent by the user terminal, and the value of the sent packet loss rate is received, so that not only can the packet loss rate of the link between the bandwidth measuring device and the target network equipment be determined, but also the packet loss rate of the link between the bandwidth measuring device and the user terminal can be determined, the network state can be detected, and the bandwidth measuring device is high in operability and low in cost.
In one embodiment, the obtaining module 802 is configured to obtain the delay time of the link. The detecting module 806 is configured to determine that the link is in a network congestion state when the delay time of the link is greater than a delay time threshold; determining that the link is in a network available state when the delay time of the link is less than or equal to the delay time threshold.
According to the bandwidth measuring device, the delay time of the link is obtained, when the delay time is larger than the delay time threshold, the congestion state of the network is determined, when the delay time is smaller than the delay time threshold, the congestion state of the network is determined, the network state can be obtained according to the delay time detection, and therefore the bandwidth of the link is obtained.
In one embodiment, the obtaining module 802 is configured to obtain sending time for sending an ICMP message to at least one target network device in the target network devices or to at least one target user equipment capable of responding to the ICMP message; when receiving ICMP response message returned by target network equipment or target user terminal, obtaining the receiving time of ICMP response message; and obtaining the delay time of the link according to the sending time and the receiving time.
According to the bandwidth measuring device, the delay time of the link is obtained by obtaining the sending time and the receiving time, the phenomenon that the ICMP message data volume is large due to the fact that the time stamp is added into the ICMP message can be avoided, the ICMP message data volume is small, network congestion is not prone to being caused, and the accuracy of bandwidth measurement is improved.
In one embodiment, the sending module 804 is configured to send a user datagram protocol UDP packet to a user terminal corresponding to an internet protocol address at a sequentially increased broadband rate; the first network state is a network available state; the second network state is a network congestion state.
The bandwidth measuring device sends the UDP messages to the user terminal corresponding to the Internet protocol address at the sequentially increased bandwidth rates, can send the UDP messages in a certain sequence, can adjust the rates, can obtain the accurate bandwidth rates, and improves the accuracy of bandwidth measurement.
In one embodiment, the sending module 804 is configured to send a user datagram protocol UDP packet to a user terminal corresponding to an internet protocol address at a successively decreasing broadband rate; the first network state is a network congestion state; the second network state is a network available state.
The bandwidth measuring device sends the UDP messages to the user terminal corresponding to the Internet protocol address at the successively descending broadband speed, can send the UDP messages in a certain sequence, can adjust the speed, can obtain the accurate broadband speed, and improves the accuracy of bandwidth measurement.
In one embodiment, as shown in fig. 9, a block diagram of a bandwidth measuring apparatus in another embodiment is shown. The bandwidth measuring apparatus further includes a generating module 810. The generation module 810 is configured to generate a random number identification. The obtaining module 802 is configured to obtain an internet protocol address corresponding to the random number identifier. The sending module 804 is configured to send, at an adjustable broadband rate, a UDP packet to the user terminal corresponding to the internet protocol address corresponding to the random number identifier.
The bandwidth measuring device generates the random number identification, acquires the internet protocol address corresponding to the random number identification, and sends the UDP message to the terminal corresponding to the internet protocol address corresponding to the random number identification at an adjustable broadband speed, so that the randomness of the random number can be utilized to evenly send the UDP message, a plurality of devices are prevented from sending the UDP message to the user terminal corresponding to the same internet protocol address at the same time, and the sending accuracy of the UDP message is improved.
In one embodiment, as shown in fig. 9, the bandwidth measurement device further comprises a sleep module 812. The sleep module 812 is configured to obtain a sleep duration according to a first sending duration corresponding to the broadband rate and a second sending duration corresponding to the preset broadband rate when the broadband rate is greater than the preset broadband rate; when the dormancy duration is obtained and then the dormancy is started, and the time reaches the dormancy duration, the sending module 804 is configured to send a UDP message to the user terminal corresponding to the internet protocol address at an adjustable broadband rate.
According to the bandwidth measuring device, when the broadband rate is greater than the preset broadband rate, the dormancy duration is obtained according to the first sending duration corresponding to the broadband rate and the second sending duration corresponding to the preset broadband rate, when the dormancy duration is obtained, dormancy is started, and when the dormancy duration is reached in timing, the step of sending the UDP message to the user terminal corresponding to the Internet protocol address at the adjustable broadband rate is executed again, so that the broadband rate can be controlled, and the accuracy of bandwidth measurement is improved.
In one embodiment, the obtaining module 802 is further configured to obtain a service access log; obtaining an internet protocol address from a service access log; acquiring an object identifier to be detected corresponding to an internet protocol address; and classifying the Internet protocol address according to the object identifier to be detected to obtain the Internet protocol address corresponding to the object identifier to be detected.
The bandwidth measuring device obtains the internet protocol address from the service access log, obtains the object identifier to be detected corresponding to the internet protocol address, classifies the internet protocol address according to the object identifier to be detected, obtains the internet protocol address corresponding to the object identifier to be detected, can classify according to requirements, and sends the UDP packet to the user terminal corresponding to the IP address, thereby obtaining the bandwidth of the link and improving the accuracy of bandwidth measurement.
In one embodiment, the obtaining module 802 is configured to obtain an internet protocol address corresponding to the identifier of the object to be detected from an internet protocol address database.
The bandwidth measuring device acquires the internet protocol address corresponding to the identification of the object to be detected from the internet protocol address database, can acquire a large number of internet protocol addresses and sends UDP messages, and improves the accuracy of bandwidth measurement.
FIG. 10 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the computer device 110 in fig. 1. As shown in fig. 10, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the bandwidth measurement method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a bandwidth measurement method.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the bandwidth measuring apparatus provided in the present application may be implemented in the form of a computer program, which is executable on a computer device as shown in fig. 10. The memory of the computer device may store various program modules constituting the bandwidth measuring apparatus, such as the acquiring module, the transmitting module, the detecting module, and the processing module shown in fig. 8. The computer program constituted by the respective program modules causes the processor to execute the steps in the bandwidth measurement method of the embodiments of the present application described in the present specification. For example, the computer device shown in fig. 10 may perform, through the obtaining module in the bandwidth measuring apparatus shown in fig. 8, obtaining an internet protocol address corresponding to an identifier of an object to be detected. The computer equipment can execute sending of a User Datagram Protocol (UDP) message to a user terminal corresponding to the Internet protocol address at an adjustable broadband rate through the sending module, wherein the UDP message corresponding to the adjustable broadband rate is used for enabling a link between the UDP message and target network equipment corresponding to the object identifier to be detected to generate network congestion. The computer device can execute, by the detection module, acquiring a maximum broadband rate corresponding to the link in the available state when the link is detected to change from the first network state to the second network state, where one of the first network state and the second network state is the network available state, and the other is the network congestion state. The computer device can obtain the maximum available bandwidth of the link with the target network device through the processing module executing the processing according to the corresponding maximum broadband rate when the link is in the network available state.
In an embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the above-described bandwidth measurement method. Here, the steps of the bandwidth measurement method may be steps in the bandwidth measurement methods of the above-described embodiments.
In one embodiment, a computer-readable storage medium is provided, in which a computer program is stored, which, when executed by a processor, causes the processor to carry out the steps of the above-mentioned bandwidth measurement method. Here, the steps of the bandwidth measurement method may be steps in the bandwidth measurement methods of the above-described embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (24)

1. A bandwidth measurement method applied to a server includes:
acquiring an internet protocol address corresponding to an object identifier to be detected;
sending a User Datagram Protocol (UDP) message to a user terminal corresponding to the Internet protocol address through target network equipment at an adjustable broadband rate, wherein the UDP message corresponding to the adjustable broadband rate is used for causing network congestion to occur to a link between the server and the target network equipment corresponding to the object identifier to be detected;
when the link is detected to be changed from a first network state to a second network state, acquiring a maximum broadband rate corresponding to the link in a network available state, wherein one of the first network state and the second network state is the network available state, and the other one is the network congestion state;
and processing according to the corresponding maximum broadband rate when the link is in the network available state to obtain the maximum available bandwidth of the link between the server and the target network equipment.
2. The method according to claim 1, wherein the congestion status detection means comprises:
acquiring the packet loss rate of the link;
and when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in a network congestion state.
3. The method of claim 2, wherein the obtaining the packet loss ratio of the link comprises:
sending an Internet Control Message Protocol (ICMP) message to at least one of the target network devices;
receiving an ICMP response message returned by the target network equipment;
and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
4. The method of claim 2, wherein the obtaining the packet loss ratio of the link comprises:
selecting at least one user terminal capable of responding ICMP message as a target user terminal from the user terminals corresponding to the Internet protocol address;
sending an ICMP message to the target user terminal;
receiving an ICMP response message returned by the target user terminal;
and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
5. The method of claim 2, wherein the obtaining the packet loss ratio of the link comprises:
receiving an ICMP message sent by the user terminal;
sending an ICMP response message to the user terminal;
and receiving a packet loss rate value returned by the user terminal, wherein the packet loss rate value is determined by the user terminal according to the number of the sent ICMP messages and the number of the ICMP echo messages.
6. The method according to claim 1, wherein the detecting of the network status comprises:
obtaining the delay time of the link;
when the delay time of the link is greater than a delay time threshold value, determining that the link is in a network congestion state;
determining that the link is in a network available state when the delay time of the link is less than or equal to the delay time threshold.
7. The method of claim 6, wherein obtaining the delay time of the link comprises:
sending an ICMP message to at least one target network device in the target network devices or at least one target user terminal capable of responding the ICMP message, and acquiring corresponding sending time;
when receiving an ICMP response message returned by the target network equipment or the target user terminal, acquiring the receiving time of the received ICMP response message;
and obtaining the delay time of the link according to the sending time and the receiving time.
8. The method according to any one of claims 1 to 7, wherein the sending UDP packets at the adjustable broadband rate to the terminal corresponding to the ip address through the target network device comprises:
generating a random number identifier;
acquiring an internet protocol address corresponding to the random number identifier;
and sending a UDP message to the user terminal corresponding to the Internet protocol address corresponding to the random number identifier through the target network equipment at an adjustable broadband speed.
9. The method according to any one of claims 1 to 7, further comprising:
when the broadband rate is greater than a preset broadband rate, obtaining a sleep time according to a first sending time corresponding to the broadband rate and a second sending time corresponding to the preset broadband rate;
and when the dormancy duration is obtained, beginning dormancy, and when the timing reaches the dormancy duration, re-executing the step of sending the UDP message to the user terminal corresponding to the Internet protocol address at the adjustable broadband rate.
10. The method according to any one of claims 1 to 7, further comprising, before the obtaining the internet protocol address corresponding to the target network device:
acquiring a service access log;
obtaining an internet protocol address from the service access log;
acquiring an object identifier to be detected corresponding to the Internet protocol address;
and classifying the Internet protocol address according to the object identifier to be detected to obtain the Internet protocol address corresponding to the object identifier to be detected.
11. The method according to any one of claims 1 to 7, wherein the acquiring the internet protocol address corresponding to the object identifier to be detected comprises:
and acquiring the internet protocol address corresponding to the identification of the object to be detected from the internet protocol address database.
12. A bandwidth measuring device, the device comprising:
the acquisition module is used for acquiring an internet protocol address corresponding to the identification of the object to be detected;
a sending module, configured to send a user datagram protocol UDP packet to a user terminal corresponding to the internet protocol address through a target network device at an adjustable broadband rate, where the UDP packet corresponding to the adjustable broadband rate is used to cause a link between a server and the target network device corresponding to the object identifier to be detected to have network congestion;
a detection module, configured to, when it is detected that the link changes from a first network state to a second network state, obtain a maximum broadband rate corresponding to the link in an available state, where one of the first network state and the second network state is a network available state, and the other is a network congestion state;
and the processing module is used for processing according to the maximum broadband rate corresponding to the link in the network available state to obtain the maximum available bandwidth of the link between the server and the target network equipment.
13. The apparatus according to claim 12, wherein the detecting module is configured to obtain a packet loss ratio of the link;
and when the packet loss rate of the link is greater than the packet loss rate threshold, determining that the link is in a network congestion state.
14. The apparatus of claim 13, wherein the detection module is configured to send an Internet Control Message Protocol (ICMP) message to at least one of the target network devices;
receiving an ICMP response message returned by the target network equipment;
and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
15. The apparatus according to claim 13, wherein the detecting module is configured to select at least one ue capable of responding ICMP message as a target ue from the ues corresponding to the ip address;
sending an ICMP message to the target user terminal;
receiving an ICMP response message returned by the target user terminal;
and determining the packet loss rate of a link between the target network equipment according to the number of the sent ICMP messages and the number of the returned ICMP echo messages.
16. The apparatus according to claim 13, wherein the detecting module is configured to receive an ICMP message sent by the ue;
sending an ICMP response message to the user terminal;
and receiving a packet loss rate value returned by the user terminal, wherein the packet loss rate value is determined by the user terminal according to the number of the sent ICMP messages and the number of the ICMP echo messages.
17. The apparatus of claim 12, wherein the obtaining module is configured to obtain a delay time of the link;
the detection module is used for determining that the link is in a network congestion state when the delay time of the link is greater than a delay time threshold;
determining that the link is in a network available state when the delay time of the link is less than or equal to the delay time threshold.
18. The apparatus according to claim 17, wherein the obtaining module is configured to send an ICMP packet to at least one of the target network devices or to at least one target user equipment capable of responding to an ICMP packet, and obtain a corresponding sending time;
when receiving an ICMP response message returned by the target network equipment or the target user terminal, acquiring the receiving time of the received ICMP response message;
and obtaining the delay time of the link according to the sending time and the receiving time.
19. The apparatus according to any one of claims 12 to 18, wherein the bandwidth measuring apparatus further comprises a generating module;
the generation module is used for generating a random number identifier;
the acquisition module is used for acquiring the internet protocol address corresponding to the random number identifier;
and the sending module is used for sending a UDP message to the user terminal corresponding to the Internet protocol address corresponding to the random number identifier through the target network equipment at an adjustable broadband speed.
20. The apparatus of any one of claims 12 to 18, wherein the bandwidth measuring apparatus further comprises a sleep module;
the sleep module is used for obtaining sleep time according to a first sending time corresponding to the broadband rate and a second sending time corresponding to the preset broadband rate when the broadband rate is greater than the preset broadband rate;
and when the dormancy duration is obtained and then the dormancy is started and the timing reaches the dormancy duration, the sending module is used for sending a UDP message to the user terminal corresponding to the Internet protocol address at an adjustable broadband rate.
21. The apparatus according to any one of claims 12 to 18, wherein the obtaining module is further configured to obtain a service access log; obtaining an internet protocol address from a service access log; acquiring an object identifier to be detected corresponding to an internet protocol address; and classifying the Internet protocol address according to the object identifier to be detected to obtain the Internet protocol address corresponding to the object identifier to be detected.
22. The apparatus according to any one of claims 12 to 18, wherein the obtaining module is further configured to obtain an internet protocol address corresponding to the object identifier to be detected from an internet protocol address database.
23. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 11.
24. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 11.
CN201910301810.3A 2019-04-16 2019-04-16 Bandwidth measuring method, device, computer readable storage medium and computer equipment Active CN109921962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910301810.3A CN109921962B (en) 2019-04-16 2019-04-16 Bandwidth measuring method, device, computer readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910301810.3A CN109921962B (en) 2019-04-16 2019-04-16 Bandwidth measuring method, device, computer readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN109921962A CN109921962A (en) 2019-06-21
CN109921962B true CN109921962B (en) 2021-03-23

Family

ID=66977348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910301810.3A Active CN109921962B (en) 2019-04-16 2019-04-16 Bandwidth measuring method, device, computer readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN109921962B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572440B (en) * 2019-08-16 2022-03-25 海尔优家智能科技(北京)有限公司 Method and device for data transmission, household appliance and storage medium
CN112787879A (en) * 2019-11-08 2021-05-11 西安诺瓦星云科技股份有限公司 Gigabit Ethernet packet loss detection method and device thereof
CN110932997B (en) * 2019-12-09 2022-06-21 苏州浪潮智能科技有限公司 Method, device and medium for reducing network traffic packet loss
CN111092791B (en) * 2019-12-31 2023-01-31 上海掌门科技有限公司 Method and equipment for determining available network bandwidth from application to server
CN111404783B (en) * 2020-03-20 2021-11-16 南京大学 Network state data acquisition method and system
CN111988196B (en) * 2020-07-21 2022-04-01 中国长城科技集团股份有限公司 Bandwidth detection method and device, electronic equipment and storage medium
CN112073128A (en) * 2020-08-18 2020-12-11 江苏创通电子股份有限公司 Communication equipment performance test method and device
CN112202921A (en) * 2020-10-23 2021-01-08 苏州聚慧邦信息科技有限公司 Office equipment remote interaction method and device and online office interaction platform
CN114338473A (en) * 2021-12-20 2022-04-12 广州市柏特科技有限公司 Multi-element cooperative broadband speed measurement method, speed measurement system, terminal and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242318A (en) * 2008-03-14 2008-08-13 华为技术有限公司 Method and device for getting network connection quality information of network node
CN106487613A (en) * 2016-11-16 2017-03-08 北京华为数字技术有限公司 A kind of bandwidth test methods, devices and systems
CN106612238A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Flow control method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7983189B2 (en) * 2008-03-12 2011-07-19 Embarq Holdings Company, Llc System and method for tracking performance and service level agreement compliance for multipoint packet services
CN108011771A (en) * 2016-11-01 2018-05-08 阿里巴巴集团控股有限公司 Detection method, device and the equipment of network link available bandwidth

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242318A (en) * 2008-03-14 2008-08-13 华为技术有限公司 Method and device for getting network connection quality information of network node
CN106612238A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Flow control method, device and system
CN106487613A (en) * 2016-11-16 2017-03-08 北京华为数字技术有限公司 A kind of bandwidth test methods, devices and systems

Also Published As

Publication number Publication date
CN109921962A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109921962B (en) Bandwidth measuring method, device, computer readable storage medium and computer equipment
US20220329535A1 (en) Data flow control method and apparatus
US9674279B2 (en) Methods, devices, and systems for allocating service nodes in a network
US9118599B2 (en) Network testing using a control server
CN108632110B (en) Device performance testing method, system, computer device and storage medium
EP3281361B1 (en) Latency measurer
US9379989B2 (en) Congestion avoidance and control for UDP-based protocols
CN112653634A (en) Flow control method, device, equipment and readable storage medium
CN115460572A (en) Application program acceleration method, device, equipment and storage medium
CN110691139B (en) Data transmission method, device, equipment and storage medium
CN111917682B (en) Access behavior identification method, performance detection method, device, equipment and system
US11622396B2 (en) Method and network node of setting up a wireless connection
CN113179172B (en) Method, device and system for training fault detection model
CN110912904B (en) Malicious device identification method and device, storage medium and computer device
CN110380981B (en) Flow distribution method and equipment
CN110891077A (en) CDN node detection method and device
CN115002008B (en) Method, device, equipment and storage medium for measuring network delay
CN110475244B (en) Terminal management method, system, device, terminal and storage medium
US20220368590A1 (en) Fault Detection Method, Apparatus, and System
US11677651B2 (en) UDPING—continuous one-way monitoring of multiple network links
CN107911498A (en) A kind of method and device that dns resolution is realized based on DNS proxy
CN109347766A (en) A kind of method and device of scheduling of resource
CA3149650C (en) Methods and system for adaptive measurements applied to real time performance monitoring in a packet network
CN109002296A (en) A kind of method for downloading software, device and base station
US20140269748A1 (en) Method and apparatus having improved line rate ip packet communication

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