Data packet transmission method and device, computer device and storage medium

By obtaining the quintuple and path identifier information of the data packet, and dynamically adjusting the path hash value and offset value, the problem of low transmission efficiency caused by network node failure is solved, and the flexible adjustment and efficient bypass of the data packet transmission path is realized, thereby improving the data packet transmission efficiency.

CN116527575BActive Publication Date: 2026-01-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210072927.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2026-01-06
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

When load balancing is performed among equivalent multipaths, network node failures reduce packet transmission efficiency, and existing technologies cannot modify the transmission path in a timely and effective manner to bypass the failed node.

Method used

By obtaining the 5-tuple information and path identifier information of the data packet, the path hash value and offset value are determined, and the target network node of the next hop is dynamically adjusted to encapsulate the path identifier information and bypass the faulty node.

Benefits of technology

It improves the reliability and efficiency of data packet transmission, ensuring that the path can be modified in time to avoid the faulty node when a network node fails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527575B_ABST
    Figure CN116527575B_ABST
Patent Text Reader

Abstract

The application relates to a data packet transmission method and device, computer equipment, a storage medium and a computer program product. The method can be applied to a cloud storage data center based on cloud computing, can also be applied to the field of intelligent transportation, the computer equipment comprises an Internet of Things equipment, and the Internet of Things equipment comprises an intelligent vehicle-mounted equipment; the method comprises the following steps: obtaining a data packet to be forwarded, the packet header of the data packet carrying quintuple information and path identification information; determining a path hash value based on the quintuple information; determining a path offset value according to the path identification information; determining a target network node of a next hop based on the path offset value and the path hash value; and transmitting the data packet to the target network node of the next hop, so that the target network node of the next hop performs routing forwarding on the data packet. The method can improve the transmission efficiency of the data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data packet transmission method, apparatus, computer device, and storage medium. Background Technology

[0002] Data centers are the core infrastructure of IT systems, serving as crucial nodes for providing information services and resource sharing to enterprises and users on the Internet. In recent years, with the development of network technology, data centers have grown increasingly larger. To ensure the reliability of data transmission between servers within the data center, multiple equivalent data transmission paths, known as Equal Equivalent Multipath (ECMP), are typically established between the servers transmitting data, and load balancing is performed among these EMP paths.

[0003] Currently, when performing load balancing between equal-cost multipaths, forwarding nodes typically determine the target network node for the next hop directly based on the five-tuple information (transmission protocol type, source IP, source port, destination IP, and destination port) of the data packet to be forwarded. That is, data packets with the same five-tuple information will be forwarded by the same transmission path. When a network node fails, the data source cannot modify the transmission path in a timely and effective manner to bypass the failed network node, thus affecting the transmission efficiency of data packets. Summary of the Invention

[0004] Therefore, it is necessary to provide a data packet transmission method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the transmission efficiency of data packets, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for transmitting data packets. The method includes:

[0006] Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;

[0007] Determine the path hash value based on the aforementioned quintuple information;

[0008] Determine the path offset value based on the path identification information;

[0009] The target network node for the next hop is determined based on the path offset value and the path hash value;

[0010] The data packet is transmitted to the target network node at the next hop, so that the target network node at the next hop can route and forward the data packet.

[0011] Secondly, this application also provides a data packet transmission apparatus. The apparatus includes:

[0012] The data packet acquisition module is used to acquire data packets to be forwarded. The header of the data packet carries 5-tuple information and path identifier information.

[0013] A path hash value determination module is used to determine the path hash value based on the five-tuple information;

[0014] The path offset value determination module is used to determine the path offset value based on the path identification information;

[0015] The target network node determination module is used to determine the target network node of the next hop based on the path offset value and the path hash value.

[0016] The packet forwarding module is used to transmit the packet to the target network node of the next hop, so that the target network node of the next hop can route and forward the packet.

[0017] In one embodiment, the device further includes:

[0018] The data to be forwarded acquisition module is used to acquire the data to be forwarded, the five-tuple information corresponding to the data to be forwarded, and the initial path identifier information;

[0019] The path identification information determination module is used to adjust the initial path identification information to obtain the path identification information if the transmission path determined based on the five-tuple information and the initial path identification information is faulty.

[0020] The data packet encapsulation module is used to encapsulate the five-tuple information, the path identifier information, and the data to be forwarded to obtain the data packet to be forwarded.

[0021] In one embodiment, the data acquisition module to be forwarded is further configured to:

[0022] Obtain the data to be forwarded and the corresponding quintuple information of the data to be forwarded;

[0023] When the destination receiving end of the business data sent by the data source at the previous moment is the same as the destination receiving end of the data to be forwarded, the historical path identification information corresponding to the business data is obtained.

[0024] When the transmission system uses a single-path transmission protocol, the historical path identification information is determined as the initial path identification information of the data to be forwarded;

[0025] When the transmission system uses a multipath transmission protocol, the historical path identification information is modified to obtain the initial path identification information.

[0026] In one embodiment, the data acquisition module to be forwarded is further configured to:

[0027] Obtain the load information of each network node that has established a data connection with the data source;

[0028] The historical path identifier information is modified based on the load information to obtain the initial path identifier information.

[0029] In one embodiment, the path identification information determination module is further configured to:

[0030] If the transmission path determined based on the 5-tuple information and the initial path identifier information is fault-free, then the initial path identifier information is used as path identifier information and encapsulated with the 5-tuple information and the data to be forwarded to obtain the data packet to be forwarded.

[0031] In one embodiment, the path hash value determination module is further configured to:

[0032] The quintuple information is vectorized to obtain the path vector;

[0033] The path vector is hashed using a hash function to obtain the path hash value.

[0034] In one embodiment, the data packet encapsulation module is further configured to:

[0035] A packet header is generated based on the 5-tuple information and the path identifier information; the service type field of the packet header is configured with the path identifier information.

[0036] The data to be forwarded is encapsulated based on the packet header to obtain the data packet to be forwarded.

[0037] In one embodiment, the target network node determination module is further configured to:

[0038] The path hash value is adjusted based on the path offset value;

[0039] Get the total number of candidate network nodes for the next hop;

[0040] The modulo operation is performed on the adjusted path hash value based on the total number of nodes to obtain the modulo result.

[0041] The target network node is determined from the candidate network nodes for the next hop based on the modulo result.

[0042] In one embodiment, the target network node determination module is further configured to:

[0043] Get the total number of candidate network nodes for the next hop;

[0044] Generate a network node list based on the total number of nodes;

[0045] The target column is determined from the network node list based on the path hash value;

[0046] The target network node is determined from the target column based on the path offset value.

[0047] In one embodiment, the target network node determination module is further configured to:

[0048] The modulo operation is performed on the path hash value based on the total number of nodes to obtain the modulo result.

[0049] The column in the network node table that matches the modulo result is taken as the target column.

[0050] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0051] Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;

[0052] Determine the path hash value based on the aforementioned quintuple information;

[0053] Determine the path offset value based on the path identification information;

[0054] The target network node for the next hop is determined based on the path offset value and the path hash value;

[0055] The data packet is transmitted to the target network node at the next hop, so that the target network node at the next hop can route and forward the data packet.

[0056] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0057] Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;

[0058] Determine the path hash value based on the aforementioned quintuple information;

[0059] Determine the path offset value based on the path identification information;

[0060] The target network node for the next hop is determined based on the path offset value and the path hash value;

[0061] The data packet is transmitted to the target network node at the next hop, so that the target network node at the next hop can route and forward the data packet.

[0062] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0063] Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;

[0064] Determine the path hash value based on the aforementioned quintuple information;

[0065] Determine the path offset value based on the path identification information;

[0066] The target network node for the next hop is determined based on the path offset value and the path hash value;

[0067] The data packet is transmitted to the target network node at the next hop, so that the target network node at the next hop can route and forward the data packet.

[0068] The aforementioned data packet transmission method, apparatus, computer equipment, and storage medium acquire a data packet to be forwarded, the packet header of which carries 5-tuple information and path identification information; determine a path hash value based on the 5-tuple information; determine a path offset value based on the path identification information; determine the next-hop target network node based on the path offset value and the path hash value; and transmit the data packet to the next-hop target network node so that the next-hop target network node can route and forward the data packet. Therefore, when a network node fails, by encapsulating path identification information in the data packet, the offset of the next-hop network node can be realized based on the path identification information, thereby timely and effectively modifying the transmission path to bypass the failed network node, thus improving the data packet transmission efficiency. Attached Figure Description

[0069] Figure 1 This is an application environment diagram of a data packet transmission method in one embodiment;

[0070] Figure 2 This is a flowchart illustrating a data packet transmission method in one embodiment;

[0071] Figure 3 This is a schematic diagram of data packet transmission in a conventional scheme in one embodiment;

[0072] Figure 4 This is a schematic diagram illustrating the transmission of data packets in one embodiment of the solution provided in this application;

[0073] Figure 5This is a schematic diagram of the transmission path of a traditional MPTCP multipath transmission scheme in one embodiment;

[0074] Figure 6 This application provides a schematic diagram of the transmission path for multipath transmission of MPTCP in one embodiment;

[0075] Figure 7 This is a flowchart illustrating the steps for determining the target network node for the next hop in one embodiment.

[0076] Figure 8 This is a flowchart illustrating the step of determining the target network node for the next hop in another embodiment;

[0077] Figure 9 This is a schematic diagram of the network node list generation process in one embodiment;

[0078] Figure 10 This is a schematic diagram of the network node list generation process in another embodiment;

[0079] Figure 11 This is a schematic diagram illustrating the number of live links in one embodiment;

[0080] Figure 12 This is a structural block diagram of a data packet transmission device in one embodiment;

[0081] Figure 13 This is a structural block diagram of a data packet transmission device in another embodiment;

[0082] Figure 14 This is an internal structural diagram of a computer device in one embodiment;

[0083] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0084] 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.

[0085] The data packet transmission method provided in this application can be applied to cloud storage data centers used in cloud computing, and also to the communication field of Intelligent Traffic Systems (ITS). A data center is a globally collaborative network of specific devices used to transmit, accelerate, display, compute, and store data information on the internet network infrastructure. Data centers are the core infrastructure of IT systems and key nodes providing information services and resource sharing for enterprises and users on the internet.

[0086] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed.

[0087] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.

[0088] Intelligent Traffic Systems (ITS), also known as Intelligent Transportation Systems, effectively integrate advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing. This strengthens the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, enhances the environment, and saves energy.

[0089] The data packet transmission method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, data source 102 is connected to the Internet via network node 110, and data destination 104 is connected to the Internet via network node 120. Network nodes 110 and 120 are connected via network node 130. Data packets sent by data source 102 are forwarded through network nodes 110, 120, and 130, and finally sent to data destination 104. Network nodes 110, 120, and 130 can be switches or routers, and there can be at least two of each. Figure 1The network node 110 shown includes network node 110a and network node 110b, network node 120 includes network node 120a, network node 120b, network node 120c and network node 120d, and network node 130 includes network node 130a and network node 130b. The data packet transmission method provided in this application embodiment can be executed at the data source end 102 or at a network node (network node 110 or network node 120). Specifically, taking execution at the data source end 102 as an example, the data source end 102 obtains the data packet to be forwarded. The packet header carries 5-tuple information and path identification information; determines the path hash value based on the 5-tuple information; determines the path offset value based on the path identification information; determines the target network node of the next hop (one of network node 110a and network node 110b) based on the path offset value and the path hash value; and transmits the data packet to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet.

[0090] In one embodiment, the target network node for the next hop determined by the data source 102 is... Figure 1 In the network node 110b, after receiving the data packet to be forwarded, network node 110b can also execute the data packet transmission method provided in this application. Specifically, network node 110b obtains the data packet to be forwarded, the header of which carries 5-tuple information and path identification information; determines the path hash value based on the 5-tuple information; determines the path offset value based on the path identification information; determines the target network node of the next hop (one of network node 120a, network node 120b, network node 120c, and network node 120d) based on the path offset value and the path hash value; and transmits the data packet to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet.

[0091] The data source and data destination can be terminals or servers. Terminals can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Servers can be implemented using independent servers or server clusters composed of multiple servers.

[0092] In one embodiment, such as Figure 2 As shown, a data packet transmission method is provided, which is applied to... Figure 1 The following steps are used as an example to illustrate the process of using a computer device (data source 102 or network node, where the network node is network node 110 or network node 120):

[0093] S202, obtain the data packet to be forwarded. The header of the data packet carries 5-tuple information and path identifier information.

[0094] The 5-tuple information is a set of five pieces of information related to the data packet. Specifically, it can be a set of five quantities: source IP address, source port, destination IP address, destination port, and transport layer protocol. For example, if the 5-tuple information of a data packet is "192.168.1.1, 10000, TCP, 121.14.88.76, 80", then the meaning of this 5-tuple information is that a data source with IP address 192.168.1.1 connects to a data destination with IP address 121.14.88.76 and port 80 through port 10000 using the TCP protocol. Path identification information refers to information used to identify the data transmission path, which can specifically exist in the TOS field of the packet header.

[0095] It should be noted that, in the embodiments of this application, the transport layer protocol on which it is based can be a single-path transport protocol, such as TCP (Transmission Control Protocol) or RDMA (Remote Direct Memory Access), or a multi-path transport protocol, such as MPTCP (Multi Path TCP).

[0096] In one embodiment, when the computer device is a network node, the network node receives the data packet forwarded by the data forwarding node of the previous hop, obtains the data packet to be forwarded, analyzes the data packet to be forwarded, obtains the packet header of the data packet to be forwarded, and determines the 5-tuple information and path identification information of the data packet based on the packet header.

[0097] In one embodiment, when the computer device is the data source, the data source can obtain the five-tuple information and path identifier information corresponding to the data to be encapsulated before encapsulating the data to be forwarded, and encapsulate the data to be encapsulated based on the obtained five-tuple information and path identifier information, thereby obtaining the data packet to be forwarded.

[0098] In one embodiment, the process of the data source encapsulating the 5-tuple information, path identifier information, and data to be forwarded to obtain the data packet to be forwarded specifically includes the following steps: generating a packet header based on the 5-tuple information and path identifier information; and encapsulating the data to be forwarded based on the packet header to obtain the data packet to be forwarded.

[0099] The generated packet header may include TCP header fields and IP header fields. The IP header fields contain a service type field, which is configured as path identification information.

[0100] Specifically, the data source generates an IP header field based on the source IP address, destination IP address, transport layer protocol, and path identifier information in the 5-tuple information, and generates a TCP header field based on the source port and destination port in the 5-tuple information, thereby obtaining the packet header. Based on the packet header, the data to be forwarded is encapsulated to obtain the data packet to be forwarded.

[0101] S204, determine the path hash value based on the quintuple information.

[0102] Among them, the path hash value is a hash value that can be used to determine the transmission path.

[0103] Specifically, after obtaining the quintuple information, the computer device acquires a preset hash algorithm and performs a hash operation on the quintuple information based on the preset hash algorithm to obtain the path hash value.

[0104] It is understandable that when a computer device is a network node, the preset hash algorithm configured in all network nodes within the same node layer is the same. This ensures that the path hash value determined by each network node in that node layer based on the same five-tuple information is identical. For example, Figure 1 If network nodes 110a and 110b belong to the same node layer, then the preset hash algorithms configured in network nodes 110a and 110b are the same. Similarly, if network nodes 120a, 120b, 120c, and 120d belong to the same node layer, then the preset hash algorithms configured in network nodes 120a, 120b, 120c, and 120d are the same.

[0105] In one embodiment, S204 specifically includes the following steps: vectorizing the quintuple information to obtain a path vector; and performing a hash operation on the path vector using a hash function to obtain a path hash value.

[0106] Specifically, after obtaining the quintuple information, the computer device can concatenate the quintuple information in a preset order to obtain a path vector, and obtain the hash function configured by the computer device. Based on the hash function, the path vector is hashed to obtain the path hash value.

[0107] For example, TCP in the 5-tuple information can be identified by "000", RDMA by "010", and MPTCP by "111". Assuming the obtained 5-tuple information is "192.168.1.1, 10000, TCP, 121.14.88.76, 80", then the 5-tuple information can be concatenated in the order of source IP address, source port, destination IP address, destination port, and transport layer protocol to obtain the path vector "192168111000012114887680000". Then, based on the preset hash function, "192168111000012114887680000" is hashed to obtain the corresponding path hash value.

[0108] S206, Determine the path offset value based on the path identification information.

[0109] Specifically, after obtaining the path identification information, the computer device directly determines the corresponding path ID based on the path identification information and directly uses the path ID as the path offset value.

[0110] For example, assuming the Type of Service (TOS) field extracted from the packet header by the computer device is IP_TOS=0, meaning the determined path identification information is "IP_TOS=0", then the path identifier is determined to be 1, i.e., Path ID=0, and "Path ID=0" is determined as the path offset value; assuming the TOS field extracted from the packet header by the computer device is IP_TOS=1, meaning the determined path identification information is "IP_TOS=1", then the path identifier is determined to be 1, i.e., Path ID=1, and "Path ID=1" is determined as the path offset value.

[0111] S208 determines the target network node for the next hop based on the path offset value and the path hash value.

[0112] Specifically, after obtaining the path offset value and the path hash value, the computer device can obtain a preset path determination rule, and perform corresponding calculations on the path offset value and the path hash value according to the obtained preset path determination rule to obtain the calculation result, and determine the target network node of the next hop according to the calculation result.

[0113] The preset path determination rule can be a hash path determination rule based on hash operation or a lookup path determination rule based on table lookup operation. The preset path determination rule is matched with the computer device itself. For example, for a computer device running a programmable Tofino chip, the corresponding preset path determination rule can be a hash path determination rule. For a computer device running a non-programmable Broadcom TD3 / TH3 / TH4 series chip, the corresponding preset path determination rule can be a lookup path determination rule.

[0114] S210, transmit the data packet to the next-hop target network node so that the next-hop target network node can route and forward the data packet.

[0115] Specifically, after receiving the data packet, the next-hop target network node can obtain the packet header carrying the five-tuple information and path identification information, determine the path hash value based on the five-tuple information, determine the path offset value based on the path identification information, determine the next-hop target network node based on the path offset value and the path hash value, and transmit the data packet to the next-hop target network node so that the next-hop target network node can route and forward the data packet.

[0116] For example, Figure 1 If the target network node for the next hop determined by the data source is network node 110a, then after receiving the data packet forwarded by the data source, network node 110b obtains the five-tuple information and path identifier information carried in the data packet, determines the path hash value based on the five-tuple information, determines the path offset value based on the path identifier information, and determines the target network node for the next hop as network node 120b based on the path offset value and the path hash value. Then, it forwards the data packet to network node 120b. After receiving the data packet, network node 120b also determines the target network node for the next hop based on the five-tuple information and path identifier information carried in the data packet.

[0117] The effect of the above data packet transmission method will be illustrated with an example. Figure 3 The diagram illustrates the transmission of data packets in a traditional scheme, where... Figure 3 The connection methods between various network nodes in China and Figure 1 The connection methods shown are the same; for ease of illustration, Figure 3 The connection methods between network nodes are no longer shown. Figure 3 In this context, LA represents the access device, and LC represents the core device. In traditional solutions, the header of the data packet to be forwarded only carries the five-tuple information. After acquiring the data packet, the computer device typically determines the next-hop target network node directly based on the five-tuple information, such as... Figure 3In this process, at a certain moment, the data source determines the next target network node as network node 110a based on the five-tuple information of the data packet A to be forwarded, and forwards the data packet A to network node 110a. After receiving data packet A, network node 110a determines the next target network node as network node 120a based on the five-tuple information, and forwards the data packet A to network node 120a. After receiving data packet A, network node 120a determines the next target network node as network node 130a based on the five-tuple information. After receiving data packet A, network node 130a can send data packet A to the data destination, thus completing the transmission of data packet A. During the transmission of A, the data transmission path is "data source end - network node 110a - network node 120a - network node 130a - data destination end". However, when this data transmission path fails, i.e., at least one of network node 110a, network node 120a, and network node 130a fails, if the 5-tuple information of the data packet B to be transmitted at the next moment is the same as the 5-tuple information of data packet A, then when each network node determines the data transmission path based on the 5-tuple information of data packet B, it will still determine to use the failed data transmission path to transmit data packet B, thus resulting in the inability to complete the transmission of data packet B. However, when the data packet transmission method provided in this application is used (e.g., ... Figure 4As shown, if the 5-tuple information of the data packet B to be transmitted in the next moment is the same as that of the data packet A, the data source generates path identifier information IP_TOS=1 and encapsulates the generated path identifier information IP_TOS=1 and the 5-tuple information into the header of the data packet B to be transmitted. Based on the 5-tuple information and path identifier information, the next-hop target network node is determined to be network node 110a, and the data packet B is forwarded to network node 110b. After receiving data packet B, network node 110b determines the next-hop target network node to be network node 120b based on the 5-tuple information and path identifier information, and forwards the data packet B to network node 120b. After receiving data packet B, network node 120b determines the next-hop target network node to be network node 130b based on the 5-tuple information and path identifier information. After receiving data packet B, network node 130b... Data packet B can be sent to the data destination to complete the transmission of data packet B. In this transmission process, the data transmission path of data packet B is "data source end - network node 110b - network node 120b - network node 130b - data destination end". It can be seen that the data transmission path determined by data packet B based on the five-tuple information and path identification information is offset compared with the data transmission path determined by the five-tuple information alone. Specifically, the network nodes are offset from network node 110a to network node 110b, from network node 120a to network node 120b, and from network node 130a to network node 130b. Thus, the transmission path used by data packet B completely avoids the network nodes 110a, 120a, and 130a that may be faulty, improving the reliability of data packet transmission and thus improving the transmission efficiency of data packets.

[0118] In the above data packet transmission method, the data packet to be forwarded is obtained, and the packet header carries 5-tuple information and path identification information; the path hash value is determined based on the 5-tuple information; the path offset value is determined based on the path identification information; the target network node of the next hop is determined based on the path offset value and the path hash value; the data packet is transmitted to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet. Thus, when a network node fails, by encapsulating the path identification information in the data packet, the offset of the next hop network node can be realized based on the path identification information, thereby timely and effectively modifying the transmission path to bypass the failed network node, improving the data packet transmission efficiency.

[0119] In one embodiment, when the computer device is the data source, the above-mentioned data packet transmission method further includes a process of generating a data packet to be forwarded. The process of generating a data packet to be forwarded specifically includes the following steps: obtaining the data to be forwarded, the 5-tuple information corresponding to the data to be forwarded, and the initial path identification information; if the transmission path determined based on the 5-tuple information and the initial path identification information has a fault, adjusting the initial path identification information to obtain path identification information; and encapsulating the 5-tuple information, the path identification information, and the data to be forwarded to obtain the data packet to be forwarded.

[0120] Specifically, the data source obtains the data to be forwarded, the corresponding 5-tuple information, and the initial path information. Based on the 5-tuple information and the initial path information, it determines the transmission path and detects whether there is a fault in the transmission path. If there is a fault in the transmission path, it adjusts the initial path identification information to obtain the adjustment result, and determines the adjustment result as the path identification information. Based on the determined 5-tuple information and path identification information, it encapsulates the data to be forwarded to obtain the data packet to be forwarded.

[0121] In the above embodiments, the data source obtains the data to be forwarded, the corresponding 5-tuple information, and the initial path identifier information. When the transmission path determined based on the 5-tuple information and the initial path identifier information is faulty, the initial path identifier information is adjusted to obtain path identifier information. Then, the 5-tuple information, the path identifier information, and the data to be forwarded are encapsulated to obtain the data packet to be forwarded. This allows the transmission path to be modified in a timely and effective manner to bypass the faulty network node when forwarding the obtained data packet to be forwarded, thereby improving the transmission efficiency of the data packet.

[0122] In one embodiment, if the data source detects that there is no fault in the transmission path determined based on the 5-tuple information and the initial path identifier information, the initial path identifier information is used as the path identifier information and encapsulated with the 5-tuple information and the data to be forwarded to obtain the data packet to be forwarded.

[0123] For example, if the data source obtains the 5-tuple information of the data to be forwarded as 5-tuple 1, and the initial path identifier information is IP_TOS = 1, then the transmission path determined based on the 5-tuple information and the initial path identifier information IP_TOS = 1 is path 1. The system then checks if path 1 has a fault. If a fault is found in path 1, the value of the initial path identifier information IP_TOS is incremented by 1, resulting in an adjusted IP_TOS = 2. The data to be forwarded is then encapsulated based on the 5-tuple information and the path identifier information IP_TOS = 2 to obtain the data packet to be forwarded. It can be understood that after obtaining the path identifier information IP_TOS = 2, the data source can further determine if the transmission path determined based on 5-tuple information 1 and the path identifier information IP_TOS = 2 has a fault, and whether further adjustments to the path identifier information IP_TOS = 2 are needed until the transmission path determined based on 5-tuple information 1 and the path identifier information is fault-free.

[0124] In the above embodiments, when the transmission path determined based on the five-tuple information and the initial path identifier information is fault-free, the data source end directly encapsulates the five-tuple information, the initial path identifier information and the data to be forwarded to obtain the data packet to be forwarded. This ensures that when forwarding the obtained data packet to be forwarded, there are no faulty network nodes in the transmission path used, thereby improving the transmission efficiency of the data packet.

[0125] In one embodiment, the process of the data source obtaining the data to be forwarded, the corresponding 5-tuple information, and the initial path identifier information includes the following steps: obtaining the data to be forwarded and the corresponding 5-tuple information; when the destination receiving end of the service data sent by the data source at the previous moment is the same as the destination receiving end of the data to be forwarded, obtaining the historical path identifier information corresponding to the service data; when the transmission system adopts a single-path transmission protocol, determining the historical path identifier information as the initial path identifier information of the data to be forwarded; when the transmission system adopts a multi-path transmission protocol, modifying the historical path identifier information to obtain the initial path identifier information.

[0126] It is understandable that when the data source needs to transmit data to the data destination, the data source establishes a communication link (such as a TCP link) with the data destination in advance, and then the data can be transmitted to the data destination through the communication link. The five-tuple information of the data transmitted through the communication link is all based on the five-tuple information determined by the link information.

[0127] Specifically, the data source determines the five-tuple information of the data to be forwarded based on the connection information of the established communication link. It determines whether the communication link used by the service data sent in the previous moment is the same as the communication link of the data to be forwarded. If so, it determines that the destination receiving end (i.e., the data destination) of the service data sent in the previous moment is the same as the destination receiving end (i.e., the data destination) of the data to be forwarded in the current moment. Then, it obtains the historical path identification information corresponding to the service data so as to determine the path identification information of the data to be forwarded based on the historical path identification information.

[0128] In one embodiment, the process by which the data source determines the path identifier information of the data to be forwarded based on historical path identifier information includes the following steps: when the transmission system uses a single-path transmission protocol, the historical path identifier information is determined as the initial path identifier information of the data to be forwarded; when the transmission system uses a multi-path transmission protocol, the historical path identifier information is modified to obtain the initial path identifier information.

[0129] The transmission system can refer to the communication link established between the data source and the data destination.

[0130] Specifically, when the transmission system uses a single-path transmission protocol, that is, when the communication link established between the data source and the data destination is based on the single-path transmission protocol, i.e., when the communication link corresponds to a transmission path, the historical path identification information can be determined as the initial path identification information of the data to be forwarded.

[0131] For example, if the communication link between the data source and the data destination is established based on the TCP single-path transmission protocol, and the historical path identification information of the business data transmitted by the data source through this communication link at the previous moment is IP_TOS=0, then the initial path identification information corresponding to the data to be forwarded now is also determined to be IP_TOS=0.

[0132] When the transmission system uses a multipath transmission protocol, that is, when the communication link established between the data source and the data destination is based on the multipath transmission protocol, i.e., when the communication link corresponds to multiple equivalent transmission paths, the historical path identification information can be modified to obtain the initial path identification information of the data to be forwarded.

[0133] Modifying historical path information can be achieved by adding a preset value to the historical path information, and the preset value can be 1.

[0134] For example, if the communication link between the data source and the data destination is established based on the MPTCP multipath transmission protocol, and the historical path identification information of the service data transmitted by the data source through this communication link at the previous moment is IP_TOS=1, then the initial path identification information corresponding to the data to be forwarded at the present time is determined to be IP_TOS=2.

[0135] In the above embodiments, when the transmission system adopts a single-path transmission protocol, the data source determines the historical path identification information as the initial path identification information of the data to be forwarded, so that when there is only one transmission path, the data packets are transmitted using that transmission path by default. When the transmission system adopts a multi-path transmission protocol, the historical path identification information is modified to obtain the initial path identification information, so that when there are multiple equivalent transmission paths, the transmission paths used for adjacent data transmissions are different, thereby achieving load balancing on each transmission path and improving the transmission efficiency of data packets.

[0136] The effect of the above data packet transmission method will be illustrated with an example. Figure 3 The diagram illustrates the transmission of data packets in a traditional scheme, where... Figure 3 The connection methods between various network nodes in China and Figure 1 The connection methods shown are the same; for ease of illustration, Figure 3 The connection methods between network nodes are no longer shown. In traditional schemes, the header of the data packet to be forwarded only carries five-tuple information. After obtaining the data packet, the computer device usually determines the target network node for the next hop directly based on the five-tuple information, such as... Figure 3In this process, at a certain moment, the data source determines the next target network node as network node 110a based on the five-tuple information of the data packet A to be forwarded, and forwards the data packet A to network node 110a. After receiving data packet A, network node 110a determines the next target network node as network node 120a based on the five-tuple information, and forwards the data packet A to network node 120a. After receiving data packet A, network node 120a determines the next target network node as network node 130a based on the five-tuple information. After receiving data packet A, network node 130a can send data packet A to the data destination, thus completing the transmission of data packet A. In the transmission of data packet A, the data transmission path is "Data source end - Network node 110a - Network node 120a - Network node 130a - Data destination end". For the MPTCP multipath transmission scheme, this path is one of the sub-streams between the data source end and the data destination end. The communication link between the data source end and the data destination end can contain multiple sub-streams, i.e., multiple transmission paths. The MPTCP multipath transmission scheme uses different source port numbers (src_port) to divide the sub-streams, and probabilistically, the sub-stream paths are evenly distributed in the network. However, there is a possibility that each sub-stream passes through the same network node (e.g., ...). Figure 5 As shown in the figure, in this case, the multipath transmission performance and robustness are severely degraded. However, when using the data packet transmission method provided in this application, it is possible to distinguish each sub-stream based on the TOS field of the IP header, and to deterministically ensure that each sub-stream is evenly distributed across network nodes (such as...). Figure 6 As shown in the figure, this is to avoid degradation of the multipath protocol.

[0137] In one embodiment, the process of modifying historical path identification information to obtain initial path identification information by the data source end specifically includes the following steps: obtaining the load information of each network node that has established a data connection with the data source end; modifying the historical path identification information based on the load information to obtain the initial path identification information.

[0138] Among them, the network nodes that establish data connections with the data source refer to the network nodes on each transmission path corresponding to the communication link between the data source and the data destination, such as... Figure 1 Network nodes 110a, 110b, 120a, 120b, 120c, 120d, 130a, and 130b.

[0139] Specifically, the data source can obtain the load information of each network node and determine the load information of each transmission path based on the load information of each network node. Thus, based on the load information of each transmission path, the transmission path with the lowest current load can be determined, and the path identification information corresponding to the transmission path with the lowest current load can be determined. The historical path identification information is then modified to the path identification information corresponding to the transmission path with the lowest current load to obtain the initial path identification information.

[0140] In the above embodiments, the data source obtains the load information of each network node that has established a data connection with the data source; based on the load information, it modifies the historical path identification information to obtain the initial path identification information. This ensures that when there are multiple equivalent transmission paths, the transmission path used for each data transmission is the transmission path with the best load balancing effect, thereby improving the transmission efficiency of data packets.

[0141] In one embodiment, the preset path determination rule determined by the computer device is a hash path determination rule, such as... Figure 7 As shown, the process by which a computer device determines the target network node for the next hop based on the path offset value and the path hash value includes the following steps:

[0142] S702, adjusts the path hash value based on the path offset value.

[0143] Specifically, after obtaining the path offset value and the path hash value, the computer device obtains a preset adjustment direction and adjusts the path hash value based on the path offset value according to the preset adjustment direction to obtain the adjusted path hash value.

[0144] The adjustment direction can be positive or negative. Positive adjustment means that the adjusted path hash value is increased relative to the original path hash value, while negative adjustment means that the adjusted path hash value is decreased relative to the original path hash value.

[0145] In one embodiment, if the preset adjustment direction is a positive adjustment direction, then after obtaining the path offset value and the path hash value, the computer device sums the path hash value and the path offset value to obtain a sum value, and determines the sum value as the adjusted path hash value.

[0146] S704, obtain the total number of candidate network nodes for the next hop.

[0147] Here, the candidate network node for the next hop refers to the network node that can be selected from the next hops of the current network node for packet forwarding, as shown in the example below. Figure 1If the current network node is the data source, the candidate network nodes for the next hop are network node 110a and network node 110b, with a total of 2 nodes; if the current network node is network node 110a, the candidate network nodes for the next hop are network node 120a, network node 120b, network node 120c and network node 120d, with a total of 4 nodes.

[0148] S706, take the modulo of the adjusted path hash value based on the total number of nodes to obtain the modulo result.

[0149] Specifically, after obtaining the adjusted path hash value and the total number of candidate nodes for the next hop, the computer device can take the modulo of the adjusted path hash value with the total number of nodes to obtain the modulo result.

[0150] S708 determines the target network node from the candidate network nodes of the next hop based on the modulo result.

[0151] Specifically, after obtaining the modulo result, the computer device can also obtain the node identifier of each candidate network node, and determine the candidate network node corresponding to the node identifier that matches the modulo result as the target network node.

[0152] The node identifier of each candidate network node is obtained by encoding the nodes in the order they appear in the network. For example, Figure 1 The four network nodes in network node 120 are, in order, network node 120a, network node 120b, network node 120c, and network node 120d. These nodes can be encoded in this order to obtain the following node identifiers: network node 120a is identified as 1, network node 120b as 2, network node 120c as 3, and network node 120d as 4. If the modulo result is 1, then network node 120a is identified as the target network node; if the modulo result is 2, then network node 120b is identified as the target network node; if the modulo result is 3, then network node 120c is identified as the target network node; and if the modulo result is 4, then network node 120d is identified as the target network node.

[0153] The following is an algorithm formula for determining the target network node in one embodiment:

[0154] nextHOP=(hash+path_ID)modN (1)

[0155] Where nextHOP is the node identifier of the target network node for the next hop, hash is the path hash value, path_ID is the path offset value, mod represents modulo, and N is the total number of candidate network nodes for the next hop.

[0156] In the above embodiments, for a programmable computer device, the computer device adjusts the path hash value based on the path offset value; obtains the total number of candidate network nodes for the next hop; and performs a modulo operation on the adjusted path hash value based on the total number of nodes to obtain the modulo result. This allows the target network node to be quickly determined from the candidate network nodes for the next hop based on the modulo result, improving the efficiency of determining the target network node and thus improving the transmission efficiency of data packets.

[0157] In one embodiment, such as Figure 8 As shown, if the preset path determination rule determined by the computer device is a lookup table path determination rule, then the process by which the computer device determines the target network node of the next hop based on the path offset value and the path hash value includes the following steps:

[0158] S802, obtain the total number of candidate network nodes for the next hop.

[0159] Here, the candidate network node for the next hop refers to the network node that can be selected from the next hops of the current network node for packet forwarding, as shown in the example below. Figure 1 If the current network node is the data source, the candidate network nodes for the next hop are network node 110a and network node 110b, with a total of 2 nodes; if the current network node is network node 110a, the candidate network nodes for the next hop are network node 120a, network node 120b, network node 120c and network node 120d, with a total of 4 nodes.

[0160] S804 generates a list of network nodes based on the total number of nodes.

[0161] In one embodiment, after obtaining the total number of candidate network nodes for the next hop, the computer device generates a node identifier for each network node based on the total number of nodes, and generates a network node list based on the node identifiers. Each element in the network node list is the node identifier of the corresponding network node.

[0162] The node identifier of each candidate network node is encoded according to the order of the candidate network nodes, and the maximum value of the node identifier does not exceed the total number of nodes. For example, Figure 1The four network nodes in network node 120 are, in order, network node 120a, network node 120b, network node 120c, and network node 120d. These nodes can be encoded in this order to obtain the following node identifiers: network node 120a is identified as 1, network node 120b as 2, network node 120c as 3, and network node 120d as 4. If the modulo result is 1, then network node 120a is identified as the target network node; if the modulo result is 2, then network node 120b is identified as the target network node; if the modulo result is 3, then network node 120c is identified as the target network node; and if the modulo result is 4, then network node 120d is identified as the target network node.

[0163] Specifically, after obtaining the node identifiers of each network node, the computer device generates an initial network node row based on the node identifiers. This row contains the same number of columns as the total number of nodes. This initial network node row is then copied, with the number of copies equal to the total number of nodes, resulting in an initial network node table consisting of "total number of nodes" rows multiplied by "total number of nodes" columns. Then, each row in this initial network node table is cyclically shifted left to obtain the network node list. The number of positions shifted left for each row is the current row number minus 1. That is, for the m-th row, the elements corresponding to each column in that row are shifted left by m-1 positions.

[0164] like Figure 9 The diagram illustrates the generation of a network node list in one embodiment. The total number of candidate network nodes for the next hop is N. Based on the total number of nodes N, node identifiers for each network node are generated sequentially as 1, 2, ..., N-1, N. An initial network node row 902 is generated based on the node identifiers. The initial network node row 902 is copied N times to obtain an N×N initial network node table 904. Each row in the initial network node table 904 is cyclically shifted left to obtain a network node list 906. The number of bits shifted left for each row is the current row number minus 1. That is, for the m-th row, the corresponding element in each column of that row is shifted left by m-1 bits.

[0165] S806, determine the target column in the network node list based on the path hash value.

[0166] In one example, S806 specifically includes the following steps: taking the modulo of the path hash value based on the total number of nodes to obtain the modulo result; and using the column in the network node table that matches the modulo result as the target column.

[0167] Specifically, after obtaining the path hash value and the total number of candidate nodes for the next hop, the computer device can take the modulo of the path hash value with the total number of nodes to obtain the modulo result, and use the column in the network node table that matches the modulo result as the target column.

[0168] For example, if the modulo result is k, then for Figure 9 If the network node table is used, then the kth column of the network node table is used as the target column.

[0169] S808 determines the target network node from the target column based on the path offset value.

[0170] Specifically, after determining the target column, the computer device identifies the node identifier corresponding to the target row that matches the path offset value in the target column as the target network node identifier, and identifies the network node corresponding to the target network node identifier as the target network node.

[0171] For example, if the path offset value Path ID = j, then for Figure 9 In the network node table, the node identifier corresponding to the j-th row of the k-th column of the network node table is determined as the target network node identifier, and the network node corresponding to the target network node identifier is determined as the target network node.

[0172] As an example, the above embodiment will be described, assuming that the candidate network node for the next hop is... Figure 1 Given network nodes 120a, 120b, 120c, and 120d, with node identifier 120a as 1, node identifier 2 for 120b, node identifier 3 for 120c, and node identifier 4 for 120d, then a network can be generated. Figure 10 The 4×4 initial network node table 1002 shown is used to perform a cyclic shift on each row of the initial network node table. The first row is shifted by 0 bits, the second row by 1 bit, the third row by 2 bits, and the fourth row by 3 bits, thus obtaining... Figure 10 If the path hash value is moduloed by the total number of nodes 4 in the 4×4 network node table 1004, and the modulo result is 2, and the path offset value Path ID = 3, then the node identifier "4" corresponding to the second column and third row of the network node table 1004 is selected as the target network node identifier, and the network node 120d corresponding to the target network node identifier "4" is determined as the target network node of the next hop.

[0173] It should be noted that the process of determining the target network node based on the lookup path determination rule described in S602 to S608 can be equivalent to the following formula (2):

[0174] nextHOP=(hashmodN+path_ID)modN (2)

[0175] Where nextHOP is the node identifier of the target network node for the next hop, hash is the path hash value, path_ID is the path offset value, mod represents modulo, and N is the total number of candidate network nodes for the next hop.

[0176] In the above embodiments, for computer devices that do not have programmability, the computer device obtains the total number of candidate network nodes for the next hop; generates a network node list based on the total number of nodes; determines the target column in the network node list based on the path hash value; and determines the target network node from the target column based on the path offset value. In this way, without changing the chip of the computer device, the offset of the network node for the next hop can be realized based on the path identification information, thereby modifying the transmission path in a timely and effective manner to bypass the faulty network node and improving the transmission efficiency of data packets.

[0177] This application also provides an application scenario in which the above-described data packet transmission method is applied. Specifically, the data packet transmission method is applied in situations such as... Figure 1 The system shown is a two-layer Clos topology. Figure 1 Network nodes 110 and 130 are access devices (LAs), and network node 130 is a core device. Figure 1 In the system shown, the failure rates for each device (network node) are: 1 / 4 core device failures and 1 / 2 access device failures. Furthermore, devices configured at the same layer have the same hash algorithm, offset value, seed parameter, and ECMP (Equal Equivalent Multipath) group member order to ensure that packets with the same five-tuple have the same hash result on different devices at the same layer. Additionally, for programmable devices, the `bond_xmit_hash` function is modified to add an IP TOS field value to the original hash result.

[0178] Scenario 1: For TCP single-path transmission.

[0179] Computer equipment (data source or network node) acquires data packets to be forwarded. The packet header carries 5-tuple information and path identification information. The path hash value is determined based on the 5-tuple information. The path offset value is determined based on the path identification information. The target network node of the next hop is determined based on the path offset value and the path hash value. The data packet is transmitted to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet.

[0180] In traditional solutions, the success rate of bypassing the fault point by changing the source port number when the equipment fails is shown in the table below. However, by using the data packet transmission method provided in the application, which switches routes based on changing the Path ID, 100% success can be achieved in one attempt, and the expected number of route switching required for success is 1.

[0181]

[0182] Scenario 2: For MPTCP multipath transmission.

[0183] Computer equipment (data source or network node) acquires data packets to be forwarded. The packet header carries 5-tuple information and path identification information. The path hash value is determined based on the 5-tuple information. The path offset value is determined based on the path identification information. The target network node of the next hop is determined based on the path offset value and the path hash value. The data packet is transmitted to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet.

[0184] To test the performance of this scheme in a real network environment, we used four groups of hosts to build 2.5k multipath protocol links for each group, maintaining four sub-flows under each link. To compare the robustness of traditional multipath protocols and multipath protocols based on hash offset schemes (traditional MPTCP), we observed the number of surviving links for both schemes under 1 / 4 and 1 / 2 core device failure scenarios. Figure 11 As shown, in the case of a 1 / 4 core device failure, the link survival rates of the traditional multipath protocol and the hash offset-based multipath protocol are 96% and 100%, respectively; in the case of a 1 / 2 core device failure, the survival rates of the two schemes are 48.1% and 74.7%, respectively. (Because the test used a self-developed protocol stack based on DPDK, the source and destination port numbers of the round-trip path are asymmetrical, which means that the round-trip path of the same sub-stream may not necessarily pass through the same core device. Therefore, the survival rate of the multipath transmission protocol based on the hash offset scheme is not 100% in the case of a 1 / 2 failure.)

[0185] 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.

[0186] Based on the same inventive concept, this application also provides a data packet transmission apparatus for implementing the data packet transmission method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of one or more data packet transmission apparatus embodiments provided below can be found in the limitations of the data packet transmission method described above, and will not be repeated here.

[0187] In one embodiment, such as Figure 12 As shown, a data packet transmission device is provided, comprising: a data packet acquisition module 1202, a path hash value determination module 1204, a path offset value determination module 1206, a target network node determination module 1208, and a data packet forwarding module 1210, wherein:

[0188] The data packet acquisition module 1202 is used to acquire data packets to be forwarded. The header of the data packet carries 5-tuple information and path identification information.

[0189] The path hash value determination module 1204 is used to determine the path hash value based on the quintuple information.

[0190] The path offset value determination module 1206 is used to determine the path offset value based on the path identification information.

[0191] The target network node determination module 1208 is used to determine the target network node of the next hop based on the path offset value and the path hash value.

[0192] The packet forwarding module 1210 is used to transmit data packets to the next-hop target network node so that the next-hop target network node can route and forward the data packets.

[0193] In the above embodiments, by acquiring the data packet to be forwarded, the packet header carries 5-tuple information and path identification information; the path hash value is determined based on the 5-tuple information; the path offset value is determined based on the path identification information; the target network node of the next hop is determined based on the path offset value and the path hash value; the data packet is transmitted to the target network node of the next hop so that the target network node of the next hop can route and forward the data packet. Thus, when a network node fails, by encapsulating the path identification information in the data packet, the offset of the network node of the next hop can be realized based on the path identification information, thereby timely and effectively modifying the transmission path to bypass the failed network node, improving the transmission efficiency of the data packet.

[0194] In one embodiment, such as Figure 13 As shown, the device also includes: a data acquisition module 1212 to be forwarded, a path identification information determination module 1214, and a data packet encapsulation module 1216, wherein:

[0195] The data acquisition module 1212 is used to acquire the data to be forwarded, the corresponding five-tuple information and the initial path identifier information;

[0196] The path identification information determination module 1214 is used to adjust the initial path identification information to obtain path identification information if the transmission path determined based on the five-tuple information and the initial path identification information is faulty.

[0197] The data packet encapsulation module 1216 is used to encapsulate the five-tuple information, path identification information and data to be forwarded to obtain the data packet to be forwarded.

[0198] In one embodiment, the data to be forwarded acquisition module 1212 is further configured to: acquire the data to be forwarded and the 5-tuple information corresponding to the data to be forwarded; when the destination receiving end of the service data sent by the data source end at the previous moment is the same as the destination receiving end of the data to be forwarded, acquire the historical path identification information corresponding to the service data; when the transmission system adopts a single-path transmission protocol, determine the historical path identification information as the initial path identification information of the data to be forwarded; when the transmission system adopts a multi-path transmission protocol, modify the historical path identification information to obtain the initial path identification information.

[0199] In one embodiment, the data acquisition module 1212 is further configured to: acquire the load information of each network node that has established a data connection with the data source; and modify the historical path identification information based on the load information to obtain the initial path identification information.

[0200] In one embodiment, the path identification information determination module 1214 is further configured to: if there is no fault in the transmission path determined based on the 5-tuple information and the initial path identification information, encapsulate the initial path identification information as path identification information with the 5-tuple information and the data to be forwarded to obtain the data packet to be forwarded.

[0201] In one embodiment, the path hash value determination module 1204 is further configured to: vectorize the quintuple information to obtain a path vector; and perform a hash operation on the path vector using a hash function to obtain a path hash value.

[0202] In one embodiment, the data packet encapsulation module 1216 is further configured to: generate a packet header based on the 5-tuple information and path identification information; configure the service type field of the packet header as the path identification information; and encapsulate the data to be forwarded based on the packet header to obtain the data packet to be forwarded.

[0203] In one embodiment, the target network node determination module 1208 is further configured to: adjust the path hash value based on the path offset value; obtain the total number of candidate network nodes for the next hop; perform modulo operation on the adjusted path hash value based on the total number of nodes to obtain the modulo result; and determine the target network node from the candidate network nodes for the next hop based on the modulo result.

[0204] In one embodiment, the target network node determination module 1208 is further configured to: obtain the total number of candidate network nodes for the next hop; generate a network node list based on the total number of nodes; determine a target column in the network node list based on the path hash value; and determine the target network node from the target column based on the path offset value.

[0205] In one embodiment, the target network node determination module 1208 is further configured to: perform modulo operation on the path hash value based on the total number of nodes to obtain the modulo result; and use the column in the network node table that matches the modulo result as the target column.

[0206] Each module in the aforementioned data packet transmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware within or independently of the processor in a computer device, or stored in software within the memory of the computer device, so that the processor can invoke and execute the operations corresponding to each module.

[0207] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, 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 computational 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 operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data to be transmitted. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a data packet transmission method.

[0208] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 15 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output 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 and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data packet transmission method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0209] Those skilled in the art will understand that Figure 14 , Figure 15The 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 computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0210] In one embodiment, a computer device is also 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 method embodiments.

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

[0212] 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.

[0213] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0214] 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 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, etc., and are not limited to these.

[0215] 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 specification.

[0216] 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 method of transmitting a data packet, characterized by, The method comprises: acquiring a data packet to be forwarded, a packet header of the data packet carrying quintuple information and path identification information; determining a path hash value based on the quintuple information; determining a path offset value according to the path identification information; operating the path offset value and the path hash value according to a preset path determination rule to obtain an operation result, and determining a target network node of a next hop according to the operation result; transmitting the data packet to the target network node of the next hop, so that the target network node of the next hop routes and forwards the data packet; wherein the preset path determination rule comprises a lookup table path determination rule based on lookup table operation; the lookup table path determination rule based on lookup table operation comprises: acquiring a total number of node of candidate network nodes of the next hop; generating node identification of each of the candidate network nodes according to the total number of node; generating an initial network node row based on the node identification; copying the initial network node row to obtain an initial network node table; the number of rows and the number of columns of the initial network node table are equal to the total number of node; moving each element corresponding to each column in the mth row in the initial network node table to the left by m-1 positions to obtain a network node list; determining a target column in the network node list based on the path hash value; determining a target network node from the target column based on the path offset value.

2. The method of claim 1, wherein, The method further comprises: acquiring data to be forwarded, quintuple information corresponding to the data to be forwarded, and initial path identification information; if a transmission path determined based on the quintuple information and the initial path identification information exists a fault, adjusting the initial path identification information to obtain the path identification information; encapsulating the quintuple information, the path identification information, and the data to be forwarded to obtain a data packet to be forwarded.

3. The method of claim 2, wherein, The acquiring of the data to be forwarded, the quintuple information corresponding to the data to be forwarded, and the initial path identification information comprises: acquiring data to be forwarded and quintuple information corresponding to the data to be forwarded; when a destination receiving end of service data sent by a data source end at a previous moment is the same as a destination receiving end of the data to be forwarded, acquiring historical path identification information corresponding to the service data; when a transmission system adopts a single-path transmission protocol, determining the historical path identification information as initial path identification information of the data to be forwarded; when the transmission system adopts a multi-path transmission protocol, modifying the historical path identification information to obtain the initial path identification information.

4. The method of claim 3, wherein, The modifying of the historical path identification information to obtain the initial path identification information comprises: acquiring load information of each network node establishing a data connection with the data source end; modifying the historical path identification information based on the load information to obtain the initial path identification information.

5. The method of claim 2, wherein, The method further comprises: if a transmission path determined based on the quintuple information and the initial path identification information does not exist a fault, encapsulating the initial path identification information as path identification information with the quintuple information and the data to be forwarded to obtain a data packet to be forwarded.

6. The method of claim 1, wherein, The determining a path hash value based on the quintuple information comprises: vectorizing the quintuple information to obtain a path vector; performing a hash operation on the path vector by a hash function to obtain a path hash value.

7. The method of claim 2, wherein, The encapsulating the quintuple information, the path identification information and the data to be forwarded to obtain a data packet to be forwarded comprises: generating a packet header based on the quintuple information and the path identification information; a service type field of the packet header is configured as the path identification information; encapsulating the data to be forwarded based on the packet header to obtain a data packet to be forwarded.

8. The method according to any one of claims 1 to 7, characterized in that The preset path determination rule further comprises a hash path determination rule based on a hash operation, and the hash path determination rule comprises: adjusting the path hash value based on the path offset value; obtaining a total number of node candidates of a next hop; performing a modulo operation on the adjusted path hash value according to the total number of nodes to obtain a modulo result; determining a target network node from the node candidates of the next hop based on the modulo result.

9. The method of claim 1, wherein, The determining a target column in the network node list based on the path hash value comprises: performing a modulo operation on the path hash value according to the total number of nodes to obtain a modulo result; taking a column in the network node table matching the modulo result as a target column.

10. A data packet transmission apparatus, characterized by comprising: The device comprises: a data packet obtaining module configured to obtain a data packet to be forwarded, a packet header of the data packet carrying quintuple information and path identification information; a path hash value determining module configured to determine a path hash value based on the quintuple information; a path offset value determining module configured to determine a path offset value according to the path identification information; a target network node determining module configured to perform an operation on the path offset value and the path hash value according to a preset path determination rule to obtain an operation result, and determine a target network node of a next hop according to the operation result; a data packet forwarding module configured to transmit the data packet to the target network node of the next hop, so that the target network node of the next hop performs routing forwarding on the data packet. The preset path determination rule comprises a table lookup path determination rule based on a table lookup operation; the table lookup path determination rule based on the table lookup operation comprises: obtaining a total number of node candidates of a next hop; generating node identifiers of each of the node candidates according to the total number of nodes; generating an initial network node row based on the node identifiers; copying the initial network node row to obtain an initial network node table; the number of rows and the number of columns of the initial network node table are equal to the total number of nodes; moving each element corresponding to each column in the mth row of the initial network node table left by m-1 positions to obtain a network node list; determining a target column in the network node list based on the path hash value; determining a target network node from the target column based on the path offset value.

11. The apparatus of claim 10, wherein, The device further comprises: a data to be forwarded obtaining module configured to obtain data to be forwarded, quintuple information corresponding to the data to be forwarded and initial path identification information; The path identification information determination module is configured to adjust the initial path identification information to obtain the path identification information if a transmission path determined based on the five-tuple information and the initial path identification information has a fault. The data packet encapsulation module is configured to encapsulate the five-tuple information, the path identification information and the data to be forwarded to obtain a data packet to be forwarded.

12. The apparatus of claim 11, wherein, The data to be forwarded obtaining module is further configured to: obtain the data to be forwarded and five-tuple information corresponding to the data to be forwarded; obtain historical path identification information corresponding to service data sent by a data source end at a previous moment when a destination receiving end of the service data is the same as a destination receiving end of the data to be forwarded; determine the historical path identification information as initial path identification information of the data to be forwarded when a single-path transmission protocol is used by a transmission system; modify the historical path identification information to obtain the initial path identification information when a multi-path transmission protocol is used by the transmission system.

13. The apparatus of claim 12, wherein, The data to be forwarded obtaining module is further configured to: obtain load information of each network node establishing a data connection with the data source end; modify the historical path identification information based on the load information to obtain the initial path identification information.

14. The apparatus of claim 11, wherein, The path identification information determination module is further configured to: if a transmission path determined based on the five-tuple information and the initial path identification information has no fault, encapsulate the initial path identification information as path identification information with the five-tuple information and the data to be forwarded to obtain a data packet to be forwarded.

15. The apparatus of claim 10, wherein, The path hash value determination module is further configured to: vectorize the five-tuple information to obtain a path vector; perform hash operation on the path vector by using a hash function to obtain a path hash value.

16. The apparatus of claim 11, wherein, The data packet encapsulation module is configured to: generate a packet header based on the five-tuple information and the path identification information; a service type field of the packet header is configured as the path identification information; encapsulate the data to be forwarded based on the packet header to obtain a data packet to be forwarded.

17. The apparatus of claim 10, wherein, The preset path determination rule further includes a hash path determination rule based on hash operation, and the hash path determination rule includes: adjust the path hash value based on the path offset value; obtain a total number of node of candidate network nodes of a next hop; perform modulo operation on the adjusted path hash value according to the total number of node to obtain a modulo result; determine a target network node from the candidate network nodes of the next hop based on the modulo result.

18. The apparatus of claim 10, wherein, The target network node determination module is further configured to: perform modulo operation on the path hash value according to the total number of node to obtain a modulo result; take a column matched with the modulo result in the network node table as a target column. 19.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-18. The processor implements the steps of the method of any one of claims 1 to 9 when executing the computer program.

20. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps of the method of any one of claims 1 to 9 when executed by the processor.

21. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the method of any one of claims 1 to 9 when executed by the processor.

Citation Information

Patent Citations

  • Data center network, flow balancing method thereof and controller

    CN104184676A

  • Transmission path fault processing method, device and system

    CN110661700A

  • Fault bypassing method and device based on quintuple hash path

    CN113300873A