Information processing method and system for network device, and electronic device and storage medium

By encapsulating and learning from lost packets in network devices and combining this with software parsing, the problem of not being able to fully statistically analyze lost packet flows in existing technologies has been solved. This enables effective statistical analysis and parsing of lost packet flows, improving the performance and stability of network devices.

WO2026056933A1PCT designated stage Publication Date: 2026-03-19CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

Existing technologies cannot perform full cumulative statistics and analysis of packet loss messages from network devices based on the cause of packet loss, resulting in an inability to effectively address the causes of packet loss.

Method used

By encapsulating lost packets, using the hardware flow tables of network devices for hardware learning, and combining this with software process parsing, the causes of packet loss and traffic correlation information can be obtained, enabling full-scale cumulative statistics and analysis based on the causes of packet loss.

Benefits of technology

It enables full statistics and flexible parsing of packet loss flows from network devices, improving the performance and stability of network devices, and supports full cumulative statistics based on the causes of packet loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025120494_19032026_PF_FP_ABST
    Figure CN2025120494_19032026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the fields of network technology and information processing. Disclosed are an information processing method and system for a network device, and an electronic device and a storage medium. The method comprises: acquiring a packet loss message corresponding to a network device, wherein the packet loss message is used for representing a message from which a data packet discarded by the network device comes; encapsulating the packet loss message so as to obtain a message encapsulation result, wherein the message encapsulation result at least comprises a packet loss reason why the network device discards the data packet, and the packet loss message; calling a hardware flow table of the network device, and on the basis of the packet loss reason in the message encapsulation result, performing hardware learning on the packet loss message in the message encapsulation result so as to obtain a learning result, and using a software process of the network device to parse the packet loss message in the message encapsulation result so as to obtain a parsing result; and outputting the learning result and the parsing result.
Need to check novelty before this filing date? Find Prior Art

Description

Information processing method and system of network device, electronic device and storage medium

[0001] Cross-reference to related applications

[0002] The present disclosure claims priority from a Chinese patent application No. 202411259556.2 filed on September 10, 2024, and entitled "Information processing method and system of network device, electronic device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present disclosure relates to the field of network technology and information processing, in particular to an information processing method and system of network device, electronic device and storage medium. BACKGROUND

[0004] At present, in a large-scale network, as the deployment scale of network devices increases and the diversity of functions of network devices increases, the configuration of network devices becomes more complex, which leads to more diversified reasons for packet loss on network devices. Therefore, how to process the packet loss message of the network device to guide the recovery of traffic is crucial.

[0005] In the related art, after obtaining the packet loss message corresponding to the network device, the packet loss message is directly truncated and mirrored to the central processing unit (CPU) for software analysis. However, this method cannot support full-quantity accumulation statistics based on packet loss reasons, and is limited by the processing capacity and bandwidth of the CPU, and cannot perform statistics on full-quantity packet loss flow when analyzing the packet loss message corresponding to the network device.

[0006] At present, no effective solution has been proposed to solve the above problems. SUMMARY

[0007] The embodiments of the present disclosure provide an information processing method and system of network device, electronic device and storage medium to at least solve the technical problem that full-quantity packet loss flow cannot be counted when analyzing the packet loss message corresponding to the network device.

[0008] According to an aspect of an embodiment of the present disclosure, an information processing method of a network device is provided. The method can include: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a packet from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the packet, wherein the encapsulation result of the packet at least includes a packet loss reason for which the data packet is discarded by the network device and the packet loss message; invoking a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the packet based on the packet loss reason in the encapsulation result of the packet, obtaining a learning result, and performing analysis on the packet loss message in the encapsulation result of the packet by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with packet flow of the packet loss message; and outputting the learning result and the analysis result.

[0009] According to another aspect of an embodiment of the present disclosure, an information checking method of a network device is provided. The method can include: in response to an information checking instruction of the network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a packet from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the packet, wherein the encapsulation result of the packet at least includes a packet loss reason for which the data packet is discarded by the network device and the packet loss message; invoking a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the packet based on the packet loss reason in the encapsulation result of the packet, obtaining a learning result, and performing analysis on the packet loss message in the encapsulation result of the packet by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with packet flow of the packet loss message; and checking configuration information of the network device by using the learning result and the analysis result to obtain a checking result.

[0010] According to another aspect of an embodiment of the present disclosure, a traffic recovery method of a network device is provided. The method can include: in response to a traffic recovery instruction of the network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a packet from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the packet, wherein the encapsulation result of the packet at least includes a packet loss reason for which the data packet is discarded by the network device and the packet loss message; invoking a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the packet based on the packet loss reason in the encapsulation result of the packet, obtaining a learning result, and performing analysis on the packet loss message in the encapsulation result of the packet by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with packet flow of the packet loss message; and recovering traffic of the network device by using the learning result and the analysis result.

[0011] According to another aspect of embodiments of the present disclosure, there is provided an information processing system of a network device. The system can include: an information input configured to obtain a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; a switch chip configured to encapsulate the packet loss message to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; invoke a hardware flow table of the network device, and perform hardware learning on the packet loss message in the encapsulation result based on the packet loss reason in the encapsulation result to obtain a learning result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message; a processor configured to parse the packet loss message in the encapsulation result by using a software process of the network device to obtain a parsing result, wherein the parsing result is used to indicate information associated with a packet flow of the packet loss message; and an output configured to output the learning result and the parsing result.

[0012] According to another aspect of embodiments of the present disclosure, there is also provided an electronic device, which can include a memory and a processor: the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the information processing method of the network device of any one of the above is implemented.

[0013] According to another aspect of embodiments of the present disclosure, there is also provided a processor configured to run a program, wherein the information processing method of the network device of any one of the above is executed when the program is running.

[0014] According to another aspect of embodiments of the present disclosure, there is also provided a computer readable storage medium, which includes a stored program, wherein the information processing method of the network device of any one of the above is executed when the program is running.

[0015] According to another aspect of embodiments of the present disclosure, there is also provided a computer program product, which includes a non-volatile computer readable storage medium, the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the information processing method of the network device of any one of the above.

[0016] In the embodiments of the present disclosure, a packet loss message corresponding to the network device is acquired, wherein the packet loss message is used to represent a packet from which a data packet discarded by the network device comes; the packet loss message is encapsulated to obtain an encapsulation result of the packet, wherein the encapsulation result of the packet at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; a hardware flow table of the network device is called, the packet loss message in the encapsulation result of the packet is learned based on the packet loss reason in the encapsulation result of the packet, a learning result is obtained, and the packet loss message in the encapsulation result of the packet is analyzed by using a software process of the network device to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with packet flow of the packet loss message; and the learning result and the analysis result are output. That is, the embodiments of the present disclosure encapsulate the packet loss message corresponding to the network device to obtain the encapsulation result of the packet carrying the packet loss reason and the packet loss message, call the hardware flow table of the network device, learn the packet loss message in the encapsulation result of the packet based on the packet loss reason in the encapsulation result of the packet, can support full accumulation statistics based on the packet loss reason, and analyze the packet loss message by using the software process of the network device to obtain the analysis result used to represent the information associated with the packet flow (packet loss flow) of the packet loss message, so as to achieve the purpose of supporting full packet loss reason statistics while flexibly analyzing the packet loss flow, and further achieve the technical effect of statistically analyzing the full packet loss flow when analyzing the packet loss message corresponding to the network device, and solve the technical problem that the full packet loss flow cannot be statistically analyzed when analyzing the packet loss message corresponding to the network device.

[0017] It is easily noticed that the general description above and the detailed description below are merely for exemplifying and explaining the present disclosure, and do not constitute a limitation on the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0018] The drawings described herein are used to provide further understanding of the present disclosure, constitute a part of the present disclosure, and the illustrative embodiments of the present disclosure and the description thereof are used to explain the present disclosure, and do not constitute an improper limitation on the present disclosure. In the drawings:

[0019] FIG. 1 is a schematic diagram of an application scenario of an information processing method of a network device according to an embodiment of the present disclosure;

[0020] FIG. 2 is a flowchart of an information processing method of a network device according to an embodiment of the present disclosure;

[0021] FIG. 3 is a flowchart of an information checking method of a network device according to an embodiment of the present disclosure;

[0022] FIG. 4 is a flowchart of a traffic recovery method of a network device according to an embodiment of the present disclosure;

[0023] Fig. 5 is a schematic diagram of an information processing system of a network device according to an embodiment of the present disclosure;

[0024] Fig. 6 is a schematic diagram of a packet loss reason statistics and packet loss flow analysis according to an embodiment of the present disclosure;

[0025] Fig. 7 is a structural block diagram of a computing environment of an information processing method of a network device according to an embodiment of the present disclosure;

[0026] Fig. 8 is a schematic diagram of an information processing apparatus of a network device according to an embodiment of the present disclosure;

[0027] Fig. 9 is a schematic diagram of an information checking apparatus of a network device according to an embodiment of the present disclosure;

[0028] Fig. 10 is a schematic diagram of a flow recovery apparatus of a network device according to an embodiment of the present disclosure;

[0029] Fig. 11 is a structural block diagram of a computer terminal according to an embodiment of the present disclosure;

[0030] Fig. 12 is a block diagram of an electronic device of an information processing method of a network device according to an embodiment of the present disclosure;

[0031] Fig. 13 is a hardware structural block diagram of a computer terminal (or mobile device) for implementing an information processing method of a network device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to make the person skilled in the art better understand the present disclosure scheme, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, not all. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present disclosure.

[0033] It should be noted that the terms "first", "second" and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or components does not have to be limited to those steps or components clearly listed, but can include other steps or components not clearly listed or inherent to these processes, methods, products or devices.

[0034] First, some of the nouns or terms that appear in the description of the embodiments of the present disclosure are applicable to the following explanations:

[0035] Mirror on Drop (MoD), used for data retransmission when packet loss occurs in network transmission. When data packets are lost or damaged during network transmission, MoD will automatically resend the lost data packets on another available path to ensure data integrity and reliability;

[0036] Ingress Pipeline (IPIPE), the processing flow and path that data packets pass through after entering the network device from the input port. In network devices, data packets first pass through the ingress pipeline for processing, which can at least include parsing packet header information, making routing decisions, and executing access control policies. Optimizing and managing the ingress pipeline can effectively reduce packet loss traffic and improve the performance and stability of network devices;

[0042] Memory Management Unit (MMU), a hardware component in computer systems that manages memory access and address translation, while protecting data security and improving system performance;

[0038] Egress Pipeline (EPIPE), a pipeline in network devices used to process egress traffic. In network communication, EPIPE is responsible for processing the process of sending data packets from network devices to target devices or networks. When EPIPE packet loss occurs, it may cause data packets to be unable to be correctly transmitted to the target device, resulting in data loss or delay;

[0039] VLAN Field Processor (VFP), a functional module in network devices or chips used to process fields in Virtual Local Area Network (VLAN). It can be used in switches to identify and process VLAN tags in data packets to correctly forward data packets to target devices. VFP can perform operations such as adding, deleting, modifying, and checking VLAN tags to ensure that data packets are correctly routed and forwarded according to the required VLAN configuration;

[0040] An ingress field processor (IFP) is a network device or software module that processes and transforms fields in network packets. It can be used at the network ingress to inspect, modify, or transform packets as they enter the network, ensuring that they comply with network policies and security requirements. IFPs can perform various operations such as filtering, decryption, encryption, redirection, recoding, etc., to achieve fine-grained control over network traffic. By configuring IFPs, network traffic can be flexibly managed, network security can be protected, and network performance can be optimized.

[0041] An egress field processor (EFP) is a functional module in a network device or software that processes fields as packets flow out of the network device. EFPs can be used to add, modify, or delete fields in packets to meet specific network requirements or policies. EFPs can be used in traffic management, security policy implementation, and packet forwarding functions in network devices. By configuring EFPs, customized processing of egress traffic can be achieved to achieve more flexible and secure network management.

[0042] An EM_FT is a stage in the ingress pipeline IPIPE between the virtual local area network field processor VFP and the ingress field processor IFP. The corresponding hardware resource is a table indexed by the hash value of the input key, specifically for flow table use.

[0043] The information processing method of the network device provided by the embodiments of the present disclosure can be applied to the application scenario as shown in FIG. 1, but is not limited thereto. FIG. 1 is a schematic diagram of an application scenario of the information processing method of the network device according to an embodiment of the present disclosure. In the application scenario as shown in FIG. 1, the server 10 can be a cloud. The server 10 can connect one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client devices 20 can include, but are not limited to, smartphones, tablet computers, notebook computers, palm computers, personal computers, smart home devices, vehicle-mounted devices, etc. The client devices collectively constitute a client opposite the server. An operation interface for obtaining network device corresponding packet loss messages can be deployed on the graphical user interface on the client device. The client device 20 can interact with the user through the graphical user interface to implement the information processing method of the network device provided by the embodiments of the present disclosure.

[0044] In the embodiments of the present disclosure, the system composed of the client device 20 and the server 10 can perform the following steps: if a user has a demand for obtaining a packet loss message corresponding to a network device, the user can perform corresponding operations in an operation interface on the client device 20 to obtain the packet loss message. The client device can obtain the packet loss message and send it to the server through the network. After the server receives the packet loss message, the server can perform the following steps: step S102, obtaining a packet loss message corresponding to a network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; step S104, encapsulating the packet loss message to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; step S106, calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result based on the packet loss reason in the encapsulation result to obtain a learning result, and performing analysis on the packet loss message in the encapsulation result by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with a packet flow of the packet loss message; and step S108, outputting the learning result and the analysis result. The learning result and the analysis result can be output to the client device, and the learning result and the analysis result can be displayed after being received by the client device.

[0045] Under the above operating environment, the present disclosure provides an information processing method of a network device as shown in FIG. 2. FIG. 2 is a flowchart of an information processing method of a network device according to an embodiment of the present disclosure. As shown in FIG. 2, the method can include the following steps:

[0046] Step S202, obtaining a packet loss message corresponding to a network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes.

[0047] In the technical solution provided in the foregoing step S202 of the present disclosure, the network device corresponding packet loss message can be acquired. The network device can include at least a router, a switch, a firewall, a gateway, a wireless access point, a network card, a modem, a network cable, an optical fiber, and the like. The network device has a data packet forwarding and filtering function. The following description takes the network device as a switch as an example. The switch can be a network device for transmitting data packets in a computer network. The switch can forward data packets from one port to another port according to a target address, thereby realizing communication between different devices. The packet loss message can be used to represent a message from which a data packet discarded by the network device comes. It should be noted that a message is data generated by an application layer. The message is encapsulated into a data packet for transmission in a network layer, that is, the network device transmits data packets. The packet loss message can be a message generated by the network device because of reasons such as network congestion, data packet damage, unreachability of a target device, and the like, which causes the network device to fail to transmit the data packet to the target device. The packet loss message can include at least a source address of the lost data packet, a target address, a number of lost data packets, and the like. The packet loss message can be recorded in a log of the network device. The packet loss message can be acquired from the log of the network device, so as to diagnose and process a fault of the network device.

[0048] It should be noted that the network device and the monitoring system can communicate through a remote procedure call (RPC) protocol, that is, the embodiment can transmit the packet loss information to the monitoring system through the RPC.

[0049] In step S204, the packet loss message is encapsulated to obtain a message encapsulation result. The message encapsulation result includes at least a packet loss reason of the data packet discarded by the network device and the packet loss message.

[0050] In the technical solution provided in the foregoing step S204 of the present disclosure, after the network device corresponding packet loss message is acquired, the acquired packet loss message can be encapsulated to obtain a message encapsulation result. The message encapsulation result can include at least a packet loss reason of the data packet discarded by the network device and the packet loss message. The packet loss reason can be a reason for loss of the data packet in the transmission process. The packet loss reason can include, but is not limited to, a network congestion reason, a transmission path fault reason, a network device fault reason, a data packet conflict reason, a signal interference reason, and the like.

[0051] In this embodiment, after the network device corresponding packet loss message is acquired, the packet loss message can be encapsulated according to a packet sampling (PSAMP) encapsulation format to obtain a message encapsulation result.

[0052] It should be noted that the PSAMP encapsulation format can be a standard format for network traffic sampling and monitoring. In the PSAMP encapsulation format, the sampled data packet is encapsulated into a specific data structure, which can include at least information such as sampling time, sampling location, and sampling reason.

[0053] Optionally, the embodiment encapsulates the packet loss message in the PSAMP encapsulation format, which can better track the packet loss traffic in network monitoring and analysis. By encapsulating the packet loss message into the PSAMP format, the packet loss reason can be better recorded and analyzed to configure and check the network device based on the packet loss reason and guide the recovery of the network device traffic.

[0054] In step S206, the hardware flow table of the network device is called to perform hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result, to obtain a learning result, and a software process of the network device is used to analyze the packet loss message in the message encapsulation result to obtain an analysis result, wherein the learning result is used to represent the statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with the packet traffic of the packet loss message.

[0055] In the technical solution provided by the above step S206 of the present disclosure, after the packet loss message is encapsulated to obtain the message encapsulation result, the hardware flow table of the network device is called to perform hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result, to obtain a learning result. And using the software process of the network device, the packet loss message in the message encapsulation result can be analyzed to obtain an analysis result. The learning result can be used to represent the statistical result of the packet loss reason in the packet loss message. The software process can be used to flexibly analyze the packet loss traffic according to user demand to obtain the analysis result. The analysis result can be used to represent information associated with the packet traffic of the packet loss message, and the analysis result can at least include information carried by the packet header of the data packet, such as message size and inner and outer five-tuple, and collected packet loss information, such as input port (Inport), output port (Outport), and packet loss reason.

[0056] It should be noted that the hardware flow table of the network device can be a rule table stored in the network device for implementing packet forwarding, which is a data structure in the network device and can be used to determine the forwarding path of the packet, quickly match and process network traffic, implement high-speed packet processing, and the flow table usually contains a series of rules for identifying specific traffic patterns and processing these patterns accordingly. The hardware flow table can at least include the source address, target address and port information of the packet to realize fast forwarding of the packet. The hardware flow table can be used to accelerate the forwarding process of the packet and improve the network performance. Alternatively, the network device of the embodiment can quickly match the target address of the packet based on the hardware flow table and forward according to the pre-set rules, avoiding the use of software to process the cumbersome steps of the packet forwarding process, thereby improving the forwarding speed and efficiency of the network device.

[0057] In this embodiment, hardware learning can be the use of machine learning algorithms in hardware devices to achieve intelligent functions. Hardware learning of the packet loss message based on the packet loss reason can automatically adjust the network traffic processing strategy by learning different packet loss reasons to improve network performance and stability.

[0058] Alternatively, the embodiment can support full packet loss reason-based cumulative statistics by hardware learning of the packet loss flow based on the packet loss reason. That is, the packet loss situation is counted and accumulated during network communication, and classified and analyzed according to the packet loss reason. Through the above-mentioned manner, the packet loss reason occurring in network communication can be determined more comprehensively, so that targeted measures can be taken to improve the quality and stability of network communication, and the method of supporting full packet loss reason-based cumulative statistics can timely discover and solve network problems, and improve network performance and user experience.

[0059] Alternatively, after the packet loss message is encapsulated to obtain the message encapsulation result, the packet loss message can be parsed by a software process to obtain a parsing result. That is, the embodiment can fully utilize the hardware flow learning capability to learn the packet loss message based on the packet loss reason to support full packet loss reason-based cumulative statistics, and also can fully utilize the software flow parsing capability to parse the packet loss message, thereby realizing the technical effect of counting the full packet loss flow when parsing the packet loss message corresponding to the network device.

[0060] It should be noted that in the related art, when analyzing the packet loss message corresponding to the network device, the packet loss message is learned by hardware or software, and the full amount of cumulative statistics based on the packet loss reason cannot be supported, and there is a technical problem that the full amount of packet loss flow cannot be counted when analyzing the packet loss message corresponding to the network device. Based on the packet loss reason in the message encapsulation result, the packet loss message in the message encapsulation result is learned by hardware, and the packet loss message is analyzed by fully utilizing the software flow analysis capability, which solves the technical problem that the full amount of packet loss flow cannot be counted when analyzing the packet loss message corresponding to the network device.

[0061] Step S208, output the learning result and the analysis result.

[0062] In the technical solution provided by the above step S208 of the present disclosure, after learning the packet loss message in the message encapsulation result by hardware to obtain a learning result, and analyzing the packet loss message in the message encapsulation result to obtain an analysis result, the obtained learning result and analysis result can be output to achieve the purpose of checking the configuration information of the network device according to the learning result and the analysis result, and recovering the traffic of the network device.

[0063] By the above steps S202 to S208 of the present disclosure, the packet loss message corresponding to the network device is encapsulated to obtain a message encapsulation result carrying a packet loss reason and a packet loss message, the hardware flow table of the network device is called, and the packet loss message in the message encapsulation result is learned by hardware based on the packet loss reason in the message encapsulation result. The cumulative statistics based on the full amount of packet loss reasons can be supported, and the packet loss message is analyzed by using the software process of the network device, and the analysis result obtained is used to represent the information associated with the packet traffic (for example, the packet loss flow) of the packet loss message, thereby achieving the purpose of supporting full amount of packet loss reason statistics while flexibly analyzing the packet loss flow, and realizing the technical effect of counting the full amount of packet loss flow when analyzing the packet loss message corresponding to the network device, and solving the technical problem that the full amount of packet loss flow cannot be counted when analyzing the packet loss message corresponding to the network device.

[0064] The above method of the embodiment will be further introduced below.

[0065] As an optional implementation, step S204, encapsulating the packet loss message to obtain a message encapsulation result, includes: determining the message content of the packet loss message; and encapsulating the packet loss content according to the identification information in the encapsulation format to obtain the message encapsulation result, wherein the packet loss reason in the message encapsulation result is identified by the identification information.

[0066] In this embodiment, after obtaining the packet loss message corresponding to the network device, the message content of the packet loss message can be determined. After determining the message content of the packet loss message, the message content can be encapsulated according to the identification information in the encapsulation format to obtain a message encapsulation result. In the message encapsulation result, the packet loss reason is identified by the identification information, that is, the identification information can be an identifier for identifying the packet loss reason, which can be represented by Drop Reason.

[0067] Optionally, the Drop Reason can be an identifier indicating the packet loss reason of the packet loss message. By adding the Drop Reason field in the message and identifying it in the message header or tail, the packet loss reason can be quickly identified, thereby improving the reliability and performance of the network and reducing the impact of packet loss on communication quality. When the message is lost, the message content of the packet loss message can be encapsulated using the Drop Reason to obtain a message encapsulation result, so as to better identify and handle the packet loss situation.

[0068] As an optional implementation, the message content is encapsulated according to the identification information in the encapsulation format to obtain a message encapsulation result, including: based on the message flow of the packet loss message, the message content is truncated to obtain truncated message content; and the truncated message content is encapsulated according to the identification information to obtain the message encapsulation result.

[0069] In this embodiment, after determining the message content of the packet loss message, the message content can be truncated based on the message flow of the packet loss message to obtain truncated message content. Further, the truncated message content is encapsulated according to the identification information to obtain the message encapsulation result. The message flow can be the amount of lost data caused by network congestion, device failure or other reasons during network communication, which can be referred to as packet loss flow.

[0070] It should be noted that the increase of the packet loss flow will cause the network performance to decline, affecting the accuracy and integrity of data transmission. Network problems can be discovered in time by monitoring the packet loss flow, and appropriate measures can be taken to optimize and adjust the network equipment to improve the stability and reliability of the network.

[0071] Optionally, based on the packet loss flow of the packet loss message, the message content can be truncated to obtain truncated message content. That is, truncating the message content can save the bandwidth of the CPU, so that more packet loss flow can be parsed by software. Further, the truncated message content is encapsulated according to the identification information Drop Reason to obtain the message encapsulation result.

[0072] As an optional implementation, the packet content is truncated based on the packet flow of the packet loss message to obtain the truncated packet content, including: determining a flow category of the packet flow of the packet loss message, wherein the flow category is used to indicate that the packet flow of the packet loss message is generated on a pipeline of the network device and / or a memory management unit of the network device; and truncating the packet content according to a truncation rule matched with the flow category to obtain the truncated packet content.

[0073] In this embodiment, after the network device corresponding packet loss message is obtained, the flow category of the packet flow of the packet loss message can be determined. After the flow category of the packet flow is determined, the packet content can be truncated according to the truncation rule matched with the determined flow category to obtain the truncated packet content. The flow category can be used to indicate that the packet flow of the packet loss message is generated on the pipeline of the network device and / or the memory management unit of the network device, for example, the flow category can be that the packet flow of the packet loss message is generated on the ingress pipeline IPIPE, the packet flow of the packet loss message is generated on the egress pipeline EPIPE, and the packet flow of the packet loss message is generated on the memory management unit MMU, which is only an example and does not limit the form of the flow category. The truncation rule can be a standard for truncating the packet content.

[0074] Optionally, after the flow category of the packet flow is determined, in the case that the flow category is that the packet flow of the packet loss message is generated on the ingress pipeline IPIPE and the memory management unit MMU, the packet content can be truncated according to the truncation rule matched with the flow category, for example, the truncation rule can be to truncate the packet content of the first packet size to obtain the truncated packet content.

[0075] Optionally, after the flow category of the packet flow is determined, in the case that the flow category is that the packet flow of the packet loss message is generated on the egress pipeline EPIPE, the packet content can be truncated according to the truncation rule matched with the flow category, for example, the truncation rule can be the truncation rule in the egress field processor EFP to truncate the packet content to obtain the truncated packet content.

[0076] As an optional implementation, the pipeline includes an ingress pipeline of the network device, and the packet content is truncated according to the truncation rule matched with the flow category to obtain the truncated packet content, including: in the case that the flow category is a first flow category, the packet content is truncated according to a unit length of the packet loss message to obtain a sub-packet loss message of the unit length, wherein the first flow category is used to indicate that the packet flow of the packet loss message is generated on the ingress pipeline and the memory management unit, and the truncated packet content includes the sub-packet loss message of the unit length.

[0077] In the embodiment, the pipeline includes an ingress pipeline IPIPE of the network device, after determining the traffic class of the packet flow of the packet loss message, in the case that the traffic class is the packet flow of the packet loss message generated on the ingress pipeline IPIPE and the memory management unit MMU, the packet content is truncated according to the cell length of the packet loss message, and a sub-packet loss message of the cell length is obtained. The cell length of the packet loss message can be represented by the cell length. In the case that the traffic class is the packet flow of the packet loss message generated on the ingress pipeline IPIPE and the memory management unit MMU, the packet content can be truncated according to the truncation rule of truncating the first cell length of the packet content, and the truncated packet content can include at least the sub-packet loss message of the cell length.

[0078] It should be noted that in network communication, the packet size can be represented by the cell length, that is, the data is divided into fixed-size cells, that is, cells.

[0079] Optionally, for the case that the traffic class is the packet flow of the packet loss message generated on the ingress pipeline IPIPE and the memory management unit MMU, the truncation rule matched with the traffic class is to truncate the first cell length of the packet content, and the packet content is truncated to obtain a sub-packet loss message of the cell length.

[0080] Optionally, after obtaining the sub-packet loss message of the cell length, the sub-packet loss message can be encapsulated according to the PSAMP encapsulation format to obtain a packet encapsulation result. It should be noted that when the sub-packet loss message is encapsulated according to the PSAMP encapsulation format, the PSAMP encapsulation format carries identification information Drop Reason, Inport / Outport and the like. Therefore, the obtained sub-packet loss message of the cell length can be redirected to the loopback interface belonging to the Inport in the PSAMP encapsulation format.

[0081] As an optional implementation, the pipeline includes an egress pipeline of the network device, and the packet content is truncated according to the truncation rule matched with the traffic class to obtain the truncated packet content, including: in the case that the traffic class is a second traffic class, the packet content is matched by using an egress field processor of the network device, wherein the second traffic class is used to represent that the packet flow of the packet loss message is generated on the egress pipeline; and the sub-packet content matched successfully in the packet content is determined as the truncated packet content.

[0082] In this embodiment, the pipeline includes an egress pipeline EPIPE of the network device, after determining the traffic class of the packet flow of the packet loss message, in the case that the traffic class of the packet flow of the packet loss message is generated on the egress pipeline EPIPE, the packet content can be matched by the egress field processor of the network device, and the sub-packet content matched in the packet content is determined as the truncated packet content. In the case that the traffic class of the packet flow of the packet loss message is generated on the egress pipeline EPIPE, the matching drop (Drop) rule can be issued in the egress field processor EFP, that is, the packet content is matched when the traffic class matches the rule.

[0083] Optionally, in the case that the traffic class of the packet flow of the packet loss message is generated on the egress pipeline EPIPE, the truncated rule matched with the traffic class is a rule of matching Drop for loopback issued in the EFP, and the packet content before the EFP is truncated. That is, a rule of matching Drop is issued in the EFP, and the packet content before the EFP is truncated when passing through the rule. Further, the packet content is truncated according to the truncated rule, and the truncated packet content can be obtained.

[0084] Optionally, after the packet content before the EFP is truncated to obtain the truncated packet content, the truncated packet content also needs to be encapsulated according to the PSAMP encapsulation format to obtain the packet encapsulation result. That is, the truncated packet content is looped back in the PSAMP encapsulation format.

[0085] It should be noted that the packet loss message in this embodiment needs to pass through the switching chip (pipeline) twice. The above-mentioned processing process of truncating and encapsulating the packet loss flow in the case that the traffic class of the packet flow of the packet loss message is generated on the ingress pipeline IPIPE, the egress pipeline EPIPE, and the memory management unit MMU is the process of the packet loss message passing through the switching chip pipeline for the first time, which can be called First Pass. The process of the packet loss message passing through the switching chip pipeline for the second time can be called Second Pass.

[0086] As an optional implementation, in step S206, the hardware flow table of the network device is called to perform hardware learning on the packet loss message in the packet encapsulation result based on the packet loss reason in the packet encapsulation result, to obtain a learning result, including: determining at least one target packet loss message matched with the hardware flow table from the packet encapsulation result, wherein the target packet loss message is used to represent a packet allowed to be hardware-learned in the packet encapsulation result; and performing hardware learning on the target packet loss message based on the packet loss reason corresponding to the target packet loss message, to obtain the learning result.

[0087] In this embodiment, after the packet encapsulation result is obtained, at least one target packet of the lost packets matched with the hardware flow table can be determined from the obtained packet encapsulation result. After the at least one target packet of the lost packets matched with the hardware flow table is determined, the target packet of the lost packets is learned based on the packet loss reason corresponding to the target packet of the lost packets, and a learning result is obtained. The target packet of the lost packets can be used to represent a packet in the packet encapsulation result that is allowed to be learned by hardware, and the target packet of the lost packets can be a packet that passes through the pipeline for the second time from the loopback interface. The target packet of the lost packets can be referred to as a MoD Second Pass packet or a Second Pass packet.

[0088] It should be noted that the Second Pass packet can be hit by issuing a corresponding rule in the virtual local area network field processor (VFP) and performing an action of enabling the hardware flow table learning.

[0089] It should be noted that, since the EM_FT stage is a stage between the VFP and the IFP in the IPIPE, the hardware resource corresponding to the EM_FT stage is a table with the hash value of the input key as the index, which is specially used for the flow table. Therefore, the VFP can enable the EM_FT through a special action, and the key of the EM_FT is set as the Drop Reason, so that the VFP enables the packet of the lost packets to be learned based on the Drop Reason.

[0090] Optionally, after the packet encapsulation result is obtained, the target packet of the lost packets matched with the hardware flow table can be determined from the obtained packet encapsulation result, that is, the MoD Second Pass packet can be matched in the VFP. Further, the target packet of the lost packets is learned based on the packet loss reason corresponding to the target packet of the lost packets, that is, the hardware flow table learning of the EM_FT stage is enabled, and a learning result is obtained.

[0091] As an optional implementation, the target packet of the lost packets is learned based on the packet loss reason corresponding to the target packet of the lost packets, and a learning result is obtained, including: obtaining the packet loss flow of the target packet of the lost packets; and learning the packet loss flow of the target packet of the lost packets based on the packet loss reason corresponding to the target packet of the lost packets, and obtaining the learning result.

[0092] In this embodiment, after the target packet of the lost packets matched with the hardware flow table is determined from the packet encapsulation result, the packet loss flow of the target packet of the lost packets can be obtained. After the packet loss flow of the target packet of the lost packets is obtained, the packet loss flow of the target packet of the lost packets can be learned based on the packet loss reason corresponding to the target packet of the lost packets, and a learning result is obtained.

[0093] Optionally, after obtaining the packet loss flow of the target packet loss message, the packet loss flow of the target packet loss message obtained can be learned based on the packet loss reason corresponding to the target packet loss message, that is, enabling the EM_FT to learn the packet loss flow based on the Drop Reason.

[0094] In the related art, after obtaining the packet loss message corresponding to the network device, the obtained packet loss message needs to be looped back for the Second Pass. It should be noted that in order to make the Second Pass flow table obtain the packet size, the packet loss message cannot be truncated. In the processing process of the Second Pass, the packet loss flow is distinguished and analyzed by hardware, and the flexibility and specification are limited, and cannot be flexibly analyzed like stateless packet filtering. However, this method can reduce the traffic uploaded to the CPU by uploading only the first packet to the CPU.

[0095] Further, the method for learning the packet loss flow by hardware provided in the related art cannot support full-amount cumulative statistics based on the packet loss reason. When the packet loss flow is distinguished and analyzed by hardware, the supported fields and widths are limited, and the packet loss flow specification is limited by the hardware flow table specification. In addition, since the packet loss message is not truncated for the Second Pass in this method, when there is a jumbo packet loss of a relatively concentrated pipeline of the port, the bandwidth pressure of this method will be transferred from 10 gigabyte (G) CPU bandwidth to 200G per pipe loopback port bandwidth, compared with the stateless scheme.

[0096] However, in the embodiments of the present disclosure, in order to solve the problem that the full-amount packet loss flow cannot be counted when the packet loss message corresponding to the network device is analyzed in the related art, the hardware learning capability is fully utilized to learn the packet loss message based on the packet loss reason, to support full-amount cumulative statistics based on the packet loss reason, and the software flow analysis capability is fully utilized to analyze the packet loss message, to achieve the purpose of flexibly analyzing the packet loss flow while supporting full-amount statistics based on the packet loss reason, thereby realizing the technical effect of counting the full-amount packet loss flow when the packet loss message corresponding to the network device is analyzed.

[0097] As an optional implementation, the method further includes: mirroring the target packet loss message; and analyzing, by a software process of the network device, the packet loss message in the encapsulation result to obtain an analysis result, including: analyzing, by the software process, the mirrored packet loss message to obtain the analysis result.

[0098] In this embodiment, after determining the target packet loss packet matched with the hardware flow table from the packet encapsulation result, the determined target packet loss packet can be mirrored. Further, the mirrored packet loss packet can be parsed by the software processor of the network device to obtain a parsing result.

[0099] It should be noted that the MoD Second Pass packet can be matched by the ingress field processor IFP, and the matched MoD Second Pass packet can be mirrored to the CPU.

[0100] Optionally, after determining the target packet loss packet matched with the hardware flow table from the packet encapsulation result, the determined target packet loss packet can be mirrored. The packet loss packet mirrored to the CPU can be processed by the software processor, and the packet loss flow can be flexibly parsed according to user requirements to obtain a parsing result. The obtained parsing result can at least include information carried by the packet header of the packet, such as packet size, inner and outer five-tuple, and packet loss information collected from the exchange chip pipeline, such as First Pass Inport / Outport and packet loss reason.

[0101] In the related art, after obtaining the packet loss packet corresponding to the network device, the packet loss packet is truncated and mirrored to the CPU for software analysis. In the case that the packet flow of the traffic category of the packet loss packet is generated on the ingress pipeline IPIPE and the memory management unit MMU, the packet loss flow is directly truncated and mirrored to the CPU after the First Pass. In the case that the packet flow of the traffic category of the packet loss packet is generated on the egress pipeline EPIPE, the packet loss flow is truncated and looped back for the Second Pass and then mirrored to the CPU. The flow mirrored to the CPU will be parsed by the software for packet loss, and can provide packet header information such as packet size, inner and outer five-tuple, Inport / Outport, etc.

[0102] However, the method of truncating the packet loss packet and mirroring it to the CPU for software analysis provided in the related art cannot support full-quantity accumulation statistics based on packet loss reasons, and the packet loss packet is truncated and uploaded to the CPU. When there are a large number of packet losses, especially when the size of the packet loss flow is mixed, it may cause packet loss omission. In addition, the above method relies on the software process to listen to the CPU port to parse the mirrored MoD packet. When the software process is slow to start, the packet loss information before starting will be lost.

[0103] However, in the embodiments of the present disclosure, in order to solve the problem in the prior art that the full loss packet flow cannot be counted when the network device corresponding loss packet is parsed, the loss packet is encapsulated to obtain a packet encapsulation result carrying the loss packet reason and the loss packet, the loss packet is learned by hardware based on the loss packet reason and the full loss packet reason based counting can be supported by fully utilizing the hardware flow learning capability, and the loss packet is parsed by software, so that the purpose of flexibly parsing the loss flow while supporting the full loss packet reason based counting is achieved, thereby realizing the technical effect of counting the full loss packet flow when the network device corresponding loss packet is parsed.

[0104] As an optional implementation, the method further includes: prohibiting deletion of the learning result, and / or maintaining an effective state of the learning result.

[0105] In this embodiment, after the loss packet in the packet encapsulation result is learned by hardware based on the loss packet reason in the packet encapsulation result to obtain a learning result, the learning result can be prohibited from being deleted, and / or the effective state of the learning result can be maintained, that is, the learning result is prohibited from being aged.

[0106] Optionally, in this embodiment, the EM_FT can be used to learn the loss flow by hardware based on the loss packet reason, and the learned loss flow mode and information will not be invalid or deleted due to the passage of time, that is, the learning result will not be aged. At the same time, in the process of learning the loss flow by hardware, since the number of Drop Reasons is limited and the hardware specification is sufficient to cover the loss packet reason, there is no specification problem.

[0107] As an optional implementation, the method further includes: periodically calling the hardware flow table of the network device by using a software process, and learning the loss packet by hardware based on the loss packet reason in the packet encapsulation result to obtain a learning result.

[0108] In this embodiment, the hardware flow table is periodically read by using a software process, the loss packet is learned by hardware based on the loss packet reason in the packet encapsulation result to obtain a learning result, and the learning result includes the counting result of the loss packet reason, that is, the full loss packet counting based on the Drop Reason can be obtained.

[0109] In the embodiments of the present disclosure, the packet loss message corresponding to the network device is encapsulated to obtain a packet encapsulation result carrying a packet loss reason and a packet loss message, a hardware flow table of the network device is called, and the packet loss message in the packet encapsulation result is learned based on the packet loss reason in the packet encapsulation result, which can support full accumulation statistics based on the packet loss reason. The packet loss message is analyzed by using a software process of the network device, and an analysis result obtained is used to represent information associated with a packet flow (packet loss flow) of the packet loss message, so that the purpose of flexibly analyzing the packet loss flow while supporting full packet loss reason-based statistics is achieved, and the technical effect of statistically analyzing the full packet loss flow when analyzing the packet loss message corresponding to the network device is achieved, thereby solving the technical problem that the full packet loss flow cannot be statistically analyzed when the packet loss message corresponding to the network device is analyzed.

[0110] The embodiments of the present disclosure also provide an information checking method of a network device. FIG. 3 is a flowchart of an information checking method of a network device according to an embodiment of the present disclosure. As shown in FIG. 3, the method can include the following steps:

[0111] In step S302, a packet loss message corresponding to the network device is obtained in response to an information checking instruction of the network device, wherein the packet loss message is used to represent a packet from which a data packet discarded by the network device comes.

[0112] In the technical solution provided in the above step S302 of the present disclosure, the packet loss message corresponding to the network device can be obtained in response to the information checking instruction of the network device. The information checking instruction can be an instruction for checking the configuration information of the network device. The packet loss message can be used to represent a packet from which a data packet discarded by the network device comes. The packet loss message can be a packet generated because the network device receives a data packet but cannot transmit the data packet to a target device due to reasons such as network congestion, data packet damage, and unreachability of the target device. The packet loss message can at least include information such as a source address of the lost data packet, a target address, and a number of lost data packets. The packet loss message can be recorded in a log of the network device, and the packet loss message can be obtained from the log of the network device to diagnose and process faults of the network device.

[0113] In this embodiment, the packet loss information can be transmitted to the monitoring system through RPC in response to the information checking instruction of the network device, thereby providing a basis for subsequent configuration checking of the network device.

[0114] In step S304, the packet loss message is encapsulated to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes a packet loss reason and a packet loss message of the data packet discarded by the network device.

[0115] In the technical solution provided in step S304 of the present disclosure, after obtaining the packet loss message corresponding to the network device in response to the information inspection instruction of the network device, the obtained packet loss message can be encapsulated to obtain a packet encapsulation result. The packet encapsulation result can at least include the packet loss reason of the network device discarding the data packet and the packet loss message. The packet loss reason can be the reason for the loss of the data packet during transmission, and the packet loss reason can include but is not limited to network congestion reason, transmission path failure reason, network device failure reason, data packet collision reason, and signal interference reason.

[0116] In this embodiment, after obtaining the packet loss message corresponding to the network device in response to the information inspection instruction of the network device, the packet loss message can be encapsulated according to the PSAMP encapsulation format to obtain a packet encapsulation result.

[0117] It should be noted that the PSAMP encapsulation format can be a standard format for network traffic sampling and monitoring. In the PSAMP encapsulation format, the sampled data packet is encapsulated into a specific data structure, which can at least include information such as sampling time, sampling location, and sampling reason.

[0118] Optionally, encapsulating the packet loss message in the PSAMP encapsulation format can better track the packet loss traffic in network monitoring and analysis. By encapsulating the packet loss message into the PSAMP format, the packet loss reason can be better recorded and analyzed to configure and check the network device based on the packet loss reason and guide the recovery of the network device traffic.

[0119] Step S306, calling the hardware flow table of the network device, based on the packet loss reason in the packet encapsulation result, performing hardware learning on the packet loss message in the packet encapsulation result to obtain a learning result, and using the software process of the network device to analyze the packet loss message in the packet encapsulation result to obtain an analysis result, wherein the learning result is used to represent the statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent the information associated with the packet flow of the packet loss message.

[0120] In the technical solution provided in step S306 of the present disclosure, after the packet loss packet is encapsulated to obtain the packet encapsulation result, the hardware flow table of the network device is called, and based on the packet loss reason in the packet encapsulation result, the packet loss packet in the packet encapsulation result can be learned by hardware to obtain a learning result. And using the software process of the network device, the packet loss packet in the packet encapsulation result can be parsed to obtain a parsing result. The learning result can be used to represent the statistical result of the packet loss reason in the packet loss packet. The software process can be used to flexibly parse the packet loss traffic according to user demand to obtain a parsing result. The parsing result can be used to represent information associated with the packet flow of the packet loss packet. The parsing result can at least include information carried by the packet header of the data packet, such as packet size and inner and outer five-tuple, and collected packet loss information, such as Inport, Outport and packet loss reason.

[0121] It should be noted that the hardware flow table of the network device can be a rule table stored in the network device for implementing data packet forwarding, which can be used to determine the forwarding path of the data packet. The hardware flow table can at least include the source address, target address and port information of the data packet to realize fast forwarding of the data packet. The hardware flow table can be used to accelerate the forwarding process of the data packet and improve the network performance. Alternatively, the network device of the embodiment can quickly match the target address of the data packet based on the hardware flow table and forward according to the pre-set rules, avoiding the use of software to process the cumbersome steps of the data packet forwarding process, thereby improving the forwarding speed and efficiency of the network device.

[0122] In this embodiment, hardware learning can be an intelligent function realized by using machine learning algorithms in hardware devices. Based on the packet loss reason, the packet loss packet is learned by hardware, and by learning different packet loss reasons, the network traffic processing strategy can be automatically adjusted to improve the network performance and stability.

[0123] Alternatively, the embodiment can support full accumulation statistics based on the packet loss reason by learning the packet loss flow based on the packet loss reason. That is, the packet loss is counted and accumulated during network communication, and is classified and analyzed according to the packet loss reason. Through the above-mentioned manner, the packet loss reason in network communication can be determined more comprehensively, so as to take targeted measures to improve the quality and stability of network communication, and the method of supporting full accumulation statistics based on the packet loss reason can timely find and solve network problems, and improve network performance and user experience.

[0124] Optionally, after the packet loss packet is encapsulated to obtain the packet encapsulation result, the packet loss packet can be parsed by using the software processor to obtain a parsing result. That is, this embodiment fully utilizes the hardware flow learning capability to learn the packet loss packet based on the packet loss reason to support almost full amount of cumulative statistics based on the packet loss reason, and can also fully utilize the software flow parsing capability to parse the packet loss packet, thereby realizing the technical effect of counting full amount of packet loss flow when parsing the packet loss packet corresponding to the network device.

[0125] In step S308, the configuration information of the network device is checked by using the learning result and the parsing result to obtain a checking result.

[0126] In the technical solution provided by the above step S308 of the present disclosure, after the packet loss packet in the packet encapsulation result is learned by hardware to obtain a learning result, and the packet loss packet in the packet encapsulation result is parsed to obtain a parsing result, the obtained learning result and parsing result can be used to check the configuration information of the network device to obtain a checking result. The configuration information can at least include VLAN configuration information, port configuration information, link aggregation configuration information, routing configuration information, management configuration information, system configuration information, and hardware configuration information of the network device. The checking result can be used to indicate the state of the configuration information of the network device, for example, whether the configuration information of the network device is correct.

[0127] In this embodiment, after the packet loss packet is encapsulated to obtain the packet encapsulation result carrying the packet loss reason and the packet loss packet, the hardware flow table of the network device is called, the packet loss packet in the packet encapsulation result is learned by hardware based on the packet loss reason in the packet encapsulation result to obtain a learning result, to support full amount of cumulative statistics based on the packet loss reason, and the packet loss packet is parsed by fully utilizing the software process of the network device to obtain a parsing result. After that, the obtained learning result and parsing result can be used to check the configuration information of the network device to obtain a checking result. Further based on the obtained checking result, the configuration information of the network device can be adjusted or modified.

[0128] Through the steps S302 to S308 provided in the disclosure, in response to the information checking instruction of the network device, the packet loss message corresponding to the network device is obtained, the packet loss message corresponding to the network device is encapsulated to obtain a packet encapsulation result carrying the packet loss reason and the packet loss message, the hardware flow table of the network device is called, and the packet loss message in the packet encapsulation result is learned based on the packet loss reason in the packet encapsulation result. The full amount of cumulative statistics based on the packet loss reason can be supported, and the packet loss message is analyzed by using the software process of the network device, and the analysis result obtained is used to represent the information associated with the packet flow (packet loss flow) of the packet loss message. Therefore, the purpose of flexibly analyzing the packet loss flow while supporting the full amount of packet loss reason statistics is achieved, and the technical effect of statistically analyzing the full amount of packet loss flow when analyzing the packet loss message corresponding to the network device is realized, and the technical problem that the full amount of packet loss flow cannot be statistically analyzed when analyzing the packet loss message corresponding to the network device is solved.

[0129] The disclosure also provides a network device traffic recovery method, and FIG. 4 is a flowchart of a network device traffic recovery method according to an embodiment of the disclosure. As shown in FIG. 4, the method can include the following steps:

[0130] Step S402, in response to a traffic recovery instruction of a network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to represent a packet from which a data packet discarded by the network device comes.

[0131] In the technical solution provided in the step S402 of the disclosure, in response to the traffic recovery instruction of the network device, the packet loss message corresponding to the network device can be obtained. The traffic recovery instruction can be an instruction for recovering the traffic of the network device. The packet loss message can be used to represent a packet from which a data packet discarded by the network device comes. The packet loss message can be a packet generated when the network device receives a data packet but fails to transmit the data packet to a target device due to reasons such as network congestion, data packet damage, and unreachability of the target device. The packet loss message can at least include the source address, target address, and number of lost data packets, and the packet loss message can be recorded in the log of the network device. The packet loss message can be obtained from the log of the network device to diagnose and handle the fault of the network device.

[0132] In this embodiment, in response to the traffic recovery instruction of the network device, the packet loss information can be transmitted to the monitoring system through RPC to provide a basis for subsequent guidance to recover the traffic of the network device.

[0133] Step S404, encapsulating the packet loss message to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes the packet loss reason and the packet loss message of the data packet discarded by the network device.

[0134] In the technical solution provided in step S404 of the present disclosure, after obtaining the packet loss message corresponding to the network device in response to the traffic recovery instruction of the network device, the obtained packet loss message can be encapsulated to obtain a packet encapsulation result. The packet encapsulation result can at least include the packet loss reason of the network device discarding the data packet and the packet loss message. The packet loss reason can be the reason for the loss of the data packet during transmission, and the packet loss reason can include but is not limited to network congestion reason, transmission path failure reason, network device failure reason, data packet collision reason, and signal interference reason.

[0135] In this embodiment, after obtaining the packet loss message corresponding to the network device in response to the information checking instruction of the network device, the packet loss message can be encapsulated according to the PSAMP encapsulation format to obtain a packet encapsulation result.

[0136] It should be noted that the PSAMP encapsulation format can be a standard format for network traffic sampling and monitoring. In the PSAMP encapsulation format, the sampled data packet is encapsulated into a specific data structure, which can at least include information such as sampling time, sampling location, and sampling reason.

[0137] Optionally, encapsulating the packet loss message in the PSAMP encapsulation format in this embodiment can better track the packet loss traffic in network monitoring and analysis. By encapsulating the packet loss message into the PSAMP format, the packet loss reason can be better recorded and analyzed to configure and check the network device based on the packet loss reason and guide the recovery of the network device traffic.

[0138] Step S406, calling the hardware flow table of the network device, based on the packet loss reason in the packet encapsulation result, performing hardware learning on the packet loss message in the packet encapsulation result to obtain a learning result, and using the software process of the network device to analyze the packet loss message in the packet encapsulation result to obtain an analysis result, wherein the learning result is used to represent the statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent the information associated with the packet traffic of the packet loss message.

[0139] In the technical solution provided in step S406 of the present disclosure, after the packet loss packet is encapsulated to obtain the packet encapsulation result, the hardware flow table of the network device is called, and based on the packet loss reason in the packet encapsulation result, the packet loss packet in the packet encapsulation result can be learned by hardware to obtain a learning result. And using the software process of the network device, the packet loss packet in the packet encapsulation result can be parsed to obtain a parsing result. The learning result can be used to represent the statistical result of the packet loss reason in the packet loss packet. The software process can be used to flexibly parse the packet loss traffic according to user demand to obtain a parsing result. The parsing result can be used to represent information associated with the packet flow of the packet loss packet. The parsing result can at least include information carried by the packet header of the data packet, such as packet size and inner and outer five-tuple, and collected packet loss information, such as Inport, Outport and packet loss reason.

[0140] It should be noted that the hardware flow table of the network device can be a rule table stored in the network device for implementing data packet forwarding, which can be used to determine the forwarding path of the data packet. The hardware flow table can at least include the source address, target address and port information of the data packet to realize fast forwarding of the data packet. The hardware flow table can be used to accelerate the forwarding process of the data packet and improve the network performance. Alternatively, the network device of the embodiment can quickly match the target address of the data packet based on the hardware flow table and forward according to the pre-set rules, avoiding the use of software to process the cumbersome steps of the data packet forwarding process, thereby improving the forwarding speed and efficiency of the network device.

[0141] In this embodiment, hardware learning can be an intelligent function realized by using machine learning algorithms in hardware devices. Based on the packet loss reason, the packet loss packet is learned by hardware, and by learning different packet loss reasons, the network traffic processing strategy can be automatically adjusted to improve the network performance and stability.

[0142] Alternatively, the embodiment can support full-quantity cumulative statistics based on the packet loss reason by learning the packet loss flow based on the packet loss reason. That is, the packet loss is counted and accumulated during network communication, and is classified and analyzed according to the packet loss reason. Through the above-mentioned manner, the packet loss reason occurring in network communication can be determined more comprehensively, so that targeted measures can be taken to improve the quality and stability of network communication. The method of supporting full-quantity cumulative statistics based on the packet loss reason can timely discover and solve network problems, and improve network performance and user experience.

[0143] Optionally, after the packet loss packet is encapsulated to obtain the packet encapsulation result, the packet loss packet can be parsed by using the software processor to obtain a parsing result. That is, in this embodiment, based on the packet loss reason, the hardware flow learning capability is fully utilized to learn the packet loss packet by hardware to support almost full amount of cumulative statistics based on the packet loss reason. At the same time, the software flow parsing capability is fully utilized to parse the packet loss packet, thereby realizing the technical effect that the full amount of packet loss flow is counted when the network device corresponding packet loss packet is parsed.

[0144] In step S408, the traffic of the network device is recovered by using the learning result and the parsing result.

[0145] In the technical solution provided by the above step S408 of the present disclosure, after the packet loss packet in the packet encapsulation result is learned by hardware to obtain a learning result, and the packet loss packet in the packet encapsulation result is parsed to obtain a parsing result, the learning result and the parsing result obtained can be used to recover the traffic of the network device.

[0146] In this embodiment, after the packet loss packet is encapsulated to obtain the packet encapsulation result carrying the packet loss reason and the packet loss packet, the hardware flow table of the network device is called, the packet loss packet in the packet encapsulation result is learned by hardware based on the packet loss reason in the packet encapsulation result to obtain a learning result, to support full amount of cumulative statistics based on the packet loss reason, and the packet loss packet is parsed by using the software process of the network device to obtain a parsing result. After that, the learning result and the parsing result obtained can be used to recover the traffic of the network device.

[0147] Through the above steps S402 to S408 of the present disclosure, in response to the traffic recovery instruction of the network device, the network device corresponding packet loss packet is obtained, the network device corresponding packet loss packet is encapsulated to obtain the packet encapsulation result carrying the packet loss reason and the packet loss packet, the hardware flow table of the network device is called, and the packet loss packet in the packet encapsulation result is learned by hardware based on the packet loss reason in the packet encapsulation result to support full amount of cumulative statistics based on the packet loss reason. The software process of the network device is used to parse the packet loss packet, and the obtained parsing result is used to represent information associated with the packet loss packet (packet loss flow). Thus, the purpose of flexibly parsing the packet loss flow while supporting full amount of packet loss reason based statistics is achieved, thereby realizing the technical effect that the full amount of packet loss flow is counted when the network device corresponding packet loss packet is parsed, and solving the technical problem that the full amount of packet loss flow cannot be counted when the network device corresponding packet loss packet is parsed.

[0148] According to the embodiment of the present disclosure, an embodiment of an information processing system of a network device is also provided. FIG. 5 is a schematic diagram of an information processing system of a network device according to an embodiment of the present disclosure. As shown in FIG. 5, the information processing system 500 of the network device can include an information input end 501, a switching chip 502, a processor 503, and an output end 504.

[0149] The information input end 501 is configured to obtain a packet loss message corresponding to the network device, wherein the packet loss message is used to represent a message from which a data packet discarded by the network device comes.

[0150] In this embodiment, the information input end 501 can be a front panel port of the network device, which can be used to obtain the packet loss message corresponding to the network device. The packet loss message can be used to represent a message from which a data packet discarded by the network device comes. The packet loss message can be a message generated when the network device receives a data packet but fails to transmit the data packet to a target device due to reasons such as network congestion, data packet damage, unreachability of the target device, etc. The packet loss message can at least include information such as a source address of the lost data packet, a target address, and a number of lost data packets. The packet loss message can be recorded in a log of the network device, and can be obtained from the log of the network device for fault diagnosis and processing of the network device.

[0151] The switching chip 502 is configured to encapsulate the packet loss message to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes a packet loss reason of the network device discarding the data packet and the packet loss message; call a hardware flow table of the network device, and perform hardware learning on the packet loss message in the packet encapsulation result based on the packet loss reason in the packet encapsulation result to obtain a learning result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message.

[0152] In this embodiment, the packet encapsulation result at least includes the packet loss reason of the network device discarding the data packet and the packet loss message. The packet loss reason can be a reason for loss of the data packet during transmission, which can include but is not limited to reasons such as network congestion, transmission path failure, network device failure, data packet collision, and signal interference. The learning result can be used to represent a statistical result of the packet loss reason in the packet loss message.

[0153] Optionally, after the information input end 501 obtains the packet loss message corresponding to the network device, the switching chip 502 encapsulates the packet loss message according to a PSAMP encapsulation format to obtain a packet encapsulation result.

[0154] It should be noted that the PSAMP encapsulation format can be a standard format for network traffic sampling and monitoring. In the PSAMP encapsulation format, the sampled data packet is encapsulated into a specific data structure, which can include at least information such as sampling time, sampling location, and sampling reason.

[0155] Optionally, in this embodiment, the exchange chip 502 encapsulates the packet loss message in the PSAMP encapsulation format, which can better track the packet loss traffic in network monitoring and analysis. By encapsulating the packet loss message into the PSAMP format, the packet loss reason can be better recorded and analyzed to configure and check the network device based on the packet loss reason and guide the recovery of the network device traffic.

[0156] It should be noted that the hardware flow table of the network device can be a rule table stored in the network device for implementing packet forwarding, which can be used to determine the forwarding path of the packet. The hardware flow table can at least include the source address, destination address and port information of the packet to realize fast forwarding of the packet. The hardware flow table can be used to accelerate the forwarding process of the packet and improve the network performance. Optionally, based on the hardware flow table, the network device of this embodiment can quickly match the destination address of the packet and forward according to the pre-set rules, avoiding the use of software to process the tedious steps of packet forwarding process, thereby improving the forwarding speed and efficiency of the network device.

[0157] Optionally, hardware learning can be the use of machine learning algorithms in hardware devices to realize intelligent functions. The exchange chip 502 performs hardware learning on the packet loss message based on the packet loss reason, and by learning different packet loss reasons, it can automatically adjust the network traffic processing strategy to improve network performance and stability.

[0158] Optionally, in this embodiment, the exchange chip 502 performs hardware learning on the packet loss flow based on the packet loss reason, which can support full-quantity accumulation statistics based on the packet loss reason. That is, the packet loss situation is counted and accumulated during network communication, and classified and analyzed according to the packet loss reason. Through the above-mentioned manner, the packet loss reason in network communication can be determined more comprehensively, so as to take targeted measures to improve the quality and stability of network communication, and the method of supporting full-quantity accumulation statistics based on the packet loss reason can timely discover and solve network problems, and improve network performance and user experience.

[0159] The processor 503 is configured to parse the packet loss message in the encapsulation result by using a software process of the network device to obtain a parsing result, wherein the parsing result is used to represent information associated with the packet flow of the packet loss message.

[0160] In this embodiment, the software processor can be used to flexibly parse the packet loss traffic according to the user demand, and obtain a parsing result. The parsing result can be used to represent information associated with the packet flow of the packet loss message, and at least can include information carried by the packet header of the data packet, such as the message size and the inner and outer five-tuple, and collected packet loss information, such as Inport, Outport and packet loss reason.

[0161] Optionally, the processor 503 uses the software processor to parse the packet loss message and obtains a parsing result. That is, this embodiment fully utilizes the hardware flow learning capability to learn the packet loss message based on the packet loss reason, to support almost full-amount of cumulative statistics based on the packet loss reason, and at the same time, fully utilizes the software flow parsing capability to parse the packet loss message, thereby realizing the technical effect of counting the full-amount of packet loss flow when parsing the packet loss message corresponding to the network device.

[0162] The output end 504 is configured to output the learning result and the parsing result.

[0163] Optionally, after learning the packet loss message in the packet encapsulation result by hardware and obtaining a learning result, and parsing the packet loss message in the packet encapsulation result and obtaining a parsing result, the obtained learning result and parsing result can be outputted, so as to check the configuration information of the network device according to the learning result and the parsing result, and restore the traffic of the network device.

[0164] In this embodiment, the packet loss message corresponding to the network device is obtained through the information input end 501, wherein the packet loss message is used to represent the message from which the data packet discarded by the network device comes. The packet loss message is encapsulated by the switch chip 502 to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes the packet loss reason of the data packet discarded by the network device and the packet loss message; the hardware flow table of the network device is called, and the packet loss message in the packet encapsulation result is learned by hardware based on the packet loss reason in the packet encapsulation result, to obtain a learning result, wherein the learning result is used to represent the statistical result of the packet loss reason in the packet loss message. The packet loss message in the encapsulation result is parsed by the processor 503 using the software process of the network device, to obtain a parsing result, wherein the parsing result is used to represent information associated with the packet flow of the packet loss message. The learning result and the parsing result are outputted through the output end 504, thereby realizing the technical effect of counting the full-amount of packet loss flow when parsing the packet loss message corresponding to the network device, and solving the technical problem that the full-amount of packet loss flow cannot be counted when parsing the packet loss message corresponding to the network device.

[0165] The above system of this embodiment is further introduced as follows.

[0166] As an optional implementation, the packet flow of the packet loss message passes through the ingress pipeline of the network device and / or the memory management unit of the network device, and the switch chip is configured to truncate the packet content of the packet loss message according to the cell length of the packet loss message, to obtain a cell-length sub-packet loss message, to encapsulate the cell-length sub-packet loss message according to the identification information in the encapsulation format, to obtain a packet encapsulation result, and to redirect the packet encapsulation result to the loopback port to which the ingress end of the switch chip belongs.

[0167] In this embodiment, when the packet flow of the packet loss message passes through the ingress pipeline IPIPE of the network device and / or the memory management unit MMU of the network device, the switch chip can be configured to truncate the packet content of the packet loss message according to the cell length of the packet loss message, to obtain a cell-length sub-packet loss message. After truncating the packet content of the packet loss message to obtain the cell-length sub-packet loss message, the cell-length sub-packet loss message can be encapsulated according to the identification information in the encapsulation format, to obtain a packet encapsulation result, and the packet encapsulation result can be redirected to the loopback port to which the ingress end of the switch chip belongs. The cell length of the packet loss message can be represented by the cell length.

[0168] Optionally, when the packet flow of the packet loss message passes through the ingress pipeline IPIPE of the network device and / or the memory management unit MMU of the network device, the switch chip can truncate the first cell-length packet content of the packet loss message to obtain a cell-length sub-packet loss message.

[0169] Optionally, after obtaining the cell-length sub-packet loss message, the cell-length sub-packet loss message can be encapsulated according to the PSAMP encapsulation format to obtain a packet encapsulation result. It should be noted that when the cell-length sub-packet loss message is encapsulated according to the PSAMP encapsulation format, the PSAMP encapsulation format carries identification information Drop Reason, Inport / Outport, and the like. Therefore, the obtained cell-length sub-packet loss message can be redirected to the loopback port to which the Inport belongs in the PSAMP encapsulation format.

[0170] As an optional implementation, the packet flow of the packet loss message passes through the ingress pipeline of the network device and / or the memory management unit of the network device, and the switch chip is configured to truncate the packet content of the packet loss message according to the cell length of the packet loss message, to obtain a cell-length sub-packet loss message, to encapsulate the cell-length sub-packet loss message according to the identification information in the encapsulation format, to obtain a packet encapsulation result, and to redirect the packet encapsulation result to the loopback port to which the ingress end of the switch chip belongs.

[0171] In this embodiment, in the case that the packet flow of the packet loss message passes through the egress pipeline EPIPE of the network device, the switch chip can at least include an egress field processor EFP. The egress field processor EFP can be used to match the packet content of the packet loss message, determine the sub-packet content matched in the packet content as the truncated packet content, encapsulate the truncated packet content according to the identification information in the encapsulation format to obtain a packet encapsulation result, and redirect the packet encapsulation result to the loopback interface belonging to the ingress end of the switch chip.

[0172] Optionally, in the case that the packet flow of the packet loss message passes through the egress pipeline EPIPE of the network device, the packet content can be matched according to the rule of matching and dropping (Drop) issued in the egress field processor EFP, that is, when the traffic class matches the rule, the packet content is matched.

[0173] Optionally, in the case that the packet flow of the packet loss message passes through the egress pipeline EPIPE of the network device, the rule of matching and dropping (Drop) for loopback can be issued in the EFP to truncate the packet content before the EFP. That is, a rule of matching and dropping (Drop) is issued in the EFP, and the packet content before the EFP is truncated when passing through the rule. Further, the packet content is truncated according to the truncation rule to obtain the truncated packet content.

[0174] Optionally, after the packet content before the EFP is truncated to obtain the truncated packet content according to the rule of matching and dropping (Drop) for loopback issued in the EFP, the truncated packet content also needs to be encapsulated according to the PSAMP encapsulation format to obtain a packet encapsulation result. That is, the truncated packet content is looped back in the PSAMP encapsulation format.

[0175] As an optional implementation, the switch chip includes: a virtual local area network field processor configured to determine at least one target packet loss message matched with the hardware flow table from the packet encapsulation result, wherein the target packet loss message is used to represent a packet in the packet encapsulation result that allows hardware learning; and a traffic tracker configured to perform hardware learning on the packet loss flow of the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain a learning result.

[0176] In this embodiment, the target packet loss message can be used to represent a packet in the packet encapsulation result that allows hardware learning, and the target packet loss message can be a packet that passes through the pipeline for the second time from the loopback interface, which can be referred to as a MoD Second Pass message or a Second Pass message.

[0177] It should be noted that the Second Pass packet can be hit and enabled hardware flow table learning behavior of the VFP by issuing corresponding rules.

[0178] It should be noted that, since the EM FT stage is a stage between the VFP and the IFP in the IPIPE, the corresponding hardware resource is a table with the hash value of the input key as the index, which is specially used for the flow table. Therefore, the VFP can enable EM FT through a special action, and set the key of EM FT as Drop Reason, so as to realize the VFP enabling the packet based on Drop Reason learning.

[0179] Optionally, the VFP can be used to determine the target packet from the packet encapsulation result, that is, the MoD Second Pass packet can be matched in the VFP. Further, the traffic tracer EM FT learns the target packet based on the packet reason corresponding to the target packet, that is, enables the hardware flow table learning of the EM FT stage, and obtains the learning result.

[0180] As an optional implementation, the switch chip comprises: an ingress field processor for mirroring processing of the target packet; wherein the processor is configured to analyze the mirrored packet by using a software process to obtain an analysis result.

[0181] It should be noted that the MoD Second Pass packet can be matched by the ingress field processor IFP, and the matched MoD Second Pass packet can be mirrored to the CPU.

[0182] Optionally, the ingress field processor IFP can be used to mirror process the determined target packet. The processor can process the mirrored packet to the CPU by using a software process, and can flexibly analyze the packet flow according to user requirements to obtain an analysis result. The obtained analysis result can at least include information carried by the packet header of the packet, such as packet size, inner and outer five-tuple, and packet information collected from the pipeline of the switch chip, such as First Pass Inport / Outport, packet reason, etc.

[0183] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure, such as data for verification, are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0184] Currently, in today's large-scale network, as the scale of switch deployment becomes larger and larger, and the functions of the switch become more and more diverse, the configuration of the switch also becomes more and more complex, resulting in more and more diverse reasons for packet loss on the switch. Therefore, the demand for providing packet loss flow information and packet loss reasons is becoming more and more urgent, based on which the switch can be configured to check and guide to recover the traffic of the switch.

[0185] In the related art, after obtaining the packet loss message of the switch, the packet loss message is truncated and mirrored to the CPU for software analysis. For the case that the packet flow of the packet loss message is generated on the ingress pipeline IPIPE and the memory management unit MMU, the packet loss flow is directly truncated and mirrored to the CPU in the First Pass. For the case that the packet flow of the packet loss message is generated on the egress pipeline EPIPE, the packet loss flow is truncated and looped back for the Second Pass and then mirrored to the CPU. The flow mirrored to the CPU will be analyzed by software for packet loss, which can provide message size, inner and outer five-tuple, Inport / Outport, and other message header information.

[0186] However, the method of truncating the packet loss message and mirroring it to the CPU for software analysis provided in the related art cannot support full-amount cumulative statistics based on packet loss reasons, and the packet loss message is truncated and sent to the CPU, which may cause packet loss omission when there are a large number of packet losses, especially when large and small packet loss flows are mixed. In addition, the above method relies on a software process to listen to the CPU port to analyze the MoD message mirrored, and when the software process is slow to start, the packet loss information before starting will be lost.

[0187] In addition, in the related art, after obtaining the packet loss message of the switch, the obtained packet loss message needs to be looped back for the Second Pass. In order to make the Second Pass flow table get the message size, the packet loss message cannot be truncated. In the processing process of the Second Pass, the packet loss flow is distinguished and analyzed by hardware, and the flexibility and specification are limited, which cannot be flexibly analyzed like stateless. However, this method can reduce the flow sent to the CPU by sending only the first packet to the CPU.

[0188] The method for hardware learning of the packet loss stream provided in the related art cannot support full accumulation statistics based on the packet loss reason, and when the packet loss stream is distinguished and analyzed by hardware, the supported fields and width are limited, and the packet loss stream specification is limited by the hardware flow table specification. In addition, in the method, the packet loss message is not truncated for second pass, and when there are jumbo packet losses of relatively concentrated pipelines of the port, the bandwidth pressure of the method will be transferred from 10G CPU bandwidth to 200G per pipe loopback port bandwidth compared with the stateless scheme.

[0189] In summary, in the related art, after obtaining the packet loss message of the switch, the packet loss message is directly truncated and mirrored to the CPU for software analysis. However, this method cannot support full accumulation statistics based on the packet loss reason, and cannot perform statistics on full packet loss streams when analyzing the packet loss message corresponding to the network device.

[0190] However, in the embodiments of the present disclosure, the packet loss message can be encapsulated to obtain a message encapsulation result carrying the packet loss reason, and the hardware flow learning capability is fully utilized to perform hardware learning on the packet loss message based on the packet loss reason, to support full accumulation statistics based on the packet loss reason, and the software flow analysis capability is fully utilized to analyze the packet loss message, to achieve the purpose of flexible analysis of the packet loss stream while supporting full accumulation statistics based on the packet loss reason, thereby realizing the technical effect of statistics on full packet loss streams when analyzing the packet loss message corresponding to the network device.

[0191] The present disclosure provides a method for counting switch packet loss reasons and packet loss streams, which solves the technical problem that full packet loss streams cannot be counted when analyzing the packet loss message corresponding to the network device, and distinguishes from the traditional solution that cannot support full accumulation statistics based on the packet loss reason, so that the switch can provide packet loss stream information and packet loss reason statistics, and users can rely on this capability to configure and check the switch and guide the recovery of the switch traffic.

[0192] The present disclosure fully utilizes the hardware flow learning capability and software flow analysis capability of the switch chip, distinguishes the packet loss reason statistics from the specific packet loss stream information, can flexibly analyze the packet loss stream while recording full accumulation statistics based on the packet loss reason, achieves the purpose of flexible analysis of the packet loss stream while supporting full accumulation statistics based on the packet loss reason, and further realizes the technical effect of statistics on full packet loss streams when analyzing the packet loss message corresponding to the network device, thereby solving the technical problem that full packet loss streams cannot be counted when analyzing the packet loss message corresponding to the network device.

[0193] The above method of this embodiment is further described below.

[0194] FIG. 6 is a schematic diagram of a method of counting packet loss reasons and analyzing packet loss traffic according to an embodiment of the present disclosure. As shown in FIG. 6, the method of counting packet loss reasons and analyzing packet loss traffic can include at least a front panel port 601 of a switch, an ingress pipeline 602, a memory management unit 603, an egress pipeline 604, a virtual local area network field processor 605, a traffic tracer 606, an ingress field processor 607, and a software process 608. The front panel port of the switch can be used to obtain packet loss messages of the switch.

[0195] In this embodiment, the packet loss message needs to pass through the switch chip pipeline twice. In the process of the first pass of the packet loss message, for the packet loss traffic of the ingress pipeline IPIPE or the memory management unit MMU, the first cell length of the message content is intercepted and redirected to the loopback port belonging to the Inport in the PSAMP encapsulation format. The PSAMP encapsulation format carries information such as Drop Reason and Inport / Outport. That is, the processing process of the packet loss traffic of the ingress pipeline IPIPE or the memory management unit MMU is to intercept the first cell length of the message content and transmit it to the loopback port belonging to the Inport in the PSAMP encapsulation format. In this process, the PSAMP encapsulation format also carries information such as Drop Reason and Inport / Outport, so as to monitor and analyze the packet loss situation and send the related information to the designated loopback port for processing.

[0196] For the packet loss traffic of the egress pipeline EPIPE, a rule of matching Drop for loopback is issued in the egress field processor EFP, so that the packet loss traffic before the EFP is also truncated and looped back in the PSAMP encapsulation format. That is, the processing process of the packet loss traffic of the EPIPE is that a rule of matching Drop is issued in the egress field processor EFP, and when the data stream before the EFP passes through the rule, it will be truncated and looped back in the PSAMP encapsulation format. That is, the rule will capture the EPIPE packet loss traffic and re-encapsulate it into the PSAMP format for loopback, so as to further analyze and process the packet loss data.

[0197] In the process of the second time of the lost packet passing through the switch chip pipeline, i.e. Second Pass, the loopback port corresponding to the lost packet flow First Pass pipeline is taken as an ingress port, and the MoD Second Pass packet is matched by a virtual local area network field processor VFP to enable the hardware flow table learning of the EM FT stage.

[0198] It should be noted that the MoD Second Pass packet refers to the second time of passing through the pipeline from the loopback port. The Second Pass packet can be hit in the VFP by issuing corresponding rules to perform the behavior of enabling the hardware flow table learning.

[0199] It should be noted that the EM FT is a stage between the VFP and the IFP in the IPIPE, and the corresponding hardware resource is a table taking the hash value of the input key as the index, which is specially used for the flow table. The VFP can enable the EM FT through a special action, and the key of the EM FT is set as the Drop Reason to enable the VFP to enable the lost packet to learn based on the Drop Reason.

[0200] The EM FT learns the flow based on the Drop Reason in hardware, and does not age. Since the number of Drop Reasons is limited, there is no specification problem. The ingress field processor IFP matches the MoD Second Pass packet to mirror to the CPU through the CPU port.

[0201] The software process Software processor processes the lost packet mirrored to the CPU, and can flexibly analyze the lost packet flow according to user requirements, can provide the information carried by the packet header (packet size, inner and outer five-tuple, etc.), and the lost packet information collected from the pipeline (such as First Pass Inport / Outport, lost packet reason). In addition, the software process Software processor periodically reads the hardware flow table to obtain the full amount of lost packet statistics based on the Drop Reason.

[0202] The embodiment truncates the packet in the first pass loopback and learns the packet loss reason based on the hardware flow table in the second pass, and can support almost full Drop Reason-based cumulative statistics. The Drop Reason-based statistics are maintained in the hardware flow table, and even if the software process for packet loss flow analysis starts slowly, the packet loss statistics will not be lost. Moreover, the packet loss reasons are limited, and the hardware specifications are sufficient to cover the packet loss reasons. After the packet loss packet is truncated, the packet is mirrored to the CPU in the second pass for packet analysis by software, which can flexibly obtain the packet header information, and the packet loss flow table is maintained by software, and the specifications are not limited.

[0203] The embodiment fully utilizes the hardware flow learning capability and software flow analysis capability of the switching chip, and separates the packet loss reason statistics from the specific packet loss flow information, which can record full Drop Reason-based statistics while collecting packet loss flow for flexible analysis, achieving the purpose of supporting full Drop Reason-based statistics while collecting packet loss flow for flexible analysis.

[0204] In the embodiment of the present disclosure, the packet loss packet corresponding to the network device is encapsulated to obtain a packet encapsulation result carrying the packet loss reason and the packet loss packet, the hardware flow table of the network device is called, and the packet loss packet in the packet encapsulation result is learned based on the packet loss reason in the packet encapsulation result, which can support full Drop Reason-based cumulative statistics, and the software process of the network device is used to analyze the packet loss packet, and the analysis result is used to represent information associated with the packet flow (packet loss flow) of the packet loss packet, thereby achieving the purpose of supporting full Drop Reason-based statistics while flexibly analyzing the packet loss flow, and further achieving the technical effect of counting full packet loss flow when analyzing the packet loss packet corresponding to the network device, and solving the technical problem that full packet loss flow cannot be counted when analyzing the packet loss packet corresponding to the network device.

[0205] FIG. 7 is a structural block diagram of a computing environment of an information processing method of a network device according to an embodiment of the present disclosure. As shown in FIG. 7, the computing environment 701 includes a plurality of (710-1, 710-2, … are used in the figure to show) computing nodes (such as servers) running on a distributed network. The computing nodes all contain local processing and memory resources, and end users 702 can remotely run application programs or store data in the computing environment 701. The application programs can be provided as a plurality of services 720-1, 720-2, 720-3 and 720-4 in the computing environment 701, which represent services “A”, “D”, “E” and “H” respectively.

[0206] End users 702 can provide and access services through a web browser or other software application on a client, in some embodiments, provisioning and / or requests of end users 702 can be provided to ingress gateway 730. Ingress gateway 730 can include a corresponding proxy to handle provisioning and / or requests for services (one or more services provided in computing environment 701).

[0207] Services are provided or deployed according to various virtualization technologies supported by computing environment 701. In some embodiments, services can be provided according to virtual machine (VM)-based virtualization, container-based virtualization, and / or the like. VM-based virtualization can be emulating a real computer by initializing a virtual machine to execute programs and applications without directly touching any actual hardware resources. While a virtual machine is virtualized, according to container-based virtualization, a container can be launched to virtualize an entire operating system (OS) so that multiple workloads can run on a single OS instance.

[0208] In one embodiment of container-based virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). For example, as shown in FIG. 7, service 720-2 can be equipped with one or more Pods 740-1, 740-2, …, 740-N (collectively, Pods). A Pod can include a proxy 745 and one or more containers 742-1, 742-2, …, 742-M (collectively, containers). The one or more containers in a Pod handle requests related to one or more corresponding functions of the service, and proxy 745 generally controls network functions related to the service, such as routing, load balancing, and the like. Other services can also be equipped with Pods similar to the Pods.

[0209] In operation, executing a user request from end user 702 can require invoking one or more services in computing environment 701, and executing one or more functions of a service can require invoking one or more functions of another service. As shown in FIG. 7, service “A” 720-1 receives a user request from end user 702 from ingress gateway 730, service “A” 720-1 can invoke service “D” 720-2, and service “D” 720-2 can request service “E” 720-3 to execute one or more functions.

[0210] The computing environment described above can be a cloud computing environment, the allocation of resources is managed by a cloud service, allowing the development of functions without considering the implementation, adjustment or expansion of servers. The computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be divided into a set of functions that can automatically scale independently, rather than expanding a single hardware device to handle potential loads.

[0211] According to the embodiments of the present disclosure, an information processing apparatus for implementing the information processing method of the network device shown in FIG. 2 is also provided.

[0212] FIG. 8 is a schematic diagram of an information processing apparatus of a network device according to an embodiment of the present disclosure. As shown in FIG. 8, the information processing apparatus 800 of the network device can include a first obtaining component 802, a first encapsulating component 804, a first processing component 806, and an output component 808.

[0213] The first obtaining component 802 is configured to obtain a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a packet from which a data packet discarded by the network device comes.

[0214] The first encapsulating component 804 is configured to encapsulate the packet loss message to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message.

[0215] The first processing component 806 is configured to invoke a hardware flow table of the network device, perform hardware learning on the packet loss message in the packet encapsulation result based on the packet loss reason in the packet encapsulation result to obtain a learning result, and perform analysis on the packet loss message in the packet encapsulation result by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with packet flow of the packet loss message.

[0216] The output component 808 is configured to output the learning result and the analysis result.

[0217] It should be noted that the first obtaining component 802, the first encapsulating component 804, the first processing component 806, and the output component 808 correspond to steps S202 to S208, and the four components have the same instances and application scenarios as the corresponding steps, but are not limited to the above disclosed contents. It should be noted that the above components can be hardware components or software components stored in a memory (for example, the memory 1104) and processed by one or more processors (for example, the processors 1102a, 1102b, …, 1102n), and the above components can also be a part of the apparatus and can run in the computer terminal A.

[0218] In the information processing apparatus of the network device, the packet loss message corresponding to the network device is acquired by the first acquisition component 802, wherein the packet loss message is used to indicate the message from which the data packet discarded by the network device comes. The packet loss message is encapsulated by the first encapsulation component 804 to obtain a message encapsulation result, wherein the message encapsulation result at least includes the packet loss reason of the data packet discarded by the network device and the packet loss message. The hardware flow table of the network device is called by the first processing component 806, the packet loss message in the message encapsulation result is learned based on the packet loss reason in the message encapsulation result to obtain a learning result, and the packet loss message in the message encapsulation result is analyzed by using the software process of the network device to obtain an analysis result, wherein the learning result is used to indicate the statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate the information associated with the message flow of the packet loss message. The learning result and the analysis result are output by the output component 808, thereby realizing the technical effect that the full packet loss flow is counted when the packet loss message corresponding to the network device is analyzed, and solving the technical problem that the full packet loss flow cannot be counted when the packet loss message corresponding to the network device is analyzed.

[0219] According to the embodiments of the present disclosure, an information checking apparatus of a network device for implementing the information checking method of the network device shown in FIG. 3 is also provided.

[0220] FIG. 9 is a schematic diagram of an information checking apparatus of a network device according to an embodiment of the present disclosure. As shown in FIG. 9, the information checking apparatus 900 of the network device can include a second acquisition component 902, a second encapsulation component 904, a second processing component 906, and a checking component 908.

[0221] The second acquisition component 902 is configured to acquire, in response to an information checking instruction of a network device, a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes.

[0222] The second encapsulation component 904 is configured to encapsulate the packet loss message to obtain a message encapsulation result, wherein the message encapsulation result at least includes a packet loss reason of a data packet discarded by the network device and the packet loss message.

[0223] The second processing component 906 is configured to call a hardware flow table of the network device, learn the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result to obtain a learning result, and analyze the packet loss message in the message encapsulation result by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with a message flow of the packet loss message.

[0224] The checking component 908 is configured to check the configuration information of the network device by using the learning result and the analysis result, to obtain a checking result.

[0225] Here, the second obtaining component 902, the second encapsulating component 904, the second processing component 906, and the checking component 908 correspond to steps S302 to S308, and the four components have the same instances and application scenarios as the corresponding steps, but are not limited to the above disclosed contents. It should be noted that the above components can be hardware components or software components stored in a memory (for example, the memory 1104) and processed by one or more processors (for example, the processors 1102a, 1102b, …, 1102n), or the above components can be a part of the apparatus and run in the computer terminal A.

[0226] In the information checking apparatus of the network device, the second obtaining component 902 is configured to obtain a packet loss message corresponding to the network device in response to an information checking instruction of the network device, where the packet loss message is used to indicate a message from which a data packet discarded by the network device comes. The second encapsulating component 904 is configured to encapsulate the packet loss message to obtain a message encapsulation result, where the message encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message. The second processing component 906 is configured to call a hardware flow table of the network device, and perform hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result to obtain a learning result, and perform analysis on the packet loss message in the message encapsulation result by using a software process of the network device to obtain an analysis result, where the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message flow of the packet loss message. The checking component 910 is configured to check configuration information of the network device by using the learning result and the analysis result to obtain a checking result, thereby achieving a technical effect that the full-packet loss flow is counted when the packet loss message corresponding to the network device is analyzed, and solving a technical problem that the full-packet loss flow cannot be counted when the packet loss message corresponding to the network device is analyzed.

[0227] According to the embodiments of the present disclosure, a network device traffic recovery apparatus for implementing the network device traffic recovery method shown in FIG. 4 is also provided.

[0228] FIG. 10 is a schematic diagram of a network device traffic recovery apparatus according to an embodiment of the present disclosure. As shown in FIG. 10, the network device traffic recovery apparatus 1000 can include a third obtaining component 1002, a third encapsulating component 1004, a third processing component 1006, and a recovery component 1008.

[0229] The third obtaining component 1002 is configured to obtain a packet loss message corresponding to the network device in response to a traffic recovery instruction of the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes.

[0230] The third encapsulating component 1004 is configured to encapsulate the packet loss message to obtain an encapsulation result of the message, wherein the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message.

[0231] The third processing component 1006 is configured to invoke a hardware flow table of the network device, perform hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result, and perform analysis on the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message traffic of the packet loss message.

[0232] The recovery component 1008 is configured to recover the traffic of the network device by using the learning result and the analysis result.

[0233] It should be noted that the third obtaining component 1002, the third encapsulating component 1004, the third processing component 1006 and the recovery component 1008 correspond to steps S402 to S408, and the four components have the same instances and application scenarios as the corresponding steps, but are not limited to the above disclosed contents. It should be noted that the above components can be hardware components or software components stored in a memory (for example, the memory 1104) and processed by one or more processors (for example, the processors 1102a, 1102b, …, 1102n), and the above components can also be run in the computer terminal A as a part of the apparatus.

[0234] In the traffic recovery apparatus of the network device, the third obtaining component 1002 obtains a packet loss message corresponding to the network device in response to a traffic recovery instruction of the network device, where the packet loss message is used to indicate a message from which a data packet discarded by the network device comes. The third encapsulating component 1004 encapsulates the packet loss message to obtain an encapsulation result of the message, where the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message. The third processing component 1006 invokes a hardware flow table of the network device, and performs hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result. In addition, the third processing component 1006 analyzes the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, where the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message traffic of the packet loss message. The recovery component 1008 recovers the traffic of the network device by using the learning result and the analysis result, thereby achieving a technical effect that the full packet loss flow is counted when the packet loss message corresponding to the network device is analyzed, and solving a technical problem that the full packet loss flow cannot be counted when the packet loss message corresponding to the network device is analyzed.

[0235] The embodiment of the present disclosure can provide a computer terminal, which can be any one of computer terminal devices in a computer terminal group. Alternatively, in the embodiment, the computer terminal can be replaced by a mobile terminal or other terminal device.

[0236] Alternatively, in the embodiment, the computer terminal can be located in at least one of a plurality of network devices of a computer network.

[0237] In the embodiment, the computer terminal can execute program codes of the following steps in the information processing method of the network device: obtaining a packet loss message corresponding to the network device, where the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the message, where the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; invoking a hardware flow table of the network device, and performing hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result; and analyzing the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, where the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message traffic of the packet loss message; and outputting the learning result and the analysis result.

[0238] Optionally, FIG. 11 is a structural block diagram of a computer terminal according to an embodiment of the present disclosure. As shown in FIG. 11, the computer terminal A can include one or more (only one is shown in the figure) processors 1102, a memory 1104, and a transmission device 1106.

[0239] The memory can be configured to store software programs and components, such as program instructions / components corresponding to the information processing method and apparatus of the network device in the embodiments of the present disclosure. The processor can execute various function applications and data processing by running the software programs and components stored in the memory, that is, implement the information processing method of the network device described above. The memory can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, and the remote memory can be connected to the terminal A through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0240] Optionally, the processor can further execute program codes of the following steps: determining the packet content of the packet loss packet; and encapsulating the packet content according to the identification information in the encapsulation format to obtain a packet encapsulation result, wherein the packet loss reason in the packet encapsulation result is identified by the identification information.

[0241] Optionally, the processor can further execute program codes of the following steps: truncating the packet content based on the packet flow of the packet loss packet to obtain truncated packet content; and encapsulating the truncated packet content according to the identification information to obtain a packet encapsulation result.

[0242] Optionally, the processor can further execute program codes of the following steps: determining a flow category of the packet flow of the packet loss packet, wherein the flow category is used to indicate that the packet flow of the packet loss packet is generated on a pipeline of the network device and / or a memory management unit of the network device; and truncating the packet content according to a truncation rule matched with the flow category to obtain truncated packet content.

[0243] Optionally, the processor can further execute program codes of the following steps: in a case where the flow category is a first flow category, truncating the packet content according to a unit length of the packet loss packet to obtain a unit-length sub-packet loss packet, wherein the first flow category is used to indicate that the packet flow of the packet loss packet is generated on an ingress pipeline and on a memory management unit, and the truncated packet content includes the unit-length sub-packet loss packet.

[0244] Optionally, the processor can further execute program codes of the following steps: in a case that the traffic class is a second traffic class, matching the message content by using an egress field processor of the network device, wherein the second traffic class is used to represent that the message traffic of the packet loss message is generated on an egress pipeline; determining the sub-message content matched successfully in the message content as the truncated message content.

[0245] Optionally, the processor can further execute program codes of the following steps: determining at least one target packet loss message matched with the hardware flow table from the message encapsulation result, wherein the target packet loss message is used to represent the message allowed to be hardware learned in the message encapsulation result; performing hardware learning on the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain a learning result.

[0246] Optionally, the processor can further execute program codes of the following steps: obtaining the packet loss traffic of the target packet loss message; and performing learning on the packet loss traffic of the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain a learning result.

[0247] Optionally, the processor can further execute program codes of the following steps: performing mirroring processing on the target packet loss message; and performing analysis on the packet loss message in the encapsulation result by using a software process of the network device to obtain an analysis result, including: performing analysis on the mirrored packet loss message by using the software process to obtain the analysis result.

[0248] Optionally, the processor can further execute program codes of the following steps: prohibiting deletion of the learning result, and / or maintaining an effective state of the learning result.

[0249] Optionally, the processor can further execute program codes of the following steps: calling the hardware flow table of the network device, performing hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result to obtain a learning result, including: periodically calling the hardware flow table of the network device by using the software process, performing hardware learning on the packet loss message based on the packet loss reason in the message encapsulation result to obtain a learning result.

[0250] The processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the message, wherein the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result, and performing analysis on the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message flow of the packet loss message; and outputting the learning result and the analysis result.

[0251] The processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the message, wherein the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result, and performing analysis on the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message flow of the packet loss message; and outputting the learning result and the analysis result.

[0252] The processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result of the message, wherein the encapsulation result of the message at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result of the message based on the packet loss reason in the encapsulation result of the message to obtain a learning result, and performing analysis on the packet loss message in the encapsulation result of the message by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message flow of the packet loss message; and outputting the learning result and the analysis result.

[0253] Those skilled in the art can understand that the structure shown in FIG. 11 is only schematic, and the computer terminal A can also be a terminal device such as a smart phone (for example, an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a Personal Access Display (PAD), etc. FIG. 11 does not limit the structure of the computer terminal A. For example, the computer terminal A can further include more or fewer components (for example, a network interface, a display device, etc.) than those shown in FIG. 11, or have a different configuration from that shown in FIG. 11.

[0254] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device by a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.

[0255] The embodiments of the present disclosure further provide a computer readable storage medium. Optionally, in the present embodiment, the computer readable storage medium can be used to save the program code executed by the information processing method of the network device provided by the above embodiments.

[0256] Optionally, in the present embodiment, the computer readable storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0257] Optionally, in the present embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; calling a hardware flow table of the network device, and performing hardware learning on the packet loss message in the encapsulation result based on the packet loss reason in the encapsulation result to obtain a learning result; and using a software process of the network device to analyze the packet loss message in the encapsulation result to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with a packet flow of the packet loss message; and outputting the learning result and the analysis result.

[0258] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining the packet content of the packet loss message; and encapsulating the packet content according to the identification information in the encapsulation format to obtain a packet encapsulation result, wherein the packet loss reason in the packet encapsulation result is identified by the identification information.

[0259] Optionally, the computer readable storage medium can further execute program codes of the following steps: truncating the packet content based on the packet flow of the packet loss message to obtain truncated packet content; and encapsulating the truncated packet content according to the identification information to obtain a packet encapsulation result.

[0260] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining a flow category of the packet flow of the packet loss message, wherein the flow category is used to indicate that the packet flow of the packet loss message is generated on a pipeline of the network device and / or a memory management unit of the network device; and truncating the packet content according to a truncation rule matched with the flow category to obtain truncated packet content.

[0261] Optionally, the computer readable storage medium can further execute program codes of the following steps: in a case where the flow category is a first flow category, truncating the packet content according to a unit length of the packet loss message to obtain a unit-length sub-packet loss message, wherein the first flow category is used to indicate that the packet flow of the packet loss message is generated on an ingress pipeline and on a memory management unit, and the truncated packet content includes the unit-length sub-packet loss message.

[0262] Optionally, the computer readable storage medium can further execute program codes of the following steps: in a case where the flow category is a second flow category, matching the packet content by using an egress field processor of the network device, wherein the second flow category is used to indicate that the packet flow of the packet loss message is generated on an egress pipeline; and determining sub-packet content matched successfully in the packet content as the truncated packet content.

[0263] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining at least one target packet loss message matched with the hardware flow table from the packet encapsulation result, wherein the target packet loss message is used to indicate a packet allowed to be learned by hardware in the packet encapsulation result; and learning the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain a learning result.

[0264] Optionally, the computer readable storage medium can further execute program codes of the following steps: obtaining packet loss flow of the target packet loss message; and learning the packet loss flow of the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain a learning result.

[0265] Optionally, the computer readable storage medium can further execute program codes for the following steps: mirroring the target packet loss message; and using a software process of the network device to analyze the packet loss message in the encapsulation result to obtain an analysis result, including: using the software process to analyze the mirrored packet loss message to obtain the analysis result.

[0266] Optionally, the computer readable storage medium can further execute program codes for the following steps: disabling deletion of the learning result, and / or maintaining an effective state of the learning result.

[0267] Optionally, the computer readable storage medium can further execute program codes for the following steps: calling a hardware flow table of the network device, and performing hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result to obtain a learning result, including: periodically calling the hardware flow table of the network device using the software process, and performing hardware learning on the packet loss message based on the packet loss reason in the message encapsulation result to obtain the learning result.

[0268] As an optional example, the computer readable storage medium is configured to store program codes for the following steps: in response to an information checking instruction of the network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to represent a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain a message encapsulation result, wherein the message encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; calling a hardware flow table of the network device, and performing hardware learning on the packet loss message in the message encapsulation result based on the packet loss reason in the message encapsulation result to obtain a learning result, and using a software process of the network device to analyze the packet loss message in the message encapsulation result to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with message flow of the packet loss message; using the learning result and the analysis result to check configuration information of the network device to obtain a checking result.

[0269] As an optional example, the computer readable storage medium is configured to store program code for performing the following steps: in response to a traffic recovery instruction of the network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to represent a message from which a data packet discarded by the network device comes; encapsulating the packet loss message to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes a packet loss reason of the discarded data packet and the packet loss message; calling a hardware flow table of the network device, and based on the packet loss reason in the packet encapsulation result, performing hardware learning on the packet loss message in the packet encapsulation result to obtain a learning result, and using a software process of the network device to analyze the packet loss message in the packet encapsulation result to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with packet traffic of the packet loss message; and using the learning result and the analysis result to recover the traffic of the network device.

[0270] Embodiments of the present disclosure further provide a computer program product. Optionally, in the embodiments, the computer program product can include a computer program, and the computer program, when executed by a processor, implements the method provided by the above-mentioned embodiments.

[0271] Optionally, the computer program product can include a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium can be used to store a computer program, and the computer program, when executed by a processor, implements the method provided by the above-mentioned embodiments.

[0272] Embodiments of the present disclosure can provide an electronic device, which can include a memory and a processor.

[0273] FIG. 12 is a block diagram of an electronic device for implementing a method of processing information of a network device according to embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0274] As shown in FIG. 12, the device 1200 includes a computing component 1201 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded into a random access memory (RAM) 1203 from a storage component 1208. Various programs and data used by the device 1200 can also be stored in the RAM 1203. The computing component 1201, the ROM 1202, and the RAM 1203 are connected to each other by a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0275] Various components in the device 1200 are connected to the I / O interface 1205, including an input component 1206, such as a keyboard, a mouse, etc.; an output component 1207, such as various types of displays, speakers, etc.; a storage component 1208, such as a magnetic disk, a magneto-optical disk, etc.; and a communication component 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication component 1209 allows the device 1200 to exchange information / data with other devices over a computer network, such as the Internet, and / or various telecommunication networks.

[0276] The computing component 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing component 1201 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing components running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing component 1201 performs various methods and processes described above, such as the information processing method of a network device. For example, in some embodiments, the information processing method of a network device can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage component 1208. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1200 via the ROM 1202 and / or the communication component 1209. When the computer program is loaded into the RAM 1203 and executed by the computing component 1201, one or more steps of the information processing method of a network device described above can be performed. Alternatively, in other embodiments, the computing component 1201 can be configured, by way of firmware for example, to perform the information processing method of a network device in any other appropriate manner.

[0277] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an Application Specific Integrated Circuit (ASIC), a System-on-a-Chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0278] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as part of a separate software package, and partially on a remote machine or server.

[0279] The method embodiments provided by the embodiments of the present disclosure can be executed in a mobile terminal, a computer terminal or similar computing device. FIG. 13 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an information processing method of a network device according to an embodiment of the present disclosure. As shown in FIG. 13, the computer terminal 130 (or mobile device) can include one or more (in the figure, 1302a, 1302b, …, 1302n are used to show) processors 1302 (the processor 1302 can include but not limited to a processing device such as a microcontroller unit (MCU) or a field programmable gate array (FPGA)), a memory 1304 for storing data, and a transmission device 1306 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that the structure shown in FIG. 13 is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 130 can include more or less components than those shown in FIG. 13, or have a different configuration from that shown in FIG. 13.

[0280] The hardware structure block diagram shown in FIG. 13 can not only be used as an exemplary block diagram of the above-mentioned computer terminal 130 (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, FIG. 13 shows an embodiment using the above-mentioned computer terminal 130 (or mobile device) shown in FIG. 13 as a computing node in the computing environment 701.

[0281] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include, but are not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.

[0282] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a Cathode Ray Tube (CRT) or a Liquid Crystal Display (LCD) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0283] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0284] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0285] It should be noted that the above-mentioned sequence numbers of the embodiments of the present disclosure are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0286] In the above-described embodiments of the present disclosure, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0287] In several embodiments provided by the present disclosure, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only a schematic, for example, the division of components is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of components or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed components can be indirect coupling or communication connection through some interfaces, components, or electric or other forms.

[0288] The components described as separate components can or can not be physically separate, and the components shown as components can or can not be physical components, i.e., they can be located in one place or distributed on multiple network components. According to actual needs, part or all of the components can be selected to achieve the purpose of the present embodiment.

[0289] In addition, each functional component in various embodiments of the present disclosure can be integrated in one processing component, or each component can exist physically separately, or two or more components can be integrated in one component. The integrated component can be realized in the form of hardware or in the form of a software functional component.

[0290] When the integrated component is realized in the form of a software functional component and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present disclosure, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present disclosure. The foregoing storage medium includes: U disk, read-only memory, random access memory, mobile hard disk, magnetic disk or optical disk, and various media that can store program codes.

[0291] The above is only the preferred implementation manner of the present disclosure, and it should be noted that, for those of ordinary skill in the art, some improvements and refinements can be made without departing from the principles of the present disclosure, and these improvements and refinements should also be considered as falling within the protection scope of the present disclosure. Industrial applicability

[0292] The scheme provided by the embodiments of the present disclosure can be applied in the process of information processing, and a packet loss message corresponding to a network device is obtained, wherein the packet loss message is used to represent a message from which a data packet discarded by the network device comes; the packet loss message is encapsulated to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason of the data packet discarded by the network device and the packet loss message; a hardware flow table of the network device is called, and the packet loss message in the encapsulation result is learned based on the packet loss reason in the encapsulation result to obtain a learning result, and the packet loss message in the encapsulation result is analyzed by using a software process of the network device to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with packet flow of the packet loss message; and the learning result and the analysis result are output, thereby solving the technical problem that the full-amount packet loss flow cannot be counted when the packet loss message corresponding to the network device is analyzed.

Claims

1. An information processing method of a network device, comprising: obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to represent a packet from which a data packet discarded by the network device comes; performing encapsulation on the packet loss message to obtain a packet encapsulation result, wherein the packet encapsulation result at least includes a packet loss reason why the network device discards the data packet and the packet loss message; calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the packet encapsulation result based on the packet loss reason in the packet encapsulation result to obtain a learning result, and performing analysis on the packet loss message in the packet encapsulation result by using a software process of the network device to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to represent information associated with packet flow of the packet loss message; outputting the learning result and the analysis result.

2. The method of claim 1, wherein, performing encapsulation on the packet loss message to obtain a packet encapsulation result, comprising: determining packet content of the packet loss message; performing encapsulation on the packet content according to identification information in an encapsulation format to obtain the packet encapsulation result, wherein the packet loss reason in the packet encapsulation result is identified by the identification information.

3. The method of claim 2, wherein, performing encapsulation on the packet content according to identification information in an encapsulation format to obtain the packet encapsulation result, comprising: performing truncation on the packet content based on packet flow of the packet loss message to obtain truncated packet content; performing encapsulation on the truncated packet content according to the identification information to obtain the packet encapsulation result.

4. The method of claim 3, wherein, performing truncation on the packet content based on packet flow of the packet loss message to obtain truncated packet content, comprising: determining a flow category of the packet flow of the packet loss message, wherein the flow category is used to represent that the packet flow of the packet loss message is generated on a pipeline of the network device and / or a memory management unit of the network device; performing truncation on the packet content according to a truncation rule matched with the flow category to obtain the truncated packet content.

5. The method of claim 4, wherein, the pipeline includes an ingress pipeline of the network device, and performing truncation on the packet content according to a truncation rule matched with the flow category to obtain the truncated packet content, comprising: in a case where the flow category is a first flow category, performing truncation on the packet content according to a unit length of the packet loss message to obtain a sub-packet loss message of the unit length, wherein the first flow category is used to represent that the packet flow of the packet loss message is generated on the ingress pipeline and on the memory management unit, and the truncated packet content includes the sub-packet loss message of the unit length.

6. The method of claim 4, wherein, the pipeline includes an egress pipeline of the network device, and performing truncation on the packet content according to a truncation rule matched with the flow category to obtain the truncated packet content, comprising: In a case where the traffic category is a second traffic category, the packet content is matched by using an egress field processor of the network device, and the second traffic category is used to represent that the packet traffic of the packet loss packet is generated on the egress pipeline; The sub-packet content matched in the packet content is determined as the truncated packet content.

7. The method of any one of claims 1 to 6, wherein, The hardware flow table of the network device is called, the packet loss packet in the packet encapsulation result is hardware-learned based on the packet loss reason in the packet encapsulation result, and a learning result is obtained, including: At least one target packet loss packet matched with the hardware flow table is determined from the packet encapsulation result, and the target packet loss packet is used to represent a packet allowed to be hardware-learned in the packet encapsulation result. The target packet loss packet is hardware-learned based on the packet loss reason corresponding to the target packet loss packet, and the learning result is obtained.

8. The method of claim 7, wherein, The target packet loss packet is hardware-learned based on the packet loss reason corresponding to the target packet loss packet, and the learning result is obtained, including: Packet loss traffic of the target packet loss packet is obtained. The packet loss traffic of the target packet loss packet is learned based on the packet loss reason corresponding to the target packet loss packet, and the learning result is obtained.

9. The method of claim 7, wherein, The method further includes: The target packet loss packet is mirror-processed. The packet loss packet in the encapsulation result is analyzed by using a software process of the network device to obtain an analysis result, including that the mirror-processed packet loss packet is analyzed by using the software process to obtain the analysis result.

10. The method of any one of claims 1 to 6, wherein, The method further includes: The learning result is prohibited from being deleted, and / or the validity of the learning result is maintained.

11. The method of any one of claims 1 to 6, wherein, The hardware flow table of the network device is called, the packet loss packet in the packet encapsulation result is hardware-learned based on the packet loss reason in the packet encapsulation result, and a learning result is obtained, including: The hardware flow table of the network device is periodically called by using the software process, the packet loss packet is hardware-learned based on the packet loss reason in the packet encapsulation result, and a learning result is obtained.

12. An information checking method of a network device, including: In response to an information checking instruction of a network device, a packet loss packet corresponding to the network device is obtained, and the packet loss packet is used to represent a packet from which a data packet discarded by the network device comes; The packet loss packet is encapsulated to obtain a packet encapsulation result, and the packet encapsulation result at least includes a packet loss reason why the data packet is discarded by the network device and the packet loss packet; The hardware flow table of the network device is called, the packet loss packet in the packet encapsulation result is hardware-learned based on the packet loss reason in the packet encapsulation result, and a learning result is obtained, and the packet loss packet in the packet encapsulation result is analyzed by using a software process of the network device to obtain an analysis result, wherein the learning result is used to represent a statistical result of the packet loss reason in the packet loss packet, and the analysis result is used to represent information associated with packet traffic of the packet loss packet; The learning result and the analysis result are used to check configuration information of the network device, and a checking result is obtained.

13. A traffic recovery method of a network device, comprising: in response to a traffic recovery instruction of a network device, obtaining a packet loss message corresponding to the network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; performing encapsulation on the packet loss message to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason why the network device discards the data packet and the packet loss message; calling a hardware flow table of the network device, performing hardware learning on the packet loss message in the encapsulation result based on the packet loss reason in the encapsulation result to obtain a learning result, and performing analysis on the packet loss message in the encapsulation result by using a software process of the network device to obtain an analysis result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message, and the analysis result is used to indicate information associated with message traffic of the packet loss message; using the learning result and the analysis result to recover traffic of the network device.

14. An information processing system of a network device, comprising: an information input end configured to obtain a packet loss message corresponding to a network device, wherein the packet loss message is used to indicate a message from which a data packet discarded by the network device comes; a switch chip configured to perform encapsulation on the packet loss message to obtain an encapsulation result, wherein the encapsulation result at least includes a packet loss reason why the network device discards the data packet and the packet loss message, and call a hardware flow table of the network device to perform hardware learning on the packet loss message in the encapsulation result based on the packet loss reason in the encapsulation result to obtain a learning result, wherein the learning result is used to indicate a statistical result of the packet loss reason in the packet loss message; a processor configured to perform analysis on the packet loss message in the encapsulation result by using a software process of the network device to obtain an analysis result, wherein the analysis result is used to indicate information associated with message traffic of the packet loss message; an output end configured to output the learning result and the analysis result.

15. The system of claim 14, wherein, Message traffic of the packet loss message passes through an ingress pipeline of the network device and / or a memory management unit of the network device, the switch chip is configured to truncate message content of the packet loss message according to a unit length of the packet loss message to obtain a sub-packet loss message of the unit length, encapsulate the sub-packet loss message according to identification information in an encapsulation format to obtain the encapsulation result, and redirect the encapsulation result to a loopback interface to which an ingress end of the switch chip belongs.

16. The system of claim 14, wherein, Message traffic of the packet loss message passes through an egress pipeline of the network device, and the switch chip comprises: An egress field processor is configured to match packet content of the packet loss message, determine sub-packet content matched in the packet content as truncated packet content, encapsulate the truncated packet content according to identification information in the encapsulation format to obtain the packet encapsulation result, and redirect the packet encapsulation result to a loopback interface to which an ingress end of the switch chip belongs.

17. The system of claim 14, wherein, The switch chip includes: A virtual local area network field processor is configured to determine at least one target packet loss message matched with the hardware flow table from the packet encapsulation result, wherein the target packet loss message is used to represent a packet in the packet encapsulation result that is allowed to be hardware-learned; A traffic tracker is configured to perform hardware learning on packet loss traffic of the target packet loss message based on the packet loss reason corresponding to the target packet loss message to obtain the learning result.

18. The system of claim 17, wherein, The switch chip includes: An ingress field processor is configured to perform mirroring processing on the target packet loss message; The processor is configured to analyze the mirrored packet loss message using the software process to obtain the analysis result.

19. An electronic device, comprising: a memory storing an executable program; a processor configured to run the program, wherein the program performs the method of any one of claims 1 to 13 when executed.

20. A computer readable storage medium comprising a stored executable program, wherein, The method of any one of claims 1 to 13 is controlled when the executable program is executed to control the device on which the storage medium is located to perform the method.

21. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 13.

Citation Information

Patent Citations

  • Path tracking method and device

    CN113709043A

  • Message processing method and device, switch equipment and storage medium

    CN114006806A

  • Packet loss control method based on reinforcement learning and computer equipment

    CN116055360A

  • Packet loss monitoring and processing method for service flow in forwarding process

    CN116743630A

  • Packet loss statistical method and device, network equipment and computer readable storage medium

    CN116962249A