Method and device for measuring network delay

By adaptively adjusting the sampling ratio and configuring the flow screening rules in the measurement equipment, the problem of poor packet acquisition flexibility in existing passive measurement methods is solved, and more efficient network delay measurement and resource utilization are achieved.

CN119094397APending Publication Date: 2024-12-06HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311278637.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-06
Filing Date
2023-09-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing passive network delay measurement methods cannot effectively adapt to different traffic characteristics, resulting in poor availability of data acquisition packets and waste of resources, and cannot meet the flexible needs of different users and scenarios.

Method used

By adaptively adjusting the sampling ratio based on the measurement target and network delay measurement results, flow filtering rules are configured to dynamically adjust packet acquisition, improving the accuracy of packet sampling and resource utilization efficiency.

Benefits of technology

It improves the flexibility and resource utilization efficiency of network latency measurement, improves the availability of measurement data packets and the accuracy of calculating network latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094397A_ABST
    Figure CN119094397A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a network delay measurement method and device, which are used for improving the availability of a sampling data packet and the flexibility of network delay measurement. The method comprises the steps that measurement input information of network delay measurement is acquired, the measurement input information comprises one or more of the following items: a measurement flow characteristic, a measurement target and a measurement period, the measurement flow characteristic is used for identifying a data packet to be measured, and the measurement target is used for indicating the measurement intention of a user. And configuring a flow screening rule of network delay measurement according to the measurement input information, the flow screening rule being used for indicating measurement resources corresponding to different measurement flow characteristics, and the measurement resources comprising a sampling ratio. And performing network delay measurement on the data flow based on the flow screening rule to generate a measurement result, the measurement result comprising the number of the collection data packets corresponding to different measurement flow characteristics and the network delay. And updating the flow screening rule of the next measurement period based on the measurement target and the measurement result.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office on June 6, 2023, with application number 202310669015.6 and invention name “A network delay testing method and cloud management platform based on cloud management platform”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for measuring network delay. Background Art

[0003] Network latency is a key indicator of network performance and user quality of experience (QoE). Many cloud vendors provide users with network latency measurement services, which include active measurement and passive measurement. Active measurement means that the measurement device uses a proxy to send specific probe packets to the network, and measures network latency by recording the sending time of the probe packet and the receiving time of the response packet. Passive measurement means that the measurement device does not need to actively send probe packets to the network, but uses real business data packets in the network for measurement.

[0004] In the current passive measurement scheme, the measurement equipment cannot measure all the traffic in the network. Therefore, the measurement equipment usually uses sampling measurement to collect data packets and measure network delay. Current measurement equipment usually uses a fixed sampling ratio to collect measurement data packets corresponding to different traffic characteristics. When the data traffic corresponding to a certain traffic characteristic changes, the measurement equipment still uses a fixed sampling ratio to collect test data packets, which will lead to poor availability of the collected measurement data packets and waste of measurement resources. At the same time, the measurement equipment uses a fixed sampling ratio to collect measurement data packets and cannot meet the various collection requirements of different users and in different scenarios, resulting in poor flexibility in collecting measurement data packets during the passive measurement of network delay. Summary of the invention

[0005] The embodiment of the present application provides a method for measuring network delay, in which the measuring device can adaptively adjust the sampling ratio of the measuring device for different traffic characteristics based on the measurement results of the sampled data packets of the measurement target and different traffic characteristics, thereby improving the availability of the sampled data packets and the flexibility of network delay measurement. The embodiment of the present application also provides a network delay measurement device, a computing device, a computing device cluster, a computer-readable storage medium, and a computer program product corresponding to the network delay measurement method.

[0006] In the first aspect, an embodiment of the present application provides a method for measuring network delay, which can be performed by a measuring device, or by a component of the measuring device, such as a processor, chip or chip system of the measuring device, or by a logic module or software that can realize all or part of the functions of the measuring device. The method provided in the first aspect includes: the measuring device obtains measurement input information for network delay measurement, and the measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets and measurement cycles, the measurement traffic characteristics are used to identify the data packets to be measured, and the measurement targets are used to indicate the user's measurement intention. The measuring device configures the flow screening rules for network delay measurement according to the measurement input information, and the flow screening rules are used to indicate the measurement resources corresponding to different measurement traffic characteristics, and the measurement resources include the sampling ratio. The measuring device performs network delay measurement on the data stream based on the flow screening rules, and generates a measurement result, and the measurement result includes the number of collected data packets and network delay corresponding to different measurement traffic characteristics. The measuring device updates the flow screening rules for the next measurement cycle based on the measurement target and the measurement result.

[0007] In the embodiment of the present application, the measuring device can configure the measurement resources corresponding to different measurement traffic characteristics based on the user's measurement input information, and adjust the measurement resources corresponding to different traffic characteristics in the next cycle based on the measurement target and the measurement results of the network delay, thereby improving the availability of collected data packets during the network delay measurement process, and further improving the utilization efficiency of the measurement resources of the measuring device and the measurement flexibility of the network delay.

[0008] In some possible implementations, when the measuring device configures the flow filtering rules of the network delay according to the network delay measurement information, the flow filtering rules are created in the flow filtering table according to the measured traffic characteristics. The flow filtering table is used to filter the data packets that need to be collected. The flow filtering rules include one or more of the following: a matching value, a sampling ratio, and a processing action. The matching value is used to indicate the matching field in the measured traffic characteristics. The sampling ratio is used to indicate the measurement resources corresponding to the measured traffic characteristics. The action is used to indicate the processing action of the measuring device on the collected data packets.

[0009] In the embodiment of the present application, the measuring device can add flow filtering rules to the flow filtering table, and use the flow filtering rules to determine the collected data packets that need to be measured for network delay, thereby improving the accuracy of data packet sampling of the measuring device.

[0010] In some possible implementations, when the measuring device measures the network delay of the data flow based on the flow screening rule, when the data packet in the data flow matches the matching value in the flow screening table, the data packet is collected based on the sampling ratio corresponding to the matching value to obtain the collected data packet. The measuring device records the measurement information corresponding to the collected data packet in the network delay measurement table, and the measurement information includes one or more of the following: matching value, request arrival time and network delay. The measuring device performs statistics based on the measurement information in the network delay measurement table to obtain the measurement result, and the measurement result includes the number of sampled data packets and network delay corresponding to different traffic characteristics.

[0011] In the embodiment of the present application, the measuring device can sample data packets with different traffic characteristics, record the measurement information of the sampled data packets in a network delay measurement table, and obtain the measurement results by statistically analyzing the measurement information, thereby improving the feasibility of network delay measurement.

[0012] In some possible implementations, when the measuring device matches the matching value of the flow filter table with the data flow based on a matching algorithm, the measuring device extracts a header field of the data packet and matches it with the matching value of the flow filter table. The matching algorithm includes one or more of the following: longest prefix match, exact match, and range match.

[0013] In the embodiment of the present application, the measuring device can match the matching value of the flow screening table with the data packet in the data flow based on multiple matching algorithms, thereby improving the accuracy of data packet matching during the data packet sampling process of the measuring device.

[0014] In some possible implementations, after the measuring device obtains the collected data packet, it determines the type of the collected data packet based on the virtual local area network identifier of the collected data packet, and the types include request packets and arrival packets. When the collected data packet is a request packet, the measuring device records the network delay of the collected data packet as 0. When the measuring device receives the response packet corresponding to the collected data packet, the measuring device calculates the network delay based on the arrival time of the response packet and the arrival time of the collected data packet. When the collected data packet is a response packet, the measuring device calculates the network delay of the collected data packet based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet.

[0015] In the implementation of the present application, the measuring device can determine whether the sampled data packet is a request packet or a response packet based on the virtual LAN identifier of the collected data packet, and calculate the network delay based on the time difference between the response packet and the request packet arriving at the measuring device, thereby improving the feasibility of the measuring device to calculate the network delay.

[0016] In some possible implementations, the measuring device scans the measurement information of the collected data packets in the network delay measurement table according to the measurement period in the measurement input information. The measuring device caches the measurement information of the collected data packets whose network delay is not 0, and after the network delay measurement module of the measuring device scans the measurement information of the collected data packets in the network delay measurement table, it reports the cached measurement information in the network delay measurement table to the adaptive adjustment module.

[0017] In the embodiment of the present application, the measuring device can scan the measurement information in the network delay measurement table based on the measurement period, thereby improving the storage efficiency of the network delay measurement table.

[0018] In some possible implementations, the measuring device clears invalid measurement information in the network delay measurement table after the measurement period ends, where the invalid measurement information includes measurement information corresponding to a collection data packet whose network delay is 0 during the measurement period.

[0019] In the embodiment of the present application, the measuring device can promptly clear invalid measurement information in the network delay measurement table after the measurement cycle ends, thereby improving the storage efficiency of the network delay measurement table and further improving the memory efficiency of the measuring device.

[0020] In some possible implementations, when the measuring device updates the flow screening rules for the next measurement cycle based on the measurement target and the measurement result, the measuring device determines the sampling ratios corresponding to different measurement flow characteristics for the next measurement cycle based on the measurement target and the measurement result. Specifically, the measuring device selects the collected data packets that meet the measurement target in the network delay measurement table based on the measurement target, and then counts the number of collected data packets corresponding to different measurement characteristics, and calculates the ratio of collected data packets corresponding to different measurement characteristics based on the number of collected data packets corresponding to different measurement characteristics and the total number of sampled data packets. Finally, the measuring device can calculate the sampling ratios corresponding to different measurement characteristics for the next measurement cycle based on the total sampling ratio of the measuring device and the ratio.

[0021] In the embodiment of the present application, the measuring device can determine the sampling ratio corresponding to different measurement traffic characteristics of the next measurement cycle based on the measurement target and the measurement result, thereby improving the availability of data packets collected by the measuring device and further improving the utilization efficiency of measurement resources.

[0022] In some possible implementations, the measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size, and timestamp.

[0023] In the embodiment of the present application, the measuring device can determine the measurement traffic characteristics to be collected according to the user's measurement input information, and collect data packets based on the measurement traffic characteristics to perform network delay measurement, thereby improving the flexibility of the measuring device in performing network delay measurement.

[0024] In some possible implementations, the measurement objectives include one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delays exceeding a threshold, and obtaining the most network delay results for data streams from different operators.

[0025] In the embodiment of the present application, the measuring device can determine the target to be measured based on the user's measurement input information, and update the flow screening rules for the next cycle based on the measurement target and the measurement results in the network delay table, thereby improving the flexibility of the measuring device in performing network delay measurement.

[0026] In the second aspect, an embodiment of the present application provides a network delay measurement device, which includes a measurement input module, an adaptive adjustment module, and a network delay measurement module. Among them, the measurement input module is used to obtain measurement input information for network delay measurement, and the measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets, and measurement cycles. The measurement traffic characteristics are used to identify data packets to be measured, and the measurement targets are used to indicate the user's measurement intention. The adaptive adjustment module is used to configure the flow screening rules for network delay measurement according to the measurement input information. The flow screening rules are used to indicate the measurement resources corresponding to different measurement traffic characteristics, and the measurement resources include the sampling ratio. The network delay measurement module is used to measure the network delay of the data flow based on the flow screening rules and generate measurement results. The measurement results include the number of collected data packets and network delays corresponding to different measurement traffic characteristics. The adaptive adjustment module is also used to update the flow screening rules for the next measurement cycle based on the measurement target and the measurement results.

[0027] In some possible implementations, the adaptive adjustment module is specifically used to create flow filtering rules in the flow filtering table according to the measured traffic characteristics. The flow filtering table is used to filter the data packets that need to be collected. The flow filtering rules include one or more of the following: a matching value, a sampling ratio, and a processing action. The matching value is used to indicate a matching field in the measured traffic characteristics.

[0028] In some possible implementations, the device further includes a flow screening module, which is used to collect data packets based on a sampling ratio corresponding to the matching value when a data packet in the data stream matches a matching value in the flow screening table, thereby obtaining a collected data packet. The network delay measurement module is specifically used to record measurement information corresponding to the collected data packet in the network delay measurement table, wherein the measurement information includes one or more of the following: matching value, request arrival time, and network delay. Statistics are performed based on the measurement information in the network delay measurement table to obtain a measurement result.

[0029] In some possible implementations, the flow screening module is further used to determine the type of the collected data packet based on the virtual local area network identifier of the collected data packet, and the type includes a request packet and an arrival packet. The network delay measurement module is further used to calculate the network delay of the collected data packet based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet when the collected data packet is a response packet.

[0030] In some possible implementations, the network delay measurement module is further used to clear invalid measurement information in the network delay measurement table, where the invalid measurement information includes measurement information corresponding to a collection data packet whose network delay is 0 within a measurement period.

[0031] In some possible implementations, the adaptive adjustment module is specifically configured to determine, based on the measurement target and the measurement result, the sampling ratio corresponding to different measured flow characteristics in the next measurement period.

[0032] In some possible implementations, the measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size, and timestamp.

[0033] In some possible implementations, the measurement objectives include one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delays exceeding a threshold, and obtaining the most network delay results for data streams from different operators.

[0034] A third aspect of an embodiment of the present application provides a computing device, comprising a processor coupled to a memory, the processor being used to store instructions, and when the instructions are executed by the processor, the computing device executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0035] A fourth aspect of an embodiment of the present application provides a computing device cluster, the computing device cluster includes one or more computing devices, the computing device includes a processor, the processor is coupled to a memory, the processor is used to store instructions, when the instructions are executed by the processor, the computing device cluster executes the method described in the first aspect or any possible implementation method of the first aspect.

[0036] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed, the computer executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0037] A sixth aspect of the embodiments of the present application provides a computer program product, which includes instructions. When the instructions are executed, the computer implements the method described in the first aspect or any possible implementation method of the first aspect.

[0038] It can be understood that the beneficial effects that can be achieved by any of the network delay measurement devices, computing devices, computing device clusters, computer-readable media or computer program products provided above can be referred to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1a A schematic diagram of the system architecture of a network delay measurement system provided in an embodiment of the present application;

[0040] Figure 1b A schematic diagram of a measurement network provided in an embodiment of the present application;

[0041] Figure 1c A schematic diagram of another measurement network provided in an embodiment of the present application;

[0042] Figure 1d A schematic diagram of another measurement network provided in an embodiment of the present application;

[0043] Figure 2 A flowchart of a network delay measurement method provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of measuring network delay in a wide area network provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a flow screening process provided in an embodiment of the present application;

[0046] Figure 5a A schematic diagram of a request packet processing flow provided in an embodiment of the present application;

[0047] Figure 5b A schematic diagram of a processing flow of a response packet provided in an embodiment of the present application;

[0048] Figure 6 A schematic diagram of flow screening provided in an embodiment of the present application;

[0049] Figure 7 A schematic diagram of a network delay measurement provided in an embodiment of the present application;

[0050] Figure 8 A schematic diagram of another network delay measurement provided in an embodiment of the present application;

[0051] Fig. 9A schematic diagram of another network delay measurement provided in an embodiment of the present application;

[0052] Fig.10 A schematic diagram of another network delay measurement provided in an embodiment of the present application;

[0053] Fig.11 A schematic diagram of the structure of a network delay measurement device provided in an embodiment of the present application;

[0054] Fig.12 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0055] Fig.13 A schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;

[0056] Fig.14 A schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The embodiments of the present application provide a method and device for measuring network delay, which are used to improve the availability of network delay data packets collected by test equipment.

[0058] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0059] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0060] First, some terms involved in the embodiments of the present application are introduced to facilitate technical personnel in this field to understand the technical solution.

[0061] Passive measurement is a method of measuring network latency by collecting the transmission delay of data packets in the network. Passive measurement is performed through the capture function on the network device or the traffic monitoring tool, recording the arrival time and departure time of the data packet, and then calculating the latency by analyzing this data. Passive measurement does not require sending probe packets, and can monitor and analyze network latency, latency changes, and congestion in real time, and is used for network performance monitoring, troubleshooting, and topology analysis.

[0062] Round trip time (RTT) refers to the total time it takes for a data packet to be sent from the source host to the destination host and then returned from the destination host to the source host. Round trip time is often used to measure network latency.

[0063] In order to make the technical solution of the present application clearer and easier to understand, the system architecture of the present application is introduced below with reference to the accompanying drawings.

[0064] See also Figure 1a , Figure 1a A schematic diagram of the system architecture of a network delay measurement system provided in an embodiment of the present application. Figure 1a In the system architecture shown, the network delay measurement system 10 includes a measurement device 100 and a measurement network 200, wherein the measurement device 100 includes a measurement input module 101, an adaptive adjustment module 102, a flow screening module 103, a measurement module 104 and a storage module 105. The specific functions of each module are described below.

[0065] The measuring device 100 is used to collect data packets transmitted in the measuring network 200, and calculate the network delay of the data packets based on the round-trip time of the collected data packets. The measuring device 100 is also used to allocate measurement resources for different measurement traffic characteristics, the measurement resources include sampling ratios, and adaptively adjust the measurement resources corresponding to different measurement characteristics according to the user measurement target and the measurement results of the network delay measurement.

[0066] The measurement input module 101 is used to receive measurement input information of network delay measurement, and the measurement input information can reflect the measurement requirements of the user for network delay measurement. The measurement input information includes measurement traffic characteristics, measurement targets and measurement cycles, wherein the measurement traffic characteristics are used to identify the data packets to be collected by the measurement device, the measurement targets are used to indicate the collection targets of the data packets to be collected, and the measurement cycles are the time intervals at which the user indicates the measurement device to reallocate measurement resources.

[0067] The adaptive adjustment module 102 is used to initialize the flow screening module 103 and the network delay measurement module 104 according to the measurement input information. The initialization of the flow screening module 103 includes adding a flow screening rule for each measured flow feature in the flow screening table of the flow screening module 103 according to different measured flow features, and the flow screening rule includes a matching value and a sampling ratio corresponding to the measured flow feature.

[0068] Initializing the network delay measurement module 104 includes configuring a matching value for each measurement traffic feature in the network delay measurement table of the network delay measurement module 104 according to different measurement traffic features, and configuring a measurement result reporting period for the network delay measurement module 104 according to the measurement period.

[0069] The adaptive adjustment module 102 is also used to update the flow screening rules in the flow screening module 103 according to the measurement target and the measurement results of the network delay measurement, including screening the collected data packets according to the measurement target, counting the number of filtered collected data packets corresponding to different measured traffic characteristics, calculating the sampling ratio corresponding to different measured traffic characteristics based on the number of filtered collected data packets corresponding to different measured traffic characteristics, and updating the flow screening rules of the next cycle based on the sampling ratio. The adaptive adjustment module 102 is also used to obtain the measurement results of the network delay measurement of each measurement cycle from the network delay measurement module 104, and send the sampling ratios corresponding to different measured traffic characteristics of each measurement cycle to the storage module 105.

[0070] The flow screening module 103 is used to screen and sample data packets in the measurement network 200 according to the flow screening rules, including matching the data packets in the measurement network 200 according to the matching values ​​corresponding to different measurement traffic characteristics, sampling the screened data packets based on the sampling ratios corresponding to the different measurement traffic characteristics, and sending the sampled data packets to the network measurement module 104. The flow screening module 103 is also used to mark the data packets of the collected data packets, and the data packet types include request packets and response packets.

[0071] The network measurement module 104 is used to measure the network delay of the collected data packets sent by the flow screening module 103, and record the measurement information of the collected data packets in the network delay measurement table, the measurement information including the arrival time of the collected data packets and the network delay. The network measurement module 104 is also used to calculate the network delay according to the arrival time of the request packet and the arrival time of the response packet corresponding to the request packet.

[0072] The storage module 105 is used to store the measurement results of the network delay measurement in each measurement period reported by the adaptive adjustment module 102, and the records of the sampling ratios corresponding to different measured traffic characteristics in each measurement period.

[0073] The measurement network 200 is a network from which the measurement device 100 collects data packets. The measurement network 200 may be a variety of different types of networks, and different types of networks correspond to different network delay measurement scenarios. For example, the measurement network 200 may be a wide area network or a local area network, and the local area network includes a data center network or a campus network. The following is an exemplary description of the network delay measurement scenarios in the implementation of this application in combination with several different measurement networks.

[0074] See also Figure 1b , Figure 1b A schematic diagram of a wide area network delay measurement scenario provided in an embodiment of the present application. Figure 1b In the network delay measurement scenario shown in FIG. 1 , the measurement network 200 for network delay measurement is a wide area network. Figure 1b In a wide area network scenario, a user device is connected to a cloud network via a network device provided by an internet service provider (ISP). The measurement device 100 can collect data packets at a point of presence (POP) that aggregates traffic in the wide area network. For example, the measurement device 100 imports a mirror image of network traffic into the measurement device 100 via a splitter or other device to measure network latency.

[0075] exist Figure 1b In the network delay measurement scenario shown, the measurement device 100 may be a programmable switch or a server, which is not specifically limited.

[0076] See also Figure 1c , Figure 1c A schematic diagram of a network delay measurement scenario for a data center network provided in an embodiment of the present application. Figure 1c In the network delay measurement scenario shown in the figure, the measurement network 200 for network delay measurement is a data center network. Figure 1c In the data center network shown, the data center network includes a server cluster, an access switch, an aggregation switch, and a core switch.

[0077] Among them, the access switch connects the server and the aggregation switch. The aggregation switch is located in the middle layer of the data center network and is used to connect multiple access switches and core switches. The aggregation switch is responsible for integrating traffic, aggregating data from different access switches and forwarding it to the core switch or other aggregation switches. The core switch is the core node of the data center network, connecting multiple aggregation switches and other core switches, and is responsible for processing and forwarding large amounts of data traffic.

[0078] exist Figure 1cIn the data center network shown, the measuring device 100 can be set at a server cluster, access switch, aggregation switch or core switch, without specific limitation. For example, the measuring device 100 is set at an aggregation switch, and the image of the network traffic is imported into the measuring device 100 through a device such as a splitter to achieve the measurement of network delay. Figure 1c In the network delay measurement scenario shown, the measuring device 100 may be a programmable switch, a server or a network card, without limitation.

[0079] See also Figure 1d , Figure 1d A schematic diagram of a network delay measurement scenario for a campus network provided in an embodiment of the present application. Figure 1d In the network delay measurement scenario shown, the measurement network 200 for network delay measurement is a campus network, for example, a computer network of multiple buildings, offices, and facilities located in the same physical campus. Figure 1d In the campus network shown, the campus network includes terminal devices, access switches, and core switches.

[0080] exist Figure 1d In the campus network shown, the measuring device 100 can measure network delay at a terminal device, an access switch or a core switch, without limitation. For example, the measuring device 100 is set at an access switch, and a mirror of network traffic is imported into the measuring device 100 through a device such as an optical splitter to measure network delay.

[0081] It should be noted that the measurement device 100 in the embodiment of the present application may also be a cloud service for network delay measurement provided by a cloud service platform, or a network delay measurement module in an operation and maintenance management tool, without specific limitation.

[0082] based on Figure 1a The network delay measurement system 10 shown in the figure, the present application also provides a network delay measurement method. Figure 2 , the network delay measurement method provided in the embodiment of the present application is introduced below in combination with the embodiment.

[0083] 201. The measuring device obtains measurement input information for network delay measurement, where the measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets, and measurement cycles.

[0084] The measuring device 100 obtains measurement input information for network delay measurement. Specifically, the measuring device receives measurement input information from a user, and the measurement input information is used to indicate the user's network delay measurement requirements. The measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets, and measurement cycles. The measurement traffic characteristics, measurement targets, and measurement cycles are described in detail below.

[0085] The measured traffic characteristics are used to identify data packets for network delay measurement, and the measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size, timestamp and other information of the data packet.

[0086] The measurement target is used to indicate the user's measurement intention, including the user's collection target for collecting data packets with the above-mentioned measurement traffic characteristics. The measurement target includes one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delays exceeding a threshold, and obtaining the most network delay results for data streams from different operators.

[0087] The measurement cycle is the interval time for the measurement device to reallocate measurement resources. In a measurement cycle, the measurement resources corresponding to different measurement traffic characteristics will not change.

[0088] See also Figure 3 , Figure 3 A schematic diagram of measuring network delay in a wide area network provided in an embodiment of the present application. Figure 3 In the example shown, the measuring device measures the network delay of the transmission data flow between the user device and the network server, the measuring device imports the mirror image of the network traffic into the measuring device through the splitter, and the measuring device collects data packets to measure the network delay.

[0089] exist Figure 3 In the example shown, the measurement device receives measurement input information from a user, and the measurement input information includes two measurement traffic features, namely, "the destination IPv4 address belongs to the network segment 10.1.1.0 / 24" and "the destination IPv4 address belongs to the network segment 20.2.2.0 / 24". The measurement target is "to obtain the most network delay packets", and the measurement period is 1 minute.

[0090] exist Figure 3 In the example shown, the transmission data flow between the user device and the network server includes data packet 1 and data packet 2, wherein the source IP address of data packet 1 is 20.2.2.200, the destination IP address is 10.1.1.1000, the source port is 2453, the destination port is 80, and the VLAN ID of data packet 1 is 1000. The source IP address of data packet 2 is 10.1.1.100, the destination IP address is 20.2.2.200, the source port is 80, the destination port is 2453, and the VLAN ID of data packet 2 is 1214. The measurement device performs data packet collection and network delay measurement based on the measurement input information.

[0091] 202. The measurement device configures a flow screening rule for network delay measurement according to the measurement input information. The flow screening rule is used to indicate measurement resources corresponding to different measurement traffic characteristics. The measurement resources include a sampling ratio.

[0092] After the measurement device 100 obtains the measurement input information, it configures the flow screening rules for network delay measurement according to the measurement input information. The flow screening rules are used to indicate the measurement resources corresponding to different measurement traffic characteristics. The measurement resources include sampling ratios. For example, the sampling ratio is 1000 flows / second. When configuring the flow screening rules according to the measurement input information, the measurement device 100 creates the flow screening rules in the flow screening table according to the measurement input information. The flow screening rules include one or more of the following: matching value, sampling ratio, and action. The flow screening rules are described in detail below.

[0093] The matching value refers to the matching field corresponding to the measurement traffic feature in the measurement input information, and the measurement device 100 selects the data packets that need to be measured for network delay based on the matching value. For example, if the measurement traffic feature in the measurement input information is "the destination IPv4 address belongs to the network segment 10.1.1.0 / 24", the matching value corresponding to the measurement traffic feature is "10.1.1.0 / 24".

[0094] The sampling ratio is used to indicate the sampling frequency corresponding to the measured traffic feature in the measurement input information. The higher the sampling ratio, the higher the sampling frequency corresponding to the measured traffic feature. For example, the sampling ratio corresponding to the measured traffic feature "destination IP address belongs to network segment 10.1.1.0 / 24" is 500 flows / second.

[0095] The action refers to the processing action of the measurement device 100 on the collected data packets, including identifying the type of data packets and sending the sampled data packets to the network delay measurement module.

[0096] Please refer to Figure 1, which is a schematic diagram of a flow filtering table provided by the present application. In the flow filtering table shown in Table 1, the flow filtering table includes matching values, sampling ratios, and processing actions, wherein each row in the flow filtering table represents a flow filtering rule, and the measurement device 100 can set matching values, sampling ratios, and actions corresponding to different measurement features.

[0097] Table 1

[0098] Matching Value Sampling ratio action 10.1.1.0 / 24 500 Identify the type of collected data packets and send the collected data packets to the network delay measurement module. 20.2.2.0 / 24 500 Identify the type of collected data packets and send the collected data packets to the network delay measurement module. … … …

[0099] In the example shown in Table 1, the matching value corresponding to the measured traffic feature "destination IPv4 address belongs to network segment 10.1.1.0 / 24" is "10.1.1.0 / 24". The measuring device 100 can set the sampling ratio corresponding to the matching value "10.1.1.0 / 24" to "500", and the action to "identify the type of collected data packet and send the collected data packet to the network delay measurement module".

[0100] 203. The measuring device measures the network delay of the data flow based on the flow screening rule and generates a measurement result, which includes the number of collected data packets and the network delay corresponding to different measurement flow characteristics.

[0101] After the measurement device 100 completes configuring the flow screening rule based on the measurement input information, it performs network delay measurement on the data flow of the measurement network 200 according to the flow screening rule. The data flow is the real service data flow of the measurement network 200.

[0102] Specifically, when the measuring device 100 collects the measurement data packets, the flow screening module of the measuring device 100 matches the matching value in the flow screening table with the data flow based on the matching algorithm. When the data packet in the data flow matches the matching value in the flow screening table, the data packet is collected based on the sampling ratio corresponding to the matching value to obtain the collected data packet. For example, if the destination IP address "10.1.1.100" of the data flow in the measurement network 200 belongs to the network segment "10.1.1.0 / 24", then the data flow is a data flow that matches the flow screening rule. The measuring device 100 collects data packets for the data flow every 1 / 500 seconds to obtain a sampled data packet.

[0103] When the measuring device 100 matches the matching value of the flow filter table with the data flow based on the matching algorithm, the measuring device extracts the header field of the data packet and matches it with the matching value of the flow filter table. The matching algorithm in the embodiment of the present application includes one or more of the following: longest prefix matching, exact matching and range matching.

[0104] See also Figure 4 , Figure 4 A schematic diagram of a measurement device for flow screening provided for the implementation of this application. Figure 4 In the example steps a to d shown, the measuring device extracts the header field of the data packet in the measuring network. The measuring device matches the matching value in the flow screening table with the header field of the data packet based on the matching algorithm. If there is a matching relationship, the measuring device collects the data packet based on the sampling ratio in the flow screening rule. If there is no matching relationship, the measuring device discards the data packet.

[0105] In a possible implementation, the measuring device 100 determines the type of the collected data packet based on the virtual local area network identifier (VLAN ID) of the collected data packet during the data packet collection process, and the types include request packets and arrival packets. For example, if the virtual local area network identifier of the collected data packet is "1000", then the collected data packet is a request packet, and if the virtual local area network identifier of the collected data packet is not "1000", then the collected data packet is a response packet.

[0106] Please continue reading Figure 4 ,exist Figure 4 In the example steps e to h shown, during the process of data packet collection based on the sampling ratio in the flow screening rule, the measuring device determines whether to sample the current data packet. If it is determined that the data packet needs to be sampled, the type of the data packet is identified according to the VLAN ID of the data packet, and the data packet is sent to the network delay measurement module, which records the measurement information of the data packet in the network delay measurement table. If it is determined that the data packet does not need to be sampled, the data packet is discarded.

[0107] When the collected data packet is a request packet, the measuring device 100 records the network delay of the collected data packet as 0. When the measuring device 100 receives the response packet corresponding to the collected data packet, the measuring device 100 calculates the network delay based on the arrival time of the response packet and the arrival time of the collected data packet. When the collected data packet is a response packet, the measuring device 100 calculates the network delay of the collected data packet based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet.

[0108] See also Figure 5a , Figure 5a A schematic diagram of a flow chart of a measurement device processing a request packet provided in an embodiment of the present application. Figure 5a In steps a to c of the example shown, after the measuring device samples the data packet, when it determines that the collected data packet is a request packet based on the VLAN ID of the data packet, the measuring device inserts the measurement information of the request packet into the network delay measurement table, including the matching value of the request packet, the request packet arrival time and the network delay, wherein the matching value includes the source IP address, destination IP address, source port and destination port of the request packet, and the request packet arrival time is the time when the request packet arrives at the measuring device. Since the measuring device has not received the response packet corresponding to the request packet, the network delay is 0.

[0109] exist Figure 5a In steps e to f of the example shown, when the measuring device successfully inserts the measurement information of the request packet into the network delay measurement table, the measuring device discards the data packet; when the measuring device fails to insert the measurement information of the request packet into the network delay measurement table, an abnormality occurs in the data packet collection and the measuring device discards the data packet.

[0110] See also Figure 5b , Figure 5b A schematic diagram of a flow chart of a measurement device processing a response packet provided in an embodiment of the present application. Figure 5bIn steps a to c of the example shown, after the measuring device collects data packets and determines that the data packet is a response packet based on the VLANID of the sampled data packet, the measuring device extracts the packet header field of the response packet as a matching value to match the corresponding request packet in the network delay table. When the corresponding request packet is matched, the measuring device modifies the measurement information of the request packet corresponding to the response packet in the network delay measurement table.

[0111] exist Figure 5b In steps d to e of the example shown, during the process of the measuring device modifying the measurement information of the request packet corresponding to the response packet in the network delay measurement table, the measuring device calculates the network delay according to the arrival time of the response packet and the arrival time of the corresponding request packet, and modifies the network delay of the request packet corresponding to the response packet in the network delay measurement table, and then discards the response data packet. When the corresponding request packet is not matched, the response packet is discarded.

[0112] See also Figure 6 , Figure 6 A schematic diagram of measuring data packet collection based on a flow screening table provided in an embodiment of the present application. Figure 6 In the example shown, there are two flow filtering rules in the flow filtering table, where the matching value of the first filtering rule is "10.1.1.0 / 24" and the sampling ratio is "500", and the matching value of the second filtering rule is "20.2.2.0 / 24" and the sampling ratio is "500".

[0113] exist Figure 6 In the example shown, when the measuring device receives data packet 1, the destination IP address of data packet 1 is extracted as "10.1.1.100". The destination IP address matches the first flow filter rule in the flow filter table, and the measuring device uses the action in the flow filter rule to process data packet 1. During the processing, since data packet 1 is a TCP data packet and its VLAN ID is 1000, the measuring device identifies the data packet as a request packet. Then, the measuring device collects the data packet according to the sampling ratio in the flow filter rule, that is, the measuring device sends a matching collection data packet to the network delay measurement module every 1 / 500s.

[0114] exist Figure 6 In the example shown, when the measurement device receives data packet 2, the destination IP address of data packet 2 is extracted as "20.2.2.200", and the destination IP address of data packet 2 matches the second flow filter rule in the flow filter table. The measurement device processes data packet 2 using the action in the flow filter rule. Since data packet 2 is a TCP data packet, but its VLAN ID is not 1000, the measurement device identifies data packet 2 as a response packet. The measurement device collects the data packet according to the sampling ratio in the flow filter rule, that is, the measurement device sends a matching data packet 2 to the network delay measurement module every 1 / 500s.

[0115] In a possible implementation, after the measuring device 100 obtains the sampled data packet, the measuring device 100 records the measurement information corresponding to the sampled data packet in the network delay measurement table, where the measurement information includes one or more of the following: matching value, request arrival time, network delay, and processing action. For example, the measuring device 100 adds the measurement information corresponding to the sampled data packet to the network delay measurement table, including the source IP address, destination IP address, source port, destination port, data packet arrival time, and network delay of the sampled data packet.

[0116] Please refer to Figure 2, which is a schematic diagram of a network delay measurement table provided by the implementation of this application. In the network delay measurement table shown in Table 2, the network delay measurement table includes matching values, data packet arrival time, network delay and processing actions, wherein each row in the network delay measurement table represents a record of a sampled data packet, and the record of the sampled data packet is the network delay sample network delay measurement result.

[0117] Table 2

[0118]

[0119] In the example shown in Table 2, the matching value in the network delay measurement table is the measured traffic feature of the collected data packet, "20.2.2.200" is the source IP address of the collected data packet, "10.1.1.100" is the destination IP address of the collected data packet, "2453" is the source port number of the collected data packet, and "80" is the destination port number of the collected data packet. The data packet arrival time refers to the time when the collected data packet arrives at the measurement device, for example, the collected data packet arrives at the measurement device 100 at the 15th ms. The network delay of the collected data packet is 5ms. The processing action is, for example, calculating the network delay.

[0120] In a possible implementation, the measuring device 100 collects statistics on the measurement information in the network delay measurement table, obtains measurement results, and reports the measurement results, which include sampling packet data and network delays corresponding to different measurement traffic characteristics in the network delay measurement table.

[0121] See also Figure 7 , Figure 7 A schematic diagram of generating a measurement result of network delay provided in an embodiment of the present application. Figure 7In the example shown, after receiving data packet 1, the network delay measurement module of the measuring device inserts an entry into the network delay measurement table, and the content of the entry is the measurement information of data packet 1. Among them, the matching value is the source IP address, destination IP address, source TCP port number and destination TCP port number of data packet 1, and the data packet arrival time is the time when this data packet 1 arrives at the measuring device. Since data packet 1 is a request packet, the network delay is 0. The action is to insert the request packet into the network delay measurement table.

[0122] exist Figure 7 In the example shown, after receiving data packet 2, the network delay measurement module of the measuring device flips the source IP address and destination IP address of data packet 2, as well as the source TCP port number and destination TCP port number, and uses the flipped data as the matching value to query the network delay measurement table. The matching value of data packet 2 matches the first entry in the network delay measurement table. Data packet 2 is the response packet corresponding to data packet 1. The measuring device records the calculation result in the network delay of the first entry based on the arrival time of data packet 2 minus the arrival time of data packet 1. The network delay is 5ms.

[0123] In a possible implementation, when the measuring device 100 performs statistics based on the measurement information in the network delay measurement table, the measuring device 100 scans the measurement information of the collected data packets in the network delay measurement table according to the measurement period in the measurement input information. The measuring device 100 caches the measurement information of the collected data packets whose network delay is not 0, and after the network delay measurement module of the measuring device 100 scans the measurement information of the collected data packets in the network delay measurement table, it reports the cached measurement information in the network delay measurement table to the adaptive adjustment module.

[0124] During the process of performing statistics based on the measurement information in the network delay measurement table, the measurement device 100 clears invalid measurement information in the network delay measurement table, where the invalid measurement information includes measurement information corresponding to a collection data packet whose network delay is 0 within the measurement period.

[0125] See also Figure 8 , Figure 8 A flow chart of a measurement device reporting a measurement result of network delay provided in an embodiment of the present application. Figure 8 In steps a to c of the example shown, the measuring device scans the measurement information of the collected data packet in the network delay measurement table in each measurement cycle, and if the network delay of the collected data packet is not 0, scans the measurement information of the next collected data packet. If the network delay of the collected data packet is 0, clears the measurement information corresponding to the data packet.

[0126] exist Figure 8In steps d to f of the example shown, after scanning of measurement information of all collected data packets in the network delay measurement table is completed, the network delay measurement module of the measurement device reports the measurement results of the network delay measurement table to the adaptive adjustment module.

[0127] 204. The measurement device updates the flow screening rules for the next measurement cycle based on the measurement target and the measurement result.

[0128] After the measuring device 100 reports the measurement results in the network delay measurement table to the adaptive adjustment module, the adaptive adjustment module of the measuring device 100 updates the flow screening rules for the next measurement cycle based on the measurement target and the measurement results, that is, the measuring device 100 updates the sampling ratio corresponding to different measurement traffic characteristics in the flow screening table.

[0129] In one possible implementation, when the measuring device 100 determines the sampling ratios corresponding to different measurement traffic characteristics of the next measurement period based on the measurement target and the measurement results, the measuring device 100 selects the collected data packets that meet the measurement target in the network delay measurement table based on the measurement target. Then, the measuring device 100 counts the number of collected data packets corresponding to different measurement characteristics, and calculates the ratio of collected data packets corresponding to different measurement characteristics based on the number of collected data packets corresponding to different measurement characteristics and the total number of sampled data packets. The measuring device 100 can calculate the sampling ratios corresponding to different measurement characteristics of the next measurement period based on the total sampling ratio of the measuring device and the ratio.

[0130] For example, when the measurement target is to obtain the most network delay results, the measurement device 100 calculates the sampling ratios corresponding to different measurement characteristics of the next measurement cycle based on all the collected data packets in the network delay measurement table. For another example, when the measurement target is to obtain the most network delay results exceeding the threshold, the measurement device 100 selects all collected data packets with network delay exceeding the threshold from the measurement results of the network delay measurement table, and calculates the sampling ratios corresponding to different measurement characteristics of the next measurement cycle based on the proportion of collected data packets with different measurement traffic characteristics.

[0131] See also Fig. 9 , Fig. 9 A flow chart of updating the flow screening rules for the next measurement cycle provided by an embodiment of the present application. Fig. 9 In step a of the example shown, after the adaptive adjustment module of the measuring device receives the network delay measurement table reported by the network delay measurement module, it selects the network delay results that meet the measurement target in the network delay measurement table according to the measurement target in the measurement input information, and calculates the number of network delay results that meet the measurement target corresponding to different measurement traffic characteristics in the network delay measurement table, as well as the proportion of network delay results that meet the measurement target corresponding to different measurement traffic characteristics.

[0132] exist Fig. 9 In the steps and step c of the example shown, the adaptive adjustment module of the measuring device calculates the sampling ratios corresponding to different measured flow characteristics based on the ratio and the total sampling ratio of the measuring device. The measuring device updates the sampling ratios corresponding to different measured flow characteristics in the flow screening table based on the calculated sampling ratios.

[0133] See also Fig.10 , Fig.10 A schematic diagram of a flow screening table after adaptive adjustment provided in an embodiment of the application. Fig.10 In the example shown, after the adaptive adjustment module of the measuring device receives the measurement result reported by the network delay measurement module, the adaptive adjustment module adjusts the sampling ratio corresponding to different measurement traffic characteristics based on the measurement target.

[0134] exist Fig.10 In the example shown, since the measurement target is to obtain the most TCP network delay results, the adaptive adjustment module of the measurement device calculates the number of collected data packets obtained by the two network segments with the destination IP addresses of "10.1.1.0 / 24" and "20.2.2.0 / 24" in this measurement period. For example, the first network segment measures 4000 sampled data packets of TCP flows, and the second network segment measures 6000 sampled data packets of TCP flows. The proportion of sampled data packets of the first network segment is 0.4, and the proportion of sampled data packets of the second network segment is 0.6.

[0135] exist Fig.10 In the example shown, the adaptive adjustment module of the measuring device calculates the adjusted sampling ratios corresponding to different measured traffic features based on the total sampling ratio of the measuring device. For example, the total sampling ratio of the measuring device is 1000 flows / S, and the measuring device calculates the adjusted sampling ratio of the first network segment to be 400, and the sampling ratio of the second network segment to be 600. Therefore, the adaptive module of the measuring device adjusts the sampling ratio of the first table item in the flow filter table from 500 to 400, and adjusts the sampling ratio of the second table item from 500 to 600. The adaptive adjustment module of the measuring device records the measurement results obtained in this measurement period and the sampling ratio adjustment of the two table items in the storage module.

[0136] It can be seen from the above embodiments that the measuring device in the embodiments of the present application can configure the measurement resources corresponding to different measurement traffic characteristics based on the user's measurement input information, and adjust the measurement resources corresponding to different traffic characteristics in the next cycle based on the measurement target and the measurement results of the network delay, thereby improving the availability of collected data packets during the network delay measurement process, and further improving the utilization efficiency of the measurement resources of the measuring device and the measurement flexibility of the network delay.

[0137] The above introduces the network delay measurement method provided in the embodiment of the present application. The following specifically introduces the network delay measurement device provided in the embodiment of the present application.

[0138] See also Fig.11 , Fig.11 A schematic diagram of the structure of a network delay measurement device provided in an embodiment of the present application. Fig.11 In the example shown, the network delay measurement device is used to implement the various steps performed by the measurement equipment in the above embodiments. The network delay measurement device 1100 includes a measurement input module 1101 , an adaptive adjustment module 1102 and a network delay measurement module 1103 .

[0139] Among them, the measurement input module 1101 is used to obtain measurement input information for network delay measurement, and the measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets and measurement cycles. The measurement traffic characteristics are used to identify the data packets to be measured, and the measurement targets are used to indicate the user's measurement intention. The adaptive adjustment module 1102 is used to configure the flow screening rules for network delay measurement according to the measurement input information. The flow screening rules are used to indicate the measurement resources corresponding to different measurement traffic characteristics, and the measurement resources include the sampling ratio. The network delay measurement module 1103 is used to measure the network delay of the data stream based on the flow screening rules and generate measurement results. The measurement results include the number of collected data packets and network delays corresponding to different measurement traffic characteristics. The adaptive adjustment module 1102 is also used to update the flow screening rules for the next measurement cycle based on the measurement target and the measurement results.

[0140] In some possible implementations, the adaptive adjustment module 1102 is specifically used to create flow filtering rules in the flow filtering table according to the measured traffic characteristics. The flow filtering table is used to filter the data packets that need to be collected. The flow filtering rules include one or more of the following: a matching value, a sampling ratio, and a processing action. The matching value is used to indicate a matching field in the measured traffic characteristics.

[0141] In some possible implementations, the device also includes a flow screening module 1104 and a storage module 1105. The flow screening module 1104 is used to collect data packets based on the sampling ratio corresponding to the matching value when the data packet in the data stream matches the matching value in the flow screening table to obtain the collected data packet. The network delay measurement module is specifically used to record the measurement information corresponding to the collected data packet in the network delay measurement table, and the measurement information includes one or more of the following: matching value, request arrival time and network delay. Statistics are performed based on the measurement information in the network delay measurement table to obtain measurement results. The storage module 105 is used to store the measurement results.

[0142] In some possible implementations, the flow screening module 1104 is further used to determine the type of the collected data packet based on the virtual local area network identifier of the collected data packet, and the type includes a request packet and an arrival packet. The network delay measurement module is further used to calculate the network delay of the collected data packet based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet when the collected data packet is a response packet.

[0143] In some possible implementations, the network delay measurement module 1103 is further configured to clear invalid measurement information in the network delay measurement table, where the invalid measurement information includes measurement information corresponding to a collection data packet whose network delay is 0 within a measurement period.

[0144] In some possible implementations, the adaptive adjustment module 1103 is specifically configured to determine the sampling ratios corresponding to different measured flow characteristics in the next measurement period based on the measurement target and the measurement result.

[0145] In some possible implementations, the measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size, and timestamp.

[0146] In some possible implementations, the measurement objectives include one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delays exceeding a threshold, and obtaining the most network delay results for data streams from different operators.

[0147] It should be understood that the division of the units in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some units can also be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware. For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, and called and executed by a certain processing element of the device. The function of the unit. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software calling through a processing element.

[0148] It is worth noting that, for the above method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required for the present invention.

[0149] Other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of the present invention. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention.

[0150] See also Fig.12 , Fig.12 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. Fig.12 As shown, the computing device 1200 includes: a processor 1201, a memory 1202, a communication interface 1203 and a bus 1204. The processor 1201, the memory 1202 and the communication interface 1203 are coupled via a bus (not marked in the figure). The memory 1202 stores instructions. When the execution instructions in the memory 1202 are executed, the computing device 1200 executes the method executed by the computing device in the above method embodiment.

[0151] The computing device 1200 may be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms. For another example, when a unit in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0152] The processor 1201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0153] The memory 1202 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0154] The memory 1202 stores executable program codes, and the processor 1201 executes the executable program codes to respectively implement the functions of the aforementioned units or modules, thereby implementing the aforementioned network delay measurement method. That is, the memory 1202 stores instructions for executing the aforementioned network delay measurement method.

[0155] The communication interface 1203 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1200 and other devices or a communication network.

[0156] In addition to the data bus, the bus 1204 may also include a power bus, a control bus, and a status signal bus. The bus may be a peripheral component interconnect express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0157] See also Fig.13 , Fig.13 A schematic diagram of a computing device cluster provided in an embodiment of the present application. Fig.13 As shown, the computing device cluster 1300 includes at least one computing device 1200 .

[0158] like Fig.13 As shown, the computing device cluster 1300 includes at least one computing device 1200. The memory 1202 in one or more computing devices 1200 in the computing device cluster 1300 may store the same instructions for executing the above network delay measurement method.

[0159] In some possible implementations, the memory 1202 of one or more computing devices 1200 in the computing device cluster 1300 may also respectively store some instructions for executing the above network delay measurement method. In other words, the combination of one or more computing devices 1200 may jointly execute instructions for executing the above network delay measurement method.

[0160] It should be noted that the memory 1202 in different computing devices 1200 in the computing device cluster 1300 can store different instructions, which are respectively used to execute part of the functions of the above-mentioned network delay measurement device. That is, the instructions stored in the memory 1202 in different computing devices 1200 can implement the functions of one or more modules among the measurement input module, the adaptive module, the network delay measurement module, the flow screening module and the storage module.

[0161] In some possible implementations, one or more computing devices 1200 in the computing device cluster 1300 may be connected via a network, which may be a wide area network or a local area network.

[0162] See also Fig.14 , Fig.14 A schematic diagram of computer devices in a computer cluster connected via a network provided in an embodiment of the present application. Fig.14 As shown, two computing devices 1200A and 1200B are connected via a network. Specifically, they are connected to the network via a communication interface in each computing device.

[0163] In one possible implementation, the memory in the computing device 1200A stores instructions for executing the functions of the measurement input module, the adaptive module, the network delay measurement module, and the flow screening module. Meanwhile, the memory in the computing device 1200B stores instructions for executing the functions of the storage module.

[0164] It should be understood that Fig.14 The functions of the computing device 1200A shown in FIG. 1200A may also be performed by multiple computing devices. Similarly, the functions of the computing device 1200B may also be performed by multiple computing devices.

[0165] In another embodiment of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When the processor of the device executes the computer-executable instructions, the device executes the method performed by the measuring device in the above method embodiment.

[0166] In another embodiment of the present application, a computer program product is provided, the computer program product includes computer execution instructions, and the computer execution instructions are stored in a computer readable storage medium. When the processor of the device executes the computer execution instructions, the device executes the method executed by the measuring device in the above method embodiment.

[0167] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0168] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for measuring network delay, characterized in that: Applied to measuring equipment, including: Acquire measurement input information for network delay measurement, the measurement input information including one or more of the following: measurement traffic characteristics, measurement targets, and measurement cycles, the measurement traffic characteristics being used to identify data packets to be measured, and the measurement targets being used to indicate a user's measurement intention; Configure a flow screening rule for network delay measurement according to the measurement input information, wherein the flow screening rule is used to indicate measurement resources corresponding to different measurement traffic characteristics, and the measurement resources include a sampling ratio; Performing network delay measurement on the data flow based on the flow screening rule to generate a measurement result, wherein the measurement result includes the number of collected data packets and the network delay corresponding to the different measurement traffic characteristics; The flow screening rule for the next measurement period is updated based on the measurement target and the measurement result.

2. The method according to claim 1, characterized in that The flow screening rule for configuring network delay according to the network delay measurement information comprises: The flow filtering rule is created in the flow filtering table according to the measured flow characteristics. The flow filtering table is used to filter the data packets that need to be collected. The flow filtering rule includes one or more of the following: a matching value, a sampling ratio, and a processing action. The matching value is used to indicate a matching field in the measured flow characteristics.

3. The method according to claim 2, characterized in that The measuring network delay of the data stream based on the stream screening rule comprises: When a data packet in the data stream matches the matching value in the stream filter table, the data packet is collected based on a sampling ratio corresponding to the matching value to obtain a collected data packet; Recording measurement information corresponding to the collected data packet in a network delay measurement table, wherein the measurement information includes one or more of the following: matching value, request arrival time, and network delay; The measurement result is obtained by performing statistics based on the measurement information in the network delay measurement table.

4. The method according to claim 3, characterized in that After obtaining the collected data packet, the method further includes: Determine the type of the collected data packet based on the virtual local area network identifier of the collected data packet, the type including a request packet and an arrival packet; When the collected data packet is a response packet, the network delay of the collected data packet is calculated based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: The invalid measurement information in the network delay measurement table is cleared, where the invalid measurement information includes measurement information corresponding to the collected data packets whose network delay is 0 within the measurement period.

6. The method according to any one of claims 1 to 5, characterized in that The updating of the flow screening rule for the next measurement period based on the measurement target and the measurement result includes: The sampling ratios corresponding to different measured flow characteristics in the next measurement period are determined based on the measurement target and the measurement result.

7. The method according to any one of claims 1 to 6, characterized in that The measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size and timestamp.

8. The method according to any one of claims 1 to 7, characterized in that The measurement objectives include one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delay exceeding a threshold, and obtaining the most network delay results for data flows from different operators.

9. A device for measuring network delay, characterized in that: include: A measurement input module, used to obtain measurement input information for network delay measurement, wherein the measurement input information includes one or more of the following: measurement traffic characteristics, measurement targets, and measurement cycles, wherein the measurement traffic characteristics are used to identify data packets to be measured, and the measurement targets are used to indicate the user's measurement intention; An adaptive adjustment module, configured to configure a flow screening rule for network delay measurement according to the measurement input information, wherein the flow screening rule is used to indicate measurement resources corresponding to different measurement traffic characteristics, wherein the measurement resources include a sampling ratio; A network delay measurement module, configured to measure the network delay of the data flow based on the flow screening rule, and generate a measurement result, wherein the measurement result includes the number of collected data packets and the network delay corresponding to the different measurement flow characteristics; The adaptive adjustment module is further configured to update a flow screening rule for a next measurement cycle based on the measurement target and the measurement result.

10. The device according to claim 9, characterized in that The adaptive adjustment module is specifically used for: The flow filtering rule is created in the flow filtering table according to the measured flow characteristics. The flow filtering table is used to filter the data packets that need to be collected. The flow filtering rule includes one or more of the following: a matching value, a sampling ratio, and a processing action. The matching value is used to indicate a matching field in the measured flow characteristics.

11. The device according to claim 10, characterized in that The device also includes a flow screening module: The flow screening module is used for collecting the data packet based on the sampling ratio corresponding to the matching value to obtain a collected data packet when the data packet in the data stream matches the matching value in the flow screening table; The network delay measurement module is specifically used to record the measurement information corresponding to the collected data packet in the network delay measurement table, and the measurement information includes one or more of the following: matching value, request arrival time and network delay; The measurement result is obtained by performing statistics based on the measurement information in the network delay measurement table.

12. The device according to claim 11, characterized in that The flow screening module is also used for: Determine the type of the collected data packet based on the virtual local area network identifier of the collected data packet, the type including a request packet and an arrival packet; The network delay measurement module is further configured to calculate the network delay of the collected data packet based on the arrival time of the collected data packet and the arrival time of the request packet corresponding to the collected data packet when the collected data packet is a response packet.

13. The device according to claim 10 or 12, characterized in that The network delay measurement module is also used for: The invalid measurement information in the network delay measurement table is cleared, where the invalid measurement information includes measurement information corresponding to the collected data packets whose network delay is 0 within the measurement period.

14. The device according to any one of claims 9 to 13, characterized in that The adaptive adjustment module is specifically used for: The sampling ratios corresponding to different measured flow characteristics in the next measurement period are determined based on the measurement target and the measurement result.

15. The device according to any one of claims 9 to 14, characterized in that The measured traffic characteristics include one or more of the following: source address, destination address, port number, protocol type, data packet size and timestamp.

16. The device according to any one of claims 9 to 15, characterized in that The measurement objectives include one or more of the following: obtaining the most network delay results, obtaining the most network delay results with different traffic characteristics, obtaining the most network delay results with network delay exceeding a threshold, and obtaining the most network delay results for data flows from different operators.

17. A computing device, characterized in that The electronic device comprises a processor coupled to a memory, wherein the processor is used to store instructions. When the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.

18. A computing device cluster, characterized in that: The system comprises at least one computing device, wherein the computing device comprises a processor, wherein the processor is coupled to a memory, and the processor is used to store instructions. When the instructions are executed by the processor, the computing device cluster executes the method according to any one of claims 1 to 8.

19. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 8.

20. A computer program product, comprising instructions, characterized in that: When the instructions are executed, the computer implements the method according to any one of claims 1 to 8.