Data packet processing method and apparatus, and packet loss information analysis method and apparatus

By updating the status flags of data packets and mirroring them in an FPGA scenario, the problem of difficulty in determining the cause of data stream packet loss is solved, enabling more efficient identification of packet loss nodes and analysis of causes.

WO2025224550A1PCT designated stage Publication Date: 2025-10-30CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/053637
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-24
Filing Date
2025-04-07
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

In FPGA programmable scenarios, the points and number of data packet losses vary in a complex manner. Existing technologies make it difficult to accurately determine the cause of packet loss for a particular data stream, especially when network traffic is complex and multiple data streams exist. It is difficult to accurately determine the cause of packet loss by counting methods.

Method used

By receiving target data packets, updating its initial state identifier to the target state identifier based on packet loss detection events, and mirroring the data packets when the packet mirroring conditions are met, the target processor sends the data packets carrying the target state identifier to the target processor. The target processor determines the packet loss node through the identifier of the mirrored data packets.

Benefits of technology

It improves the accuracy and processing efficiency of packet loss information, reduces complexity and resource consumption, and simplifies the process of investigating packet loss information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025053637_30102025_PF_FP_ABST
    Figure IB2025053637_30102025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a data packet processing method and apparatus, and a packet loss information analysis method and apparatus. The data packet processing method comprises: receiving a target data packet, the target data packet carrying data packet attribute information; performing packet loss detection on the target data packet on the basis of a packet loss detection event, and when it is determined that the target data packet satisfies the packet loss detection event, updating an initial state identifier of the target data packet to be a target state identifier; when it is determined, on the basis of the data packet attribute information and the target state identifier, that the target data packet satisfies a packet mirroring condition, mirroring the target data packet to obtain a mirrored data packet carrying the target state identifier; and sending the mirrored data packet carrying the target state identifier to a target processor.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Data packet processing methods and devices, packet loss information analysis methods and devices (technical fields)

[0002]

[0001] This disclosure relates to the field of computer technology, and particularly to a data packet processing method and apparatus. Background Art

[0003]

[0002] In FPGA (Field Programmable Gate Array) programmable scenarios, FPGA is used as a forwarding device, and packet loss is inevitable in message processing. The general processing logic is to count the number of lost packets by counting information. However, in complex scenarios, the location and number of lost packets can vary greatly, making it more complicated to locate them.

[0004]

[0003] Furthermore, network traffic is complex, and multiple data streams (data streams are divided into several data packets for transmission during transmission to adapt to the network's layered structure and transmission mechanism) may experience packet loss simultaneously. In such scenarios, it is difficult to accurately determine the cause of packet loss for a specific data stream by simply counting packets. Summary of the Invention

[0005]

[0004] In view of this, embodiments of the present disclosure provide a data packet processing method. One or more embodiments of the present disclosure also relate to a data packet processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, in order to solve the technical defects existing in the related art.

[0006]

[0005] According to a first aspect of the present disclosure, a data packet processing method is provided, applied to a data packet forwarding device, comprising: receiving a target data packet, wherein the target data packet carries data packet attribute information; performing packet loss detection on the target data packet according to a packet loss detection event; and, if it is determined that the target data packet satisfies the packet loss detection event, updating the initial state identifier of the target data packet to a target state identifier, wherein the target state identifier corresponds to the packet loss detection event; and, if it is determined that the target data packet satisfies a packet mirroring condition according to the data packet attribute information and the target state identifier, mirroring the target data packet to obtain a mirrored data packet carrying the target state identifier; and sending the mirrored data packet carrying the target state identifier to a target processor.

[0007]

[0006] According to a second aspect of the present disclosure, a packet loss information analysis method is provided, applied to a target processor, comprising: receiving a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information; parsing the mirrored data packet to obtain the target status identifier carried by the mirrored data packet, and determining the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

[0008]

[0007] According to a third aspect of the present disclosure, a data packet processing apparatus is provided, applied to a data packet forwarding device, comprising: a receiving module configured to receive a target data packet, wherein the target data packet carries data packet attribute information; an updating module configured to perform packet loss detection on the target data packet based on a packet loss detection event, and, if it is determined that the target data packet satisfies the packet loss detection event, update the initial state identifier of the target data packet to a target state identifier, wherein the target state identifier corresponds to the packet loss detection event; a mirroring module configured to, based on the data packet attribute information and the target state identifier, if it is determined that the target data packet satisfies packet mirroring conditions, mirror the target data packet to obtain a mirrored data packet carrying the target state identifier; and a sending module configured to send the mirrored data packet carrying the target state identifier to a target processor.

[0009]

[0008] According to a fourth aspect of the present disclosure, a packet loss information analysis apparatus is provided, applied to a target processor, comprising: a receiving module configured to receive a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information; and a determining module configured to parse the mirrored data packet, obtain the target status identifier carried by the mirrored data packet, and determine the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

[0010]

[0009] According to a fifth aspect of the present disclosure, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, wherein the computer programs / instructions, when executed by the processor, implement the steps of the above-described data packet processing method.

[0011]

[0010] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program / instructions which, when executed by a processor, implement the steps of the above-described data packet processing method.

[0012]

[0011] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data packet processing method.

[0013]

[0012] An embodiment of this disclosure provides a data packet processing method applied to a data packet forwarding device, comprising: receiving a target data packet, wherein the target data packet carries data packet attribute information; performing packet loss detection on the target data packet according to a packet loss detection event; and, if it is determined that the target data packet satisfies the packet loss detection event, updating the initial state identifier of the target data packet to a target state identifier, wherein the target state identifier corresponds to the packet loss detection event; and, if it is determined that the target data packet satisfies a packet mirroring condition according to the data packet attribute information and the target state identifier, mirroring the target data packet to obtain a mirrored data packet carrying the target state identifier; and sending the mirrored data packet carrying the target state identifier to a target processor.

[0014]

[0013] Based on this, the method updates the initial state identifier of the target data packet to the target state identifier when the target data packet meets the packet loss detection event. Thus, when it is determined that the target data packet meets the packet mirroring condition, the target data packet is mirrored, making the obtained mirrored data packet consistent with the target data packet. That is, the state identifier carried by the mirrored data packet is also the target state identifier. When the mirrored data packet carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data packet, thereby accurately determining the packet loss node of the target data packet. Furthermore, by judging whether the target data packet meets the packet mirroring condition based on the data packet attribute information of the target data packet, the complexity is reduced, resource consumption is reduced, packet loss information is investigated more accurately and simply, and the processing efficiency for determining packet loss nodes is improved. (See attached figures for details.)

[0015]

[0014] Figure 1 is a schematic diagram of an application scenario of a data packet processing method provided in an embodiment of the present disclosure;

[0016]

[0015] Figure 2 is a flowchart of a data packet processing method applied to a data packet forwarding device according to an embodiment of the present disclosure;

[0017]

[0016] Figure 3 is a flowchart of a packet loss information analysis method applied to a target processor provided in an embodiment of the present disclosure;

[0018]

[0017] Figure 4 is a flowchart of a data packet processing method provided in an embodiment of the present disclosure;

[0019]

[0018] Figure 5 is a schematic diagram of a VLAN data frame structure provided in an embodiment of the present disclosure;

[0020]

[0019] Figure 6 is a schematic diagram of the structure of a data packet processing device applied to a data packet forwarding device according to an embodiment of the present disclosure;

[0021]

[0020] Figure 7 is a schematic diagram of a packet loss information analysis device applied to a target processor according to an embodiment of the present disclosure;

[0022]

[0021] Figure 8 is a structural block diagram of a computing device provided in an embodiment of the present disclosure. Detailed Description

[0023]

[0022] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure. However, this disclosure can be implemented in many ways other than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this disclosure. Therefore, this disclosure is not limited to the specific implementations disclosed below.

[0024]

[0023] The terminology used in one or more embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this disclosure. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this disclosure refers to and includes any or all possible combinations of one or more associated listed items.

[0025]

[0024] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this disclosure, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "in response to a determination".

[0026]

[0025] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0027]

[0026] First, the nouns and terms involved in one or more embodiments of this disclosure will be explained.

[0028]

[0027] FPGA: Field Programmable Gate Array. It emerged as a semi-custom circuit in the field of application-specific integrated circuits. It not only solves the shortcomings of custom circuits, but also overcomes the limitation of the limited number of gate circuits in the original programmable devices.

[0029]

[0028] Five-tuple: Source address, Destination address, Protocol, Source port, Destination port.

[0029] CPU: Central Processing Unit.

[0030]

[0030] VLAN: Virtual Local Area Network; A Virtual Local Area Network (VLAN) is a group of logical devices and users that are not limited by physical location. They can be organized according to factors such as function, department and application, and their communication is as if they were in the same network segment.

[0031]

[0031] There is an existing method for determining the cause of data packet loss based on five-tuple-based flow statistics (network traffic statistics, which performs real-time or periodic statistical analysis of data traffic transmitted in the network). However, this method cannot accurately determine the cause of packet loss through a single flow statistics, but can only determine whether a data packet is lost. If it is necessary to accurately determine the cause of packet loss, multiple flow statistics need to be performed, which consumes a lot of resources. Moreover, all flow statistics points need to start statistics at the same time, which is also relatively complicated in terms of configuration.

[0032]

[0032] In this disclosure, a data packet processing method is provided. This disclosure also relates to a data packet processing method, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0033]

[0033] Referring to Figure 1, Figure 1 shows a schematic diagram of an application scenario of a data packet processing method provided according to an embodiment of the present disclosure.

[0034]

[0034] Specifically, the data packet processing method is implemented using the end-side device 102 and the server 104. The end-side device 102 is used to send the target data packet to the server 104. The end-side device 102 can send a prompt text "Check the reason for packet loss" when sending the target data packet, or the user can select the "Check the reason for packet loss" function option in the console interface. In practical applications, the user can input the prompt text in the end-side device 102 by text or voice. If the voice method is used, the end-side device 102 will also include a corresponding voice processing part, such as voice parsing, voice to text conversion, voice synthesis, etc., to convert the user's voice input into text. This disclosure does not limit this.

[0035]

[0035] Server 104 includes a data packet forwarding device and a target processor. When the data packet forwarding device receives a target data packet, it performs packet loss detection on the target data packet according to a packet loss detection event. If it determines that the target data packet meets the packet loss detection event, it updates the initial state identifier of the target data packet to a target state identifier. Furthermore, if it determines that the target data packet meets the packet mirroring condition based on the data packet attribute information and the target state identifier, it mirrors the target data packet to obtain a mirrored data packet carrying the target state identifier. The mirrored data packet carrying the target state identifier is then sent to the target processor, so that the target processor can determine the packet loss node of the target data packet based on the target state identifier of the mirrored data packet. In this case, once the packet loss node is determined, its corresponding packet loss detection event can also be determined, thereby determining the cause of packet loss. For example, if the packet loss node is determined to be packet loss node 1, the packet loss detection event corresponding to packet loss node 1 is determined to be rate limiting detection. The cause of the packet loss is then determined to be "rate-limited packet loss", and the packet loss information, including the packet loss node and the cause of the packet loss, is returned to the end device 102.

[0036]

[0036] The edge device 102 may include a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Languages ​​5) application, or a lightweight application (also known as a mini-program, a type of lightweight application) or a cloud application, etc. The edge device may be developed based on the software development kit (SDK) of the corresponding service provided by the server, such as based on the Real Time Communication (RTC) SDK. The edge device may be deployed in an electronic device and may depend on the device to run or some APPs in the device to run. The electronic device may have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, tablet computer, personal computer, etc. Various other types of applications can usually be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0037]

[0037] Server 104 can be understood as a server that provides various services, including physical servers, cloud servers, such as servers that provide communication services for multiple clients, servers that support the models used on the clients for background training, and servers that process data sent by the clients. It should be noted that server 104 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. Server 104 can also be a server of a distributed system, or a server combined with blockchain. Server 104 can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0038]

[0038] It is worth noting that the data packet processing method provided in the embodiments of this disclosure can be executed by the server 104. In other embodiments of this disclosure, the end device 102 can include a data packet forwarding device and a target processor, so that the end device 102 can also have similar functions to the server 104, thereby executing the data packet processing method provided in the embodiments of this disclosure. In other embodiments, the data packet processing method provided in the embodiments of this disclosure can also be jointly executed by the end device 102 and the server 104.

[0039]

[0039] The data packet processing method provided in this embodiment updates the initial state identifier of the target data packet to the target state identifier when the target data packet meets the packet loss detection event. This allows the target data packet to be mirrored when the target data packet meets the packet mirroring condition, ensuring the obtained mirrored data packet is consistent with the target data packet. Specifically, the state identifier carried by the mirrored data packet is also the target state identifier. When the mirrored data packet carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data packet, thereby accurately determining the packet loss node of the target data packet. Furthermore, by determining whether the target data packet meets the packet mirroring condition based on the data packet attribute information of the target data packet, the complexity is reduced, resource consumption is decreased, packet loss information is investigated more accurately and simply, and the processing efficiency for determining packet loss nodes is improved.

[0040]

[0040] Referring to FIG2, FIG2 shows a flowchart of a data packet processing method applied to a data packet forwarding device according to an embodiment of the present disclosure, which specifically includes the following steps.

[0041]

[0041] Step 202: Receive target data packet, wherein the target data packet carries data packet attribute information.

[0042]

[0042] The data packet forwarding device includes, but is not limited to, network devices such as switches, routers, and network interface cards. When the FPGA is programmable, it can also be programmed to implement specific logic functions, thus the FPGA can also function as a data packet forwarding device. In practical applications, the data packet forwarding device can be a cloud-based data packet forwarding device.

[0043] A target datagram can be understood as a data block carrying user data and control information. It contains complete data information to be sent, such as the actual content to be sent (e.g., web page data, file content, email body, etc.) and essential metadata, such as source IP address (Internet Protocol Address), destination IP address, protocol type (e.g., Transmission Control Protocol, User Datagram Protocol), port number, sequence number, checksum, and other header information from the network layer, transport layer, and data link layer.

[0043]

[0044] Data packet attribute information can be understood as data describing the target data packet, such as the metadata mentioned above. Data packet attribute information may include the source address (i.e., the source IP address mentioned above), destination address (i.e., the destination IP address mentioned above), target protocol (i.e., transport protocol), source port and / or destination port of the target data packet.

[0044]

[0045] By using the source IP address, destination IP address, transport protocol, source port number, and destination port number mentioned above, a specific target data packet can be identified.

[0045]

[0046] Specifically, the data packet forwarding device can receive target data packets sent from other clients or other servers. The target data packets carry data packet attribute information, which is used to determine whether the target data packets meet the packet mirroring conditions.

[0046]

[0047] In one or more embodiments of this disclosure, a packet loss detection event needs to be configured before receiving the target data packet, so as to perform packet loss detection on the target data packet through the configured packet loss detection event. The specific implementation method is as follows.

[0047]

[0048] Before receiving the target data packet, the method further includes: receiving packet loss detection configuration data and configuring the packet loss detection event based on the packet loss detection configuration data; or determining packet loss detection configuration data based on packet loss information of historical data packets and configuring the packet loss detection event based on the packet loss detection configuration data.

[0048]

[0049] Packet loss can be understood as the phenomenon that, during network transmission, data packets that should have been transmitted from the sending end to the receiving end fail to arrive at the receiving end due to various reasons. In other words, packet loss can be understood as data packets being lost during network transmission.

[0049]

[0050] Packet loss detection events can be understood as processing events encountered by the target data packet in the data packet forwarding device; for example, packet loss detection events include but are not limited to rate limiting events, security group events, routing forwarding events, etc.; packet loss detection configuration data includes but is not limited to configuration policies, time periods, processing methods, and other configuration data.

[0050]

[0051] Specifically, taking packet loss detection events as rate-limiting events as an example, to configure a rate-limiting event, it is necessary to obtain packet loss detection configuration data related to that rate-limiting event. This packet loss detection configuration data can include configuration policies (such as protocol-based rate-limiting policies), rate limit values ​​during off-peak periods (such as 1:00 AM to 5:00 AM), rate limit values ​​for other time periods, and processing methods (such as discarding excess data packets when traffic exceeds the rate limit). Based on this packet loss detection configuration data, the packet loss detection event can be configured.

[0051]

[0052] Alternatively, in practical applications, packet loss information of historical data packets can be collected. By analyzing the packet loss information of historical data packets through neural network models, key information such as packet loss time periods, packet loss frequency, and packet loss rate can be determined. This helps to understand which data streams or time periods are more prone to packet loss. Based on the packet loss information of historical data packets, packet loss detection configuration data can be determined, such as formulating a reasonable packet loss detection strategy and configuring packet loss detection events.

[0052]

[0053] The data packet processing method provided in this disclosure can customize packet loss detection configuration data and configure personalized packet loss detection events based on the customized packet loss detection configuration data; or it can obtain more reasonable packet loss detection configuration data based on the packet loss information of historical data packets, and then configure packet loss detection events based on the reasonable packet loss detection configuration data, so as to reasonably perform packet loss detection on the target data packets based on the packet loss detection events.

[0053]

[0054] Step 204: Perform packet loss detection on the target data packet based on the packet loss detection event. If it is determined that the target data packet meets the packet loss detection event, update the initial state identifier of the target data packet to the target state identifier, wherein the target state identifier corresponds to the packet loss detection event.

[0054]

[0055] The initial state identifier can be understood as an identifier representing the original state of the target data packet. This state indicates whether the target data packet should be lost. Specifically, the initial state identifier is the state identifier for the target data packet not to be lost, and can be represented using numbers, characters, etc., such as using the number 0 to represent the initial state identifier of the target data packet. The target state identifier can be understood as the state identifier corresponding to the packet loss detection event, indicating that packet loss is to be performed, such as using the number 1 to represent the target state identifier corresponding to the rate limiting event.

[0055]

[0056] Specifically, taking packet loss detection as an example of a rate-limiting event, a rate-limiting event can be understood as an event where data packets are dropped due to bandwidth limitations or traffic shaping strategies by the data packet forwarding device. A specific rate-limiting event can be implemented using a token bucket algorithm. That is, when a target data packet arrives, a token needs to be taken from the token bucket to continue transmission. If there are insufficient tokens (no available tokens), the target data packet is colored red, indicating that it meets the rate-limiting event, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the rate-limiting event, that is, the number 0 representing the initial state identifier is updated to the number L corresponding to the rate-limiting event.

[0056]

[0057] In one or more embodiments of this disclosure, multiple packet loss detection events are iterated over in a loop. If it is determined that the target data packet satisfies the i-th packet loss detection event, the initial state identifier of the target data packet is updated to the target state identifier corresponding to the i-th packet loss detection event, thereby accurately identifying and marking the packet loss information of the target data packet. The specific implementation method is as follows.

[0057]

[0058] The packet loss detection events include N, where N is a positive integer; the step of performing packet loss detection on the target data packet based on the packet loss detection events, and updating the initial state identifier of the target data packet to the target state identifier when it is determined that the target data packet satisfies the packet loss detection events, includes: determining the i-th packet loss detection event from the N packet loss detection events, and performing packet loss detection on the target data packet based on the i-th packet loss detection event, where i is a positive integer and the initial value of i is 1; and updating the initial state identifier of the target data packet to the target state identifier corresponding to the i-th packet loss detection event when it is determined that the target data packet satisfies the i-th packet loss detection event.

[0058]

[0059] Specifically, for each packet loss detection event (indexed by i), check whether the target data packet satisfies the packet loss detection event. If the target data packet satisfies the i-th packet loss detection event, it is considered that packet loss has occurred, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the i-th packet loss detection event.

[0059]

[0060] Taking N as 3, with the three packet loss detection events being rate limiting event, security group event (events that filter and drop data packets according to security rules), and network congestion event (events that have to drop data packets that exceed processing capacity due to buffer fullness) as an example, the data packet processing method is explained in detail.

[0060]

[0061] The first packet loss detection event (e.g., a rate limiting event) is determined from the three packet loss detection events, and packet loss detection is performed on the target data packet based on the rate limiting event. If the target data packet satisfies the rate limiting event, it is considered that packet loss exists, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the rate limiting event. For example, the number 0 representing the initial state identifier of the target data packet is updated to the number 1 representing the target state identifier corresponding to the rate limiting event.

[0061]

[0062] After performing packet loss detection on the target data packet based on the i-th packet loss detection event, the method further includes: if it is determined that the target data packet does not satisfy the i-th packet loss detection event, determining whether i is greater than or equal to N; if yes, ending the packet loss detection and determining the initial state identifier of the target data packet as the target state identifier; if no, incrementing i by 1 and continuing to execute the steps of determining the i-th packet loss detection event from the N packet loss detection events and performing packet loss detection on the target data packet based on the i-th packet loss detection event.

[0062]

[0063] Following the previous example, if the target data packet does not meet the first packet loss detection event, then it is further determined whether i has reached or exceeded the preset number of packet loss detection events, 3.

[0063]

[0064] At this point, i is 1, which means that the number of packet loss detection events has not reached 3. This indicates that there are still packet loss detection events to be checked. At this point, the value of i is incremented by 1, and then the next round of packet loss detection is performed. That is, packet loss detection is performed on the target data packet based on the second packet loss detection event (security group event).

[0064]

[0065] If the target data packet satisfies the security group event, it is considered that packet loss has occurred. The initial state identifier of the target data packet is updated to the target state identifier corresponding to the security group event. For example, the number 0 representing the initial state identifier of the target data packet is updated to the number 2 representing the target state identifier corresponding to the speed limit event.

[0065]

[0066] Furthermore, if the target data packet does not meet the second packet loss detection event, then it is further determined whether i has reached or exceeded the preset number of packet loss detection events 3.

[0066]

[0067] At this point, i is 2, which is less than the number of packet loss detection events (3). This means there are still packet loss detection events to be checked. So, the value of i is incremented by 1, and the next round of packet loss detection is performed. That is, packet loss detection is performed on the target data packet based on the 3rd packet loss detection event (network congestion event).

[0067]

[0068] If the target data packet is determined to meet the network congestion event, it is considered that packet loss has occurred. The initial state identifier of the target data packet is updated to the target state identifier corresponding to the network congestion event. For example, the number 0 representing the initial state identifier of the target data packet is updated to the number 3 representing the target state identifier corresponding to the rate limiting event.

[0068]

[0069] Furthermore, if the target data packet does not meet the third packet loss detection event, then it is further determined whether i has reached or exceeded the preset number of packet loss detection events, 3.

[0069]

[0070] At this point, i is 3, reaching the packet loss detection event count of 3, indicating that all packet loss detection events have been checked. However, the target data packet does not meet any packet loss conditions. Therefore, packet loss detection ends, and the initial state identifier of the target data packet is directly used as the target state identifier, meaning that the target data packet is considered to have no packet loss problem. Based on this, if it is determined that the target data packet meets the packet mirroring condition according to the data packet attribute information, the target data packet is mirrored to obtain the mirrored data packet. The mirrored data packet is sent to the target processor. The target processor determines that the target state identifier of the mirrored data packet is the initial state identifier of the target data packet by parsing, thus determining that the target data packet does not have a packet loss problem.

[0070]

[0071] This disclosure implements a data packet processing method that compares each packet loss detection event through a loop until a matching data packet loss condition is found or all conditions are checked, ensuring a comprehensive and accurate determination of the packet loss status of the target data packet.

[0071]

[0072] Step 206: Based on the data packet attribute information and the target status identifier, if the target data packet meets the packet mirroring conditions, mirror the target data packet to obtain a mirrored data packet carrying the target status identifier.

[0072]

[0073] In this context, a mirrored data packet can be understood as a data packet with the same content as the target data packet, but it is forwarded to another specified destination (such as a monitoring device, log server, analysis tool, etc.). Then, by parsing the mirrored data packet at the destination, information related to the target data packet can be obtained.

[0073]

[0074] Specifically, by matching the data packet attribute information of the target data packet, it is determined whether the target data packet meets the packet mirroring conditions. If it does, the target data packet is mirrored to obtain a mirrored data packet that is consistent with the target data packet.

[0074]

[0075] In one or more embodiments of this disclosure, a message mirroring condition can be understood as a condition that the data packet attribute information of the target data packet matches the preset data packet attribute information, thereby mirroring the target data packet when the data packet attribute information of the target data packet matches the preset data packet attribute information. The specific implementation is described below.

[0075]

[0076] The step of mirroring the target data packet to obtain a mirrored data packet carrying the target status identifier, based on the data packet attribute information and the target status identifier, includes: determining the data packet attribute information of the target data packet based on the data packet attribute information; and, if the data packet attribute information matches preset data packet attribute information, mirroring the target data packet to obtain a mirrored data packet carrying the target status identifier.

[0076]

[0077] In practical applications, the five-tuple information of the target data packet can be used to determine whether the target data packet meets the pre-set packet mirroring conditions (pre-set five-tuple information). This method can be used to filter target data packets of specific types, directions, or projects for more in-depth analysis.

[0077]

[0078] For example, if a user's historical data packets suffer from packet loss, but the cause of the packet loss cannot be determined, the five-tuple information of the historical data packets can be determined using pre-set five-tuple information. In this way, if the target data packet meets the packet mirroring conditions, the target data packet can be mirrored and sent to the CPU. The CPU can then parse the obtained mirrored data packet, which carries the target status identifier, to obtain the cause of the historical data packet loss.

[0078]

[0079] The data packet processing method provided in this disclosure generates a mirror data packet by mirroring the original target data packet, which facilitates subsequent traffic analysis, fault location, and other tasks, without affecting the normal transmission of the original target data packet in the network.

[0079]

[0080] Step 208: Send the image data packet carrying the target status identifier to the target processor.

[0080]

[0081] The target processor can be understood as a processor with parsing capabilities or configured with parsing tools; it is used to parse the mirrored data packets, such as a CPU. Packet loss information includes, but is not limited to, packet loss points and reasons.

[0081]

[0082] Specifically, when a mirrored data packet carrying a target status identifier is sent to the CPU, the CPU can parse the received mirrored data packet to obtain the target status identifier of the mirrored data packet. Based on this target status identifier, the CPU can determine the corresponding packet loss detection event and thus determine the packet loss information of the target data packet. For example, if the target status identifier is the number 1, the corresponding packet loss detection event is determined to be a rate limiting event, that is, the reason for the packet loss of the target data packet is packet loss due to rate limiting.

[0082]

[0083] In one or more embodiments of this disclosure, by configuring a target status identifier corresponding to a packet loss detection event, the packet loss information of the target data packet can be determined by identifying the packet loss detection event corresponding to the target status identifier when the target processor parses the mirrored data packet. The specific implementation is described below.

[0083]

[0084] Before receiving the target data packet, the method further includes: configuring a corresponding target status identifier for the packet loss detection event; sending the mirror data packet carrying the target status identifier to the target processor includes: sending the mirror data packet carrying the target status identifier to the target processor, so that the target processor determines the packet loss detection event corresponding to the target status identifier based on the target status identifier carried in the mirror data packet, and determines the packet loss information of the target data packet according to the packet loss detection event corresponding to the target status identifier.

[0084]

[0085] Specifically, the target status identifier of the target data packet is represented in numerical form. In this case, the target status identifier can be determined according to the sorting position number of the current packet loss detection event to be configured among multiple packet loss detection events. The sorting position number can be determined according to the priority of the current packet loss detection event to be configured among multiple packet loss detection events (such as the priority can be determined according to the target data packet and the probability of packet loss when passing through the packet loss detection event), or it can be determined by random sorting, as long as it can ensure that one packet loss detection event corresponds to a unique target status identifier.

[0085]

[0086] For example, following the previous example, when multiple packet loss detection events include rate limiting events, security group events, and network congestion events, the target status identifier for rate limiting events can be configured as number 1, the target status identifier for security group events can be configured as number 2, and the target status identifier for network congestion events can be configured as number 3.

[0086]

[0087] Therefore, when a mirror data packet carrying a target status identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target status identifier based on the target status identifier of the mirror data packet, and thus determine the packet loss information of the target data packet based on the packet loss detection event.

[0087]

[0088] In practical applications, the target status identifier of the target data packet can also be represented in other forms besides numbers, such as by a string. In this case, the target status identifier can be determined based on the attribute information of the packet loss detection event, such as the type of the packet loss detection event. For example, the type of rate limiting event and network congestion event can be the transmission type during network transmission (identified by the string "transmission"), and the type of security group event can be the security type during network transmission (identified by the string "safety"). Thus, the corresponding target status identifier represented by a string can be configured according to the type of packet loss detection event.

[0088]

[0089] Of course, based on this, the event name of the packet loss detection event can be directly determined as its corresponding target status identifier. For example, the target status identifier configured for a rate limiting event is "Speed ​​limit", and the target status identifier configured for a security group event is... l< "Security Group", the target state identifier configured for network congestion events is l< Network congestion; In practical applications, when a mirrored data packet is sent to the target processor, the target processor can directly determine the packet loss information of the target data packet by parsing the mirrored data packet and obtaining its corresponding target data identifier.

[0090] The data packet processing method provided in this embodiment can implicitly carry packet loss information through the target status identifier when packet loss occurs in the target data packet by configuring a target status identifier corresponding to the packet loss detection event, so that the target processor can accurately determine the packet loss information through the target status identifier.

[0089]

[0091] In one or more embodiments of this disclosure, when sending a mirrored data packet to a target processor, it is necessary to encapsulate the mirrored data packet. In this case, the target status identifier of the mirrored data packet can be filled into the identifier field of the initial data frame. The specific implementation method is as follows.

[0090]

[0092] The step of sending the mirrored data packet to the target processor, so that the target processor can determine the packet loss information of the target data packet based on the target status identifier of the mirrored data packet, includes: encapsulating the mirrored data packet into an initial data frame, and filling the target status identifier into the identifier identification field of the initial data frame to obtain a target data frame; sending the target data frame to the target processor through the target protocol corresponding to the target data frame, so that the target processor can determine the packet loss node of the target data packet by parsing the target data frame and obtaining the target status identifier filled in the identifier identification field.

[0091]

[0093] The initial data frame can be understood as a data frame obtained by encapsulating the mirrored data packet. This encapsulation process usually involves adding necessary header and trailer information, such as the source MAC address (Media Access Control Address, also known as the LAN address) and the destination MAC address.

[0092]

[0094] The target protocol can be understood as the protocol corresponding to the target data frame. For example, if the target data frame is a VLAN data frame, the target protocol is the VLAN protocol.

[0093]

[0095] In the encapsulated initial data frame, a specific identification field (such as a reserved field or special flag bit in some protocols) is filled with the target status identifier. The target data frame filled with the target status identifier is then sent to the target processor. When the target processor receives the target data frame, it parses it and obtains the target status identifier by reading the content of the identification field. This allows it to determine whether there was packet loss or other abnormalities in the original mirrored data packet during transmission.

[0094]

[0096] For example, when reusing VLAN protocol information, the target data packet is encapsulated into a VLAN data frame. In this case, the identification field can be understood as the VLAN ID (VLAN ID) field of the VLAN data frame, which represents the number of the VLAN to which the data frame belongs. The value range is 0 to 4095. When the target status identifier of the target data packet is filled into this field, the number 0 can be used to indicate that the target data packet is normal and has not been lost, and the other numbers represent the target status identifiers corresponding to each packet loss detection event.

[0095]

[0097] The data packet processing method provided in this disclosure fills the target status identifier of the target data packet into the identifier field of the initial data frame, thereby carrying the target status identifier in the target data frame. This identifier indicates packet loss information of the mirrored data packet during transmission, enabling the target processor to accurately and quickly understand the integrity and reliability of the target data packet, thus improving the quality and efficiency of network communication.

[0096]

[0098] In one or more embodiments of this disclosure, when a mirrored data packet is sent to a target processor, a target operation is determined for the original target data packet based on the target status identifier of the target data packet. The specific implementation is described below.

[0097]

[0099] After sending the mirrored data packet to the target processor, the method further includes: determining the target operation for the target data packet based on the target status identifier of the target data packet, wherein the target operation includes packet loss operation and no packet loss operation.

[0098]

[0100] Specifically, if the target status identifier indicates that the target data packet has been lost during transmission, the data packet forwarding device will perform the corresponding packet loss operation; if the target status identifier indicates that the target data packet has not been lost, the data packet forwarding device can perform subsequent operations normally.

[0099]

[0101] In practical applications, the target data packet may contain a packet loss flag. This flag can be located at the position mentioned above indicating the target status, or it can be located elsewhere in the target data packet; no limitation is made here. The packet loss flag of the target data packet determines whether packet loss is performed or not.

[0100]

[0102] The data packet processing method provided in this disclosure does not affect the normal operation of the data packet forwarding device for the original target data packet when the target processor parses the mirrored data packet.

[0101]

[0103] The data packet processing method provided in this disclosure updates the initial state identifier of the target data packet to the target state identifier. This allows the target data packet to be mirrored when it is determined that the target data packet meets the packet mirroring conditions. The target processor can then determine the packet loss detection event corresponding to the target state identifier using the obtained target state identifier of the mirrored data packet, thereby accurately determining the packet loss information of the target data packet. Furthermore, by determining whether the target data packet meets the packet mirroring conditions based on its data packet attribute information, this method reduces complexity and resource consumption, making packet loss information investigation more accurate and simpler, and improving the processing efficiency for determining packet loss information.

[0102]

[0104] Referring to Figure 3, Figure 3 shows a flowchart of a packet loss information analysis method applied to a target processor provided by an embodiment of the present disclosure, which specifically includes the following steps.

[0103]

[0105] Step 302: Receive a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information.

[0104]

[0106] Step 304: Parse the mirrored data packet to obtain the target status identifier carried by the mirrored data packet, and determine the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

[0105]

[0107] Specifically, the target processor can receive and parse mirrored data packets carrying target status identifiers, and accurately and quickly determine the packet loss node (and may also include the cause of packet loss) of the target data packets based on the target status identifiers. In this case, it can quickly locate the source of the problem based on the packet loss node or the cause of packet loss, shorten the troubleshooting time, and thus repair it in a timely manner, reducing the service interruption time caused by network problems.

[0106]

[0108] In practical applications, based on the identified packet loss node of the target data packet, a fault recovery mechanism can be triggered in a timely manner. For example, if packet loss of the target data packet is determined based on the target status identifier, the lost data packet can be retransmitted. Furthermore, when identifying the packet loss node of the target data packet, targeted performance optimizations (such as adjusting bandwidth allocation, replacing hardware devices, etc.) can be performed on the packet loss node before retransmitting the lost data packet, thereby improving network transmission efficiency and stability, and ensuring the continuity of the project and the integrity of the data.

[0107]

[0109] The packet loss information analysis method provided in this disclosure allows the target processor to accurately and efficiently determine the packet loss nodes of the target data packets by analyzing the mirrored data packets carrying the target status identifier. Based on the packet loss nodes, reasonable network optimization can be performed to improve network transmission efficiency and stability.

[0108]

[0110] Referring to Figure 4, Figure 4 shows a flowchart of a data packet processing method provided in an embodiment of the present disclosure, which specifically includes the following steps.

[0109]

[0111] Specifically, taking the three processing steps of the target data packet as an example, the data packet processing method will be explained in detail.

[0110]

[0112] Step 402: The target data packet is processed according to the processing flow 1. If the target data packet is about to be lost, proceed to step 404; if the target data packet is not lost, proceed to step 406.

[0111]

[0113] Specifically, taking an FPGA as an example of a data packet forwarding device, the target data packet first goes through processing flow 1 during the FPGA's processing. This processing flow can be understood as the packet loss detection event in the above embodiment. After processing flow 1, the processing result of the target data packet includes two types: packet loss and no packet loss.

[0112]

[0114] If processing flow 1 is a rate-limiting event, the target data packet passes through the rate-limiting event. If the target data packet has a token, the target data packet passes through without being lost. At this time, the target data packet enters the processing flow 2. If the target data packet does not have a token, the target data packet is to be discarded, and step 404 is executed.

[0113]

[0115] Step 404: Mark the packet loss reason 1 and count the packet loss.

[0114]

[0116] Among them, packet loss reason 1 is the packet loss reason corresponding to processing flow 1. For example, if processing flow 1 is a rate limiting event, the packet loss reason is rate limiting packet loss.

[0115]

[0117] Specifically, the specific implementation of tagging the packet loss cause can be found in the above embodiment, which updates the initial state identifier of the target data packet to the target state identifier. That is, by updating the initial state identifier of the target data packet to the target state identifier, the packet loss cause of the target data packet can be implicitly represented. When the target state identifier corresponds to the packet loss detection event, the packet loss detection event can be determined through the target state identifier of the target data packet, and then the packet loss cause can be determined.

[0116]

[0118] By tagging the reasons for packet loss and counting the lost packets, the packet loss information of the target data packets can be obtained.

[0117]

[0119] Step 406: The target data packet is processed according to process 2. If the target data packet is about to be lost, proceed to step 408; if the target data packet is not lost, proceed to step 410.

[0118]

[0120] Step 408: Mark the packet loss reason 2 and count the packet loss.

[0119]

[0121] Step 410: The target data packet is processed according to process 3. If the target data packet is about to be lost, proceed to step 412; if the target data packet is not lost, proceed to step 414.

[0120]

[0122] Step 412: Mark the packet loss reason as 3 and count the packet loss.

[0121]

[0123] Specifically, the implementation of processing flow 2 and processing flow 3 can be found in the implementation of processing flow 1 above, and will not be repeated here.

[0122]

[0124] Step 414: Mirror the target data packet.

[0123]

[0125] Specifically, regardless of whether the target data packet is to be lost, the target data packet is judged to meet the mirror packet conditions based on the five-tuple information of the target data packet (the data packet attribute information in the above embodiment).

[0124]

[0126] In practical applications, packet mirroring rules can be configured in the mirroring table. These rules include pre-configured 5-tuple information. Specifically, the system determines whether to mirror the target data packet by checking whether its 5-tuple information matches the pre-configured 5-tuple information in the packet mirroring rule. If the target data packet matches the pre-configured 5-tuple information (i.e., the packet mirroring rule is matched), the target data packet is mirrored to obtain the mirrored data packet. If the packet mirroring rule is not matched, step 418 is executed.

[0125]

[0127] Step 416: The CPU parses the image data packet.

[0126]

[0128] Specifically, the mirrored data packet is sent to the CPU (i.e., the target processor in the above example), and the CPU parses the mirrored data packet to obtain the target status identifier of the mirrored data packet and the packet loss information of the target data packet.

[0127]

[0129] In practical applications, packet loss information can be carried to the CPU by using the method of reusing VLAN protocol information, and the target data packet can be encapsulated into a VLAN data frame. Figure 5 shows a schematic diagram of a VLAN data frame structure provided by an embodiment of this disclosure, which specifically includes the following fields: Destination address, Source address, VLAN tag, Length / Type (indicating the length or type of the data field), Data (the actual data content), and Frame Check Sequence (FCS, used to check the integrity of the data frame).

[0128]

[0130] The VLAN tag contains the following fields: Tag Protocol Identifier (TPID, used to identify the tag in the frame), Priority (PRI, used to determine the priority of the data packet and the priority to drop it), Canonical Format Indicator (CFL, used to distinguish the format of the data frame), and VLAN Identifier (VID, VLAN ID, used to identify the VLAN to which the data frame belongs).

[0129]

[0131] Specifically, by reusing the VID field and filling the VID field with the target status identifier of the mirrored data packet, the encapsulated VLAN data frame is sent to the CPU. In this case, the network analysis tools in the CPU (such as tcpdump) can determine the reason for the packet loss of the target data packet through the VLAN ID.

[0130]

[0132] Step 418: Perform packet loss or no packet loss operation.

[0131]

[0133] Specifically, when mirroring the target data packet, for the original target data packet, the packet loss operation or no packet loss operation is performed based on the packet loss flag of the target data packet.

[0132]

[0134] The data packet processing method provided in this disclosure updates the initial state identifier of the target data packet to the target state identifier, enabling the target data packet to carry packet loss information. Then, by configuring packet mirroring rules based on 5-tuples, the packet loss cause is sent to the CPU as part of the target data packet for parsing through packet mirroring. This can accurately determine the cause of packet loss, reduce complexity, reduce resource consumption, and make troubleshooting packet loss problems more accurate and simple.

[0133]

[0135] Corresponding to the above method embodiments, this disclosure also provides a data packet processing apparatus embodiment. Figure 6 shows a schematic diagram of the structure of a data packet processing apparatus applied to a data packet forwarding device according to an embodiment of this disclosure. As shown in Figure 6, the apparatus includes the following modules.

[0134]

[0136] The receiving module 602 is configured to receive a target data packet, wherein the target data packet carries data packet attribute information.

[0135]

[0137] The update module 604 is configured to perform packet loss detection on the target data packet based on the packet loss detection event. If it is determined that the target data packet meets the packet loss detection event, the initial state identifier of the target data packet is updated to the target state identifier, wherein the target state identifier corresponds to the packet loss detection event.

[0136]

[0138] The mirroring module 606 is configured to mirror the target data packet and obtain a mirrored data packet carrying the target status identifier when the target data packet meets the packet mirroring conditions based on the data packet attribute information and the target status identifier.

[0137]

[0139] The sending module 608 is configured to send the image data packet carrying the target status identifier to the target processor.

[0138]

[0140] Optionally, the update module 604 is further configured to: determine the i-th packet loss detection event from the N packet loss detection events, and perform packet loss detection on the target data packet according to the i-th packet loss detection event, where i is a positive integer and the initial value of i is 1; if it is determined that the target data packet satisfies the i-th packet loss detection event, update the initial state identifier of the target data packet to the target state identifier corresponding to the i-th packet loss detection event.

[0139]

[0141] Optionally, the update module 604 is further configured to: if it is determined that the target data packet does not satisfy the i-th packet loss detection event, determine whether i is greater than or equal to N; if yes, end the packet loss detection and determine the initial state identifier of the target data packet as the target state identifier; if no, increment i by 1 and continue to execute the steps of determining the i-th packet loss detection event from the N packet loss detection events and performing packet loss detection on the target data packet according to the i-th packet loss detection event.

[0140]

[0142] The device further includes: an event configuration module, configured to receive packet loss detection configuration data and configure the packet loss detection event according to the packet loss detection configuration data; or to determine packet loss detection configuration data according to packet loss information of historical data packets and configure the packet loss detection event according to the packet loss detection configuration data.

[0141]

[0143] The device further includes: an identifier configuration module, configured as the target state identifier corresponding to the packet loss detection event configuration.

[0142]

[0144] Optionally, the sending module 608 is further configured to: send the mirror data packet carrying the target status identifier to the target processor, so that the target processor determines the packet loss detection event corresponding to the target status identifier based on the target status identifier carried in the mirror data packet, and determines the packet loss information of the target data packet based on the packet loss detection event corresponding to the target status identifier.

[0143]

[0145] Optionally, the mirroring module 606 is further configured to: determine the data packet attribute information of the target data packet based on the data packet attribute information, and if the data packet attribute information matches the preset data packet attribute information, mirror the target data packet to obtain a mirrored data packet carrying a target status identifier.

[0144]

[0146] Optionally, the sending module 608 is further configured to: encapsulate the mirrored data packet into an initial data frame, and fill the target status identifier into the identifier recognition field of the initial data frame to obtain a target data frame; and send the target data frame to the target processor through the target protocol corresponding to the target data frame, so that the target processor can determine the packet loss node of the target data packet by parsing the target data frame and obtaining the target status identifier filled in the identifier recognition field.

[0145]

[0147] The apparatus further includes: an execution module configured to determine a target operation on the target data packet based on the target status identifier of the target data packet, wherein the target operation includes a packet loss operation and a no-packet loss operation.

[0146]

[0148] The data packet processing apparatus provided in this disclosure updates the initial state identifier of the target data packet to the target state identifier when the target data packet meets the packet loss detection event. This allows the target data packet to be mirrored when it is determined that the target data packet meets the packet mirroring condition, ensuring that the obtained mirrored data packet is consistent with the target data packet. Specifically, the state identifier carried by the mirrored data packet is also the target state identifier. When the mirrored data packet carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data packet, thereby accurately determining the packet loss node of the target data packet. Furthermore, by determining whether the target data packet meets the packet mirroring condition based on the data packet attribute information of the target data packet, the complexity is reduced, resource consumption is decreased, packet loss information is investigated more accurately and simply, and the processing efficiency for determining packet loss nodes is improved.

[0147]

[0149] The above description is an illustrative scheme of a data packet forwarding device and a data packet processing apparatus applied to a data packet forwarding device according to this embodiment. It should be noted that the technical solution of this data packet forwarding device and data packet processing apparatus belongs to the same concept as the aforementioned technical solution of the data packet forwarding device and data packet processing method. Details not described in detail in the technical solution of the data packet forwarding device and data packet processing apparatus can be found in the description of the aforementioned technical solution of the data packet forwarding device and data packet processing method.

[0148]

[0150] Corresponding to the above method embodiments, this disclosure also provides an embodiment of a packet loss information analysis device. Figure 7 shows a schematic diagram of the structure of a packet loss information analysis device applied to a target processor according to an embodiment of this disclosure. As shown in Figure 7, the device includes the following modules.

[0149]

[0151] The receiving module 702 is configured to receive a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information.

[0150]

[0152] The determination module 704 is configured to parse the mirrored data packet, obtain the target status identifier carried by the mirrored data packet, and determine the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

[0151]

[0153] The packet loss information analysis device provided in this embodiment allows the target processor to accurately and efficiently determine the packet loss nodes of the target data packets by analyzing the mirrored data packets. Based on the packet loss nodes, reasonable network optimization can be performed to improve network transmission efficiency and stability.

[0152]

[0154] The above is an illustrative scheme of a packet loss information analysis device applied to a target processor according to this embodiment. It should be noted that the technical solution of the packet loss information analysis device applied to a target processor and the technical solution of the packet loss information analysis method applied to a target processor described above belong to the same concept. For details not described in detail in the technical solution of the packet loss information analysis device applied to a target processor, please refer to the description of the technical solution of the packet loss information analysis method applied to a target processor described above.

[0153]

[0155] Figure 8 shows a structural block diagram of a computing device 800 according to an embodiment of the present disclosure. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0154]

[0156] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Wi-MAX (Worldwide Interoperability for Microwave Access) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC), etc.

[0155]

[0157] In one embodiment of this disclosure, the aforementioned components of the computing device 800, as well as other components not shown in FIG. 8, may be interconnected, for example, via a bus. It should be understood that the computing device block diagram shown in FIG. 8 is merely for illustrative purposes and is not intended to limit the scope of this disclosure. Those skilled in the art can add or replace other components as needed.

[0156]

[0158] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.

[0157]

[0159] The processor 820 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described data packet processing method.

[0158]

[0160] The various embodiments in this disclosure are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computing device embodiments are basically similar to the data packet processing method embodiments, so the description is relatively simple; relevant parts can be referred to in the description of the data packet processing method embodiments.

[0159]

[0161] An embodiment of this disclosure also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described data packet processing method and packet loss information analysis method.

[0160]

[0162] The various embodiments in this disclosure are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiments are relatively simple in description because they are substantially similar to the data packet processing method embodiments; relevant parts can be referred to in the description of the data packet processing method embodiments.

[0161]

[0163] An embodiment of this disclosure also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described data packet processing method and packet loss information analysis method.

[0162]

[0164] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the data packet processing method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the data packet processing method described above.

[0163]

[0165] The foregoing has described specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0164]

[0166] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0165]

[0167] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this disclosure are not limited to the described order of actions, because according to the embodiments of this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this disclosure.

[0166]

[0168] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0167]

[0169] The preferred embodiments disclosed above are merely illustrative of this disclosure. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments of this disclosure. These embodiments are selected and specifically described in this disclosure to better explain the principles and practical applications of the embodiments of this disclosure, thereby enabling those skilled in the art to better understand and utilize this disclosure. This disclosure is limited only by the claims and their full scope and equivalents.

Claims

Claims 1. A data packet processing method, applied to a data packet forwarding device, comprising: The system receives a target data packet, wherein the target data packet carries data packet attribute information; performs packet loss detection on the target data packet based on a packet loss detection event; if the target data packet satisfies the packet loss detection event, updates the initial state identifier of the target data packet to a target state identifier, wherein the target state identifier corresponds to the packet loss detection event; if the target data packet satisfies the packet mirroring condition based on the data packet attribute information and the target state identifier, mirrors the target data packet to obtain a mirrored data packet carrying the target state identifier; and sends the mirrored data packet carrying the target state identifier to the target processor.

2. The data packet processing method according to claim 1, wherein the packet loss detection events include N, and N is a positive integer; the step of performing packet loss detection on the target data packet according to the packet loss detection events, and updating the initial state identifier of the target data packet to the target state identifier when it is determined that the target data packet satisfies the packet loss detection events, includes: Determine the i-th packet loss detection event from the N packet loss detection events, and perform packet loss detection on the target data packet based on the i-th packet loss detection event, where i is a positive integer and the initial value of i is 1; if it is determined that the target data packet satisfies the i-th packet loss detection event, update the initial state identifier of the target data packet to the target state identifier corresponding to the i-th packet loss detection event.

3. The data packet processing method according to claim 2, further comprising, after performing packet loss detection on the target data packet based on the i-th packet loss detection event: If it is determined that the target data packet does not meet the i-th packet loss detection event, it is determined whether i is greater than or equal to N. If so, the packet loss detection is terminated, and the initial state identifier of the target data packet is determined as the target state identifier. If not, then increment i by 1 and continue to execute the steps of determining the i-th packet loss detection event from the N packet loss detection events and performing packet loss detection on the target data packet based on the i-th packet loss detection event.

4. The data packet processing method according to claim 1, further comprising, before receiving the target data packet: Receive packet loss detection configuration data, and configure the packet loss detection event according to the packet loss detection configuration data; Alternatively, packet loss detection configuration data can be determined based on packet loss information from historical data packets, and packet loss detection events can be configured based on the packet loss detection configuration data.

5. The data packet processing method according to claim 1, further comprising, before receiving the target data packet: Configure the corresponding target status identifier for the packet loss detection event; Sending the mirrored data packet carrying the target status identifier to the target processor includes: sending the mirrored data packet carrying the target status identifier to the target processor, so that the target processor determines the packet loss detection event corresponding to the target status identifier based on the target status identifier carried in the mirrored data packet, and determines the packet loss information of the target data packet according to the packet loss detection event corresponding to the target status identifier.

6. The data packet processing method according to claim 1, wherein, when determining that the target data packet meets the packet mirroring conditions based on the data packet attribute information and the target status identifier, mirroring the target data packet to obtain a mirrored data packet carrying the target status identifier includes: Based on the data packet attribute information, if the data packet attribute information of the target data packet is determined and matches the preset data packet attribute information, the target data packet is mirrored to obtain a mirrored data packet carrying the target status identifier.

7. The data packet processing method according to claim 1, wherein sending the mirrored data packet carrying the target status identifier to the target processor comprises: The mirror data packet is encapsulated into an initial data frame, and the target status identifier is filled into the identifier field of the initial data frame to obtain the target data frame; The target data frame is sent to the target processor via the target protocol corresponding to the target data frame. The target processor then parses the target data frame and obtains the target status identifier filled in the identifier field to determine the packet loss node O of the target data packet.

8. The data packet processing method according to claim 1, further comprising, after sending the mirrored data packet to the target processor: Based on the target status identifier of the target data packet, determine the target operation for the target data packet. The target operation includes packet loss operation and no packet loss operation.

9. The data packet processing method according to any one of claims 1-8, wherein the data packet attribute information includes the source address, destination address, target protocol, source port and / or destination port of the target data packet.

10. The data packet processing method according to any one of claims 1-8, wherein the data packet forwarding device is a cloud-based data packet forwarding device.

11. A packet loss information analysis method, applied to a target processor, comprising: The system receives a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information; it parses the mirrored data packet to obtain the target status identifier carried by the mirrored data packet, and determines the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

12. A data packet processing apparatus, applied to a data packet forwarding device, comprising: A receiving module is configured to receive a target data packet, wherein the target data packet carries data packet attribute information; an updating module is configured to perform packet loss detection on the target data packet based on a packet loss detection event, and, if the target data packet satisfies the packet loss detection event, update the initial state identifier of the target data packet to a target state identifier, wherein the target state identifier corresponds to the packet loss detection event; a mirroring module is configured to, based on the data packet attribute information and the target state identifier, if the target data packet satisfies the packet mirroring condition, mirror the target data packet to obtain a mirrored data packet carrying the target state identifier; and a sending module is configured to send the mirrored data packet carrying the target state identifier to the target processor.

13. A packet loss information analysis device, applied to a target processor, comprising: The receiving module is configured to receive a mirrored data packet carrying a target status identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated based on data packet attribute information and the target status identifier information; The determination module is configured to parse the mirrored data packet, obtain the target status identifier carried by the mirrored data packet, and determine the packet loss node of the target data packet based on the target status identifier carried by the mirrored data packet.

14. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 11.

15. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.

16. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method, device and system for determining network data packet

    CN109714221A

  • Node positioning method, network transmission method, device and equipment

    CN113300816A

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

    CN114006806A