Network measurement method and related equipment
By acquiring and calculating the measurement data of the network equipment queue, the problem of high efficiency and low network measurement cost is solved, and efficient and accurate network problem positioning and data flow forwarding efficiency are achieved.
Patent Information
- Application Number
- CN202410047242.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-11
AI Technical Summary
The existing network measurement technology is cost-effective and inefficient, affects the efficiency of data flow forwarding, and is difficult to accurately locate network problems.
By obtaining network measurement data of multiple target queues, calculating network measurement data of target data streams, avoiding staining of data packets or encapsulating additional message headers, and using indicators such as queue delay and packet loss rate to perform network measurements, reducing measurement complexity and cost.
提高了网络测量的效率和准确性,降低了网络设备的复杂度和成本,能够快速定位网络设备中的异常,减少对数据流转发的影响。
Smart Images

Figure CN120301792A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a network measurement method and related devices. Background Art
[0002] Currently, the scale of the network is developing rapidly, the types of services are increasing, the traffic bandwidth is increasing year by year, and the network management methods are 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 technologies is becoming stronger and stronger.
[0003] Currently, in order to achieve remote and refined network monitoring and measurement, and efficiently and accurately locate and solve network problems, flow detection technology can usually be used to measure the network. Flow detection requires network nodes to periodically perform coloring or de-coloring operations on service packets in the data stream. The implementation of network devices is complex and affects the forwarding efficiency of the data stream. Summary of the Invention
[0004] This application provides a network measurement method and related devices to solve the problems of high network measurement cost and low efficiency.
[0005] In a first aspect, a network measurement method is provided. This method can be applied to an analysis device. The analysis device can be a device with computing power such as a computer, a mobile phone, a laptop, a tablet, a server, etc. The method includes: obtaining first network measurement data of multiple target queues, where the multiple target queues are queues for forwarding a target data stream. Then, obtaining second network measurement data of the target data stream according to the first network measurement data of the multiple target queues. Optionally, when the target data stream is forwarded by a network device, the multiple target queues may include the sending queue and the receiving queue of the network device. The sending queue is a queue for the sending port to cache packets to be sent. The receiving queue is a queue for the receiving port to cache packets to be exchanged to the sending port. Optionally, when the target data stream is forwarded by multiple network devices, the multiple target queues include the sending queues of multiple network devices for sending the target data stream, or the multiple target queues may further include the receiving queues of multiple network devices for receiving the target data stream. By obtaining the second network measurement data of the target data stream through the first network measurement data of multiple target queues for forwarding the target data stream, thus, there is no need to perform operations such as coloring packets in the data stream and encapsulating additional packet headers, which does not affect the efficiency of the network device for forwarding the data stream and reduces the cost of network measurement. 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 and does not need to measure each data stream separately, which can reduce the measurement difficulty and complexity, and thus can further reduce the cost of network measurement.
[0006] In a possible implementation, the method further includes: receiving first network measurement data of queues of multiple network devices, where the queues of the multiple network devices include multiple target queues. Obtaining the first network measurement data of the multiple target queues includes: obtaining the first network measurement data of the multiple target queues from the first network measurement data of the queues of the multiple network devices. When a network device sends the first network measurement data of multiple queues to an analysis device, the analysis device needs to obtain the first network measurement data of the target queues for forwarding the target data stream from the first network measurement data of the multiple queues.
[0007] There are multiple methods for the analysis device to obtain the first network measurement data of the target queues from the first network measurement data of the 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 stream forwarded by the queue, that is, the network measurement data is directly associated with the data stream. The analysis device can then obtain the associated first network test data through the flow identifier of the target data stream.
[0008] Also, for example, the analysis device receives the first association relationship between the target data stream and the target queue. The analysis device obtains the first network measurement data of the multiple target queues from the first network measurement data of the queues of the multiple network devices according to the first association relationship. Thus, the analysis device can accurately obtain the first network measurement data of the target queues from the first network measurement data of the multiple queues. The first association relationship is, for example, carried in a second message, that is, the first association relationship is sent by sending the second message. For example, the second message includes the flow identifier of the target data stream and the queue identifier of the target queue to indicate the first association relationship between the target data stream and the target queue.
[0009] In a possible implementation, the method further includes: receiving a second association relationship, where the second association relationship indicates the association relationship between the target data stream and an application, and the application is the application to which the target data stream belongs. Thus, the analysis device can analyze the network status of the relevant traffic of the application in the network in terms of the application. 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 stream and the application identifier of the application to indicate the second association relationship between the target data stream and the application. The second message and the third message can be the same message or different messages.
[0010] In a possible implementation, obtain second network measurement data of multiple data streams, where the multiple data streams include a target data stream, and the multiple data streams belong to the same application; display the second network measurement data of the multiple data streams of the application through a user graphical interface; and / or display third network measurement data of the application through a user image interface, where the third network measurement data is obtained based on the second network measurement data of the multiple data streams. Thus, the state of the data streams transmitted in the network or the state of the relevant traffic of the application can be intuitively presented to the user.
[0011] In a possible implementation, the first network measurement data of any target queue includes a first latency and / or a first packet loss rate, and the second network measurement data includes a second latency 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 latencies of the multiple target queues to obtain the second latency; 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, the data packets in the same queue are sent according to the first-in, first-out principle. Therefore, the latency of the queue can be used as the latency of the data stream passing through the queue. A queue may forward multiple data streams, or in other words, a queue may cache the data packets of multiple data streams. When congestion occurs, the probability of data packets in the same queue being discarded is the same. Therefore, the packet loss rate of the queue can be approximately regarded as the packet loss rate of the data stream.
[0012] In a possible implementation, the first network measurement data includes the queue depth and transmission rate of the target queue, and / or the first network measurement data includes the number of lost packets and the number of sent packets of the target queue. The second network measurement data includes a second latency 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: obtaining the first latency and / or the first packet loss rate of the multiple target queues based on the first network measurement data of the multiple target queues, where the first latency is calculated based on the queue depth and the transmission rate, and the first packet loss rate is obtained based on the number of lost packets and the number of sent packets; adding the first latencies of the multiple target queues to obtain the second latency; and / or adding the packet loss rates of the multiple target queues to obtain the second packet loss rate.
[0013] In a possible implementation, the method further includes: comparing the first latency and / or the first packet loss rate of multiple target queues to determine an abnormal network device among multiple network devices, where the abnormal network device is the network device corresponding to the target queue with the largest first latency 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 a first latency greater than the latency threshold and / or a first packet loss rate greater than the packet loss rate threshold among the multiple target queues. By comparing the first latency or the first packet loss rate of multiple target queues, the larger latency and packet loss rate can be determined. Generally, the greater the latency and packet loss rate, the greater the possibility that the network device is abnormal. Therefore, the network device with the largest first latency or first packet loss rate is determined as the abnormal network device to locate the network device that may have a fault at a lower cost.
[0014] In a possible implementation, the method further includes: sending 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 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. The measurement of the data flow, application, or application type of interest can be controlled through the control information, which can reduce the measurement burden on the network device.
[0015] In a possible implementation, the method further includes: sending 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 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.
[0016] The second aspect provides a network measurement method. This 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 for forwarding a target data stream; and sending the first network measurement data. When the network device obtains the first network measurement data of the queue, there is no need to dye the data packets in the data stream or encapsulate additional packet headers to measure the state of the data stream. The network device has a simple implementation and low cost. Moreover, 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 one queue can be used to calculate the second network measurement data of multiple data streams.
[0017] In a possible implementation manner, the method further includes: sending a first association relationship, where the first association relationship indicates the association relationship between the target data stream and the target queue; and / or, sending a second association relationship, where the second association relationship indicates the association relationship between the target data stream and an application, and the application is the application to which the target data stream belongs.
[0018] In a possible implementation manner, the method further includes: receiving control information, where the control information includes at least one of a flow identifier of the target data stream, an application identifier of the target application, and an application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier is used to indicate measuring the target queue corresponding to the target data stream, the application identifier is used to indicate measuring the queue for forwarding the data stream belonging to the target application, and the application type is used to indicate measuring the queue for forwarding the data stream belonging to the target application type.
[0019] In a possible implementation manner, the method further includes: receiving control information, where the control information includes at least one of a flow identifier of the target data stream, an application identifier of the target application, and an application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier indicates obtaining the association relationship between the target data stream and the target queue, the application identifier indicates obtaining the association relationship between the data stream belonging to the target application and the queue for forwarding the data stream belonging to the target application, and the application type identifier indicates obtaining the association relationship between the data stream belonging to the target application type and the queue for forwarding the data stream belonging to the target application type.
[0020] A third aspect provides a device. The device is applied to an analysis device. The device may be a hardware module (such as a chip) or a software module in the analysis device. The device may also be the analysis device. The device includes a processing module and a transceiver module. Among them, the processing module is used to obtain first network measurement data of multiple target queues, and the multiple target queues are queues for forwarding target data streams. The processing module is used to obtain second network measurement data of the target data stream according to the first network measurement data of the multiple target queues.
[0021] In a possible implementation, the transceiver module is used to receive first network measurement data of queues of multiple network devices, and the queues of the multiple network devices include multiple target queues. The processing module is used 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.
[0022] In a possible implementation, the transceiver module is used to receive a first association relationship between a target data stream and a target queue. The processing module is used 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 according to the first association relationship.
[0023] In a possible implementation, the transceiver module is used to receive a second association relationship, and the second association relationship indicates an association relationship between a target data stream and an application, and the application is the application to which the target data stream belongs.
[0024] In a possible implementation, the processing module is used to obtain second network measurement data of multiple data streams, the multiple data streams include the target data stream, and the multiple data streams belong to the same application. The processing module is used to generate a user graphical interface, and the user graphical interface includes the second network measurement data of the multiple data streams of the application. And / or, the processing module is used to generate a user graphical interface, and the user graphical interface includes third network measurement data of the application, and the third network measurement data is obtained according to the second network measurement data of the multiple data streams.
[0025] In a 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 up the first delays of the multiple target queues to obtain the second delay; and / or add up the packet loss rates of the multiple target queues to obtain the second packet loss rate.
[0026] In a possible implementation, the first network measurement data includes the queue depth and transmission 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 the second latency and / or the second packet loss rate. The processing module is configured to obtain the first latency and / or the first packet loss rate of multiple target queues based on the first network measurement data of the multiple target queues. The first latency is calculated based on the queue depth and the transmission rate, and the first packet loss rate is obtained based on the number of packet losses and the number of packets sent. The processing module is configured to add up the first latencies of the multiple target queues to obtain the second latency; and / or add up the packet loss rates of the multiple target queues to obtain the second packet loss rate.
[0027] In a possible implementation, the processing module is configured to compare the first latency and / or the first packet loss rate of multiple target queues to determine the abnormal network devices among the multiple network devices. The abnormal network device is the network device corresponding to the target queue with the largest first latency 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 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.
[0028] In a possible implementation, the transceiver module is configured to 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 the measurement of the target queue corresponding to the target data flow, the application identifier is used to indicate the measurement of the queue for forwarding the data flow belonging to the target application, and the application type is used to indicate the measurement of the queue for forwarding the data flow belonging to the target application type.
[0029] In a possible implementation, the transceiver module is configured to 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.
[0030] The fourth aspect provides a device, which can be a hardware module (such as a chip) or a software module in a network device. The device can also be a network device. The device includes a processing module and a transceiver module. Among them, the processing module is used to obtain the first network measurement data of the target queue, and the target queue is the queue for forwarding the target data stream. The transceiver module is used to send the first network measurement data.
[0031] In a possible implementation manner, the transceiver module is used to send the first association relationship, where the first association relationship indicates the association relationship between the target data stream and the target queue; and / or, the transceiver module is used to send the second association relationship, where the second association relationship indicates the association relationship between the target data stream and the application, and the application is the application to which the target data stream belongs.
[0032] In a possible implementation manner, the transceiver module is used to receive control information, where the control information includes at least one of the flow identifier of the target data stream, the application identifier of the target application, and the application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier is used to indicate the measurement of the target queue corresponding to the target data stream, the application identifier is used to indicate the measurement of the queue for forwarding the data stream belonging to the target application, and the application type is used to indicate the measurement of the queue for forwarding the data stream belonging to the target application type.
[0033] In a possible implementation manner, the transceiver module is used to receive control information, where the control information includes at least one of the flow identifier of the target data stream, the application identifier of the target application, and the application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier indicates obtaining the association relationship between the target data stream and the target queue, the application identifier indicates obtaining the association relationship between the data stream belonging to the target application and the queue for forwarding the data stream belonging to the target application, and the application type identifier indicates obtaining the association relationship between the data stream belonging to the target application type and the queue for forwarding the data stream belonging to the target application type.
[0034] The fifth aspect provides a device. 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 in the first aspect or any possible implementation manner of the first aspect based on the instructions stored in the memory.
[0035] The sixth aspect provides a device. 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 in the second aspect or any possible implementation manner of the second aspect based on the instructions stored in the memory.
[0036] The seventh aspect provides a computer-readable storage medium. The computer-readable storage medium includes instructions that, when the computer-readable storage medium runs on a computer, cause the computer 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.
[0037] The eighth aspect provides a computer program product that, when running on a computing device, causes 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
[0038] Figure 1 is a schematic diagram of the architecture of a network system provided by an embodiment of the present application;
[0039] Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0040] Figure 3 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0041] Figure 4 is a schematic flowchart of a network measurement method provided by an embodiment of the present application;
[0042] Figure 5 is a schematic structural diagram of a device provided by an embodiment of the present application;
[0043] Figure 6 is a schematic structural diagram of a device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] The following will describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. In the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily limit being different. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.
[0045] The following introduces the related technologies involved in the embodiments of the present application:
[0046] 1. Quality of Service (QoS)
[0047] With the rapid development of network technology, the services in the Internet have become increasingly diversified. In addition to the traditional World Wide Web (WWW), Email, and File Transfer Protocol (FTP) applications, many new services have emerged on the Internet currently, such as Internet Protocol (IP) telephony, e-commerce, multimedia games, distance learning, telemedicine, videophone, video conferencing, video on demand, and online movies, etc.
[0048] With the popularization of the network and the diversification of services, the Internet traffic has increased sharply, which may cause network congestion, leading to an increase in forwarding delay. In severe cases, packet loss may occur, resulting in a decline in service quality or even unavailability. QoS technology is a technology used to solve problems such as network delay and congestion. To meet the requirements of users for different services with different service qualities, the network needs to allocate and schedule resources according to the user's requirements, and provide different QoS priorities for different packets: packets with strong real-time requirements and importance are processed preferentially; for ordinary packets with weak real-time requirements, a lower processing priority is provided, and they may even be discarded in severe network congestion. For example, a preset field is included in the packet to indicate the QoS priority of the packet, so that after the network device obtains the packet, it can allocate a queue for the packet or execute the corresponding discard policy according to the QoS priority of the packet. Specifically, the network device can cache the packet into the queue corresponding to the service level according to the QoS priority of the packet. In addition, the network device can also determine the discard priority of the packet according to the QoS priority of the packet.
[0049] 2. Queue
[0050] A queue, which can also be called a port queue, etc., is a linear list that allows input operations at one end and output operations at the other end. A transmission device usually includes one or more ports for data input / output. Each port can have multiple queues to record the processing order of the packets in the buffer, and each queue corresponds to a queue scheduling algorithm respectively. In the case of no congestion, the packets entering the buffer can be processed in time; when congestion occurs, the packets will be stored in the buffer of the device in the form of a queue waiting to be processed. At this time, the transmission device selects packets from each queue for processing according to the corresponding queue scheduling algorithm of the queue; in addition, in the case of a tendency of increasing congestion, the problem of network overload can also be solved by actively discarding the packets in the queue.
[0051] Among them, the queue scheduling algorithm refers to a scheduling algorithm used to determine the processing order of packets in different queues. Common queue scheduling algorithms include strict priority (SP), priority queueing (PQ), weighted fair queuing (WFQ), and low priority queueing (LPQ), etc.
[0052] Each port of general network devices such as switches or routers usually has 8 queues, which are, from the highest to the lowest priority: class selector (CS) 7, CS6, expedited forwarding (EF), assured forwarding (AF) 4, AF3, AF2, AF1, and best-effort (BE). Among them, queues with different priorities are used to store packets with different priorities. For example, CS7 and CS6 are default for protocol packets. EF is used to carry voice over Internet Protocol (VoIP) traffic or data streams of enterprise internal video conferences. Packets of voice services require low latency, low jitter, and low packet loss rate, and their importance is second only to protocol packets. AF4 is used to carry the signaling traffic of voice, that is, the protocol packets of VoIP services. AF3 can be used for services such as Telnet of remote devices. These services require appropriate bandwidth, but are very sensitive to network latency and jitter, and at the same time require completely reliable transmission without packet loss. AF2 can be used to carry the live broadcast traffic of enterprise internal Internet protocol television (IPTV), which can ensure the smoothness of online video services. Live broadcast services have strong real-time requirements, need to ensure continuity and large throughput, but allow small-scale packet loss. AF1 is used for ordinary data stream services within enterprises, such as E-Mail. Ordinary data has low requirements for factors such as real-time and jitter, as long as it can ensure lossless transmission. BE is used for best-effort services, for non-urgent and unimportant services, such as hypertext transfer protocol (HTTP) web browsing services.
[0053] 3. Priority mapping
[0054] Priority mapping is used to implement the conversion between the QoS priority carried by packets and the device's local priority (that is, the service level for differentiating packets within the device), and then the device provides differential QoS services according to the local priority.
[0055] After a packet carrying QoS priority arrives at the device, the external priority (such as 802.1p, differentiated services code point (DSCP)) is mapped to the local priority of the device. The device determines the queue into which the packet enters according to the local priority, and then performs traffic shaping, congestion avoidance, queue scheduling and other processing for the queue. When the packet leaves the device, the local priority is mapped back to the external priority, so as to ensure that when the packet arrives at the next device, the device can continue to provide differentiated services according to the priority field in the packet. That is to say, priority mapping is the basis for packet classification and the prerequisite for implementing services differentially.
[0056] Users can use different QoS priority fields in different networks according to network planning. For example, 802.1p priority is used in the layer 2 network, DSCP priority is used in the layer 3 network, and EXP priority is used in the multi-protocol label switching (MPLS) network. 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 within the MPLS label.
[0057] 4. Application Identification
[0058] Application identification is a mechanism for classifying traffic according to the application characteristics or protocol characteristics of the traffic, which can accurately identify various common application programs and protocol types in the network.
[0059] Different application programs 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 determines the application by matching the signature codes in the data packet. The characteristics of the protocol are not only reflected in a single packet. The characteristics of some protocol packets are distributed in multiple packets, and multiple packets need to be collected and analyzed to identify the protocol type. The system analyzes the service flow passing through the device, compares the analysis results with the signature library loaded on the device, and identifies the application program by matching the signature codes in the data packet. The characteristics can be three-layer characteristics such as the IP address, port number, protocol type, DSCP carried in the packet, or characteristics generated according to the domain name and IP address information in the Domain Name Service (DNS) response packet.
[0060] Currently, application recognition technologies based on application characteristics include intelligent deep packet inspection (DPI), deep flow inspection (DFI), and artificial intelligence (AI) recognition, etc.
[0061] To solve the problems of high cost and low efficiency existing in current network measurement technologies, the present application provides the following embodiments.
[0062] As Figure 1 shown, 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 devices can be access points (APs), wireless controllers, switches, routers, or firewall devices, etc. The network devices can be network devices implemented in hardware. The network devices can also be network devices implemented in software. For example, the functions of network devices such as switches, routers, or firewalls can be implemented on a general server through virtualization technology. The data forwarding network can be a wireless local area network, a wide area network (carrier network or enterprise self-built wide area network), a data center network, a campus network, an enterprise network, or a home network, etc. Or, the data forwarding network includes at least two of a wireless local area network, a local area network, and a wide area network, etc.
[0063] In this embodiment, the network device is used to collect the first network measurement data of the queue of the network device and send it to the analysis device. The queue of the network device includes the target queue for forwarding the data stream. The analysis device is used 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 the second network measurement data corresponding to the data stream according to the first network measurement data of the target queue.
[0064] Specifically, the network device is used to forward the data stream. Specifically, after receiving the data packet in the data stream, the network device classifies the data packet to determine the queue into which the data packet enters. For example, the data packet can carry a QoS priority, and the network device can perform priority mapping according to the QoS priority to determine the local priority of the data packet (that is, the service level for differentiating data packets inside the network device), so that the network device determines the queue into which the data packet enters according to the local priority corresponding to the data packet. The QoS priorities of different data packets in the same data stream are the same, 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.
[0065] The data stream described in this embodiment can be defined by a tuple, triple, quadruple, quintuple, or septuple, so that the network device can determine the data stream to which the data packet belongs according to the tuple, triple, quadruple, quintuple, or septuple information in the data packet. For example, a tuple includes a source IP address and a destination IP address. A triple includes a source IP address, a destination IP address, and a transport protocol. A quadruple includes a source IP address, a destination IP address, a source port address, and a destination port address. A quintuple includes a source IP address, a destination IP address, a source port address, a destination port address, and a transport protocol. A septuple includes a source IP address, a destination IP address, a protocol number, a source port, a destination port, a service type, and a port index. In another implementation, the data stream can also be defined by an application name combined with a tuple, triple, quadruple, quintuple, or septuple.
[0066] In this embodiment, the network device is further configured to obtain first network measurement data of the queues of the network device and send the first network measurement data to the analysis device. Generally, a network device includes multiple ports. For example, the network device includes at least one sending port and at least one receiving port. The receiving port is used to receive a data stream from a terminal device or a data stream forwarded by another network device. The sending port is used to forward the data stream to a terminal device or another network device. A sending port may include one or more sending queues, and the sending queue is used to cache data packets waiting to be switched to the sending port. A receiving port may include one or more receiving queues, and the receiving queue is used 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. Where K can be 2, 4, 8, 16, or 32, etc. In this embodiment, the queue is a general term for a sending queue and a receiving queue, that is, the queue may include a sending queue or a receiving queue.
[0067] A network device may obtain first network measurement data of one or more queues of the network device. In a possible implementation, the network device may obtain first network measurement data of one queue among multiple queues of the network device. For example, if the network device measures only one data stream, it may obtain only the first network measurement data of the queue forwarding the data stream. In another possible implementation, the network device may also obtain first network measurement data of some queues among all queues of the network device. For example, the network device may obtain first network measurement data of all sending queues. Or, the network device may obtain first network measurement data of some sending queues among all sending queues. The some sending queues may be the sending queues of some sending ports among all sending ports, or the some sending queues may be some sending queues among multiple sending queues of a sending port. Or, the network device may obtain first network measurement data of some sending queues among all sending queues, and obtain first network measurement data of all or some receiving queues. Or, the network device may obtain first network measurement data of all sending queues, and first network measurement data of some receiving queues. In yet another possible implementation, the network device may also obtain first network measurement data of all queues of the network device.
[0068] The first network measurement data of a queue may indicate the performance or status of the queue. In a possible implementation, the first network measurement data of the queue includes, for example, at least one of the first latency of the queue (the time that 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 sending rate, and / or, the number of lost packets and the number of sent packets, etc., so that the device can calculate the first latency based on the queue depth and the packet sending rate, and / or, calculate the first packet loss rate based on the number of lost packets and the number of sent packets. In another implementation, the first network measurement data includes, for example, the first latency of the queue, and / or, the number of lost packets and the number of sent packets, etc., where the number of lost packets and the number of sent packets are used to calculate the first packet loss rate. In another implementation, the first network measurement data includes, for example, queue depth and packet sending rate, and / or, the first packet loss rate, etc., where the queue depth and the packet sending rate are used to calculate the first latency of the queue.
[0069] Among them, the queue depth is the used cache in the cache corresponding to the queue, that is, the queue depth is the size of the data packets cached in the cache corresponding to the queue. The unit of the queue depth can be byte or bit. The size of the data packets cached in the cache corresponding to the queue may be different at different times. Therefore, the queue depth used to calculate the first delay can be the statistical value of the queue depths at different times within a preset time period, such as the average value, percentile value, etc. The packet sending rate can be the rate at which the queue actually sends data packets. For example, it is the number of data 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 the packet sending rate of the queue. For example, when the unit of the queue depth is byte, the first delay can be obtained by multiplying the queue depth by 8 and then dividing by the packet sending rate. When the unit of the queue depth is bit, the first delay can be obtained by dividing the queue depth by the packet sending rate. The number of lost packets is the number of data packets discarded cumulatively within a preset time period. The number of sent packets is the number of data packets sent cumulatively within a preset time period. The first packet loss rate can be obtained based on the number of lost packets and the number of sent packets. For example, the first packet loss rate = the number of lost packets / (the number of lost packets + the number of sent packets). Among them, the number of sent packets can be the number of data packets successfully sent by the forwarding device (not discarded or without errors), the number of lost packets can be the number of data packets with sending failures, and the number of lost packets 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 anomalies.
[0070] After the network device obtains the first network measurement data of the queues of the network device, it sends the first network measurement data of the queues to the analysis device. In a possible implementation manner, the network device can send the first network measurement data of all queues of the network device to the analysis device. In another possible implementation manner, the network device can also send the first network measurement data of some queues of the network device to the analysis device. For example, the network device can only send the first network measurement data of all sending queues. Also for example, the network device can only send the first network measurement data of the queues of some ports to the analysis device. Some ports can be some sending ports and / or some receiving ports. For example, some ports are the ports participating in forwarding the target data stream. Also for example, the network device can only send the first network measurement data of the target queues (including at least one of the target sending queue and the target receiving queue) corresponding to the specified data stream participating in forwarding to the analysis device.
[0071] The network device may periodically send the first network measurement data of the queue to the analysis device. The period for the network device to send the first network measurement data may be configured by default locally on the network device or configured by the analysis device. Alternatively, the analysis device may send a request message to the network device, where the request message is used to request the network device to send the first network measurement data of the queue, and the network device responds to the request message by sending the first network measurement data to the analysis device.
[0072] The network device may send the first network measurement data of the queue to the analysis device through a first message, that is, the first message includes the first network measurement data of the queue of the network device. The first message may further include indication information indicating the queue to which the first network measurement data belongs, so that the analysis device can determine which queue each received network measurement data belongs to. In a possible implementation, the first message includes a queue identifier, the queue identifier indicates a queue, and the first network measurement data of the queue corresponding to the queue identifier in the first message may be adjacent. In another possible implementation, the first message may include a bitmap, where one bit in the bitmap indicates a queue, and the bitmap may indicate whether the first message includes the first network measurement data of the corresponding queue. Exemplarily, if the value of the bitmap is 11010111, it 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 in the first message are arranged in order, the analysis device can determine the queue to which each first network measurement data belongs. Of course, the first message may also not include the indication information indicating the queue to which the first network measurement data belongs. For example, the first message includes the first network measurement data of all queues of a port, the length of each first network measurement data is the same, and the first network measurement data of all queues are arranged in order. The analysis device can determine the queue to which each first network measurement data belongs. Exemplarily, if the first network measurement data corresponding to queues 1-8 are d1-d8 respectively and are arranged in the order of [d1, d2,..., d8] in the first message, the analysis device can determine the first network measurement data corresponding to each queue according to the length of the first network measurement data.
[0073] Optionally, the first message may further include the 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 the IP address of the network device or the Media Access Control (MAC) address. Alternatively, the device identifier may also be the number of the network device. Optionally, the first message may further include the port identifier of the network device, and the port identifier indicates the port to which one or more first network measurement data belong. The port identifier may be the IP address configured for the port or the number of the port.
[0074] Optionally, the first message may further include a flow identifier of the data stream. The flow identifier indicates a data stream. The flow identifier may be adjacent to the first network measurement data of the queue that forwards the data stream indicated by the flow identifier, so as to associate the first network measurement data of the queue with the data stream forwarded through the queue. When the queue forwards multiple data streams, the first network measurement data of the queue is associated with multiple data streams. That is, the first network measurement data can be directly associated with the data stream. Thus, when the analysis device analyzes the network measurement data of the data stream, it can use the flow identifier of the data stream as an index to obtain the first network measurement data associated with the data stream. The first network measurement data associated with the data stream is the first network measurement data of the queue that forwards the data stream.
[0075] Optionally, the network device may further send a second message to the analysis device. The second message may include, for example, the flow identifier of the data stream and the queue identifier of the queue that forwards the data stream, so as to indicate the first association relationship between the data stream and the queue. Thus, when the analysis device analyzes the network measurement data of the data stream, it can use the flow identifier of the data stream as an index to obtain the queue identifier associated with the data stream, and then use the queue identifier as an index to obtain the first network measurement data corresponding to the queue. Since the network device can determine the queue for forwarding the data stream according to the QoS priority carried in the data packet in the data stream, the network device can obtain the first association relationship between the data stream and the queue that forwards the data stream. 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.
[0076] When the 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 at the application dimension. Optionally, the network device can also identify the application corresponding to the data stream to obtain the 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 includes, for example, the stream 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, the data stream and the 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 a possible scenario, the network device can obtain the stream identifier of the data stream according to the first data packet of the data stream, while the network device may need to analyze multiple data packets of the data stream to determine the application to which the data stream belongs, then the second message and the third message can be sent separately. In another possible implementation manner, the second association relationship between the data stream and the application can also be sent by the terminal device or the application server to the analysis device.
[0077] The network device can send the association relationship (the first association relationship / the second association relationship / the third association relationship) corresponding to all the data streams forwarded by the network device to the analysis device. Alternatively, the network device can send the association relationship corresponding to the specified data stream to the analysis device. Alternatively, the network device can send the association relationship corresponding to the data stream of the target application to the analysis device. Alternatively, the network device can send the association relationship corresponding to the data stream of the target application type to the analysis device. The specified data stream / target application / target application type can be the default configuration of the network device, and can also be specified by the analysis device / control device through control information, which is not limited here.
[0078] Among the multiple network devices of the data forwarding network, all the network devices in the data forwarding network can send the second message / third message to the analysis device, or some network devices can send the second message / third message to the analysis device. Several situations where some network devices in the data forwarding network send the second message / third message to the analysis device are described below.
[0079] In a possible scenario, if the priority mapping policies configured for each network device among multiple network devices in the same network (such as a data center network, campus network, enterprise network, home network, or operator network, etc.) are the same, then based on the same priority mapping policy, the sending queues into which the same data stream enters in different network devices of this network are the same. That is, different network devices in the same network are used to forward the same data stream queue (here it means the queue type is the same). Therefore, only some network devices in this network can obtain the first association relationship and send the above-mentioned second message to the analysis device to reduce communication overhead. If the application recognition policies configured for multiple network devices in the same network are the same, then based on the same application recognition policy, the applications recognized by the same data stream in different network devices of this network are also the same. Therefore, only some network devices in this 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, some network devices in this network can be one network device in this network, or multiple network devices among all network devices in this network. It can be the border network device in this network that sends the second / third message. A border network device is a network device in a network that is used to forward traffic entering or leaving this network. For example, an AP or a wireless controller in a wireless local area network (WLAN) can be a border network device. Or an access switch, a core switch, or an egress gateway device (router) in a local area network, etc. can be a border network device. Or a provider edge (PE) router in an operator network can be a border network device. It should be noted that in this scenario, it is possible for some network devices in the network to send the second / third message to the analysis device, but it is not necessary for some network devices in the network to send the second / third message to the analysis device in this scenario. In this scenario, it is also possible for all network devices in this network to send the second / third message to the analysis device, and there is no restriction here.
[0080] Of course, in some cases, network devices in the data forwarding network may also not send the second message to the analysis device. For example, when the data stream is a specified data stream and the network devices on the forwarding path of this data stream only send the first network measurement data of the queue for forwarding this data stream, the network device may not send this second message to the analysis device. Or, when the data stream associated with the first network measurement data has been indicated in the first message, the network device may not send this second message to the analysis device.
[0081] 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 stream according to the forwarding table entries. The forwarding path includes one or more network devices for forwarding the data stream. Furthermore, the analysis device can obtain the first network measurement data of the queue for forwarding the data stream from the first network measurement data of the network devices in the forwarding path. For example, when the forwarding table entries are learned by the network device itself and the analysis device does not have the forwarding table entries of the network device, the network device can send the forwarding table entries of the network device to the analysis device. The forwarding table entries include, for example, the MAC table or the routing table, etc.
[0082] Of course, in some cases, the network device may not send the forwarding table entries to the analysis device. When the analysis device already knows the forwarding table entries of the network device, 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 the software-defined network are configured by the analysis device, and the analysis device already knows the forwarding table entries of the network device. Or, when the data stream associated with the first network measurement data is indicated in the first message, the analysis device can query the associated first network measurement data according to the flow identifier of the data stream and may not need to determine the forwarding path of the data stream first. Therefore, the network device may not send the forwarding table entries to the analysis device.
[0083] The analysis device determines the second network measurement data of one or more data streams according to the first network measurement data of the queues of one or more network devices. When analyzing the network measurement data of a certain data stream (hereinafter referred to as the target data stream), the analysis device needs to obtain the first network measurement data of the queue (hereinafter referred to as the target queue) for forwarding the data stream from the first network measurement data of multiple received queues, and then can obtain the second network measurement data of the data stream.
[0084] There are various methods for the analysis device to obtain the network measurement data of the target queue from the first network measurement data of multiple queues. In a possible implementation manner, 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 according to the first association between the target data stream and the target queue. Specifically, the data packets in the same data stream are received or sent at 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 according to the forwarding table entries of multiple network devices, and the target port among the multiple ports of the network devices in the forwarding path for forwarding the target data stream, 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 according to the first association relationship between the target data stream and the target queue. Then the analysis device can obtain the first network measurement data of the multiple target queues for forwarding the data stream.
[0085] In another possible implementation, if the first message indicates the data flow associated with the first network measurement data, the analysis device may query, using the flow identifier of the target data flow as an index, multiple first network measurement data associated with the target data flow, and the multiple first network measurement data associated with the target data flow are the first network measurement data of multiple target queues.
[0086] The analysis device may add up the first network measurement data of multiple target queues to obtain the second network measurement data of the data flow. For example, if the first network measurement data of a target queue includes the first delay of the target queue, then the second delay of the target data flow is obtained by adding up the first delays of multiple target queues. Also for example, if the first network measurement data of a target queue includes the first packet loss rate of the target queue, then the second packet loss rate of the target data flow is obtained by adding up the first packet loss rates of multiple target queues. Or, when the first network measurement data includes the queue depth and packet sending rate of the target queue, the analysis device calculates the first delay of the target queue based on the queue depth and packet sending rate, and then the analysis device adds up the first delays of multiple target queues to obtain the second delay of the target data flow. Or, when the first network measurement data includes the number of lost packets and the number of sent packets of the target queue, the analysis device calculates the first packet loss rate of the target queue based on the number of lost packets and the number of sent packets, and then the analysis device adds up the first packet loss rates of multiple target queues to obtain the second packet loss rate of the target data flow.
[0087] The analysis device may also analyze, based on the first network measurement data of multiple target queues, the network devices with anomalies in the forwarding path. 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, has an anomaly, or the target queues with the first delay / first packet loss rate in the top K positions have anomalies. 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 the anomalous target queues, and further determine that the network device corresponding to the anomalous target queue is the network device with an anomaly. For example, the analysis device may compare the first delay of each target queue with a delay threshold to determine that the target queue with a first delay greater than the delay threshold is an anomalous target queue, and the network device corresponding to the anomalous target queue has an anomaly. Or the analysis device compares the first packet loss rate of each target queue with a packet loss rate threshold to determine that the target queue with a first packet loss rate greater than the packet loss rate threshold is an anomalous target queue, and the network device corresponding to the anomalous target queue has an anomaly. Or the analysis device may compare the number of lost packets of each target queue with a packet loss threshold, and the target queue with the number of lost packets greater than the packet loss threshold is an anomalous target queue, and the network device corresponding to the anomalous target queue has an anomaly.
[0088] Optionally, after determining an abnormal network device, the analysis device may issue an alarm, which may include at least one of the information such as the abnormal network device, data stream, target port, and target queue. The analysis device can screen the network devices that may be abnormal in the network based on the network measurement data at the queue level, so that the operation and maintenance personnel can further locate the root cause of the abnormal network device.
[0089] After obtaining the network measurement data of the data stream, the analysis device can display the second network measurement data of the data stream on the user graphical interface. Alternatively, the second network measurement data of multiple data streams under the same application can be displayed on the user graphical interface. Alternatively, the second network measurement data of multiple data streams of the same terminal device can be displayed on the user graphical interface. The abnormal network device can also be identified on the user graphical interface. For example, the abnormal network device can be identified in the form of a dialog box, different colors, prompt symbols, etc.
[0090] In this embodiment, since the measurement is performed on the queues in the network device, operations such as marking data packets and adding packet headers are not required, which can improve the forwarding efficiency, have relatively low requirements for device capabilities, can reduce the network measurement cost, and do not occupy the bandwidth of the communication link, thus ensuring the bandwidth utilization rate of the communication link. Further, the same queue may be used to store and transmit multiple data streams. Therefore, obtaining the measurement data of a queue once can obtain the network measurement data of multiple data streams, which can greatly reduce the measurement cost compared with per-flow measurement. Moreover, the probabilities of the packets of different data streams in the same queue being discarded or delayed are close. Therefore, obtaining the measurement data of the data stream based on the queue measurement data can achieve a certain accuracy, which is convenient for quickly obtaining the measurement data of the data stream.
[0091] 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 turn on or off the network measurement function, or instructing to perform network measurement on the traffic of a specified data stream / application / application type. The control device can send control information to the network device, and the control information is used to instruct the network measurement behavior of the network device.
[0092] In a possible implementation, the control information may instruct the network device to enable the network measurement function. Enabling the network measurement function means starting to measure at least one network performance metric of the queues in the network device, such as latency, packet loss rate, etc., to obtain the network measurement data corresponding to the queues. In response to this control information, the network device may measure all the data flows being forwarded, that is, obtain the first network measurement data of the queues corresponding to all the data flows. Alternatively, the network device may also obtain the first network measurement data of all the queues of the network device. Optionally, the network device may also obtain the association relationship between each data flow and the queue used to forward the data flow. Of course, it may also be that each network device in the data forwarding network obtains the association relationship between each data flow it forwards and the queue used to forward the data flow. Then, the network device sends the first network measurement data of the queues of the network device to the analysis device. When the network device obtains the association relationship between the data flow and the queue, the network device may also send this association relationship to the analysis device. The network device that obtains and sends the association relationship between the data flow and the queue may be the boundary network device in the data forwarding network. Of course, non-boundary network devices in the data forwarding network may also obtain and send the association relationship between the data flow and the queue, and there is no restriction here.
[0093] Optionally, the network device may also identify the application to which each data flow belongs. The network device may determine the application to which the data flow belongs through the port information of the data packets in the data flow, or the characteristics of the data packets, etc. One application may correspond to one or more data flows. For example, when the same application includes data of different types or priorities, the application may correspond to multiple data flows, so that the data forwarding network can perform differential services on data flows of different types or priorities. Exemplarily, a certain application may include at least one of a data flow for carrying voice calls, a data flow for carrying video conferences, a data flow for carrying live broadcast traffic, a data flow for carrying email data, and a data flow for carrying HTTP web pages, etc. The network device may send the association relationship between the application to which the data flow belongs and the target queue for forwarding the data flow 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 relationship between the data flow, the target queue, and the application may be the boundary network device in the data forwarding network. Of course, non-boundary network devices in the data forwarding network may also obtain and send the association relationship between the data flow, the target queue, and the application, and there is no restriction here.
[0094] In another possible implementation, the control information may instruct the network device to measure a specified data flow. The control information includes, for example, the flow identifier of the specified data flow. The flow identifier is, for example, the above-mentioned tuple, triple, quadruple, quintuple, or septuple, etc. After the network device identifies the specified data flow according to the flow identifier in the control information, it can determine the target port and target queue for forwarding the specified data flow. When the network device measures the specified data flow, it may mean that the network device only measures the target queue to obtain the first network measurement data of the target queue. When the network device measures the specified data flow, it may also mean that the network device measures the network measurement data of multiple queues (such as all the sending queues or all queues of the network device) including the target queue to obtain the first network measurement data of the multiple queues, where the multiple queues include the target queue, and obtains the association relationship between the specified data flow and the target queue. When the specified data flow indicated by the control information includes only one specified data flow, or the network device is not a border network device, the network device may send the first network measurement data of the target queue to the analysis device without sending the association relationship between the specified data flow and the target queue to the analysis device. When the specified data flow indicated by the control information includes multiple specified data flows, the network device may send the first network measurement data of the target queues corresponding to the multiple specified data flows to the analysis device, as well as the association relationship between each specified data flow and the target queue for forwarding the specified data flow. Alternatively, when the specified data flow indicated by the control information includes multiple specified data flows, the network device may send the first network measurement data of all the sending queues or all queues of the network device to the analysis device, as well as the association relationship between each specified data flow and the target queue for forwarding the specified data flow.
[0095] In another possible implementation, the control information may instruct the network device to measure a target application. Measuring the target application may be to measure the queue of the data stream forwarding the target application and only send the network measurement data of the queue of the data stream forwarding the target application to the analysis device. Alternatively, measuring the target application may also mean obtaining and sending the first association relationship between the data stream corresponding to the target application and the queue forwarding the data stream corresponding to the target application, and obtaining and sending the network measurement data of multiple queues including the queue of the data stream forwarding the target application. The control information includes, for example, the application identifier of the target application. The application identifier may indicate an application, such as WeChat, QQ, Douyin, Huawei Cloud Meeting, Huawei Video, or Huawei Music, etc. One application may correspond to one or more data streams. For example, QQ includes functions such as video calls, voice calls, text communications, and email, etc., and different functions often correspond to different data streams. The priorities of different data streams may also be different. For example, the priorities of video calls and voice calls may be higher than that of emails. Therefore, different data streams of the same application may be forwarded through different queues in the network device. The network device may determine the application to which the data packet belongs according to the port information in the data packet. The network device may also identify the application to which the data packet belongs through application recognition technologies such as DFI, DPI, or AI. The network device identifies that the data stream belongs to the target application and obtains the target queue corresponding to the data stream. The network device may measure the first network measurement data of the target queue or measure the first network measurement data of multiple queues including the target queue of the network device. The network device may 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 may also send the first association relationship between the data stream and the target queue to the analysis device. Alternatively, when the control information indicates measuring multiple target applications, the network device may send the second association relationship between the target application and the data stream to the analysis device. When the control information indicates measuring one target application, the network device may send the second association relationship to the analysis device or may not send the second association relationship to the analysis device, and there is no limitation here.
[0096] The analysis device can obtain one or more data streams corresponding to an application. The analysis device can sum up the second network measurement data of all the data streams of an application to obtain the third network measurement data at the application granularity. The third network measurement data can reflect the state of the relevant traffic of the application as a whole in the data forwarding network. Alternatively, for the same application, the analysis device can also determine one or more data streams corresponding to the application for different terminal devices according to the second association relationship and the source IP address / destination IP address of the data stream. When there are multiple data streams corresponding to the application for a terminal device, the analysis device can add up the first network measurement data of the multiple data streams corresponding to the application for the terminal device to obtain the fourth network measurement data. The fourth network measurement data can reflect the state of the relevant traffic of an application 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 streams of each terminal device. For example, for WeChat, the analysis device can determine the network measurement data of data streams such as WeChat video and WeChat chat of each terminal device.
[0097] In yet another possible implementation, the control information can instruct the network device to measure the target application type. Measuring the target application type can be to measure the queue of data streams forwarding the target application type and only send the network measurement data of the queue of data streams forwarding the target application type to the analysis device. Alternatively, measuring the target application type can also mean obtaining and sending the first association relationship between the data stream corresponding to the target application type and the queue forwarding the data stream corresponding to the target application type, and obtaining and sending the network measurement data of multiple queues including the queue of data streams forwarding the target application type. The control information includes, for example, the identifier of the target application type. The target application type indicates a category 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 page applications, etc. The target application type can include one or more applications. Exemplarily, when the target application type is a conference application, it can include Huawei Cloud Meeting, Tencent Meeting, DingTalk, etc. The network device can identify whether the data stream belongs to an application in the target application type. When the data stream belongs to an application in the target application type, it can obtain the first network measurement data of the queue forwarding the data stream, and can also obtain the first association relationship between the data stream and the queue forwarding the data stream, or obtain the third association relationship between the application type to which the data stream belongs and the data stream. The network device can send the first network measurement data of the queue of data streams of applications in the target application type to the analysis device. Optionally, the network device can also send the above-mentioned third association relationship to the analysis device.
[0098] The analysis device can obtain one or more data streams corresponding to an application type. The analysis device can sum up the second network measurement data of all the data streams of an application type to obtain the fifth network measurement data at the application type granularity. The fifth network measurement data can reflect the state of the relevant traffic of this application type as a whole in the data forwarding network. Alternatively, for the same application type, the analysis device can also determine one or more data streams corresponding to different terminal devices and this application type according to the second association relationship and the source IP address / destination IP address of the data stream. When there are multiple data streams corresponding to a terminal device and this application type, the analysis device can add up the first network measurement data of the multiple data streams corresponding to this terminal device and this application type to obtain the sixth network measurement data. The sixth network measurement data can reflect the state of the relevant traffic of an application type in the data forwarding network at the terminal device granularity. Alternatively, for an application, the analysis device can obtain the network measurement data of different specific applications. For example, for meeting applications, the analysis device can obtain the network measurement data of Huawei Cloud Meeting, Tencent Meeting, etc. Further, the analysis device can also obtain the network measurement data of different specific applications of a specified / each terminal device.
[0099] In the above text, the network device identifies the application to which the data stream belongs and sends the association relationship between the application and the data stream to the analysis device. In another implementation, the association relationship between the application and the data stream can also be sent to the analysis device by other devices, without the network device identifying and sending the application to which the data stream belongs. For example, the source device and the destination device of the data stream can send the association relationship between the application and the data stream 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.
[0100] 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 in a timely manner and perform analysis, ensuring the timeliness and accuracy of the second network measurement data of the data stream, and being able to detect anomalies and give alarms in a timely manner when there are anomalies in the network devices in the data forwarding network.
[0101] It should be noted that the control device is an optional device. The control device and the analysis device can be the same device or different devices. The operations performed by the above control device can also be performed by the analysis device.
[0102] In this embodiment, multiple network devices in the data forwarding network collect the first network measurement data of the queues and send the first network measurement data of the queues to the analysis device, so that the analysis device can further obtain the first network measurement data of the queues of the forwarded data stream to obtain the second network measurement data of the data stream. Since the data stream is forwarded through the queue and the data packets in the same queue are sent according to the first-in-first-out principle, the delay of the queue can be used as the delay of the data stream passing through the queue. A queue may forward multiple data streams, or in other words, a queue may cache the data packets of multiple data streams. When congestion occurs, the probability of different data stream packets in the same queue being discarded is close. Therefore, the packet loss rate of the queue can be approximately regarded as the packet loss rate of the data stream. In this embodiment, the network device does not need to perform the operation of encapsulating additional packet headers on the data packets in the data stream, which can ensure the data forwarding efficiency, does not need to occupy additional bandwidth resources, and can reduce the complexity of network device implementation, thereby reducing the cost of network devices. Moreover, since one queue can forward multiple data streams, multiple data streams forwarded through the same queue can share the first network measurement data of the queue to calculate the second network measurement data of the data stream. The number of data streams forwarded by the 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 stream, which can reduce the measurement cost.
[0103] To make the solution provided by this application easier to understand, the solution provided by this application will be described below in combination with a specific scenario.
[0104] As Figure 2 shown, Figure 2 is a schematic diagram of an application scenario provided by this application. It can be understood that Figure 2 the network topology and the number of network devices in Figure 2 are only for illustration and should not be construed as a limitation to this application. Figure 2 The data forwarding network shown
[0105] 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, etc.
[0106] After receiving the data stream s, the network device 1 identifies the data stream s, determines the sending port 1 for sending the data stream according to the destination address of the data stream and the forwarding table entry, and the network device 1 is directly connected to the network device 2 through the sending port 1. The network device 1 further determines the queue 1 for sending the data stream according to the priority information carried in the data packets in the data stream s. It should be noted that the queue 1 refers to one of the N queues of the sending port 1, and it is not limited that the queue 1 is the queue with the highest priority or the lowest priority. Among them, N can be 4, 6, 8, 16, 32, 64, 128, etc., and the number of queues configured for a port is subject to the actual situation and is not limited this time. In this embodiment, N is taken as 8 for illustration. The network device 1 measures the queue 1 of the sending port 1 to obtain the first network measurement data of the queue 1. The network device 1 sends a first message to the analysis device. The first message sent by the network device 1 includes the first network measurement data of the queue 1. The first message may further include the device identifier of the network device 1 so that the analysis device can confirm which network device collected the network measurement data. Since a network device usually includes multiple sending ports and each sending port includes multiple queues, the first message may further include the identifier of the sending port 1 so that the analysis device can confirm which sending port of the network device 1 the queue 1 belongs to. The network measurement data sent by the network device 1 may only include the first network measurement data of the queue 1 of the port 1. The network measurement data sent by the network device 1 may also include the first network measurement data of multiple queues of the port 1, including the first network measurement data of the queue 1. The first message may further include the identifier of the queue 1 to indicate the queue corresponding to the network measurement data. Of course, the first message may not include the identifier of the queue 1 either. For example, when the data forwarding network only measures the data stream s, the first message may not include the identifier of the queue 1. Or when the network measurement data sent by the network device 1 includes the first network measurement data of all 8 queues of the sending port 1, the first network measurement data of the 8 queues may be arranged in order, and the length of the first network measurement data of each queue is the same. The analysis device can determine the network measurement data corresponding to each queue according to the length of the network measurement data.
[0107] Optionally, in the first message sent by the network device 1, in addition to including the first network measurement data of the queue 1, it may further include the flow identifier of the data stream s. The first network measurement data of the queue 1 is adjacent to the flow identifier of the data stream s, or the first network measurement data of the queue 1 corresponds to the flow identifier of the data stream s, so that the analysis device can determine that the first network measurement data of the queue 1 is associated with the data stream s. When analyzing the second network measurement data of the data stream s, the analysis device can query the first network measurement data of the queue 1 according to the flow identifier of the data stream s.
[0108] Optionally, when the network device 1 also forwards other data flows in addition to the data flow s, the network device 1 may also send a second message to the analysis device. The second message indicates the first association information between the data flow s and the queue 1. The first association information includes the identifier of the queue 1 and the flow identifier of the data flow s, to indicate the association relationship between the queue 1 and the data flow s. Thus, the analysis device can obtain the first network measurement data of the queue 1 according to the association relationship between the queue 1 and the data flow s.
[0109] The network device 1 can also identify the application a to which the data flow s belongs. The network device 1 can also send a third message to the analysis device. The third message indicates the second association information between the data flow s and the application a to which the data flow s belongs. The second association information includes, for example, the flow identifier of the data flow s and the application identifier of the application a, to indicate the association relationship between the data flow s and the application a. Thus, the analysis device can analyze the network status corresponding to the application a in the data forwarding network.
[0110] After receiving the data flow s forwarded by the network device 1, the network device 2 determines the sending port 2 (sending port) for sending the data flow according to the destination address of the data flow and the forwarding table. The network device 2 is directly connected to the network device 3 through the sending port 2. The network device 2 further determines the queue for sending the data flow according to the priority information carried in the data packets in the data flow s. When the network device 1 and the network device 2 adopt the same priority mapping, the queues for forwarding the data flow s in the network device 1 and the network device 2 are the same (the sending ports are not necessarily the same), and both are the queue 1. It should be noted that the queues being the same means that the types of the queues are the same. For example, the queues for forwarding the data flow s in the network device 1 and the network device 2 are both EF, AF2 or AF1, etc. The network device 1 measures the queue 1 of the sending port 2 to obtain the first network measurement data of the queue 1. The network device 2 sends a first message to the analysis device. The first message sent by the network device 2 may include the first network measurement data of all the queues of the port 2. And, since the first association relationship between the data flow s and the queue 1 in the network device 1 is the same as the first association relationship between the data flow s and the queue 1 in the network device 2, the network device 2 does not need to send a second message indicating the association relationship between the data flow s and the queue 1 of the sending port 2 to the analysis device. The analysis device can use the first association relationship between the data flow s and the queue 1 in the second message from the network device 1 as the first association relationship between the data flow s and the queue 1 in the network device 2. Of course, if the network device 1 and the network device 2 adopt different priority mappings, the queues for forwarding the data flow s in the network device 2 may be different from those in the network device 1. The network device 2 can send the first message and the second message in a manner similar to that of the network device 1. This embodiment is described by taking the network devices 1-4 adopting the same priority mapping as an example, that is, the queues for forwarding the data flow s in the network devices 1-4 are the same.
[0111] The way network device 3 and network device 4 measure data stream s is similar to that of network device 2, so it will not be elaborated here. The queue for network device 3 to forward data stream s is queue 1 of sending port 3, and the queue for network device 4 to forward data stream s is queue 1 of sending port 4.
[0112] In a possible implementation, the analysis device determines the forwarding path of data stream s as network device 1 → network device 2 → network device 3 → network device 4 according to forwarding table entries such as the routing table, flow table or MAC table, and the sending ports for network devices 1 - 4 to forward data stream s are sending port 1 - sending port 4. The analysis device determines that the queues for network devices 1 - 4 to forward data stream s are queue 1 according to the association relationship between data stream s and queue 1. The analysis device obtains the first network measurement data of queue 1 of sending port 1 of network device 1, the first network measurement data of queue 1 of sending port 2 of network device 2, the first network measurement data of queue 1 of sending port 3 of network device 3, and the first network measurement data of queue 1 of sending port 4 of network device 4 according to the forwarding path, sending port and queue for forwarding data stream s.
[0113] In another possible implementation, the first messages sent by network devices 1 - 4 all indicate that the first network - side data of queue 1 is associated with data stream s. Then the analysis device can 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 according to the flow identifier of data stream s. In this implementation, the analysis device does not need to determine the forwarding path according to the forwarding table entries, nor does it need to obtain the first network measurement data of queue 1 according to the second association relationship.
[0114] The analysis device can obtain the second network measurement data of data stream s based on these network measurement data. For example, when the network measurement data includes the first delay, the analysis device adds the first delays of queue 1 of the corresponding sending ports of network devices 1 - 4 as the second delay of data stream s in the data forwarding network. When the network data includes the first packet loss rate, the analysis device adds the first packet loss rates of queue 1 of the corresponding sending ports of network devices 1 - 4 as the second packet loss rate of data stream s in the data forwarding network. That is, the first network measurement data of multiple queues for forwarding data stream s is used as the second network measurement data of data stream s.
[0115] The analysis device can also perform network anomaly analysis based on network measurement data. For example, the analysis device compares the first network measurement data of queue 1 of the corresponding sending ports of network devices 1 - 4. If it is determined that the first delay or the first packet loss rate of network device 3 is the largest, it can be considered that there is an anomaly in network device 3. Or the analysis device respectively compares the first network measurement data of queue 1 of the corresponding sending ports of network devices 1 - 4 with a threshold. If the first packet loss rate is greater than the packet loss rate threshold, or the first delay is greater than the delay threshold, it can be considered that the corresponding network device has an anomaly.
[0116] In another implementation, in addition to measuring the first network measurement data of the sending queue of the sending port, the network device can also measure the first network measurement data of the receiving queue of the receiving port. For example, when the rate at which the network device receives data packets is greater than the switching rate of the network device, the data packets can queue in the receiving queue of the receiving port. There is also a queuing delay when the data packets queue in the receiving queue, and there may be packet loss. Therefore, the network device can measure the first network measurement data of the receiving queue. Generally, the number of receiving queues of one receiving port is 1. Of course, the number of receiving queues of one receiving port may also be multiple. In this embodiment, it is described by taking one receiving port corresponding to one receiving queue as an example.
[0117] Network device 1 receives data stream s through receiving port 1, and network device 1 obtains the first network measurement data of the receiving queue of receiving port 1. In the first message sent by the network device to the analysis device, it also includes the first network measurement data of this receiving queue and the identifier of receiving port 1. Similarly, network devices 2 - 4 respectively obtain the first network measurement data of the receiving queues of the receiving ports for receiving data stream s, and send the first network measurement data of the receiving queues to the analysis device.
[0118] The analysis device can then add the first network measurement data of the receiving queues of network devices 1 - 4 and the first network measurement data of the corresponding sending queues (queue 1 of the sending port) of network devices 1 - 4 to obtain the second network measurement data of data stream s. The analysis device can also calculate the sum of the first network measurement data of the sending queue and the first network measurement data of the receiving queue of each network device respectively as the network measurement data of data stream s for the network device, and perform comparisons (comparisons between network devices or with a threshold) to determine the network device with anomalies.
[0119] As Figure 3 shown, Figure 3 is a schematic diagram of a network system provided by this application. It can be understood that Figure 3 the network topology and the number of network devices in Figure 3The network system shown includes an analysis device and a data forwarding network. Figure 3 The data forwarding network shown is a composite network, that is, the data forwarding network includes multiple different networks. The end-to-end data stream often passes through the forwarding of multiple networks. For example, the data forwarding network can include a wireless local area network, a local area network, a wide area network, etc. Taking the example of a terminal accessing an application in the cloud, the network devices in the data forwarding network include an AP in the wireless local area network, an access switch, an aggregation switch, a core switch, and an egress gateway device 1 on the terminal side, a router in the wide area network, and an egress gateway device 2 on the cloud side. This embodiment takes the data forwarding network forwarding the upstream data stream f as an example.
[0120] The terminal device is connected to the AP through the air interface, and the AP creates multiple queues for the associated terminal devices. For example, the AP creates 8 queues for the terminal device, where 4 queues are upstream queues and 4 queues are downstream 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 the 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 the MAC address of the terminal device, or the IP address, etc. Optionally, the first message may also include the identifier of queue 1.
[0121] The AP may also send the association relationship between the data stream f and queue 1. Or, the AP may also identify the application to which the data stream f belongs, and the AP may also send the association relationship between the data stream f and the application. Or, the AP may also send the association relationship between the application, the data stream f, and queue 1.
[0122] The processing method of the access switch after receiving the data stream f can refer to Figure 2 the relevant description of network device 1 in Figure 2 and the processing methods of the aggregation switch and the core switch after receiving the data stream f can refer to
[0123] The queue for the access switch to forward the data stream f is queue 2. The first message sent by the access switch to the analysis device includes the network measurement data of queue 2. The access switch may also send the association relationship between the data stream f and queue 2 to the analysis device. Taking the example that the aggregation switch and the core switch forward the data stream f through the same queue as the access switch. The aggregation switch sends the network measurement data of queue 2 to the analysis device. The core switch sends the network measurement data of queue 2 to the analysis device.
[0124] A wide area network is generally an operator network. When network measurement data of network devices in the wide area network cannot be obtained, the egress gateway device 1 can obtain the network measurement data between the egress network device 1 and the egress network device 2 through probing. The link between the egress network device 1 and the egress network device 2 can be regarded as a virtual link, or can be regarded as a virtual queue v. The network measurement data between the egress network device 1 and the egress network device 2 is the first network measurement data of the virtual queue v.
[0125] In the first message sent by the egress gateway device 1, it can include the first network measurement data of the virtual queue v, and can also include the identifiers of the egress gateway device 1 and the egress gateway device 2.
[0126] The association information can be sent by the egress gateway device 1 or the egress gateway device 2. The association information sent by the egress gateway device 1 indicates the association relationship between the data flow f and the virtual queue v. The association information includes, for example, the identifier of the data flow f, the identifier of the egress network device 1, and the identifier of the egress network device 2. The virtual queue v can be defined by the identifier of the egress network device 1 and the identifier of the egress network device 2. The association information sent by the egress gateway device 2 indicates the association relationship between the data flow f and the virtual queue v. The association information includes, for example, the identifier of the data flow f and the identifier of the egress network device 2.
[0127] After the analysis device receives the network measurement data of the AP, access switch, aggregation switch, core switch, and the egress gateway device 1 on the end side, the processing method of the network measurement data is similar to Figure 2 the way the analysis device in processes the network measurement data. The difference is that for the network measurement data from the AP, the analysis device obtains it through the identifier of the terminal device.
[0128] As Figure 4 shown, Figure 4 is a schematic flowchart of a network measurement method provided by this application. This embodiment is based on Figure 1 the system architecture shown. This embodiment includes the following steps:
[0129] S401: The network device sends a first message to the analysis device. The first message includes the first network measurement data of the queue of the network device.
[0130] The first message may include first network measurement data of a partial queue of a network device. The partial queue may refer to the queues of partial ports. The partial queue may also refer to the partial queues of a port. For example, the first network measurement data may include the transmission queues of all transmission ports, but not the first network measurement data such as the reception queues of reception ports. Or, the first network measurement data may include the first network measurement data of the partial transmission queues of a transmission port. For example, when a controller or an analyzer instructs a network device to measure a specified data stream, a target application, or a target application type, the network device may send only the first network measurement data of the queue for forwarding the specified data stream to the analysis device, or only the first network measurement data of the queues of the data streams of the target application and the target application type to the analysis device.
[0131] The first message may also include first network measurement data of all queues of the network device. That is, it may include all transmission queues and all reception queues.
[0132] S402: The network device sends a second message to the analysis device. The second message indicates a first association relationship between a data stream and a queue.
[0133] The network device identifies a data stream, determines a transmission port for forwarding the data stream according to the address information of the data packet in the data stream, and determines a queue for forwarding the data stream according to the priority information in the data packet. Thus, the network device can obtain a first association relationship between the data stream and the queue.
[0134] Optionally, the network device may also send a third message indicating a second association relationship between the data stream and the application to which the data stream belongs to the analysis device, so that the analysis device can analyze the network status in the application dimension. The second message and the third message may be the same message or different messages, which is not limited here.
[0135] The network device may send the first association relationships corresponding to all data streams forwarded by the network device to the analysis device. The network device may also send the first association relationships corresponding to partial data streams to the analysis device. For example, when a controller or an analyzer instructs a network device to measure a specified data stream, a target application, or a target application type, the network device may send only the first association relationship corresponding to the specified data stream, or the first association relationship corresponding to the data streams belonging to the target application or the target application type to the analysis device.
[0136] It should be noted that S402 is an optional step. Figure 4It is shown by a dashed line. For example, when the data forwarding network measures only one data stream, S402 may not need to be executed. Or, when other network devices with the same local mapping policy have sent a second message to the analysis device, some network devices may not send the second message to the analysis device. Or, when the data stream associated with the network measurement data has been indicated in the first message, the network device may not send the second message to the analysis device.
[0137] S403: The analysis device determines the second network measurement data of the data stream according to the first network measurement data of the queue, or determines the second network data of the data stream according to the first network data of the queue and the first association relationship.
[0138] In a possible implementation manner, the data stream associated with the first network measurement data is indicated in the first message, that is, the first message includes the first network measurement data and the flow identifier of the associated data stream. For a data stream to be analyzed (hereinafter referred to as the target data stream), the analysis device may obtain the first network measurement data of multiple target queues that forward the target data stream according to the flow identifier of the target data stream. Furthermore, the analysis device obtains the second network measurement data of the target data stream according to the first network measurement data of the multiple target queues.
[0139] In another possible implementation manner, the network device only sends the first network measurement data of the target queue that forwards the target data stream to the analysis device, then the analysis device can directly obtain the first network measurement data of the multiple target queues. Furthermore, the analysis device obtains the second network measurement data of the target data stream according to the first network measurement data of the multiple target queues.
[0140] In yet another possible implementation manner, the network device sends the first network measurement data of multiple queues to the analysis device, and the first message does not indicate the data stream associated with the first network measurement data. Then the analysis device can determine the network devices in the forwarding path of the target data stream and the target ports in the network devices that forward the target data stream according to the forwarding table entry. The analysis device can determine the target queue of the network device according to the first association relationship between the target data stream and the queue, and the target queue is the queue that forwards the target data stream among the target ports of the network device. Furthermore, the analysis device can obtain the first network measurement data of multiple target queues from the first message according to the determined network devices, target ports, and target queues.
[0141] After the analysis device obtains the first network measurement data of multiple target queues, it processes the first network measurement data of the multiple target queues to obtain the second network measurement data of the data stream. For example, the analysis device can sum up the first network measurement data of the multiple target queues to obtain the second network measurement data of the target data stream. The analysis device can also compare the first network measurement data of the multiple target queues to obtain the second network measurement data of the data stream, and this network measurement data can indicate a network device with anomalies.
[0142] It should be noted that the multiple target queues can include a sending queue and can also include a receiving queue. The analysis device can obtain the first network measurement data of the target queues of all network devices in the forwarding path of the target data stream, or can obtain the first network measurement data of the target queues of some network devices in the forwarding path of the target data stream. For example, when the data stream is transmitted across the network (such as Figure 3 the scenario shown), there may be a situation where the network measurement data of network devices in some networks cannot be obtained. In this case, the network measurement data of the path for the network to forward the target data stream can be measured through probing, and used as the first network measurement data of the virtual target queue.
[0143] For the specific operations performed by the network device and the analysis device, as well as the relevant explanations, reference can be made to the relevant descriptions above Figures 1-3 and will not be elaborated here.
[0144] In this embodiment, through the first network measurement data of the queues of network devices in the data forwarding network, the second network measurement data of the data stream forwarded on the network device can be determined. Thus, there is no need to perform processing such as periodic coloring on data packets, reducing the complexity of network measurement, reducing costs, and improving network measurement efficiency. And since one queue can forward multiple data streams, then multiple data streams forwarded through the same queue can share the first network measurement data of this queue to calculate the second network measurement data of the data stream. The number of data streams forwarded by a network device is often greater than the number of queues in the network device, and the network device does not need to measure the network performance indicators of each data stream, which can reduce the measurement cost.
[0145] Based on the same inventive concept, the present application also provides the following device embodiments. As Figure 5 shown, Figure 5 is a schematic structural diagram of a device provided in an embodiment of the present application. In this embodiment, the device 500 includes a processing module 501 and a transceiver module 502. This device 500 can be used to implement Figure 4 the operations performed by the analysis device in Figure 4 Or, this device 500 can be used to implement
[0146] When the device 500 is used to implement Figure 4 the operations performed by the analysis device in Figure 4 , the device 500 can be a hardware module (such as a chip) or a software module in the analysis device. The device 500 can also be the analysis device. The processing module 501 is configured to obtain first network measurement data of a plurality of target queues, where the plurality of target queues are queues for forwarding target data streams. The processing module 501 is configured to obtain second network measurement data of the target data stream according to the first network measurement data of the plurality of target queues.
[0147] In a possible implementation, the transceiver module 502 is configured to receive first network measurement data of queues of a plurality of network devices, and the queues of the plurality of network devices include a plurality of target queues. The processing module 501 is configured to obtain 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.
[0148] In a possible implementation, the transceiver module 502 is configured to receive a first association relationship between a target data stream and a target queue. The processing module 501 is configured to obtain 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.
[0149] 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 a target data stream and an application, and the application is the application to which the target data stream belongs.
[0150] In a possible implementation, the processing module 501 is configured to obtain 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. The processing module 501 is configured to display the second network measurement data of the plurality of data streams of the application, for example, by displaying through a user graphical interface. And / or, the processing module 501 is configured to display (for example, by displaying through a user graphical interface) third network measurement data of the application, where the third network measurement data is obtained according to the second network measurement data of the plurality of data streams.
[0151] In a possible implementation, 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 processing module 501 is configured to add the first delays of the plurality of target queues to obtain the second delay; and / or add the packet loss rates of the plurality of target queues to obtain the second packet loss rate.
[0152] In a possible implementation, the first network measurement data includes the queue depth and transmission rate of a 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. The processing module 501 is configured to obtain the first delay and / or the first packet loss rate of multiple target queues according to the first network measurement data of the multiple target queues. The first delay is calculated according to the queue depth and the transmission rate, and the first packet loss rate is obtained according to the number of packet losses and the number of packets sent. The processing module 501 is configured to add up the first delays of the multiple target queues to obtain a second delay; and / or add up the packet loss rates of the multiple target queues to obtain a second packet loss rate.
[0153] In a possible implementation, the processing module 501 is configured to compare the first delays and / or the first packet loss rates of the multiple target queues to determine abnormal network devices among the multiple network devices. 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 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.
[0154] In a possible implementation, the transceiver module 502 is configured 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 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.
[0155] In a possible implementation, the transceiver module 502 is configured 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 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.
[0156] When the apparatus 500 is used to implement Figure 4When performing operations of a network device, the apparatus 500 may be a hardware module (such as a chip) or a software module in the network device. The apparatus 500 may also be a network device. The processing module 501 is configured to obtain first network measurement data of a target queue, where the target queue is a queue for forwarding a target data stream. The transceiver module 502 is configured to send the first network measurement data.
[0157] In a possible implementation, the transceiver module 502 is configured to send a first association relationship, where the first association relationship indicates the association relationship between the target data stream and the target queue; and / or, the transceiver module 502 is configured to send a second association relationship, where the second association relationship indicates the association relationship between the target data stream and an application, and the application is the application to which the target data stream belongs.
[0158] In a possible implementation, the transceiver module 502 is configured to receive control information, where the control information includes at least one of a flow identifier of the target data stream, an application identifier of the target application, and an application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier is used to indicate measurement of the target queue corresponding to the target data stream, the application identifier is used to indicate measurement of the queue for forwarding the data stream belonging to the target application, and the application type is used to indicate measurement of the queue for forwarding the data stream belonging to the target application type.
[0159] In a possible implementation, the transceiver module 502 is configured to receive control information, where the control information includes at least one of a flow identifier of the target data stream, an application identifier of the target application, and an application type identifier of the target application type. The data stream corresponding to the target application includes the target data stream, and the data stream corresponding to the target application type includes the target data stream. The flow identifier indicates obtaining the association relationship between the target data stream and the target queue, the application identifier indicates obtaining the association relationship between the data stream belonging to the target application and the queue for forwarding the data stream belonging to the target application, and the application type identifier indicates obtaining the association relationship between the data stream belonging to the target application type and the queue for forwarding the data stream belonging to the target application type.
[0160] As Figure 6 shown, Figure 6 is a schematic structural diagram of a device provided by an embodiment of the present application. In this embodiment, the device 600 may be Figure 4 an analysis device in, for example, a server, a server cluster, a computer, a tablet computer, a car computer, a smart phone, or other devices with computing power. Or, the device may also be Figure 4 a network device in, for example, a switch, a router, a firewall, an AP, or a wireless controller.
[0161] Device 600 includes a bus 601, a processor 602, a communication interface 603, and a memory 604. Communication occurs among the processor 602, the memory 604, and the communication interface 603 via the bus 601.
[0162] The bus 601 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. Buses can be classified into address buses, data buses, control buses, etc. For ease of representation, Figure 6 only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0163] The processor 602 can 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), etc.
[0164] The memory 604 can include volatile memory, such as random access memory (RAM). The memory 604 can also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0165] Among them, the memory 604 can be used to store software code related to the network measurement method, and the processor 602 can execute the steps of the network measurement method or schedule other units to implement the corresponding functions.
[0166] 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 the function of executing instructions, such as a CPU, a DSP, etc., or a hardware system without the function of executing instructions, such as an ASIC, an FPGA, etc., or a combination of the above hardware systems without the function of executing instructions and the hardware systems with the function of executing instructions.
[0167] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, it implements the network measurement method flow of any one of the above method embodiments.
[0168] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0169] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, it implements the network measurement method flow of any one of the above method embodiments.
[0170] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0171] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, 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 displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in an electrical or other form.
[0172] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0174] 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. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
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 according to the first network measurement data of the plurality of target queues.
2. The method according to claim 1, characterized in that, 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 according to 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 according to 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 according to 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 according to the first network measurement data of the plurality of target queues, where the first delay of any target queue is calculated according to the queue depth and transmission rate of the any target queue, and the first packet loss rate of any target queue is calculated according to 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 an 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 with the first latency greater than the latency threshold and / or the first packet loss rate 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 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 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 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.
11. A network measurement method, characterized in that, The method includes: Obtain first network measurement data of a target queue, where the target queue is a queue for forwarding a target data flow; Send the first network measurement data.
12. The method according to claim 11, wherein The method further includes: 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 Send a second association relationship, where the second association relationship indicates the association relationship between the target data flow and an 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 apparatus includes a module for implementing the network measurement method according to any one of claims 1-10.
16. A device, characterized in that, The apparatus includes a module for implementing the network measurement method according to any one of claims 11-14.
17. A device, 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
Cited By
Private network dial test task congestion self-recovery method and device, and related medium
CN121310207A