CN107342939A - The method and apparatus for transmitting data - Google Patents
The method and apparatus for transmitting data Download PDFInfo
- Publication number
- CN107342939A CN107342939A CN201610284852.7A CN201610284852A CN107342939A CN 107342939 A CN107342939 A CN 107342939A CN 201610284852 A CN201610284852 A CN 201610284852A CN 107342939 A CN107342939 A CN 107342939A
- Authority
- CN
- China
- Prior art keywords
- network node
- message
- node
- network
- link
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/20—Hop count for routing purposes, e.g. TTL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及通信领域,特别涉及通信领域中的传输数据的方法和装置。The present invention relates to the field of communication, in particular to a method and device for transmitting data in the field of communication.
背景技术Background technique
多协议标签交换(Multi-Protocol Label Switching,简称“MPLS”)技术是下代Internet宽带网络技术,MPLS技术将数据的路由和转发相分离,利用约束路由建立显式路径,进而建立标签交换路径(Label Switched Path,简称“LSP”),分段路由(Segment Routing,简称“SR”)是一种MPLS技术,SR主要包括节点标签和链路标签,节点标签是每一个节点计算到达目标节点的最短路径信息,并且将当前节点和下一跳信息下发到转发表中,每个节点在各自的转发表中保存所有节点标签,根据最短路径信息和节点标签最终可以到达目标节点,节点标签采用最短路径优先算法,但由于无法平衡网络负载,常常会导致网络中某些链路负荷过重,而另一些链路资源没有充分利用,从而使原本能满足流量需求的网络发生拥塞。为了避免网络发生拥塞,引入了链路标签,链路标签是每个节点为本地所有链路分配的标签,每个节点的转发表只保存本节点的链路标签,并且每个节点将链路标签根据内部网关协议(interior Gateway Protocols,简称“IGP”)广播链路标签,以便于源节点可以获得每个节点的链路标签,源节点在获得每个节点的链路标签后为根据每个节点的流量信息报文确定一条转发路径,并在报文的报文头中增加链路标签来指示网络节点对报文的转发,节点接收到报文后,根据顶层的链路标签找到出口,并且将顶层的链路标签即本地标签剥掉,直到目的网络节点时,报文头中的所有链路标签都会被剥掉。互联网协议第六版(InternetProtocol Version 6,简称“IPv6”)网络也是通过类似链路标签的方式传输数据。但是由于互联网协议第四版(Internet Protocol Version 4,简称“IPv4”)网络传输数据时,数据的报文头包括的地址只有源地址和目的地址,无法通过剥掉每层的地址的方式来传输数据,数据在IPv4网络中传输具有一定的局限性。Multi-Protocol Label Switching (MPLS for short) technology is the next-generation Internet broadband network technology. MPLS technology separates data routing and forwarding, uses constrained routing to establish explicit paths, and then establishes label switching paths ( Label Switched Path, referred to as "LSP"), segment routing (Segment Routing, referred to as "SR") is an MPLS technology, SR mainly includes node labels and link labels, the node label is the shortest route calculated by each node to reach the target node Path information, and send the current node and next hop information to the forwarding table. Each node saves all node labels in its own forwarding table. According to the shortest path information and node labels, it can finally reach the target node. The node label adopts the shortest Path priority algorithm, but due to the inability to balance the network load, some links in the network are often overloaded, while other link resources are not fully utilized, thus congesting the network that could originally meet the traffic demand. In order to avoid network congestion, a link label is introduced. The link label is the label allocated by each node for all local links. The forwarding table of each node only saves the link label of this node, and each node will link The label broadcasts the link label according to the Interior Gateway Protocols ("IGP" for short), so that the source node can obtain the link label of each node. After the source node obtains the link label of each node, it The traffic information message of the node determines a forwarding path, and adds a link label in the message header of the message to instruct the network node to forward the message. After receiving the message, the node finds the exit according to the top link label. And the link label at the top layer, that is, the local label, is stripped off until reaching the destination network node, all link labels in the packet header will be stripped off. Internet Protocol Version 6 (Internet Protocol Version 6, referred to as "IPv6") network also transmits data in a manner similar to link labels. However, when Internet Protocol Version 4 (Internet Protocol Version 4, referred to as "IPv4") network transmits data, the address included in the header of the data is only the source address and the destination address, which cannot be transmitted by stripping the address of each layer. Data, data transmission in IPv4 network has certain limitations.
发明内容Contents of the invention
本发明实施例提供的传输数据的方法和装置,可以提高数据传输的适用范围。The method and device for transmitting data provided by the embodiments of the present invention can improve the scope of application of data transmission.
第一方面,提供了一种处理数据的方法,该方法包括:第一网络节点接收报文,该报文的报文头携带指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该报文的转发路径上的N个网络节点,N为大于或等于2的整数;该第一网络节点确定该第一网络节点的节点编号;该第一网络节点根据该报文的报文头,确定与该第一网络节点的节点编号对应的第一目标链路编号;该第一网络节点在该第一目标链路编号对应的链路上转发该报文。In the first aspect, a method for processing data is provided, the method includes: a first network node receives a message, and the message header of the message carries indication information, and the indication information is used to indicate each node in N node numbers The target link number corresponding to the number, the N node numbers correspond to N network nodes on the forwarding path of the message, and N is an integer greater than or equal to 2; the first network node determines the node of the first network node number; the first network node determines the first target link number corresponding to the node number of the first network node according to the message header of the message; the first network node determines the first target link number corresponding to the first target link number The message is forwarded on the link.
这样,N个节点编号可以与报文的转发路径上的N个网络节点一一对应,N个节点编号与N个目标链路编号一一对应,第一网络节点接收到该报文后,第一网络节点根据报文头,确定自身的节点编号,并确定与自身节点编号对应的第一目标链路编号,这样,能够根据网络节点的节点编号确定转发报文的目标链路编号,可以提高数据传输的适用范围,例如可以在IPv4网络中传输。In this way, the N node numbers can correspond to the N network nodes on the forwarding path of the message one by one, and the N node numbers correspond to the N target link numbers one to one. After the first network node receives the message, the second A network node determines its own node number according to the message header, and determines the first target link number corresponding to its own node number, like this, can determine the target link number of forwarding message according to the node number of the network node, can improve The scope of application of data transmission, for example, can be transmitted in IPv4 network.
具体而言,N个网络节点包括源网络节点和目标网络节点,N个网络节点中的每个网络节点在接收到报文时,报文头包括指示信息,该指示信息可以用于指示网络节点的节点编号与目标链路编号的对应关系,也可以指示每个目标链路编号占用报文头字节的位置,每个网络节点可以根据报文头中的指示信息来确定自身编号对应的目标链路编号,并根据该指示信息指示的每个网络节点的节点编号占用报文头字节位置来查找每个网络节点的目标链路编号,在查找到的目标链路编号对应的链路上传输数据,报文头中的指示信息在整个报文的转发过程中都存在,避免通过剥离每层地址来传输数据,即使只有报文的源地址和目的地址,也可以通过指示信息来传输报文,避免了报文在网络传输中的局限性,提高数据传输的适用范围,如可以适用于IPv4网络的数据传输。Specifically, the N network nodes include a source network node and a target network node. When each network node in the N network nodes receives a message, the message header includes indication information, and the indication information can be used to indicate that the network node The corresponding relationship between the node number and the target link number can also indicate that each target link number occupies the position of the packet header byte. Each network node can determine the target corresponding to its own number according to the indication information in the packet header. Link number, and according to the node number of each network node indicated by the indication information occupying the header byte position to find the target link number of each network node, on the link corresponding to the found target link number To transmit data, the instruction information in the message header exists during the entire message forwarding process, avoiding the transmission of data by stripping each layer of address, even if there is only the source address and destination address of the message, the message can also be transmitted through the instruction information The text avoids the limitation of the message in the network transmission, and improves the application scope of the data transmission, for example, it can be applicable to the data transmission of the IPv4 network.
可选地,该指示信息可以指示每个网络节点的目标链路编号占用报文头相同数量的字节,并且N个网络节点的目标链路编号在报文头中按序排列;可选地,每个网络节点根据自身的节点编号可以按顺序查找与自身节点编号对应的目标链路编号。Optionally, the indication information may indicate that the target link numbers of each network node occupy the same number of bytes in the message header, and the target link numbers of the N network nodes are arranged sequentially in the message header; optionally , each network node can sequentially search for the target link number corresponding to its own node number according to its own node number.
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头不同数量的字节,可选地,每个网络节点根据自身的节点编号和指示信息查找与自身节点编号对应的目标链路编号。Optionally, the indication information may indicate that the target link number corresponding to each network node may occupy a different number of bytes in the packet header. The target link number corresponding to the number.
可选地,该报文的报文头除了携带指示信息之外,报文头还携带N个节点编号,这样,每个网络节点接收到报文后,确地自身的节点编号,并通过查找报文中自身节点编号,查找到自身节点编号后,查找与自身节点编号对应的目标链路编号,在目标链路编号对应的链路上转发报文,这样,报文头中的目标链路编号可以不按照顺序存储,可以通过查找节点编号与目标链路编号的对应关系来确定目标链路编号。Optionally, in addition to carrying the indication information, the message header of the message also carries N node numbers, so that after each network node receives the message, it can accurately determine its own node number, and search The self-node number in the message, after finding the self-node number, finds the target link number corresponding to the self-node number, and forwards the message on the link corresponding to the target link number, so that the target link in the message header The numbers can be stored out of order, and the target link number can be determined by looking up the corresponding relationship between the node number and the target link number.
其中,该节点编号用于标识网络节点,例如,该节点编号可以用于标识网络节点为转发路径上的第几跳,该节点编号也可以为网络节点中报文的生存时间与最大转发节点个数求余的结果,等等。该节点编号也可以是根据其他方式确定,这里不作限制。同一个网络节点的节点编号可能在传输不同的报文是不同的。网络节点可以根据自身的节点编号确定转发报文的目标链路编号,进一步在确定的目标链路编号对应的链路上转发报文。Wherein, the node number is used to identify the network node. For example, the node number can be used to identify the hop of the network node on the forwarding path. The node number can also be the survival time of the message in the network node and the maximum number of forwarding nodes The result of the remainder of the number, and so on. The node number may also be determined in other ways, which is not limited here. The node number of the same network node may be different when transmitting different messages. The network node may determine the target link number for forwarding the message according to its own node number, and further forward the message on the link corresponding to the determined target link number.
可选地,该第一网络节点可以根据该报文,确定自身的节点编号,例如第一网络节点可以根据该报文的报文头的生存时间,确定自身的节点编号;又例如,第一网络节点可以根据该报文头中该报文的当前传输跳数,确定自身的节点编号。Optionally, the first network node may determine its own node number according to the message, for example, the first network node may determine its own node number according to the survival time of the message header of the message; The network node can determine its own node number according to the current transmission hop count of the message in the message header.
在第一方面的第一种可能的实现方式中,在该第一网络节点接收报文之前,该方法还包括:该第一网络节点向第一设备发送该第一网络节点的至少一个链路编号,其中,该至少一个链路编号包括该第一目标链路编号,并且该第一目标链路编号在该报文头中所占的字节大小是根据该至少一个链路编号中最大的链路编号确定的。In a first possible implementation manner of the first aspect, before the first network node receives the message, the method further includes: the first network node sends at least one link link of the first network node to the first device number, wherein the at least one link number includes the first target link number, and the byte size occupied by the first target link number in the packet header is based on the largest of the at least one link number The link number is determined.
可选地,第一目标链路编号在该报文头中所占的字节大小可以为该至少一个链路编号中最大的链路编号所占的字节大小。Optionally, the byte size occupied by the first target link number in the packet header may be the byte size occupied by the largest link number among the at least one link number.
这样,第一目标链路编号在报文头所占的字节大小根据实际的需求大小确定,而现有技术中的每个链路标签占用固定的32bit,路径上所有的链路标签都封装在报文头中,导致链路标签占用大量的报文空间,传输效率低,本发明实施例根据实际字节的需求大小确定第一目标链路编号所占的字节大小,这样,能够降低占用报文的空间,进一步提高传输数据的效率。In this way, the byte size occupied by the first target link number in the message header is determined according to the actual demand size, while each link label in the prior art occupies a fixed 32 bits, and all link labels on the path are encapsulated In the message header, the link label takes up a large amount of message space, and the transmission efficiency is low. The embodiment of the present invention determines the byte size occupied by the first target link number according to the demand size of the actual byte, so that it can reduce Occupies the space of the message to further improve the efficiency of data transmission.
结合第一方面的上述可能的实现方式,在第一方面的第二种可能的实现方式中,该报文的报文头还携带:该报文的生存时间(Time to Live,简称“TTL”);在该第一网络节点确定该第一网络节点的节点编号之前,该方法还包括:该第一网络节点接收第一设备发送的最大转发节点个数L,该L为大于或等于N的整数;该第一网络节点确定该第一网络节点的节点编号,包括:该第一网络节点根据该L和该报文头中携带的该TTL,确定该第一网络节点的节点编号。In combination with the above possible implementation of the first aspect, in the second possible implementation of the first aspect, the message header of the message also carries: the time to live (Time to Live, "TTL" for short) of the message ); before the first network node determines the node number of the first network node, the method further includes: the first network node receives the maximum number of forwarding nodes L sent by the first device, and the L is greater than or equal to N An integer; the first network node determining the node number of the first network node includes: the first network node determining the node number of the first network node according to the L and the TTL carried in the packet header.
具体地,每个网络节点都能收到第一设备发送的最大转发节点个数L,并且在接收到报文时,报文头中包括报文的生存时间TTL,每个网络节点根据L和TTL确定自身的节点编号,例如,可以通过TTL对L求余获得自身的编号,也可以通过对L求余加某一个特定的值来获得自身的编号,但若第一设备如何生成每个网络节点的节点编号,则每个网络节点如何获取自身的节点编号,即第一设备生成节点编号的方式与每个网络节点生成自身的节点编号的方式相同,这样,进一步保证报文能够通过正确的转发路径转发。Specifically, each network node can receive the maximum number of forwarding nodes L sent by the first device, and when receiving the message, the message header includes the time to live TTL of the message, and each network node according to L and TTL determines its own node number. For example, it can obtain its own number by calculating the remainder of L through TTL, or by adding a specific value to L to obtain its own number. However, if the first device how to generate each network The node number of the node, how each network node obtains its own node number, that is, the way the first device generates the node number is the same as the way each network node generates its own node number, so as to further ensure that the message can pass through the correct Forwarding path forwarding.
结合第一方面的上述可能的实现方式,在第一方面的第三种可能的实现方式中,该第一网络节点根据L和报文头中携带的该TTL,确定该第一网络节点的节点编号,包括:该第一网络节点将TTL对L的求余结果确定为该第一网络节点的节点编号。With reference to the above possible implementation of the first aspect, in a third possible implementation of the first aspect, the first network node determines the node of the first network node according to L and the TTL carried in the packet header. The number includes: the first network node determines the result of the remainder of TTL to L as the node number of the first network node.
具体地,通过将每个网络节点的报文中的TTL对L的求余结果确定为每个网络节点自身的节点编号,由于每相邻的两个网络节点之间的TTL相差为1,即若第一个网络节点的TTL为T0则,则每经过一个网络节点,该报文的生存时间的数值减1,这样,能使得任意两个网络节点的节点编号都不相同,即每个节点编号对应一个目标链路编号,不可能存在两个相同的节点编号对应两个目标链路编号,可以确保在正确的目标链路编号对应的链路上传输报文,进一步提高了传输数据的可靠性。Specifically, by determining the result of the remainder of the TTL in the message of each network node to L as the node number of each network node itself, since the TTL difference between every two adjacent network nodes is 1, that is If the TTL of the first network node is T0, the value of the time-to-live of the message will be reduced by 1 every time it passes through a network node. In this way, the node numbers of any two network nodes can be different, that is, each node The number corresponds to a target link number, and it is impossible for two identical node numbers to correspond to two target link numbers, which can ensure that the message is transmitted on the link corresponding to the correct target link number, further improving the reliability of the transmitted data sex.
结合第一方面的上述可能的实现方式,在第一方面的第四种可能的实现方式中,该报文的报文头还携带:该报文的当前传输跳数;该第一网络节点确定该第一网络节点的节点编号,包括:该第一网络节点将该报文头中的当前传输跳数的值确定为该第一网络节点的节点编号。In combination with the above possible implementation of the first aspect, in the fourth possible implementation of the first aspect, the header of the message also carries: the current transmission hop count of the message; the first network node determines The node number of the first network node includes: the first network node determines the value of the current transmission hop count in the packet header as the node number of the first network node.
具体地,报文每经过一个网络节点,报文头中的当前传输跳数都会增加1,当第一网络节点接收到报文时,将报文头中的当前传输跳数确定为自身的节点编号,若第一网络节点是N个网络节点中的第一个网络节点,即第一个网络节点为源网络节点时,第一个网络节点接收到报文的报文头中的当前传输跳数的值为1,第一个网络节点就会查找节点编号1对应的目标链路编号,将高报文通过节点编号为1对应的目标链路编号的链路上转发报文。Specifically, every time a message passes through a network node, the current transmission hop number in the message header will increase by 1, and when the first network node receives the message, it will determine the current transmission hop number in the message header as its own node If the first network node is the first network node among the N network nodes, that is, when the first network node is the source network node, the first network node receives the current transmission hop in the message header of the message If the value of the number is 1, the first network node will search for the target link number corresponding to node number 1, and forward the message through the link whose node number is the target link number corresponding to 1.
结合第一方面的上述可能的实现方式,在第一方面的第五种可能的实现方式中,在该第一网络节点在该第一目标链路编号对应的链路上转发该报文之前,该方法还包括:该第一网络节点将该报文头中的当前传输跳数的值更新为该第一网络节点的节点编号加1。With reference to the foregoing possible implementation of the first aspect, in a fifth possible implementation of the first aspect, before the first network node forwards the packet on the link corresponding to the first target link number, The method further includes: the first network node updating the value of the current transmission hop count in the message header to be the node number of the first network node plus 1.
每个网络节点在接收到报文后,并根据报文的报文头确定自身的节点编号后,将报文头中的当前传输跳数的值更新为自身的节点编号加1,以便于下一个网络节点接收到报文后,根据该更新后的当前传输跳数确定自身的节点编号。After each network node receives the message and determines its own node number according to the message header of the message, it updates the value of the current transmission hop count in the message header to its own node number plus 1, so as to facilitate downloading After receiving the message, a network node determines its own node number according to the updated current transmission hop count.
结合第一方面的上述可能的实现方式,在第一方面的第六种可能的实现方式中,在第一网络节点接收报文之前,该方法还包括:该第一网络节点向第一设备发送当前流量信息,以便于该第一设备根据该当前流量信息确定该转发路径。With reference to the above possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, before the first network node receives the packet, the method further includes: the first network node sends to the first device current flow information, so that the first device determines the forwarding path according to the current flow information.
第二方面,提供了一种传输数据的方法,该方法包括:第一设备确定报文的转发路径,该转发路径包括N个网络节点,N为大于或等于2的整数;该第一设备确定该转发路径的指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该N个网络节点,该报文的报文头携带该转发路径的指示信息。In a second aspect, a method for transmitting data is provided. The method includes: a first device determines a forwarding path of a message, the forwarding path includes N network nodes, and N is an integer greater than or equal to 2; the first device determines The indication information of the forwarding path, the indication information is used to indicate the target link number corresponding to each node number in the N node numbers, the N node numbers correspond to the N network nodes, and the message header of the message carries The indication information of the forwarding path.
可选地,第一设备确定报文的转发路径之后,确定该转发路径的指示信息,该指示信息用于指示每个网络节点编号对应的目标链路编号,指示信息携带于报文的报文头中在每个网络节点处进行转发,可选地,每个网络节点编号对应的目标链路编号可以按顺序占用预定义的报文头的字节位置,网络节点接收到该报文时,确定自身的节点编号,并按顺序查找自身的节点编号占用预定义的报文头字节位置对应的目标链路编号,并在查找到的目标链路编号对应的链路上转发报文。Optionally, after the first device determines the forwarding path of the message, it determines the indication information of the forwarding path, the indication information is used to indicate the target link number corresponding to each network node number, and the indication information is carried in the message of the message The header is forwarded at each network node. Optionally, the target link number corresponding to each network node number can occupy the byte position of the predefined message header in order. When the network node receives the message, Determine its own node number, and search in order for its own node number to occupy the target link number corresponding to the predefined packet header byte position, and forward the message on the link corresponding to the found target link number.
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头相同的字节大小,每个网络节点的目标链路编号占用报文头的预定义的字节位置。Optionally, the indication information may indicate that the target link number corresponding to each network node can occupy the same byte size of the message header, and the target link number of each network node occupies a predefined byte position in the message header .
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头不同的字节大小,可选地,每个网络节点根据自身的节点编号和指示信息查找与自身节点编号对应的目标链路编号。Optionally, the indication information may indicate that the target link number corresponding to each network node may occupy a different byte size of the packet header. The target link number corresponding to the number.
可选地,该报文的报文头除了携带指示信息之外,报文头还携带N个节点编号,这样,每个网络节点接收到报文后,确地自身的节点编号,并通过查找报文中自身节点编号,查找到自身节点编号后,查找与自身节点编号对应的目标链路编号,在目标链路编号对应的链路上转发报文,这样,报文头中的目标链路编号可以不按照顺序存储,可以通过查找节点编号与目标链路编号的对应关系来确定目标链路编号。Optionally, in addition to carrying the indication information, the message header of the message also carries N node numbers, so that after each network node receives the message, it can accurately determine its own node number, and search The self-node number in the message, after finding the self-node number, finds the target link number corresponding to the self-node number, and forwards the message on the link corresponding to the target link number, so that the target link in the message header The numbers can be stored out of order, and the target link number can be determined by looking up the corresponding relationship between the node number and the target link number.
在第二方面的第一种可能的实现方式中,在该第一设备确定该转发路径的指示信息之前,该方法还包括:该第一设备获取该N个网络节点中的第i个网络节点的至少一个链路编号;该第一设备确定该转发路径的指示信息,包括:该第一设备根据该转发路径,在该第i个网络节点的至少一个链路编号中确定该第i个网络节点的目标链路编号,i为大于0且小于或等于N的整数。In a first possible implementation manner of the second aspect, before the first device determines the indication information of the forwarding path, the method further includes: the first device obtains the i-th network node among the N network nodes at least one link number of the i-th network node; the first device determining the indication information of the forwarding path includes: the first device determines the i-th network in at least one link number of the i-th network node according to the forwarding path The target link number of the node, i is an integer greater than 0 and less than or equal to N.
具体地,每个网络节点都会将自身的至少一个链路编号发送给第一设备,当第一设备确定转发路径后,根据每个网络节点发送给第一设备的至少一个链路编号来确定用于转发报文的目标链路编号,这样,可以确定整个转发路径上所有网络节点的目标链路编号。Specifically, each network node sends at least one link number of itself to the first device, and after the first device determines the forwarding path, it determines the link number to be used according to at least one link number sent by each network node to the first device. In this way, the target link numbers of all network nodes on the entire forwarding path can be determined.
结合第二方面的上述可能的实现方式,在第二方面的第二种可能的实现方式中,在该第一设备获取该N个网络节点中的第i个网络节点的至少一个链路编号之后,该方法还包括:该第一设备根据该i个网络节点的至少一个链路编号中最大的链路编号,确定该第i个网络节点的目标链路编号在该报文中所占的字节大小。With reference to the above possible implementation of the second aspect, in a second possible implementation of the second aspect, after the first device acquires at least one link number of the i-th network node among the N network nodes , the method further includes: the first device determines, according to the largest link number among the at least one link number of the i network nodes, the number of characters occupied by the target link number of the i-th network node in the message section size.
可选地,该第一设备可以将每个网络节点发送的至少一个链路编号中最大的链路编号所占的字节确定为每个网络节点的目标链路编号在该报文中所占的字节。Optionally, the first device may determine the byte occupied by the largest link number in the at least one link number sent by each network node as the target link number of each network node in the message. bytes.
结合第二方面的上述可能的实现方式,在第二方面的第三种可能的实现方式中,在该第一设备确定该转发路径的指示信息之前,该方法还包括:该第一设备根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L,其中,该L为大于或等于N的整数;该第一设备确定该转发路径的指示信息,包括:该第一设备根据该L以及该N个网络节点中每个网络节点对应的该报文的生存时间,确定该每个网络节点的节点编号,该第一设备确定与该每个网络节点的节点编号对应的目标链路编号。With reference to the above possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, before the first device determines the indication information of the forwarding path, the method further includes: the first device according to the current The network topology structure determines the maximum number L of forwarding nodes that the message can pass through, where L is an integer greater than or equal to N; the first device determines the indication information of the forwarding path, including: the first device according to the L and the survival time of the message corresponding to each network node in the N network nodes determine the node number of each network node, and the first device determines the target link corresponding to the node number of each network node serial number.
可选地,N个网络节点中的第一个网络节点接收到报文后,将该报文中的第一个TTL发送给第一设备,第一设备接收到第一个TTL后,第一设备可以确定该第一个TTL属于第一个网络节点对应的TTL,第一设备可以将该第一个TTL减1得到第二个TTL,将该第二个TTL确定为第二个网络节点对应的TTL,以此类推,第一设备可以确定N个网络节点中每个网络节点对应的TTL,则根据每个网络节点的对应的TTL以及最大转发节点个数L确定每个网络节点的节点编号。Optionally, after receiving the message, the first network node among the N network nodes sends the first TTL in the message to the first device, and after the first device receives the first TTL, the first The device can determine that the first TTL belongs to the TTL corresponding to the first network node, the first device can subtract 1 from the first TTL to obtain the second TTL, and determine the second TTL as the TTL corresponding to the second network node. TTL, and so on, the first device can determine the TTL corresponding to each network node in the N network nodes, then determine the node number of each network node according to the corresponding TTL of each network node and the maximum number of forwarding nodes L .
结合第二方面的上述可能的实现方式,在第二方面的第四种可能的实现方式中,该第一设备根据该L以及该N个网络节点中每个网络节点对应的该报文的生存时间,确定该每个网络节点的节点编号,包括:该第一设备将该N个网络节点中每个网络节点对应的该报文的生存时间对L求余的结果确定为该每个网络节点的节点编号。With reference to the foregoing possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the first device, according to the L and the survival of the packet corresponding to each of the N network nodes, time, determining the node number of each network node, including: the first device determining the result of the remainder of the survival time of the message corresponding to each of the N network nodes as the result of L for each network node the node number of .
可选地,若该报文在源网络节点处的生存时间的值为T0,则每经过一个网络节点,该报文的生存时间的数值减1,这样相邻两个网络节点之间的生存时间的数值相差为1。Optionally, if the value of the lifetime of the packet at the source network node is T0, the value of the lifetime of the packet is reduced by 1 every time it passes through a network node, so that the lifetime between two adjacent network nodes The numerical difference of time is 1.
结合第二方面的上述可能的实现方式,在第二方面的第五种可能的实现方式中,该第一设备确定该转发路径的指示信息,包括:该第一设备将该N个网络节点中每个网络节点在该转发路径中对应的转发跳数确定为该每个网络节点的节点编号;该第一设备确定与该每个网络节点的节点编号对应的目标链路编号。With reference to the foregoing possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, determining the indication information of the forwarding path by the first device includes: the first device assigning the N network nodes The number of forwarding hops corresponding to each network node in the forwarding path is determined as a node number of each network node; the first device determines a target link number corresponding to the node number of each network node.
结合第二方面的上述可能的实现方式,在第二方面的第六种可能的实现方式中,在该第一设备确定报文的转发路径之后,该方法还包括:该第一设备确定该报文的转发跳数的初始值,该报文的报文头携带该转发跳数的初始值,例如,该转发跳数的初始值为1,当N个网络节点中的第一个网络节点接收到该报文后,将将该报文头中的转发跳数的初始值1作为该第一个网络节点的节点编号。例如,该第一设备可以将第一个网络节点的转发跳数的初始值确定为1,第二个网络节点的转发跳数确定为2,以此类推,第一设备确定每个网络节点的转发跳数后,将每个网络节点的转发跳数确定为每个网络节点自身的节点编号。With reference to the above possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, after the first device determines the forwarding path of the message, the method further includes: the first device determines the forwarding path of the message The initial value of the forwarding hop count of the message. The message header of the message carries the initial value of the forwarding hop count. For example, the initial value of the forwarding hop count is 1. When the first network node among the N network nodes receives After the message is received, the initial value 1 of the forwarding hop count in the message header is used as the node number of the first network node. For example, the first device may determine the initial value of the forwarding hop count of the first network node as 1, the forwarding hop count of the second network node as 2, and so on, the first device determines the initial value of the forwarding hop count of each network node After forwarding the hop count, determine the forwarding hop count of each network node as its own node number.
结合第二方面的上述可能的实现方式,在第二方面的第七种可能的实现方式中,在该第一设备确定报文的转发路径之前,该方法还包括:该第一设备获取该报文的源地址和目的地址以及当前网络拓扑结构中多个网络节点中每个网络节点的当前流量信息;该第一设备确定报文的转发路径,包括:该第一设备根据该源地址和目的地址以及该多个网络节点中每个网络节点的当前流量信息,确定该转发路径。With reference to the above possible implementation of the second aspect, in a seventh possible implementation of the second aspect, before the first device determines the forwarding path of the message, the method further includes: the first device obtains the message The source address and destination address of the message and the current traffic information of each network node among the multiple network nodes in the current network topology; the first device determines the forwarding path of the message, including: the first device determines the forwarding path of the message according to the source address and the destination The address and the current traffic information of each network node in the plurality of network nodes determine the forwarding path.
可选地,第一设备还可以获取N个网络节点中的每个网络节点发送的实时缓存大小、每个网络节点的至少一个链路的链路带宽,第一设备可以根据每个网络节点的当前流量信息、每个网络节点的实时缓存大小以及每个网络节点的至少一个链路的链路带宽确定该转发路径。即第一设备可以根据每个网络节点的物理带宽、实时流量以及缓存的大小来为报文确定转发路径。Optionally, the first device may also obtain the real-time buffer size sent by each network node in the N network nodes, and the link bandwidth of at least one link of each network node, and the first device may obtain the The current flow information, the real-time cache size of each network node, and the link bandwidth of at least one link of each network node determine the forwarding path. That is, the first device may determine a forwarding path for the packet according to the physical bandwidth, real-time traffic, and cache size of each network node.
可选地,当第一设备为控制器时,N个网络节点中每个网络节点都会将自身的当前流量信息发送给控制器,N个网络节点的第一个网络节点接收到报文之后,将该报文的源地址和目的地址发送给控制器,控制器根据接收到的源地址和目的地址以及每个网络节点的当前流量信息为该报文确定一条转发路径。Optionally, when the first device is a controller, each of the N network nodes will send its own current traffic information to the controller, and after the first network node of the N network nodes receives the message, Send the source address and destination address of the message to the controller, and the controller determines a forwarding path for the message according to the received source address and destination address and current flow information of each network node.
可选地,当该第一设备为N个网络节点中的第一个网络节点时,即该第一个网络节点为源网络节点时,N个网络节点中每个网络节点都会将自身的当前流量信息发送给第一个网络节点,该第一个网络节点接收到报文时,获取报文的源地址和目的地址,控制器根据源地址和目的地址以及每个网络节点的当前流量信息为该报文确定一条转发路径。Optionally, when the first device is the first network node among the N network nodes, that is, when the first network node is the source network node, each network node among the N network nodes will send its current The flow information is sent to the first network node. When the first network node receives the message, it obtains the source address and destination address of the message. According to the source address and destination address and the current flow information of each network node, the controller is This message defines a forwarding path.
结合第二方面的上述可能的实现方式,在第二方面的第八种可能的实现方式中,在该第一设备根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L之后,该方法还包括:该第一设备向该N个网络节点中每个网络节点发送该L。In combination with the above possible implementation of the second aspect, in the eighth possible implementation of the second aspect, after the first device determines the maximum number L of forwarding nodes that the message can pass through according to the current network topology , the method further includes: the first device sending the L to each of the N network nodes.
第一设备采用L确定每个网络节点的节点编号后,每个网络节点也需要用同样的L确定自身的节点编号,这样,可以保证第一设备确定的每个网络节点的节点编号与每个网络节点确定的自身的节点编号是一致的,进一步保证了数据传输的准确性。After the first device uses L to determine the node number of each network node, each network node also needs to use the same L to determine its own node number. In this way, it can be ensured that the node number of each network node determined by the first device is consistent with each The node numbers determined by the network nodes are consistent, which further ensures the accuracy of data transmission.
结合第二方面的上述可能的实现方式,在第二方面的第九种可能的实现方式中,该第一设备为该报文的源网络节点,在该第一设备确定该转发路径的指示信息之后,该方法还包括:该源网络节点根据该指示信息转发该报文。With reference to the above possible implementation of the second aspect, in a ninth possible implementation of the second aspect, the first device is the source network node of the message, and the first device determines the indication information of the forwarding path Afterwards, the method further includes: the source network node forwarding the message according to the indication information.
具体地,若该第一设备为源网络节点,即该源网络节点为N个网络节点中的第一个网络节点,该源网络节点接收到报文,并且根据该报文确定转发路径的指示信息,该指示信息用于指示每个网络节点的节点编号对应的目标链路编号,并将该指示信息封装到该报文的报文头中,向转发路径中的下一个网络节点转发该报文。Specifically, if the first device is a source network node, that is, the source network node is the first network node among the N network nodes, the source network node receives the message, and determines the forwarding path indication according to the message information, the indication information is used to indicate the target link number corresponding to the node number of each network node, and the indication information is encapsulated into the message header of the message, and the message is forwarded to the next network node in the forwarding path arts.
结合第二方面的上述可能的实现方式,在第二方面的第十种可能的实现方式中,该第一设备为控制器;在该第一设备确定该转发路径的指示信息之后,该方法还包括:该控制器向该报文的源网络节点发送该路径的指示信息,该N个网络节点包括该源网络节点。With reference to the above possible implementation manners of the second aspect, in a tenth possible implementation manner of the second aspect, the first device is a controller; after the first device determines the indication information of the forwarding path, the method further It includes: the controller sends the indication information of the path to the source network node of the message, and the N network nodes include the source network node.
具体地,若该第一设备为控制器,可以通过控制器的集中控制来确定指示信息。控制器可以接收多个网络节点发送的当前流量信息,并且控制器也可以接收第一个网络节点发送的报文的源地址和目的地址,根据多个网络节点发送的当前流量信息以及报文的源地址和目的地址为该报文确定转发路径,该转发路径包括多个网络节点中的N个网络节点。控制器也可以接收N个网络节点发送的自身的至少一个链路编号,根据转发路径在N个网络节点发送的自身的至少一个链路编号确定N个网络节点的自身的用于转发报文的目标链路编号,并且控制器为N个网络节点中的每个网络节点确定节点编号,进一步确定指示信息,指示信息来指示N个节点编号中每个节点编号对应的目标链路编号,控制器将该指示信息发送给第一个网络节点,也即源网络节点,第一个网络节点根据该指示信息转发该报文,并且将该指示信息封装在报文头中进行转发。Specifically, if the first device is a controller, the indication information may be determined through centralized control of the controller. The controller can receive the current flow information sent by multiple network nodes, and the controller can also receive the source address and destination address of the message sent by the first network node, according to the current flow information sent by multiple network nodes and the The source address and the destination address determine a forwarding path for the message, and the forwarding path includes N network nodes among the plurality of network nodes. The controller may also receive at least one link number of itself sent by the N network nodes, and determine the own link number of the N network nodes for forwarding the message according to the forwarding path at least one of the link numbers sent by the N network nodes. The target link number, and the controller determines the node number for each of the N network nodes, further determines the indication information, and the indication information indicates the target link number corresponding to each node number in the N node numbers, and the controller The indication information is sent to the first network node, that is, the source network node, and the first network node forwards the packet according to the indication information, and encapsulates the indication information in a packet header for forwarding.
第三方面,提供了一种传输数据的装置,用于执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该装置包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的单元。In a third aspect, an apparatus for transmitting data is provided, configured to execute the method in the foregoing first aspect or any possible implementation manner of the first aspect. Specifically, the apparatus includes a unit configured to execute the method in the foregoing first aspect or any possible implementation manner of the first aspect.
第四方面,提供了一种传输数据的装置,用于执行上述第二方面或第二方面的任意可能的实现方式中的方法。具体地,该装置包括用于执行上述第二方面或第二方面的任意可能的实现方式中的方法的单元。In a fourth aspect, an apparatus for transmitting data is provided, configured to execute the method in the second aspect or any possible implementation manner of the second aspect. Specifically, the apparatus includes a unit for performing the method in the above second aspect or any possible implementation manner of the second aspect.
第五方面,提供了一种传输数据的系统,包括如第三方面所述的装置和第四方面所述的装置。A fifth aspect provides a system for transmitting data, including the device described in the third aspect and the device described in the fourth aspect.
第六方面,提供了一种传输数据的装置,该装置包括:接收器、发送器、存储器、处理器和总线系统。其中,该接收器、该发送器、该存储器和该处理器通过该总线系统相连,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制接收器接收信号,并控制发送器发送信号,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第一方面或第一方面的任意可能的实现方式中的方法。According to a sixth aspect, a device for transmitting data is provided, and the device includes: a receiver, a transmitter, a memory, a processor, and a bus system. Wherein, the receiver, the transmitter, the memory and the processor are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the receiver to receive signals and control the sending The processor sends a signal, and when the processor executes the instruction stored in the memory, the execution causes the processor to execute the method in the first aspect or any possible implementation manner of the first aspect.
第七方面,提供了一种传输数据的装置,该装置包括:接收器、发送器、存储器、处理器和总线系统。其中,该接收器、该发送器、该存储器和该处理器通过该总线系统相连,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制接收器接收信号,并控制发送器发送信号,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第二方面或第二方面的任意可能的实现方式中的方法。In a seventh aspect, a device for transmitting data is provided, and the device includes: a receiver, a transmitter, a memory, a processor, and a bus system. Wherein, the receiver, the transmitter, the memory and the processor are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the receiver to receive signals and control the sending The processor sends a signal, and when the processor executes the instruction stored in the memory, the execution causes the processor to execute the method in the second aspect or any possible implementation manner of the second aspect.
第八方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In an eighth aspect, there is provided a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.
第九方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。A ninth aspect provides a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1是根据本发明实施例的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
图2是根据本发明实施例的传输数据的方法示意图;FIG. 2 is a schematic diagram of a method for transmitting data according to an embodiment of the present invention;
图3是根据本发明实施例的另一传输数据的方法示意图;FIG. 3 is a schematic diagram of another method for transmitting data according to an embodiment of the present invention;
图4是根据本发明实施例的传输数据的装置示意图;Fig. 4 is a schematic diagram of an apparatus for transmitting data according to an embodiment of the present invention;
图5是根据本发明实施例的另一传输数据的装置示意图;FIG. 5 is a schematic diagram of another device for transmitting data according to an embodiment of the present invention;
图6是根据本发明实施例的传输数据的装置示意图;6 is a schematic diagram of an apparatus for transmitting data according to an embodiment of the present invention;
图7是根据本发明实施例的另一传输数据的装置示意图。Fig. 7 is a schematic diagram of another device for transmitting data according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The following will clearly describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
应理解,本发明实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,简称为“GSM”)系统、码分多址(Code Division Multiple Access,简称为“CDMA”)系统、宽带码分多址(Wideband Code Division Multiple Access,简称为“WCDMA”)系统、通用分组无线业务(General Packet Radio Service,简称为“GPRS”)、长期演进(Long Term Evolution,简称为“LTE”)系统、LTE频分双工(FrequencyDivision Duplex,简称为“FDD”)系统、LTE时分双工(Time Division Duplex,简称为“TDD”)、通用移动通信系统(Universal Mobile TelecommunicationSystem,简称为“UMTS”)、全球互联微波接入(Worldwide Interoperability forMicrowave Access,简称为“WiMAX”)通信系统、无线局域网(Wireless LocalArea Network,简称“WLAN”)或未来第五代无线通信系统(the fifthGeneration,简称“5G”)等。It should be understood that the technical solutions of the embodiments of the present invention can be applied to various communication systems, for example: Global System of Mobile communication (Global System of Mobile communication, referred to as "GSM") system, Code Division Multiple Access (Code Division Multiple Access, referred to as "CDMA") system, Wideband Code Division Multiple Access (referred to as "WCDMA") system, General Packet Radio Service (referred to as "GPRS"), Long Term Evolution (Long Term Evolution, “LTE” for short) system, LTE Frequency Division Duplex (Frequency Division Duplex, “FDD” for short) system, LTE Time Division Duplex (Time Division Duplex, short for “TDD”), Universal Mobile Telecommunication System (Universal Mobile Telecommunication System, "UMTS" for short), Worldwide Interoperability for Microwave Access (WiMAX for short) communication system, Wireless Local Area Network (WLAN for short) or the fifth generation wireless communication system (the fifthGeneration , referred to as "5G") and so on.
图1示出了本发明实施例的应用场景示意图,报文需要从S传输到N,报文需要通过图中1的网络节点来进行报文的转发,如图1所示,该网络拓扑结构包括9个网络节点,分别是R1、R2、R3、R4、R5、R6、R7、R8和R9,每个网络节点都有自身的出端口,即每个网络节点都包括能够传输数据的至少一个链路,并且每个网络节点都为自身的链路进行编号,例如,R4将R4-R5的链路编号确定为0,R4-R6的链路编号确定为1,R4-R2的链路编号确定为2。每个网络节点将自身确定的链路编号发送给R1或者控制器。每个网络节点将自身的每个链路上的当前流量信息发送给R1或控制器,当有报文需要传输时,R1或控制器根据报文的源地址和目的地址以及每个网络节点的当前流量信息为该报文确定一条转发路径,如R1或控制器确定的转发路径为R1-R2-R4-R6-R9。可选地,可以是该当前网络结构中任何一个网络节点确定传输该报文的转发路径,当第一个网络节点确定传输该报文的转发路径,如图1中的R1接收到报文时,R1将该报文的源地址和目的地址发送给确定转发路径的网络节点或者控制器,图1只是本发明实施例的一个示意性场景图,当然,本发明实施例的应用场景可以不包括图1中的控制器。Figure 1 shows a schematic diagram of the application scenario of the embodiment of the present invention, the message needs to be transmitted from S to N, and the message needs to be forwarded through the network node in Figure 1, as shown in Figure 1, the network topology Including 9 network nodes, namely R1, R2, R3, R4, R5, R6, R7, R8 and R9, each network node has its own output port, that is, each network node includes at least one link, and each network node numbers its own link, for example, R4 determines the link number of R4-R5 as 0, the link number of R4-R6 as 1, and the link number of R4-R2 Determined to be 2. Each network node sends the link number determined by itself to R1 or the controller. Each network node sends the current traffic information on each link of itself to R1 or the controller. When there is a message to be transmitted, R1 or the controller sends the information according to the source address and destination address of the message and the address of each network node. The current traffic information determines a forwarding path for the message, for example, the forwarding path determined by R1 or the controller is R1-R2-R4-R6-R9. Optionally, any network node in the current network structure may determine the forwarding path for transmitting the message. When the first network node determines the forwarding path for transmitting the message, as shown in FIG. 1 when R1 receives the message , R1 sends the source address and destination address of the message to the network node or controller that determines the forwarding path. Figure 1 is only a schematic scene diagram of the embodiment of the present invention. The controller in Figure 1.
本发明实施例对控制器的形式不作具体限定,例如,控制器可以为无线网络中的基站(Base Station)或无线网络控制器(Radio Network Controller,RNC)等。本发明实施例对网络节点的形式也不作具体限定,例如,网络节点可以是路由器或交换机。The form of the controller is not specifically limited in this embodiment of the present invention. For example, the controller may be a base station (Base Station) or a radio network controller (Radio Network Controller, RNC) in a wireless network. The embodiment of the present invention does not specifically limit the form of the network node, for example, the network node may be a router or a switch.
下面将结合图2和图3对本发明实施例的传输数据的方法进行描述。The method for transmitting data according to the embodiment of the present invention will be described below with reference to FIG. 2 and FIG. 3 .
如图2示出了本发明实施例的传输数据的方法100,该方法100包括:FIG. 2 shows a method 100 for transmitting data according to an embodiment of the present invention. The method 100 includes:
S110,第一设备确定报文的转发路径,该转发路径包括N个网络节点,N为大于或等于2的整数;S110. The first device determines a forwarding path of the message, where the forwarding path includes N network nodes, where N is an integer greater than or equal to 2;
S120,该第一设备确定该转发路径的指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该N个网络节点,该报文的报文头携带该转发路径的指示信息。S120, the first device determines indication information of the forwarding path, where the indication information is used to indicate a target link number corresponding to each node number in N node numbers, where the N node numbers correspond to the N network nodes, the The packet header of the packet carries the indication information of the forwarding path.
具体地,第一设备确定报文的转发路径之后,确定该转发路径的指示信息,该指示信息用于指示N个节点编号可以与报文的转发路径上的N个网络节点一一对应,N个节点编号与N个目标链路编号一一对应。Specifically, after the first device determines the forwarding path of the message, it determines the indication information of the forwarding path, and the indication information is used to indicate that the N node numbers can be in one-to-one correspondence with the N network nodes on the forwarding path of the message, and N There is a one-to-one correspondence between the number of nodes and the number of N target links.
可选地,第一设备确定报文的转发路径之后,确定该转发路径的指示信息,该指示信息用于指示每个网络节点编号对应的目标链路编号,指示信息携带于报文的报文头中在每个网络节点处进行转发,可选地,每个网络节点编号对应的目标链路编号可以按顺序占用预定义的报文头的字节位置,网络节点接收到该报文时,确定自身的节点编号,并按顺序查找自身的节点编号占用预定义的报文头字节位置对应的目标链路编号,并在查找到的目标链路编号对应的链路上转发报文。应理解,每个网络节点的节点编号对应的目标链路编号也可以不按顺序占用报文头的字节,第一设备和网络节点可以按照协议规定的方式,确定目标链路编号占用报文头字节的位置。Optionally, after the first device determines the forwarding path of the message, it determines the indication information of the forwarding path, the indication information is used to indicate the target link number corresponding to each network node number, and the indication information is carried in the message of the message The header is forwarded at each network node. Optionally, the target link number corresponding to each network node number can occupy the byte position of the predefined message header in order. When the network node receives the message, Determine its own node number, and search in order for its own node number to occupy the target link number corresponding to the predefined packet header byte position, and forward the message on the link corresponding to the found target link number. It should be understood that the target link number corresponding to the node number of each network node may also occupy the bytes of the packet header out of order, and the first device and the network node may determine that the target link number occupies the packet The position of the header byte.
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头相同的字节大小,每个网络节点的目标链路编号占用的报文头预定义的字节位置,例如,每个网络节点对应的目标链路编号占用的报文头的两个字节,若第一个网络节点确定自身的节点编号为前两个字节对应的节点编号,则查找前两个字节位置的目标链路编号,第一个网络节点根据前两个字节位置的目标链路编号转发该报文。Optionally, the indication information may indicate that the target link number corresponding to each network node can occupy the same byte size of the message header, and the target link number of each network node occupies a predefined byte position in the message header , for example, the target link number corresponding to each network node occupies two bytes of the message header, if the first network node determines that its own node number is the node number corresponding to the first two bytes, then search for the first two bytes The first network node forwards the message according to the target link number of the first two byte positions.
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头不同的字节大小,可选地,每个网络节点根据自身的节点编号和指示信息查找与自身节点编号对应的目标链路编号,例如,指示信息指示第一个网络节点对应的目标链路编号占有报文头的前两个字节,第二个网络节点对应的目标链路编号占用报文头的第三个到第五个字节,这样,第一个网络节点根据指示信息确定报文头前两个字节对应的目标链路编号为自身的目标链路编号,第二个网络节点根据指示信息确定报文头第三个到第五个字节对应的目标链路编号为自身的目标链路编号。Optionally, the indication information may indicate that the target link number corresponding to each network node may occupy a different byte size of the packet header. The target link number corresponding to the number, for example, the indication information indicates that the target link number corresponding to the first network node occupies the first two bytes of the packet header, and the target link number corresponding to the second network node occupies the packet header In this way, the first network node determines the target link number corresponding to the first two bytes of the message header as its own target link number according to the indication information, and the second network node determines the target link number according to the The indication information determines that the target link number corresponding to the third to fifth bytes of the packet header is its own target link number.
可选地,该报文的报文头除了携带指示信息之外,报文头还携带N个节点编号,这样,每个网络节点接收到报文后,确地自身的节点编号,并通过查找报文头中自身节点编号,查找到自身节点编号后,查找与自身节点编号对应的目标链路编号,在目标链路编号对应的链路上转发报文,这样,报文头中的目标链路编号可以不按照顺序存储,可以通过查找节点编号与目标链路编号的对应关系来确定目标链路编号。Optionally, in addition to carrying the indication information, the message header of the message also carries N node numbers, so that after each network node receives the message, it can accurately determine its own node number, and search The self-node number in the message header, after finding the self-node number, finds the target link number corresponding to the self-node number, and forwards the message on the link corresponding to the target link number. In this way, the target link number in the message header The way numbers may not be stored in order, and the target link number may be determined by looking up the corresponding relationship between the node number and the target link number.
应理解,N个节点编号可以与报文的转发路径上的N个网络节点一一对应,N个节点编号与N个目标链路编号一一对应。It should be understood that the N node numbers may be in one-to-one correspondence with the N network nodes on the packet forwarding path, and the N node numbers are in one-to-one correspondence with the N target link numbers.
作为一个可选实施例,在S120之前,该方法100还包括:该第一设备获取该N个网络节点中的第i个网络节点的至少一个链路编号;S120,包括:该第一设备根据该转发路径,在该第i个网络节点的至少一个链路编号中确定该第i个网络节点的目标链路编号,i为大于0且小于或等于N的整数。As an optional embodiment, before S120, the method 100 further includes: the first device acquires at least one link number of the i-th network node among the N network nodes; S120 includes: the first device according to For the forwarding path, determine the target link number of the i-th network node in at least one link number of the i-th network node, where i is an integer greater than 0 and less than or equal to N.
具体地,每个网络节点都会将自身的至少一个链路编号发送给第一设备,当第一设备确定转发路径后,根据每个网络节点发送给第一设备的至少一个链路编号来确定用于转发报文的目标链路编号,这样,可以确定整个转发路径上所有网络节点的目标链路编号。Specifically, each network node sends at least one link number of itself to the first device, and after the first device determines the forwarding path, it determines the link number to be used according to at least one link number sent by each network node to the first device. In this way, the target link numbers of all network nodes on the entire forwarding path can be determined.
作为一个可选实施例,在该第一设备获取该N个网络节点中的第i个网络节点的至少一个链路编号之后,该方法100还包括:该第一设备根据该i个网络节点的至少一个链路编号中最大的链路编号,确定该第i个网络节点的目标链路编号在该报文中所占的字节大小。As an optional embodiment, after the first device acquires at least one link number of the i-th network node among the N network nodes, the method 100 further includes: the first device according to the i-th network node The largest link number among at least one link number determines the byte size occupied by the target link number of the i-th network node in the message.
可选地,该第一设备可以将每个网络节点发送的至少一个链路编号中最大的链路编号所占的字节确定为每个网络节点的目标链路编号在该报文中所占的字节。Optionally, the first device may determine the byte occupied by the largest link number in the at least one link number sent by each network node as the target link number of each network node in the message. bytes.
作为一个可选实施例,在S120之前,该方法100还包括:该第一设备根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L,其中,该L为大于或等于N的整数;该第一设备确定该转发路径的指示信息,包括:该第一设备根据该L以及该N个网络节点中每个网络节点对应的该报文的TTL,确定该每个网络节点的节点编号,该第一设备确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, before S120, the method 100 further includes: the first device determines the maximum number L of forwarding nodes that the message can pass through according to the current network topology, where the L is greater than or equal to N is an integer; the first device determines the indication information of the forwarding path, including: the first device determines the TTL of each network node according to the L and the TTL of the message corresponding to each network node in the N network nodes a node number, the first device determines a target link number corresponding to the node number of each network node.
可选地,N个网络节点中的第一个网络节点接收到报文后,将该报文中的第一个TTL发送给第一设备,第一设备接收到第一个TTL后,第一设备可以确定该第一个TTL属于第一个网络节点对应的TTL,第一设备可以将该第一个TTL减1得到第二个TTL,将该第二个TTL确定为第二个网络节点对应的TTL,以此类推,第一设备可以确定N个网络节点中每个网络节点对应的TTL,则可以根据每个网络节点的对应的TTL以及最大转发节点个数L确定每个网络节点的节点编号。Optionally, after receiving the message, the first network node among the N network nodes sends the first TTL in the message to the first device, and after the first device receives the first TTL, the first The device can determine that the first TTL belongs to the TTL corresponding to the first network node, the first device can subtract 1 from the first TTL to obtain the second TTL, and determine the second TTL as the TTL corresponding to the second network node. TTL, and so on, the first device can determine the TTL corresponding to each network node in the N network nodes, then the node of each network node can be determined according to the corresponding TTL of each network node and the maximum number L of forwarding nodes serial number.
作为一个可选实施例,该第一设备根据该L以及该N个网络节点中每个网络节点对应的该报文的生存时间,确定该每个网络节点的节点编号,包括:该第一设备将该N个网络节点中每个网络节点对应的该报文的生存时间对L求余的结果确定为该每个网络节点的节点编号,该第一设备确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the first device determines the node number of each network node according to the L and the lifetime of the message corresponding to each network node in the N network nodes, including: the first device determining the result of subtracting the survival time of the message corresponding to each of the N network nodes from L as the node number of each network node, and the first device determines the node number corresponding to each network node Corresponding target link number.
可选地,若该报文在源网络节点处的生存时间的值为T0,则每经过一个网络节点,该报文的生存时间的数值减1,这样相邻两个网络节点之间的生存时间的数值相差为1。Optionally, if the value of the lifetime of the packet at the source network node is T0, the value of the lifetime of the packet is reduced by 1 every time it passes through a network node, so that the lifetime between two adjacent network nodes The numerical difference of time is 1.
作为一个例子,如图1所示,若第一设备确定转发报文的路径为R1-R2-R4-R6-R9,R1-R2的链路编号为0,R2-R4的链路编号为0,R4-R6的链路编号为1,R6-R9的链路编号为0。当R1接收到报文时,若报文中的TTL为98,并且第一设备确定当前网络拓扑结构中的报文能够经过的最大转发节点个数L为9,则第一设备将98mod9的值8作为R1的节点编号,将97mod9的值7作为R2的节点编号,将96mod9的值6作为R4的节点编号,将95mod9的值5作为R6的节点编号,其中,mod为求余运算,则第一设备确定该路径上的节点编号与目标链路编号的对应关系如表1所示,可选地,报文头中可以只包括表1中的目标链路编号,即第一设备确定的目标链路编号与节点编号有对应关系;可选地,报文头中也可以既包括表1中节点编号也可以包括表1中的目标链路编号。As an example, as shown in Figure 1, if the first device determines that the path to forward the packet is R1-R2-R4-R6-R9, the link number of R1-R2 is 0, and the link number of R2-R4 is 0 , the link number of R4-R6 is 1, and the link number of R6-R9 is 0. When R1 receives the message, if the TTL in the message is 98, and the first device determines that the maximum number of forwarding nodes L that the message can pass through in the current network topology is 9, the first device will set the value of 98mod9 8 is the node number of R1, the value 7 of 97mod9 is the node number of R2, the value 6 of 96mod9 is the node number of R4, and the value 5 of 95mod9 is the node number of R6. A device determines the corresponding relationship between the node number on the path and the target link number as shown in Table 1. Optionally, the packet header may only include the target link number in Table 1, that is, the target link number determined by the first device. The link number corresponds to the node number; optionally, the message header may include both the node number in Table 1 and the target link number in Table 1.
表1Table 1
作为一个可选实施例,该第一设备确定该转发路径的指示信息,包括:该第一设备将该N个网络节点中每个网络节点在该转发路径中对应的转发跳数确定为该每个网络节点的节点编号。As an optional embodiment, the first device determining the indication information of the forwarding path includes: the first device determining the corresponding forwarding hop count of each of the N network nodes in the forwarding path as the The node number of a network node.
例如,该第一设备可以将第一个网络节点的转发跳数确定为1,第二个网络节点的转发跳数确定为2,以此类推,第一设备确定每个网络节点的转发跳数后,将每个网络节点的转发跳数确定为每个网络节点自身的节点编号。For example, the first device may determine the forwarding hop count of the first network node as 1, the forwarding hop count of the second network node as 2, and so on, the first device determines the forwarding hop count of each network node After that, the forwarding hop count of each network node is determined as the node number of each network node itself.
作为一个例子,如图1所示,若第一设备确定转发报文的路径为R1-R2-R4-R6-R9,R1-R2的链路编号为0,R2-R4的链路编号为0,R4-R6的链路编号为1,R6-R9的链路编号为0。第一设备可以将R1的节点编号确定为1,R2的节点编号确定为2,R4的节点编号确定为3,R6的节点编号确定为4,则第一设备确定该路径上的节点编号与目标链路编号的对应关系如表2所示,可选地,报文头中可以只包括表2中的目标链路编号,即第一设备确定的目标链路编号与节点编号有对应关系;可选地,报文头中也可以既包括表2中节点编号也可以包括表2中的目标链路编号。As an example, as shown in Figure 1, if the first device determines that the path to forward the packet is R1-R2-R4-R6-R9, the link number of R1-R2 is 0, and the link number of R2-R4 is 0 , the link number of R4-R6 is 1, and the link number of R6-R9 is 0. The first device can determine the node number of R1 as 1, the node number of R2 as 2, the node number of R4 as 3, and the node number of R6 as 4, then the first device determines that the node number on the path is consistent with the target The corresponding relationship between the link numbers is shown in Table 2. Optionally, only the target link number in Table 2 may be included in the message header, that is, the target link number determined by the first device has a corresponding relationship with the node number; Optionally, the packet header may include both the node number in Table 2 and the target link number in Table 2.
表2Table 2
作为一个可选实施例,在该第一设备确定报文的转发路径之后,该方法100还包括:该第一设备确定该报文的转发跳数的初始值,该报文的报文头携带该转发跳数的初始值,例如,该转发跳数的初始值为1,当N个网络节点中的第一个网络节点接收到该报文后,将将该报文头中的转发跳数的初始值1作为该第一个网络节点的节点编号。As an optional embodiment, after the first device determines the forwarding path of the message, the method 100 further includes: the first device determines an initial value of the forwarding hop count of the message, and the message header carries The initial value of the forwarding hop, for example, the initial value of the forwarding hop is 1, when the first network node among the N network nodes receives the message, the forwarding hop in the message header will be The initial value of 1 is used as the node number of the first network node.
作为一个可选实施例,在S110之前,该方法100还包括:该第一设备获取该报文的源地址和目的地址以及当前网络拓扑结构中多个网络节点中每个网络节点的当前流量信息;S110,包括:该第一设备根据该源地址和目的地址以及该多个网络节点中每个网络节点的当前流量信息,确定该转发路径。As an optional embodiment, before S110, the method 100 further includes: the first device obtains the source address and destination address of the message and the current flow information of each network node among the multiple network nodes in the current network topology ; S110, comprising: the first device determines the forwarding path according to the source address and destination address and current traffic information of each network node among the plurality of network nodes.
可选地,第一设备还可以获取N个网络节点中的每个网络节点发送的实时缓存大小、每个网络节点的至少一个链路的链路带宽,第一设备可以根据每个网络节点的当前流量信息、每个网络节点的实时缓存大小以及每个网络节点的至少一个链路的链路带宽确定该转发路径。即第一设备可以根据每个网络节点的物理带宽、实时流量以及缓存的大小来为报文确定转发路径。Optionally, the first device may also obtain the real-time buffer size sent by each network node in the N network nodes, and the link bandwidth of at least one link of each network node, and the first device may obtain the The current flow information, the real-time cache size of each network node, and the link bandwidth of at least one link of each network node determine the forwarding path. That is, the first device may determine a forwarding path for the packet according to the physical bandwidth, real-time traffic, and cache size of each network node.
可选地,当第一设备为控制器时,N个网络节点中每个网络节点都会将自身的当前流量信息发送给控制器,N个网络节点的第一个网络节点接收到报文之后,将该报文的源地址和目的地址发送给控制器,控制器根据接收到的源地址和目的地址以及每个网络节点的当前流量信息为该报文确定一条转发路径。Optionally, when the first device is a controller, each of the N network nodes will send its own current traffic information to the controller, and after the first network node of the N network nodes receives the message, Send the source address and destination address of the message to the controller, and the controller determines a forwarding path for the message according to the received source address and destination address and current flow information of each network node.
可选地,当该第一设备为N个网络节点中的第一个网络节点时,即该第一个网络节点为源网络节点时,N个网络节点中每个网络节点都会将自身的当前流量信息发送给第一个网络节点,该第一个网络节点接收到报文时,获取报文的源地址和目的地址,控制器根据源地址和目的地址以及每个网络节点的当前流量信息为该报文确定一条转发路径。Optionally, when the first device is the first network node among the N network nodes, that is, when the first network node is the source network node, each network node among the N network nodes will send its current The flow information is sent to the first network node. When the first network node receives the message, it obtains the source address and destination address of the message. According to the source address and destination address and the current flow information of each network node, the controller is This message defines a forwarding path.
作为一个可选实施例,在该第一设备根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L之后,该方法100还包括:该第一设备向该N个网络节点中每个网络节点发送该L。As an optional embodiment, after the first device determines the maximum number L of forwarding nodes that the packet can pass through according to the current network topology, the method 100 further includes: sending the first device to the N network nodes Each network node sends this L.
第一设备采用L确定每个网络节点的节点编号后,每个网络节点也需要用同样的L确定自身的节点编号,这样,可以保证第一设备确定的每个网络节点的节点编号与每个网络节点确定的自身的节点编号是一致的,进一步保证了数据传输的准确性。After the first device uses L to determine the node number of each network node, each network node also needs to use the same L to determine its own node number. In this way, it can be ensured that the node number of each network node determined by the first device is consistent with each The node numbers determined by the network nodes are consistent, which further ensures the accuracy of data transmission.
作为一个可选实施例,该第一设备为该报文的源网络节点,该N个网络节点包括该源网络节点,在该第一设备确定该转发路径的指示信息之后,该方法100还包括:该源网络节点根据该指示信息转发该报文。As an optional embodiment, the first device is the source network node of the packet, and the N network nodes include the source network node, and after the first device determines the indication information of the forwarding path, the method 100 further includes : the source network node forwards the packet according to the indication information.
具体地,若该第一设备为源网络节点,即该源网络节点为N个网络节点中的第一个网络节点,该源网络节点接收到报文,并且根据该报文确定转发路径的指示信息,该指示信息用于指示每个网络节点的节点编号,以及每个节点编号对应的目标链路编号,并将该指示信息封装到该报文的报文头中,向转发路径中下一个网络节点转发该报文。Specifically, if the first device is a source network node, that is, the source network node is the first network node among the N network nodes, the source network node receives the message, and determines the forwarding path indication according to the message Information, the indication information is used to indicate the node number of each network node, and the target link number corresponding to each node number, and encapsulate the indication information into the message header of the message, and send it to the next The network node forwards the message.
作为一个可选实施例,该第一设备为控制器;在该第一设备确定该转发路径的指示信息之后,该方法100还包括:该控制器向该报文的源网络节点发送该路径的指示信息,该N个网络节点包括该源网络节点。As an optional embodiment, the first device is a controller; after the first device determines the indication information of the forwarding path, the method 100 further includes: the controller sends the path information to the source network node of the message Indication information, the N network nodes include the source network node.
具体地,若该第一设备为控制器,可以通过控制器的集中控制来确定指示信息。控制器可以接收多个网络节点发送的当前流量信息,并且控制器也可以接收第一个网络节点发送的报文的源地址和目的地址,根据多个网络节点发送的当前流量信息以及报文的源地址和目的地址为该报文确定转发路径,该转发路径包括多个网络节点中的N个网络节点。控制器也可以接收N个网络节点发送的自身的至少一个链路编号,根据转发路径在N个网络节点发送的自身的至少一个链路编号确定N个网络节点的自身的用于转发报文的链路编号,并且控制器为N个网络节点中的每个网络节点确定节点编号,进一步确定指示信息,指示信息来指示N个节点编号中每个节点编号对应的目标链路编号,控制器将该指示信息发送给第一个网络节点,也即源网络节点,第一个网络节点根据该指示信息转发该报文,并且将该指示信息封装在报文头中进行转发。Specifically, if the first device is a controller, the indication information may be determined through centralized control of the controller. The controller can receive the current flow information sent by multiple network nodes, and the controller can also receive the source address and destination address of the message sent by the first network node, according to the current flow information sent by multiple network nodes and the The source address and the destination address determine a forwarding path for the message, and the forwarding path includes N network nodes among the plurality of network nodes. The controller may also receive at least one link number of itself sent by the N network nodes, and determine the own link number of the N network nodes for forwarding the message according to the forwarding path at least one of the link numbers sent by the N network nodes. link number, and the controller determines the node number for each network node in the N network nodes, further determines the indication information, and the indication information indicates the target link number corresponding to each node number in the N node numbers, and the controller will The indication information is sent to the first network node, that is, the source network node, and the first network node forwards the message according to the indication information, and encapsulates the indication information in a message header for forwarding.
如图3示出了本发明实施例的传输数据的方法200,该方法200包括:FIG. 3 shows a method 200 for transmitting data according to an embodiment of the present invention. The method 200 includes:
S210,第一网络节点接收报文,该报文的报文头携带指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该报文的转发路径上的N个网络节点,N为大于或等于2的整数;S210, the first network node receives the message, and the message header of the message carries indication information, and the indication information is used to indicate the target link number corresponding to each node number in the N node numbers, and the N node numbers correspond to N network nodes on the forwarding path of the message, where N is an integer greater than or equal to 2;
S220,该第一网络节点确定该第一网络节点的节点编号;S220, the first network node determines a node number of the first network node;
S230,该第一网络节点根据该报文的报文头,确定与该第一网络节点的节点编号对应的第一目标链路编号;S230. The first network node determines a first target link number corresponding to the node number of the first network node according to the message header of the message;
S240,该第一网络节点在该第一目标链路编号对应的链路上转发该报文。S240. The first network node forwards the message on the link corresponding to the first target link number.
具体地,N个节点编号可以包括第一网络节点的节点编号,第一目标链路编号为第一网络节点编号对应的目标链路编号,N个节点编号可以与报文的转发路径上的N个网络节点一一对应,N个节点编号与N个目标链路编号一一对应,第一网络节点接收到该报文后,第一网络节点根据报文头,确定自身的节点编号,并确定与自身节点编号对应的第一目标链路编号,这样,能够根据网络节点的节点编号确定转发报文的目标链路编号,可以提高数据传输的适用范围,例如可以在IPv4网络中传输。Specifically, the N node numbers may include the node number of the first network node, the first target link number is the target link number corresponding to the first network node number, and the N node numbers may be the same as the N number on the forwarding path of the message. There is a one-to-one correspondence between the N node numbers and the N target link numbers. After the first network node receives the message, the first network node determines its own node number according to the message header, and determines The first target link number corresponding to its own node number. In this way, the target link number of the forwarded message can be determined according to the node number of the network node, which can improve the scope of application of data transmission, for example, it can be transmitted in an IPv4 network.
更具体地,N个网络节点包括源网络节点和目标网络节点,N个网络节点中的每个网络节点在接收到报文时,报文头包括指示信息,该指示信息可以用于指示网络节点的节点编号与目标链路编号的对应关系,也可以指示每个目标链路编号占用报文头字节的位置,每个网络节点可以根据报文头中的指示信息来确定自身编号对应的目标链路编号,并根据该指示信息指示的每个网络节点的节点编号占用报文头字节位置来查找每个网络节点的目标链路编号,在查找到的目标链路编号对应的链路上传输数据,报文头中的指示信息在整个报文的转发过程中都存在,避免通过剥离每层地址来传输数据,即使只有报文的源地址和目的地址,也可以通过指示信息来传输报文,避免了报文在网络传输中的局限性,提高数据传输的适用范围,如可以适用于IPv4网络的传输。More specifically, the N network nodes include a source network node and a target network node, and when each network node in the N network nodes receives a message, the message header includes indication information, and the indication information can be used to indicate that the network node The corresponding relationship between the node number and the target link number can also indicate that each target link number occupies the position of the packet header byte. Each network node can determine the target corresponding to its own number according to the indication information in the packet header. Link number, and according to the node number of each network node indicated by the indication information occupying the header byte position to find the target link number of each network node, on the link corresponding to the found target link number To transmit data, the instruction information in the message header exists during the entire message forwarding process, avoiding the transmission of data by stripping each layer of address, even if there is only the source address and destination address of the message, the message can also be transmitted through the instruction information The text avoids the limitation of the message in the network transmission, and improves the scope of application of the data transmission, for example, it can be applied to the transmission of the IPv4 network.
可选地,该第一网络节点可以接收与转发路径上与该第一网络节点相邻的上一个网络节点发送的报文。Optionally, the first network node may receive a packet sent by a previous network node adjacent to the first network node on the forwarding path.
可选地,该指示信息可以指示每个网络节点的目标链路编号占用报文头的相等的字节;可选地,每个网络节点根据自身的节点编号可以按顺序查找与自身节点编号对应的目标链路编号。Optionally, the indication information may indicate that the target link number of each network node occupies equal bytes in the packet header; optionally, each network node may search in sequence according to its own node number The target link number of .
可选地,该指示信息可以指示每个网络节点对应的目标链路编号可以占用报文头不同的字节大小,可选地,每个网络节点根据自身的节点编号和指示信息查找与自身节点编号对应的目标链路编号。Optionally, the indication information may indicate that the target link number corresponding to each network node may occupy a different byte size of the packet header. The target link number corresponding to the number.
可选地,该报文的报文头除了携带指示信息之外,报文头还携带N个节点编号,这样,每个网络节点接收到报文后,确地自身的节点编号,并通过查找报文中自身节点编号,查找到自身节点编号后,查找与自身节点编号对应的目标链路编号,在目标链路编号对应的链路上转发报文,这样,报文头中的目标链路编号可以不按照顺序存储,可以通过查找节点编号与目标链路编号的对应关系来确定目标链路编号。Optionally, in addition to carrying the indication information, the message header of the message also carries N node numbers, so that after each network node receives the message, it can accurately determine its own node number, and search The self-node number in the message, after finding the self-node number, finds the target link number corresponding to the self-node number, and forwards the message on the link corresponding to the target link number, so that the target link in the message header The numbers can be stored out of order, and the target link number can be determined by looking up the corresponding relationship between the node number and the target link number.
其中,该节点编号用于标识网络节点,例如,该节点编号可以用于标识网络节点为转发路径上的第几跳,该节点编号也可以为网络节点中报文的生存时间与最大转发节点个数求余的结果,等等。该节点编号也可以是根据其他方式确定,这里不作限制。同一个网络节点的节点编号可能在传输不同的报文是不同的,例如第一网络节点在传输第一报文时的节点编号为2,当该第一网络节点在传输第二报文时的节点编号可能不是2,如可能是4等,即每个网络节点的节点编号不是固定的。网络节点可以根据自身的节点编号确定转发报文的目标链路编号,进一步在确定的目标链路编号对应的链路上转发报文。Wherein, the node number is used to identify the network node. For example, the node number can be used to identify the hop of the network node on the forwarding path. The node number can also be the survival time of the message in the network node and the maximum number of forwarding nodes The result of the remainder of the number, and so on. The node number may also be determined in other ways, which is not limited here. The node number of the same network node may be different when transmitting different messages. For example, the node number of the first network node is 2 when transmitting the first message, and the node number of the first network node is 2 when transmitting the second message. The node number may not be 2, for example, it may be 4, that is, the node number of each network node is not fixed. The network node may determine the target link number for forwarding the message according to its own node number, and further forward the message on the link corresponding to the determined target link number.
可选地,该第一网络节点可以根据该报文,确定自身的节点编号,例如第一网络节点可以根据该报文的报文头的TTL,确定自身的节点编号;又例如,第一网络节点可以根据该报文头中该报文的当前传输跳数,确定自身的节点编号。Optionally, the first network node may determine its own node number according to the message, for example, the first network node may determine its own node number according to the TTL of the message header of the message; The node can determine its own node number according to the current transmission hop count of the message in the message header.
作为一个可选实施例,在所S210之前,该方法200还包括:该第一网络节点向第一设备发送该第一网络节点的至少一个链路编号,其中,该至少一个链路编号包括该第一目标链路编号,并且该第一目标链路编号在该报文头中所占的字节大小是根据该至少一个链路编号中最大的链路编号确定的。As an optional embodiment, before S210, the method 200 further includes: the first network node sending at least one link number of the first network node to the first device, where the at least one link number includes the The first target link number, and the byte size occupied by the first target link number in the packet header is determined according to the largest link number among the at least one link number.
可选地,第一目标链路编号在该报文头中所占的字节大小可以为该至少一个链路编号中最大的链路编号所占的字节大小。Optionally, the byte size occupied by the first target link number in the packet header may be the byte size occupied by the largest link number among the at least one link number.
这样,第一目标链路编号在报文头所占的字节大小根据实际的需求大小确定,而现有技术中的每个链路标签占用固定的32bit,路径上所有的链路标签都封装在报文头中,导致链路标签占用大量的报文空间,传输效率低,本发明实施例根据实际字节的需求大小确定第一目标链路编号所占的字节大小,这样,能够降低占用报文的空间,进一步提高传输数据的效率。In this way, the byte size occupied by the first target link number in the message header is determined according to the actual demand size, while each link label in the prior art occupies a fixed 32 bits, and all link labels on the path are encapsulated In the message header, the link label takes up a large amount of message space, and the transmission efficiency is low. The embodiment of the present invention determines the byte size occupied by the first target link number according to the demand size of the actual byte, so that it can reduce Occupies the space of the message to further improve the efficiency of data transmission.
作为一个可选实施例,该报文的报文头还携带:该报文的TTL;在S220之前,该方法200还包括:该第一网络节点接收第一设备发送的最大转发节点个数L,该L为大于或等于N的整数;S120,包括:该第一网络节点根据该L和该报文头中携带的该TTL,确定该第一网络节点的节点编号。As an optional embodiment, the message header of the message also carries: the TTL of the message; before S220, the method 200 further includes: the first network node receives the maximum number of forwarding nodes L sent by the first device , the L is an integer greater than or equal to N; S120, including: the first network node determines the node number of the first network node according to the L and the TTL carried in the packet header.
具体地,每个网络节点都能收到第一设备发送的最大转发节点个数L,并且在接收到报文时,报文头中包括报文的生存时间TTL,每个网络节点根据L和TTL确定自身的节点编号,例如,可以通过TTL对L求余获得自身的编号,也可以通过对L求余加某一个特定的值来获得自身的编号等,本发明实施例对如何根据TTL和L确定节点编号并不作限制。但若第一设备如何生成每个网络节点的节点编号,则每个网络节点如何获取自身的节点编号,即第一设备生成节点编号的方式与每个网络节点生成自身的节点编号的方式相同,这样,进一步保证报文能够通过正确的转发路径转发。Specifically, each network node can receive the maximum number of forwarding nodes L sent by the first device, and when receiving the message, the message header includes the time to live TTL of the message, and each network node according to L and TTL determines its own node number. For example, it can obtain its own number by calculating the remainder of L through TTL, and can also obtain its own number by adding a certain value to L. L determines the node number without limitation. But if how the first device generates the node number of each network node, then how each network node obtains its own node number, that is, the way the first device generates the node number is the same as the way each network node generates its own node number, In this way, it is further ensured that the message can be forwarded through the correct forwarding path.
作为一个可选实施例,该第一网络节点根据该L和该报文头中携带的该TTL,确定该第一网络节点的节点编号,包括:该第一网络节点将该TTL对该L的求余结果确定为该第一网络节点的节点编号。As an optional embodiment, the first network node determines the node number of the first network node according to the L and the TTL carried in the packet header, including: the first network node assigns the TTL to the L The remainder result is determined as the node number of the first network node.
具体地,通过将每个网络节点的报文中的TTL对L的求余结果确定为每个网络节点自身的节点编号,由于每相邻的两个网络节点之间的TTL相差为1,即若第一个网络节点的TTL为T0则,则每经过一个网络节点,该报文的生存时间的数值减1,这样,能使得任意两个网络节点的节点编号都不相同,即每个节点编号对应一个目标链路编号,不可能存在两个相同的节点编号对应两个目标链路编号,可以确保在正确的目标链路编号对应的链路上传输报文,进一步提高了传输数据的可靠性。Specifically, by determining the result of the remainder of the TTL in the message of each network node to L as the node number of each network node itself, since the TTL difference between every two adjacent network nodes is 1, that is If the TTL of the first network node is T0, the value of the time-to-live of the message will be reduced by 1 every time it passes through a network node. In this way, the node numbers of any two network nodes can be different, that is, each node The number corresponds to a target link number, and it is impossible for two identical node numbers to correspond to two target link numbers, which can ensure that the message is transmitted on the link corresponding to the correct target link number, further improving the reliability of the transmitted data sex.
作为一个可选实施例,该报文的报文头还携带:该报文的当前传输跳数;S220,包括:该第一网络节点将该报文头中的当前传输跳数的值确定为该第一网络节点的节点编号。As an optional embodiment, the message header of the message also carries: the current transmission hop count of the message; S220, including: the first network node determines the value of the current transmission hop count in the message header as The node number of the first network node.
具体地,报文每经过一个网络节点,报文头中的当前传输跳数都会增加1,当第一网络节点接收到报文时,将报文头中的当前传输跳数确定为自身的节点编号,若第一网络节点是N个网络节点中的第一个网络节点,即第一个网络节点为源网络节点时,第一个网络节点接收到报文的报文头中的当前传输跳数的值为1,第一个网络节点就会查找节点编号1对应的目标链路编号,将高报文通过节点编号为1对应的目标链路编号的链路上转发报文。Specifically, every time a message passes through a network node, the current transmission hop number in the message header will increase by 1, and when the first network node receives the message, it will determine the current transmission hop number in the message header as its own node If the first network node is the first network node among the N network nodes, that is, when the first network node is the source network node, the first network node receives the current transmission hop in the message header of the message If the value of the number is 1, the first network node will search for the target link number corresponding to node number 1, and forward the message through the link whose node number is the target link number corresponding to 1.
作为一个可选实施例,在S240之前,该方法200还包括:该第一网络节点将该报文头中的当前传输跳数的值更新为该第一网络节点的节点编号加1。As an optional embodiment, before S240, the method 200 further includes: the first network node updating the value of the current transmission hop count in the packet header to the node number of the first network node plus 1.
具体而言,每个网络节点在接收到报文后,并根据报文的报文头确定自身的节点编号后,将报文头中的当前传输跳数的值更新为自身的节点编号加1,以便于下一个网络节点接收到报文后,根据该更新后的当前传输跳数确定自身的节点编号。Specifically, after each network node receives the message and determines its node number according to the message header of the message, it updates the value of the current transmission hops in the message header to its own node number plus 1 , so that after receiving the message, the next network node determines its own node number according to the updated current transmission hop count.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
上文中结合图2和图3,详细描述了根据本发明实施例的传输数据的方法,下面将结合图4至图7,详细描述根据本发明实施例的传输数据的装置。The method for transmitting data according to the embodiment of the present invention is described in detail above with reference to FIG. 2 and FIG. 3 , and the apparatus for transmitting data according to the embodiment of the present invention will be described in detail below in conjunction with FIG. 4 to FIG. 7 .
如图4示出了本发明实施例的传输数据的装置300,该装置300包括:Figure 4 shows a device 300 for transmitting data according to an embodiment of the present invention, and the device 300 includes:
接收模块310,用于接收报文,该报文的报文头携带指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该报文的转发路径上的N个网络节点,N为大于或等于2的整数;The receiving module 310 is configured to receive a message, the message header of which carries indication information, and the indication information is used to indicate the target link number corresponding to each node number in the N node numbers, and the N node numbers correspond to N network nodes on the forwarding path of the message, where N is an integer greater than or equal to 2;
确定模块320,用于确定该装置的节点编号;A determining module 320, configured to determine the node number of the device;
该确定模块310还用于根据该报文的报文头,确定与该装置的节点编号对应的第一目标链路编号;The determining module 310 is also used to determine the first target link number corresponding to the node number of the device according to the message header of the message;
发送模块330,用于在该第一目标链路编号对应的链路上转发该报文。A sending module 330, configured to forward the message on the link corresponding to the first target link number.
作为一个可选实施例该发送模块330还用于:在接收报文之前,向第一设备发送该装置的至少一个链路编号,其中,该至少一个链路编号包括该第一目标链路编号,并且该第一目标链路编号在该报文头中所占的字节大小是根据该至少一个链路编号中最大的链路编号确定的。As an optional embodiment, the sending module 330 is further configured to: before receiving the message, send at least one link number of the device to the first device, where the at least one link number includes the first target link number , and the byte size occupied by the first target link number in the packet header is determined according to the largest link number among the at least one link number.
作为一个可选实施例,该报文的报文头还携带:该报文的生存时间TTL;该接收模块310还用于:在确定该装置的节点编号之前,接收第一设备发送的最大转发节点个数L,该L为大于或等于N的整数;该确定模块320具体用于:根据该L和该报文头中携带的该TTL,确定该装置的节点编号。As an optional embodiment, the message header of the message also carries: the time-to-live TTL of the message; the receiving module 310 is also configured to: before determining the node number of the device, receive the maximum forwarding time sent by the first device The number of nodes L, where L is an integer greater than or equal to N; the determining module 320 is specifically configured to: determine the node number of the device according to the L and the TTL carried in the packet header.
作为一个可选实施例,该确定模块320具体还用于:将该TTL对该L的求余结果确定为该装置的节点编号。As an optional embodiment, the determining module 320 is specifically further configured to: determine the result of the remainder of the TTL on L as the node number of the device.
作为一个可选实施例,述报文的报文头还携带:该报文的当前传输跳数;该确定模块320具体还用于:将该报文头中的当前传输跳数的值确定为该装置的节点编号。As an optional embodiment, the message header of the message also carries: the current transmission hop count of the message; the determining module 320 is specifically further configured to: determine the value of the current transmission hop count in the message header as The node number of the device.
作为一个可选实施例,该装置300还包括:更新模块:用于在该第一目标链路编号对应的链路上转发该报文之前,将该报文头中的当前传输跳数的值更新为该装置的节点编号加1。As an optional embodiment, the apparatus 300 also includes: an update module: used to, before forwarding the message on the link corresponding to the first target link number, change the value of the current transmission hop number in the message header to It is updated by adding 1 to the node number of the device.
应理解,这里的装置300以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(Application Specific Integrated Circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置300可以具体为上述实施例中的第一网络节点,装置300可以用于执行上述方法实施例中与第一网络节点对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the apparatus 300 here is embodied in the form of functional modules. The term "module" here may refer to an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality. In an optional example, those skilled in the art can understand that the device 300 may specifically be the first network node in the above embodiment, and the device 300 may be used to execute the processes and processes corresponding to the first network node in the above method embodiment. /or steps, in order to avoid repetition, no more details are given here.
如图5示出了本发明实施例的传输数据的装置400,该装置400包括:Figure 5 shows a device 400 for transmitting data according to an embodiment of the present invention, and the device 400 includes:
确定模块410,用于确定报文的转发路径,该转发路径包括N个网络节点,N为大于或等于2的整数;A determining module 410, configured to determine a forwarding path of the message, the forwarding path includes N network nodes, and N is an integer greater than or equal to 2;
该确定模块410还用于:确定该转发路径的指示信息,该指示信息N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该N个网络节点,该报文的报文头携带该转发路径的指示信息。The determining module 410 is also used to: determine the indication information of the forwarding path, the target link number corresponding to each node number in the N node numbers of the indication information, the N node numbers corresponding to the N network nodes, the report The header of the message carries the indication information of the forwarding path.
作为一个可选实施例,该装置400还包括:第一获取模块,用于在确定该转发路径的指示信息之前,获取该N个网络节点中的第i个网络节点的至少一个链路编号;该确定模块410具体用于:根据该转发路径,在该第i个网络节点的至少一个链路编号中确定该第i个网络节点的目标链路编号,i为大于0且小于或等于N的整数。As an optional embodiment, the apparatus 400 further includes: a first obtaining module, configured to obtain at least one link number of the i-th network node among the N network nodes before determining the indication information of the forwarding path; The determining module 410 is specifically configured to: determine the target link number of the i-th network node in at least one link number of the i-th network node according to the forwarding path, where i is greater than 0 and less than or equal to N integer.
作为一个可选实施例,该确定模块410还用于:在获取该N个网络节点中的第i个网络节点的至少一个链路编号之后,根据该i个网络节点的至少一个链路编号中最大的链路编号,确定该第i个网络节点的目标链路编号在该报文中所占的字节大小。As an optional embodiment, the determining module 410 is further configured to: after obtaining at least one link number of the i-th network node among the N network nodes, according to at least one link number of the i network node The largest link number determines the byte size occupied by the target link number of the i-th network node in the message.
作为一个可选实施例,该确定模块410还用于:在该确定该转发路径的指示信息之前,根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L,其中,该L为大于或等于N的整数;该确定模块410具体还用于:根据该L以及该N个网络节点中每个网络节点对应的该报文的生存时间,确定该每个网络节点的节点编号,该第一设备确定所与每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the determining module 410 is also configured to: before determining the indication information of the forwarding path, according to the current network topology, determine the maximum number L of forwarding nodes that the message can pass through, where the L is an integer greater than or equal to N; the determination module 410 is specifically further configured to: determine the node number of each network node according to the L and the lifetime of the message corresponding to each network node in the N network nodes, The first device determines the target link number corresponding to the node number of each network node.
作为一个可选实施例,该确定模块410具体还用于:将该N个网络节点中每个网络节点对应的该报文的生存时间对L求余的结果确定为该每个网络节点的节点编号,确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the determining module 410 is specifically further configured to: determine the result of the remainder of the survival time of the packet corresponding to each of the N network nodes with respect to L as the node of each network node number, and determine the target link number corresponding to the node number of each network node.
作为一个可选实施例,该确定模块410具体还用于:将该N个网络节点中每个网络节点在该转发路径中对应的转发跳数确定为该每个网络节点的节点编号,确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the determining module 410 is specifically further configured to: determine the corresponding forwarding hop number of each of the N network nodes in the forwarding path as the node number of each network node, and determine the The target link number corresponding to the node number of each network node.
作为一个可选实施例,该确定模块410还用于:在该确定报文的转发路径之后,确定该报文的转发跳数的初始值,该报文的报文头携带该转发跳数的初始值。As an optional embodiment, the determining module 410 is further configured to: after determining the forwarding path of the message, determine the initial value of the forwarding hop count of the message, and the message header of the message carries the forwarding hop count initial value.
作为一个可选实施例,该装置400还包括:第二获取模块,用于在该确定报文的转发路径之前,获取该报文的源地址和目的地址以及当前网络拓扑结构中多个网络节点中每个网络节点的当前流量信息;该确定模块410还用于:根据该源地址和目的地址以及该多个网络节点中每个网络节点的当前流量信息,确定该转发路径。As an optional embodiment, the apparatus 400 further includes: a second obtaining module, configured to obtain the source address and destination address of the message and multiple network nodes in the current network topology before determining the forwarding path of the message The current flow information of each network node; the determining module 410 is also configured to: determine the forwarding path according to the source address and destination address and the current flow information of each network node in the plurality of network nodes.
作为一个可选实施例,该装置400还包括:第一发送模块,用于在该根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L之后,向该N个网络节点中每个网络节点发送该L。As an optional embodiment, the device 400 further includes: a first sending module, configured to send the message to the N network nodes after determining the maximum number L of forwarding nodes that the message can pass through according to the current network topology Each network node sends this L.
作为一个可选实施例,该装置400为该报文的源网络节点,该装置400还包括:第二发送模块,用于在该装置确定该转发路径的指示信息之后,根据该转发路径转发该报文。As an optional embodiment, the device 400 is the source network node of the message, and the device 400 further includes: a second sending module, configured to forward the message according to the forwarding path after the device determines the indication information of the forwarding path message.
作为一个可选实施例,该装置400为控制器;该装置400还包括:第三发送模块,用于在该装置确定该转发路径的指示信息之后,向该报文的源网络节点发送该指示信息,该N个网络节点包括该源网络节点。As an optional embodiment, the device 400 is a controller; the device 400 also includes: a third sending module, configured to send the indication to the source network node of the packet after the device determines the indication information of the forwarding path Information, the N network nodes include the source network node.
应理解,这里的装置400以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(Application Specific Integrated Circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置400可以具体为上述实施例中的第一设备,装置400可以用于执行上述方法实施例中与第一设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the device 400 here is embodied in the form of functional modules. The term "module" here may refer to an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality. In an optional example, those skilled in the art can understand that the apparatus 400 may specifically be the first device in the above-mentioned embodiment, and the apparatus 400 may be used to execute each process corresponding to the first device in the above-mentioned method embodiment and/or The steps are not repeated here to avoid repetition.
图6示出了本发明实施例提供的传输数据的装置500,该装置500包括接收器510、处理器520、发送器530、存储器540和总线系统550。其中,接收器510、处理器520、发送器530和存储器540通过总线系统550相连,该存储器540用于存储指令,该处理器520用于执行该存储器540存储的指令,以控制该接收器510接收信号,并控制该发送器530发送指令。FIG. 6 shows an apparatus 500 for transmitting data provided by an embodiment of the present invention. The apparatus 500 includes a receiver 510 , a processor 520 , a transmitter 530 , a memory 540 and a bus system 550 . Wherein, the receiver 510, the processor 520, the transmitter 530 and the memory 540 are connected through a bus system 550, the memory 540 is used to store instructions, and the processor 520 is used to execute the instructions stored in the memory 540 to control the receiver 510 Receive signals, and control the transmitter 530 to send commands.
其中,该接收器510用于接收报文,该报文的报文头携带指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该报文的转发路径上的N个网络节点,N为大于或等于2的整数;该处理器520用于确定该装置的节点编号;该处理器520还用于根据该报文的报文头,确定与该装置的节点编号对应的第一目标链路编号;该发送器530用于在该第一目标链路编号对应的链路上转发该报文。Wherein, the receiver 510 is used to receive a message, and the message header of the message carries indication information, and the indication information is used to indicate the target link number corresponding to each node number in the N node numbers, and the N node numbers Corresponding to N network nodes on the forwarding path of the message, N is an integer greater than or equal to 2; the processor 520 is used to determine the node number of the device; the processor 520 is also used to The header is used to determine the first target link number corresponding to the node number of the device; the sender 530 is configured to forward the message on the link corresponding to the first target link number.
作为一个可选实施例,该发送器530还用于:在接收报文之前,向第一设备发送装置500的至少一个链路编号,其中,该至少一个链路编号包括该第一目标链路编号,并且该第一目标链路编号在该报文头中所占的字节大小是根据该至少一个链路编号中最大的链路编号确定的。As an optional embodiment, the sender 530 is further configured to: before receiving the message, send at least one link number of the apparatus 500 to the first device, where the at least one link number includes the first target link number number, and the byte size occupied by the first target link number in the packet header is determined according to the largest link number among the at least one link number.
作为一个可选实施例,该报文的报文头还携带:该报文的生存时间TTL;该接收器510还用于:在确定该装置的节点编号之前,接收第一设备发送的最大转发节点个数L,该L为大于或等于N的整数;该处理器520具体用于:根据该L和该报文头中携带的该TTL,确定该装置的节点编号。As an optional embodiment, the message header of the message also carries: the time-to-live TTL of the message; the receiver 510 is also used to: before determining the node number of the device, receive the maximum forwarding value sent by the first device The number of nodes L, where L is an integer greater than or equal to N; the processor 520 is specifically configured to: determine the node number of the device according to the L and the TTL carried in the packet header.
作为一个可选实施例,该处理器520具体还用于:将该TTL对该L的求余结果确定为该第一网络节点的节点编号。As an optional embodiment, the processor 520 is specifically further configured to: determine a result of the remainder of the TTL on L as the node number of the first network node.
作为一个可选实施例,该报文的报文头还携带:该报文的当前传输跳数;该处理器520具体还用于:将该报文头中的当前传输跳数的值确定为该装置的节点编号。As an optional embodiment, the message header of the message also carries: the current transmission hop count of the message; the processor 520 is further configured to: determine the value of the current transmission hop count in the message header as The node number of the device.
作为一个可选实施例,该处理器520还用于:用于在该第一目标链路编号对应的链路上转发该报文之前,将该报文头中的当前传输跳数的值更新为该第一网络节点的节点编号加1。As an optional embodiment, the processor 520 is further configured to: before forwarding the message on the link corresponding to the first target link number, update the value of the current transmission hop count in the message header Add 1 to the node number of the first network node.
应理解,装置500可以具体为上述实施例中的第一网络节点,并且可以用于执行上述方法实施例中与第一网络节点对应的各个步骤和/或流程。可选地,该存储器540可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器520可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与第一网络节点对应的各个步骤。It should be understood that the apparatus 500 may specifically be the first network node in the foregoing embodiments, and may be configured to execute various steps and/or processes corresponding to the first network node in the foregoing method embodiments. Optionally, the memory 540 may include read-only memory and random-access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 520 may be configured to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute various steps corresponding to the first network node in the foregoing method embodiments.
图7示出了本发明实施例提供的传输数据的装置600,该装置600包括接收器610、处理器620、发送器630、存储器640和总线系统650。其中,接收器610、处理器620、发送器630和存储器640通过总线系统650相连,该存储器640用于存储指令,该处理器620用于执行该存储器640存储的指令,以控制该接收器610接收信号,并控制该发送器630发送指令。FIG. 7 shows an apparatus 600 for transmitting data provided by an embodiment of the present invention. The apparatus 600 includes a receiver 610 , a processor 620 , a transmitter 630 , a memory 640 and a bus system 650 . Wherein, the receiver 610, the processor 620, the transmitter 630 and the memory 640 are connected through a bus system 650, the memory 640 is used to store instructions, and the processor 620 is used to execute the instructions stored in the memory 640 to control the receiver 610 Receive signals, and control the transmitter 630 to send commands.
其中,该处理器620用于确定报文的转发路径,该转发路径包括N个网络节点,N为大于或等于2的整数;该处理器620还用于:确定该转发路径的指示信息,该指示信息用于指示N个节点编号中每个节点编号对应的目标链路编号,该N个节点编号对应于该N个网络节点,该报文的报文头携带该转发路径的指示信息。Wherein, the processor 620 is used to determine the forwarding path of the message, the forwarding path includes N network nodes, and N is an integer greater than or equal to 2; the processor 620 is also used to: determine the indication information of the forwarding path, the The indication information is used to indicate the target link number corresponding to each node number in the N node numbers corresponding to the N network nodes, and the message header of the message carries the indication information of the forwarding path.
作为一个可选实施例,接收器610用于:在确定该转发路径的指示信息之前,获取该N个网络节点中的第i个网络节点的至少一个链路编号;该处理器620具体用于:根据该转发路径,在该第i个网络节点的至少一个链路编号中确定该第i个网络节点的目标链路编号,i为大于0且小于或等于N的整数。As an optional embodiment, the receiver 610 is configured to: obtain at least one link number of the i-th network node among the N network nodes before determining the indication information of the forwarding path; the processor 620 is specifically used to : According to the forwarding path, determine the target link number of the i-th network node from at least one link number of the i-th network node, where i is an integer greater than 0 and less than or equal to N.
作为一个可选实施例,该处理器620还用于:在获取该N个网络节点中的第i个网络节点的至少一个链路编号之后,根据该i个网络节点的至少一个链路编号中最大的链路编号,确定该第i个网络节点的目标链路编号在该报文中所占的字节大小。As an optional embodiment, the processor 620 is further configured to: after acquiring at least one link number of the i-th network node among the N network nodes, according to at least one link number of the i-th network node The largest link number determines the byte size occupied by the target link number of the i-th network node in the message.
作为一个可选实施例,该处理器620还用于:在该确定该转发路径的指示信息之前,根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L,其中,该L为大于或等于N的整数;该处理器620具体还用于:根据该L以及该N个网络节点中每个网络节点对应的该报文的生存时间,确定该每个网络节点的节点编号,确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the processor 620 is also configured to: before determining the indication information of the forwarding path, according to the current network topology, determine the maximum number L of forwarding nodes that the message can pass through, where the L is an integer greater than or equal to N; the processor 620 is specifically further configured to: determine the node number of each network node according to the L and the lifetime of the message corresponding to each network node in the N network nodes, A target link number corresponding to the node number of each network node is determined.
作为一个可选实施例,该处理器620具体还用于:将该N个网络节点中每个网络节点对应的该报文的生存时间对L求余的结果确定为该每个网络节点的节点编号,确定与该每个网络节点的节点编号对应的目标链路编号。As an optional embodiment, the processor 620 is specifically further configured to: determine the result of the remainder of the survival time of the packet corresponding to each of the N network nodes with respect to L as the node of each network node number, and determine the target link number corresponding to the node number of each network node.
作为一个可选实施例,该处理器620具体还用于:将该N个网络节点中每个网络节点在该转发路径中对应的转发跳数确定为该每个网络节点的节点编号。As an optional embodiment, the processor 620 is specifically further configured to: determine the corresponding forwarding hop number of each network node in the forwarding path among the N network nodes as the node number of each network node.
作为一个可选实施例,接收器610用于:在该确定报文的转发路径之前,获取该报文的源地址和目的地址以及当前网络拓扑结构中多个网络节点中每个网络节点的当前流量信息;该处理器620还用于:根据该源地址和目的地址以及该多个网络节点中每个网络节点的当前流量信息,确定该转发路径。As an optional embodiment, the receiver 610 is configured to: before determining the forwarding path of the message, obtain the source address and destination address of the message and the current address of each network node among the multiple network nodes in the current network topology. Traffic information; the processor 620 is further configured to: determine the forwarding path according to the source address and destination address and the current traffic information of each network node in the plurality of network nodes.
作为一个可选实施例,发送器630用于:在该根据当前网络拓扑结构,确定该报文能够经过的最大转发节点个数L之后,向该N个网络节点中每个网络节点发送该L。As an optional embodiment, the sender 630 is configured to: after determining the maximum number L of forwarding nodes that the message can pass through according to the current network topology, send the L to each of the N network nodes .
作为一个可选实施例,该装置600为该报文的源网络节点,该发送器630还用于:该装置600确定该转发路径的指示信息之后,根据该指示信息转发该报文。As an optional embodiment, the device 600 is the source network node of the message, and the transmitter 630 is further configured to: after the device 600 determines the indication information of the forwarding path, forward the message according to the indication information.
作为一个可选实施例,该装置600为控制器;该发送器630还用于:该装置600确定该转发路径的指示信息之后,向该报文的源网络节点发送该路径的指示信息,该N个网络节点包括该源网络节点。As an optional embodiment, the device 600 is a controller; the transmitter 630 is also configured to: after the device 600 determines the indication information of the forwarding path, send the indication information of the path to the source network node of the message, the N network nodes include the source network node.
应理解,装置600可以具体为上述实施例中的第一设备,并且可以用于执行上述方法实施例中与第一设备对应的各个步骤和/或流程。可选地,该存储器640可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器620可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与第一设备对应的各个步骤。It should be understood that the apparatus 600 may specifically be the first device in the foregoing embodiments, and may be configured to execute various steps and/or processes corresponding to the first device in the foregoing method embodiments. Optionally, the memory 640 may include read-only memory and random-access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 620 may be configured to execute an instruction stored in a memory, and when the processor executes the instruction, the processor may execute various steps corresponding to the first device in the foregoing method embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that, in combination with the various method steps and units described in the embodiments disclosed herein, they can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the possibility of hardware and software For interchangeability, in the above description, the steps and components of each embodiment have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each particular application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例该方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称为“ROM”)、随机存取存储器(Random Access Memory,简称为“RAM”)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium In the above, several instructions are included to make a computer device (which may be a personal computer, server, or network device, etc.) execute all or part of the steps of the method in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as "ROM"), random access memory (Random Access Memory, referred to as "RAM"), magnetic disk or optical disc, etc. Various media that can store program code.
以上该,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications within the technical scope disclosed in the present invention. Or replacement, these modifications or replacements should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (30)
- A kind of 1. method for transmitting data, it is characterised in that methods described includes:First network node receives message, and the heading of the message carries configured information, the instruction letter Cease for indicating each numbering of Target Link corresponding to node serial number in N number of node serial number, it is described N number of N number of network node that node serial number corresponds on the forward-path of the message, N are more than or equal to 2 Integer;The first network node determines the node serial number of the first network node;The first network node according to the heading of the message, it is determined that with the first network node First object link number corresponding to node serial number;The first network node is forwarding the report corresponding to the first object link number on link Text.
- 2. according to the method for claim 1, it is characterised in that connect in the first network node Before receiving text, methods described also includes:The first network node sends at least one link of the first network node to the first equipment Numbering, wherein, at least one link number includes the first object link number, and described First object link number byte-sized shared in the heading is according at least one chain Maximum link number determines in the numbering of road.
- 3. method according to claim 1 or 2, it is characterised in that the heading of the message Also carry:The life span TTL of the message;Before the node serial number that the first network node determines the first network node, methods described Also include:The first network node receives max-forwards the node number L, the L that the first equipment is sent Integer more than or equal to N;The first network node determines the node serial number of the first network node, including:The first network node determines institute according to the TTL carried in the L and the heading State the node serial number of first network node.
- 4. method according to claim 1 or 2, it is characterised in that the heading of the message Also carry:The current transmission hop count of the message;The first network node determines the node serial number of the first network node, including:The value of current transmission hop count in the heading is defined as described by the first network node The node serial number of one network node.
- 5. according to the method for claim 4, it is characterised in that exist in the first network node Before forwarding the message on link corresponding to the first object link number, methods described also includes:The value of current transmission hop count in the heading is updated to described by the first network node The node serial number of one network node adds 1.
- A kind of 6. method for transmitting data, it is characterised in that methods described includes:First equipment determines the forward-path of message, and the forward-path includes N number of network node, and N is Integer more than or equal to 2;First equipment determines the configured information of the forward-path, and the configured information is used to indicate N Each numbering of Target Link corresponding to node serial number, N number of node serial number correspond in individual node serial number N number of network node, the heading of the message carry the configured information.
- 7. according to the method for claim 6, it is characterised in that determine institute in first equipment Before the configured information for stating forward-path, methods described also includes:First equipment obtains at least one chain of i-th of network node in N number of network node Number on road;First equipment determines the configured information of the forward-path, including:First equipment is according to the forward-path, at least one chain of i-th of network node The Target Link numbering of i-th of network node is determined in the numbering of road, i is more than 0 and is less than or waits In N integer.
- 8. according to the method described in right 7, it is characterised in that obtain the N in first equipment After at least one link number of i-th of network node in individual network node, methods described also includes:First equipment link maximum at least one link number according to the i network node Numbering, determine that the byte that the Target Link of i-th of network node is numbered shared by the message is big It is small.
- 9. the method according to any one of claim 6 to 8, it is characterised in that described Before one equipment determines the configured information of the forward-path, methods described also includes:According to current network topology structure, the maximum that determining the message can pass through turns first equipment Node number L is sent out, wherein, the L is the integer more than or equal to N;First equipment determines the configured information of the forward-path, including:First equipment is corresponding according to each network node in the L and N number of network node The message life span, determine the node serial number of each network node;First equipment determines that Target Link corresponding with the node serial number of each network node is compiled Number.
- 10. the method according to any one of claim 6 to 8, it is characterised in that described first Equipment determines the configured information of the forward-path, including:First equipment is by each network node in N number of network node in the forward-path Corresponding forwarding hop count is defined as the node serial number of each network node;First equipment determines that Target Link corresponding with the node serial number of each network node is compiled Number.
- 11. the method according to any one of claim 6 to 10, it is characterised in that described After first equipment determines the forward-path of message, methods described also includes:First equipment determines the initial value of the forwarding hop count of the message, and the heading of the message is taken Initial value with the forwarding hop count.
- 12. the method according to any one of claim 6 to 11, it is characterised in that described Before first equipment determines the forward-path of message, methods described also includes:First equipment obtains the source address and destination address and current network topology knot of the message In structure in multiple network nodes each network node current traffic information;First equipment determines the forward-path of message, including:First equipment is according to every in the source address and destination address and the multiple network node The current traffic information of individual network node, determine the forward-path.
- 13. according to the method for claim 9, it is characterised in that first equipment according to ought Preceding network topology structure, it is described after determining the max-forwards node number L that the message can pass through Method also includes:First equipment each network node into N number of network node sends the L.
- 14. the method according to any one of claim 6 to 13, it is characterised in that described One equipment is the source network node of the message,After first equipment determines the configured information of the forward-path, methods described also includes:The source network node forwards the message according to the configured information.
- 15. the method according to any one of claim 6 to 13, it is characterised in that described One equipment is controller;After first equipment determines the configured information of the forward-path, methods described also includes:The controller sends the configured information, N number of network to the source network node of the message Node includes the source network node.
- 16. a kind of device for transmitting data, it is characterised in that described device includes:Receiving module, for receiving message, the heading of the message carries configured information, the instruction Information is used to indicate each numbering of Target Link corresponding to node serial number, the N in N number of node serial number Individual node serial number correspond to the message forward-path on N number of network node, N be more than or equal to 2 integer;Determining module, for determining the node serial number of described device;The determining module is additionally operable to the heading according to the message, it is determined that being compiled with the node of described device First object link number corresponding to number;Sending module, for forwarding the message on link corresponding to the first object link number.
- 17. device according to claim 16, it is characterised in that the sending module is additionally operable to:Before message is received, at least one link number of described device is sent to the first equipment, wherein, At least one link number includes the first object link number, and the first object link It is according to maximum at least one link number to number shared byte-sized in the heading Link number determine.
- 18. the device according to claim 16 or 17, it is characterised in that the message of the message Head also carries:The life span TTL of the message;The receiving module is additionally operable to:It is determined that before the node serial number of described device, the first equipment is received Max-forwards the node number L, the L of transmission are the integer more than or equal to N;The determining module is specifically used for:According to the TTL carried in the L and the heading, Determine the node serial number of described device.
- 19. the device according to claim 16 or 17, it is characterised in that the message of the message Head also carries:The current transmission hop count of the message;The determining module is specifically additionally operable to:The value of current transmission hop count in the heading is defined as The node serial number of described device.
- 20. device according to claim 19, it is characterised in that described device also includes:Update module:For forwarded corresponding to the first object link number on link the message it Before, the node serial number that the value of the current transmission hop count in the heading is updated to described device adds 1.
- 21. a kind of device for transmitting data, it is characterised in that described device includes:Determining module, for determining the forward-path of message, the forward-path includes N number of network node, N is the integer more than or equal to 2;The determining module is additionally operable to:The configured information of the forward-path is determined, the configured information is used Target Link numbering, N number of node corresponding to each node serial number in the N number of node serial number of instruction Numbering corresponds to N number of network node, and the heading of the message carries the configured information.
- 22. device according to claim 21, it is characterised in that described device also includes:First acquisition module, for it is determined that before the configured information of the forward-path, obtaining the N At least one link number of i-th of network node in individual network node;The determining module is specifically used for:According to the forward-path, in i-th of network node The Target Link numbering of i-th of network node is determined at least one link number, i is more than 0 And the integer less than or equal to N.
- 23. according to the device described in right 22, it is characterised in that the determining module is additionally operable to:After at least one link number of i-th of network node in obtaining N number of network node, According to link number maximum at least one link number of the i network node, described is determined The Target Link of i network node numbers shared byte-sized in the message.
- 24. the device according to any one of claim 21 to 23, it is characterised in that described true Cover half block is additionally operable to:Before the configured information for determining the forward-path, according to current network topology structure, really The max-forwards node number L that the fixed message can pass through, wherein, the L is more than or equal to N Integer;The determining module is specifically additionally operable to:According to the message corresponding to each network node in the L and N number of network node Life span, determine the node serial number of each network node;It is determined that with each network node Target Link corresponding to node serial number is numbered.
- 25. the device according to any one of claim 21 to 23, it is characterised in that described true Cover half block is specifically additionally operable to:By each network node in N number of network node, corresponding forwarding is jumped in the forward-path Number is defined as the node serial number of each network node;It is determined that Target Link corresponding with the node serial number of each network node is numbered.
- 26. the device according to any one of claim 21 to 25, it is characterised in that described true Cover half block is additionally operable to:After the forward-path of the determination message, the initial value of the forwarding hop count of the message is determined, The heading of the message carries the initial value of the forwarding hop count.
- 27. the device according to any one of claim 21 to 26, it is characterised in that the dress Putting also includes:Second acquisition module, for before the forward-path of the determination message, obtaining the message Each network node in multiple network nodes in source address and destination address and current network topology structure Current traffic information;The determining module is additionally operable to:According to the source address and destination address and the multiple network section The current traffic information of each network node, determines the forward-path in point.
- 28. device according to claim 24, it is characterised in that described device also includes:First sending module, for, according to current network topology structure, determining that the message can described After the max-forwards node number L of process, each network node hair into N number of network node Send the L.
- 29. the device according to any one of claim 21 to 28, it is characterised in that the dress The source network node of the message is set to,Described device also includes:Second sending module, for determine the forward-path in described device configured information after, root The message is forwarded according to the forward-path.
- 30. the device according to any one of claim 21 to 28, it is characterised in that the dress It is set to controller;Described device also includes:3rd sending module, for determine the forward-path in described device configured information after, to The source network node of the message sends the configured information, and N number of network node includes the source net Network node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610284852.7A CN107342939B (en) | 2016-04-29 | 2016-04-29 | Method and device for transmitting data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610284852.7A CN107342939B (en) | 2016-04-29 | 2016-04-29 | Method and device for transmitting data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107342939A true CN107342939A (en) | 2017-11-10 |
CN107342939B CN107342939B (en) | 2020-02-14 |
Family
ID=60222766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610284852.7A Active CN107342939B (en) | 2016-04-29 | 2016-04-29 | Method and device for transmitting data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107342939B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110474853A (en) * | 2018-05-11 | 2019-11-19 | 华为技术有限公司 | A kind of method, network node and system that message is sent |
WO2019218813A1 (en) * | 2018-05-18 | 2019-11-21 | 华为技术有限公司 | Method and device for routing |
CN111385199A (en) * | 2018-12-28 | 2020-07-07 | 瞻博网络公司 | Compressed Routing Header |
CN111966595A (en) * | 2020-08-13 | 2020-11-20 | 安徽芯纪元科技有限公司 | Chip positioning method in software debugging system and debugging message transmission method |
CN112272143A (en) * | 2020-12-12 | 2021-01-26 | 广东睿江云计算股份有限公司 | Route learning and forwarding method |
CN112398732A (en) * | 2019-08-12 | 2021-02-23 | 迈普通信技术股份有限公司 | Message processing method, device and system |
CN113364679A (en) * | 2020-03-06 | 2021-09-07 | 华为技术有限公司 | Segmented routing-based forwarding control method, message forwarding method and device |
CN113395206A (en) * | 2020-03-13 | 2021-09-14 | 华为技术有限公司 | Route determining method, device and network equipment |
CN113489641A (en) * | 2017-12-22 | 2021-10-08 | 华为技术有限公司 | Method and node for transmitting message in network |
US11412071B2 (en) | 2019-05-13 | 2022-08-09 | Juniper Networks, Inc. | Compressed routing header information for networks |
CN114915582A (en) * | 2021-02-09 | 2022-08-16 | 华为技术有限公司 | Message forwarding method, device and system |
CN115118544A (en) * | 2021-03-08 | 2022-09-27 | 北京华为数字技术有限公司 | Communication method and device, and communication system |
CN115883452A (en) * | 2021-09-27 | 2023-03-31 | 华为技术有限公司 | Communication method and communication device |
CN118869575A (en) * | 2024-09-29 | 2024-10-29 | 山东云海国创云计算装备产业创新中心有限公司 | Method for dividing target node set, electronic device, and computer program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217498A (en) * | 2008-01-18 | 2008-07-09 | 北京科技大学 | Pathfinding method for self-organizing network based on point-by-point decision-making of data packets |
CN101931587A (en) * | 2009-06-19 | 2010-12-29 | 华为技术有限公司 | Virtual cluster routing method and system |
CN102014043A (en) * | 2009-09-08 | 2011-04-13 | 中兴通讯股份有限公司 | Address mapping system, data transmission method and address mapping maintenance method |
CN103475581A (en) * | 2012-06-06 | 2013-12-25 | 华为技术有限公司 | Network tab distribution method, equipment and system |
CN104580025A (en) * | 2013-10-18 | 2015-04-29 | 华为技术有限公司 | Method for establishing in-band connection in open flow network and switch |
-
2016
- 2016-04-29 CN CN201610284852.7A patent/CN107342939B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217498A (en) * | 2008-01-18 | 2008-07-09 | 北京科技大学 | Pathfinding method for self-organizing network based on point-by-point decision-making of data packets |
CN101931587A (en) * | 2009-06-19 | 2010-12-29 | 华为技术有限公司 | Virtual cluster routing method and system |
CN102014043A (en) * | 2009-09-08 | 2011-04-13 | 中兴通讯股份有限公司 | Address mapping system, data transmission method and address mapping maintenance method |
CN103475581A (en) * | 2012-06-06 | 2013-12-25 | 华为技术有限公司 | Network tab distribution method, equipment and system |
CN104580025A (en) * | 2013-10-18 | 2015-04-29 | 华为技术有限公司 | Method for establishing in-band connection in open flow network and switch |
Cited By (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113489641A (en) * | 2017-12-22 | 2021-10-08 | 华为技术有限公司 | Method and node for transmitting message in network |
CN110474853A (en) * | 2018-05-11 | 2019-11-19 | 华为技术有限公司 | A kind of method, network node and system that message is sent |
US12047291B2 (en) | 2018-05-11 | 2024-07-23 | Huawei Technologies Co., Ltd. | Packet sending method, network node, and system |
CN110474853B (en) * | 2018-05-11 | 2022-10-18 | 华为技术有限公司 | Message sending method, network node and system |
US11792124B2 (en) | 2018-05-18 | 2023-10-17 | Huawei Technologies Co., Ltd. | Routing method and apparatus to transmit data packets to nodes |
WO2019218813A1 (en) * | 2018-05-18 | 2019-11-21 | 华为技术有限公司 | Method and device for routing |
CN111385199A (en) * | 2018-12-28 | 2020-07-07 | 瞻博网络公司 | Compressed Routing Header |
US11902153B1 (en) | 2018-12-28 | 2024-02-13 | Juniper Networks, Inc. | Compressed routing header |
US11245617B1 (en) | 2018-12-28 | 2022-02-08 | Juniper Networks, Inc. | Compressed routing header |
CN115733784A (en) * | 2018-12-28 | 2023-03-03 | 瞻博网络公司 | Compressed Routing Header |
US11412071B2 (en) | 2019-05-13 | 2022-08-09 | Juniper Networks, Inc. | Compressed routing header information for networks |
CN112398732A (en) * | 2019-08-12 | 2021-02-23 | 迈普通信技术股份有限公司 | Message processing method, device and system |
CN112398732B (en) * | 2019-08-12 | 2023-09-12 | 迈普通信技术股份有限公司 | Message processing method, device and system |
CN113364679A (en) * | 2020-03-06 | 2021-09-07 | 华为技术有限公司 | Segmented routing-based forwarding control method, message forwarding method and device |
CN113364679B (en) * | 2020-03-06 | 2023-04-18 | 华为技术有限公司 | Segmented routing based forwarding control method, message forwarding method and device |
CN113395206A (en) * | 2020-03-13 | 2021-09-14 | 华为技术有限公司 | Route determining method, device and network equipment |
US12309055B2 (en) | 2020-03-13 | 2025-05-20 | Huawei Technologies Co., Ltd. | Route determining method and apparatus and network device |
CN111966595B (en) * | 2020-08-13 | 2024-04-05 | 安徽芯纪元科技有限公司 | A chip positioning method and debugging message transmission method in a software debugging system |
CN111966595A (en) * | 2020-08-13 | 2020-11-20 | 安徽芯纪元科技有限公司 | Chip positioning method in software debugging system and debugging message transmission method |
CN112272143A (en) * | 2020-12-12 | 2021-01-26 | 广东睿江云计算股份有限公司 | Route learning and forwarding method |
CN114915582A (en) * | 2021-02-09 | 2022-08-16 | 华为技术有限公司 | Message forwarding method, device and system |
CN115118544A (en) * | 2021-03-08 | 2022-09-27 | 北京华为数字技术有限公司 | Communication method and device, and communication system |
CN115118544B (en) * | 2021-03-08 | 2024-04-12 | 北京华为数字技术有限公司 | Communication method, device, and communication system |
CN115883452A (en) * | 2021-09-27 | 2023-03-31 | 华为技术有限公司 | Communication method and communication device |
CN118869575A (en) * | 2024-09-29 | 2024-10-29 | 山东云海国创云计算装备产业创新中心有限公司 | Method for dividing target node set, electronic device, and computer program product |
CN118869575B (en) * | 2024-09-29 | 2025-01-24 | 山东云海国创云计算装备产业创新中心有限公司 | Method for dividing target node set, electronic device, and computer program product |
Also Published As
Publication number | Publication date |
---|---|
CN107342939B (en) | 2020-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107342939B (en) | Method and device for transmitting data | |
KR102555671B1 (en) | Packet processing methods, related devices and computer storage media | |
CN107517488B (en) | Message processing method and device | |
US10250501B2 (en) | Service packet forwarding method and apparatus | |
US10412008B2 (en) | Packet processing method, apparatus, and system | |
WO2018000443A1 (en) | Service function chaining (sfc)-based packet forwarding method, device and system | |
JP6501967B2 (en) | Data transmission method, related apparatus, and system | |
CN107968750B (en) | Message transmission method, device and node | |
KR102777222B1 (en) | Method, device and system for packet forwarding in SR network | |
US10644900B2 (en) | Forwarding multicast data packets using bit index explicit replication (BIER) for BIER-incapable network devices | |
US10462065B2 (en) | Path maximum transmission unit discovery | |
EP3886384B1 (en) | Methods for updating route in network, network devices, and system | |
EP3955541A1 (en) | Message processing method | |
CN112468396B (en) | Method, apparatus and system for programmability of host network performance requirements | |
US20240073128A1 (en) | Message encapsulation and de-encapsulation method and device, storage medium, and electronic device | |
EP2802173A1 (en) | Service forwarding method and device | |
US20190386837A1 (en) | Forwarding multicast data packets using bit index explicit replication (bier) for bier-incapable network devices | |
CN113923161A (en) | Message forwarding method and device | |
CN113810288A (en) | Message backhaul method and device | |
EP4214914B1 (en) | First node, second node, and methods performed thereby for configuring handling of two or more ingress member flows | |
CN116074235A (en) | Message processing method, device and system | |
CN113472653A (en) | Method and device for detecting path consistency |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |