HK40091138A - Method, apparatus, computer device and storage medium for transmitting data packet - Google Patents
Method, apparatus, computer device and storage medium for transmitting data packet Download PDFInfo
- Publication number
- HK40091138A HK40091138A HK42023080074.0A HK42023080074A HK40091138A HK 40091138 A HK40091138 A HK 40091138A HK 42023080074 A HK42023080074 A HK 42023080074A HK 40091138 A HK40091138 A HK 40091138A
- Authority
- HK
- Hong Kong
- Prior art keywords
- path
- network node
- data
- information
- forwarded
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及计算机技术领域,特别是涉及一种数据包的传输方法、装置、计算机设备和存储介质。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
数据中心是IT系统的核心设施,是为企业与互联网中用户提供信息服务与资源共享的关键节点。近年来随着网络技术的发展,数据中心规模越来越大,为了确保数据中心各服务器之间数据传输的可靠性,通常在进行数据传输的服务器之间的设置多个等价的数据传输路径,简称等价多路径(ECMP),并在等价多路径之间做负载均衡。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.
目前在等价多路径之间做负载均衡时,转发节点通常是直接基于待转发的数据包的五元组信息(传输协议类型、源IP、源端口、目的IP和目的端口)确定下一跳的目标网络节点,即拥有相同五元组信息的数据包会由相同的传输路径进行转发,某个网络节点发生故障时,数据源端无法及时且有效地修改传输路径以绕过该故障的网络节点,从而影响了数据包的传输效率。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
基于此,有必要针对上述技术问题,提供一种能够提高数据包的传输效率的数据包的传输方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。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.
第一方面,本申请提供了一种数据包的传输方法。所述方法包括:Firstly, this application provides a method for transmitting data packets. The method includes:
获取待转发的数据包,所述数据包的包头携带五元组信息和路径标识信息;Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;
基于所述五元组信息确定路径哈希值;Determine the path hash value based on the aforementioned quintuple information;
根据所述路径标识信息确定路径偏移值;Determine the path offset value based on the path identification information;
基于所述路径偏移值和所述路径哈希值确定下一跳的目标网络节点;The target network node for 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 at the next hop, so that the target network node at the next hop can route and forward the data packet.
第二方面,本申请还提供了一种数据包的传输装置。所述装置包括:Secondly, this application also provides a data packet transmission apparatus. The apparatus includes:
数据包获取模块,用于获取待转发的数据包,所述数据包的包头携带五元组信息和路径标识信息;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.
路径哈希值确定模块,用于基于所述五元组信息确定路径哈希值;A path hash value determination module is used to determine the path hash value based on the five-tuple information;
路径偏移值确定模块,用于根据所述路径标识信息确定路径偏移值;The path offset value determination module is used to determine the path offset value based on the path identification information;
目标网络节点确定模块,用于基于所述路径偏移值和所述路径哈希值确定下一跳的目标网络节点;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.
数据包转发模块,用于将所述数据包传输至下一跳的所述目标网络节点,以使下一跳的所述目标网络节点对所述数据包进行路由转发。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.
在其中一个实施例中,所述装置还包括:In one embodiment, the device further includes:
待转发数据获取模块,用于获取待转发数据、所述待转发数据对应的五元组信息和初始路径标识信息;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;
路径标识信息确定模块,用于若基于所述五元组信息和所述初始路径标识信息确定的传输路径存在故障,对所述初始路径标识信息进行调整,得到所述路径标识信息;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.
数据包封装模块,用于对所述五元组信息、所述路径标识信息和所述待转发数据进行封装,得到待转发的数据包。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.
在其中一个实施例中,所述待转发数据获取模块,还用于:In one embodiment, the data acquisition module to be forwarded is further configured to:
获取待转发数据和所述待转发数据对应的五元组信息;Obtain the data to be forwarded and the corresponding quintuple information of the data to be forwarded;
当数据源端上一时刻发送的业务数据的目的接收端,和所述待转发数据的目的接收端相同时,获取所述业务数据对应的历史路径标识信息;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.
当传输系统采用的是单路径传输协议时,将所述历史路径标识信息确定为所述待转发数据的初始路径标识信息;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;
当所述传输系统采用的是多路径传输协议时,对所述历史路径标识信息进行修改,得到所述初始路径标识信息。When the transmission system uses a multipath transmission protocol, the historical path identification information is modified to obtain the initial path identification information.
在其中一个实施例中,所述待转发数据获取模块,还用于:In one embodiment, the data acquisition module to be forwarded is further configured to:
获取与所述数据源端建立数据连接的各网络节点的负载信息;Obtain the load information of each network node that has established a data connection with the data source;
基于所述负载信息对所述历史路径标识信息进行修改,得到所述初始路径标识信息。The historical path identifier information is modified based on the load information to obtain the initial path identifier information.
在其中一个实施例中,所述路径标识信息确定模块,还用于:In one embodiment, the path identification information determination module is further configured to:
若基于所述五元组信息和所述初始路径标识信息确定的传输路径不存在故障,则将所述初始路径标识信息作为路径标识信息与所述五元组信息、所述待转发数据进行封装,得到待转发的数据包。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.
在其中一个实施例中,所述路径哈希值确定模块,还用于:In one embodiment, the path hash value determination module is further configured to:
将所述五元组信息进行向量化,得到路径向量;The quintuple information is vectorized to obtain the path vector;
通过哈希函数对所述路径向量进行哈希运算,得到路径哈希值。The path vector is hashed using a hash function to obtain the path hash value.
在其中一个实施例中,所述数据包封装模块,还用于:In one embodiment, the data packet encapsulation module is further configured to:
基于所述五元组信息和所述路径标识信息生成包头;所述包头的服务类型字段配置为所述路径标识信息;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.
基于所述包头对所述待转发数据进行封装,得到待转发的数据包。The data to be forwarded is encapsulated based on the packet header to obtain the data packet to be forwarded.
在其中一个实施例中,所述目标网络节点确定模块,还用于:In one embodiment, the target network node determination module is further configured to:
基于所述路径偏移值对所述路径哈希值进行调整;The path hash value is adjusted based on the path offset value;
获取下一跳的候选网络节点的节点总数量;Get the total number of candidate network nodes for the next hop;
根据所述节点总数量对调整后的所述路径哈希值进行取模,得到取模结果;The modulo operation is performed on the adjusted path hash value based on the total number of nodes to obtain the modulo result.
基于所述取模结果从下一跳的所述候选网络节点中确定目标网络节点。The target network node is determined from the candidate network nodes for the next hop based on the modulo result.
在其中一个实施例中,所述目标网络节点确定模块,还用于:In one embodiment, the target network node determination module is further configured to:
获取下一跳的候选网络节点的节点总数量;Get the total number of candidate network nodes for the next hop;
根据所述节点总数量生成网络节点列表;Generate a network node list based on the total number of nodes;
基于所述路径哈希值在所述网络节点列表中确定目标列;The target column is determined from the network node list based on the path hash value;
基于所述路径偏移值从所述目标列中确定目标网络节点。The target network node is determined from the target column based on the path offset value.
在其中一个实施例中,所述目标网络节点确定模块,还用于:In one embodiment, the target network node determination module is further configured to:
根据所述节点总数量对所述路径哈希值进行取模,得到取模结果;The modulo operation is performed on the path hash value based on the total number of nodes to obtain the modulo result.
将所述网络节点表中与所述取模结果匹配的列作为目标列。The column in the network node table that matches the modulo result is taken as the target column.
第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤: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:
获取待转发的数据包,所述数据包的包头携带五元组信息和路径标识信息;Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;
基于所述五元组信息确定路径哈希值;Determine the path hash value based on the aforementioned quintuple information;
根据所述路径标识信息确定路径偏移值;Determine the path offset value based on the path identification information;
基于所述路径偏移值和所述路径哈希值确定下一跳的目标网络节点;The target network node for 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 at the next hop, so that the target network node at the next hop can route and forward the data packet.
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤: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:
获取待转发的数据包,所述数据包的包头携带五元组信息和路径标识信息;Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;
基于所述五元组信息确定路径哈希值;Determine the path hash value based on the aforementioned quintuple information;
根据所述路径标识信息确定路径偏移值;Determine the path offset value based on the path identification information;
基于所述路径偏移值和所述路径哈希值确定下一跳的目标网络节点;The target network node for 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 at the next hop, so that the target network node at the next hop can route and forward the data packet.
第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤: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:
获取待转发的数据包,所述数据包的包头携带五元组信息和路径标识信息;Obtain the data packet to be forwarded, wherein the header of the data packet carries 5-tuple information and path identifier information;
基于所述五元组信息确定路径哈希值;Determine the path hash value based on the aforementioned quintuple information;
根据所述路径标识信息确定路径偏移值;Determine the path offset value based on the path identification information;
基于所述路径偏移值和所述路径哈希值确定下一跳的目标网络节点;The target network node for 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 at the next hop, so that the target network node at the next hop can route and forward the data packet.
上述数据包的传输方法、装置、计算机设备和存储介质,通过获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点;将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发,从而在某个网络节点发生故障时,通过在数据包中封装路径标识信息,使得可以基于路径标识信息实现下一跳的网络节点的偏移,从而及时且有效地修改传输路径以绕过该故障的网络节点,提高了数据包的传输效率。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
图1为一个实施例中数据包的传输方法的应用环境图;Figure 1 is an application environment diagram of a data packet transmission method in one embodiment;
图2为一个实施例中数据包的传输方法的流程示意图;Figure 2 is a flowchart illustrating a data packet transmission method in one embodiment;
图3为一个实施例中传统方案中数据包的传输示意图;Figure 3 is a schematic diagram of data packet transmission in a conventional scheme in one embodiment;
图4为一个实施例中本申请提供方案中数据包的传输示意图;Figure 4 is a schematic diagram of data packet transmission in the solution provided in this application in one embodiment;
图5为一个实施例中传统MPTCP的多路径传输方案的传输路径示意图;Figure 5 is a schematic diagram of the transmission path of a traditional MPTCP multipath transmission scheme in one embodiment;
图6为一个实施例中本申请提供MPTCP的多路径传输的传输路径示意图;Figure 6 is a schematic diagram of the transmission path of MPTCP multipath transmission provided in this application in one embodiment;
图7为一个实施例中确定下一跳的目标网络节点步骤的流程示意图;Figure 7 is a flowchart illustrating the steps for determining the target network node for the next hop in one embodiment;
图8为另一个实施例中确定下一跳的目标网络节点步骤的流程示意图;Figure 8 is a flowchart illustrating the steps for determining the target network node for the next hop in another embodiment;
图9为一个实施例中网络节点列表生成过程的示意图;Figure 9 is a schematic diagram of the network node list generation process in one embodiment;
图10为另一个实施例中网络节点列表生成过程的示意图;Figure 10 is a schematic diagram of the network node list generation process in another embodiment;
图11为一个实施例中存活链接数量示意图;Figure 11 is a schematic diagram of the number of live links in one embodiment;
图12为一个实施例中数据包的传输装置的结构框图;Figure 12 is a structural block diagram of a data packet transmission device in one embodiment;
图13为另一个实施例中数据包的传输装置的结构框图;Figure 13 is a structural block diagram of a data packet transmission device in another embodiment;
图14为一个实施例中计算机设备的内部结构图;Figure 14 is an internal structure diagram of a computer device in one embodiment;
图15为一个实施例中计算机设备的内部结构图。Figure 15 is an internal structure diagram of a computer device in one embodiment.
具体实施方式Detailed Implementation
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。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.
本申请提供的数据包的传输方法可以应用于云计算所使用的基于的云存储数据中心,还可以应用于智能交通系统(Intelligent Traffic System,ITS)通信领域。数据中心是全球协作的特定设备网络,用来在internet网络基础设施上传递、加速、展示、计算、存储数据信息。数据中心是IT系统的核心设施,是为企业与互联网中用户提供信息服务与资源共享的关键节点。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 Transportation 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.
云计算(cloud computing)是一种计算模式,它将计算任务分布在大量计算机构成的资源池上,使各种应用系统能够根据需要获取计算力、存储空间和信息服务。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.
云存储(cloud storage)是在云计算概念上延伸和发展出来的一个新的概念,分布式云存储系统(以下简称存储系统)是指通过集群应用、网格技术以及分布存储文件系统等功能,将网络中大量各种不同类型的存储设备(存储设备也称之为存储节点)通过应用软件或应用接口集合起来协同工作,共同对外提供数据存储和业务访问功能的一个存储系统。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 in the network (storage devices are also called storage nodes) to work together through application software or application interfaces to provide data storage and business access functions to the outside world.
智能交通系统(Intelligent Traffic System,ITS)又称智能运输系统(Intelligent Transportation System),是将先进的科学技术(信息技术、计算机技术、数据通信技术、传感器技术、电子控制技术、自动控制理论、运筹学、人工智能等)有效地综合运用于交通运输、服务控制和车辆制造,加强车辆、道路、使用者三者之间的联系,从而形成一种保障安全、提高效率、改善环境、节约能源的综合运输系统。Intelligent Transportation Systems (ITS) are comprehensive transportation systems that effectively integrate advanced technologies (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. They strengthen the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment, and saves energy.
本申请实施例提供的数据包的传输方法,可以应用于如图1所示的应用环境中。其中,数据源端102通过网络节点110接入互联网,数据目的端104通过网络节点120接入互联网,网络节点110和网络节点120通过网络节点130进行网络连接,数据源端102所发送的数据包通过网络节点110、网络节点130和网络节点130的层层转发,最终发送至数据目的端104。网络节点110、网络节点120和网络节点130具体可以是交换机或路由器,其数量分别可以至少有两个,如图1中所示的网络节点110包括网络节点110a和网络节点110b,网络节点120包括网络节点120a、网络节点120b、网络节点120c和网络节点120d,网络节点130包括网络节点130a和网络节点130b。本申请实施例提供的数据包的传输方法可以执行于数据源端102或网络节点(网络节点110或网络节点120),具体地,以执行于数据源端102为例,数据源端102获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点(网络节点110a和网络节点110b中的其中一个);将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。The data packet transmission method provided in this application embodiment can be applied to the application environment shown in Figure 1. The data source 102 accesses the Internet through network node 110, and the data destination 104 accesses the Internet through network node 120. Network nodes 110 and 120 are connected via network node 130. Data packets sent by the data source 102 are forwarded through network nodes 110, 120, and 130, and finally sent to the data destination 104. Network nodes 110, 120, and 130 can specifically be switches or routers, and there can be at least two of each. As shown in Figure 1, network node 110 includes network nodes 110a and 110b, network node 120 includes network nodes 120a, 120b, 120c, and 120d, and network node 130 includes network nodes 130a and 130b. The data packet transmission method provided in this application embodiment can be executed at the data source end 102 or a network node (network node 110 or network node 120). Specifically, taking the execution at the data source end 102 as an example, the data source end 102 obtains the data packet to be forwarded. The header of the data packet 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 (one of network node 110a and network node 110b) 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.
在一个实施例中,数据源端102所确定的下一跳的目标网络节点为图1中的网络节点110b,网络节点110b在接收到待转发的数据包之后,也可以执行本申请提供的数据包传输方法,具体地,网络节点110b获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点(网络节点120a、网络节点120b、网络节点120c和网络节点120d中的其中一个);将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。In one embodiment, the target network node for the next hop determined by the data source 102 is network node 110b in Figure 1. 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 for 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 for the next hop so that the target network node for the next hop can route and forward the data packet.
其中,数据源端和数据目的端可以是终端或服务器,终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。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.
在一个实施例中,如图2所示,提供了一种数据包的传输方法,以该方法应用于图1中的计算机设备(数据源端102或网络节点,网络节点为网络节点110或网络节点120)为例进行说明,包括以下步骤:In one embodiment, as shown in FIG2, a data packet transmission method is provided. Taking the application of this method to the computer device in FIG1 (data source 102 or network node, where the network node is network node 110 or network node 120) as an example, the method includes the following steps:
S202,获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息。S202, obtain the data packet to be forwarded. The header of the data packet carries 5-tuple information and path identifier information.
其中,五元组信息为与数据包相关的五个信息的集合,具体可以是源IP地址、源端口、目的IP地址、目的端口和传输层协议这五个量组成的一个集合。例如一个数据包的五元组信息为“192.168.1.1、10000、TCP、121.14.88.76、80”则该五元组信息的其意义是,一个IP地址为192.168.1.1的数据源端通过端口10000,基于TCP协议与IP地址为121.14.88.76、端口为80的数据目的端进行连接。路径标识信息是指用于标识数据传输路径的信息,具体可以存在于数据包的包头的TOS字段。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.
需要说明的是,本申请实施例中,所基于的传输层协议可以是单路径传输协议,如TCP(Transmission Control Protocol)、RDMA(Remote Direct Memory Access),也可以是多路径传输协议,如MPTCP(Multi Path TCP)。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).
在一个实施例中,当计算机设备为网络节点时,网络节点接收上一跳的数据转发节点所转发的数据包,得到待转发的数据包,并对该待转发的数据包进行分析,得到该待转发的数据包的包头,并基于包头确定出该数据包的五元组信息和路径标识信息。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.
在一个实施例中,当计算机设备为数据源端时,数据源端可以在对待转发数据进行封装之前获取待封装数据对应的五元组信息和路径标识信息,并基于所获取的五元组信息和路径标识信息对待封装数据进行封装,从而得到待转发的数据包。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.
在一个实施例中,数据源端对五元组信息、路径标识信息和待转发数据进行封装,得到待转发的数据包的过程具体包括以下步骤:基于五元组信息和路径标识信息生成包头;基于包头对待转发数据进行封装,得到待转发的数据包。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.
其中,所生成的包头可包括TCP报头字段、IP报头字段,IP报头字段中包含有服务类型字段,服务类型字段配置为路径标识信息。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.
具体地,数据源端基于五元组信息中的源IP地址、目的IP地址、传输层协议以及路径标识信息生成IP报头字段,基于五元组信息中的源端口和目的端口生成TCP报头字段,从而得到包头,并基于包头对待转发数据进行封装,得到待转发的数据包。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.
S204,基于五元组信息确定路径哈希值。S204, determine the path hash value based on the quintuple information.
其中,路径哈希值是可以用于确定传输路径的哈希值。Among them, the path hash value is a hash value that can be used to determine the transmission path.
具体地,计算机设备在得到五元组信息之后,获取预设的哈希算法,并基于该预设的哈希算法对五元组信息进行哈希运算,得到路径哈希值。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.
可以理解的是,当计算机设备为网络节点时,该网络节点所在节点层中的各个网络节点中所配置的预设的哈希算法是相同的,从而可以确保该节点层中的各个网络节点基于相同的五元组信息所确定出的路径哈希值是相同的。例如,图1中的网络节点110a和网络节点110b属于同一个节点层,则网络节点110a和网络节点110b中所配置的预设的哈希算法是相同的,网络节点120a、网络节点120b、网络节点120c和网络节点120d属于同一个节点层,网络节点120a、网络节点120b、网络节点120c和网络节点120d所配置的预设的哈希算法是相同的。It is understandable that when a computer device is a network node, the preset hash algorithm configured in each network node within the same node layer is the same. This ensures that the path hash value determined by each network node in the same node layer based on the same 5-tuple information is the same. For example, if network nodes 110a and 110b in Figure 1 belong to the same node layer, then the preset hash algorithm configured in network nodes 110a and 110b is the same. Similarly, if network nodes 120a, 120b, 120c, and 120d belong to the same node layer, then the preset hash algorithm configured in network nodes 120a, 120b, 120c, and 120d is the same.
在一个实施例中,S204具体包括以下步骤:将五元组信息进行向量化,得到路径向量;通过哈希函数对路径向量进行哈希运算,得到路径哈希值。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.
具体地,计算机设备在得到五元组信息之后,可以对五元组信息按照预设顺序进行拼接,得到路径向量,并获取计算机设备所配置的哈希函数,基于该哈希函数对该路径向量进行哈希运算,得到路径哈希值。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.
例如,五元组信息中的TCP可以用“000”标识,RDMA可以用“010”标识,MPTCP可以用“111”标识,假设所获取的五元组信息为“192.168.1.1、10000、TCP、121.14.88.76、80”,则可以对该五元组信息按照源IP地址、源端口、目的IP地址、目的端口、传输层协议的顺序进行拼接,得到的路径向量为“192168111000012114887680000”,并基于预设的哈希函数对“192168111000012114887680000”进行哈希算,得到对应的路径哈希值。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.
S206,根据路径标识信息确定路径偏移值。S206, Determine the path offset value based on the path identification information.
具体地,计算机设备在得到路径标识信息之后,直接基于路径标识信息确定出对应的路径标识(Path ID),并直接将该路径标识确定为路径偏移值。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.
例如,假设计算机设备从数据包的包头中提取出的服务类型字段(TOS字段)为IP_TOS=0,即所确定的路径标识信息为“IP_TOS=0”,则确定路径标识为1,即Path ID=0,则将“Path ID=0”确定为路径偏移值;假设计算机设备从数据包的包头中提取出的TOS字段为IP_TOS=1,即所确定的路径标识信息为“IP_TOS=1”,则确定路径标识为1,即Path ID=1,则将“Path ID=1”确定为路径偏移值。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.
S208,基于路径偏移值和路径哈希值确定下一跳的目标网络节点。S208 determines the target network node for the next hop based on the path offset value and the path hash value.
具体地,计算机设备在得到路径偏移值和路径哈希值之后,可以获取预设的路径确定规则,并按照所获取的预设的路径确定规则,对路径偏移值和路径哈希值进行相应的运算,得到运算结果,并按照该运算结果确定下一跳的目标网络节点。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.
其中,预设的路径确定规则可以是基于哈希运算的哈希路径确定规则,也可以是基于查表运算的查表路径确定规则,预设的路径确定规则与计算机设备本身相匹配,例如,对运行有可编程的Tofino芯片的计算机设备,其所对应的预设的路径确定规则可以是哈希路径确定规则,对于运行有不可编程能力的Broadcom的TD3/TH3/TH4系列芯片的计算机设备,其所对应的预设的路径确定规则可以是查表路径确定规则。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.
S210,将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。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.
具体地,下一跳的目标网络节点在接收到该数据包之后,可以获取该数据包的包头携带五元组信息和路径标识信息,并基于五元组信息确定路径哈希值,根据路径标识信息确定路径偏移值,基于路径偏移值和路径哈希值确定下一跳的目标网络节点,将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。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.
例如,图1中数据源端所确定的下一跳的目标网络节点为网络节点110a,则网络节点110b在接收到数据源端所转发的数据包之后,则获取该数据包携带的五元组信息和路径标识信息,并基于五元组信息确定路径哈希值,根据路径标识信息确定路径偏移值,基于路径偏移值和路径哈希值确定下一跳的目标网络节点为网络节点120b,则将该数据包再转发给网络节点120b,该网络节点120b在接收到数据包之后,也基于数据包携带的五元组信息和路径标识信息确定下一跳的目标网络节点。For example, in 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 5-tuple information and path identifier information carried in the data packet, determines the path hash value based on the 5-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 5-tuple information and path identifier information carried in the data packet.
举例对上述数据包的传输方法的效果进行说明。图3示出了传统方案中数据包的传输示意图,其中图3中各个网络节点之间的连接方式与图1所示的连接方式相同,为了便于示意,图3中不再对各网络节点之间的连接方式进行示出,图3中LA表示接入设备,LC表示核心设备。在传统方案中,待转发的数据包的包头仅携带有五元组信息,计算机设备在获取到数据包之后,通常是直接基于五元组信息确定下一跳的目标网络节点,如图3中,在某一时刻,数据源端基于待转发的数据包A的五元组信息确定下一条的目标网络节点为网络节点110a,并将该数据包A转发给网络节点110a,网络节点110a在接收到数据包A之后,基于五元组信息确定出下一跳的目标网络节点为网络节点120a,并将该数据包A转发给网络节点120a,网络节点120a在接收到数据包A之后,基于五元组信息确定出下一跳的目标网络节点为网络节点130a,网络节点130a在接收到数据包A之后,可以将数据包A发送给数据目的端,从而完成数据包A的传输,在此次数据包A的传输过程中,数据传输路径为“数据源端-网络节点110a-网络节点120a-网络节点130a-数据目的端”,然而当该数据传输路径发生故障时,即网络节点110a、网络节点120a、网络节点130a中的至少一个发生故障时,若下一时刻所要传输的数据包B的五元组信息与该数据包A的五元组信息相同,则在各个网络节点在基于数据包B的五元组信息确定数据传输路径时,依然会确定出使用该故障的数据传输路径来传输数据包B,从而导致无法完成数据包B的传输;而当采用本申请所提供的数据包的传输方法时(如图4所示),若下一时刻所要传输的数据包B的五元组信息与该数据包A的五元组信息相同,则数据源端生成路径标识信息IP_TOS=1,并将该生成的路径标识信息IP_TOS=1和五元组信息封装到所要传输的数据包B的包头中,从而根据五元组信息和路径标识信息确定出下一跳的目标网络节点为网络节点110a,并将该数据包B转发给网络节点110b,网络节点110b在接收到数据包B之后,基于五元组信息和路径标识信息确定出下一跳的目标网络节点为网络节点120b,并将该数据包B转发给网络节点120b,网络节点120b在接收到数据包B之后,基于五元组信息和路径标识信息确定出下一跳的目标网络节点为网络节点130b,网络节点130b在接收到数据包B之后,可以将数据包B发送给数据目的端,从而完成数据包B的传输,在此次数据包B的传输过程中,数据传输路径为“数据源端-网络节点110b-网络节点120b-网络节点130b-数据目的端,由此可见,数据包B在传输过程中基于五元组信息和路径标识信息所确定出的数据传输路径,相对于仅基于五元组信息所确定出数据传输路径发生了偏移,具体地,网络节点分别由网络节点110a偏移到了网络节点110b,由网络节点120a偏移到网络节点120b,由网络节点130a偏移到了网络节点130b,从而数据包B所使用的传输路径完全避开了可能存在故障的网络节点110a、网络节点120a和网络节点130a,提高了数据包传输的可靠性,从而提高了数据包的传输效率。The effect of the above data packet transmission method will be illustrated with an example. Figure 3 shows a schematic diagram of data packet transmission in the traditional scheme. The connection method between the network nodes in Figure 3 is the same as that shown in Figure 1. For ease of illustration, the connection method between the network nodes is not shown in Figure 3. In Figure 3, LA represents the access device and LC represents the core device. In traditional schemes, the header of a data packet to be forwarded only carries five-tuple information. After receiving the data packet, the computer device usually determines the next-hop target network node directly based on the five-tuple information. As shown in Figure 3, 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-hop 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-hop 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, thereby... The transmission of data packet A is completed. During this transmission, 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—that is, at least one of network nodes 110a, 120a, and 130a fails—if the 5-tuple information of the next data packet B to be transmitted is the same as that 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 preventing the transmission of data packet B from being completed. However, when using the data packet transmission method provided in this application (as shown in Figure 4), if the 5-tuple information of the next data packet B to be transmitted is the same as that of data packet A… If the paths are the same, the data source generates path identifier information IP_TOS=1 and encapsulates this 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, it determines the next-hop target network node as network node 110a and forwards the data packet B to network node 110b. After receiving data packet B, network node 110b determines the next-hop target network node as 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 as network node 130b based on the 5-tuple information and path identifier information. After receiving data packet B, network node 130b can send data packet B to the data destination. To complete the transmission of data packet B, the data transmission path during this transmission process 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 to the data transmission path determined solely by the five-tuple information. Specifically, the network nodes are shifted 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 potentially faulty network nodes 110a, 120a, and 130a, improving the reliability of data packet transmission and thereby increasing the transmission efficiency.
上述数据包的传输方法中,通过获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点;将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发,从而在某个网络节点发生故障时,通过在数据包中封装路径标识信息,使得可以基于路径标识信息实现下一跳的网络节点的偏移,从而及时且有效地修改传输路径以绕过该故障的网络节点,提高了数据包的传输效率。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.
在一个实施例中,当计算机设备为数据源端时,上述数据包的传输方法还包括生成待转发的数据包的过程,该生成待转发的数据包的过程具体包括以下步骤:获取待转发数据、待转发数据对应的五元组信息和初始路径标识信息;若基于五元组信息和初始路径标识信息确定的传输路径存在故障,对初始路径标识信息进行调整,得到路径标识信息;对五元组信息、路径标识信息和待转发数据进行封装,得到待转发的数据包。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.
具体地,数据源端获取待转发数据、待转发数据所对应的五元组信息和初始路径信息,并基于五元组信息和初始路径信息确定传输路径,并检测该传输路径是否存在故障,若该传输路径存在故障,则对初始路径标识信息进行调整,得到调整结果,并将调整结果确定为路径标识信息,并基于所确定的五元组信息、路径标识信息对待转发数据进行封装,得到待转发的数据包。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.
上述实施例中,数据源端通过获取待转发数据、待转发数据对应的五元组信息和初始路径标识信息,并在基于五元组信息和初始路径标识信息确定的传输路径存在故障时,对初始路径标识信息进行调整,得到路径标识信息,进而对五元组信息、路径标识信息和待转发数据进行封装,得到待转发的数据包,从而可以使得在对所得到的待转发的数据包在进行转发时,可以及时且有效地修改传输路径以绕过该故障的网络节点,提高了数据包的传输效率。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.
在一个实施例中,数据源端若检测出基于五元组信息和初始路径标识信息确定的传输路径不存在故障,则将初始路径标识信息作为路径标识信息与五元组信息、待转发数据进行封装,得到待转发的数据包。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.
例如,数据源端获取的待转发数据的五元组信息为五元组信息1,初始路径标识信息为IP_TOS=1,则基于五元组信息和初始路径标识信息为IP_TOS=1确定出的传输路径为路径1,则检测路径1是否存在故障,当确定出路径1存在故障时,则对,初始路径标识信息的IP_TOS的值加1,得到调整后的IP_TOS=2,得到路径标识信息为IP_TOS=2,并基于五元组信息和路径标识信息IP_TOS=2对待转发数据进行封装,得到待转发的数据包。可以理解的是,数据源段在得到路径标识信息为IP_TOS=2之后,还可以进一步确定基于五元组信息1和路径标识信息IP_TOS=2所确定传输路径是否存在故障,以确定是否需要对路径标识信息IP_TOS=2进一步调整,直至得到的基于五元组信息1和路径标识信息所确定的传输路径不存在故障。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.
上述实施例中,数据源端通过在基于五元组信息和初始路径标识信息确定的传输路径不存在故障时,直接对五元组信息、初始路径标识信息和待转发数据进行封装,得到待转发的数据包,从而可以使得在对所得到的待转发的数据包在进行转发时,可以确保所使用的传输路径不存在故障的网络节点,提高了数据包的传输效率。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.
在一个实施例中,数据源端获取待转发数据、待转发数据对应的五元组信息和初始路径标识信息的过程包括以下步骤:获取待转发数据和待转发数据对应的五元组信息;当数据源端上一时刻发送的业务数据的目的接收端,和待转发数据的目的接收端相同时,获取业务数据对应的历史路径标识信息;当传输系统采用的是单路径传输协议时,将历史路径标识信息确定为待转发数据的初始路径标识信息;当传输系统采用的是多路径传输协议时,对历史路径标识信息进行修改,得到初始路径标识信息。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.
可以理解的是,当数据源端需要向数据目的端传输数据时,数据源端预先与数据目的端之间建立通信链接(如TCP链接),之后便可通过该通信链接向数据目的端传输数据,其中,通过该通信链接所传输数据的五元组信息均为基于该链接信息所确定出的五元组信息。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.
具体地,数据源端基于所建立的通信链接的连接信息确定出待转发数据的五元组信息,确定上一时刻发送的业务数据所使用的通信链接与待转发数据的通信链接是否为同一链接,若是,则确定上一时刻所发送的业务数据的目的接收端(即数据目的端),与当前时刻待转发数据的目的接收端(即数据目的端)相同,则获取该业务数据所对应的历史路径标识信息,以便基于该历史路径标识信息确定待转发数据的路径标识信息。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.
在一个实施例中,数据源端基于历史路径标识信息确定待转发数据的路径标识信息的过程包括以下步骤:当传输系统采用的是单路径传输协议时,将历史路径标识信息确定为待转发数据的初始路径标识信息;当传输系统采用的是多路径传输协议时,对历史路径标识信息进行修改,得到初始路径标识信息。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.
其中,传输系统可以是指数据源端与数据目的端所建立的通信链接。The transmission system can refer to the communication link established between the data source and the data destination.
具体地,当传输系统采用的是单路径传输协议时,也就是说,数据源端与数据目的端所建立的通信链接是基于单路径传输协议所建立的时,即该通信链接对应于一条传输路径时,可将历史路径标识信息确定为待转发数据的初始路径标识信息。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.
例如,数据源端和数据目的端的通信链接是基于TCP单路径传输协议所建立的,上一时刻数据源端通过该通信链路所传输业务数据的历史路径标识信息为IP_TOS=0,则确定当前待转发数据对应的初始路径标识信息也为IP_TOS=0。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.
当传输系统采用的是多路径传输协议时,也就是说,数据源端与数据目的端所建立的通信链接是基于多路径传输协议所建立的时,即该通信链接对应于多条等价的传输路径时,可对历史路径标识信息进行修改,得到待转发数据的初始路径标识信息。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.
其中,对历史路径信息进行修改可以是在历史路径信息的基础上增加预设值,预设值可以为1。Modifying historical path information can be achieved by adding a preset value to the historical path information, and the preset value can be 1.
例如,数据源端和数据目的端的通信链接是基于MPTCP多路径传输协议所建立的,上一时刻数据源端通过该通信链路所传输业务数据的历史路径标识信息为IP_TOS=1,则确定当前待转发数据对应的初始路径标识信息为IP_TOS=2。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.
上述实施例中,当传输系统采用的是单路径传输协议时,数据源端通过将历史路径标识信息确定为待转发数据的初始路径标识信息,从而可以使得在仅存在一条传输路径时,数据包的传输默认均使用该传输路径进行传输;当传输系统采用的是多路径传输协议时,对历史路径标识信息进行修改,得到初始路径标识信息,从而可以使得在存在多条等价的传输路径时,相邻两次数据传输所使用的传输路径不同,以实现各条传输路径上的负载均衡,进而提高了数据包的传输效率。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.
举例对上述数据包的传输方法的效果进行说明。图3示出了传统方案中数据包的传输示意图,其中图3中各个网络节点之间的连接方式与图1所示的连接方式相同,为了便于示意,图3中不再对各网络节点之间的连接方式进行示出。在传统方案中,待转发的数据包的包头仅携带有五元组信息,计算机设备在获取到数据包之后,通常是直接基于五元组信息确定下一跳的目标网络节点,如图3中,在某一时刻,数据源端基于待转发的数据包A的五元组信息确定下一条的目标网络节点为网络节点110a,并将该数据包A转发给网络节点110a,网络节点110a在接收到数据包A之后,基于五元组信息确定出下一跳的目标网络节点为网络节点120a,并将该数据包A转发给网络节点120a,网络节点120a在接收到数据包A之后,基于五元组信息确定出下一跳的目标网络节点为网络节点130a,网络节点130a在接收到数据包A之后,可以将数据包A发送给数据目的端,从而完成数据包A的传输,在此次数据包A的传输过程中,数据传输路径为“数据源端-网络节点110a-网络节点120a-网络节点130a-数据目的端”,针对MPTCP的多路径传输方案,数据传输路径“数据源端-网络节点110a-网络节点120a-网络节点130a-数据目的端”为数据源端和数据目的端的其中一个子流,而数据源端和数据目的端的通信链接下可包含多个子流,即包含多个传输路径,MPTCP的多路径传输方案使用不同的源端口号(src_port)区分子流,在概率上子流路径在网络中均匀分布。但是存在一定可能,各子流经过同一个网络节点(如图5所示),这种情况下,多路径传输性能、鲁棒性都出现严重退化。而当采用本申请所提供的数据包的传输方法时,可以实现基于IP头的TOS字段区分各子流,可以确定性地保证各子流均匀分布在各网络节点(如图6所示),避免多路径协议出现退化如图。The effectiveness of the above data packet transmission method is illustrated with an example. Figure 3 shows a schematic diagram of data packet transmission in the traditional scheme. The connection method between the network nodes in Figure 3 is the same as that shown in Figure 1. For ease of illustration, the connection method between the network nodes is not shown in Figure 3. In the traditional scheme, the header of the data packet to be forwarded only carries the five-tuple information. After the computer device obtains the data packet, it usually directly determines the target network node of the next hop based on the five-tuple information. As shown in Figure 3, at a certain moment, the data source determines the target network node of the next hop 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 the data packet A, network node 110a determines the target network node of the next hop as network node 120a based on the five-tuple information, and forwards the data packet A to network node 120a. After receiving the data packet A, network node 120a determines the target network node of the next hop as network node 130a based on the five-tuple information. After receiving data packet A, it can be sent to the destination, thus completing the transmission of data packet A. In this transmission, the data transmission path is "Data source - Network node 110a - Network node 120a - Network node 130a - Destination". For the MPTCP multipath transmission scheme, this path is one of the sub-streams between the data source and destination. The communication link between the data source and destination 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 all sub-streams pass through the same network node (as shown in Figure 5). In this case, the multipath transmission performance and robustness are severely degraded. When the data packet transmission method provided in this application is adopted, 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 in each network node (as shown in Figure 6), thus avoiding the degradation of the multipath protocol as shown in the figure.
在一个实施例中,数据源端对历史路径标识信息进行修改,得到初始路径标识信息的过程具体包括以下步骤:获取与数据源端建立数据连接的各网络节点的负载信息;基于负载信息对历史路径标识信息进行修改,得到初始路径标识信息。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.
其中,与数据源端建立数据连接的网络节点是指,数据源端与数据目的端之间的通信链接对应的各个传输路径上的网络节点,如图1中的网络节点110a、网络节点110b、网络节点120a、网络节点120b、网络节点120c、网络节点120d、网络节点130a和网络节点130b。Among them, the network nodes that establish data connection with the data source end refer to the network nodes on each transmission path corresponding to the communication link between the data source end and the data destination end, such as network nodes 110a, 110b, 120a, 120b, 120c, 120d, 130a and 130b in Figure 1.
具体地,数据源端可以获取各个网络节点的负载信息,并根据各个网络节点的负载信息确定出各个传输路径的负载信息,从而基于各个传输路径的负载信息可以确定出各个传输路径中当前负载最小的传输路径,并确定当前负载最小的传输路径所对应的路径标识信息,并将历史路径标识信息修改为当前负载最小的传输路径所对应的路径标识信息,得到初始路径标识信息。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.
上述实施例中,数据源端通过获取与数据源端建立数据连接的各网络节点的负载信息;基于负载信息对历史路径标识信息进行修改,得到初始路径标识信息,从而可以使得在存在多条等价的传输路径时,每次数据传输所使用的传输路径都是负载均衡效果最优的传输路径,进而提高了数据包的传输效率。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.
在一个实施例中,计算机设备所确定的预设的路径确定规则为哈希路径确定规则,如图7所示,则计算机设备基于路径偏移值和路径哈希值确定下一跳的目标网络节点的过程包括以下步骤:In one embodiment, the preset path determination rule determined by the computer device is a hash path determination rule, as shown in Figure 7. 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:
S702,基于路径偏移值对路径哈希值进行调整。S702, adjusts the path hash value based on the path offset value.
具体地,计算机设备在得到路径偏移值和路径哈希值之后,获取预设的调整方向,并按照预设的调整方向基于路径偏移值对路径哈希值进行调整,得到调整后的路径哈希值。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.
其中,调整方向可以是正向调整或者负向调整,正向调整是指使得到的调整后路径哈希值,相对于原始的路径哈希值增大,负向调整是指使得到的调整后路径哈希值,相对于原始的路径哈希值减小。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.
在一个实施例中,预设的调整方向为正向调整方向,则计算机设备在得到路径偏移值和路径哈希值之后,对路径哈希值和路径偏移值进行求和,得到和值,并将该和值确定为调整后的路劲哈希值。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.
S704,获取下一跳的候选网络节点的节点总数量。S704, obtain the total number of candidate network nodes for the next hop.
其中,下一跳的候选网络节点,是指当前的网络节点的下一跳中可供选择用于数据包的转发的网络节点,参考如图1,若当前网络节点为数据源端,则下一跳的候选网络节点分别为网络节点110a和网络节点110b,节点总数量为2;若当前网络节点为网络节点110a,则下一跳的候选网络节点分别为网络节点120a、网络节点120b、网络节点120c和网络节点120d,节点总数量为4。Here, the candidate network nodes for the next hop refer to the network nodes that can be selected for packet forwarding among the next hops of the current network node. Referring to 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.
S706,根据节点总数量对调整后的路径哈希值进行取模,得到取模结果。S706, take the modulo of the adjusted path hash value based on the total number of nodes to obtain the modulo result.
具体地,计算机设备在得到调整后的路径哈希值和下一跳的候选节点的节点总数量之后,可以对调整后的路径哈希值取节点总数量的模,得到取模结果。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.
S708,基于取模结果从下一跳的候选网络节点中确定目标网络节点。S708 determines the target network node from the candidate network nodes of the next hop based on the modulo result.
具体地,计算机设备在得到取模结果之后,还可以获取各候选网络节点的节点标识,并将与取模结果匹配的节点标识所对应的候选网络节点确定为目标网络节点。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.
其中,各候选网络节点的节点标识是按照各候选网络节点的顺序进行编码得到的。例如,图1中的网络节点120中的四个网络节点按照顺序分别为,网络节点120a、网络节点120b、网络节点120c和网络节点120d,则可以按照该顺序对网络节点120a、网络节点120b、网络节点120c和网络节点120d进行编码得到网络节点120a对应的节点标识为1,网络节点120b对应的节点标识为2,网络节点120c对应的节点标识为3,网络节点120d对应的节点标识为4,若得到的取模结果为1,则确定网络节点120a为目标网络节点,若得到的取模结果为2,则确定网络节点120b为目标网络节点,若得到的取模结果为3,则确定网络节点120c为目标网络节点,若得到的取模结果为4,则确定网络节点120d为目标网络节点。The node identifiers of each candidate network node are obtained by encoding them in the order they appear. For example, the four network nodes in network node 120 in Figure 1 are network node 120a, network node 120b, network node 120c, and network node 120d in that order. We can encode these nodes in that order as follows: 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.
以下为一个实施例中确定目标网络节点的算法公式:The following is an algorithm formula for determining the target network node in one embodiment:
nextHOP=(hash+path_ID)modN (1)nextHOP=(hash+path_ID)modN (1)
其中,nextHOP为下一跳的目标网络节点的节点标识,hash为路径哈希值,path_ID为路径偏移值,mod表示取模,N为下一跳的候选网络节点的节点总数量。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.
上述实施例中,针对具有可编程能力的计算机设备,计算机设备基于路径偏移值对路径哈希值进行调整;获取下一跳的候选网络节点的节点总数量;根据节点总数量对调整后的路径哈希值进行取模,得到取模结果,从而可以基于取模结果快速地从下一跳的候选网络节点中确定目标网络节点,提高了目标网络节点的确定效率,进而提高了数据包的传输效率。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.
在一个实施例中,如图8所示,计算机设备所确定的预设的路径确定规则为查表路径确定规则,则计算机设备基于路径偏移值和路径哈希值确定下一跳的目标网络节点的过程包括以下步骤:In one embodiment, as shown in Figure 8, 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:
S802,获取下一跳的候选网络节点的节点总数量。S802, obtain the total number of candidate network nodes for the next hop.
其中,下一跳的候选网络节点,是指当前的网络节点的下一跳中可供选择用于数据包的转发的网络节点,参考如图1,若当前网络节点为数据源端,则下一跳的候选网络节点分别为网络节点110a和网络节点110b,节点总数量为2;若当前网络节点为网络节点110a,则下一跳的候选网络节点分别为网络节点120a、网络节点120b、网络节点120c和网络节点120d,节点总数量为4。Here, the candidate network nodes for the next hop refer to the network nodes that can be selected for packet forwarding among the next hops of the current network node. Referring to 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.
S804,根据节点总数量生成网络节点列表。S804 generates a list of network nodes based on the total number of nodes.
在一个实施例中,计算机设备在得到下一跳的候选网络节点的节点总数量之后,基于节点总数量生成各个网络节点的节点标识,并基于节点标识生成网络节点列表,该网络节点列表中的各个元素即为对应的网络节点的节点标识。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.
其中,各候选网络节点的节点标识是按照各候选网络节点的顺序进行编码得到的,节点标识的最大值不超过节点总数量。例如,图1中的网络节点120中的四个网络节点按照顺序分别为,网络节点120a、网络节点120b、网络节点120c和网络节点120d,则可以按照该顺序对网络节点120a、网络节点120b、网络节点120c和网络节点120d进行编码得到网络节点120a对应的节点标识为1,网络节点120b对应的节点标识为2,网络节点120c对应的节点标识为3,网络节点120d对应的节点标识为4,若得到的取模结果为1,则确定网络节点120a为目标网络节点,若得到的取模结果为2,则确定网络节点120b为目标网络节点,若得到的取模结果为3,则确定网络节点120c为目标网络节点,若得到的取模结果为4,则确定网络节点120d为目标网络节点。In this process, the node identifiers of each candidate network node are 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, the four network nodes in network node 120 in Figure 1 are network node 120a, network node 120b, network node 120c, and network node 120d in that order. The node identifiers for network node 120a, 120b, 120c, and 120d are encoded in this order as follows: node identifier 120a is 1, node identifier 120b is 2, node identifier 120c is 3, and node identifier 120d is 4. If the modulo result is 1, then network node 120a is determined to be the target network node; if the modulo result is 2, then network node 120b is determined to be the target network node; if the modulo result is 3, then network node 120c is determined to be the target network node; and if the modulo result is 4, then network node 120d is determined to be the target network node.
具体地,计算机设备在得到各个网络节点的节点标识之后,基于节点标识生成初始的网络节点行,该行中包含与节点总数量相同的列,并对该初始的网络节点行进行复制,复制的数量与节点总数量相同,得到一个“节点总数量”行ד节点总数量”列的初始网络节点表,然后对该初始网络节点表中的每一行进行循环左移,从而得到网络节点列表。其中,每一行左移的位数为当前的行号减1,也就是说,针对第m行,该行中每一列所对应的元素分别向左移的位数为m-1。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.
如图9所示,为一个实施例中生成网络节点列表的示意图,下一跳的候选网络节点的节点总数量为N,基于节点总数量N生成各个网络节点的节点标识依次为1、2、……、N-1、N,基于节点标识生成初始的网络节点行902,对初始的网络节点行902复制N份,得到N×N的初始网络节点表904,对初始网络节点表904中的每一行进行循环左移,从而得到网络节点列表906。其中,每一行左移的位数为当前的行号减1,也就是说,针对第m行,该行中每一列所对应的元素分别向左移的位数为m-1。Figure 9 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 to the left to obtain a network node list 906. The number of bits shifted to the 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 to the left by m-1 bits.
S806,基于路径哈希值在网络节点列表中确定目标列。S806, determine the target column in the network node list based on the path hash value.
在一个实例中,S806具体包括以下步骤:根据节点总数量对路径哈希值进行取模,得到取模结果;将网络节点表中与取模结果匹配的列作为目标列。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.
具体地,计算机设备在得到路径哈希值和下一跳的候选节点的节点总数量之后,可以对路径哈希值取节点总数量的模,得到取模结果,并将网络节点表中与取模结果匹配的列作为目标列。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.
例如,取模结果为k,则针对图9中的网络节点表,则将该网络节点表中的第k列作为目标列。For example, if the modulo result is k, then for the network node table in Figure 9, the kth column of the network node table is taken as the target column.
S808,基于路径偏移值从目标列中确定目标网络节点。S808 determines the target network node from the target column based on the path offset value.
具体地,计算机设备在确定出目标列之后,将目标列中与路径偏移值匹配的目标行所对应的节点标识确定为目标网络节点标识,并将该目标网络节点标识所对应的网络节点确定为目标网络节点。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.
例如,路径偏移值Path ID=j,则针对图9中的网络节点表,将该网络节点表中的第k列的第j行所对应的节点标识确定为目标网络节点标识,并将该目标网络节点标识所对应的网络节点确定为目标网络节点。For example, if the path offset value Path ID = j, then for the network node table in Figure 9, 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.
作为一个示例,对上述实施例进行说明,假设下一跳的候选网络节点为图1中的网络节点120a、网络节点120b、网络节点120c和网络节点120d,网络节点120a对应的节点标识为1,网络节点120b对应的节点标识为2,网络节点120c对应的节点标识为3,网络节点120d对应的节点标识为4,则可以生成图10所示的4×4初始网络节点表1002,对该初始网络节点表的各个行分别进行循环移位,其中,第一行循环移位的位数为0,第2行循环移位的位数为1,第3行循环移位的位数为2,第4行循环移位的位数为3,从而得到图10所示的4×4的网络节点表1004,若根据节点总数量4对路径哈希值进行取模,得到的取模结果为2,路径偏移值Path ID=3,则选取网络节点表1004的第2列第3行所对应的节点标识“4”作为目标网络节点标识,并将该目标网络节点标识“4”所对应的网络节点120d确定为下一跳的目标网络节点。As an example, the above embodiment will be explained. Assume the candidate network nodes for the next hop are network nodes 120a, 120b, 120c, and 120d in Figure 1. The node identifier corresponding to network node 120a is 1, the node identifier corresponding to network node 120b is 2, the node identifier corresponding to network node 120c is 3, and the node identifier corresponding to network node 120d is 4. Then, a 4×4 initial network node table 1002 as shown in Figure 10 can be generated. Each row of this initial network node table is then cyclically shifted, wherein the first row is cyclically shifted... The number of bits shifted in the ring is 0, the number of bits shifted in the second row is 1, the number of bits shifted in the third row is 2, and the number of bits shifted in the fourth row is 3, thus obtaining the 4×4 network node table 1004 shown in Figure 10. If the path hash value is moduloed according to the total number of nodes 4, the modulo result is 2, and the path offset value Path ID = 3, then the node identifier "4" corresponding to the third row of the second column 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.
需要说明的是,S602至S608所描述的基于查表路径确定规则确定目标网络节点的过程,可以等效为以下公式(2):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):
nextHOP=(hashmodN+path_ID)modN (2)nextHOP=(hashmodN+path_ID)modN (2)
其中,nextHOP为下一跳的目标网络节点的节点标识,hash为路径哈希值,path_ID为路径偏移值,mod表示取模,N为下一跳的候选网络节点的节点总数量。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.
上述实施例中,针对不具备可编程能力的计算机设备,计算机设备通过获取下一跳的候选网络节点的节点总数量;根据节点总数量生成网络节点列表;基于路径哈希值在网络节点列表中确定目标列;基于路径偏移值从目标列中确定目标网络节点,从而可以在不更改计算机设备的芯片的前提下,也可以基于路径标识信息实现下一跳的网络节点的偏移,从而及时且有效地修改传输路径以绕过该故障的网络节点,提高了数据包的传输效率。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.
本申请还提供一种应用场景,该应用场景应用上述的数据包的传输方法。具体地,该数据包的传输方法应用在如图1所示系统中,该系统为两层Clos拓扑,图1中的网络节点110和网络节点130为接入设备(LA),网络节点130为核心设备,图1所示的系统中,每个设备(网络节点)的故障率分别为:1/4核心设备故障、1/2接入设备故障。此外,配置同层的设备的Hash算法、offset值、seed参数、ECMP(等价多路径)group成员排序都相同,以保证相同五元组的数据包,在同层的不同设备上,Hash结果相同,并且,针对可编程的设备,修改其bond_xmit_hash函数,使得在原Hash结果的基础上增加IP TOS字段值。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 the system shown in Figure 1, which is a two-layer Clos topology. Network node 110 and network node 130 in Figure 1 are access devices (LAs), and network node 130 is a core device. In the system shown in Figure 1, the failure rates of each device (network node) are: 1/4 core device failure and 1/2 access device failure. Furthermore, the hash algorithm, offset value, seed parameter, and ECMP (Equal Equivalent Multipath) group member order are configured to be the same for devices at the same layer to ensure that data packets with the same five-tuple have the same hash result on different devices at the same layer. Moreover, for programmable devices, the bond_xmit_hash function is modified to add an IP TOS field value to the original hash result.
场景1:针对TCP单路径传输。Scenario 1: For TCP single-path transmission.
计算机设备(数据源端或网络节点)获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点;将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。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.
传统方案中,设备故障时通过改变源端口号的方法实现路径切换绕过故障点的成功率如下表所示,而采用申请提供的数据包传输方法,基于改变Path ID的方法换路,可以实现1次100%成功,成功所需换路次数的数学期望为1。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 attempts required for success is 1.
场景2:针对MPTCP多路径传输。Scenario 2: For MPTCP multipath transmission.
计算机设备(数据源端或网络节点)获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点;将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。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.
为了测试该方案在真实网络环境下的表现,我们用4组主机对各搭建2.5k个多路径协议链接,每个链接下维护4条子流。为了对比传统多路径协议和基于Hash偏移方案(传统MPTCP)的多路径协议的鲁棒性,我们分别观察在1/4和1/2核心设备故障情况下,两种方案的存活链接数量。如图11所示,1/4核心设备故障情况下,传统多路径协议和基于Hash偏移的多路径协议的链接存活率分别为96%和100%;1/2核心设备故障情况下,两种方案存活分别为48.1%和74.7%。(因为测试时使用的是基于DPDK的自研协议栈,往返路径的源、目的端口号非对称,导致同子流的往返路径不一定经过同一个核心设备,因此基于Hash偏移方案的多路径传输协议在1/2故障时的存活率不是100%)。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, with four sub-streams maintained under each link. To compare the robustness of the traditional multipath protocol and the multipath protocol based on the hash offset scheme (traditional MPTCP), we observed the number of surviving links for both schemes under 1/4 and 1/2 core device failure conditions. As shown in Figure 11, under the 1/4 core device failure condition, the link survival rates of the traditional multipath protocol and the hash offset-based multipath protocol were 96% and 100%, respectively; under the 1/2 core device failure condition, the survival rates of the two schemes were 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 paths are asymmetrical, which means that the round-trip paths 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% under 1/2 failure conditions.)
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。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.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的数据包的传输方法的数据包的传输装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个数据包的传输装置实施例中的具体限定可以参见上文中对于数据包的传输方法的限定,在此不再赘述。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.
在一个实施例中,如图12所示,提供了一种数据包的传输装置,包括:数据包获取模块1202、路径哈希值确定模块1204、路径偏移值确定模块1206、目标网络节点确定模块1208和数据包转发模块1210,其中:In one embodiment, as shown in FIG12, 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:
数据包获取模块1202,用于获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息。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.
路径哈希值确定模块1204,用于基于五元组信息确定路径哈希值。The path hash value determination module 1204 is used to determine the path hash value based on the quintuple information.
路径偏移值确定模块1206,用于根据路径标识信息确定路径偏移值。The path offset value determination module 1206 is used to determine the path offset value based on the path identification information.
目标网络节点确定模块1208,用于基于路径偏移值和路径哈希值确定下一跳的目标网络节点。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.
数据包转发模块1210,用于将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发。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.
上述实施例中,通过获取待转发的数据包,数据包的包头携带五元组信息和路径标识信息;基于五元组信息确定路径哈希值;根据路径标识信息确定路径偏移值;基于路径偏移值和路径哈希值确定下一跳的目标网络节点;将数据包传输至下一跳的目标网络节点,以使下一跳的目标网络节点对数据包进行路由转发,从而在某个网络节点发生故障时,通过在数据包中封装路径标识信息,使得可以基于路径标识信息实现下一跳的网络节点的偏移,从而及时且有效地修改传输路径以绕过该故障的网络节点,提高了数据包的传输效率。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.
在其中一个实施例中,如图13所示,该装置还包括:待转发数据获取模块1212、路径标识信息确定模块1214和数据包封装模块1216,其中:In one embodiment, as shown in FIG13, the device further includes: a data acquisition module 1212 to be forwarded, a path identification information determination module 1214, and a data packet encapsulation module 1216, wherein:
待转发数据获取模块1212,用于获取待转发数据、待转发数据对应的五元组信息和初始路径标识信息;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;
路径标识信息确定模块1214,用于若基于五元组信息和初始路径标识信息确定的传输路径存在故障,对初始路径标识信息进行调整,得到路径标识信息;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.
数据包封装模块1216,用于对五元组信息、路径标识信息和待转发数据进行封装,得到待转发的数据包。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.
在其中一个实施例中,待转发数据获取模块1212,还用于:获取待转发数据和待转发数据对应的五元组信息;当数据源端上一时刻发送的业务数据的目的接收端,和待转发数据的目的接收端相同时,获取业务数据对应的历史路径标识信息;当传输系统采用的是单路径传输协议时,将历史路径标识信息确定为待转发数据的初始路径标识信息;当传输系统采用的是多路径传输协议时,对历史路径标识信息进行修改,得到初始路径标识信息。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.
在其中一个实施例中,待转发数据获取模块1212,还用于:获取与数据源端建立数据连接的各网络节点的负载信息;基于负载信息对历史路径标识信息进行修改,得到初始路径标识信息。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.
在其中一个实施例中,路径标识信息确定模块1214,还用于:若基于五元组信息和初始路径标识信息确定的传输路径不存在故障,则将初始路径标识信息作为路径标识信息与五元组信息、待转发数据进行封装,得到待转发的数据包。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.
在其中一个实施例中,路径哈希值确定模块1204,还用于:将五元组信息进行向量化,得到路径向量;通过哈希函数对路径向量进行哈希运算,得到路径哈希值。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.
在其中一个实施例中,数据包封装模块1216,还用于:基于五元组信息和路径标识信息生成包头;包头的服务类型字段配置为路径标识信息;基于包头对待转发数据进行封装,得到待转发的数据包。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.
在其中一个实施例中,目标网络节点确定模块1208,还用于:基于路径偏移值对路径哈希值进行调整;获取下一跳的候选网络节点的节点总数量;根据节点总数量对调整后的路径哈希值进行取模,得到取模结果;基于取模结果从下一跳的候选网络节点中确定目标网络节点。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.
在其中一个实施例中,目标网络节点确定模块1208,还用于:获取下一跳的候选网络节点的节点总数量;根据节点总数量生成网络节点列表;基于路径哈希值在网络节点列表中确定目标列;基于路径偏移值从目标列中确定目标网络节点。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.
在其中一个实施例中,目标网络节点确定模块1208,还用于:根据节点总数量对路径哈希值进行取模,得到取模结果;将网络节点表中与取模结果匹配的列作为目标列。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.
上述数据包的传输装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。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.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图14所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储待传输的数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种数据包的传输方法。In one embodiment, a computer device, which may be a server, is provided, and its internal structure is shown in Figure 14. The computer device includes a processor, memory, input/output interfaces (I/O), and a communication interface. The processor, memory, and I/O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I/O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device stores data to be transmitted. The I/O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data packet transmission method.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图15所示。该计算机设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种数据包的传输方法。该计算机设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置,显示屏可以是液晶显示屏或电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram is shown in Figure 15. The computer device includes a processor, memory, input/output interface, communication interface, display unit, and input device. The processor, memory, and input/output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input/output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input/output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device 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.
本领域技术人员可以理解,图14、图15中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structures shown in Figures 14 and 15 are merely block diagrams of some structures related to the present application and do 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 shown in the figures, or combine certain components, or have different component arrangements.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。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.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。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.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。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.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。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.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. 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.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。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.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。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 (15)
Publications (1)
| Publication Number | Publication Date |
|---|---|
| HK40091138A true HK40091138A (en) | 2023-12-01 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10693765B2 (en) | Failure protection for traffic-engineered bit indexed explicit replication | |
| US9083645B2 (en) | Systems and methods providing reverse path forwarding compliance for a multihoming virtual routing bridge | |
| US11075986B2 (en) | Weighted load balancing using scaled parallel hashing | |
| US9246810B2 (en) | Hash-based load balancing with per-hop seeding | |
| CN106464585B (en) | The method and system of forwarding state for compressed data network | |
| CN113973077A (en) | A scalable network traffic engineering platform for improving network resiliency in cloud applications | |
| US9608913B1 (en) | Weighted load balancing in a multistage network | |
| US9692686B2 (en) | Method and system for implementing a multi-chassis link aggregation group in a network | |
| CN107579923A (en) | The balancing link load method and SDN controllers of a kind of SDN | |
| CN111245722B (en) | SDN data center network flow forwarding method based on genetic algorithm | |
| JP7235804B2 (en) | Routing information transmission method, packet transmission method, and related equipment | |
| US20210306251A1 (en) | Aggregated bit index explicit replication networking system | |
| US20140040477A1 (en) | Connection mesh in mirroring asymmetric clustered multiprocessor systems | |
| CN117376285A (en) | Message forwarding method, device, electronic equipment and storage medium | |
| CN116527575B (en) | Data packet transmission methods, devices, computer equipment, and storage media | |
| CN116939059A (en) | Data transmission method based on data center network and data center system | |
| US20120287946A1 (en) | Hash-Based Load Balancing with Flow Identifier Remapping | |
| US10700893B1 (en) | Multi-homed edge device VxLAN data traffic forwarding system | |
| US20200287844A1 (en) | Selection of member ports in a link aggregation group | |
| US8634417B2 (en) | Method and apparatus providing selective flow redistribution across Multi Link Trunk/Link Aggregation Group (MLT/LAG) after port member failure and recovery | |
| WO2024104007A1 (en) | Packet transmission method and apparatus, storage medium and electronic device | |
| CN107135151A (en) | File transmitting method and device | |
| WO2025228008A1 (en) | Multi-path transmission method and apparatus, electronic device, computer readable storage medium, and computer program product | |
| HK40091138A (en) | Method, apparatus, computer device and storage medium for transmitting data packet | |
| US10491511B1 (en) | Feedback-based packet routing system |