Network measurement method and related device

By obtaining measurement data of multiple queues in network equipment, the analysis device directly obtains network measurement data of the data stream without dyeing or encapsulating the message header, solving the problem of high efficiency of network measurement costs and realizing low-cost and efficient network problem positioning.

WO2025148816A1PCT designated stage expired Publication Date: 2025-07-17HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070662
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2025-01-06
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

The existing network measurement technology is costly and inefficient, affecting the efficiency of data flow forwarding, making it difficult to efficiently and accurately locate network problems.

Method used

By acquiring network measurement data for multiple target queues, the analysis device does not need to dye the data packet or encapsulate additional message headers, and directly obtains network measurement data of the target data stream from the measurement data of multiple queues, reducing network measurement costs and maintaining forwarding efficiency.

Benefits of technology

It realizes that network measurement costs can be reduced without affecting the efficiency of data flow forwarding, and can quickly locate abnormalities in network equipment, thereby improving measurement accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070662_17072025_PF_FP_ABST
    Figure CN2025070662_17072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and provides a network measurement method and a related device. In the method, an analysis device acquires first network measurement data of a plurality of target queues, and on the basis of the first network measurement data of the plurality of target queues, obtains second network measurement data of a target data stream. The plurality of target queues are queues for forwarding the target data stream. According to the method, the network measurement data of the target data stream is obtained by means of forwarding the network measurement data of the plurality of target queues for the target data stream, thereby eliminating the need to perform processing such as coloring data packets in the data stream and encapsulating additional message headers, and reducing the cost of network measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Network measurement methods and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 10, 2024, with application number 202410047242.X and application name “Network Measurement Method and Related Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a network measurement method and related equipment. Background Art

[0003] Currently, the scale of networks is developing rapidly, the types of services are increasing, the traffic bandwidth is increasing year by year, and the methods of network management are also emerging in an endless stream. However, the overall trend is towards remote, refined, and real-time development. Therefore, the demand for network monitoring and measurement technology is becoming increasingly strong.

[0004] Currently, to achieve remote and refined network monitoring and measurement, and to efficiently and accurately locate and resolve network issues, network monitoring techniques are often used. However, this requires network nodes to periodically perform coloring and de-coloring operations on service packets in data streams. This complicates network device implementation and affects data forwarding efficiency. Summary of the Invention

[0005] The present application provides a network measurement method and related equipment to solve the problem of high cost and low efficiency of network measurement.

[0006] A first aspect provides a network measurement method. This method can be applied to an analysis device. The analysis device can be a computer, mobile phone, laptop, tablet computer, server, or other device with computing power. The method comprises: obtaining first network measurement data for multiple target queues, where the multiple target queues are queues that forward target data flows. Then, obtaining second network measurement data for the target data flows based on the first network measurement data for the multiple target queues. Optionally, when the target data flows are forwarded by a network device, the multiple target queues may include a transmit queue and a receive queue for the network device. A transmit queue is a queue used by a transmit port to buffer data packets to be sent. A receive queue is a queue used by a receive port to buffer data packets to be switched to the transmit port. Optionally, when the target data flows are forwarded by multiple network devices, the multiple target queues may include transmit queues for transmitting the target data flows, or may further include receive queues for receiving the target data flows. Obtaining the second network measurement data for the target data flows based on the first network measurement data for the multiple target queues forwarding the target data flows eliminates the need for coloring or encapsulating additional headers for the data packets in the data flows, thus maintaining the efficiency of the network device forwarding the data flows and reducing network measurement costs. Moreover, a queue of a network device often forwards multiple data streams, and multiple data streams can share the first network measurement data of a queue. The network device measures a smaller number of queues without having to measure each data stream separately, which can reduce the measurement difficulty and complexity, thereby further reducing the network measurement cost.

[0007] In one possible implementation, the method further includes receiving first network measurement data from queues of multiple network devices, where the queues of the multiple network devices include multiple target queues. Obtaining the first network measurement data from the multiple target queues includes obtaining the first network measurement data from the first network measurement data from the queues of the multiple network devices. When the network device sends the first network measurement data from the multiple queues to the analysis device, the analysis device needs to obtain the first network measurement data from the target queue for forwarding the target data flow from the first network measurement data from the multiple queues.

[0008] There are various methods for an analysis device to obtain the first network measurement data of a target queue from the first network measurement data of multiple queues. For example, the first network measurement data of each queue sent by the network device is associated with the flow identifier of the data flow forwarded by that queue, that is, the network measurement data is directly associated with the data flow. The analysis device can then obtain the associated first network measurement data using the flow identifier of the target data flow.

[0009] For another example, the analysis device receives a first association between a target data flow and a target queue. Based on the first association, the analysis device obtains first network measurement data of multiple target queues from the first network measurement data of queues of multiple network devices. Thus, the analysis device can accurately obtain the first network measurement data of the target queue from the first network measurement data of the multiple queues. The first association, for example, is carried in a second message, i.e., the first association is sent by sending the second message. For example, the second message includes the flow identifier of the target data flow and the queue identifier of the target queue, indicating the first association between the target data flow and the target queue.

[0010] In one possible implementation, the method further includes: receiving a second association relationship, the second association relationship indicating an association relationship between the target data flow and the application, where the application is the application to which the target data flow belongs. Thus, the analysis device can analyze the network status of the application-related traffic in the network from the application dimension. The second association relationship is, for example, carried in a third message, that is, the second association relationship is sent by sending the third message, for example, the third message includes the flow identifier of the target data flow and the application identifier of the application to indicate the second association relationship between the target data flow and the application. The second message and the third message can be the same message or different messages.

[0011] In one possible implementation, second network measurement data for multiple data flows, including a target data flow, is obtained, and the multiple data flows belong to the same application. The second network measurement data for the multiple data flows of the application is displayed via a graphical user interface (GUI). Furthermore, third network measurement data for the application is displayed via a graphical user interface (GUI), where the third network measurement data is derived from the second network measurement data for the multiple data flows. This allows the user to intuitively display the status of data flows transmitted in the network or the status of traffic related to the application.

[0012] In one possible implementation, the first network measurement data of any target queue includes a first delay and / or a first packet loss rate, and the second network measurement data includes a second delay and / or a second packet loss rate. Obtaining the second network measurement data of the target data stream based on the first network measurement data of multiple target queues includes: adding the first delays of the multiple target queues to obtain the second delay; and / or adding the packet loss rates of the multiple target queues to obtain the second packet loss rate. Since data streams are forwarded through queues, and packets within the same queue are sent on a first-in, first-out basis, the queue's delay can be used as the delay for the data stream to pass through the queue. A queue may forward multiple data streams, or in other words, a queue may cache packets from multiple data streams. In the event of congestion, packets within the same queue have the same probability of being discarded. Therefore, the queue's packet loss rate can be approximately considered the packet loss rate of the data stream.

[0013] In one possible implementation, the first network measurement data includes a queue depth and a sending rate of a target queue, and / or the first network measurement data includes a number of packet losses and a number of packets sent of the target queue, and the second network measurement data includes a second delay and / or a second packet loss rate. Obtaining the second network measurement data of the target data flow based on the first network measurement data of multiple target queues includes: obtaining first delays and / or first packet loss rates of the multiple target queues based on the first network measurement data of the multiple target queues, where the first delay is calculated based on the queue depth and the sending rate, and the first packet loss rate is obtained based on the number of packet losses and the number of packets sent; adding the first delays of the multiple target queues to obtain a second delay; and / or adding the packet loss rates of the multiple target queues to obtain a second packet loss rate.

[0014] In one possible implementation, the method further includes: comparing the first delays and / or first packet loss rates of multiple target queues, and determining an abnormal network device among the multiple network devices, wherein the abnormal network device is the network device corresponding to the target queue with the largest first delay and / or the largest first packet loss rate among the multiple target queues, or the abnormal network device is the network device corresponding to the target queue with the first delay greater than a delay threshold and / or the first packet loss rate greater than a packet loss rate threshold among the multiple target queues. By comparing the first delays or first packet loss rates of the multiple target queues, the larger delay and packet loss rate can be determined. Generally, the larger the delay and packet loss rate, the greater the possibility that the network device is abnormal. Therefore, the network device with the largest first delay or first packet loss rate is determined as the abnormal network device, and the network device that may have a fault is located at a lower cost.

[0015] In one possible implementation, the method further includes: sending control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, wherein the data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow, the flow identifier is used to indicate that measurement is to be performed on a target queue corresponding to the target data flow, the application identifier is used to indicate that measurement is to be performed on a queue forwarding data flows belonging to the target application, and the application type is used to indicate that measurement is to be performed on a queue forwarding data flows belonging to the target application type. The control information can be used to control a network device to perform measurements corresponding to a data flow, application, or application type of interest, thereby reducing the measurement burden on the network device.

[0016] In one possible implementation, the method also includes: sending control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, the data flow corresponding to the target application includes a target data flow, the data flow corresponding to the target application type includes a target data flow, the flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0017] The second aspect provides a network measurement method. The method can be applied to network devices. The network device can be a switch, a router, a firewall, a wireless access point (AP) or a wireless controller, etc. The method includes: obtaining first network measurement data of a target queue, where the target queue is a queue that forwards a target data stream; and sending the first network measurement data. The network device obtains the first network measurement data of the queue without coloring the data packets in the data stream or encapsulating additional message headers to measure the status of the data stream. The network device is simple to implement and has low cost. In addition, a queue can forward multiple data streams, and the network device only needs to measure the network measurement data of the queue, that is, the first network measurement data of a queue can be used to calculate the second network measurement data of multiple data streams.

[0018] In one possible implementation, the method further includes: sending a first association relationship, the first association relationship indicating the association relationship between the target data flow and the target queue; and / or, sending a second association relationship, the second association relationship indicating the association relationship between the target data flow and the application, the application being the application to which the target data flow belongs.

[0019] In one possible implementation, the method further includes: receiving control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, the data flow corresponding to the target application including a target data flow, the data flow corresponding to the target application type including a target data flow, the flow identifier is used to indicate measurement of a target queue corresponding to the target data flow, the application identifier is used to indicate measurement of a queue forwarding data flows belonging to the target application, and the application type is used to indicate measurement of a queue forwarding data flows belonging to the target application type.

[0020] In one possible implementation, the method also includes: receiving control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, the data flow corresponding to the target application including a target data flow, the data flow corresponding to the target application type including a target data flow, the flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0021] A third aspect provides an apparatus. The apparatus is applied to an analysis device. The apparatus can be a hardware module (e.g., a chip) or a software module in the analysis device. The apparatus can also be the analysis device. The apparatus includes a processing module and a transceiver module. The processing module is configured to obtain first network measurement data for multiple target queues, where the multiple target queues are queues that forward target data flows. The processing module is configured to obtain second network measurement data for the target data flows based on the first network measurement data for the multiple target queues.

[0022] In one possible implementation, a transceiver module is configured to receive first network measurement data of queues of multiple network devices, where the queues of the multiple network devices include multiple target queues. A processing module is configured to obtain the first network measurement data of the multiple target queues from the first network measurement data of the queues of the multiple network devices.

[0023] In a possible implementation, the transceiver module is configured to receive a first association relationship between a target data flow and a target queue, and the processing module is configured to obtain first network measurement data of multiple target queues from first network measurement data of queues of multiple network devices based on the first association relationship.

[0024] In a possible implementation, the transceiver module is configured to receive a second association relationship, where the second association relationship indicates an association relationship between the target data flow and an application, where the application is the application to which the target data flow belongs.

[0025] In one possible implementation, a processing module is configured to obtain second network measurement data for multiple data streams, including a target data stream, and the multiple data streams belong to the same application. The processing module is configured to generate a graphical user interface (GUI) that includes the second network measurement data for the multiple data streams of the application. Furthermore, the processing module is configured to generate a graphical user interface (GUI) that includes third network measurement data for the application, where the third network measurement data is obtained based on the second network measurement data for the multiple data streams.

[0026] In one possible implementation, the first network measurement data of any target queue includes a first delay and / or a first packet loss rate, and the second network measurement data includes a second delay and / or a second packet loss rate. The processing module is used to add the first delays of multiple target queues to obtain the second delay; and / or add the packet loss rates of multiple target queues to obtain the second packet loss rate.

[0027] In one possible implementation, the first network measurement data includes the queue depth and sending rate of the target queue, and / or the number of packet losses and packets sent of the target queue, and the second network measurement data includes a second delay and / or a second packet loss rate. A processing module is configured to obtain first delays and / or first packet loss rates for the multiple target queues based on the first network measurement data of the multiple target queues, where the first delay is calculated based on the queue depth and sending rate, and the first packet loss rate is calculated based on the number of packet losses and packets sent. The processing module is configured to add the first delays of the multiple target queues to obtain a second delay, and / or add the packet loss rates of the multiple target queues to obtain a second packet loss rate.

[0028] In one possible implementation, the processing module is used to compare the first delays and / or first packet loss rates of multiple target queues to determine an abnormal network device among multiple network devices, where the abnormal network device is a network device corresponding to a target queue having the largest first delay and / or the largest first packet loss rate among the multiple target queues, or the abnormal network device is a network device corresponding to a target queue having a first delay greater than a delay threshold and / or a first packet loss rate greater than a packet loss rate threshold among the multiple target queues.

[0029] In one possible implementation, the transceiver module is used to send control information, where the control information includes at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes a target data flow, and the data flow corresponding to the target application type includes a target data flow. The flow identifier is used to indicate that a target queue corresponding to the target data flow is to be measured. The application identifier is used to indicate that a queue that forwards data flows belonging to the target application is to be measured. The application type is used to indicate that a queue that forwards data flows belonging to the target application type is to be measured.

[0030] In one possible implementation, a transceiver module is used to send control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes a target data flow, and the data flow corresponding to the target application type includes a target data flow. The flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0031] A fourth aspect provides an apparatus, which can be a hardware module (e.g., a chip) or a software module in a network device. The apparatus can also be a network device. The apparatus includes a processing module and a transceiver module. The processing module is configured to obtain first network measurement data of a target queue, where the target queue is a queue that forwards a target data flow. The transceiver module is configured to transmit the first network measurement data.

[0032] In one possible implementation, the transceiver module is used to send a first association relationship, where the first association relationship indicates the association relationship between the target data flow and the target queue; and / or the transceiver module is used to send a second association relationship, where the second association relationship indicates the association relationship between the target data flow and the application, where the application is the application to which the target data flow belongs.

[0033] In one possible implementation, a transceiver module is used to receive control information, where the control information includes at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes a target data flow, and the data flow corresponding to the target application type includes a target data flow. The flow identifier is used to indicate that a target queue corresponding to the target data flow is to be measured. The application identifier is used to indicate that a queue that forwards data flows belonging to the target application is to be measured. The application type is used to indicate that a queue that forwards data flows belonging to the target application type is to be measured.

[0034] In one possible implementation, a transceiver module is used to receive control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, the data flow corresponding to the target application includes a target data flow, the data flow corresponding to the target application type includes a target data flow, the flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0035] A fifth aspect provides a device, including a processor and a memory, wherein the processor is coupled to the memory and configured to execute the network measurement method of the first aspect or any possible implementation of the first aspect based on instructions stored in the memory.

[0036] A sixth aspect provides a device, comprising a processor and a memory, wherein the processor is coupled to the memory and configured to execute the network measurement method of the second aspect or any possible implementation of the second aspect based on instructions stored in the memory.

[0037] A seventh aspect provides a computer-readable storage medium. The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to execute the network measurement method of the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect.

[0038] An eighth aspect provides a computer program product, which, when running on a computing device, enables the computing device to execute the network measurement method in the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] FIG1 is a schematic diagram of the architecture of a network system provided in an embodiment of the present application;

[0040] FIG2 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0041] FIG3 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0042] FIG4 is a flow chart of a network measurement method provided in an embodiment of the present application;

[0043] FIG5 is a schematic structural diagram of a device provided in an embodiment of the present application;

[0044] FIG6 is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. 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 design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0046] The following is an introduction to the related technologies involved in the embodiments of this application:

[0047] 1. Quality of service (QoS)

[0048] With the rapid development of network technology, Internet services are becoming increasingly diverse. In addition to traditional applications such as the World Wide Web (WWW), email, and file transfer protocol (FTP), the Internet has also seen the emergence of numerous new services, including Internet Protocol (IP) telephony, e-commerce, multimedia games, distance learning, telemedicine, videophones, video conferencing, video on demand, and online movies.

[0049] With the proliferation of networks and the diversification of services, internet traffic has surged, potentially leading to network congestion, increased forwarding delays, and, in severe cases, packet loss, resulting in degraded service quality or even unavailability. QoS technology is used to address issues such as network latency and congestion. To meet user requirements for varying QoS for different applications, the network must be able to allocate and schedule resources based on user needs, assigning different QoS priorities to different packets: prioritize real-time and important packets; while less real-time, common packets are given a lower priority and may even be discarded in cases of severe network congestion. For example, packets contain a pre-defined field indicating their QoS priority. This allows network devices to assign queues or implement appropriate drop policies based on the QoS priority of the packet after receiving it. Specifically, network devices can cache packets in queues corresponding to the service level based on their QoS priority. Furthermore, network devices can also determine the drop priority of packets based on their QoS priority.

[0050] 2. Queue

[0051] A queue, also known as a port queue, is a linear table that allows input operations at one end and output operations at the other end. Transmission equipment typically includes one or more ports for data input / output. Each port can have multiple queues to record the order in which messages in the cache are processed, and each queue corresponds to a queue scheduling algorithm. In the absence of congestion, messages entering the cache can be processed promptly; when congestion exists, messages are stored in the device's cache in the form of queues waiting to be processed. At this time, the transmission device selects messages from each queue for processing based on the queue scheduling algorithm corresponding to the queue; in addition, if congestion tends to intensify, the network overload problem can be resolved by actively discarding messages in the queue.

[0052] The queue scheduling algorithm is used to determine the order in which packets in different queues are processed. Common queue scheduling algorithms include strict priority (SP), priority queuing (PQ), weighted fair queuing (WFQ), and low priority queuing (LPQ).

[0053] Each port on a typical network device, such as a switch or router, has eight queues. In descending order of priority, they are: class selector (CS) 7, CS6, expedited forwarding (EF), assured forwarding (AF) 4, AF3, AF2, AF1, and best-effort (BE). Queues of different priorities store packets of varying priorities. For example, CS7 and CS6 are used by default for protocol packets. EF carries voice over Internet Protocol (VoIP) traffic or data streams for internal enterprise video conferencing. Voice service packets require low latency, low jitter, and low packet loss, making them second only to protocol packets in importance. AF4 carries voice signaling traffic, specifically VoIP protocol packets. AF3 can be used for services such as remote Telnet login from remote devices. These services have moderate bandwidth requirements but are highly sensitive to network latency and jitter, requiring completely reliable transmission with no packet loss. AF2 can be used to carry live broadcast traffic for Internet protocol television (IPTV) within an enterprise, ensuring smooth online video services. Live broadcast services are highly real-time and require guaranteed continuity and high throughput, but tolerate minor packet loss. AF1 is used for general data stream services within an enterprise, such as email. General data does not require high real-time performance or jitter, as long as it is transmitted without packet loss. BE is used for best-effort services and is used for non-urgent and unimportant services, such as Hypertext Transfer Protocol (HTTP) web browsing.

[0054] 3. Priority Mapping

[0055] Priority mapping is used to convert the QoS priority carried by a message into the device's local priority (i.e., the service level used to differentiate messages within the device). The device then provides differentiated QoS services based on the local priority.

[0056] When a packet carrying a QoS priority reaches a device, the external priority (such as 802.1p or Differentiated Services Code Point (DSCP)) is mapped to the device's local priority. The device then determines the queue the packet enters based on the local priority, performing traffic shaping, congestion avoidance, and queue scheduling on that queue. When the packet leaves the device, the local priority is mapped back to the external priority, ensuring that when the packet reaches the next device, the device can continue to provide differentiated services based on the priority field in the packet. In other words, priority mapping is the foundation for packet classification and the prerequisite for providing differentiated services.

[0057] Based on network planning, users can use different QoS priority fields in different networks. For example, 802.1p priority is used in Layer 2 networks, DSCP priority is used in Layer 3 networks, and EXP priority is used in Multi-Protocol Label Switching (MPLS) networks. The 802.1p priority is located in the PRI field of the virtual local area network (VLAN) frame header. The DSCP priority is located in the DSCP field of the IP packet header. The EXP priority is located in the Exp field of the MPLS label.

[0058] 4. Application Identification

[0059] Application identification is a mechanism that classifies traffic based on its application or protocol characteristics. It can accurately identify various common application programs and protocol types on the network.

[0060] Different applications usually use different protocols, and different application protocols have their own characteristics. These characteristics may be specific ports, specific strings, or specific bit sequences. The characteristics that can identify the protocol are called signature codes. Application identification technology is to determine the application by matching the signature codes in the data message. The characteristics of the protocol are not only reflected in a single message. The characteristics of some protocol messages are distributed in multiple messages. It is necessary to collect and analyze multiple messages to identify the protocol type. The system analyzes the business flow flowing through the device, compares the analysis results with the feature library loaded on the device, and identifies the application by matching the signature codes in the data message. The characteristics can be three-layer characteristics such as IP address, port number, protocol type, DSCP, etc. carried in the message, or they can be characteristics generated based on the domain name and IP address information in the Domain Name Service (DNS) response message.

[0061] Currently, application identification technologies based on application features include intelligent deep packet inspection (DPI), deep flow inspection (DFI), and artificial intelligence (AI) identification.

[0062] In order to solve the problems of high cost and low efficiency in current network measurement technology, the present application provides the following embodiments.

[0063] As shown in Figure 1, Figure 1 is a schematic diagram of the architecture of a network system provided by the present application. The network system includes an analysis device and a data forwarding network. The data forwarding network includes multiple network devices. The network device can be an access point (AP), a wireless controller, a switch, a router or a firewall device, etc. The network device can be a hardware-implemented network device. The network device can also be a software-implemented network device, for example, by implementing the functions of network devices such as switches, routers or firewalls on a general-purpose server through virtualization technology. The data forwarding network can be a wireless local area network, a wide area network (operator network or enterprise-built wide area network), a data center network, a campus network, an enterprise network or a home network, etc. Alternatively, the data forwarding network includes at least two networks selected from a wireless local area network, a local area network and a wide area network.

[0064] In this embodiment, a network device is configured to collect first network measurement data from a queue of the network device and transmit the data to an analysis device. The queue of the network device includes a target queue for forwarding a data flow. The analysis device is configured to obtain the first network measurement data of the target queue from the first network measurement data of the queues of one or more network devices, and then obtain second network measurement data corresponding to the data flow based on the first network measurement data of the target queue.

[0065] Specifically, the network device is used to forward data streams. Specifically, after the network device receives a data packet in a data stream, it classifies the data packet to determine the queue that the data packet enters. For example, a data packet can carry a QoS priority, and the network device can perform priority mapping based on the QoS priority to determine the local priority of the data packet (that is, the service level of the data packet distinguished within the network device), so that the network device determines the queue that the data packet enters based on the local priority corresponding to the data packet. Different data packets in the same data stream have the same QoS priority, so different data packets in the same data stream will be mapped to the same queue. The data forwarding network can forward multiple data streams, and each queue in the network device can forward one or more data streams.

[0066] The data stream described in this embodiment can be defined by a binary, triple, quadruple, quintuple, or septuple, so that the network device can determine the data stream to which the data packet belongs based on the binary, triple, quadruple, quintuple, or septuple information in the data packet. A binary tuple, for example, includes the source IP address and the destination IP address. A triple tuple, for example, includes the source IP address, the destination IP address, and the transport protocol. A quadruple tuple, for example, includes the source IP address, the destination IP address, the source port address, and the destination port address. A quintuple, for example, includes the source IP address, the destination IP address, the source port address, the destination port address, and the transport protocol. A septuple, for example, includes the source IP address, the destination IP address, the protocol number, the source port, the destination port, the service type, and the port index. In another implementation, the data stream can also be defined by an application name combined with a binary, triple, quadruple, quintuple, or septuple.

[0067] In this embodiment, the network device is further configured to obtain first network measurement data of a queue of the network device and send the first network measurement data to an analysis device. Generally, a network device includes multiple ports. For example, the network device includes at least one transmit port and at least one receive port. A receive port is configured to receive data streams from a terminal device or receive data streams forwarded by other network devices. A transmit port is configured to forward data streams to a terminal device or other network devices. A transmit port may include one or more transmit queues, each of which is configured to cache data packets waiting to be switched to the transmit port. A receive port may include one or more receive queues, each of which is configured to cache data packets waiting to be sent. It should be noted that when the network device is an AP, the AP configures K queues for each terminal device associated with the AP. K can be 2, 4, 8, 16, or 32, among others. In this embodiment, a queue is a general term for a transmit queue and a receive queue, i.e., a queue can include both a transmit queue and a receive queue.

[0068] A network device may obtain first network measurement data for one or more queues of the network device. In one possible implementation, the network device may obtain first network measurement data for one queue among the multiple queues of the network device. For example, if the network device measures only one data flow, it may obtain first network measurement data only for the queue that forwards the data flow. In another possible implementation, the network device may obtain first network measurement data for a subset of all queues of the network device. For example, the network device may obtain first network measurement data for all transmit queues. Alternatively, the network device may obtain first network measurement data for a subset of all transmit queues. The subset of transmit queues may be transmit queues of a subset of all transmit ports, or the subset of transmit queues may be a subset of multiple transmit queues of a transmit port. Alternatively, the network device may obtain first network measurement data for a subset of all transmit queues and obtain first network measurement data for all or a subset of receive queues. Alternatively, the network device may obtain first network measurement data for all transmit queues and first network measurement data for a subset of receive queues. In yet another possible implementation, the network device may obtain first network measurement data for all queues of the network device.

[0069] The first network measurement data of a queue can indicate the performance or status of the queue. In one possible implementation, the first network measurement data of a queue includes, for example, at least one of the first latency of the queue (the time a data packet needs to wait from entering the queue to leaving the queue) and the first packet loss rate of the queue. In another possible implementation, the first network measurement data includes, for example, queue depth and packet transmission rate, and / or the number of packet losses and the number of packets transmitted, so that the analysis device can calculate the first latency based on the queue depth and packet transmission rate, and / or the first packet loss rate based on the number of packet losses and the number of packets transmitted. In another implementation, the first network measurement data includes, for example, the first latency of the queue, and / or the number of packet losses and the number of packets transmitted, wherein the number of packet losses and the packet transmission data are used to calculate the first packet loss rate. In another implementation, the first network measurement data includes, for example, queue depth and packet transmission rate, and / or the first packet loss rate, wherein the queue depth and packet transmission rate are used to calculate the first latency of the queue.

[0070] The queue depth is the used buffer in the buffer corresponding to the queue, that is, the queue depth is the size of the packets cached in the buffer corresponding to the queue. The unit of queue depth can be bytes or bits. The size of the packets cached in the buffer corresponding to the queue may vary at different times. Therefore, the queue depth used to calculate the first delay can be a statistical value of the queue depth at different times within a preset time period, such as an average value or a percentile value. The packet sending rate can be the actual rate at which the queue sends packets, for example, the number of packets sent within a preset time period divided by the preset time period. The packet sending rate can also be the committed information rate (CIR). The unit of the packet sending rate is, for example, bits per second (bps). Therefore, the first delay of the queue can be calculated based on the queue depth and packet sending rate. For example, if the unit of queue depth is bytes, the first delay can be calculated by multiplying the queue depth by 8 and then dividing it by the packet sending rate. If the unit of queue depth is bits, the first delay can be calculated by dividing the queue depth by the packet sending rate. The number of packet losses is the cumulative number of packets discarded within the preset time period. The number of packets sent is the cumulative number of data packets sent within a preset time period. The first packet loss rate can be obtained based on the number of packet losses and the number of packets sent. For example, the first packet loss rate = number of packet losses / (number of packet losses + number of packets sent). The number of packets sent can be the number of data packets successfully sent by the forwarding device (not discarded or with no errors), the number of packet losses can be the number of data packets that failed to be sent, and the number of packet losses can also include the number of data packets discarded by the device before sending, such as packet loss caused by a full cache or packet loss caused by device abnormalities.

[0071] After the network device obtains the first network measurement data of the queue of the network device, it sends the first network measurement data of the queue to the analysis device. In one possible implementation, the network device may send the first network measurement data of all queues of the network device to the analysis device. In another possible implementation, the network device may also send the first network measurement data of some queues of the network device to the analysis device. For example, the network device may only send the first network measurement data of all sending queues. For another example, the network device may only send the first network measurement data of queues of some ports to the analysis device. Some ports may be some sending ports and / or some receiving ports, for example, some ports are ports that participate in forwarding the target data flow. For another example, the network device may only send the first network measurement data of the target queue (including at least one of the target sending queue and the target receiving queue) that participates in forwarding the specified data flow to the analysis device.

[0072] The network device may periodically send the first network measurement data of the queue to the analysis device. The period for sending the first network measurement data by the network device may be configured by a local default configuration of the network device or by the analysis device. Alternatively, the analysis device may send a request message to the network device, requesting the network device to send the first network measurement data of the queue. The network device may respond to the request message by sending the first network measurement data to the analysis device.

[0073] The network device may send first network measurement data of a queue to the analysis device via a first message. Specifically, the first message includes the first network measurement data of the queue of the network device. The first message may also include information indicating the queue to which the first network measurement data belongs, enabling the analysis device to determine to which queue each received network measurement data item belongs. In one possible implementation, the first message includes a queue identifier, where the queue identifier indicates a queue. In the first message, the first network measurement data of the queue corresponding to the queue identifier may be adjacent. In another possible implementation, the first message may include a bitmap, where a bit in the bitmap indicates a queue. The bitmap may indicate whether the first network measurement data of the corresponding queue is included in the first message. For example, a bitmap value of 11010111 may indicate that the first message includes the first network measurement data of queues 1, 2, 4, 6, 7, and 8. If the first network measurement data of queues 1, 2, 4, 6, 7, and 8 are arranged sequentially in the first message, the analysis device can determine the queue to which each piece of first network measurement data item belongs. Of course, the first message may also not include information indicating the queue to which the first network measurement data item belongs. For example, a first message includes the first network measurement data for all queues on a port. Each piece of first network measurement data has the same length and is arranged sequentially. The analysis device can then determine the queue to which each piece of first network measurement data belongs. For example, first network measurement data d1-d8 corresponding to queues 1-8, respectively, are arranged in the order [d1, d2, ..., d8] in the first message. The analysis device can determine the first network measurement data corresponding to each queue based on the length of the first network measurement data.

[0074] Optionally, the first message may further include a device identifier of the network device to indicate the network device to which the first network measurement data in the first message belongs. The device identifier may be an IP address or a Media Access Control (MAC) address of the network device. Alternatively, the device identifier may be a serial number of the network device. Optionally, the first message may further include a port identifier of the network device, indicating one or more ports to which the first network measurement data belongs. The port identifier may be an IP address configured for the port, or may be a serial number of the port.

[0075] Optionally, the first message may also include a flow identifier for a data flow. The flow identifier indicates a data flow. The flow identifier may be adjacent to the first network measurement data of a queue that forwards the data flow indicated by the flow identifier, thereby associating the first network measurement data of the queue with the data flow forwarded by the queue. When the queue forwards multiple data flows, the first network measurement data of the queue is associated with multiple data flows. In other words, the first network measurement data can be directly associated with the data flow. When analyzing the network measurement data of the data flow, the analysis device can use the flow identifier of the data flow as an index to obtain the first network measurement data associated with the data flow. The first network measurement data associated with the data flow is the first network measurement data of the queue that forwards the data flow.

[0076] Optionally, the network device may also send a second message to the analysis device, where the second message includes, for example, a flow identifier of the data flow and a queue identifier of a queue that forwards the data flow, to indicate a first association relationship between the data flow and the queue. Thus, when analyzing the network measurement data of the data flow, the analysis device may use the flow identifier of the data flow as an index to obtain the queue identifier associated with the data flow, and then use the queue identifier as an index to obtain the first network measurement data corresponding to the queue. Because the network device can determine the queue to forward the data flow based on the QoS priority carried by the data packets in the data flow, the network device can obtain the first association relationship between the data flow and the queue that forwards the data flow. The first message and the second message may be the same message. Of course, the first message and the second message may also be different messages, that is, the first message and the second message are sent separately.

[0077] When a terminal device accesses an application, one or more data streams are transmitted between the terminal device and the application server corresponding to the application through the data forwarding network. The analysis device can further analyze the network status of the traffic corresponding to the application in the data forwarding network in the application dimension. Optionally, the network device can also identify the application corresponding to the data stream to obtain a second association relationship between the data stream and the application. The network device can send a third message to the analysis device. The third message, for example, includes the flow identifier of the data stream and the application identifier of the application to which the data stream belongs, to indicate the second association relationship between the data stream and the application. The network device can identify the application to which the data stream belongs based on DPI, DFI or AI technology. The second message and the third message can be the same message, that is, the second message (third message) includes the association relationship between the application, data stream and queue. The second message and the third message can also be different messages, that is, the second message and the third message are sent separately. For example, in one possible scenario, the network device can obtain the flow identifier of the data stream based on the first data packet of the data stream, and the network device may need to analyze multiple data packets of the data stream to determine the application to which the data stream belongs. In this case, the second message and the third message can be sent separately. In another possible implementation, the second association relationship between the data stream and the application may also be sent by the terminal device or the application server to the analysis device.

[0078] The network device can send the association relationships (first association relationship / second association relationship / third association relationship) corresponding to all data flows forwarded by the network device to the analysis device. Alternatively, the network device can send the association relationship corresponding to the specified data flow to the analysis device. Alternatively, the network device can send the association relationship corresponding to the data flow of the target application to the analysis device. Alternatively, the network device can send the association relationship corresponding to the data flow of the target application type to the analysis device. The specified data flow / target application / target application type can be the default configuration of the network device, or it can be specified by the analysis device / control device through control information, which is not limited here.

[0079] Among the multiple network devices in the data forwarding network, all network devices in the data forwarding network may send the second message / third message to the analysis device, or some network devices may send the second message / third message to the analysis device. Several scenarios in which some network devices in the data forwarding network send the second message / third message to the analysis device are described below.

[0080] In one possible scenario, the priority mapping policies configured on each of the multiple network devices in the same network (such as a data center network, a campus network, a campus network, an enterprise network, a home network, or a carrier network, etc.) are the same. Based on the same priority mapping policy, the same data stream enters the same sending queue in different network devices in the network. That is, different network devices in the same network use the same queue (here, the same queue type) to forward the same data stream. Therefore, only some of the network devices in the network can obtain the first association relationship and send the above-mentioned second message to the analysis device to reduce communication overhead. The application identification policies configured on the multiple network devices in the same network are the same. Based on the same application identification policy, the same data stream is identified as the same application by different network devices in the network. Therefore, only some of the network devices in the network can identify the application to which the data stream belongs to obtain the second association relationship and send the above-mentioned third message to the analysis device to reduce communication overhead. Among them, the partial network devices in the network can be a network device in the network, or multiple network devices among all the network devices in the network. The second message / third message can be sent by the boundary network device in the network. A border network device is a network device in a network that is used to forward traffic entering or leaving the network. For example, an AP or wireless controller in a wireless local area network (WLAN) can be a border network device. Or an access switch, core switch or export gateway device (router) in a local area network can be a border network device. Or a provider edge router (PE) in an operator network can be a border network device. It should be noted that in this case, some network devices in the network can send the second message / third message to the analysis device. It is not necessary for some network devices in the network to send the second message / third message to the analysis device in this case. In this case, all network devices in the network can also send the second message / third message to the analysis device, and there is no restriction here.

[0081] Of course, in some cases, a network device in the data forwarding network may not send the second message to the analysis device. For example, if the data flow is a designated data flow and the network devices in the forwarding path of the data flow only send the first network measurement data of the queue forwarding the data flow, the network device may not send the second message to the analysis device. Alternatively, if the first message already indicates the data flow associated with the first network measurement data, the network device may not send the second message to the analysis device.

[0082] Optionally, the network device may also send the forwarding table entries of the network device to the analysis device, so that the analysis device can determine the forwarding path of the data flow based on the forwarding table entries. The forwarding path includes one or more network devices that forward the data flow, and the analysis device can then obtain the first network measurement data of the queue forwarding the data flow from the first network measurement data of the network devices in the forwarding path. For example, if the forwarding table entries are learned by the network device itself and the analysis device does not have the forwarding table entries for the network device, the network device may send the forwarding table entries of the network device to the analysis device. Forwarding table entries include, for example, a MAC table or a routing table.

[0083] Of course, in some cases, the network device may not send forwarding table entries to the analysis device. If the analysis device already knows the network device's forwarding table entries, the network device may not send the forwarding table entries to the analysis device. For example, the forwarding table entries of the network device in a software-defined network are configured by the analysis device, and the analysis device already knows the network device's forwarding table entries. Alternatively, if the first message indicates the data flow associated with the first network measurement data, the analysis device can query the associated first network measurement data based on the flow identifier of the data flow, eliminating the need to first determine the forwarding path of the data flow. Therefore, the network device may not send the forwarding table entries to the analysis device.

[0084] The analysis device determines second network measurement data for one or more data flows based on first network measurement data from queues of one or more network devices. When analyzing network measurement data for a particular data flow (hereinafter referred to as a target data flow), the analysis device must obtain the first network measurement data of the queue forwarding the data flow (hereinafter referred to as the target queue) from the received first network measurement data of multiple queues to obtain the second network measurement data for the data flow.

[0085] There are multiple methods for an analysis device to obtain the network measurement data of a target queue from the first network measurement data of multiple queues. In one possible implementation, the analysis device can determine the forwarding path of the target data stream, and then obtain the first network measurement data of the target queue based on the first association between the target data stream and the target queue. Specifically, data packets in the same data stream are received or sent by the same port and the same queue of a network device. The target data stream will be forwarded by multiple network devices. The analysis device can determine the forwarding path of the target data stream and the target port for forwarding the target data stream among the multiple ports of the network devices in the forwarding path based on the forwarding table entries of the multiple network devices, that is, determine the network devices and ports through which the data stream passes. The analysis device determines the multiple target queues for forwarding the target data stream among the multiple queues of the target port of the network device in the forwarding path based on the first association between the target data stream and the target queue. The analysis device can then obtain the first network measurement data of the multiple target queues for forwarding the data stream.

[0086] In another possible implementation, if the first message indicates a data flow associated with the first network measurement data, the analysis device can use the flow identifier of the target data flow as an index to query multiple first network measurement data associated with the target data flow. The multiple first network measurement data associated with the target data flow are the first network measurement data of multiple target queues.

[0087] The analysis device can add the first network measurement data of multiple target queues to obtain the second network measurement data of the data stream. For example, if the first network measurement data of the target queue includes the first delay of the target queue, then the second delay of the target data stream is obtained by adding the first delays of multiple target queues. For another example, if the first network measurement data of the target queue includes the first packet loss rate of the target queue, then the second packet loss rate of the target data stream is obtained by adding the first packet loss rates of multiple target queues. Alternatively, when the first network measurement data includes the queue depth and packet transmission rate of the target queue, the analysis device calculates the first delay of the target queue based on the queue depth and packet transmission rate, and then the analysis device adds the first delays of multiple target queues to obtain the second delay of the target data stream. Alternatively, when the first network measurement data includes the number of packet losses and the number of packets transmitted of the target queue, the analysis device calculates the first packet loss rate of the target queue based on the number of packet losses and packet transmission data, and then the analysis device adds the first packet loss rates of multiple target queues to obtain the second packet loss rate of the target data stream.

[0088] The analysis device may also analyze abnormal network devices in the forwarding path based on the first network measurement data of multiple target queues. In one possible implementation, the analysis device may compare the first network measurement data of multiple target queues to determine that the network device corresponding to the target queue with the largest first delay or the largest first packet loss rate is abnormal, or that the target queue with the first delay / first packet loss rate in the top K is abnormal. K is an integer greater than or equal to 2. In another implementation, the analysis device may compare the first network measurement data of multiple target queues with a threshold to determine abnormal target queues, and further determine that the network device corresponding to the abnormal target queue is the abnormal network device. For example, the analysis device may compare the first delay of each target queue with a delay threshold and determine that the target queue with a first delay greater than the delay threshold is an abnormal target queue, and the network device corresponding to the abnormal target queue is abnormal. Alternatively, the analysis device may compare the first packet loss rate of each target queue with a packet loss rate threshold and determine that the target queue with a first packet loss rate greater than the packet loss rate threshold is an abnormal target queue, and the network device corresponding to the abnormal target queue is abnormal. Alternatively, the analysis device may compare the number of packet losses of each target queue with a packet loss threshold. A target queue whose number of packet losses is greater than the packet loss threshold is an abnormal target queue, and a network device corresponding to the abnormal target queue is abnormal.

[0089] Optionally, after identifying an abnormal network device, the analysis device can issue an alarm. The alarm may include at least one of the following information: the abnormal network device, data flow, destination port, and destination queue. Based on queue-level network measurement data, the analysis device can screen potentially abnormal network devices in the network, allowing operations and maintenance personnel to further locate the root cause of the abnormal network device.

[0090] After obtaining network measurement data for a data stream, the analysis device can display the second network measurement data for the data stream on a graphical user interface. Alternatively, the graphical user interface can display the second network measurement data for multiple data streams under the same application. Alternatively, the graphical user interface can display the second network measurement data for multiple data streams from the same terminal device. Abnormal network devices can also be identified in the graphical user interface, for example, by using a dialog box, a different color, a prompt symbol, etc.

[0091] In this embodiment, since the measurement is performed on a queue in a network device, there is no need to mark data packets or add headers, thereby improving forwarding efficiency. The device capability requirements are relatively low, reducing network measurement costs, and not occupying the bandwidth of the communication link, thereby ensuring bandwidth utilization of the communication link. Furthermore, the same queue may be used to store and transmit multiple data streams. Therefore, obtaining measurement data for a queue once can obtain network measurement data for multiple data streams, significantly reducing measurement costs compared to flow-by-flow measurement. Furthermore, the probability of packets being dropped or delayed for different data streams in the same queue is similar. Therefore, obtaining measurement data for a data stream based on the queue's measurement data can achieve a certain degree of accuracy, which facilitates rapid acquisition of measurement data for the data stream.

[0092] Optionally, the network system may further include a control device. The control device is used to manage the network measurement behavior of the network device, such as instructing the network device to enable or disable the network measurement function, or instructing the network measurement of traffic for a specified data flow, application, or application type. The control device may send control information to the network device, the control information being used to instruct the network device on the network measurement behavior.

[0093] In one possible implementation, the control information may instruct the network device to enable a network measurement function. Enabling the network measurement function means starting to measure at least one network performance metric, such as latency or packet loss rate, for a queue in the network device to obtain network measurement data corresponding to the queue. In response to the control information, the network device may measure all forwarded data flows, thereby obtaining first network measurement data for the queues corresponding to all data flows. Alternatively, the network device may obtain first network measurement data for all queues in the network device. Optionally, the network device may also obtain an association between each data flow and the queue used to forward the data flow. Alternatively, each network device in the data forwarding network may obtain an association between each data flow forwarded by the network device and the queue used to forward the data flow. The network device then transmits the first network measurement data for the queues in the network device to an analysis device. When the network device obtains the association between the data flow and the queue, it may also transmit the association to the analysis device. The network device that obtains and transmits the association between the data flow and the queue may be a boundary network device in the data forwarding network. Of course, non-boundary network devices in the data forwarding network may also obtain and transmit the association between the data flow and the queue, without limitation.

[0094] Optionally, the network device can also identify the application to which each data flow belongs. The network device can determine the application to which the data flow belongs based on the port information of the data packets in the data flow, or other characteristics of the data packets. An application can correspond to one or more data flows. For example, if the same application includes data of different types or priorities, the application can correspond to multiple data flows, allowing the data forwarding network to provide differentiated services for data flows of different types or priorities. For example, an application may include at least one of a data flow for carrying voice calls, a data flow for carrying video conferencing, a data flow for carrying live broadcast traffic, a data flow for carrying email data, and a data flow for carrying HTTP web pages. The network device can send the association between the application to which the data flow belongs and the target queue to which the data flow is forwarded to the analysis device, so that the analysis device can analyze the network measurement data of the application. The network device that obtains and sends the association between the data flow, target queue, and application can be a boundary network device in the data forwarding network. Of course, non-boundary network devices in the data forwarding network can also obtain and send the association between the data flow, target queue, and application, without limitation here.

[0095] In another possible implementation, the control information may instruct the network device to measure a specified data flow. The control information may, for example, include a flow identifier for the specified data flow. The flow identifier may be, for example, the aforementioned two-tuple, three-tuple, four-tuple, five-tuple, or seven-tuple. After identifying the specified data flow based on the flow identifier in the control information, the network device may determine the destination port and target queue for forwarding the specified data flow. Measuring the specified data flow by the network device may mean that the network device only measures the target queue and obtains first network measurement data for the target queue. Measuring the specified data flow by the network device may also mean that the network device measures network measurement data for multiple queues (e.g., all transmit queues or all queues of the network device) including the target queue, obtains first network measurement data for multiple queues, including the target queue, and obtains an association between the specified data flow and the target queue. When the specified data flows indicated by the control information include only one specified data flow, or the network device is not a boundary network device, the network device may send the first network measurement data for the target queue to the analysis device without sending the association between the specified data flow and the target queue to the analysis device. When the designated data flow indicated by the control information includes multiple designated data flows, the network device may send, to the analysis device, first network measurement data of the target queues corresponding to the multiple designated data flows, as well as an association between each designated data flow and the target queue that forwards the designated data flow. Alternatively, when the designated data flow indicated by the control information includes multiple designated data flows, the network device may send, to the analysis device, first network measurement data of all transmit queues or all queues of the network device, as well as an association between each designated data flow and the target queue that forwards the designated data flow.

[0096] In another possible implementation, the control information may instruct the network device to measure the target application. Measuring the target application may include measuring the queue forwarding the target application's data flow and sending only the network measurement data for the queue forwarding the target application's data flow to the analysis device. Alternatively, measuring the target application may also include obtaining and sending a first association between the data flow corresponding to the target application and the queue forwarding the data flow corresponding to the target application, as well as obtaining and sending network measurement data for multiple queues, including the queue forwarding the target application's data flow. The control information may include, for example, an application identifier for the target application. The application identifier may indicate an application, such as WeChat, QQ, TikTok, Huawei Cloud Meeting, Huawei Video, or Huawei Music. An application may correspond to one or more data flows. For example, QQ includes functions such as video calling, voice calling, text messaging, and email, and different functions often correspond to different data flows. Different data flows may also have different priorities; for example, video calling and voice calling may have higher priority than email. Therefore, different data flows from the same application may be forwarded through different queues within the network device. The network device can determine the application to which the data packet belongs based on the port information in the data packet. The network device can also identify the application to which the data packet belongs using application identification technologies such as DFI, DPI, or AI. The network device identifies that the data flow belongs to the target application and obtains the target queue corresponding to the data flow. The network device can measure first network measurement data of the target queue or first network measurement data of multiple queues of the network device, including the target queue. The network device can send the first network measurement data of the target queue to the analysis device or send the first network measurement data of multiple queues to the analysis device. Optionally, the network device can also send the first association between the data flow and the target queue to the analysis device. Alternatively, when the control information indicates measurement of multiple target applications, the network device can send the second association between the target application and the data flow to the analysis device. When the control information indicates measurement of a single target application, the network device can send the second association to the analysis device or not, without limitation.

[0097] The analysis device can obtain one or more data flows corresponding to an application. The analysis device can sum the second network measurement data of all data flows of an application to obtain third network measurement data at the application granularity. The third network measurement data can reflect the overall status of the application's related traffic in the data forwarding network. Alternatively, for the same application, the analysis device can also determine one or more data flows corresponding to different terminal devices and the application based on the second association relationship and the source IP address / destination IP address of the data flow. When a terminal device corresponds to multiple data flows with the application, the analysis device can sum the first network measurement data of the multiple data flows corresponding to the terminal device and the application to obtain fourth network measurement data. The fourth network measurement data can reflect the status of the application's related traffic in the data forwarding network at the terminal device granularity. Alternatively, for an application, the analysis device can also determine the network measurement data of certain specific types of data flows of each terminal device. For example, for WeChat, the analysis device can determine the network measurement data of WeChat video, WeChat chat, and other data flows of each terminal device.

[0098] In another possible implementation, the control information may instruct the network device to measure the target application type. Measuring the target application type may include measuring the queue that forwards the data flow of the target application type and sending only the network measurement data of the queue that forwards the data flow of the target application type to the analysis device. Alternatively, measuring the target application type may also refer to obtaining and sending a first association between the data flow corresponding to the target application type and the queue that forwards the data flow corresponding to the target application type, as well as obtaining and sending network measurement data of multiple queues including the queue that forwards the data flow of the target application type. The control information may include, for example, an identifier of the target application type. The target application type indicates a class of applications, such as video applications, voice applications, conference applications, remote desktop applications, file transfer applications, live broadcast applications, text applications, email applications, HTTP web applications, etc. The target application type may include one or more applications. For example, when the target application type is a conference application, it may include Huawei Cloud Conference, Tencent Conference, DingTalk, etc. The network device can identify whether a data flow belongs to an application within the target application type. If the data flow belongs to an application within the target application type, the network device can obtain first network measurement data of a queue forwarding the data flow. It can also obtain a first association between the data flow and the queue forwarding the data flow, or a third association between the application type to which the data flow belongs and the data flow. The network device can send the first network measurement data of the queue forwarding the data flow of the application within the target application type to the analysis device. Optionally, the network device can also send the aforementioned third association to the analysis device.

[0099] The analysis device can obtain one or more data flows corresponding to an application type. The analysis device can sum the second network measurement data for all data flows of an application type to obtain fifth network measurement data at the application type granularity. The fifth network measurement data can reflect the overall status of traffic related to the application type in the data forwarding network. Alternatively, for the same application type, the analysis device can also determine one or more data flows corresponding to the application type for different terminal devices based on the second association relationship and the source / destination IP address of the data flow. If a terminal device has multiple data flows corresponding to the application type, the analysis device can sum the first network measurement data for the multiple data flows corresponding to the application type for the terminal device to obtain sixth network measurement data. The sixth network measurement data can reflect the status of traffic related to the application type in the data forwarding network at the terminal device granularity. Alternatively, for a given application, the analysis device can obtain network measurement data for different specific applications. For example, for conferencing applications, the analysis device can obtain network measurement data for Huawei Cloud Meeting, Tencent Meeting, etc. Furthermore, the analysis device can also obtain network measurement data for different specific applications for a specific / individual terminal.

[0100] In the above description, the network device identifies the application to which the data flow belongs and sends the association between the application and the data flow to the analysis device. In another implementation, other devices can also send the association between the application and the data flow to the analysis device without the network device identifying and sending the application to which the data flow belongs. For example, the source device and the destination device of the data flow can send the association between the application and the data flow to the analysis device. The source device is, for example, a terminal device, and the destination device is, for example, an application server. Alternatively, the source device is an application server, and the destination device is a terminal device.

[0101] Optionally, the control information can also indicate the period or frequency of the first network measurement data of the network device sending queue, so that the analysis device can obtain the network measurement data and analyze it in a timely manner, ensuring the timeliness and accuracy of the second network measurement data of the data flow, and when there is an abnormality in the network device in the data forwarding network, it can detect the abnormality in time and issue an alarm.

[0102] It should be noted that the control device is optional. The control device and the analysis device can be the same device or different devices. The operations performed by the control device can also be performed by the analysis device.

[0103] In this embodiment, multiple network devices in a data forwarding network collect first network measurement data from queues and send this data to an analysis device. This allows the analysis device to further obtain the first network measurement data from the queues forwarding data flows to obtain second network measurement data for the data flows. Because data flows are forwarded through queues, and packets within the same queue are sent on a first-in, first-out basis, the latency of a queue can be used as the latency of a data flow passing through the queue. A queue may forward multiple data flows, or in other words, a queue may buffer packets from multiple data flows. In the event of congestion, the probability of packets being dropped from different data flows within the same queue is similar, so the packet loss rate of the queue can be approximated as the packet loss rate of the data flow. In this embodiment, network devices do not need to encapsulate additional headers on packets within a data flow, ensuring data forwarding efficiency and eliminating the need for additional bandwidth resources. This reduces the complexity of network device implementation, thereby lowering network device costs. Furthermore, because a queue can forward multiple data flows, multiple data flows forwarded by the same queue can share the first network measurement data of the queue to calculate the second network measurement data for the data flow. The number of data flows forwarded by a network device is often greater than the number of queues in the network device. The network device does not need to measure the network performance indicators of each data flow, which can reduce measurement costs.

[0104] In order to make the solution provided by this application easier to understand, the solution provided by this application is described below in conjunction with specific scenarios.

[0105] As shown in Figure 2, Figure 2 is a schematic diagram of an application scenario provided by this application. It will be understood that the network topology and the number of network devices in Figure 2 are for illustration only and should not be construed as limiting this application. The network system shown in Figure 2 includes an analysis device and a data forwarding network. The data forwarding network shown in Figure 2 is a single network. For example, the data forwarding network can be a data center network, a campus network, an enterprise network, a government network, a campus network, or a network of a certain operator.

[0106] The forwarding path of data flow s in the data forwarding network includes network device 1 → network device 2 → network device 3 → network device 4. Network device 1 and network device 4 are boundary network devices of the data forwarding network.

[0107] After receiving data stream s, network device 1 identifies it and determines, based on the data stream's destination address and forwarding table entries, which port to send the data stream to. Network device 1 is directly connected to network device 2 via sending port 1. Network device 1 further determines, based on the priority information carried in the data packets in data stream s, queue 1 to which to send the data stream. It should be noted that queue 1 refers to one of the N queues of sending port 1 and does not limit queue 1 to the highest or lowest priority queue. N can be 4, 6, 8, 16, 32, 64, 128, etc. The number of queues configured for a port is based on actual needs and is not a limitation. This embodiment uses N as 8 as an example. Network device 1 measures queue 1 of sending port 1 and obtains first network measurement data for queue 1. Network device 1 sends a first message to the analysis device. The first message sent by network device 1 includes the first network measurement data for queue 1. The first message may also include a device identifier for network device 1, enabling the analysis device to identify which network device collected the network measurement data. Since network devices typically include multiple sending ports, each of which includes multiple queues, the first message may also include an identifier for sending port 1, enabling the analysis device to determine which sending port of network device 1 Queue 1 belongs to. The network measurement data sent by network device 1 may include only the first network measurement data for queue 1 of port 1. The network measurement data sent by network device 1 may also include the first network measurement data for multiple queues of port 1, including the first network measurement data for queue 1. The first message may also include an identifier for queue 1 to indicate the queue to which the network measurement data corresponds. Of course, the first message may not include the identifier for queue 1. For example, if the data forwarding network only measures data stream s, the first message may not include the identifier for queue 1. Alternatively, if the network measurement data sent by network device 1 includes the first network measurement data for all eight queues of sending port 1, the first network measurement data for the eight queues may be arranged in sequence, with the first network measurement data for each queue having the same length. The analysis device may determine the network measurement data corresponding to each queue based on the length of the network measurement data.

[0108] Optionally, the first message sent by network device 1 may include, in addition to the first network measurement data of queue 1, a flow identifier of data flow s. The first network measurement data of queue 1 is adjacent to the flow identifier of data flow s, or the first network measurement data of queue 1 corresponds to the flow identifier of data flow s, so that the analysis device can determine that the first network measurement data of queue 1 is associated with data flow s. When analyzing the second network measurement data of data flow s, the analysis device can query the first network measurement data of queue 1 based on the flow identifier of data flow s.

[0109] Optionally, when network device 1 also forwards data flows other than data flow s, network device 1 may further send a second message to the analysis device, the second message indicating first association information between data flow s and queue 1. The first association information includes the identifier of queue 1 and the flow identifier of data flow s, indicating the association between queue 1 and data flow s. Thus, the analysis device can obtain first network measurement data of queue 1 based on the association between queue 1 and data flow s.

[0110] Network device 1 can also identify application a to which data flow s belongs. Network device 1 can also send a third message to the analysis device. The third message indicates second association information between data flow s and application a to which data flow s belongs. The second association information, for example, includes the flow identifier of data flow s and the application identifier of application a, indicating the association between data flow s and application a. This enables the analysis device to analyze the network status corresponding to application a in the data forwarding network.

[0111] After network device 2 receives data stream s forwarded by network device 1, it determines the sending port 2 (sending port) for sending the data stream based on the destination address of the data stream and the forwarding table. Network device 2 is directly connected to network device 3 through sending port 2. Network device 2 further determines the queue for sending the data stream based on the priority information carried in the data packet in data stream s. When network device 1 and network device 2 use the same priority mapping, the queues for forwarding data stream s in network device 1 and network device 2 are the same (the sending ports are not necessarily the same), both of which are queue 1. It should be noted that the same queue means the same type of queue. For example, the queues for forwarding data stream s in network device 1 and network device 2 are both EF, AF2 or AF1, etc. Network device 1 measures queue 1 of sending port 2 and obtains the first network measurement data of queue 1. Network device 2 sends a first message to the analysis device. The first message sent by network device 2 may include the first network measurement data for all queues of port 2. Furthermore, since the first association between data flow s and queue 1 in network device 1 is the same as the first association between data flow s and queue 1 in network device 2, network device 2 does not need to send a second message indicating the association between data flow s and queue 1 of sending port 2 to the analysis device. The analysis device can use the first association between data flow s and queue 1 in the second message from network device 1 as the first association between data flow s and queue 1 in network device 2. Of course, if network device 1 and network device 2 use different priority mappings, the queue to which network device 2 forwards data flow s may be different from the queue to which network device 1 forwards data flow s. In this case, network device 2 may send the first and second messages in a manner similar to that of network device 1. This embodiment is described using the example of network devices 1-4 using the same priority mapping, i.e., network devices 1-4 use the same queue to forward data flow s.

[0112] The way network devices 3 and 4 measure data flow s is similar to that of network device 2, so it will not be repeated here. The queue to which network device 3 forwards data flow s is queue 1 of sending port 3, and the queue to which network device 4 forwards data flow s is queue 1 of sending port 4.

[0113] In one possible implementation, the analysis device determines, based on forwarding table entries such as a routing table, flow table, or MAC table, that the forwarding path of data flow s is network device 1 → network device 2 → network device 3 → network device 4, and that the sending ports through which data flow s is forwarded between network device 1 and network device 4 are sending port 1 and sending port 4. Based on the association between data flow s and queue 1, the analysis device determines that the queue through which data flow s is forwarded between network device 1 and network device 4 is queue 1. Based on the forwarding path, sending port, and queue of the forwarded data flow s, the analysis device obtains first network measurement data of queue 1 of sending port 1 of network device 1, first network measurement data of queue 1 of sending port 2 of network device 2, first network measurement data of queue 1 of sending port 3 of network device 3, and first network measurement data of queue 1 of sending port 4 of network device 4.

[0114] In another possible implementation, the first messages sent by network devices 1 through 4 all indicate data flow s associated with the first network-side data of queue 1. The analysis device can then, based on the flow identifier of data flow s, obtain the first network measurement data of queue 1 of network device 1, the first network measurement data of queue 1 of network device 2, the first network measurement data of queue 1 of network device 3, and the first network measurement data of queue 1 of network device 4. In this implementation, the analysis device need not determine the forwarding path based on the forwarding table entry, nor need to obtain the first network measurement data of queue 1 based on the second association relationship.

[0115] The analysis device can obtain second network measurement data for data flow s based on this network measurement data. For example, if the network measurement data includes a first delay, the analysis device will sum the first delays of queue 1 of the corresponding transmission ports of network devices 1 through 4 to obtain the second delay of data flow s in the data forwarding network. If the network data includes a first packet loss rate, the analysis device will sum the first packet loss rates of queue 1 of the corresponding transmission ports of network devices 1 through 4 to obtain the second packet loss rate of data flow s in the data forwarding network. In other words, the first network measurement data of the multiple queues forwarding data flow s is used as the second network measurement data of data flow s.

[0116] The analysis device can also perform network anomaly analysis based on network measurement data. For example, if the analysis device compares the first network measurement data for queue 1 of the corresponding transmission ports of network devices 1 through 4 and determines that network device 3 has the highest first latency or first packet loss rate, it can be considered that network device 3 has an anomaly. Alternatively, the analysis device can compare the first network measurement data for queue 1 of the corresponding transmission ports of network devices 1 through 4 with a threshold. If the first packet loss rate is greater than the packet loss rate threshold, or the first latency is greater than the latency threshold, it can be considered that the corresponding network device has an anomaly.

[0117] In another implementation, in addition to measuring the first network measurement data of the transmit queue of a transmit port, the network device can also measure the first network measurement data of the receive queue of a receive port. For example, when the rate at which the network device receives data packets exceeds the switching rate of the network device, the data packets may be queued in the receive queue of the receive port. Data packets queued in the receive queue also experience queuing delays and may experience packet loss. Therefore, the network device can measure the first network measurement data of the receive queue. Generally speaking, a receive port has one receive queue. Of course, a receive port may have multiple receive queues. This embodiment uses the example of one receive queue corresponding to one receive port.

[0118] Network device 1 receives data stream s through receive port 1 and obtains first network measurement data for the receive queue of receive port 1. The first message sent by the network device to the analysis device also includes the first network measurement data for the receive queue and the identifier of receive port 1. Similarly, network devices 2 through 4 each obtain first network measurement data for the receive queue of the receive port that received data stream s and send the first network measurement data of the receive queue to the analysis device.

[0119] The analysis device can then add the first network measurement data of the receive queues of network devices 1 through 4 and the first network measurement data of the transmit queues (queue 1 of the transmit port) corresponding to network devices 1 through 4 to obtain the second network measurement data of data flow s. The analysis device can also calculate the sum of the first network measurement data of the transmit queue and the first network measurement data of the receive queue of each network device as the network measurement data of data flow s for the network device, and compare them (between network devices or against a threshold) to identify abnormal network devices.

[0120] As shown in Figure 3, Figure 3 is a schematic diagram of a network system provided by the present application. It will be understood that the network topology and the number of network devices in Figure 3 are for illustration only and should not be understood as limiting the present application. The network system shown in Figure 3 includes an analysis device and a data forwarding network. The data forwarding network shown in Figure 3 is a composite network, that is, the data forwarding network includes multiple different networks. End-to-end data flows often pass through multiple networks. For example, a data forwarding network may include a wireless local area network, a local area network, a wide area network, and the like. Taking the application of a terminal accessing the cloud as an example, the network devices in the data forwarding network include an AP in a wireless local area network, an access switch, an aggregation switch, a core switch, and an end-side export gateway device 1, a router in a wide area network, and an export gateway device 2 on the cloud side. This embodiment takes the data forwarding network forwarding uplink data flow f as an example.

[0121] The terminal device is connected to the AP through the air interface, and the AP creates multiple queues for the associated terminal device. For example, the AP creates 8 queues for the terminal device, of which 4 queues are uplink queues and 4 queues are downlink queues. After receiving the data stream f, the AP determines that the queue for forwarding the data stream f is queue 1 among the multiple queues corresponding to the terminal device. The AP obtains the first network measurement data of queue 1 and sends a first message to the analysis device. The first message sent by the AP includes the first network measurement data of queue 1. The first message sent by the AP may also include an identifier of the terminal device to indicate the terminal device to which the first network measurement data of queue 1 belongs. The identifier of the terminal device may be a MAC address, an IP address, etc. of the terminal device. Optionally, the first message may also include an identifier of queue 1.

[0122] The AP may also send the association relationship between data flow f and queue 1. Alternatively, the AP may also identify the application to which data flow f belongs and may also send the association relationship between data flow f and the application. Alternatively, the AP may also send the association relationship between the application, data flow f, and queue 1.

[0123] The processing method of the access switch after receiving the data flow f can be involved in the relevant description of the network device 1 in Figure 2. The processing method of the aggregation switch and the core switch after receiving the data flow f can be involved in the relevant description of the network devices 2-4 in Figure 2, which will not be repeated here.

[0124] The access switch forwards data flow f in queue 2. The first message sent by the access switch to the analysis device includes network measurement data for queue 2. The access switch may also send the analysis device the association between data flow f and queue 2. For example, the aggregation switch and the core switch forward data flow f in the same queue as the access switch. The aggregation switch sends the network measurement data for queue 2 to the analysis device. The core switch also sends the network measurement data for queue 2 to the analysis device.

[0125] A wide area network (WAN) is typically a carrier network. When network measurement data from network devices in the WAN cannot be obtained, egress gateway device 1 can obtain network measurement data between egress network device 1 and egress network device 2 through dial-up testing. The link between egress network device 1 and egress network device 2 can be treated as a virtual link or as a virtual queue v. The network measurement data between egress network device 1 and egress network device 2 is the first network measurement data of virtual queue v.

[0126] The first message sent by the egress gateway device 1 may include the first network measurement data of the virtual queue v, and may also include the identifiers of the egress gateway device 1 and the egress gateway device 2.

[0127] The association information may be sent by egress gateway device 1 or egress gateway device 2. The association information sent by egress gateway device 1 indicates the association relationship between data flow f and virtual queue v. This association information, for example, includes the identifier of data flow f, the identifier of egress network device 1, and the identifier of egress network device 2. Virtual queue v may be defined by the identifiers of egress network device 1 and egress network device 2. The association information sent by egress gateway device 2 indicates the association relationship between data flow f and virtual queue v. This association information, for example, includes the identifier of data flow f and the identifier of egress network device 2.

[0128] After receiving network measurement data from the AP, access switch, aggregation switch, core switch, and end-side egress gateway device 1, the analysis device processes the network measurement data in a manner similar to the analysis device in Figure 2 . The difference is that the analysis device obtains network measurement data from the AP using the terminal device's identifier.

[0129] As shown in FIG4 , FIG4 is a flow chart of a network measurement method provided by the present application. This embodiment is based on the system architecture shown in FIG1 . This embodiment includes the following steps:

[0130] S401: A network device sends a first message to an analysis device, wherein the first message includes first network measurement data of a queue of the network device.

[0131] The first message may include first network measurement data for some queues of the network device. A partial queue may refer to a queue of some ports. A partial queue may also refer to a partial queue of a port. For example, the first network measurement data for the sending queues of all sending ports may be included, but the first network measurement data for the receiving queues of receiving ports may not be included. Alternatively, the first network measurement data for some sending queues of sending ports may be included. For example, when a controller or analyzer instructs a network device to measure a specified data flow, target application, or target application type, the first network measurement data for only the queues that forward the specified data flow may be sent to the analysis device, or the first network measurement data for only the queues that forward the data flow of the target application and target application type may be sent to the analysis device.

[0132] The first message may also include first network measurement data of all queues of the network device, that is, may include all sending queues and all receiving queues.

[0133] S402: The network device sends a second message to the analysis device, wherein the second message indicates a first association relationship between the data flow and the queue.

[0134] The network device identifies the data flow, determines the sending port for forwarding the data flow based on the address information of the data packet in the data flow, and determines the queue for forwarding the data flow based on the priority information in the data packet. Thus, the network device can obtain the first association relationship between the data flow and the queue.

[0135] Optionally, the network device may also send a third message to the analysis device indicating a second association between the data flow and the application to which the data flow belongs, so that the analysis device analyzes the network status from an application perspective. The second and third messages may be the same message or different messages, without limitation.

[0136] The network device may send the first association relationships corresponding to all data flows forwarded by the network device to the analysis device. The network device may also send the first association relationships corresponding to some data flows to the analysis device. For example, when the controller or analyzer instructs the network device to measure a specified data flow, target application, or target application type, it may only send the first association relationships corresponding to the specified data flow, or the first association relationships corresponding to data flows belonging to the target application or target application type, to the analysis device.

[0137] It should be noted that step S402 is optional and is indicated by a dashed line in FIG4 . For example, if the data forwarding network is measuring only one data flow, step S402 may not be required. Alternatively, if other network devices with the same local mapping policy have already sent the second message to the analysis device, some network devices may not send the second message to the analysis device. Alternatively, if the data flow associated with the network measurement data has already been indicated in the first message, the network device may not send the second message to the analysis device.

[0138] S403: The analysis device determines second network measurement data of the data flow according to the first network measurement data of the queue, or determines second network data of the data flow according to the first network data of the queue and the first association relationship.

[0139] In one possible implementation, the first message indicates the data flow associated with the first network measurement data. That is, the first message includes the first network measurement data and the flow identifier of the associated data flow. For a data flow to be analyzed (hereinafter referred to as a target data flow), the analysis device may obtain first network measurement data for multiple target queues that forward the target data flow based on the flow identifier of the target data flow. Furthermore, the analysis device obtains second network measurement data for the target data flow based on the first network measurement data of the multiple target queues.

[0140] In another possible implementation, if the network device only sends the first network measurement data of the target queue to which the target data flow is forwarded to the analysis device, the analysis device can directly obtain the first network measurement data of multiple target queues. Furthermore, the analysis device obtains the second network measurement data of the target data flow based on the first network measurement data of the multiple target queues.

[0141] In another possible implementation, if a network device sends first network measurement data for multiple queues to an analysis device, and the first message does not indicate a data flow associated with the first network measurement data, the analysis device may determine, based on a forwarding table entry, the network devices in the forwarding path of the target data flow and the target port on the network device that forwards the target data flow. Based on the first association between the target data flow and the queue, the analysis device may determine the target queue of the network device, where the target queue is the queue on the target port of the network device that forwards the target data flow. Furthermore, based on the determined network device, target port, and target queue, the analysis device may obtain the first network measurement data for the multiple target queues from the first message.

[0142] After obtaining the first network measurement data for multiple target queues, the analysis device processes the first network measurement data for the multiple target queues to obtain second network measurement data for the data flow. For example, the analysis device may sum the first network measurement data for the multiple target queues to obtain the second network measurement data for the target data flow. The analysis device may also compare the first network measurement data for the multiple target queues to obtain the second network measurement data for the data flow. This network measurement data may indicate the presence of an abnormal network device.

[0143] It should be noted that the multiple target queues may include a sending queue and a receiving queue. The analysis device may obtain the first network measurement data of the target queues of all network devices in the forwarding path of the target data flow, or may obtain the first network measurement data of the target queues of some network devices in the forwarding path of the target data flow. For example, when a data flow is transmitted across networks (as shown in the scenario of FIG3 ), there may be a situation where the network measurement data of the network devices in some networks cannot be obtained. In this case, the network measurement data of the path of the network forwarding the target data flow can be measured by dialing as the first network measurement data of the virtual target queue.

[0144] For the specific operations performed by the network device and the analysis device, as well as the related explanations, please refer to the relevant descriptions of Figures 1 to 3 above, so they will not be repeated here.

[0145] In this embodiment, the first network measurement data of a queue in a network device within a data forwarding network can be used to determine the second network measurement data of a data flow forwarded by the network device. This eliminates the need for periodic coloring of data packets, reducing network measurement complexity, lowering costs, and improving network measurement efficiency. Furthermore, since a queue can forward multiple data flows, multiple data flows forwarded through the same queue can share the first network measurement data of that queue to calculate the second network measurement data of the data flow. Since the number of data flows forwarded by a network device is often greater than the number of queues in the network device, the network device does not need to measure the network performance indicators of each data flow, thus reducing measurement costs.

[0146] Based on the same inventive concept, this application also provides the following device embodiment. As shown in Figure 5, Figure 5 is a schematic diagram of the structure of a device provided in an embodiment of this application. In this embodiment, device 500 includes a processing module 501 and a transceiver module 502. Device 500 can be used to implement the operations performed by the analysis device in Figure 4. Alternatively, device 500 can be used to implement the operations performed by the network device in Figure 4.

[0147] When apparatus 500 is used to implement the operations performed by the analysis device in FIG4 , apparatus 500 may be a hardware module (e.g., a chip) or a software module in the analysis device. Apparatus 500 may also be the analysis device. Processing module 501 is configured to obtain first network measurement data for multiple target queues, where the multiple target queues are queues that forward target data flows. Processing module 501 is configured to obtain second network measurement data for the target data flows based on the first network measurement data for the multiple target queues.

[0148] In one possible implementation, a transceiver module 502 is configured to receive first network measurement data of queues of multiple network devices, where the queues of the multiple network devices include multiple target queues. A processing module 501 is configured to obtain first network measurement data of multiple target queues from the first network measurement data of the queues of the multiple network devices.

[0149] In a possible implementation, the transceiver module 502 is configured to receive a first association relationship between a target data flow and a target queue. The processing module 501 is configured to obtain first network measurement data of multiple target queues from first network measurement data of queues of multiple network devices based on the first association relationship.

[0150] In a possible implementation, the transceiver module 502 is configured to receive a second association relationship, where the second association relationship indicates an association relationship between the target data flow and an application, where the application is the application to which the target data flow belongs.

[0151] In one possible implementation, processing module 501 is configured to obtain second network measurement data for multiple data streams, including a target data stream, and the multiple data streams belong to the same application. Processing module 501 is configured to display the second network measurement data for the multiple data streams of the application, for example, via a graphical user interface. And / or, processing module 501 is configured to display (for example, via a graphical user interface) third network measurement data for the application, the third network measurement data being obtained based on the second network measurement data for the multiple data streams.

[0152] In one possible implementation, the first network measurement data of any target queue includes a first delay and / or a first packet loss rate, and the second network measurement data includes a second delay and / or a second packet loss rate. The processing module 501 is used to add the first delays of multiple target queues to obtain the second delay; and / or add the packet loss rates of multiple target queues to obtain the second packet loss rate.

[0153] In one possible implementation, the first network measurement data includes the queue depth and sending rate of the target queue, and / or the first network measurement data includes the number of packet losses and the number of packets sent of the target queue, and the second network measurement data includes a second delay and / or a second packet loss rate. Processing module 501 is configured to obtain first delays and / or first packet loss rates for multiple target queues based on the first network measurement data of the multiple target queues, where the first delay is calculated based on the queue depth and the sending rate, and the first packet loss rate is calculated based on the number of packet losses and the number of packets sent. Processing module 501 is configured to add the first delays of the multiple target queues to obtain a second delay; and / or add the packet loss rates of the multiple target queues to obtain a second packet loss rate.

[0154] In one possible implementation, the processing module 501 is used to compare the first delays and / or first packet loss rates of multiple target queues to determine an abnormal network device among multiple network devices, where the abnormal network device is a network device corresponding to a target queue having the largest first delay and / or the largest first packet loss rate among the multiple target queues, or the abnormal network device is a network device corresponding to a target queue having a first delay greater than a delay threshold and / or a first packet loss rate greater than a packet loss rate threshold among the multiple target queues.

[0155] In one possible implementation, the transceiver module 502 is used to send control information, where the control information includes at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow. The flow identifier is used to indicate that measurement is to be performed on a target queue corresponding to the target data flow, the application identifier is used to indicate that measurement is to be performed on a queue that forwards data flows belonging to the target application, and the application type is used to indicate that measurement is to be performed on a queue that forwards data flows belonging to the target application type.

[0156] In one possible implementation, the transceiver module 502 is used to send control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes a target data flow, the data flow corresponding to the target application type includes a target data flow, the flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0157] When apparatus 500 is used to implement the operations performed by the network device in FIG4 , apparatus 500 may be a hardware module (e.g., a chip) or a software module in the network device. Apparatus 500 may also be a network device. Processing module 501 is configured to obtain first network measurement data for a target queue, where the target queue is a queue that forwards a target data flow. Transceiver module 502 is configured to transmit the first network measurement data.

[0158] In one possible implementation, the transceiver module 502 is used to send a first association relationship, where the first association relationship indicates the association relationship between the target data flow and the target queue; and / or the transceiver module 502 is used to send a second association relationship, where the second association relationship indicates the association relationship between the target data flow and the application, where the application is the application to which the target data flow belongs.

[0159] In one possible implementation, the transceiver module 502 is used to receive control information, where the control information includes at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type. The data flow corresponding to the target application includes a target data flow, and the data flow corresponding to the target application type includes a target data flow. The flow identifier is used to indicate that measurement is to be performed on a target queue corresponding to the target data flow, the application identifier is used to indicate that measurement is to be performed on a queue that forwards data flows belonging to the target application, and the application type is used to indicate that measurement is to be performed on a queue that forwards data flows belonging to the target application type.

[0160] In one possible implementation, the transceiver module 502 is used to receive control information, the control information including at least one of a flow identifier of a target data flow, an application identifier of a target application, and an application type identifier of a target application type, the data flow corresponding to the target application includes a target data flow, the data flow corresponding to the target application type includes a target data flow, the flow identifier indicates obtaining an association relationship between the target data flow and the target queue, the application identifier indicates obtaining an association relationship between the data flow belonging to the target application and the queue that forwards the data flow belonging to the target application, and the application type identifier indicates obtaining an association relationship between the data flow belonging to the target application type and the queue that forwards the data flow belonging to the target application type.

[0161] As shown in Figure 6, Figure 6 is a schematic diagram of the structure of a device provided in an embodiment of the present application. In this embodiment, device 600 can be the analysis device in Figure 4, such as a server, server cluster, computer, tablet computer, car computer, smartphone, or other device with computing power. Alternatively, the device can also be the network device in Figure 4, such as a switch, router, firewall, AP, or wireless controller.

[0162] The device 600 includes a bus 601 , a processor 602 , a communication interface 603 , and a memory 604 . The processor 602 , the memory 604 , and the communication interface 603 communicate with each other via the bus 601 .

[0163] Bus 601 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified as address buses, data buses, control buses, etc. For ease of illustration, FIG6 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0164] The processor 602 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0165] The memory 604 may include volatile memory, such as random access memory (RAM). The memory 604 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0166] The memory 604 may be used to store software codes related to the network measurement method, and the processor 602 may execute the steps of the network measurement method and may also schedule other units to implement corresponding functions.

[0167] It should be understood that the device 600 can be a centralized or distributed device, and the processor 602 in the device 600 can be a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0168] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the network measurement method flow of any of the above method embodiments is implemented.

[0169] Those skilled in the art will 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.

[0170] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the network measurement method flow of any of the above method embodiments is implemented.

[0171] Those skilled in the art will 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.

[0172] In the several embodiments provided in this 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 merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical or other forms.

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

[0174] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0175] 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, all or part of the technical solution of the present application 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 for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A network measurement method, characterized in that, The method includes: Obtaining first network measurement data of a plurality of target queues, where the plurality of target queues are queues for forwarding target data streams; Obtaining second network measurement data of the target data stream based on the first network measurement data of the plurality of target queues.

2. The method according to claim 1, wherein The method further includes: Receiving first network measurement data of queues of a plurality of network devices, where the queues of the plurality of network devices include the plurality of target queues; The obtaining of the first network measurement data of the plurality of target queues includes: Obtaining the first network measurement data of the plurality of target queues from the first network measurement data of the queues of the plurality of network devices.

3. The method according to claim 2, characterized in that, The method further includes: Receiving a first association relationship between the target data stream and the target queue; The obtaining of the first network measurement data of the plurality of target queues from the first network measurement data of the queues of the plurality of network devices includes: Obtaining the first network measurement data of the plurality of target queues from the first network measurement data of the queues of the plurality of network devices according to the first association relationship.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Receiving a second association relationship, where the second association relationship indicates an association relationship between the target data stream and an application, and the application is the application to which the target data stream belongs.

5. The method according to any one of claims 1 to 4, characterized in that The method further includes: Obtaining second network measurement data of a plurality of data streams, where the plurality of data streams include the target data stream, and the plurality of data streams belong to the same application; Displaying the second network measurement data of the plurality of data streams of the application through a user graphical interface; and / or Displaying third network measurement data of the application through the user graphical interface, where the third network measurement data is obtained based on the second network measurement data of the plurality of data streams.

6. The method according to any one of claims 1 to 5, characterized in that The first network measurement data of any target queue includes a first delay and / or a first packet loss rate, the second network measurement data includes a second delay and / or a second packet loss rate, and the obtaining of the second network measurement data of the target data stream based on the first network measurement data of the plurality of target queues includes: Adding the first delays of the plurality of target queues to obtain the second delay; and / or Adding the packet loss rates of the plurality of target queues to obtain the second packet loss rate.

7. The method according to any one of claims 1 to 5, characterized in that, The first network measurement data of any target queue includes the queue depth and transmission rate of the any target queue, and / or, the first network measurement data of any target queue includes the number of lost packets and the number of transmitted packets of the any target queue, the second network measurement data includes a second delay and / or a second packet loss rate, and the obtaining of the second network measurement data of the target data stream based on the first network measurement data of the plurality of target queues includes: Obtaining the first delay and / or the first packet loss rate of the plurality of target queues based on the first network measurement data of the plurality of target queues, where the first delay of any target queue is calculated based on the queue depth and transmission rate of the any target queue, and the first packet loss rate of any target queue is calculated based on the number of lost packets and the number of transmitted packets of the any target queue; Adding the first delays of the plurality of target queues to obtain the second delay; and / or Add the packet loss rates of the multiple target queues to obtain the second packet loss rate.

8. The method according to any one of claims 6 or 7, characterized in that, The method further includes: Compare the first latency and / or the first packet loss rate of the multiple target queues to determine the abnormal network device among the multiple network devices. The abnormal network device is the network device corresponding to the target queue with the maximum first latency and / or the maximum first packet loss rate among the multiple target queues, or the abnormal network device is the network device corresponding to the target queue whose first latency is greater than the latency threshold and / or the first packet loss rate is greater than the packet loss rate threshold among the multiple target queues.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Send control information, where the control information includes at least one of the flow identifier of the target data flow, the application identifier of the target application, and the application type identifier of the target application type. The data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow. The flow identifier is used to indicate measuring the target queue corresponding to the target data flow, the application identifier is used to indicate measuring the queue for forwarding the data flow belonging to the target application, and the application type is used to indicate measuring the queue for forwarding the data flow belonging to the target application type.

10. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Send control information, where the control information includes at least one of the flow identifier of the target data flow, the application identifier of the target application, and the application type identifier of the target application type. The data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow. The flow identifier indicates obtaining the association relationship between the target data flow and the target queue, the application identifier indicates obtaining the association relationship between the data flow belonging to the target application and the queue for forwarding the data flow belonging to the target application, and the application type identifier indicates obtaining the association relationship between the data flow belonging to the target application type and the queue for forwarding the data flow belonging to the target application type.

11. A network measurement method, characterized in that, The method includes: Obtain the first network measurement data of the target queue, where the target queue is the queue for forwarding the target data flow; Send the first network measurement data.

12. The method according to claim 11, wherein The method further includes: Send the first association relationship, where the first association relationship indicates the association relationship between the target data flow and the target queue; and / or Send the second association relationship, where the second association relationship indicates the association relationship between the target data flow and the application, and the application is the application to which the target data flow belongs.

13. The method according to claim 11 or 12, characterized in that The method further includes: Receive control information, where the control information includes at least one of a flow identifier of the target data flow, an application identifier of the target application, and an application type identifier of the target application type. The data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow. The flow identifier is used to indicate measurement of the target queue corresponding to the target data flow, the application identifier is used to indicate measurement of the queue for forwarding the data flow belonging to the target application, and the application type is used to indicate measurement of the queue for forwarding the data flow belonging to the target application type.

14. The method according to claim 11 or 12, characterized in that, The method further includes: Receive control information, where the control information includes at least one of a flow identifier of the target data flow, an application identifier of the target application, and an application type identifier of the target application type. The data flow corresponding to the target application includes the target data flow, and the data flow corresponding to the target application type includes the target data flow. The flow identifier indicates obtaining the association relationship between the target data flow and the target queue, the application identifier indicates obtaining the association relationship between the data flow belonging to the target application and the queue for forwarding the data flow belonging to the target application, and the application type identifier indicates obtaining the association relationship between the data flow belonging to the target application type and the queue for forwarding the data flow belonging to the target application type.

15. A device, characterized in that, The device includes a module for implementing the network measurement method according to any one of claims 1-10.

16. A device, characterized in that, The device includes a module for implementing the network measurement method according to any one of claims 11-14.

17. An apparatus, characterized in that, The device includes a processor and a memory. The processor is coupled to the memory, and the processor is configured to execute the network measurement method according to any one of claims 1-14 based on instructions stored in the memory.

18. A computer-readable storage medium, characterized in that, Includes instructions that, when the computer-readable storage medium runs on a computer, cause the computer to execute the network measurement method according to any one of claims 1-14.

Citation Information

Patent Citations

  • Data forwarding method and device

    CN114401227A

  • Message processing method and related device

    CN114513477A

  • Service quality detection method, message processing method and device

    CN114765585A

  • Packet loss data measurement method, system and related equipment

    CN115643191A

  • Data scheduling method and device, equipment and storage medium

    CN116647894A