Packet loss information determination method and device and storage medium
By assigning tag values to service messages instead of adding message headers, network elements can accurately analyze packet loss rates, solving the problems of high network overhead and hardware requirements in existing technologies, and achieving efficient packet loss rate analysis and fault device identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies, when analyzing packet loss rates of network elements, increase network overhead by adding packet headers, have high hardware requirements, low applicability, and cannot perform accurate analysis without increasing network overhead and maintenance costs.
Instead of adding headers or modifying fields in the message, network elements determine packet loss information based on the number of tag values when receiving and sending data streams by assigning tag values to service messages.
It enables accurate analysis of packet loss rate of network element devices without increasing network overhead and operation and maintenance costs, improves compatibility and robustness, reduces the identification problems of terminal devices, and improves the efficiency of problem investigation and the reliability of fault device switching.
Smart Images

Figure CN121664707A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method, apparatus and storage medium for determining packet loss information. Background Technology
[0002] Network elements play a crucial role in networks. Each network element contains numerous components and modules; a failure in any of these components or modules can lead to silent packet loss, posing a potential risk to network communication. To analyze the packet loss rate of network elements, we can first mark service packets by adding headers, and then perform flow-based detection on these marked service packets to determine the packet loss rate of the network element.
[0003] However, adding a header increases the length of service packets, thus incurring additional network overhead. Therefore, accurately analyzing packet loss rates of network elements without increasing network overhead is a pressing issue. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for determining packet loss information, which can accurately analyze the packet loss rate of network elements without increasing network overhead.
[0005] To achieve the above objectives, the embodiments of this application provide the following technical solutions:
[0006] Firstly, a method for determining packet loss information is provided. This method can be executed by a network element device; or it can be executed by a module applied in the network element device, such as a chip, chip system, or circuit; or it can be implemented by a logic module or software that can realize all or part of the functions of the network element device, without limitation. For ease of description, the following explanation uses execution by a network element device as an example.
[0007] The method includes: receiving a first data stream through the ingress port of a network element device, assigning a tag value to the service packets in the first data stream, sending a second data stream through the egress port of the network device in response to the first data stream, and determining packet loss information of the network element device based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream.
[0008] Through the above technical solution, each network element device on the transmission path can accurately determine the packet loss situation by assigning a tag value to the service packets it receives and comparing the number of service packets with corresponding tag values in its own input and output data streams. Furthermore, in this method, tag values are assigned to service packets, rather than adding a header to the service packet or modifying the value of the target packet field in the service packet to a preset tag value. Therefore, the phenomenon of terminal devices being unable to recognize the service packet, as seen in related technologies, is avoided, and network overhead and network operation and maintenance costs are not increased. In addition, the method of assigning tag values to service packets has low hardware requirements for network elements, effectively improving the compatibility and robustness of the packet loss information determination method.
[0009] In one optional implementation, assigning a tag value to a service message in the first data stream includes: generating description information for each service message in the first data stream, adding a tag value to the description information of the service message to obtain description information carrying the tag value, and storing the description information carrying the tag value.
[0010] In the above technical solution, network elements can assign tag values to service packets in the first data stream by adding tag values to the description information of the service packets. That is, network elements can use internal tagging to mark service packets without adding new headers or modifying the original packets. Therefore, there is no need to restore the service packets, meaning there will be no situation where the service side cannot recognize the service packet, leading to service interruption, and no additional network overhead.
[0011] In one optional implementation, assigning a tag value to a service message in the first data stream may include: periodically assigning a tag value to the service message in the first data stream. Specifically, the tag values assigned to the service messages in the first data stream in two adjacent periods are different.
[0012] Through the above technical solution, network element devices can periodically assign tag values to service packets in the first data stream, which can expand the compatibility of this solution.
[0013] In one optional implementation, determining packet loss information of a network element device based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream includes: for each period, determining packet loss information of the network element device within that period based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream.
[0014] Through the above technical solution, network elements can periodically determine packet loss information, so that subsequent staff can quickly locate the time period in which packet loss occurred based on the packet loss information of each period of the network element, and analyze the service packets in that time period without having to analyze the whole, which can effectively improve the efficiency of problem investigation.
[0015] In one alternative implementation, the packet loss information includes: the number of lost packets and / or the packet loss rate.
[0016] The above further clarifies the packet loss information, namely, that the packet loss information can be the number of packets lost or the packet loss rate, which can further expand the compatibility of this application and improve the feasibility of this solution.
[0017] In an optional implementation, the method further includes: determining the cause of packet loss in the network element device according to a preset packet loss cause when packet loss occurs in the network element device.
[0018] Using the above method, network elements can automatically determine the cause of packet loss after detecting it, without requiring manual verification by staff. This not only avoids wasting human resources but also effectively improves the efficiency of analyzing the causes of packet loss.
[0019] In one optional implementation, the preset packet loss reason includes at least one of the following:
[0020] The forwarding chip of the network element device contains packet loss records.
[0021] The physical and / or logical state of the network element's interface is abnormal.
[0022] The forwarding table entries of the network element device are abnormal.
[0023] The data in the control plane entries of the network element is inconsistent with the data in the forwarding plane entries.
[0024] Network element devices are experiencing congestion.
[0025] The first data stream contains service packets that match the denial rules in the access control list (ACL) of the network element device.
[0026] The above provides a variety of preset reasons for packet loss, which can further expand the compatibility of this application and improve the feasibility of this solution.
[0027] In an optional implementation, the method further includes storing packet loss information of the network element and the reason for packet loss in the network element.
[0028] After network elements store their own packet loss information and the reasons for packet loss, staff can easily check the reasons for packet loss without having to manually analyze them, thus saving manpower.
[0029] In one optional implementation, the method further includes: sending to the network management device the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream.
[0030] After sending the number of service packets with corresponding tagged values in the first data stream and the number of service packets with corresponding tagged values in the second data stream to the network management device, the network management device can determine the faulty device or faulty link based on the number of service packets with corresponding tagged values in the first data stream and the number of service packets with corresponding tagged values in the second data stream, providing reference information for subsequent switching of the faulty device or faulty link.
[0031] In an optional implementation, the method further includes: receiving device fault information sent by the faulty device, and switching the faulty device in response to the device fault information. The faulty device refers to the network element device that experienced packet loss.
[0032] Through the above technical solutions, network element devices can switch over faulty devices, which can avoid data loss and other problems caused by the failure of equipment failure to be detected in time, and ensure the continuity of services.
[0033] In an optional implementation, the method further includes: detecting a communication path with a neighboring device, the neighboring device being a device adjacent to the network element device, and switching the communication path in the event of a communication path failure.
[0034] Through the above technical solutions, network element devices can switch communication paths in the event of a communication path failure, which can avoid data loss and other problems caused by the failure of the path failure not being detected in time, and further ensure the continuity of services.
[0035] In one optional implementation, the network element device is the first network element device, and the method further includes: modifying the preset fields of the service packets in the first data stream to preset values.
[0036] In one optional implementation, the network element device is the last network element device, and the method further includes: restoring the preset fields of the service packets in the second data stream.
[0037] By modifying the preset fields of the service packets in the first data stream to preset values through the above technical solution, it is equivalent to establishing a unified identifier for the service packets in the first data stream. This enables each network element device to quickly identify the service packets in the first data stream, thereby effectively improving the efficiency of each network element device in determining its own packet loss information.
[0038] Secondly, a fault-switching method is provided. This method can be executed by a network management device; or it can be executed by a module applied in the network management device, such as a chip, chip system, or circuit; or it can be implemented by a logic module or software that can realize all or part of the functions of the network management device, without limitation. For ease of description, the following explanation uses execution by a network management device as an example.
[0039] The method includes: receiving the number of service packets with corresponding tagged values in the target data stream received by each network element device, and the number of service packets with corresponding tagged values in the target data stream sent by itself; determining the fault path and / or fault device that has experienced packet loss during the forwarding of the target data stream based on the number of service packets with corresponding tagged values in the target data stream received by each network element device and the number of service packets with corresponding tagged values in the target data stream sent by itself; and switching the fault path and / or fault device.
[0040] Through the above technical solutions, network management equipment can switch faulty paths and / or faulty devices, which can avoid data loss and other problems caused by the failure of equipment failure to be detected in time, and ensure business continuity.
[0041] In one optional implementation, when determining a faulty device that experiences packet loss during the forwarding of the target data stream, the method may include: for each network element device, if the number of service packets with corresponding tag values in the target data stream received by the network element device is inconsistent with the number of service packets with corresponding tag values in the target data stream sent by the network element device, the network element device is determined to be a faulty device.
[0042] In one optional implementation, determining a fault path where packet loss occurs during the forwarding of a target data stream may include: for each network element, if the number of service packets with corresponding tagged values in the target data stream sent by the network element is inconsistent with the number of service packets with corresponding tagged values in the target data stream received by the next-hop network element, the transmission path between the network element and its next-hop network element is determined as a fault path. If the number of service packets with corresponding tagged values in the target data stream received by the network element is inconsistent with the number of service packets with corresponding tagged values in the target data stream sent by its previous-hop network element, the transmission path between the network element and its previous-hop network element is determined as a fault path.
[0043] Thirdly, a packet loss information determination device is provided. The device is located in a network element device and includes: a functional unit for performing any of the methods provided in the first aspect. The actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software.
[0044] The device includes a transceiver module and a processing module. The transceiver module receives a first data stream through the ingress port of the network element. The processing module assigns tag values to service packets in the first data stream. The transceiver module also responds to the first data stream by sending a second data stream through the egress port of the network element. The processing module further determines packet loss information of the network element based on the number of service packets with tag values in the first data stream and the number of service packets with tag values in the second data stream.
[0045] Fourthly, a computer program product is provided, which includes instructions that, when executed on a computer, enable the computer to execute any of the packet loss information determination methods provided in the first aspect.
[0046] Fifthly, a computer-readable storage medium is provided, including computer-executable instructions, which, when executed on a computer, cause the computer to execute any of the packet loss information determination methods provided in the first aspect.
[0047] It should be noted that the technical effects of any of the implementation methods in aspects two through five can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the service message marking provided in related technologies;
[0049] Figure 2A system architecture diagram of a packet loss information determination system provided in this application embodiment;
[0050] Figure 3 This is a schematic diagram of the structure of a network element device provided in an embodiment of this application;
[0051] Figure 4 A system architecture diagram of another packet loss information determination system provided in this application embodiment;
[0052] Figure 5 This is a schematic diagram of the composition of a packet loss information determination device provided in an embodiment of this application;
[0053] Figure 6 A schematic diagram of the interaction process of a packet loss information determination method provided in an embodiment of this application;
[0054] Figure 7 This application provides a schematic diagram illustrating how a network element device assigns a tag value to a service packet in a first data stream.
[0055] Figure 8 A schematic diagram of a periodic mark provided for an embodiment of this application;
[0056] Figure 9 This application provides a schematic diagram of a data stream transmission according to an embodiment of the present application.
[0057] Figure 10 A schematic diagram illustrating how a network management device determines the forwarding path of a target data stream, as provided in an embodiment of this application.
[0058] Figure 11 This application provides a schematic diagram for confirming a faulty device.
[0059] Figure 12 This application provides a schematic diagram for fault path confirmation in an embodiment of the present application.
[0060] Figure 13 This is a schematic diagram of another network element device provided in an embodiment of this application. Detailed Implementation
[0061] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0062] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0063] "Used for indication" can include direct and indirect indications, as well as explicit and implicit indications. When describing "indication information used to indicate A" or "indication information of A," it can include whether the indication information directly or indirectly indicates A, but does not necessarily mean that the indication information carries A. The information indicated by a certain piece of information is called the information to be indicated. In the specific implementation process, there are many ways to indicate the information to be indicated, such as, but not limited to, directly indicating the information to be indicated, such as the information to be indicated itself or its index. It can also indirectly indicate the information to be indicated by indicating other information, where there is a relationship between the other information and the information to be indicated. It can also indicate only a part of the information to be indicated, while the other parts are known or pre-agreed. At the same time, it is possible to identify the common parts of various pieces of information and unify the indication to reduce the indication overhead caused by individually indicating the same information. Furthermore, the specific indication method can also be any existing indication method, such as, but not limited to, the above-mentioned indication methods and their various combinations. Specific details of various indication methods can be found in existing technologies, and will not be elaborated upon here.
[0064] It is understood that the term "embodiment" used throughout the specification means that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, throughout the specification, various embodiments do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0065] In this application, unless otherwise specified, the same or similar parts between the various embodiments can be referred to each other. In the various embodiments of this application, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments are consistent and can be mutually referenced. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The following embodiments of this application do not constitute a limitation on the scope of protection of this application.
[0066] Network elements play a crucial role in networks. Each network element contains numerous components and modules; a failure in any of these components or modules can lead to silent packet loss, posing a potential risk to network communication. Currently, during service operation, network elements can mark service packets using the following two marking methods, and the packet loss rate of the network element can be analyzed based on these marked service packets.
[0067] First marking method:
[0068] Upon receiving data streams generated during service operation, the first-hop network element (hereinafter referred to as the ingress network element) can add a header (such as in-situ flow information telemetry, IFIT) to the service packets of each data stream and mark the header with a preset tag value. Then, the ingress network element can send the service packets with the tag value in the header to the next-hop network element, until they reach the last-hop network element (hereinafter referred to as the egress network element). The egress network element can then delete the headers added by the ingress network element to restore the service packets of each data stream.
[0069] The second marking method:
[0070] Upon receiving the data stream generated during service operation, for each service packet in the data stream, the ingress network element can modify the value of the target packet field (such as the Differentiated Services Code Point (DSCP) field and the Explicit Congestion Notification (ECN) field) in the service packet to a preset flag value. Then, the ingress network element can send the service packet carrying this flag value to the next-hop network element until it reaches the egress network element. The egress network element can then restore the value of the target packet field in the service packet, that is, modify the value of the target packet field from the flag value back to its original value.
[0071] After marking the service messages in the data stream using the two marking methods described above, such as Figure 1 As shown, for each hop network element device, the number of service packets carrying tagged values in the data stream it receives (e.g., ...) can be represented by the number of such packets. Figure 1 The first number in the data stream and the number of service packets carrying the tag value in the data stream sent by the device itself to the next hop network element are reported to the network management analysis system (e.g., Figure 1(The second quantity in the text). The network management analysis system can determine the packet loss rate of each hop network element based on the number of service packets carrying tagged values sent by each hop network element and the number of service packets carrying tagged values sent to the next hop network element.
[0072] In the first marking method described above, if the outgoing node network element fails to correctly delete the added header from the service packet (i.e., fails to correctly restore the service packet) before sending it to the terminal device (also known as the service side), the terminal device will be unable to recognize the service packet, leading to service interruption. Furthermore, only network elements with integrated specific chips can support adding headers to service packets. Therefore, the first marking method places high demands on the hardware of the network element, and adding headers increases the length of the service packet, thereby incurring additional network overhead and reducing network throughput.
[0073] In the second marking method described above, each reserved field in the business message has been mined and used in different domains, and their usage varies (e.g., the ECN field is mainly used for congestion identification in the data center domain, and for operation and maintenance identification in the campus domain). Therefore, this marking method has low applicability in cross-domain scenarios. Furthermore, whether the modified target message field values are unique requires confirmation with the terminal device, leading to high network operation and maintenance costs.
[0074] In summary, how to accurately analyze the packet loss rate of network elements without increasing network overhead and network operation and maintenance costs is an urgent problem to be solved.
[0075] In view of this, this application provides a method for determining packet loss information applied to network element devices. After receiving a first data stream through its own ingress port, the network element device can assign a tag value to the service packets in the first data stream. Then, in response to the first data stream, the network element device can output a second data stream through its own egress port and determine its own packet loss information based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream.
[0076] In the above method, each network element on the transmission path can accurately determine its packet loss status by assigning a tag value to the service packets it receives and comparing the number of service packets with corresponding tag values in its input and output data streams. Furthermore, this method assigns tag values to service packets, rather than adding headers or modifying the target packet field value to a preset tag value. Therefore, it avoids the problem of terminal devices being unable to recognize the service packet, as seen in related technologies, and does not increase network overhead or network maintenance costs. Moreover, assigning tag values to service packets has low hardware requirements for network elements, effectively improving the compatibility and robustness of the packet loss information determination method.
[0077] The technical solution provided in this application will now be described with reference to the accompanying drawings.
[0078] Figure 2 This is a system architecture diagram of a packet loss information determination system provided in an embodiment of this application. Figure 2 As shown, this packet loss information determination system can include multiple communication devices, such as... Figure 2 The terminal device 201 and the network element device 202 shown are connected in communication.
[0079] The terminal equipment 201 involved in this application can be user equipment (UE), access terminal, terminal unit, user station, terminal station, mobile station, mobile station, remote station, remote terminal, user terminal equipment (TE), mobile device, wireless communication device, terminal agent, tablet computer, handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, vehicle-mounted transceiver unit, wearable device, or terminal device in a 5G network or a public land mobile network (PLMN) evolved after 5G. Alternatively, the terminal equipment 201 can be a terminal with communication function in the Internet of Things (IoT), such as a terminal in V2X (e.g., vehicle-to-everything (V2X) communication, a terminal in D2D communication, or a terminal in M2M communication. The terminal equipment 201 can be mobile or fixed.
[0080] The embodiments of this application do not limit the form of the terminal device 201. The device for implementing the function of the terminal device 201 can be the terminal device itself, or it can be any device that supports the terminal device in implementing the function, such as a chip system. This device can be installed in the terminal device or used in conjunction with the terminal device. In the embodiments of this application, the chip system can be composed of chips, or it can include chips and other discrete components.
[0081] The network element device 202 involved in this application can be a network element forwarding device such as a switch, router, or firewall, and there is no limitation thereto.
[0082] In this embodiment of the application, the number of terminal devices 201 and network element devices 202 is not limited, and may include more than 100,000 devices. Figure 2 More or fewer terminal devices 201 and network element devices 202.
[0083] Network element device 202 can receive data streams sent by various terminal devices 201 connected to it, and each data stream can include multiple service packets. Thus, after receiving multiple data streams through its ingress port, network element device 202 can determine the target data stream to be marked (hereinafter referred to as the first data stream) from the multiple data streams based on the header fields of the service packets in each data stream. The network element device can assign marking values to the service packets in the first data stream. Then, in response to the first data stream, network element device 202 can output a second data stream through its egress port, and determine its own packet loss information based on the number of service packets with corresponding marking values in the first data stream and the number of service packets with corresponding marking values in the second data stream.
[0084] In one alternative implementation, the network element device 202 may include a task management module 301, a service module 302, a data acquisition module 303, and a root cause analysis module 304, such as... Figure 3 As shown. The task management module 301 is used to determine the identification information of the first data stream and send the identification information of the first data stream to the service module 302. After receiving the identification information of the first data stream, the service module 302 can determine the first data stream from the multiple received data streams according to the identification information of the first data stream, and assign a tag value to each service message in the first data stream.
[0085] The identification information of the first data stream may include, but is not limited to, at least one of the following: the destination Internet Protocol (IP) address, the source IP address, and the message type of the business message in the first data stream.
[0086] The data acquisition module 303 can determine the number of service packets with corresponding tags in the first data stream when the service module 302 assigns a tag value to each service packet in the first data stream, and determine the number of service packets with corresponding tags in the second data stream when the network element device 202 responds to the first data stream and outputs the second data stream through the output port. Based on the number of service packets with corresponding tags in the first data stream and the number of service packets with corresponding tags in the second data stream, the data acquisition module 303 can determine the packet loss information of the network element device 202.
[0087] In addition, the data acquisition module 303 can also store the number of service packets with corresponding tag values in the first data stream, the number of service packets with corresponding tag values in the second data stream, and the packet loss information of the network element device 202.
[0088] The root cause analysis module 304 can include multiple preset packet loss reasons. Therefore, the root cause analysis module 304 can determine the cause of packet loss in network element device 202 from the preset packet loss reasons when the packet loss information of network element device 202 indicates that packet loss has occurred in network element device 202.
[0089] In addition, after the root cause analysis module 304 determines the cause of packet loss in network element device 202, it can send the cause of packet loss in network element device 202 to data acquisition module 303. The data acquisition module can store the packet loss information of network element device 202 and the cause of packet loss in network element device 202 accordingly.
[0090] In one alternative implementation, the aforementioned packet loss information determination system may further include a network management device 203, such as... Figure 4 As shown. A network management analysis system can be deployed in network management device 203. The network management analysis system can be used to determine whether each network element device is a faulty device.
[0091] Specifically, network element device 202 can send the number of service packets with corresponding tagged values in the first data stream and the number of service packets with corresponding tagged values in the second data stream to network management device 203. For each network element device, network management device 203 can determine whether the network element device is a faulty device based on the number of service packets with corresponding tagged values in the first data stream and the second data stream sent by the network element device. That is, if the network element device experiences packet loss, it is determined to be a faulty device; if the network element device does not experience packet loss, it is determined to be a device that has not experienced packet loss.
[0092] The network management device 203 involved in this application can be a server, terminal device, etc., and there is no limitation thereto.
[0093] The following will be discussed separately. Figure 2The network element device 202 shown and Figure 3 The structure of the network management device 203 shown will be explained.
[0094] Network element device 202 can adopt Figure 5 The shown composition structure, or including Figure 5 The components shown. Figure 5 This is a schematic diagram illustrating the composition of a packet loss information determination device 500 provided in an embodiment of this application. The packet loss information determination device 500 can be a network element device 202 or a chip or system-on-a-chip within the network element device 202. For example... Figure 5 As shown, the packet loss information determination device 500 may include a processor 501, a communication interface 502, and a communication line 503.
[0095] Furthermore, the packet loss information determination device 500 may also include a forwarding chip 504. The processor 501, the forwarding chip 504, and the communication interface 502 can be connected via a communication line 503.
[0096] The processor 501 can be a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 501 can also be other devices with processing capabilities, such as circuits, devices, or software modules, without limitation.
[0097] Communication interface 502 is used to communicate with other devices or other communication networks. These other communication networks can be Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. Communication interface 502 can be a module, circuit, transceiver, or any device capable of enabling communication.
[0098] In this embodiment of the application, the communication interface 502 may include an inlet port and an outlet port, wherein the inlet port is used to receive a first data stream and the outlet port is used to send a second data stream.
[0099] Communication line 503 is used to transmit information between the components included in the packet loss information determination device 500.
[0100] The forwarding chip 504 is used to assign tag values to service packets in the first data stream.
[0101] It should be noted that the forwarding chip 504 can exist independently of the processor 501, or it can be integrated with the processor 501.
[0102] In one example, processor 501 may include one or more CPUs, for example Figure 5 CPU0 and CPU1 in the CPU.
[0103] As an optional implementation, the packet loss information determination device 500 includes multiple processors, for example, in addition to Figure 5 In addition to processor 501, it may also include processor 505.
[0104] also, Figure 5 The structural composition shown does not constitute a limitation on the packet loss information determination device, except... Figure 5 In addition to the components shown, the packet loss information determination device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0105] Network management device 203 may also include the above. Figure 5 The processor, communication interface, and communication line shown, as well as the connection relationships between the processor, communication interface, and communication line, and the functions of the processor, communication interface, and communication line, can all be referenced. Figure 5 As shown, it will not be elaborated further here.
[0106] As an optional implementation, when the network management device 203 is a terminal device, it may also include output devices and input devices. For example, input devices are devices such as keyboards, mice, microphones, or joysticks, and output devices are devices such as displays and speakers.
[0107] Furthermore, the actions, terms, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are merely examples, and other names may be used in specific implementations without limitation.
[0108] The following is combined Figure 2 ,by Figure 2 Taking a network element device as an example, the method for determining packet loss information provided in the embodiments of this application is described. Figure 6 This is a schematic diagram of the interaction process of a packet loss information determination method provided in an embodiment of this application, as shown below. Figure 6 As shown, the method includes:
[0109] S601 receives the first data stream through the ingress port of the network element device.
[0110] The ingress port is used to receive data streams. The first data stream contains multiple service packets, and the source and destination addresses of each service packet are the same.
[0111] Specifically, a network element may include an ingress port, which is used to receive multiple data streams sent by the upstream network element or communication device (such as a terminal device or server) connected to the network element. Each data stream may include multiple service packets. After receiving multiple data streams through its own ingress port, the network element can determine the target data stream to be marked (hereinafter referred to as the first data stream) from the multiple data streams based on the header fields of the service packets in each data stream.
[0112] In one optional implementation, the header field of the service message may include, but is not limited to, at least one of the following information: destination IP address, source IP address, message type, etc. When determining the first data stream from multiple data streams based on the header field of the service message in each data stream, the first data stream may be determined from multiple data streams based on at least one of the following information: destination IP address, source IP address, message type, etc. contained in the header field.
[0113] S602 assigns a tag value to the service message in the first data stream.
[0114] In this embodiment, the network element device can assign a tag value to each service packet in the first data stream, or it can assign tag values to some service packets in the first data stream, without limitation. The following description uses the example of the network element device assigning a tag value to each service packet in the first data stream.
[0115] In one optional implementation, for each service packet in the first data stream, after receiving the service packet, the network element device can generate description information for the service packet, then add a tag value to the description information of the service packet to obtain description information carrying the tag value, and finally store the description information carrying the tag value.
[0116] The description information of each service message may include, but is not limited to, the message header, sequence number, and other information of that service message.
[0117] In this embodiment of the application, when a network element adds a tag value to the description information of a service message, it can modify a certain field in the description information of the service message to the tag value, or it can add the tag value in a reserved field in the description information of the service message, without limitation.
[0118] For example, Figure 7 A diagram illustrating how network elements assign tag values to service packets in the first data stream, such as... Figure 7As shown, the first data stream may include multiple service messages. Figure 7 Each black square in the diagram represents a service message. After receiving the first data stream through the ingress port, the network element device can add a marker value to the description information corresponding to each service message in the first data stream in the manner described above.
[0119] In the embodiments of this application, the marker value can be a number (such as 1, 2, 3, etc.), a character (such as a, b, *, etc.), or a combination of numbers and / or characters (such as 1a, 12, ab, etc.), without limitation.
[0120] In an optional implementation, before executing S602, the network element can also enable its own service packet marking function. The service packet marking function refers to the ability to assign mark values to service packets in the first data stream, thereby enabling the execution of... Figure 6 The corresponding method.
[0121] Optionally, the network element device can enable its own service packet marking function in response to the staff's activation operation for the service packet marking function, or it can enable its own service packet marking function at a preset time, without limitation.
[0122] S603, in response to the first data stream, sends a second data stream through the network device's output port.
[0123] Network elements may include egress ports, which are used to send a second data stream to the next-hop device (network element or terminal device, etc.) connected to the network element. After receiving the first data stream through the ingress port, the network element needs to process each service packet in the first data stream (such as parsing, encapsulation, etc.). During this process, packet loss may occur, resulting in the number of service packets in the first data stream being greater than or equal to the number of service packets in the second data stream. That is: when no packet loss occurs in the network element, the first and second data streams are the same, and the number of service packets with corresponding tags in the first data stream is equal to the number of service packets with corresponding tags in the second data stream. When packet loss occurs in the network element, the first and second data streams are different, and the number of service packets with corresponding tags in the first data stream is greater than the number of service packets with corresponding tags in the second data stream.
[0124] After receiving the first data stream, the network element can parse the service packets in the first data stream to determine the destination address of the first data stream, and based on the destination address, determine the next-hop device. Then, the network element sends the second data stream to the next-hop device through its own output port.
[0125] In one optional implementation, when assigning tag values to service packets in the first data stream by adding tag values to the description information of the service packets, the network element device can release the description information corresponding to each service packet in the second data stream when sending the second data stream to the next-hop device, that is, delete the description information corresponding to each service packet in the second data stream, so as to achieve the purpose of deleting the tag values assigned to each service packet.
[0126] S604, based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream, determine the packet loss information of the network element device.
[0127] When assigning tag values to service packets in the first data stream, network element devices can determine the number of service packets with corresponding tag values in the first data stream in real time. Similarly, when sending the second data stream to the next-hop device, network element devices can determine the number of service packets with corresponding tag values in the second data stream in real time. Thus, network element devices can determine their own packet loss information based on the number of service packets with corresponding tag values in both the first and second data streams.
[0128] Specifically, taking the method of adding a tag value to the description information of the service packet to assign a tag value to the service packet in the first data stream as an example, after the network element adds a tag value to the description information of a service packet, it can increment the number of service packets with corresponding tag values in the first data stream by 1 until the tag value is added to the description information of the last service packet, so as to obtain the number of service packets with corresponding tag values in the first data stream.
[0129] Based on this, when the network element sends the second data stream, for each service packet in the second data stream, if the network element determines that the description information of the service packet stored in it contains a tag value, it increments the number of service packets with the corresponding tag value in the second data stream by 1, until it sends the last service packet in the second data stream to the next hop device, thus obtaining the number of service packets with the corresponding tag value in the second data stream.
[0130] In this way, the network element device can obtain the number of service packets with corresponding tagged values in the first data stream and the number of service packets with corresponding tagged values in the second data stream, and determine its own packet loss information based on the number of service packets with corresponding tagged values in the first data stream and the number of service packets with corresponding tagged values in the second data stream.
[0131] In this embodiment, the packet loss information of the network element device can be either the number of packet losses or the packet loss rate of the network element device. Specifically, the number of packet losses can be determined based on the difference between the number of service packets with corresponding marker values in the first data stream and the number of service packets with corresponding marker values in the second data stream. The packet loss rate of the network element device can be determined based on the ratio of the number of packet losses to the number of service packets with corresponding marker values in the first data stream.
[0132] In one optional implementation, after determining the number of service packets with corresponding tag values in the first data stream, the number of service packets with corresponding tag values in the second data stream, and the packet loss information, the time when the user receives the first data stream, the time when the user sends the second data stream, the number of service packets with corresponding tag values in the first data stream, the number of service packets with corresponding tag values in the second data stream, and the packet loss information can be stored accordingly.
[0133] In the above technical solution, network elements can assign tag values to service packets in the first data stream by adding tag values to the description information of the service packets. That is, network elements can use internal tagging to mark service packets without adding new packet headers or modifying the original packets. Therefore, there is no need to restore the service packets, meaning there will be no situation where the service side cannot recognize the service packet, leading to service interruption, and no additional network overhead will be incurred.
[0134] In an optional implementation, in S602, when the network element device assigns a tag value to the service packet in the first data stream, it can periodically assign a tag value to the service packet in the first data stream, and the tag values assigned to the service packet in the first data stream in two adjacent periods are different.
[0135] Specifically, after receiving the first data stream through its own ingress port, the network element device can determine the time when the service packet was received for each service packet in the first data stream, and determine the target period corresponding to that time. Then, the network element device can assign a tag value corresponding to the target period to the service packet, that is, mark the service packet with the tag value corresponding to the target period.
[0136] For example, suppose the first data stream contains five service packets: service packet A, service packet B, service packet C, service packet D, and service packet E. The network element receives service packets A and B within period 0, and receives service packets C, D, and E within period 1. The flag value corresponding to period 0 is "1", and the flag value corresponding to period 1 is "2". Thus, after receiving service packets A and B through its own ingress port, the network element can assign a flag value of "1" to service packets A and B. After receiving service packets C, D, and E through its own ingress port, it can assign a flag value of "2" to service packets C, D, and E.
[0137] The specific method by which the network element assigns the corresponding tag value for the service packet in the first data stream in each cycle can be referred to the description in S602 above, and will not be repeated here.
[0138] In the embodiments of this application, the duration of each cycle can be 1 minute or 2 minutes, and the duration of each cycle can be the same or different, without limitation.
[0139] Based on the above network element device periodically assigning tag values to service packets in the first data stream, the above S604 can be replaced by: for each period, determining the packet loss information of the network element device in that period based on the number of service packets in the first data stream that correspond to the tag value of that period and the number of service packets in the second data stream that correspond to the tag value of that period.
[0140] Specifically, at the end of each cycle, the network element can determine the number of service packets in the first data stream that correspond to the tag value of that cycle, and the number of service packets in the second data stream that correspond to the tag value of that cycle. Then, based on the number of service packets in the first data stream and the second data stream that correspond to the tag value of that cycle, it can determine its own packet loss information within that cycle.
[0141] For example, suppose the tag value corresponding to period 0 is "1" and the tag value corresponding to period 1 is "2". Period 0 and period 1 can alternate in a cycle, such as... Figure 8As shown, at the end of cycle 0, the network element can determine the number of service packets with a flag value of "1" in the first data stream, and record it as couter1. It can also determine the number of service packets with a flag value of "1" in the second data stream, and record it as couter1'. Afterwards, the network element can determine its own packet loss information within cycle 0 based on couter1 and couter1', and clear couter1 and couter1', so that it can re-determine couter1 and couter1' in the next cycle 0.
[0142] At the end of cycle 1, the network element can determine the number of service packets with the tag value "2" in the first data stream, and record it as couter2. It can also determine the number of service packets with the tag value "2" in the second data stream, and record it as couter2'. Afterward, the network element can determine its own packet loss information within cycle 1 based on couter2 and couter2', and clear couter2 and couter2', so that it can re-determine couter2 and couter2' in the next cycle 1.
[0143] The method by which the network element determines the number of service packets in the first data stream that correspond to the tag value of that period and the number of service packets in the second data stream that correspond to the tag value of that period in each period can be referred to the description in S604 above, and will not be repeated here.
[0144] After determining the packet loss information of the network element device in each period using the above method, as shown in Table 1 below, for each period, the network element device can store the time period corresponding to that period, the number of service packets in the first data stream that have the tag value of that period (corresponding to the number of inbound packets in Table 1), the number of service packets in the second data stream that have the tag value of that period (corresponding to the number of outbound packets in Table 1), and its own packet loss information in that period (corresponding to the number of packet losses and packet loss rate in Table 1), data stream identification information, etc.
[0145] Table 1
[0146]
[0147] With the above technical solution, when packet loss occurs in network element devices, staff can quickly locate the time period in which packet loss occurred based on the packet loss information stored in the network element devices for each period, and analyze the service packets within that time period without having to analyze the entire network element, which can effectively improve the efficiency of troubleshooting.
[0148] In an optional implementation, the above-described method of assigning tag values to service packets in the first data stream can be used in conjunction with the end-side tagging method and the packet field tagging method. The end-side tagging method refers to the method by which the terminal device (or server) tags the service packets in the first data stream, and the packet field tagging method refers to the method of modifying the preset fields of the service packets in the first data stream to preset values. The specific tagging processes of the two methods can be found in related technologies and will not be elaborated here.
[0149] Taking the message field marking method as an example, after the first network element device (also known as the ingress network element device) receives the first data stream, the first network element device can modify the preset fields of each service message in the first data stream to preset values, that is, update the preset fields of the service messages from the initial values to the preset values. Correspondingly, when the last network element device (also known as the egress network element device) sends the second data stream, the last network element device can restore the preset fields of each service message in the second data stream, that is, restore the preset fields of the service messages from the preset values to the initial values.
[0150] In the embodiments of this application, the preset field can be either a DSCP field or an ECN field, without limitation.
[0151] By modifying the preset fields of the service packets in the first data stream to preset values through the above technical solution, it is equivalent to establishing a unified identifier for the service packets in the first data stream. This enables each network element device to quickly identify the service packets in the first data stream, thereby effectively improving the efficiency of each network element device in determining its own packet loss information.
[0152] In one optional implementation, when the packet loss information of the network element indicates that packet loss has occurred, the network element can also determine the cause of its own packet loss from preset packet loss reasons.
[0153] Specifically, packet loss is characterized when the number of lost packets from a network element exceeds a preset limit (e.g., 0), or when the packet loss rate of a network element exceeds a preset packet loss rate (e.g., 0%). Correspondingly, the network element can perform self-detection based on the preset packet loss causes listed below, and if the detection result matches any one or more of the preset packet loss causes, then that one or more packet loss causes will be identified as the cause of its own packet loss.
[0154] The preset reasons for packet loss can include at least one of the following:
[0155] (1) The forwarding chip of the network element device contains packet loss records.
[0156] (2) The physical and / or logical state of the output port of the network element is abnormal.
[0157] (3) The forwarding table entries of the network element device are abnormal.
[0158] (4) The data in the control plane entries of the network element is inconsistent with the data in the forwarding plane entries.
[0159] (5) Network element equipment is congested.
[0160] (6) The first data stream contains a service packet that matches the deny rule in the access control list (ACL) of the network element device.
[0161] In this embodiment of the application, the forwarding table entries in (3) above may include media access control (MAC) addresses, address resolution protocol / neighbor discovery (ARP / ND) and / or routing information, etc., without limitation.
[0162] In one optional implementation, the preset packet loss reasons stored in the network element device can be generated and stored based on expert advice or based on the experience of staff, without limitation. Furthermore, staff can periodically update the preset packet loss reasons stored in the network element device.
[0163] Using the above method, network elements can automatically determine the cause of packet loss after detecting it, without requiring manual verification by staff. This not only avoids wasting human resources but also effectively improves the efficiency of analyzing the causes of packet loss.
[0164] In one optional implementation, after determining the cause of packet loss in each period, the network element can also store its own packet loss information and the cause of the packet loss, as shown in Table 2. The stored packet loss information and the cause of the packet loss can help staff quickly locate the fault without conducting large-scale network troubleshooting, saving a significant amount of human and time resources.
[0165] Table 2
[0166]
[0167] In one optional implementation, after determining the cause of packet loss in each period, the network element can also send the cause of its packet loss, the time period corresponding to the period, the number of service packets in the first data stream corresponding to the period's marker value (corresponding to the number of inbound packets in Table 2), the number of service packets in the second data stream corresponding to the period's marker value (corresponding to the number of outbound packets in Table 2), its own packet loss information in that period (corresponding to the packet loss rate in Table 2), and the identification information of the data stream to the staff's terminal equipment or network management equipment. This allows the staff to view the information of each network element in a timely manner, maintain each network element, monitor the packet loss information of each network element, and avoid the phenomenon of silent packet loss by network elements.
[0168] In one optional implementation, the first data stream may contain multiple sub-data streams. When packet loss information from the network element indicates that packet loss has occurred, the network element can, through the above... Figure 6 The packet loss information determination method shown determines the packet loss information of the device itself when forwarding each sub-data stream, and identifies the sub-data streams in which packet loss information indicates packet loss in the network element as fault streams. Then, the network element can determine the cause of its own packet loss in the fault stream from the aforementioned preset packet loss causes.
[0169] Specifically, the network element device may include a processor and a chip. The processor is used to determine whether packet loss has occurred in the network element device based on the packet loss information of the network element device, and in the event of packet loss, sends the identification information of each sub-data stream contained in the first data stream to the chip. After receiving the identification information of each sub-data stream, the chip can refer to the above... Figure 6 The packet loss information determination method shown determines the packet loss information of the chip itself when forwarding each sub-data stream, so as to identify the faulty stream from each sub-data stream. Then, the chip can send the identification information of the faulty stream to the processor. After receiving the identification information of the faulty stream, the processor can determine the reason for its own packet loss under the faulty stream from the preset packet loss reasons mentioned above.
[0170] In one optional implementation, the network element can also receive a device fault message sent by a faulty device, where the faulty device refers to the network element that experienced packet loss. The network element can respond to the device fault message and switch over to the faulty device.
[0171] Specifically, a network element device may include a routing information table, which may include the device priorities of each network element device connected to it. After receiving the first data stream, the network element device may determine the next-hop network element device based on the destination IP address of each service packet in the first data stream and the priority of each network element device in the routing information table, and respond to the first data stream by sending the second data stream to the next-hop network element device.
[0172] After receiving a device fault message, a network element can parse the message to obtain the device identifier of the faulty device. Then, the network element can update the priority of the faulty device in its routing information table, i.e., lower its priority. After receiving the first data stream, the network element can, based on the destination IP addresses of each service packet in the first data stream and the current priorities of each network element in the routing information table, re-determine the next-hop network element and send the second data stream to that next-hop network element.
[0173] For example, such as Figure 9 As shown, assuming that network elements connected to network element A include network element B and network element C, and that network element B has a priority of 1 and network element C has a priority of 2 in the routing information table (i.e., network element B has a higher priority than network element C), then after receiving the first data stream, network element A can determine network element B as the next-hop network element and send the second data stream to network element B, as follows: Figure 9 As shown by the dashed line. Suppose that network element A receives a fault message from network element B at a certain moment, and this fault message carries the device identifier of network element B. Network element A can reduce the priority of network element B to 5. Thus, the priority of network element C is higher than that of network element B, and network element A can switch to the next-hop device, that is, determine network element C as the next-hop network element device. Figure 9 As shown by the solid line in the middle curve.
[0174] In one optional implementation, two adjacent network elements can be connected via multiple paths, including a communication path and multiple backup paths. The communication path refers to the path currently used to transmit data streams. The network element can also detect the communication path between itself and its neighboring network elements, and if a failure is detected in the communication path, it can re-determine a path from the multiple backup paths between itself and its neighboring network elements as the new communication path, thereby achieving communication path switching.
[0175] In an optional implementation, each network element can also send to the network management device the number of service packets with corresponding tag values in the target data stream (i.e., the first data stream mentioned above) that it has received, and the number of service packets with corresponding tag values in the target data stream (i.e., the second data stream mentioned above) that it has sent. Accordingly, after receiving the number of service packets with corresponding tag values in the target data stream that it has received and the number of service packets with corresponding tag values in the target data stream that it has sent from each network element, the network management device can determine the faulty path and / or faulty device that experienced packet loss during the forwarding of the target data stream, and switch the faulty path and / or faulty device.
[0176] Among them, faulty equipment refers to network element equipment that experiences packet loss, and faulty path refers to the transmission path in which packet loss occurs within the transmission path composed of two adjacent network element equipment.
[0177] For each network element, it can periodically send to the network management device, via network telemetry, the number of service packets with corresponding tagged values in the target data stream it receives, and the number of service packets with corresponding tagged values in the target data stream it sends. Furthermore, the network element can also send to the network management device the time it received the target data stream and the target data stream's identification information. The network management device can determine the forwarding path of the target data stream based on the time each network element receives the target data stream. Then, based on the number of tagged values assigned to each network element and the number of service packets carrying tagged values in the sent target data stream, the network management device can identify the faulty path and / or faulty device that experienced packet loss during the forwarding of the target data stream, and switch over the faulty path and / or faulty device.
[0178] In the embodiments of this application, when the network management device determines the forwarding path of the target data flow, it can do so through control plane forwarding table entries or through an encapsulated remote switched port analyzer (ERSPAN), without limitation. Both methods can be referenced in related technologies, and will not be elaborated here.
[0179] For example, assuming network element A sends a message to the network management device at 10:01 indicating that it has received the target data stream, network element B sends a message to the network management device at 10:02 indicating that it has received the target data stream, and network element C sends a message to the network management device at 10:03 indicating that it has received the target data stream, then the network management device can determine the target data stream based on the source IP address, destination IP address, and the time when each network element receives the target data stream from each service packet in the target data stream. Figure 10The forwarding path of the target data stream shown is as follows: after the target data stream is sent from terminal device 1, it first arrives at network element device A, then network element device A sends it to network element device B, then network element device B sends it to network element device C, and finally arrives at terminal device 2. Afterwards, the network management device can switch over the faulty path and / or faulty device after identifying the faulty path and / or faulty device that experienced packet loss during the forwarding of the target data stream.
[0180] The following sections will first introduce the process of identifying faulty devices and determining fault paths in network management equipment.
[0181] In some embodiments, the network management device may include an analyzer for determining faulty devices and fault paths. After receiving the number of service packets with corresponding tagged values in the target data stream received by each network element and the number of service packets with corresponding tagged values in the target data stream sent by each network element, the analyzer of the network management device may, for each network element, determine that the network element is a faulty device if the number of service packets with corresponding tagged values in the target data stream received by the network element and the number of service packets with corresponding tagged values in the target data stream sent by the network element are inconsistent.
[0182] For example, such as Figure 11 As shown, assuming network element A sends 100 service packets with corresponding tagged values in the target data stream it receives, and 100 service packets with corresponding tagged values in the target data stream it sends, network element B sends 100 service packets with corresponding tagged values in the target data stream it receives, and 50 service packets with corresponding tagged values in the target data stream it sends, and network element C sends 50 service packets with corresponding tagged values in the target data stream it receives, and 50 service packets with corresponding tagged values in the target data stream it sends, the network management device can identify network element B as a faulty device.
[0183] In some embodiments, for each network element, if the number of service packets with corresponding tagged values in the target data stream sent by the network element is inconsistent with the number of service packets with corresponding tagged values in the target data stream received by the next-hop network element, the analyzer of the network management device can determine the transmission path between the network element and its next-hop network element as a faulty path. Similarly, if the number of service packets with corresponding tagged values in the target data stream received by the network element is inconsistent with the number of service packets with corresponding tagged values in the target data stream sent by the previous-hop network element, the analyzer of the network management device can determine the transmission path between the network element and its previous-hop network element as a faulty path.
[0184] For example, such as Figure 12 As shown, assuming that the next-hop network element of network element A is network element B, and the next-hop network element of network element B is network element C, the number of service packets with corresponding tagged values in the target data stream received by network element A is 100, and the number of service packets with corresponding tagged values in the target data stream sent by network element A is 100. The number of service packets with corresponding tagged values in the target data stream received by network element B is 50, and the number of service packets with corresponding tagged values in the target data stream sent by network element B is 50. The number of service packets with corresponding tagged values in the target data stream received by network element C is 50, and the number of service packets with corresponding tagged values in the target data stream sent by network element C is 50. That is, the number of service packets with tagged values in the target data stream sent by network element A is inconsistent with the number of allocated tagged values sent by network element B. The network management device can determine the transmission path between network element A and network element B as a fault path.
[0185] In an optional implementation, the network management device may further include a controller. After the network management device determines the faulty device and / or faulty path in the above manner, the controller of the network management device can determine the upstream network element of the faulty device from the forwarding path of the target data flow determined above, and send a device fault message to the upstream network element of the faulty device. And / or, the controller of the network management device can determine the network element corresponding to the faulty path from the forwarding path of the target data flow determined above, and send a path fault message to the network element corresponding to the faulty path. Upon receiving the device fault message and / or path fault message, the network element can switch the faulty device and / or faulty path.
[0186] The specific methods by which network elements switch over faulty devices and / or faulty paths can be found in the above description and will not be repeated here.
[0187] In an optional implementation, during the forwarding of target data through multiple network element devices, before executing the packet loss information determination method described above, the clocks of each network element device, network management device, and terminal device can be synchronized based on the network time protocol (NTP) to ensure that each network element device, network management device, and terminal device has an accurate and consistent time, so as to avoid the problem of inaccurate packet loss rate calculation due to the inconsistency of the clocks of each network element device.
[0188] The above mainly describes the solutions provided by the embodiments of this application from the perspective of various devices. Correspondingly, the embodiments of this application also provide a packet loss information determination device, which is used to implement the various methods described above. This packet loss information determination device can be a network element device in the above method embodiments, or a component that can be used in a network element device. It is understood that, in order to achieve the above functions, the packet loss information determination device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0189] This application embodiment can divide the packet loss information determination device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be understood that the module division in this application embodiment is illustrative and is only a logical functional division. In actual implementation, there may be other division methods.
[0190] For example, taking the packet loss information determination device as a network element device in the above method embodiment as an example, Figure 13 A schematic diagram of a network element device is shown, which includes a transceiver module 1301 and a processing module 1302. The transceiver module 1301, also known as a transceiver unit, is used to implement transceiver functions, and may be, for example, a transceiver circuit, a transceiver, a transceiver device, or a communication interface.
[0191] The transceiver module 1301 is used to receive the first data stream through the ingress port of the network element device.
[0192] Processing module 1302 is used to assign tag values to service messages in the first data stream.
[0193] The transceiver module 1301 is also used to send a second data stream through the output port of the network device in response to the first data stream.
[0194] The processing module 1302 is also used to determine the packet loss information of the network element device based on the number of service packets with corresponding tag values in the first data stream and the number of service packets with corresponding tag values in the second data stream.
[0195] The transceiver module 1301 can be used to implement the transceiver function of the network element device in the above method embodiment, and the processing module 1302 can be used to implement the processing function of the network element device in the above method embodiment. Therefore, all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0196] In this embodiment, the network element device is presented in an integrated manner, divided into various functional modules. Here, "module" can refer to a specific ASIC, circuit, processor and memory executing one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above-mentioned functions.
[0197] Since the network element device provided in this application embodiment can execute the above-described packet loss information determination method, the technical effects it can achieve can be referred to the above-described method embodiment, and will not be repeated here.
[0198] It should be understood that one or more of the above modules or units can be implemented by software, hardware, or a combination of both. When any of the above modules or units are implemented by software, the software exists as computer program instructions and is stored in memory. The processor can be used to execute the program instructions and implement the above method flow. The processor can be built into a SoC (System-on-a-Chip) or ASIC, or it can be a separate semiconductor chip. In addition to the core that executes software instructions for computation or processing, the processor may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), or logic circuits that implement dedicated logic operations.
[0199] When the above modules or units are implemented in hardware, the hardware can be any one or any combination of a CPU, microprocessor, digital signal processing (DSP) chip, micro controller unit (MCU), artificial intelligence processor, ASIC, SoC, FPGA, PLD, application-specific digital circuit, hardware accelerator, or non-integrated discrete device, which can run the necessary software or perform the above method flow independently of software.
[0200] Optionally, embodiments of this application also provide a packet loss information determination device (e.g., the packet loss information determination device may be a chip or a chip system), which includes a processor for implementing the methods in any of the above method embodiments. In one possible design, the packet loss information determination device further includes a memory. The memory is used to store necessary program instructions and data, and the processor can call the program code stored in the memory to instruct the packet loss information determination device to execute the methods in any of the above method embodiments. Of course, the memory may not be included in the packet loss information determination device. When the packet loss information determination device is a chip system, it may be composed of chips or may include chips and other discrete devices; embodiments of this application do not specifically limit this.
[0201] In one possible implementation, this application also provides a computer-readable storage medium storing a computer program or instructions that, when run on a packet loss information determination device, enable the packet loss information determination device to execute the method described in any of the above method embodiments or any implementation thereof.
[0202] In one possible implementation, this application embodiment also provides a communication system, which includes the network element device described in the above method embodiments and the second device described in the above method embodiments.
[0203] In one possible implementation, this application embodiment also provides a method for determining packet loss information, which includes the method described in any of the above method embodiments or any implementation thereof.
[0204] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0205] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, the disclosure, and the appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0206] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A method for determining packet loss information, characterized in that, Applied to network element devices, the method includes: The first data stream is received through the ingress port of the network element device; Assign a tag value to the service message in the first data stream; In response to the first data stream, a second data stream is sent through the output port of the network device; Based on the number of service packets in the first data stream that correspond to the marked value and the number of service packets in the second data stream that correspond to the marked value, the packet loss information of the network element device is determined.
2. The method according to claim 1, characterized in that, Assigning tag values to service packets in the first data stream includes: For each service message in the first data stream, generate description information for the service message; The tag value is added to the description information of the service message to obtain the description information carrying the tag value; The description information carrying the tag value is stored.
3. The method according to claim 1, characterized in that, Assigning tag values to service packets in the first data stream includes: A tag value is periodically assigned to the service packets in the first data stream; the tag values assigned to the service packets in the first data stream are different in two adjacent periods.
4. The method according to claim 3, characterized in that, The step of determining the packet loss information of the network element device based on the number of service packets corresponding to the marker value in the first data stream and the number of service packets corresponding to the marker value in the second data stream includes: For each period, based on the number of service packets in the first data stream that correspond to the period's marker value and the number of service packets in the second data stream that correspond to the period's marker value, the packet loss information of the network element device within that period is determined.
5. The method according to any one of claims 1-4, characterized in that, The packet loss information includes: the number of lost packets and / or the packet loss rate.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: In the event of packet loss in the network element device, the cause of packet loss in the network element device is determined according to the preset packet loss cause.
7. The method according to claim 6, characterized in that, The preset packet loss reasons include at least one of the following: The forwarding chip of the network element device contains packet loss records; The physical and / or logical state of the interface of the network element device is abnormal; The forwarding table entry of the network element device is abnormal; The data in the control plane entries of the network element device is inconsistent with the data in the forwarding plane entries. The network element device is experiencing congestion; The first data stream contains service packets that match the denial rule in the Access Control List (ACL) of the network element device.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: Store the packet loss information of the network element device and the reasons for the packet loss of the network element device.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Send to the network management device the number of service packets in the first data stream that correspond to the tag value, and the number of service packets in the second data stream that correspond to the tag value.
10. The method according to any one of claims 1-9, characterized in that, The method further includes: Receive device fault information sent by faulty devices; the faulty devices refer to network element devices that have experienced packet loss. In response to the device fault information, the faulty device is switched.
11. The method according to any one of claims 1-10, characterized in that, The method further includes: Detect the communication path between the network element device and adjacent devices; the adjacent devices refer to devices that are adjacent to the network element device. In the event of a failure in the communication path, the communication path is switched.
12. The method according to any one of claims 1-11, characterized in that, The network element device is the first network element device; The method further includes: Modify the preset fields of the business messages in the first data stream to preset values.
13. The method according to claim 12, characterized in that, The network element device mentioned is the last network element device; Before sending the second data stream through the output port of the network device, the method further includes: Restore the preset fields of the business messages in the second data stream.
14. A packet loss information determination device, characterized in that, The device is located in a network element device, and the device includes: The transceiver module is used to receive a first data stream through the ingress port of the network element device; The processing module is used to assign tag values to the service packets in the first data stream; The transceiver module is also configured to send a second data stream through the output port of the network device in response to the first data stream; The processing module is further configured to determine the packet loss information of the network element device based on the number of service packets in the first data stream corresponding to the marker value and the number of service packets in the second data stream corresponding to the marker value.
15. The apparatus according to claim 14, characterized in that, The processing module is further configured to: For each service message in the first data stream, generate description information for the service message; The tag value is added to the description information of the service message to obtain the description information carrying the tag value; The description information carrying the tag value is stored.
16. A computer-readable storage medium, characterized in that, Includes program code that, when run on a computer or processor, causes the computer or processor to perform the packet loss information determination method as described in any one of claims 1-13.