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

By using connection identifiers for packet loss detection in cloud computing scenarios, the problem of difficulty in network abnormal positioning in cloud computing scenarios is solved, and efficient and accurate abnormal positioning of network nodes is achieved.

CN119520348AActive Publication Date: 2025-02-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In cloud computing scenarios, users' services communicate through multiple network nodes, making it difficult to efficiently delimit abnormal network nodes when network abnormalities.

Method used

By obtaining the connection identifier in the target data packet of the network node to be tested and comparing it with the preset connection identifier based on the connection identifier, the packet loss detection result of the network node to be tested is determined, thereby efficiently delimiting the abnormal network node.

Benefits of technology

It realizes efficient and accurate determination of packet loss detection results of network nodes to be tested, and quickly delimits network nodes with abnormalities, improving the efficiency of network abnormal positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520348A_ABST
    Figure CN119520348A_ABST
Patent Text Reader

Abstract

The invention relates to a packet loss detection method and device, a data processing method and device and communication equipment. The method comprises the following steps: acquiring a target data packet of a to-be-detected network node, and determining a packet loss detection result of the to-be-detected network node according to a connection identifier in the target data packet of the to-be-detected network node. Wherein the to-be-tested network node is used for receiving a second data packet sent by a previous network node of the to-be-tested network node, the second data packet comprises a connection identifier corresponding to the second data packet, and the second data packet is a data packet obtained by the previous network node and determined according to the first data packet. By adopting the method, the abnormal network nodes can be efficiently delimited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a packet loss detection method, device, data processing method, device and communication equipment. Background Art

[0002] There are various types of network nodes in cloud computing scenarios. Taking network nodes including gateways as an example, there may be gateway A for processing public network traffic, gateway B for processing private network traffic, gateway C for processing network address translation (NAT), gateway D for load balancing (LB), gateway E for processing bare metal server traffic, and so on.

[0003] However, since the user's business will communicate through multiple network nodes, the traffic of each network node is large. Therefore, if the user's business has a network anomaly, it is difficult to delimit the network node where the anomaly occurs. Therefore, how to efficiently delimit the network node where the anomaly occurs is a key research issue for people in this field. Summary of the invention

[0004] Based on this, it is necessary to provide a packet loss detection method, device, data processing method, device and communication equipment that can efficiently demarcate abnormal network nodes in order to address the above technical problems.

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

[0006] Obtain the target data packet of the network node to be tested;

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

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

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

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

[0011] Get a first data packet;

[0012] Determine the second data packet according to 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;

[0013] A second data packet is sent to the next network node.

[0014] In one embodiment, determining the second data packet according to the first data packet includes:

[0015] If the first data packet includes the connection identifier corresponding to the first data packet, the first data packet is used as the second data packet;

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

[0017] In one embodiment, adding a connection identifier to a first data packet to obtain a second data packet includes:

[0018] A connection identifier is added to the option field of the TCP header of the first data packet to obtain a 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 includes a connection identifier corresponding to the second data packet.

[0021] In a third aspect, the present application also provides a packet loss detection device, including:

[0022] An acquisition module is used to acquire a target data packet of the network node to be tested;

[0023] A determination module is used to determine 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; the network node to be tested is used to receive a second data packet sent by the previous network node of the network node to be tested, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is a data packet obtained by the previous network node and determined according to the first data packet.

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

[0025] An acquisition module, used for acquiring a first data packet;

[0026] A determination module, configured to determine a second data packet according to a 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;

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

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

[0029] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0030] In a seventh aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0031] The above packet loss detection method, device, data processing method, device and communication equipment, because the network node to be tested is used to receive the second data packet sent by the previous network node of the network node to be tested, 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 after obtaining the first data packet and according to the first data packet, therefore, the data packet sent by the previous network node to the network node to be tested carries the connection identifier, and the packet loss situation of the network node to be tested can be determined by the connection identifier. Based on this, by obtaining the target data packet of the network node to be tested, the packet loss detection result of the network node to be tested can be efficiently and accurately determined according to the connection identifier in the target data packet of the network node to be tested, thereby efficiently demarcating the network node with abnormality. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0033] FIG1 is a schematic diagram of a communication architecture;

[0034] Figure 2 A diagram showing an application environment of a packet loss detection method in an embodiment;

[0035] Figure 3 1 is a flow chart of a packet loss detection method in one embodiment;

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

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

[0038] Figure 6 is a flow chart of a data processing method in one embodiment;

[0039] Figure 7 A schematic diagram of a process of determining a second data packet in one embodiment;

[0040] Figure 8 A schematic diagram of a process of injecting a connection identifier in an embodiment;

[0041] Fig. 9 is a schematic diagram of a TCP header in one embodiment;

[0042] Fig.10 is a structural block diagram of a packet loss detection device in an embodiment;

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

[0044] Fig.12 FIG. 4 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] FIG1 is a schematic diagram of a communication architecture. As shown in FIG1 , in a cloud computing scenario, a user terminal 101 can communicate with a virtual private cloud (VPC) 102. The virtual private cloud 102 includes different types of network nodes, such as network nodes 1021, 1022, 1023, 1024, 1025, and 1026. The network nodes in the virtual private cloud 102 may include, but are not limited to, an Internet Gateway (IGW), a Virtual Private Gateway (VGW), a Load Balancer (LB), a Bare Metal Gateway (BMGW), and a service deployed on a bare metal server (Bare Metal Server, BS). In some embodiments, the network nodes in the virtual private cloud (VPC) 102 may be clustered and served by multiple hardware devices.

[0047] Exemplarily, the following will take the example that network node 1021 is IGW, network node 1022 is VGW, network node 1023 is LB, network node 1024 is BMGW, network node 1025 and network node 1026 are both BS. It can be understood that the above only illustrates an optional communication architecture for a cloud computing scenario, and this embodiment is not limited to this.

[0048] Please continue to refer to Figure 1. Since the user's traffic may converge to the same or multiple network nodes, the traffic of each network node in the virtual private cloud (VPC) 102 is very large, and some network nodes will also perform network virtualization, and the Internet Protocol (IP) addresses for communication between network nodes may be different. In related technologies, it is usually necessary for developers or operation and maintenance personnel of multiple network nodes to capture packets at the same time and analyze them one by one, which increases the difficulty of analysis. Based on this, it is necessary to propose a packet loss detection method for the above technical problems, which will be introduced below.

[0049] Figure 2 The application environment diagram of the packet loss detection method in an embodiment is as follows: the communication device 201 can communicate with the network node to be tested 202. The network node to be tested 202 can be any one or more network nodes in FIG. 1, for example, it can be the user terminal 101 or the network node 1021, and this embodiment does not limit this.

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

[0051] Figure 3 FIG. 1 is a flow chart of a packet loss detection method in an embodiment. In an exemplary embodiment, as shown in FIG. Figure 3 As shown, a packet loss detection method is provided, which is applied to Figure 2 The communication device in is used as an example to illustrate, including the following S201 to S203.

[0052] S301, obtaining a target data packet of a network node to be tested.

[0053] In this embodiment, the number of the network nodes to be tested may be one or more. Exemplarily, the communication device may obtain a target data packet of each network node during the 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 to be tested, which may be all data packets of the network node to be tested within a period of time, or may be a data packet filtered based on a preset filtering condition, which is not limited in this embodiment.

[0055] Optionally, the communication device may use a packet capture tool such as tcpdump or dpdk-pdump to obtain a target data packet of the network node to be tested.

[0056] S302, determining a packet loss detection result of the network node to be tested according to a connection identifier in a target data packet of the network node to be tested; the network node to be tested is used to receive a second data packet sent by a previous network node of the network node to be tested, the second data packet includes a connection identifier corresponding to the second data packet, and the second data packet is a data packet obtained by the previous network node and determined according to the first data packet.

[0057] In this embodiment, the previous network node of the network node to be tested can obtain the first data packet. The first data packet may be a data packet generated by the previous network node of the network node to be tested, or a data packet sent by other network nodes to the previous network node. This embodiment does not limit the form, content and source of the first data packet. Exemplarily, the first data packet may be a request message.

[0058] Furthermore, after the previous 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 previous 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 previous 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 to be tested. Moreover, different second data packets correspond to different connection identifiers.

[0060] Figure 4 FIG. 1 is a schematic diagram of a communication process in an embodiment. Figure 4As shown, illustratively, taking the case where the network node to be tested is an IGW and the previous network node of the network node to be tested is a user terminal, the user terminal generates a first data packet A when it needs to communicate with the IGW, and determines a second data packet A based on the first data packet A, so as to send the second data packet A to the IGW, wherein the second data packet A includes a corresponding connection identifier A, for example, the connection identifier A is 123. It is understandable that if the user terminal generates a first data packet B, the second data packet B is determined based on the first data packet B, and the second data packet B is sent to the IGW, and the connection identifier in the second data packet B is different from the connection identifier in the second data packet B. The same is true when the network node to be tested is other network nodes, and it will not be repeated here.

[0061] In this way, since the data packet sent by the previous network node of the network node to be tested to the network node to be tested carries the connection identifier, the network node to be tested can be subjected to packet loss detection through the connection identifier. Therefore, after the communication device obtains the target data packet of the network node to be tested, it can determine 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.

[0062] The packet loss detection result represents the packet loss situation of the network node to be tested. The packet loss detection result may include "packet loss" or "no packet loss", or may include at least one quality parameter for the communication quality of the network node to be tested, such as packet loss rate and delay.

[0063] Optionally, after receiving the target data packet, the communication device may parse the target data packet to determine whether there is a corresponding connection identifier for the target data packet. If there is no corresponding connection identifier, it is determined that the network node to be tested has lost a packet.

[0064] Please continue to refer to Figure 4 , the user terminal communicates with RS through IGW, VGW, LB, BMGW in sequence. If communication anomalies occur, it is necessary to identify the abnormal network nodes from the network nodes. However, the IPs used for communication between network nodes are different, and the gateway nodes may modify the IPs. Therefore, it is impossible to identify abnormal network nodes by filtering IPs and capturing packets. For example, Figure 4The IP used by the user terminal is 1.1.1.1, the IP used by IGW is 1.1.1.2, and VGW will encapsulate the IP of 1.1.1.3 into the inner layer of vxlan based on the Virtual eXtensible Local Area Network (vxlan), and the outer layer communication uses 2.2.2.3 for communication. LB will encapsulate the IP of 1.1.1.4 into the inner layer of vxlan based on the Virtual eXtensible Local Area Network (vxlan), and the outer layer communication uses 2.2.2.4 for communication. The IP used by BMGW is 1.1.15, and the IP used by RS is 1.1.1.6. It can be seen that if the user's business has a network abnormality, it is difficult to locate the abnormal network node.

[0065] In this embodiment, the connection identifiers of the same data packet are the same, so the packet loss detection result of the network node to be tested can be efficiently determined by the connection identifier. Figure 4 RS did not receive the data packet with the connection identifier 123, so the network node where the packet was lost can be quickly located as RS.

[0066] In one embodiment, optionally, the communication device may use the connection identifier as a filtering condition to obtain the target data packet of the network node to be tested. In this way, the communication device can only obtain the target data packet carrying the connection identifier. Further optionally, the communication device can count the connection identifier in the target data packet to obtain a statistical result, and determine the packet loss detection result of the network node to be tested based on the statistical result. For example, the communication device can determine that the network node to be tested has not lost packets when the statistical result is within a preset range, and determine that the network node to be tested has lost packets when the statistical result is not within the preset range. For another example, the communication device can determine the packet loss rate of the target data packet based on the statistical result, and use the packet loss rate as the packet loss detection result of the network node to be tested, and this embodiment is not limited to this.

[0067] In the above packet loss detection method, since the network node to be tested is used to receive the second data packet sent by the previous network node of the network node to be tested, the second data packet includes a connection identifier corresponding to the second data packet, and the second data packet is a data packet determined by the previous network node after obtaining the first data packet and based on the first data packet, therefore, the data packet sent by the previous network node to the network node to be tested carries the connection identifier, and the packet loss situation of the network node to be tested can be determined by the connection identifier. Based on this, by obtaining the target data packet of the network node to be tested, the packet loss detection result of the network node to be tested can be efficiently and accurately determined according to the connection identifier in the target data packet of the network node to be tested, thereby efficiently demarcating the network node with abnormality.

[0068] In an exemplary embodiment, optionally, the above S302 may 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, wherein the preset connection identifier is a connection identifier that should be carried in a data packet of the network node to be tested when the network node to be tested communicates normally.

[0071] Furthermore, after the communication device obtains the target data packet of the network node to be tested, the packet loss detection result of the network node to be tested can be determined 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, and if the connection identifier in the target data packet is not the preset connection identifier, it is determined that the network node to be tested has lost a packet.

[0072] Figure 5 is a schematic diagram of packet loss detection in one embodiment, Figure 5 Some optional packet loss detection process diagrams are shown, for example Figure 5 As shown in Figure (a), taking the network nodes to be tested including VGW, LB and BMGW as an example, assuming that 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 packet of BMGW does not include the preset connection identifier 234, it means that BMGW has lost packets.

[0073] In one embodiment, the number of target data packets is multiple, and the connection identifier carried in the target data packet can be specified. Further, the communication device can determine the packet loss detection result of the network node to be tested according to the difference between the connection identifier in the target data packet and the preset connection identifier.

[0074] In some embodiments, the communication device may determine the quality parameter based on the connection identifier in the target data packet and the preset connection identifier. For example, the number of packet losses may 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 to be tested may be determined based on the total number of target data packets and the number of packet losses.

[0075] The following is an example. For example, it can be specified that when the IGW communicates with the BMGW, 10,000 target data packets are sent, and these 10,000 target data packets carry connection identifiers 1 to 10,000 respectively. In this case, the preset connection identifiers are 1-10,000. Please refer to Figure 5In (b) of FIG. 1 , the network nodes to be tested include IGW, VGW, LB and BMGW. For example, if the connection identifiers in the target data packets of IGW, VGW and LB are 1-10000, and the connection identifier in the target data packet of BMGW is 1-9999, it means that BMGW has not received the target data packet with the connection identifier of 10000, and BMGW has lost the packet. Furthermore, the communication device can determine that the packet loss rate of BMGW is 0.0.1% based on the connection identifier in the target data packet and the preset connection identifier.

[0076] The above example uses the user terminal sending data to the BMGW as an example. The principle of BMGW sending data to the user terminal is the same. Since the user terminal carries the connection identifier 123 when sending a data packet to the BMGW, the BMGW will also carry the same connection identifier 123 when returning a data packet to the user terminal. Figure 5 In Figure (c), it can be seen that the IGW did not receive the target data packet with the connection identifier 123, that is, the VGW did not normally send the target data packet with the connection identifier 123 to the IGW. Therefore, it can be determined that the VGW is abnormal.

[0077] In the above embodiment, since the packet loss detection result is determined according to the connection identifier in the target data packet and the preset connection identifier, the packet loss detection result can be determined efficiently, thereby demarcating the abnormal network node.

[0078] Based on the same inventive concept, an embodiment of the present application also provides a data processing method. Figure 6 FIG. 1 is a flow chart of a data processing method in an embodiment. In an exemplary embodiment, as shown in FIG. Figure 6 As shown, a data processing method is provided, which is described by taking the method applied to any network node (also referred to as the current network node) in FIG. 1 as an example, including the following S601 to S603.

[0079] S601: Obtain a first data packet.

[0080] In this embodiment, the current network node can obtain a first data packet, wherein the first data packet may be a data packet generated by the current network node, or a data packet sent to the current network node by other network nodes.

[0081] Taking the current network node as an example of a user terminal, the user terminal may generate a first data packet. Taking the current network node as an example of an IGW, the IGW may receive the first data packet sent by the user terminal.

[0082] S602, determining a second data packet according to 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.

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

[0084] The connection identifier may be an identifier generated by the previous network node or an identifier generated by the current network node, and this embodiment does not limit this. Optionally, after receiving the first data packet, the current network node may add a unique connection identifier to the first data packet to obtain a 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, the current network node adds the connection identifier B to the first data packet B to obtain the second data packet B, and so on.

[0085] It is understandable that the connection identifier may include but is not limited to at least one of a number, a letter, or a symbol. 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 is continuous with the connection identifier in the first second data packet.

[0086] S603: Send a 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 example, the IGW can send the second data packet to the VGW.

[0088] It can be understood that if the communication links are normal and there are no abnormal network nodes, then the connection identifier can be transmitted normally along the communication link. Therefore, the abnormal network node can be quickly demarcated through the connection identifier, that is, the connection identifier can be used for packet loss detection. The process of packet loss detection can refer to the above embodiment and will not be repeated here.

[0089] In the above data processing method, the first data packet can be obtained, and the second data packet can be determined according to the first data packet, and the second data packet can be sent to the next network node. Since the second data packet includes the connection identifier corresponding to the second data packet, and the connection identifiers in different second data packets are different, the data packet sent to the next network node carries the connection identifier, so that packet loss detection can be determined by the connection identifier to efficiently delimit the network node where the abnormality occurs.

[0090] Figure 7 FIG. 1 is a flow chart of determining a second data packet in an embodiment. In an exemplary embodiment, as shown in FIG. Figure 7 As shown, S602 includes S701 to S702.

[0091] S701: If the first data packet includes a connection identifier corresponding to the first data packet, use the first data packet 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 may 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 a connection identifier corresponding to the first data packet, it means that the network node before the current network node has 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, 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, 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 a connection identifier corresponding to the first data packet, add the connection identifier to the first data packet to obtain a 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 node before the current network node may not have the ability to inject the connection identifier, or the previous network node is already abnormal. Then, in order to be able 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 method of adding the connection identifier in 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 as an example, if the first data packet is based on a 7-layer HTTP service, the curl command can be modified, such as by using "curl:IP:PORT --set connnection id XXX" in the user terminal to add a corresponding connection identifier to the first data packet to generate a second data packet. If the first data packet is based on a 4-layer TCP service, the nc command can be modified to add a corresponding connection identifier to the first data packet by using "nc ipport --set connnection id XXX" to generate a second data packet.

[0098] In order to more clearly describe the process of adding a connection identifier in this application, Figure 8 Provide explanation. Figure 8 FIG. 1 is a schematic diagram of a process of injecting a connection identifier in an embodiment. Figure 8 As shown, after receiving the first data packet, the current network node will determine whether there is a connection identifier in the first data packet. If there is a connection identifier in the first data packet, no action will be taken, and the first data packet will be directly sent as the second data packet to the next network node. If there is no connection identifier in the first data packet, the connection identifier will be injected into the first data packet, that is, the connection identifier is added to the first data packet to obtain the second data packet, so as to send the second data packet including the connection identifier to the next network node.

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

[0100] In an exemplary embodiment, optionally, the step of “adding a connection identifier to the first data packet to obtain the second data packet” in S702 above may be implemented in the following manner:

[0101] A connection identifier is added to the option field of the TCP header of the first data packet to obtain a second data packet.

[0102] In this embodiment, the first data packet is a TCP-based data packet, the first data packet includes a TCP header, and the TCP header includes 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] Fig. 9 Schematic diagram of a TCP header in one embodiment. Fig. 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, Control Bits, Window Size, Checksum, Urgent Pointer, Options, and Padding.

[0104] Among them, the control bits include 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 Fig. 9 In (b) of FIG. 1 , in an exemplary embodiment, the option field may optionally include a kind field indicating a specific type of the TCP option, a length field indicating the total length of the option, and an info field indicating specific information of the option. The kind field is 1 byte, the length field is 1 byte, and the info field is n bytes. n may be an integer greater than or equal to 1.

[0106] Optionally, the connection ID is in the info field. For example, if n=2, the info byte is 2 bytes, and the value range of the connection ID is 0-65535.

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

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

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

[0110] In this embodiment, the current network node can also obtain a response data packet of the second data packet as a receiving end. Similarly, the response data packet includes a connection identifier corresponding to the second data packet. In this way, the connection identifier can be used not only to perform packet loss detection when the current network node is a sending end, but also to perform packet loss detection when the current network node is a receiving end, thereby 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 (such as the client) may include a randomly generated number between 0 and 65535. Each network node thereafter counts the value of the connection identifier in the data packet, and the statistical command can be used to determine which network node has packet loss.

[0112] In summary, the method provided by this application, through the data processing method of the newly added TCP options field, has no impact on the original business in the cloud computing scenario, regardless of whether the network node has services such as Full Network Address Translation (Full NAT), encapsulation vxlan or Generic Network Virtualization Encapsulation Protocol (Geneve). Each network node only needs to add or identify the connection identifier, and can troubleshoot the packet loss problem between any two network nodes on the entire link without modifying this field. On the one hand, it can improve the ability of online operation and maintenance to demarcate problems, which can be used in post-delivery operation and maintenance scenarios to quickly locate customer problems and improve customer satisfaction. On the other hand, it can improve the ability to demarcate packet loss problems, especially the problem of random packet loss, reduce labor costs, and create greater economic value for enterprises.

[0113] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0114] Based on the same inventive concept, the embodiment of the present application also provides a packet loss detection device for implementing the packet loss detection method involved above, and a data processing device for implementing the data processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the packet loss detection device and data processing device embodiments provided below can refer to the limitations of the packet loss detection method and data processing device above, and will not be repeated here.

[0115] Fig.10 FIG. 1 is a structural block diagram of a packet loss detection device in an embodiment. In an exemplary embodiment, as shown in FIG. Fig.10 As shown, a packet loss detection device 1000 is provided, comprising: an acquisition module 1001 and a determination module 1002, wherein:

[0116] The acquisition module 1001 is used to acquire a target data packet of the network node to be tested.

[0117] The determination module 1002 is used to determine 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; the network node to be tested is used to receive a second data packet sent by the previous network node of the network node to be tested, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is a data packet obtained by the previous network node and determined according to the first data packet.

[0118] In the above packet loss detection device, since the network node to be tested is used to receive the second data packet sent by the previous network node of the network node to be tested, the second data packet includes a 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 the previous network node obtains the first data packet, therefore, the data packet sent by the previous network node to the network node to be tested carries the connection identifier, and the packet loss situation of the network node to be tested can be determined by the connection identifier. Based on this, by obtaining the target data packet of the network node to be tested, the packet loss detection result of the network node to be tested can be efficiently and accurately determined according to the connection identifier in the target data packet of the network node to be tested, thereby efficiently demarcating the network node with abnormality.

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

[0120] Fig.11 FIG. 1 is a block diagram of a data processing device in an embodiment. In an exemplary embodiment, Fig.11 As shown, a packet loss detection device 1100 is provided, comprising: an acquisition module 1101, a determination module 1102 and a sending module 1103, wherein:

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

[0122] The determination module 1102 is used to determine the second data packet according to 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 configured to send a second data packet to a next network node.

[0124] In the above data processing device, the first data packet can be obtained, and the second data packet can be determined according to the first data packet, and the second data packet can be sent to the next network node. Since the second data packet includes the connection identifier corresponding to the second data packet, and the connection identifiers in different second data packets are different, the data packet sent to the next network node carries the connection identifier, so that packet loss detection can be determined by the connection identifier to efficiently delimit the network node where the abnormality occurs.

[0125] Optionally, the determining module 1102 includes:

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

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

[0128] Optionally, an adding unit is used to add a connection identifier in an option field of the TCP header of the first data packet to obtain a second data packet.

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

[0130] Each module in the above-mentioned packet loss detection device or data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0131] Fig.12 FIG. 1 is an internal structure diagram of a communication device in an embodiment. In an exemplary embodiment, a communication device is provided. The internal structure diagram of the communication device can be as follows: Fig.12 As shown. The communication device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the communication device is used to store relevant data. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a packet loss detection method is implemented.

[0132] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] In one embodiment, a communication device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0134] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

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

[0136] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A packet loss detection method, characterized in that: The method comprises: Obtain the target data packet of the network node to be tested; The packet loss detection result of the network node to be tested is determined according to the link identifier in the target data packet of the network node to be tested; the network node to be tested is used to receive a second data packet sent by an upper network node of the network node to be tested, the second data packet includes a connection identifier corresponding to the second data packet, and the second data packet is a data packet obtained by the upper network node based on the first data packet.

2. The method according to claim 1, characterized in that The step of 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: The packet loss detection result is determined according to the connection identifier in the target data packet and the preset connection identifier.

3. A data processing method, characterized in that: The method comprises: Get a first data packet; Determine a second data packet according to 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.

4. The method according to claim 3, characterized in that The determining the second data packet according to the first data packet comprises: If the first data packet includes the connection identifier corresponding to the first data packet, 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, 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 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 option field of the TCP header of the first data packet.

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

7. A detection device, characterized in that: The device comprises: An acquisition module is used to acquire a target data packet of the network node to be tested; A determination module, used to determine 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; the network node to be tested is used to receive a second data packet sent by the previous network node of the network node to be tested, the second data packet includes the connection identifier corresponding to the second data packet, and the second data packet is the data packet that the previous network node obtains the first data packet and is determined according to the first data packet.

8. A data processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a first data packet; a determination module, configured to determine a second data packet according to 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; The sending module is used to send the second data packet to the next network node.

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, the steps of the method according to any one of claims 1 to 6 are implemented.

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

Citation Information

Patent Citations

  • Packet loss detection method, system and media client

    CN102546081A

  • Method and device for detecting network state of articulated naturality web, terminal equipment and storage medium

    CN112583659A

  • RTP packet loss detection method and device, electronic equipment and storage medium

    CN112929227A

  • Method, device and system for monitoring data packet in service flow

    CN114465897A

  • Communication method and device

    CN118283538A