Packet loss detection method and apparatus, data processing method and apparatus, and communication device

By adding connection identifiers to data packets in cloud computing scenarios and using these identifiers for packet loss detection, the problem of delineating network node anomalies in cloud computing is solved, achieving efficient and accurate network node anomaly localization.

CN119520348BActive Publication Date: 2026-02-10CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411771377.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2026-02-10
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In cloud computing scenarios, it is difficult to efficiently identify abnormal network nodes, especially when user services communicate through multiple network nodes, making it difficult to locate network anomalies.

Method used

By carrying connection identifiers in data packets, packet loss detection is performed using these identifiers to obtain the target data packets of the network node under test. The packet loss detection result is then determined based on the connection identifiers in the target data packets, thus achieving efficient and accurate delineation of network node anomalies.

Benefits of technology

By using connection identifiers, the packet loss situation of network nodes can be quickly and accurately determined, thereby efficiently delineating abnormal network nodes and improving the efficiency and accuracy of network anomaly location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520348B_ABST
    Figure CN119520348B_ABST
Patent Text Reader

Abstract

The application relates to a packet loss detection method and device, a data processing method and device, and a communication device. The method comprises the following steps: obtaining a target data packet of a network node to be detected, and determining a packet loss detection result of the network node to be detected according to a connection identifier in the target data packet of the network node to be detected. The network node to be detected is used for receiving a second data packet transmitted by a previous network node of the network node to be detected, the second data packet comprises a connection identifier corresponding to the second data packet, and the second data packet is a data packet determined by the previous network node according to a first data packet. The method can efficiently determine an abnormal network node.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the network technical field, in particular to a packet loss detection method and device, a data processing method and device, and a communication device. BACKGROUND

[0002] In a cloud computing scenario, there are various network nodes of different types. Taking a gateway as an example, there can be a gateway A for processing public network traffic, a gateway B for processing private network traffic, a gateway C for processing Network Address Translation (NAT), a gateway D for Load Balancing (LB), a gateway E for processing bare-metal server traffic, and so on.

[0003] However, since the user's business is communicated through multiple network nodes, the traffic of each network node is large, and therefore, if the user's business has a network anomaly, it is difficult to determine the network node that has the anomaly. Therefore, how to efficiently determine the network node that has the anomaly is a key research problem for those skilled in the art. SUMMARY

[0004] Therefore, it is necessary to provide a packet loss detection method and device, a data processing method and device, and a communication device that can efficiently determine the network node that has an anomaly.

[0005] In a first aspect, the present application provides a packet loss detection method, comprising:

[0006] obtaining a target data packet of a network node to be tested;

[0007] determining a packet loss detection result of the network node to be tested according to a connection identifier in the target data packet of the network node to be tested; the network node to be tested is configured to receive a second data packet sent by a previous network node of the network node to be tested, the second data packet comprising a connection identifier corresponding to the second data packet, and the second data packet being a data packet determined by the previous network node according to a first data packet.

[0008] In one embodiment, determining the packet loss detection result of the network node to be tested according to the connection identifier in the target data packet of the network node to be tested comprises:

[0009] determining the packet loss detection result according to the connection identifier in the target data packet and a preset connection identifier.

[0010] In a second aspect, the present application further provides a data processing method, comprising:

[0011] obtaining a first data packet;

[0012] The second data packet is determined according to the first data packet; the second data packet comprises a connection identifier corresponding to the second data packet; the connection identifiers in different second data packets are different; and the connection identifier is used for packet loss detection.

[0013] The second data packet is sent to a next network node.

[0014] In one embodiment, the second data packet is determined according to the first data packet, comprising:

[0015] If the first data packet comprises a connection identifier corresponding to the first data packet, the first data packet is taken as the second data packet.

[0016] If the first data packet does not comprise a connection identifier corresponding to the first data packet, the connection identifier is added in the first data packet to obtain the second data packet.

[0017] In one embodiment, the second data packet is obtained by adding the connection identifier in the first data packet, comprising:

[0018] The connection identifier is added in an option field of a TCP header of the first data packet to obtain the second data packet.

[0019] In one embodiment, the method further comprises:

[0020] A response data packet of the second data packet is obtained; the response data packet comprises a connection identifier corresponding to the second data packet.

[0021] In a third aspect, the application further provides a packet loss detection device, comprising:

[0022] An obtaining module is configured to obtain a target data packet of a network node to be tested;

[0023] A determining module is configured to determine a packet loss detection result of the network node to be tested according to a connection identifier in the target data packet of the network node to be tested; the network node to be tested is configured to receive a second data packet sent by a previous network node of the network node to be tested; the second data packet comprises a connection identifier corresponding to the second data packet; and the second data packet is a data packet determined by the previous network node according to a first data packet.

[0024] In a fourth aspect, the application further provides a data processing device, comprising:

[0025] An obtaining module is configured to obtain a first data packet;

[0026] A determining module is configured to determine a second data packet according to the first data packet; the second data packet comprises a connection identifier corresponding to the second data packet; the connection identifiers in different second data packets are different; and the connection identifier is used for packet loss detection.

[0027] The sending module is configured to send the second data packet to a next network node.

[0028] In a fifth aspect, the present application provides a communication device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0029] In a sixth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of any of the above methods.

[0030] In a seventh aspect, the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of any of the above methods.

[0031] The above packet loss detection method and device, data processing method and device, and communication device, since the second data packet is sent by the previous network node of the network node to be tested, the second data packet comprises a connection identifier corresponding to the second data packet, and the second data packet is determined by the previous network node based on the first data packet, the connection identifier is carried in the data packet sent by the previous network node to the network node to be tested, and the packet loss of the network node to be tested can be determined based on the connection identifier. Based on this, the target data packet of the network node to be tested is obtained, and the packet loss detection result of the network node to be tested can be efficiently and accurately determined based on the connection identifier in the target data packet of the network node to be tested, so that the network node with an abnormality can be efficiently delimited. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other related drawings can be obtained by those skilled in the art without any creative effort.

[0033] Figure 1 It is a schematic diagram of a communication architecture;

[0034] Figure 2 It is an application environment diagram of the packet loss detection method in an embodiment;

[0035] Figure 3 It is a flowchart of the packet loss detection method in an embodiment;

[0036] Figure 4 It is a schematic diagram of a communication process in an embodiment;

[0037] Figure 5 This is a schematic diagram of packet loss detection in one embodiment;

[0038] Figure 6 This is a flowchart illustrating a data processing method in one embodiment;

[0039] Figure 7 This is a flowchart illustrating the process of determining the second data packet in one embodiment;

[0040] Figure 8 This is a schematic diagram illustrating the process of injecting connection identifiers in one embodiment;

[0041] Figure 9 This is a schematic diagram of the TCP header in one embodiment;

[0042] Figure 10 This is a structural block diagram of a packet loss detection device in one embodiment;

[0043] Figure 11 This is a structural block diagram of a data processing device in one embodiment;

[0044] Figure 12 This is an internal structural diagram of a communication device in one embodiment. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] Figure 1 This is a schematic diagram of a communication architecture, such as... Figure 1As shown, in a cloud computing scenario, user terminal 101 can communicate with Virtual Private Cloud (VPC) 102. Virtual Private Cloud 102 includes different types of network nodes, such as network node 1021, network node 1022, network node 1023, network node 1024, network node 1025, and network node 1026. These network nodes in Virtual Private Cloud 102 may include, but are not limited to, Internet Gateway (IGW), Virtual Private Gateway (VGW), Load Balancer (LB), Bare-Metal Gateway (BMGW), and services deployed on bare-metal servers (BS). In some embodiments, the network nodes in Virtual Private Cloud (VPC) 102 may be deployed in a cluster, providing services through multiple hardware devices.

[0047] For example, the following example uses network node 1021 as IGW, network node 1022 as VGW, network node 1023 as LB, network node 1024 as BMGW, and network nodes 1025 and 1026 as BS. It should be understood that the above only illustrates one possible communication architecture for a cloud computing scenario, and this embodiment is not limited thereto.

[0048] Please continue to refer to this. Figure 1 Because user traffic may converge on the same or multiple network nodes, the traffic on each network node in a Virtual Private Cloud (VPC) 102 is very high. Furthermore, some network nodes undergo network virtualization, and the Internet Protocol (IP) addresses used for communication between these nodes may differ. In related technologies, it is typically necessary for developers or operations personnel of multiple network nodes to simultaneously capture and analyze packets one by one, significantly increasing the difficulty of the analysis. Therefore, it is necessary to propose a packet loss detection method to address the aforementioned technical problems. This method will be introduced below.

[0049] Figure 2 This diagram illustrates the application environment of a packet loss detection method in one embodiment. The communication device 201 is capable of communicating with the network node 202 under test. The network node 202 under test can be... Figure 1 Any one or more network nodes in the system, such as user terminal 101 or network node 1021, are not limited in this embodiment.

[0050] The communication device 201 is a device for packet loss detection. The communication device 201 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, independent physical servers, server clusters or distributed systems composed of multiple physical servers, and cloud servers for cloud computing services. It should be noted that the communication device can be set up independently of the network node under test 202, or it can be set up coupled to the network node under test. This embodiment is not limited to this.

[0051] Figure 3 This is a flowchart illustrating a packet loss detection method in one embodiment. In an exemplary embodiment, such as... Figure 3 As shown, a packet loss detection method is provided, which is then applied to... Figure 2 The following explanation will be based on communication equipment, including the following steps S201 to S203.

[0052] S301, Obtain the target data packet of the network node under test.

[0053] In this embodiment, the number of network nodes to be tested can be one or more. For example, the communication device can acquire the target data packets of each network node during communication between the user terminal and the virtual private cloud.

[0054] The target data packet is a data packet obtained based on the network node under test. It can be all data packets of the network node under test within a certain period of time, or it can be a data packet filtered based on preset filtering conditions. This embodiment does not limit it.

[0055] Optionally, the communication device can use packet capture tools such as tcpdump or dpdk-pdump to obtain the target data packets of the network node under test.

[0056] S302, determine the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test; the network node under test is used to receive the second data packet sent by the previous network node of the network node under test, the second data packet includes the connection identifier corresponding to the second data packet, the second data packet is the data packet determined by the previous network node based on the first data packet.

[0057] In this embodiment, the upstream network node of the network node under test can obtain the first data packet. The first data packet can be a data packet generated by the upstream network node of the network node under test, or a data packet sent by another network node to the upstream network node. This embodiment does not limit the form, content, or source of the first data packet. For example, the first data packet can be a request message.

[0058] Therefore, after the upstream network node obtains the first data packet, it can determine the second data packet based on the first data packet. Optionally, if the first data packet includes a connection ID corresponding to the first data packet, the upstream network node can use the first data packet as the second data packet. If the first data packet does not include a connection ID, the upstream network node can add the corresponding connection ID to the first data packet to obtain the second data packet.

[0059] Furthermore, the previous network node can send a second data packet to the network node under test. And, different second data packets correspond to different connection identifiers.

[0060] Figure 4 This is a schematic diagram of the communication process in one embodiment, such as... Figure 4 As illustrated, exemplifying a scenario where the network node under test is an IGW and its upstream network node is a user terminal, the user terminal generates a first data packet A when it needs to communicate with the IGW. Based on this first data packet A, it determines a second data packet A and sends it to the IGW. The second data packet A includes a corresponding connection identifier A, for example, connection identifier A is 123. It is understood that if the user terminal generates a first data packet B, it determines a second data packet B based on this first data packet B and sends it to the IGW. The connection identifier in the second data packet B is different from the connection identifier in the first data packet B. The same principle applies when the network node under test is another network node, which will not be elaborated here.

[0061] In this way, since the data packets sent from the upstream network node to the network node under test carry a connection identifier, packet loss detection can be performed on the network node under test using the connection identifier. Therefore, after the communication device obtains the target data packet of the network node under test, it can determine the packet loss detection result of the network node under test based on the connection identifier in the target data packet.

[0062] Packet loss detection results characterize the packet loss status of the network node under test. Packet loss detection results can include "packet lost" or "no packet loss", and can also include at least one quality parameter for the communication quality of the network node under test, such as packet loss rate and latency.

[0063] Optionally, after receiving the target data packet, the communication device can parse the target data packet to determine whether the target data packet has a corresponding connection identifier. If the corresponding connection identifier does not exist, it is determined that the network node under test has lost packets.

[0064] Please continue to refer to this. Figure 4The user terminal communicates with the RS sequentially through the IGW, VGW, LB, and BMGW. If a communication anomaly occurs, it's necessary to identify the abnormal network node from among all network nodes. However, the IPs used for communication between network nodes are different, and gateway nodes may modify their IPs. Therefore, it's impossible to identify abnormal network nodes by filtering IPs through packet capture. For example, Figure 4 The user terminal uses IP address 1.1.1.1, the IGW uses IP address 1.1.1.2, and the VGW encapsulates IP address 1.1.1.3 into an inner VXLAN layer based on a Virtual eXtensible Local Area Network (VXLAN), while outer communication uses IP address 2.2.2.3. The LB also uses VXLAN, encapsulating IP address 1.1.1.4 into an inner VXLAN layer, while outer communication uses IP address 2.2.2.4. The BMGW uses IP address 1.1.15, and the RS uses IP address 1.1.1.6. Therefore, currently, if a user's service experiences network anomalies, it is difficult to pinpoint the network node causing the anomaly.

[0065] In this embodiment, the connection identifiers for the same data packet are identical. Therefore, the packet loss detection result of the network node under test can be efficiently determined using the connection identifier. For example, Figure 4 Since RS did not receive the data packet with connection identifier 123, the network node that lost the packet can be quickly located as RS.

[0066] In one embodiment, optionally, the communication device can use connection identifiers as a filtering condition to obtain target data packets of the network node under test. This allows the communication device to obtain only target data packets carrying connection identifiers. Further optionally, the communication device can statistically analyze the connection identifiers in the target data packets to obtain statistical results, and determine the packet loss detection result of the network node under test based on these results. For example, the communication device can determine that the network node under test has not lost packets if the statistical results are within a preset range, and determine that the network node under test has lost packets if the statistical results are not within the preset range. As another example, the communication device can determine the packet loss rate of the target data packets based on the statistical results and use the packet loss rate as the packet loss detection result of the network node under test; this embodiment is not limited to this.

[0067] In the aforementioned packet loss detection method, since the network node under test receives the second data packet sent by its predecessor network node, and this second data packet includes a connection identifier, and is determined by the predecessor network node based on the first data packet, the data packet sent from the predecessor network node to the network node under test carries the connection identifier. The packet loss status of the network node under test can be determined through this connection identifier. Therefore, by acquiring the target data packet of the network node under test, the packet loss detection result of the network node under test can be efficiently and accurately determined based on the connection identifier in the target data packet, thus efficiently delineating abnormal network nodes.

[0068] In an exemplary embodiment, optionally, the above-described S302 can be implemented in the following manner:

[0069] The packet loss detection result is determined based on the connection identifier in the target data packet and the preset connection identifier.

[0070] In this embodiment, the communication device can determine a preset connection identifier. This preset connection identifier is the connection identifier that the data packets of the network node under test should carry when the network node is communicating normally.

[0071] Therefore, after the communication device obtains the target data packet of the network node under test, it can determine the packet loss detection result of the network node under test based on the connection identifier in the target data packet and the preset connection identifier. Optionally, the communication device can compare the connection identifier in the target data packet with the preset connection identifier; if the connection identifier in the target data packet is not the preset connection identifier, then it is determined that the network node under test has lost packets.

[0072] Figure 5 This is a schematic diagram of packet loss detection in one embodiment. Figure 5 The diagram illustrates some optional packet loss detection processes, such as... Figure 5 As shown in Figure (a), taking the network nodes under test including VGW, LB and BMGW as an example, assuming the preset connection identifier is 234, if the target data packets of VGW and LB include the preset connection identifier 234, but the target data packets of BMGW do not include the preset connection identifier 234, it indicates that BMGW is losing packets.

[0073] In one embodiment, there are multiple target data packets, and the connection identifier carried in the target data packets can be specified. Furthermore, the communication device can determine the packet loss detection result of the network node under test based on the difference between the connection identifier in the target data packet and a preset connection identifier.

[0074] In some embodiments, the communication device can determine quality parameters based on the connection identifier in the target data packet and a preset connection identifier. For example, the number of lost packets can be determined based on the connection identifier in the target data packet and the preset connection identifier, and the packet loss rate of the network node under test can be determined based on the total number of target data packets and the number of lost packets.

[0075] The following example illustrates this. For instance, when the IGW communicates with the BMGW, it can be specified that 10,000 target data packets are sent, each carrying a connection identifier from 1 to 10,000. In this case, the default connection identifier is 1-10,000. Please refer to... Figure 5 In Figure (b), taking the network nodes under test including IGW, VGW, LB, and BMGW as an example, if the connection identifier in the target data packet of IGW, VGW, and LB is 1-10000, while the connection identifier in the target data packet of BMGW is 1-9999, it means that BMGW did not receive the target data packet with connection identifier 10000, and BMGW lost packets. Furthermore, the communication device can determine the packet loss rate of BMGW to be 0.01% based on the connection identifier in the target data packet and the preset connection identifier.

[0076] The above example uses a user terminal sending data to a BMGW; the principle behind BMGW sending data to a user terminal is the same. Since the user terminal carries connection identifier 123 when sending data packets to the BMGW, the BMGW will also carry the same connection identifier 123 when returning data packets to the user terminal. Please refer to [link / reference]. Figure 5 As shown in Figure (c), the IGW did not receive the target data packet with connection identifier 123. That is, the VGW did not send the target data packet with connection identifier 123 to the IGW normally. Therefore, it can be determined that the VGW is abnormal.

[0077] In the above embodiments, since the packet loss detection result is determined based on the connection identifier in the target data packet and the preset connection identifier, the packet loss detection result can be determined efficiently, thereby delineating abnormal network nodes.

[0078] Based on the same inventive concept, this application also provides a data processing method. Figure 6 This is a flowchart illustrating a data processing method in one embodiment. In an exemplary embodiment, such as... Figure 6 As shown, a data processing method is provided, which can be applied to... Figure 1 The following explanation will be based on any one of the network nodes (also known as the current network node), including the following S601 to S603.

[0079] S601, Obtain the first data packet.

[0080] In this embodiment, the current network node is able to acquire the first data packet. The first data packet can be a data packet generated by the current network node, or a data packet sent to the current network node by another network node.

[0081] Taking a user terminal as an example, the user terminal can generate the first data packet. Taking an IGW as an example, the IGW can receive the first data packet sent by the user terminal.

[0082] S602, determine the second data packet based on the first data packet; the second data packet includes the connection identifier corresponding to the second data packet; the connection identifiers in different second data packets are different; the connection identifier is used for packet loss detection.

[0083] In this embodiment, after the current network node obtains the first data packet, it can determine the second data packet based on the first data packet. The second data packet includes a connection identifier corresponding to it, and different second data packets contain different connection identifiers. Taking a data packet based on the Transmission Control Protocol (TCP) as an example, optionally, the connection identifier corresponding to the same TCP connection is the same, while different TCP connections have different connection identifiers.

[0084] The connection identifier can be generated by the previous network node or by the current network node; this embodiment does not impose any restrictions. Optionally, after receiving the first data packet, the current network node can add a unique connection identifier to the first data packet to obtain the second data packet. For example, after receiving the first data packet A, the current network node adds the connection identifier A to the first data packet A to obtain the second data packet A; after receiving the first data packet B, it adds the connection identifier B to the first data packet B to obtain the second data packet B, and so on.

[0085] It is understood that the connection identifier may be, but is not limited to, at least one of numbers, letters, or symbols. Further optionally, the connection identifier may be randomly generated or may be an identifier associated with a previously generated connection identifier. For example, the connection identifier in the second second data packet may be consecutive to the connection identifier in the first second data packet.

[0086] S603, send the second data packet to the next network node.

[0087] In this embodiment, after the current network node determines the second data packet, it can send the second data packet to the next network node. Taking the current network node as an IGW as an example, the IGW can send the second data packet to the VGW.

[0088] It is understandable that if all communication links are normal and no abnormal network nodes appear, then the connection identifier can be transmitted normally along the communication link. Therefore, abnormal network nodes can be quickly identified through the connection identifier. In other words, the connection identifier can be used for packet loss detection. The process of packet loss detection can be referred to the above embodiments, and will not be repeated here.

[0089] In the above data processing method, a first data packet can be acquired, and a second data packet can be determined based on the first data packet, and then the second data packet can be sent to the next network node. Since the second data packet includes a connection identifier corresponding to the second data packet, and different second data packets have different connection identifiers, the data packet sent to the next network node carries the connection identifier. In this way, packet loss detection can be performed through the connection identifier to efficiently identify network nodes that have anomalies.

[0090] Figure 7 This is a schematic diagram of the process for determining the second data packet in one embodiment. In an exemplary embodiment, such as... Figure 7 As shown, S602 includes S701 to S702.

[0091] S701, if the first data packet includes the connection identifier corresponding to the first data packet, then the first data packet is used as the second data packet.

[0092] In this embodiment, after receiving the first data packet, the current network node determines whether the first data packet includes a connection identifier corresponding to the first data packet. Optionally, the current network node can parse the first data packet to determine whether the first data packet includes a corresponding connection identifier.

[0093] Furthermore, if the first data packet includes the connection identifier corresponding to the first data packet, it means that the network node before the current network node has already injected the connection identifier into the first data packet, and the current network node does not need to continue injecting the connection identifier. Therefore, the current network node can directly use the first data packet as the second data packet.

[0094] For example, taking the current network node as VGW, when VGW receives the first data packet A sent by IGW, if the first data packet A includes the connection identifier A corresponding to the first data packet A, then VGW directly uses the first data packet A as the second data packet A and sends the second data packet A to LB. The second data packet is the same as the first data packet A. In other words, VGW can directly forward the first data packet A to LB.

[0095] S702, if the first data packet does not include the connection identifier corresponding to the first data packet, then add the connection identifier to the first data packet to obtain the second data packet.

[0096] In this embodiment, if the first data packet does not include the connection identifier corresponding to the first data packet, it means that the network nodes before the current network node may not have the ability to inject the connection identifier, or the previous network nodes are abnormal. In order to perform packet loss detection on the current network node and subsequent network nodes through the connection identifier, the current network node will add the connection identifier to the first data packet to obtain the second data packet. This embodiment does not limit the way the connection identifier is added to the first data packet, nor does it limit the position of the connection identifier in the first data packet.

[0097] For example, taking a Hypertext Transfer Protocol (HTTP) request, if the first data packet is based on a Layer 7 HTTP service, the curl command can be modified, such as by using "curl:IP:PORT --set connection id XXX" in the user terminal to add a corresponding connection identifier to the first data packet to generate the second data packet. If the first data packet is based on a Layer 4 TCP service, commands such as nc can be modified, such as using "nc ipport --set connection id XXX" to add a corresponding connection identifier to the first data packet to generate the second data packet.

[0098] To more clearly illustrate the process of adding link identifiers in this application, this section combines... Figure 8 Please provide an explanation. Figure 8 This is a schematic diagram illustrating the process of injecting connection identifiers in one embodiment, such as... Figure 8 As shown, after receiving the first data packet, the current network node checks whether a connection identifier exists in the first data packet. If a connection identifier exists, no action is taken, and the first data packet is directly sent as the second data packet to the next network node. If a connection identifier does not exist in the first data packet, a connection identifier is injected into the first data packet, that is, a connection identifier is added to the first data packet to obtain the second data packet, and then the second data packet including the connection identifier is sent to the next network node.

[0099] In the above embodiments, since the first data packet is used as the second data packet when it includes the connection identifier corresponding to the first data packet, and the connection identifier is added to the first data packet to obtain the second data packet when it does not include the connection identifier corresponding to the first data packet, the second data packet sent to the next network node can include the corresponding connection identifier, which is beneficial for packet loss detection through the connection identifier.

[0100] In an exemplary embodiment, optionally, the "adding a connection identifier to the first data packet to obtain the second data packet" in S702 above can be implemented in the following way:

[0101] The second data packet is obtained by adding a connection identifier to the options field of the TCP header of the first data packet.

[0102] In this embodiment, the first data packet is a TCP-based data packet, which includes a TCP header and an options field. Furthermore, the current network node can add a connection identifier to the options field of the TCP header of the first data packet to obtain the second data packet.

[0103] Figure 9 This is a schematic diagram of the TCP header in one embodiment, such as... Figure 9 As shown in Figure (a), the first data packet includes a TCP header and data. The TCP header includes fields such as source port, destination port, sequence number, acknowledgment number, data offset, reserved bits, control bits, window size, checksum, urgent pointer, options, and padding.

[0104] The control bits include the URG (Urgent) field, ACK (Acknowledgment) field, PSH (Push) field, RST (Reset) field, SYN (Synchronize) field, and FIN (Finish) field.

[0105] Please continue to refer to this. Figure 9 In Figure (b) of the example embodiment, the option field may optionally include a kind field indicating the specific type of the TCP option, a length field indicating the total length of the option, and an info field indicating specific information about the option. The kind field is 1 byte, the length field is 1 byte, and the info field is n bytes. n can be an integer greater than or equal to 1.

[0106] Alternatively, the connection identifier can be stored in the info field. For example, if n=2, the info byte is 2 bytes, and the connection identifier (connection id) can range from 0 to 65535.

[0107] In the above embodiments, since the second data packet is obtained by adding a connection identifier to the option field of the TCP header of the first data packet, the connection identifier is a variable-length information in the TCP header, and the connection identifier can be added flexibly and efficiently through the option field.

[0108] In one exemplary embodiment, optionally, the above data processing method further includes:

[0109] Obtain the response data packet of the second data packet; the response data packet includes the connection identifier corresponding to the second data packet.

[0110] In this embodiment, the current network node can also act as a receiver to obtain a response data packet of the second data packet. Similarly, the response data packet includes a connection identifier corresponding to the second data packet. Thus, packet loss detection can be performed not only when the current network node is acting as a sender, but also when it is acting as a receiver, improving the flexibility of packet loss detection.

[0111] In some embodiments, special statistics can be performed on the options field. For example, the connection identifier in the data packet initiated by the user terminal (e.g., the client) may include a randomly generated number from 0 to 65535. The value of the connection identifier in the data packet of each subsequent network node can be used to determine which network node has packet loss through the statistical command.

[0112] In summary, the method provided in this application, through the data processing method of adding a TCP options field, allows for troubleshooting of packet loss issues between any two network nodes in a cloud computing scenario, regardless of whether the network nodes are using services such as Full Network Address Translation (Full NAT), VXLAN encapsulation, or Generic Network Virtualization Encapsulation (Geneve). This has no impact on existing services. Each network node only needs to add or identify a connection identifier; without modifying this field, packet loss issues between any two network nodes on the entire link can be investigated. On the one hand, this improves the ability to pinpoint problems in online operations and maintenance, enabling rapid location of customer issues and improved customer satisfaction in post-delivery operations and maintenance scenarios. On the other hand, it enhances the ability to pinpoint packet loss issues, especially those involving random packet loss, reducing manpower costs and creating greater economic value for enterprises.

[0113] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0114] Based on the same inventive concept, this application also provides a packet loss detection device for implementing the packet loss detection method described above, and a data processing device for implementing the data processing method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in the embodiments of the packet loss detection device and data processing device provided below can be found in the limitations of the packet loss detection method and data processing device described above, and will not be repeated here.

[0115] Figure 10 This is a structural block diagram of a packet loss detection device in one embodiment. In an exemplary embodiment, such as... Figure 10 As shown, a packet loss detection device 1000 is provided, including: an acquisition module 1001 and a determination module 1002, wherein:

[0116] The acquisition module 1001 is used to acquire the target data packets of the network node under test.

[0117] The determination module 1002 is used to determine the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test; the network node under test is used to receive the second data packet sent by the previous network node of the network node under test, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is the data packet determined by the previous network node based on the first data packet.

[0118] In the aforementioned packet loss detection device, since the network node under test receives a second data packet sent by its predecessor network node, and this second data packet includes a connection identifier, and is determined by the predecessor network node based on the first data packet, the data packet sent from the predecessor network node to the network node under test carries the connection identifier. The packet loss status of the network node under test can be determined through this connection identifier. Therefore, by acquiring the target data packet of the network node under test, the packet loss detection result of the network node under test can be efficiently and accurately determined based on the connection identifier in the target data packet, thereby efficiently delineating abnormal network nodes.

[0119] Optionally, the determining module 1002 is used to determine the packet loss detection result based on the connection identifier in the target data packet and the preset connection identifier.

[0120] Figure 11 This is a structural block diagram of a data processing apparatus in one embodiment. In an exemplary embodiment, such as... Figure 11 As shown, a packet loss detection device 1100 is provided, including: an acquisition module 1101, a determination module 1102, and a transmission module 1103, wherein:

[0121] The acquisition module 1101 is used to acquire the first data packet.

[0122] The determination module 1102 is used to determine the second data packet based on the first data packet; the second data packet includes a connection identifier corresponding to the second data packet; the connection identifiers in different second data packets are different; the connection identifier is used for packet loss detection.

[0123] The sending module 1103 is used to send a second data packet to the next network node.

[0124] In the aforementioned data processing device, a first data packet can be acquired, and a second data packet can be determined based on the first data packet, and then the second data packet can be sent to the next network node. Since the second data packet includes a connection identifier corresponding to the second data packet, and different second data packets have different connection identifiers, the data packet sent to the next network node carries the connection identifier. In this way, packet loss detection can be performed through the connection identifier to efficiently identify abnormal network nodes.

[0125] Optionally, the determining module 1102 includes:

[0126] The determining unit is configured to, if the first data packet includes a connection identifier corresponding to the first data packet, then use the first data packet as the second data packet.

[0127] An adding unit is used to add a connection identifier to the first data packet to obtain a second data packet if the first data packet does not include the connection identifier corresponding to the first data packet.

[0128] Optionally, an additional unit can be added to the options field of the TCP header of the first data packet to obtain the second data packet.

[0129] Optionally, the packet loss detection device 1100 is also used to obtain the response data packet of the second data packet; the response data packet includes the connection identifier corresponding to the second data packet.

[0130] Each module in the aforementioned packet loss detection device or data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0131] Figure 12 This is an internal structural diagram of a communication device in one embodiment. In an exemplary embodiment, a communication device is provided, and the internal structural diagram of this communication device can be as follows: Figure 12 As shown, the communication device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a packet loss detection method.

[0132] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the communication device to which the present application is applied. Specific communication devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one embodiment, a communication device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0134] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0135] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A packet loss detection method, characterized in that, Used in communication equipment; The communication device connects to any network node during the service communication process; the method includes: Obtain the target data packets of the network node under test; The packet loss detection result of the network node under test is determined based on the connection identifier in the target data packet of the network node under test; the connection identifiers of the same data packet are the same; the network node under test is used to receive the second data packet sent by the previous network node of the network node under test, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is the data packet determined by the previous network node based on the first data packet after obtaining the first data packet; The step of determining the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test includes: If the target data packet includes the connection identifier, then it is determined that the network node under test has not experienced packet loss. If the target data packet does not include the connection identifier, then it is determined that the network node under test has experienced packet loss.

2. The method according to claim 1, characterized in that, The step of determining the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test includes: The packet loss detection result is determined based on the connection identifier in the target data packet and the preset connection identifier.

3. A data processing method, characterized in that, The method is applied to any network node during business communication; the method includes: Obtain the first data packet; A second data packet is determined based on the first data packet; the second data packet includes a connection identifier corresponding to the second data packet; different second data packets have different connection identifiers; the connection identifier is used for packet loss detection; The second data packet is sent to the next network node. The second data packet is used by the communication device to determine the packet loss detection result of the next network node based on the connection identifier in the second data packet; the identifier of the same data packet is the same. The communication device determines that the second data packet has not been lost if the second data packet includes the connection identifier; and determines that the second data packet has been lost if the second data packet does not include the connection identifier.

4. The method according to claim 3, characterized in that, Determining the second data packet based on the first data packet includes: If the first data packet includes the connection identifier corresponding to the first data packet, then the first data packet is used as the second data packet; If the first data packet does not include the connection identifier corresponding to the first data packet, then the connection identifier is added to the first data packet to obtain the second data packet.

5. The method according to claim 4, characterized in that, The step of adding the connection identifier to the first data packet to obtain the second data packet includes: The second data packet is obtained by adding the connection identifier to the options field of the TCP header of the first data packet.

6. The method according to any one of claims 3-5, characterized in that, The method further includes: Obtain the response data packet for the second data packet; the response data packet includes the connection identifier corresponding to the second data packet.

7. A detection device, characterized in that, The device includes: The acquisition module is used to acquire the target data packets of the network node under test; The determination module is used to determine the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test; the connection identifiers of the same data packet are the same; the network node under test is used to receive a second data packet sent by the previous network node of the network node under test, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is a data packet determined by the previous network node based on the first data packet after obtaining the first data packet; The step of determining the packet loss detection result of the network node under test based on the connection identifier in the target data packet of the network node under test includes: If the target data packet includes the connection identifier, then it is determined that the network node under test has not experienced packet loss. If the target data packet does not include the connection identifier, then it is determined that the network node under test has experienced packet loss.

8. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the first data packet; The determining module is used to determine a second data packet based on the first data packet; the second data packet includes a connection identifier corresponding to the second data packet; different second data packets have different connection identifiers; the connection identifier is used for packet loss detection; The sending module is used to send the second data packet to the next network node. The second data packet is used by the communication device to determine the packet loss detection result of the next network node based on the connection identifier in the second data packet; the identifier of the same data packet is the same. The communication device determines that the second data packet has not been lost if the second data packet includes the connection identifier; and determines that the second data packet has been lost if the second data packet does not include the connection identifier.

9. A network device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Communication method and device

    CN118283538A

  • Method for detecting network chain fault and positioning said fault

    CN1815970A