WO2019223795A1 - 报文传输方法、通信装置和系统 - Google Patents

报文传输方法、通信装置和系统 Download PDF

Info

Publication number
WO2019223795A1
WO2019223795A1 PCT/CN2019/088397 CN2019088397W WO2019223795A1 WO 2019223795 A1 WO2019223795 A1 WO 2019223795A1 CN 2019088397 W CN2019088397 W CN 2019088397W WO 2019223795 A1 WO2019223795 A1 WO 2019223795A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
address information
subset
address
compressed
Prior art date
Application number
PCT/CN2019/088397
Other languages
English (en)
French (fr)
Inventor
任首首
于德雷
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19806754.8A priority Critical patent/EP3813318B1/en
Publication of WO2019223795A1 publication Critical patent/WO2019223795A1/zh
Priority to US17/103,297 priority patent/US11444874B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/748Address table lookup; Address filtering using longest matching prefix
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/695Types of network addresses using masks or ranges of addresses

Definitions

  • the embodiments of the present application relate to communication technologies, and in particular, to a message transmission method, communication device, and system.
  • the Internet of Things refers to the Internet where things are connected.
  • IoT Internet of Things
  • information can be exchanged and communicated between things through the Internet to achieve intelligent identification, positioning, tracking, monitoring, and management.
  • Things in IoT can be called nodes.
  • the number of nodes In most IoT scenarios, the number of nodes is large, generally in the hundreds or even thousands. Nodes play the role of data receiving and forwarding at the same time. That is, the node not only needs to receive and process the messages sent to the node by the IoT management platform, but also assumes the data forwarding task between the child nodes and the management platform.
  • the internet (protocol, IP) source routing technology is generally used to guide nodes to forward packets.
  • the so-called source route refers to the message forwarding path specified by the source node.
  • IPv6 Internet Protocol Version 6
  • the source node can add the part that the message should pass through in the address list field of the extended header of the message. Or all the address information (ie IPv6 address) of the forwarding node to specify the forwarding path of the message.
  • the node receiving the message may forward the message according to the address information of the forwarding node carried in the address list field.
  • the forwarding node mentioned here is the node that assumes the data forwarding task between the child node and the management platform in the IoT scenario.
  • the address information of a forwarding node can be called an element of the address list field.
  • the embodiments of the present application provide a message transmission method, communication device and system, which are used to solve the problem that when the IPv6 protocol is used for message transmission, the address information of each forwarding node is long (occupies 128 bits), which greatly limits The number of elements in the address list field causes technical issues that make network deployment difficult.
  • an embodiment of the present application provides a message transmission method.
  • the method can be applied to a compression node or a chip in a compression node.
  • the method is described below using the compression node as an example.
  • the method includes:
  • the message includes a first indication field, and the first indication field is used to indicate the compressed first element and the compressed second element Element, the first element and the second element are address information of different forwarding nodes, and the first element and the second element use different address compression methods;
  • the message transmission method when using the IPv6 protocol to transmit messages and using IP source routing technology to guide forwarding nodes on the message forwarding path to forward messages, it can forward messages with different compression characteristics.
  • the address information of the nodes is compressed using different address compression methods to maximize the compression of the address information of more forwarding nodes, so that the length of the compressed address information is less than 128 bits, and passes the first indication field of the message. Instruct these compressed address information to implement IP source routing. In this way, when the message length is constant, the number of indicated elements can be increased, so that the number of specifiable forwarding nodes can be increased, and the difficulty of network deployment can be reduced.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first sub-nodes.
  • Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element and the second element belong to different first subsets, and a prefix of the first subset to which the first element belongs is different from a prefix of the first subset to which the second element belongs;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are different from the elements included in the first subset, and the first Each element of the two subsets has the same prefix as the address information of the source node or the address information of the destination node;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the third element belongs to the second subset
  • the address compression method used for the third element is: removing the same prefix in the third element as the address information of the source node to obtain a compressed third element, or removing the third element The same prefix as the address information of the destination node to obtain a compressed third element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element corresponds to a media access control MAC of a forwarding node corresponding to each of the third elements Some addresses are the same;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and at least A first subset, the second subset includes at least one element, each of the first subset includes at least two elements, and the elements included in the second subset and the at least one first subset
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information or destination of the source node
  • the node's address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset, and the second element belongs to the second subset;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing the same prefix in the second element as the address information of the source node to obtain a compressed second element, or removing the second element And the same prefix as the address information of the destination node to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset, and the third element corresponds to each of the third elements
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least a first subset
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and The MAC address of the media access control of the forwarding node corresponding to each of the second elements is partially the same;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a first Two elements, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node.
  • the two elements have the same part of the media access control MAC address of the forwarding node corresponding to each of the second elements;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to the second subset
  • the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, or removing the first element The same prefix as the address information of the destination node to obtain the compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the IPv6 protocol when used to transmit the message, and the IP source routing technology is used to guide the forwarding node on the message forwarding path to forward the message, there is uncompressed forwarding.
  • the address information of the node and the address information of the forwarding node with compression characteristics you can choose to compress the address information of the forwarding node with compression characteristics and uncompress the address information of the forwarding node without compression characteristics to maximize the Compress the address information of more forwarding nodes so that the length of the compressed address information is less than 128 bits, and use the first indication field of the message to indicate these compressed address information to implement IP source routing.
  • the message length is constant, the number of indicated elements can be increased, so that the number of specifiable forwarding nodes can be increased, and the difficulty of network deployment can be reduced.
  • the message further includes: a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the forwarding node receiving the message can obtain the address compression method used by the address information (ie, element) of the next forwarding node through the second indication field, so that the received message
  • the forwarding node can be based on the address compression method used by the address information (ie, the element) of the next forwarding node, and the compressed address information (ie, the compressed element) of the next forwarding node indicated by the first indication domain.
  • the forwarding node that receives the message can forward the message to the next forwarding node by using the address information of the next forwarding node to implement IP source routing.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one address.
  • An element indicated by the first indication field when the bit is a first value, instructing to use an address compression method corresponding to the first field for the element corresponding to the bit, and when the bit is the first When the value is two, it indicates that the element corresponding to the bit does not use the address compression method corresponding to the first field.
  • the first field corresponding to each address compression method can be set to indicate the address compression method used by each element indicated by the first indication field, so that the received
  • the forwarding node of the message can obtain the address compression method used by the next forwarding node's address information (that is, the element) through the second indication field, so that the forwarding node receiving the message can be based on the address information of the next forwarding node (that is, Element), the address compression method used, and the compressed address information (ie, the compressed element) of the next forwarding node indicated by the first indication domain, and restore the complete address information of the next forwarding node.
  • the forwarding node that receives the message can forward the message to the next forwarding node by using the address information of the next forwarding node to implement IP source routing.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1.
  • the second field is used to indicate that the elements indicated by the first indication field use N address compression modes in total;
  • Each of the first fields corresponds to one of N address compression modes, and one bit in each of the first fields corresponds to one element indicated by the first indication field.
  • the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the element corresponding to the bit is not used. Using the address compression method corresponding to the first field.
  • a message transmission method provided by this possible design by setting a second field indicating that the elements indicated by the first indication field use N kinds of address compression methods in total, and The first field is used to implement the address compression method used by each element indicating the first indication field, while reducing the length of the second indication field and reducing the bit overhead.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • a second indication field corresponding to the element is set to indicate the address compression method used by the element, so that the forwarding node receiving the message corresponds to the address information of the next forwarding node.
  • the second indication field of the IP address obtains the address compression method used by the address information (ie, element) of the next forwarding node, so that the forwarding node receiving the message can be based on the address information (ie, element) used by the next forwarding node.
  • the address compression method, and the compressed address information (ie, the compressed element) of the next forwarding node indicated by the first indication domain restores the complete address information of the next forwarding node. In this way, the forwarding node that receives the message can forward the message to the next forwarding node by using the address information of the next forwarding node to implement IP source routing.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field indicating the prefix information of each first subset enables the forwarding node receiving the message to be based on the address information of the next forwarding node (i.e. Element)
  • the address compression method used is to add the prefix information of the first subset to which the address information of the next forwarding node indicated by the third indication domain belongs to the next forwarding node indicated by the first indication domain after being compressed In front of the address information (that is, the compressed element), the address information of the next forwarding node is restored, so that the forwarding node can forward the packet based on the address information of the next forwarding node to implement IP source routing.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and the second part;
  • the first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the length of the prefix of the first subset is indicated by the first part of the third field, and the forwarding node receiving the message can improve the efficiency of parsing the prefix of the first subset.
  • the first indication field includes at least one fourth field; each fourth field corresponds to an element indicated by the first indication field;
  • the fourth field When the element corresponding to the fourth field belongs to the first subset, the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the element belongs to A third field corresponding to the prefix of the first subset, the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed The elements;
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate The identifier of the address information of the source node with two elements having the same prefix or the identifier of the address information of the destination node with the same prefix as the second element.
  • the second part of the fourth field is used to indicate that the element is compressed.
  • the third part of the fourth field is used to indicate the compressed element;
  • the fourth field When the element corresponding to the fourth field is partially the same as the media access control MAC address of the forwarding node corresponding to the element, the fourth field includes a first part and a second part, and the first part of the fourth field It is used to indicate the compressed length of the element, and the second part of the fourth field is used to indicate the compressed element.
  • the manner in which the fourth field indicates an element indicated by the corresponding first indication field can improve the forwarding node receiving the message to resolve the address information of the next forwarding node. effectiveness.
  • the message further includes a fourth indication field
  • the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the forwarding node when the forwarding node receiving the message needs to use the prefix information of a first subset to restore the address information of the next forwarding node, the Based on the fourth indication domain, the forwarding node quickly extracts the required first subset of prefix information from the third indication domain, and improves the forwarding node that received the message to resolve the address information of the next forwarding node from the message. s efficiency.
  • the message further includes a fifth indication field
  • the fifth indication field is used to indicate a starting position of a next element in the first indication field, and a node corresponding to the next element is a node that forwards or receives the packet next to a packet forwarding path. .
  • the forwarding node receiving the message can quickly extract the address information of the next forwarding node in the first indication domain or after the next forwarding node is compressed To improve the efficiency of the forwarding node receiving the message to parse the address information of the next forwarding node from the message.
  • the message further includes a sixth indication field
  • the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify that an element indicated by the first indication field includes a compressed element.
  • the forwarding node receiving the message can be made aware that there is a compressed element in the first indication domain, so that the forwarding node can be based on the existence of the compressed element
  • the parsing method of this method improves the parsing efficiency of the message.
  • an embodiment of the present application provides a message transmission method.
  • the method can be applied to a forwarding node that receives a message on a message forwarding path, or a chip in the forwarding node.
  • the method is described below using the forwarding node as an example.
  • the method includes:
  • the message includes a first indication field, the first indication field is used to indicate a compressed first element and a compressed second element, the first element and the second element
  • the first element and the second element For the address information of different forwarding nodes on the message forwarding path, the first element and the second element use different address compression methods;
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first sub-nodes.
  • Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element and the second element belong to different first subsets, and a prefix of the first subset to which the first element belongs is different from a prefix of the first subset to which the second element belongs;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are different from the elements included in the first subset, and the first Each element of the two subsets has the same prefix as the address information of the source node or the address information of the destination node;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the third element belongs to the second subset
  • the address compression method used for the third element is: removing the same prefix in the third element as the address information of the source node to obtain a compressed third element, or removing the third element The same prefix as the address information of the destination node to obtain a compressed third element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element corresponds to a media access control MAC of a forwarding node corresponding to each of the third elements Some addresses are the same;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and at least A first subset, the second subset includes at least one element, each of the first subset includes at least two elements, and the elements included in the second subset and the at least one first subset
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information or destination of the source node
  • the node's address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset, and the second element belongs to the second subset;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing the same prefix in the second element as the address information of the source node to obtain a compressed second element, or removing the second element And the same prefix as the address information of the destination node to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset, and the third element corresponds to each of the third elements
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least a first subset
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and The MAC address of the media access control of the forwarding node corresponding to each of the second elements is partially the same;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a first Two elements, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node.
  • the two elements have the same part of the media access control MAC address of the forwarding node corresponding to each of the second elements;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to the second subset
  • the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, or removing the first element The same prefix as the address information of the destination node to obtain the compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the message further includes: a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one address.
  • An element indicated by the first indication field when the bit is a first value, instructing to use an address compression method corresponding to the first field for the element corresponding to the bit, and when the bit is the first When the value is two, it indicates that the element corresponding to the bit does not use the address compression method corresponding to the first field.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1.
  • the second field is used to indicate that the elements indicated by the first indication field use N address compression modes in total;
  • Each of the first fields corresponds to one of N address compression modes, and one bit in each of the first fields corresponds to one element indicated by the first indication field.
  • the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the element corresponding to the bit is not used. Using the address compression method corresponding to the first field.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and the second part;
  • the first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the first indication field includes at least one fourth field; each fourth field corresponds to an element indicated by the first indication field;
  • the fourth field When the element corresponding to the fourth field belongs to the first subset, the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the element belongs to A third field corresponding to the prefix of the first subset, the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed The elements;
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate The identifier of the address information of the source node with two elements having the same prefix or the identifier of the address information of the destination node with the same prefix as the second element.
  • the second part of the fourth field is used to indicate that the element is compressed.
  • the third part of the fourth field is used to indicate the compressed element;
  • the fourth field When the element corresponding to the fourth field is partially the same as the media access control MAC address of the forwarding node corresponding to the element, the fourth field includes a first part and a second part, and the first part of the fourth field It is used to indicate the compressed length of the element, and the second part of the fourth field is used to indicate the compressed element.
  • determining the address information of the next forwarding node according to the first indication domain includes:
  • the address compression method used according to the address information of the next forwarding node, and the compressed address information of the next forwarding node indicated by the first indication domain is restored.
  • the address information of the next forwarding node includes:
  • the next forwarding node indicated by the third indication domain is based on the address compression method used by the address information of the next forwarding node Adding the prefix information of the first subset to which the address information of the IP address belongs is added in front of the compressed address information of the next forwarding node, and restoring the address information of the next forwarding node;
  • the address information of the next forwarding node belongs to the second subset
  • the address information of the source node or the destination node is converted according to an address compression method used by the address information of the next forwarding node. Adding the same prefix as the address information of the next forwarding node to the compressed address information of the next forwarding node, and restoring the address information of the next forwarding node;
  • the next forwarding node When the address information of the next forwarding node is partially the same as the media access control MAC address of the next forwarding node, according to the address compression method used by the address information of the next forwarding node, the next forwarding node
  • the media access control MAC address of a forwarding node is the same as the address information of the next forwarding node, and is added to the compressed address information of the next forwarding node to restore the address information of the next forwarding node.
  • the message further includes a fourth indication field
  • the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the message further includes a fifth indication field
  • the fifth indication field is used to indicate a starting position of a next element in the first indication field, and a node corresponding to the next element is a node that forwards or receives the packet next to a packet forwarding path. .
  • the message further includes a sixth indication field
  • the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify that an element indicated by the first indication field includes a compressed element.
  • an embodiment of the present application provides a communication device.
  • the communication device may be a compression node or a chip applied to the compression node.
  • the communication device includes:
  • a processing module configured to generate a message according to the address information of the forwarding node on the message forwarding path; the message includes a first indication field, and the first indication field is used to indicate the compressed first element and the A compressed second element, the first element and the second element are address information of different forwarding nodes, and the first element and the second element use different address compression methods;
  • a sending module configured to send the message.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first sub-nodes.
  • Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element and the second element belong to different first subsets, and a prefix of the first subset to which the first element belongs is different from a prefix of the first subset to which the second element belongs;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are different from the elements included in the first subset, and the first Each element of the two subsets has the same prefix as the address information of the source node or the address information of the destination node;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the third element belongs to the second subset
  • the address compression method used for the third element is: removing the same prefix in the third element as the address information of the source node to obtain a compressed third element, or removing the third element The same prefix as the address information of the destination node to obtain a compressed third element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element corresponds to a media access control MAC of a forwarding node corresponding to each of the third elements Some addresses are the same;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and at least A first subset, the second subset includes at least one element, each of the first subset includes at least two elements, and the elements included in the second subset and the at least one first subset
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information or destination of the source node
  • the node's address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset, and the second element belongs to the second subset;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing the same prefix in the second element as the address information of the source node to obtain a compressed second element, or removing the second element And the same prefix as the address information of the destination node to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset, and the third element corresponds to each of the third elements
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least a first subset
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and The MAC address of the media access control of the forwarding node corresponding to each of the second elements is partially the same;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a first Two elements, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node.
  • the two elements have the same part of the media access control MAC address of the forwarding node corresponding to each of the second elements;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to the second subset
  • the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, or removing the first element The same prefix as the address information of the destination node to obtain the compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the message further includes: a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one address.
  • An element indicated by the first indication field when the bit is a first value, instructing to use an address compression method corresponding to the first field for the element corresponding to the bit, and when the bit is the first When the value is two, it indicates that the element corresponding to the bit does not use the address compression method corresponding to the first field.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1.
  • the second field is used to indicate that the elements indicated by the first indication field use N address compression modes in total;
  • Each of the first fields corresponds to one of N address compression modes, and one bit in each of the first fields corresponds to one element indicated by the first indication field.
  • the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the element corresponding to the bit is not used. Using the address compression method corresponding to the first field.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and the second part;
  • the first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the first indication field includes at least one fourth field; each fourth field corresponds to an element indicated by the first indication field;
  • the fourth field When the element corresponding to the fourth field belongs to the first subset, the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the element belongs to A third field corresponding to the prefix of the first subset, the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed The elements;
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate The identifier of the address information of the source node with two elements having the same prefix or the identifier of the address information of the destination node with the same prefix as the second element.
  • the second part of the fourth field is used to indicate that the element is compressed.
  • the third part of the fourth field is used to indicate the compressed element;
  • the fourth field When the element corresponding to the fourth field is partially the same as the media access control MAC address of the forwarding node corresponding to the element, the fourth field includes a first part and a second part, and the first part of the fourth field It is used to indicate the compressed length of the element, and the second part of the fourth field is used to indicate the compressed element.
  • the message further includes a fourth indication field
  • the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the message further includes a fifth indication field
  • the fifth indication field is used to indicate a starting position of a next element in the first indication field, and a node corresponding to the next element is a node that forwards or receives the packet next to a packet forwarding path. .
  • the message further includes a sixth indication field
  • the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify that an element indicated by the first indication field includes a compressed element.
  • an embodiment of the present application provides a communication device.
  • the communication device may be a forwarding node that receives a message on a message forwarding path, or a chip applied to the forwarding node.
  • the communication device includes:
  • a receiving module configured to receive a message; the message includes a first indication field, where the first indication field is used to indicate a compressed first element and a compressed second element, the first element and The second element is address information of different forwarding nodes on a message forwarding path, and the first element and the second element use different address compression methods;
  • a processing module configured to determine address information of a next forwarding node according to the first indication domain
  • a sending module configured to send the message to the next forwarding node according to the address information of the next forwarding node.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first sub-nodes.
  • Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element and the second element belong to different first subsets, and a prefix of the first subset to which the first element belongs is different from a prefix of the first subset to which the second element belongs;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are different from the elements included in the first subset, and the first Each element of the two subsets has the same prefix as the address information of the source node or the address information of the destination node;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the third element belongs to the second subset
  • the address compression method used for the third element is: removing the same prefix in the third element as the address information of the source node to obtain a compressed third element, or removing the third element The same prefix as the address information of the destination node to obtain a compressed third element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element corresponds to a media access control MAC of a forwarding node corresponding to each of the third elements Some addresses are the same;
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and at least A first subset, the second subset includes at least one element, each of the first subset includes at least two elements, and the elements included in the second subset and the at least one first subset
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information or destination of the source node
  • the node's address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset, and the second element belongs to the second subset;
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing the same prefix in the second element as the address information of the source node to obtain a compressed second element, or removing the second element And the same prefix as the address information of the destination node to obtain a compressed second element.
  • the first indication field is further used to indicate a compressed third element, the third element is address information of a forwarding node, and the third element is related to the first element, the The address compression methods used in the second element are different;
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset, and the third element corresponds to each of the third elements
  • the address compression methods used by the third element, the first element, and the second element are different, and include:
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least a first subset
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and The MAC address of the media access control of the forwarding node corresponding to each of the second elements is partially the same;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to a first subset
  • the address compression method used for the first element is: removing a portion of the first element that is the same as a prefix of a first subset to which the first element belongs, to obtain a compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a first Two elements, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node.
  • the two elements have the same part of the media access control MAC address of the forwarding node corresponding to each of the second elements;
  • the address compression method used by the first element and the second element is different, and includes:
  • the first element belongs to the second subset
  • the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, or removing the first element The same prefix as the address information of the destination node to obtain the compressed first element;
  • the address compression method used for the second element is: removing a portion of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain a compressed second element.
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the message further includes: a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one address.
  • An element indicated by the first indication field when the bit is a first value, instructing to use an address compression method corresponding to the first field for the element corresponding to the bit, and when the bit is the first When the value is two, it indicates that the element corresponding to the bit does not use the address compression method corresponding to the first field.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1.
  • the second field is used to indicate that the elements indicated by the first indication field use N address compression modes in total;
  • Each of the first fields corresponds to one of N address compression modes, and one bit in each of the first fields corresponds to one element indicated by the first indication field.
  • the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the element corresponding to the bit is not used. Using the address compression method corresponding to the first field.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and the second part;
  • the first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the first indication field includes at least one fourth field; each fourth field corresponds to an element indicated by the first indication field;
  • the fourth field When the element corresponding to the fourth field belongs to the first subset, the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the element belongs to A third field corresponding to the prefix of the first subset, the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed The elements;
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate The identifier of the address information of the source node with two elements having the same prefix or the identifier of the address information of the destination node with the same prefix as the second element.
  • the second part of the fourth field is used to indicate that the element is compressed.
  • the third part of the fourth field is used to indicate the compressed element;
  • the fourth field When the element corresponding to the fourth field is partially the same as the media access control MAC address of the forwarding node corresponding to the element, the fourth field includes a first part and a second part, and the first part of the fourth field It is used to indicate the compressed length of the element, and the second part of the fourth field is used to indicate the compressed element.
  • the processing module is specifically configured to determine an address compression method used for address information of the next forwarding node according to the second indication domain, and according to the next forwarding node's The address compression method used for the address information, and the compressed address information of the next forwarding node indicated by the first indication domain, restores the address information of the next forwarding node.
  • the processing module is specifically configured to compress the address information of the next forwarding node according to the address used when the address information of the next forwarding node belongs to the first subset. Manner, adding the prefix information of the first subset of the address information of the next forwarding node indicated by the third indication domain to the front of the compressed address information of the next forwarding node, and restoring the next Address information of a forwarding node; and when the address information of the next forwarding node belongs to the second subset, according to an address compression method used by the address information of the next forwarding node,
  • the address information or the prefix of the destination node's address information is the same as the address information of the next forwarding node, and is added in front of the compressed address information of the next forwarding node to restore the address of the next forwarding node Information; when the address information of the next forwarding node is partially the same as the media access control MAC address of the next forwarding node, according to the next forwarding node
  • the message further includes a fourth indication field
  • the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the message further includes a fifth indication field
  • the fifth indication field is used to indicate a starting position of a next element in the first indication field, and a node corresponding to the next element is a node that forwards or receives the packet next to a packet forwarding path. .
  • the message further includes a sixth indication field
  • the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify that an element indicated by the first indication field includes a compressed element.
  • an embodiment of the present application provides a communication device.
  • the communication device includes: a processor, a memory, and a transmitter; the transmitter is coupled to the processor, and the processor controls the transmitter. Send action
  • the memory is used to store computer-executable program code, and the program code includes instructions.
  • the instructions When the processor executes the instructions, the instructions cause the communication device to perform message transmission provided by the first aspect or each possible design of the first aspect. method.
  • an embodiment of the present application provides a communication device.
  • the communication device includes: a processor, a memory, a receiver, and a transmitter.
  • the receiver and the transmitter are both coupled to the processor.
  • a processor controlling a receiving action of the receiver, and the processor controlling a transmitting action of the transmitter;
  • the memory is used to store computer-executable program code, and the program code includes instructions.
  • the instructions When the processor executes the instructions, the instructions cause the communication device to perform message transmission provided by the second aspect or each possible design of the second aspect. method.
  • an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the first aspect or each of the possible designs of the first aspect.
  • the communication device may be a compression node or a module applied to the compression node, for example, it may be a chip applied to the compression node.
  • an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the above second aspect or each possible design of the second aspect.
  • the communication device may be a forwarding node that receives a message on a message forwarding path, or a module applied to the forwarding node. For example, it may be a chip applied to the forwarding node.
  • an embodiment of the present application provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the above-mentioned first aspect or the methods in various possible designs of the first aspect.
  • an embodiment of the present application provides a computer program product including instructions, which when executed on a computer, causes the computer to execute the method in the second aspect or the various possible designs of the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium is run on a computer, causes the computer to execute the foregoing first aspect or the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, causes the computer to execute the second aspect or the second aspect.
  • an embodiment of the present application provides a communication system, where the communication system includes the third aspect or the communication device in various possible designs of the third aspect, and the fourth aspect or the fourth aspect. Communication device in various possible designs.
  • the message transmission method, communication device and system provided in the embodiments of the present application can forward messages to a forwarding node on a message forwarding path by using the IPv6 protocol to transmit the message and using IP source routing technology to guide the forwarding node on the message forwarding path.
  • the address information of forwarding nodes with different compression characteristics is compressed using different address compression methods to maximize the compression of the address information of more forwarding nodes, so that the length of the compressed address information is less than 128 bits, and the message
  • the first indication field indicates that the compressed address information is used to implement IP source routing. In this way, when the message length is constant, the number of indicated elements can be increased, so that the number of specifiable forwarding nodes can be increased, and the difficulty of network deployment can be reduced.
  • FIG. 1 is an application scenario diagram of an embodiment of this application
  • 2 is a schematic diagram of an extended packet header of an existing packet
  • FIG. 3 is a schematic flowchart of a message transmission method according to an embodiment of the present application.
  • FIG. 4 is a format of a packet header according to an embodiment of the present application.
  • FIG. 5 is another message header format provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a message transmission scenario provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another packet header according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another message transmission scenario according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another packet header according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of another communication device according to an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of still another communication device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of still another communication device according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • FIG. 1 is an application scenario diagram of an embodiment of the present application.
  • the embodiment of the present application can be applied to a scenario including a source node, a destination node, and at least one forwarding node (such as forwarding node 1 to forwarding node 6 in FIG. 1), such as an IoT network scenario and a closed group. Network scenarios, traditional IP network scenarios, etc.
  • the network where the source node, at least one forwarding node, and destination node are located may be a wired network or a wireless network.
  • the source node can send a message to the destination node through the at least one forwarding node. Therefore, the at least one forwarding node may be referred to as a forwarding node on a message forwarding path.
  • the embodiment of the present application does not limit the specific number of forwarding nodes on the message forwarding path.
  • the source node and destination node mentioned above may be a network server device or a terminal device.
  • the terminal device may also be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), or the like.
  • the terminal device can be a mobile phone, a tablet, a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, or an industrial control device. ), Wireless terminals in self-driving, wireless terminals in remote surgery, wireless terminals in smart grid, wireless terminals in transportation safety Terminal, wireless terminal in smart city, wireless terminal in smart home, handheld communication device, handheld computing device, IoT node (also referred to as IoT device. No distinction is made) and so on.
  • IoT node also referred to as IoT device. No distinction is made
  • the forwarding node mentioned above may be a forwarding device, such as a router, a gateway, or a switch, which is specifically used to forward packets.
  • the forwarding node may also be a data node having a forwarding function, such as an IoT node.
  • IP source routing technology can be used to guide the forwarding node on the message forwarding path to forward the message. That is, the source node specifies the forwarding path of the message by adding address information (referred to as an address list) of the forwarding node on the message forwarding path to the message. In this way, the forwarding node receiving the message can forward the message according to the address list carried in the message.
  • IPv6 protocol for message transmission as an example to explain how a source node adds an address list to a message in the prior art.
  • an address list field is set in the message, and the source node can add address information of the forwarding node on the message forwarding path (that is, an IPv6 address with a length of 128 bits) to the address list field. Specifies the forwarding path of the message.
  • the above address list field can be set in the extended message header of the message.
  • FIG. 2 is a schematic diagram of an extended message header of a conventional message. As shown in FIG. 2, the extended packet header may include the following fields:
  • a field used to indicate the type of the next packet header (for example, the Next Header field).
  • a field used to indicate the length of the current packet header (for example, the HdrExtLen field).
  • a field used to indicate the type of the current packet header (for example, the Routing Type field). In this example, the value of this field is 0.
  • a field for indicating the number of remaining nodes on the message forwarding path (for example, the Segment left field).
  • An address list field for indicating address information of a forwarding node on a message forwarding path for indicating address information of a forwarding node on a message forwarding path.
  • the address information that is, an IPv6 address
  • the address list field may be called an element of the address list field.
  • each forwarding node is long (occupies 128 bits)
  • the address list field will be too long, which will lead to The extended message header is too long, and the available payload of the message (that is, the field for transmitting data) becomes smaller, which greatly limits the number of elements in the address list field.
  • the IEEE 802.15.4 protocol limits the maximum frame length to 127 bytes.
  • the IoT network uses the IEEE 802.15.4 protocol to transmit messages at the second layer, in order to avoid packet fragmentation and increase because the message exceeds the maximum frame length, In the case of the processing load of the forwarding node, the size of the message needs to be limited, which further limits the number of elements in the address list field of the message.
  • an embodiment of the present application provides a message transmission method.
  • IPv6 protocol is used to transmit a message
  • IP source routing technology is used to guide a forwarding node on a message forwarding path to forward a message
  • the address information of forwarding nodes with different compression characteristics is compressed using different address compression methods to maximize the compression of the address information of more forwarding nodes, so that the length of the compressed address information is less than 128 bits
  • the address list field of the packet carries these compressed address information to implement IP source routing. In this way, when the length of the address list field of the message is unchanged, the number of elements in the address list field can be increased, thereby increasing the number of forwarding nodes that can be specified by the source node, thereby reducing the difficulty of network deployment. .
  • the execution subject of this embodiment of the present application may be a compression node, and the compression node may be a source node or a forwarding node on a packet forwarding path.
  • the compression node is a certain forwarding node on the message forwarding path
  • the node before the forwarding node may send the message without using the IP source routing technology.
  • the source node, the forwarding node 1, and the forwarding node 2 may not use IP source routing technology to send the message, but use the traditional lookup routing table. This message is sent in a manner.
  • the prior art and details are not described herein again.
  • FIG. 3 is a schematic flowchart of a message transmission method according to an embodiment of the present application. This embodiment relates to a process in which a compression node compresses address information of one or more forwarding nodes on a message forwarding path by using different address compression methods. As shown in Figure 3, the method includes:
  • S101 Generate a message according to address information of a forwarding node on a message forwarding path; the message includes a first indication field, where the first indication field is used to indicate a compressed first element and a compressed second element, The first element and the second element are address information of different forwarding nodes, and the address compression methods used by the first element and the second element are different.
  • the address information of the forwarding node on the message forwarding path can be regarded as a set of address information.
  • the address information of each forwarding node is used as an element in the address information set. It can be understood that when the compression node is the source node, the address information set may include address information of all forwarding nodes on the message forwarding path, and when the compression node is a forwarding node on the message forwarding path, the address information set may be Include address information of all forwarding nodes after the forwarding node.
  • the compression node When the compression node generates a message based on the address information set, it can first divide the elements in the address information set according to the compression characteristics of each element.
  • the compression characteristics of the elements referred to here may be, for example, the forwarding node's The media access control (MAC) address has any of the same addresses.
  • MAC media access control
  • the following compression characteristics are used as an example: they have the same prefix as other elements, the same prefix as the source node ’s address information, the same prefix as the destination node ’s address information, and the forwarding node ’s MAC address corresponding to the element itself. Introduce how the compression node divides the elements in the address information set according to the compression characteristics of each element, specifically:
  • the compression node determines whether there are elements with the same prefix in the address information set, and if so, divides the elements with the same prefix into a first subset.
  • Each first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset.
  • the prefixes of the first subsets are different, for example, the prefix lengths are different, or the prefix lengths are the same, but the prefix contents are different.
  • the compression node determines whether there is an element in the address information set that has the same prefix as the address information of the source node or the address information of the destination node. If present, divide these elements into a second subset. It can be understood that, for the elements in the second subset that have the same prefix as the address information of the source node, the length of the same prefix of each element and the address information of the source node may be the same or different. Correspondingly, for elements in the second subset that have the same prefix as the address information of the destination node, the length of the same prefix of each element and the address information of the destination node may be the same or different.
  • the compression node determines whether there is a part of the MAC address of the forwarding node corresponding to the element itself in the address information set, and if there are, the elements are divided into a third subset. It can be understood that the length of the same part of each element in the third subset and the MAC address of the forwarding node corresponding to the element itself may be the same or different.
  • the address information set includes multiple subsets, the elements included in each subset are different. That is, there is no intersection between the respective subsets.
  • the compression node After the compression node divides the elements in the address information set according to the compression characteristics described above, it can compress the elements included in the address information set and generate a message to indicate that these are compressed through the first indication field of the message. Post element. It can include the following scenarios:
  • the first scenario the address information set includes at least two first subsets.
  • the compression node can remove the element from the first subset to which the element belongs. Compress the element with the same prefix to get the compressed element (less than 128 bits in length). If there is an element in the address information set that does not belong to the first subset, it means that the element cannot be compressed, and the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element may be: removal
  • the first element has the same prefix as the first subset to which the first element belongs, to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the compression node may not compress the fourth element. That is, for the first element and the second element that can be compressed and have different compression characteristics, the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the second scenario the address information set includes a second subset and at least one first subset.
  • the compression node can remove the element from the first subset to which the element belongs. Compress the element with the same prefix to get the compressed element (less than 128 bits in length).
  • the compression node can remove the address information of the element from the source node or the destination node's The same prefix of the address information is used to compress the element to obtain a compressed element (less than 128 bits in length).
  • the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element It may be: removing the part of the first element that is the same as the prefix of the first subset to which the first element belongs, to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same prefix in the second element as the address information of the source node or the address information of the destination node to obtain the compressed second element.
  • the compression node may not compress the fourth element.
  • the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the address compression method used by the compression node for the first element may be: removing the same part of the first element as the prefix of the first subset to which the first element belongs, to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the address compression method used by the compression node for the third element may be: removing the same prefix in the third element as the address information of the source node or the address information of the destination node to obtain the compressed third element.
  • the compression node may not compress the fourth element. That is, for the first element, the second element, and the third element that can be compressed and have different compression characteristics, the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element to pass the first indication of the message.
  • the field indicates the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element.
  • the third scenario the address information set includes a third subset and at least one first subset.
  • the compression node can remove the element from the first subset to which the element belongs. Compress the element with the same prefix to get the compressed element (less than 128 bits in length).
  • the compression node can remove the same portion of the element from the MAC address of the forwarding node corresponding to the element. To compress the element to obtain a compressed element (length less than 128 bits).
  • the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element It may be: removing the part of the first element that is the same as the prefix of the first subset to which the first element belongs, to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the MAC address of the forwarding node corresponding to the second element to obtain the compressed second element.
  • the compression node may not compress the fourth element.
  • the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the address compression method used by the compression node for the first element may be: removing the same part of the first element as the prefix of the first subset to which the first element belongs, to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the prefix of the first subset to which the second element belongs, to obtain a compressed second element.
  • the address compression method used by the compression node for the third element may be: removing the same part of the third element as the MAC address of the forwarding node corresponding to the third element to obtain the compressed third element.
  • the compression node may not compress the fourth element. That is, for the first element, the second element, and the third element that can be compressed and have different compression characteristics, the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element to pass the first indication of the message.
  • the field indicates the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element.
  • the fourth scenario there is a second subset and a third subset in the address information set.
  • the compression node can remove the address of the element from the source node node. Information or the address information of the destination node with the same prefix to compress the element to get the compressed element (less than 128 bits in length).
  • the compression node can remove the same part of the element from the forwarding node's MAC address To compress the element to obtain a compressed element (length less than 128 bits).
  • the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element can be : Remove the same prefix in the first element as the address information of the source node or the address information of the destination node to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the MAC address of the forwarding node corresponding to the second element to obtain the compressed second element.
  • the compression node may not compress the fourth element.
  • the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the address information set includes a second subset, a third subset, and at least one first subset.
  • the compression node can remove the element from the first subset to which the element belongs. Compress the element with the same prefix to get the compressed element (less than 128 bits in length).
  • the compression node can remove the address information of the element from the source node or the destination node's The same prefix of the address information is used to compress the element to obtain a compressed element (less than 128 bits in length).
  • the compression node can remove the same part of the element from the forwarding node's MAC address To compress the element to obtain a compressed element (length less than 128 bits).
  • the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element may be: removing the same part of the first element as the prefix of the first subset to which the first element belongs, and obtaining the compressed First element.
  • the address compression method used by the compression node for the second element may be: removing the same prefix in the second element as the address information of the source node or the address information of the destination node to obtain the compressed second element.
  • the address compression method used by the compression node for the third element may be: removing the same part of the third element as the MAC address of the forwarding node corresponding to the third element to obtain the compressed third element.
  • the compression node may not compress the fourth element. That is, for the first element, the second element, and the third element that can be compressed and have different compression characteristics, the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element to pass the first indication of the message.
  • the field indicates the compressed first element, the compressed second element, the compressed third element, and the uncompressed fourth element.
  • the sixth scenario the address information set includes a second subset.
  • the compression node can remove the address of the element from the source node node. Information or the address information of the destination node with the same prefix to compress the element to get the compressed element (less than 128 bits in length). If there is an element in the address information set that does not belong to the second subset, it means that the element cannot be compressed, and the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the compression method used by the compression node for the first element may be: remove the same prefix in the first element as the source node ’s address information to obtain the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same prefix in the second element as the address information of the destination node to obtain the compressed second element.
  • the compression node may not compress the fourth element.
  • the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the seventh scenario the address information set includes a third subset.
  • the compression node can remove the forwarding node corresponding to the element from the element.
  • the same MAC address is used to compress the element to obtain the compressed element (less than 128 bits in length). If there is an element in the address information set that does not belong to the third subset, indicating that the element cannot be compressed, the compression node may not compress the element. Then, the compression node may generate a message according to the compressed elements and the uncompressed elements, so as to indicate each compressed element and each uncompressed element through the first indication field of the message.
  • the address compression method used by the compression node for the first element may be: removing the first element The same part of the MAC address of the forwarding node corresponding to the first element is obtained as the compressed first element.
  • the address compression method used by the compression node for the second element may be: removing the same part of the second element as the MAC address of the forwarding node corresponding to the second element to obtain the compressed second element.
  • the compression node may not compress the fourth element. That is, for the first element and the second element that can be compressed and have different compression characteristics, the compression node can compress by removing different prefixes (that is, different address compression methods). Then, the compression node may generate a message according to the compressed first element, the compressed second element, and the uncompressed fourth element, so as to indicate the compressed first through the first indication field of the message. Element, compressed second element, uncompressed fourth element.
  • the compression node can use different address compression methods to compress elements with different compression characteristics, so that the length of each element can be compressed more. And, the larger the compression of more elements.
  • Nodes can specify the number of forwarding nodes, which can reduce the difficulty of network deployment.
  • one or more forwarding nodes in the foregoing message forwarding path are non-IP address type forwarding nodes, that is, when a message is sent to the forwarding node, the forwarding node does not pass through the forwarding node.
  • the address information of the packet is sent to the forwarding node, but the packet is sent to the forwarding node through other identification information of the forwarding node. For example, tag information, device identification (ID), and so on.
  • the aforementioned compression node may use the first indication field to indicate the identification of these non-IP address class forwarding nodes to guide the forwarding path of the message.
  • forwarding node 1 forwarding node 2
  • forwarding node 3 forwarding node 6 to forwarding node 8 are nodes in a non-multi-protocol label switching (MPLS) domain.
  • MPLS non-multi-protocol label switching
  • These nodes are all forwarding nodes of the IP address class. That is, nodes communicate using the address information of the node as an identifier.
  • the forwarding node 4 and the forwarding node 5 are nodes in the MPLS domain, and these nodes communicate using the node's MPLS label as an identifier.
  • the compression node can indicate the address information of the forwarding node 1, forwarding node 2, forwarding node 3, forwarding node 6 to forwarding node 8 through the first indication field of the message, and pass the first
  • the indication domain indicates the label information of the forwarding node 4 and the label information of the forwarding node 5 to guide the message forwarding path.
  • the compression node when there are non-IP address type forwarding nodes and IP address type forwarding nodes on the message forwarding path, the compression node can target IP addresses with different compression characteristics.
  • the address information of the forwarding node of the class is compressed using different address compression methods, so that the length of the address information of the forwarding node of each IP address class can be more compressed, and more IP addresses are compressed. Address information of the forwarding node of the class.
  • the compression node can indicate more elements through the first indication field when the length of the first indication field is constant, so that the number of forwarding nodes that can be designated by the source node can be increased, and the difficulty of network deployment can be reduced.
  • the compression node may compress elements with different compression characteristics by using different address compression methods. Therefore, in an implementation manner of the embodiment of the present application, the foregoing message may further include a second indication. area.
  • the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field may include at least one first field, each first field corresponds to an address compression method, and a bit in each first field corresponds to an element indicated by a first indication field.
  • the bit When the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit When the bit is the second value, it indicates that the element corresponding to the bit does not use the address compression method corresponding to the first field.
  • the second value can be 1, or when the first value is 1, the second value is 0.
  • the second indication field includes a second field and N first fields, and N is an integer greater than or equal to 1.
  • the second field is used to indicate that the elements indicated by the first indication field use N address compression methods in total.
  • Each first field corresponds to one of N address compression modes, and a bit in each first field corresponds to an element indicated by a first indication field.
  • the bit is the first value, it indicates that the element corresponding to the bit uses the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the element corresponding to the bit does not use the address corresponding to the first field. Compression method.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the forwarding node that receives the message can learn the address compression method used by the address information (ie, element) of the next forwarding node through the second indication field, so that the forwarding node that receives the message can be based on the The address compression method used for the address information (that is, the element), and the compressed address information (that is, the compressed element) of the next forwarding node indicated by the first indication domain, restoring the complete address of the next forwarding node information.
  • the forwarding node receiving the message can forward the message to the next forwarding node by using the address information of the next forwarding node.
  • the address information of the next forwarding node is removed from the same prefix as the source node address information or destination node address information to obtain
  • the forwarding node receiving the message can extract the prefix from the address information of the source node or the destination node of the message, and The prefix is added in front of the compressed address information of the next forwarding node indicated by the first indication domain to restore the address information of the next forwarding node.
  • the address compression method used for the address information (ie, the element) of the next forwarding node is to remove the same portion of the address information of the next forwarding node as the MAC address of the next forwarding node to obtain the next forwarding
  • the node's compressed address information that is, the compressed element
  • the forwarding node receiving the message can use the MAC address of the next forwarding node to compress the next forwarding node indicated by the first indication domain.
  • the address information of the IP address is complemented to 128 bits to restore the address information of the next forwarding node.
  • the second indication field is further used to indicate whether the element indicated by the first indication field is The identifier of the non-IP address forwarding node.
  • the embodiment of the present application does not limit the implementation manner of the identifier of the forwarding node indicated by the second indication field to the first indication field as a non-IP address forwarding node.
  • a first field may be added to the second indication field, and a bit in each first field corresponds to an element indicated by a first indication field.
  • the bit value is the first value
  • the corresponding bit is indicated.
  • the element corresponding to the bit is the identifier of the forwarding node of the non-IP address type.
  • the bit value is the second value, it indicates that the element corresponding to the bit is the identifier of the forwarding node of the IP address type.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, which is used to indicate the address compression method used by the corresponding element, or is used to indicate whether the corresponding element is a non-IP address class Of the forwarding node.
  • the forwarding node receiving the message can know that the next forwarding node is a non-IP address type forwarding node through the second indication domain, so that the The forwarding node may forward the packet to the next forwarding node by using the identifier of the next forwarding node indicated by the first indication domain.
  • the message may further include a third indication field for indicating prefix information of each first subset.
  • the forwarding node receiving the message can make the address of the next forwarding node indicated by the third indication domain based on the address compression method used by the address information (ie, the element) of the next forwarding node.
  • the prefix information of the first subset to which the information belongs is added in front of the compressed address information (that is, the compressed element) of the next forwarding node indicated by the first indication domain, and the address information of the next forwarding node is restored .
  • the third indication field indicates the prefix information of each first subset.
  • the third indication field includes at least one third field, and each third field corresponds to a prefix of a first subset, and is used to indicate a prefix of the corresponding first subset.
  • each third field may include a first part and a second part, wherein the first part of the third field is used to indicate the length of the prefix of the corresponding first subset, and the second part of the third field , Used to indicate the prefix of the corresponding first subset.
  • the foregoing first indication field may include at least one fourth field; each fourth field corresponds to an element indicated by the first indication field;
  • the fourth field When the element corresponding to the fourth field belongs to the first subset, the fourth field includes the first part, the second part, and the third part, and the first part of the fourth field is used to indicate the first corresponding to the prefix of the first subset to which the element belongs. Three fields, the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed element;
  • the fourth field includes the first part, the second part, and the third part.
  • the first part of the fourth field is used to indicate the source node with the same prefix as the second element.
  • the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed.
  • the fourth field When the element corresponding to the fourth field is the same as the media access control MAC address of the forwarding node corresponding to the element, the fourth field includes the first part and the second part.
  • the first part of the fourth field is used to indicate that the element is compressed. Length, the second part of the fourth field is used to indicate the compressed element;
  • the fourth field When the element corresponding to the fourth field is an identifier of a non-IP address forwarding node, the fourth field includes a first part, a second part, and a third part.
  • the first part of the fourth field is used to indicate the type of the element (such as a label, ID, etc.)
  • the second part of the fourth field is used to indicate the length of the element
  • the third part of the fourth field is used to indicate the element.
  • the fourth field may not include a part for indicating the length of the compressed element, which may be specifically determined according to usage requirements.
  • the packet may further include one or more indication fields in the following indication fields:
  • the fourth indication field is used to indicate the start position of the third indication field in the message.
  • the fifth indication field is used to indicate the starting position of the next element in the first indication field.
  • the node corresponding to the next element is the next node that forwards or receives the message on the message forwarding path.
  • the sixth indication field is used to indicate the type of the message, and the type of the message is used to identify that the element indicated by the first indication field includes the compressed element.
  • the forwarding node receiving the message can learn that the compressed element exists in the first indication domain, so that the forwarding node can parse the message based on the parsing mode in which the compressed element exists, thereby improving The efficiency of message parsing.
  • Each of the above indication fields can be located in the data field of the message, or in a message header of the message, and some of the indication fields can be in the data field of the message, and some of the indication fields can be in the message header. .
  • the following describes the format of the header of an extended packet header used to implement IP source routing as an example in which the indicated fields are located in the packet.
  • the format can include the following formats:
  • FIG. 4 is a format of a packet header provided by an embodiment of the present application. As shown in FIG. 4, the packet header may include the following fields:
  • a field used to indicate the type of the next packet header (for example, the Next Header field).
  • a field used to indicate the length of the current packet header (for example, the HdrExtLen field).
  • a field for indicating the number of remaining nodes on the message forwarding path (for example, the Segment left field).
  • a second indication field for indicating an address compression method used by the element indicated by the first indication field includes a second field and N first fields.
  • the value of N is specifically determined by the address compression method used by the compression node when transmitting the message to the address information of the forwarding node on the message forwarding path.
  • the compression node uses the following address compression method: the address compression method of compressing the element by removing the same prefix in the element as the first subset to which the element belongs, and by removing the source and source from the element The address information of the end node or the destination node has the same prefix to compress the element.
  • the second indication field may include two first fields. That is, N is equal to two.
  • FIG. 4 shows a schematic diagram with N equal to 2 as an example.
  • a third indication field for indicating the prefix information of each first subset.
  • the address information (that is, an IPv6 address) of a forwarding node may be called an element of the address list field.
  • the packet header may further include at least one of the following fields:
  • a fourth indication field for indicating the start position of the third indication field in the message.
  • a fifth indication field for indicating the start position of the next element in the first indication field.
  • a sixth indication field for indicating the type of the message.
  • the value of this field is 100, for example.
  • the sixth indication field may be, for example, a Routing Type field of an original extended packet header.
  • the reserved field in the original extended packet header may be split into one or more of the following indication fields: a fourth indication field, a fifth indication field, and a second indication field.
  • the address list field of the original extended packet header can be split into the following parts: the third indication field, the first indication field, and the address information of the destination node. It can be understood that the foregoing FIG. 4 is only a schematic diagram, and the embodiment of the present application does not limit the position of each indication field in the packet header, and the length (ie, the number of bits occupied) of each indication field.
  • FIG. 5 is another format of a packet header provided by an embodiment of the present application.
  • the packet header is different from the packet header shown in FIG. 4 in that the packet header shown in FIG. 5 includes a second indication field corresponding to each element indicated by the first indication field. That is, the number of the second indication fields included in the packet header corresponds to the number of elements one by one to indicate the address compression method used by the corresponding element.
  • the number of the second indication fields included in the packet header corresponds to the number of elements one by one to indicate the address compression method used by the corresponding element.
  • the reserved fields in the original extended packet header may be split into one or more of the following indication fields: a fourth indication field and a fifth indication field.
  • the address list field of the original extended packet header can be split into the following parts: the third indication field, the second indication field, the first indication field, and the address information of the destination node. It can be understood that the foregoing FIG. 5 is only a schematic diagram, and the embodiment of the present application does not limit the position of each indication field in the packet header, and the length (ie, the number of bits occupied) of each indication field.
  • the second indication field may include the following fields: a field for indicating an address compression method, and at least one field for indicating a function corresponding to an element (a specific function indicated by this field may be Set according to actual needs).
  • FIG. 6 is another format of a packet header provided by an embodiment of the present application. As shown in FIG. 6, the packet header is different from the packet header shown in FIG. 4 in that the second indication field in the packet header shown in FIG. 6 may include at least one first field. The number of the first fields is determined by the address compression mode supported by the compression node.
  • the compression node supports address compression by compressing the element by removing the same prefix in the element as the prefix of the first subset to which the element belongs, and by removing the address information of the element from the source node or
  • An address compression method that compresses the element with the same prefix of the address information of the destination node, and an address compression method that compresses the element by removing the same part of the element that corresponds to the MAC address of the forwarding node corresponding to the element may include three first fields. That is, X is equal to 3.
  • the address compression method corresponds to the first A field still exists in the message header.
  • the first field corresponding to the address compression method may not be Exists in the message header.
  • the reserved fields in the original extended packet header may be split into one or more of the following indication fields: a fourth indication field and a fifth indication field.
  • the address list field of the original extended packet header can be split into the following parts: the third indication field, the second indication field, the first indication field, and the address information of the destination node. It can be understood that the foregoing FIG. 5 is only a schematic diagram, and the embodiment of the present application does not limit the position of each indication field in the packet header, and the length (ie, the number of bits occupied) of each indication field.
  • the source node S is a compression node, that is, the source node S uses IP source routing technology to direct the forwarding node on the message forwarding path to forward the message.
  • the forwarding node in this scenario supports the following two address compression methods:
  • Address compression method 1 An address compression method of compressing an element by removing the same portion of the element as the prefix of the first subset to which the element belongs.
  • Address compression method 2 The address compression method of compressing the element is removed by removing the prefix of the element that is the same as the address information of the source node or the address information of the destination node.
  • FIG. 7 is a schematic diagram of a message transmission scenario provided by an embodiment of the present application.
  • the message transmission scenario in the embodiment of the present application is a wide area network routing scenario using IPv6 protocol for message transmission.
  • This scenario includes: a source node S, a destination node D, and 8 forwarding nodes.
  • a dashed line it means that the two nodes are not directly connected.
  • the line between the two nodes is a solid line, it means that the two nodes can be directly connected. It may not be directly connected.
  • the address information of each node (that is, the IPv6 address in hexadecimal notation) is shown in Table 1 below:
  • the address information of the forwarding node 1 to the address information of the forwarding node 3, and the address information of the source node S belongs to the address information in the same autonomous domain (that is, AS1). Because the address information of nodes in the same autonomous domain has the same prefix, address compression method 2 can be used to compress the address information of forwarding node 1 to forwarding node 3. Therefore, the address information of forwarding node 1 to address information of forwarding node 3
  • the compression is characterized by having the same prefix as the address information of the source node S.
  • the address information of the forwarding node 4 and the address information of the forwarding node 5 belong to the address information in the same autonomous domain (that is, AS2), and do not belong to the same autonomous domain as the address information of the source node S and the destination node D. . Because the address information of nodes in the same autonomous domain has the same prefix, address compression method 1 can be used to compress the address information of forwarding node 4 to forwarding node 5, so the address information of forwarding node 4 and The compression feature is that the address information of the forwarding node 4 and the address information of the forwarding node 5 have the same prefix.
  • the address information of the forwarding node 6 belongs to an autonomous domain (that is, AS3) alone. That is, the address information of the forwarding node 6 does not belong to the same autonomous domain as the address information of the source node S and the destination node D, nor does it belong to the same autonomous domain as the address information of other forwarding nodes.
  • the address information is compressed. Therefore, the address information of the forwarding node 6 is not compressed.
  • the address information of the forwarding node 7 and the address information of the forwarding node 8, and the address information of the destination node D belong to the address information in the same autonomous domain (that is, AS4). Because the address information of nodes in the same autonomous domain has the same prefix, address compression method 2 can be used to compress the address information of forwarding node 7 to forwarding node 8. Therefore, the address information of forwarding node 7 and the address information of forwarding node 8 Compression is characterized by the same prefix as the address information of the destination node.
  • the address information of the forwarding node on the message forwarding path can be used as an address information set, and based on the compression of each element Characteristics, the subset of the address information set can be specifically shown in Table 2 below:
  • the prefix of the first subset is 0xFC00: 0000: 0000: 5678: 1234: 12 34:12, a total of 104 bits. It can be understood that the above elements 6 and 4 and 5 also have the same prefix 0xFC00 ::. Therefore, element 4, element 5, and element 6 can also be divided into a first subset. How to divide the address information set can be determined by the compression node according to actual needs.
  • the data added with the 0b prefix in the following application files is binary data
  • the data with the 0x prefix is hexadecimal data
  • the data without the prefix is decimal data. It should be noted that the above prefix is only used to indicate the base of the data.
  • the source node After the source node divides the elements in the address information set, it can compress the elements in the address information set one by one, specifically:
  • Element 1 has the same prefix as the address information of the source node, so the source node can remove the prefix "0xFC00 :: ABCD: 1234: 12FF: FE” in Element 1 that is the same as the address information of the source node. Get the compressed element 1 "0x0F1234".
  • Element 2 has the same prefix as the address information of the source node. Therefore, the source node can remove the prefix "0xFC00 :: ABCD: 1234: 12FF: FE” in Element 2 that is the same as the address information of the source node. Get the compressed element 2 "0x34: AB12".
  • Element 3 has the same prefix as the address information of the source node, so the source node can remove the prefix "0xFC00 :: ABCD: 1234: 12FF: FE” in Element 3 that is the same as the address information of the source node Get the compressed element 3 "0xCD: ABCD".
  • Element 4 has the same prefix as element 5, which is the prefix "0xFC00: 0000: 0000: 5678: 1234: 1234: 12" of the first subset. Therefore, the source node can remove the same prefix of the first subset in element 4 to obtain the compressed element 4 "0x34: 1234".
  • Element 5 Element 4 has the same prefix as element 5, which is the prefix "0xFC00: 0000: 0000: 5678: 1234: 1234: 12" of the first subset. Therefore, the source node can remove the same prefix of the first subset in element 5 to obtain the compressed element 5 "0x56: AB12".
  • Element 7 has the same prefix as the destination node ’s address information. Therefore, the source node can remove the prefix “0xFC00 :: 4567: 1234: 12FF: FE” in Element 7 which is the same as the destination node ’s address information. Compressed element 3 "0x14: 1235".
  • Element 8 has the same prefix as the destination node ’s address information. Therefore, the source node can remove the prefix “0xFC00 :: 4567: 1234: 12FF: FE” in Element 8 which is the same as the destination node ’s address information. Compressed element 8 "0x1A: ABEE".
  • FIG. 8 is a schematic diagram of another packet header according to an embodiment of the present application.
  • the fields in the packet header of the encapsulated packet that are related to the embodiment of the present application may be as follows:
  • a field for indicating the number of remaining nodes on the message forwarding path (for example, the Segment left field): Since there are 8 forwarding nodes remaining on the current message forwarding path, the value of this field can be 8.
  • the second field of the second indicator field in the message header can occupy two bits to indicate that the source node has used the message in this message.
  • the source node can use the address compression method 1 for the elements in the first subset and the address compression method 2 for the elements in the second subset, that is, two address compression methods can be used in total, so The second field of the second indication field may be 11.
  • the above-mentioned second indication field may include two first fields, where one first field corresponds to the address compression method 1, and one first field corresponds to the address compression method 2.
  • a bit in each first field corresponds to an element indicated by a first indication field. In this example, there are 8 elements in total, so each first field has 8 bits, and each bit corresponds to an element, which is used to indicate whether the element uses the address compression method corresponding to the first field.
  • the corresponding The first field of compression method 1 may be: 0b00011000
  • the first field corresponding to compression method 2 may be: 0b11100011.
  • the most significant bit of each first field indicates the first forwarding node on the forwarding path, and so on.
  • the third indication field may include a third field.
  • the first part of the third field is used to indicate the length of the prefix of the first subset, and the second part of the third field is used to indicate the prefix of the corresponding first subset.
  • the length of the first part of the third field can be specifically set according to requirements.
  • the prefix of the first subset is: "0xFC00: 0000: 0000: 5678: 1234: 1234: 12", a total of 104 bits.
  • the value of the first part of the third field can be: "0b11100111”.
  • the second part of the third field is "0xFC00: 0000: 0000: 5678: 1234: 1234: 12" (It should be noted that because the binary data is too long, for the sake of understanding, it is expressed in hexadecimal here. Some fields, but those skilled in the art can understand that during the actual transmission, the binary data corresponding to the hexadecimal number is transmitted. The reason for the occurrence of hexadecimal in the following application file is the same. One more).
  • the value of the third field is "0b11100111,0xFC00: 0000: 0000: 5678: 1234: 1234: 12".
  • the embodiment of the present application does not limit the order of the third field corresponding to the prefix of each first subset in the third indication field.
  • the first indication field includes at least one fourth field, and each fourth field corresponds to an element indicated by the first indication field.
  • the first The four fields include a first part, a second part, and a third part.
  • the first part of the fourth field is used to indicate the third field corresponding to the prefix of the first subset to which the element belongs, and the second part of the fourth field is used to indicate that the element is The compressed length.
  • the third part of the fourth field is used to indicate the compressed element.
  • the fourth field includes the first part, the second part, and the third part.
  • the first part of the fourth field is used to indicate the identification of the address information of the source node with the same prefix as the second element or the identification of the address information of the destination node with the same prefix as the second element.
  • the second part of the fourth field is used For indicating the length of the compressed element, the third part of the fourth field is used to indicate the compressed element.
  • the source node can sequentially write each element in the first indication field in the order of the forwarding node corresponding to each element on the forwarding path. Taking the identifier of the address information of the source node as 0, the identifier of the address information of the destination node as 1, and the length of the second part of the fourth field after the 7-bit indication element is compressed as an example, specifically,
  • the first fourth field of the first indication field corresponds to element 1.
  • the first fourth field may include the first part, the second part, and the third part.
  • Element 1 has the same prefix as the address information of the source node. Therefore, The value of the first part of the first fourth field is 0b0.
  • the length of the compressed element 1 is 24 bits. Therefore, the value of the second part of the first fourth field is "0b0011000”.
  • the compressed element 1 is "0x0F: 1234", so the value of the third part of the first fourth field is "0x0F: 1234". In summary, the value of the first and fourth fields is "0b0,0b0011000,0x0F: 1234".
  • the second fourth field of the first indication field corresponds to element 2.
  • the second fourth field may include the first part, the second part, and the third part.
  • Element 2 has the same prefix as the address information of the source node. Therefore, The value of the first part of the second fourth field is 0b0.
  • the length of the compressed element 2 is 24 bits. Therefore, the value of the second part of the second fourth field is "0b0011000”.
  • the compressed element 2 is "0x34: AB12", so the value of the third part of the second and fourth field is "0x34: AB12". In summary, the value of the second and fourth fields is "0b0,0b0011000,0x34: AB12".
  • the third fourth field of the first indication field corresponds to element 3, and the third fourth field may include the first part, the second part, and the third part.
  • Element 3 has the same prefix as the address information of the source node. Therefore, The value of the first part of the third fourth field is 0b0.
  • the length of the compressed element 3 is 24 bits. Therefore, the value of the second part of the third fourth field is "0b0011000".
  • the compressed element 3 is "0xCD: ABCD", so the third part of the third fourth field has the value "0xCD: ABCD".
  • the value of the third and fourth fields is "0b0,0b0011000,0xCD: ABCD".
  • the fourth fourth field of the first indication field corresponds to element 4, the fourth fourth field may include the first part, the second part, and the third part, and element 4 corresponds to the first first subset indicated by the third indication field Prefix (also the only one in this example), so the value of the first part of the fourth and fourth fields is 0b001 (the specific number of bits occupied by the first part can be set according to actual usage requirements).
  • the length of the compressed element 4 is 24 bits. Therefore, the value of the second part of the fourth fourth field is "0b0011000".
  • the compressed element 4 is "0x34: 1234", so the value of the third part of the fourth fourth field is "0x34: 1234". In summary, the value of the fourth and fourth fields is "0b001,0b0011000,0x34: 1234".
  • the fifth fourth field of the first indication field corresponds to element 5, the fifth fourth field may include the first part, the second part, and the third part, and element 5 corresponds to the first first subset indicated by the third indication field Prefix (also the only one in this example), so the value of the first part of the fifth and fourth fields is 0b001 (the specific number of bits occupied by the first part can be set according to actual usage requirements).
  • the length of the compressed element 5 is 24 bits. Therefore, the value of the second part of the fifth fourth field is "0b0011000”.
  • the compressed element 4 is "0x34: 1234", so the value of the third part of the fifth fourth field is "0x34: AB12". In summary, the value of the fifth fourth field is "0b001,0b0011000,0x34: AB12".
  • the sixth and fourth field of the first indication field corresponds to element 6. Since element 6 is not compressed, the value of the sixth and fourth field is element 6, which is "0xFC00 :: AAAA: 1234: 1234: 1278: AB12 ".
  • the seventh fourth field of the first indication field corresponds to element 7.
  • the seventh fourth field may include the first part, the second part, and the third part.
  • Element 7 has the same prefix as the address information of the destination node.
  • the value of the first part of the seven fourth fields is 0b1.
  • the length of the compressed element 7 is 24 bits. Therefore, the value of the second part of the seventh fourth field is "0b0011000".
  • the compressed element 7 is "0x14: 1234", so the value of the third part of the seventh fourth field is "0x14: 1234".
  • the value of the seventh fourth field is "0b1,0b0011000,0x14: 1234".
  • the eighth fourth field of the first indication field corresponds to element 8.
  • the eighth fourth field may include the first part, the second part, and the third part.
  • Element 8 has the same prefix as the address information of the destination node.
  • the value of the first part of the eight fourth fields is 0b1.
  • the length of the compressed element 8 is 24 bits. Therefore, the value of the second part of the eighth fourth field is "0b0011000".
  • the compressed element 8 is "0x1A: ABEE”. Therefore, the third part of the eighth fourth field has a value of "0x1A: ABEE".
  • the value of the eighth fourth field is "0b1,0b0011000,0x1A: ABEE".
  • the first indication field may also be used to indicate element 9, which is the address information of the destination node. That is, the ninth and fourth field of the first indication field corresponds to element 9. Since element 9 is not compressed, the value of the ninth fourth field is element 9, which is "0xFC00 :: 4567: 1234: 12FF : FE1A: ABEF ".
  • a fourth indication field for indicating a start position of the third indication field in the message, and the value of the indication field is a start position of the third indication field in the message.
  • a fifth indication field for indicating the start position of the next element in the first indication field, and the initial value of the indication field is the position of the fourth field corresponding to element 2 in the first indication field.
  • a sixth indication field for indicating the type of the message is, for example, 100.
  • the source node can compress elements with different compression characteristics using different address compression methods, so that the length of each element can be compressed more, and the larger the compression, the more Elements.
  • the source node indicates these compressed elements through the first indication field of the message, fewer elements can be used to indicate these elements, thereby increasing the number of forwarding nodes that can be specified by the source node, which can further reduce Difficulty of network deployment.
  • the source node may send the packet to the forwarding node 1 according to the address information of the forwarding node 1.
  • the forwarding node 1 may perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine the remaining 8 forwarding nodes of the current message forwarding path. That is, there are a total of 8 forwarding nodes including the forwarding node 1.
  • Step 2 By analyzing the sixth indication field, it is determined that the elements indicated by the first indication field include compressed elements, and the second indication field needs to be read.
  • Step 3 Read each first field according to the second field of the second indication field to determine the address compression method used by the source node for the address information of the forwarding node 2. For example, the value of the second bit in the first field corresponding to the address compression method 1 may be read first, and it is judged whether the value is 0b1. If yes, it means that the source node uses the address compression method 1 for the address information of the forwarding node 2. If not, read the value of the second bit in the first field corresponding to the address compression method 2, and determine whether the value is 0b1. If yes, it means that the source node uses the address compression method 2 for the address information of the forwarding node 2.
  • the source node does not use any address compression method for the address information of the forwarding node 2.
  • the value of the second bit in the first field corresponding to the address compression method 2 is 0b1, that is, the source node uses the address compression method 2 for the address information of the forwarding node 2.
  • Step 4 Determine the position of the compressed address information of the forwarding node 2 in the first indication domain according to a fifth indication domain that indicates a start position of the next element in the first indication domain. That is, the position of the fourth field in the forwarding node 2 in the first indication field.
  • Step 5 According to the position of the compressed address information of the forwarding node 2 in the first indication domain, read a fourth field corresponding to the forwarding node 2 from the first indication domain.
  • Step 6 According to the value 0b0 of the first part of the fourth field corresponding to the forwarding node 2, determine that the address information of the forwarding node 2 has the same prefix as the address information of the source node. The value of the two parts determines that the length of the compressed address information of the forwarding node 2 is 24 bits. Then read the 24 bits after the second part to get the third part of the fourth field, that is, the compressed address information 0x0F1234 of the forwarding node 2.
  • Step 7 Since the complete address information length of a forwarding node is 128 bits, a 104-bit prefix can be read from the address information of the source node carried in the message, and the 104-bit prefix can be spliced to the forwarding node 2. In front of the compressed address information, the address information 0xFC00 :: ABCD: 1234: 12FF: FE0F: 1234 of the forwarding node 2 is obtained.
  • Step 8 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the forwarding node 3 in the first indication field, which will be used for The value of the field indicating the number of remaining nodes on the message forwarding path is modified to 7.
  • Step 9 Forward the message to the forwarding node 2 according to the address information of the forwarding node 2.
  • the forwarding node 2 After receiving the message sent by the forwarding node 1, the forwarding node 2 can use the processing method of the forwarding node 1 to obtain the address information of the forwarding node 3 from the message, and according to the address information of the forwarding node 3, The text is forwarded to the forwarding node 3, which will not be repeated here.
  • forwarding node 3 After forwarding node 3 receives the message sent by forwarding node 2, it can perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine the remaining 6 forwarding nodes of the current message forwarding path. That is, there are a total of 6 forwarding nodes including the forwarding node 3.
  • Step 2 By analyzing the sixth indication field, it is determined that the elements indicated by the first indication field include compressed elements, and the second indication field needs to be read.
  • Step 3 Read each first field according to the second field of the second indication field to determine the address compression method used by the source node for the address information of the forwarding node 4.
  • the value of the fourth bit in the first field corresponding to the address compression method 1 is 0b1, that is, the source node uses the address compression method 1 for the address information of the forwarding node 4.
  • Step 4 Determine the position of the compressed address information of the forwarding node 4 in the first indication domain according to a fifth indication domain that indicates a start position of the next element in the first indication domain. That is, the position of the fourth field in the forwarding node 4 in the first indication field.
  • Step 5 Read the fourth field corresponding to the forwarding node 4 from the first indication domain according to the compressed address information of the forwarding node 4 in the first indication domain.
  • Step 6 According to the value 0b001 of the first part of the fourth field corresponding to the forwarding node 4, determine that the prefix of the address information of the forwarding node 4 is the same as the prefix of the first first subset indicated by the third indication field. The value of the second part of the fourth field corresponding to the node 4 determines that the length of the compressed address information of the forwarding node 4 is 24 bits. Then read the 24 bits after the second part to get the third part of the fourth field, that is, the compressed address information 0x34: 1234 of the forwarding node 4.
  • Step 7 Determine the start position of the third indication field in the message according to the value of the fourth indication field used to indicate the start position of the third indication field in the message. That is, the start position of the third field corresponding to the prefix of the first first subset in the message.
  • Step 8 According to the start position of the third field corresponding to the prefix of the first first subset in the message, read the third field corresponding to the prefix of the first first subset. According to the first part of the third field, it is determined that the prefix length of the first subset is 104 bits. Then read the 104 bits after the first part to get the second part of the third field, which is the prefix 0xFC00: 0000: 0000: 5678: 1234: 12 of the first subset.
  • Step 9 The prefix of the first subset is spliced in front of the compressed address information of the forwarding node 4 to obtain the address information 0xFC00 :: 5678: 1234: 1234: 1234: 1234 of the forwarding node 4.
  • Step 10 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the forwarding node 5 in the first indication field, which will be used for The value of the field indicating the number of remaining nodes on the message forwarding path is changed to 5.
  • Step 9 Forward the message to the forwarding node 4 according to the address information of the forwarding node 4.
  • the forwarding node 4 After receiving the message sent by the forwarding node 3, the forwarding node 4 can use the processing method of the forwarding node 3 to obtain the address information of the forwarding node 5 from the message, and according to the address information of the forwarding node 5, The text is forwarded to the forwarding node 5 and will not be repeated here.
  • the forwarding node 5 may perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine the remaining 4 forwarding nodes of the current message forwarding path. That is, there are a total of four forwarding nodes including the forwarding node 5.
  • Step 2 By analyzing the sixth indication field, it is determined that the elements indicated by the first indication field include compressed elements, and the second indication field needs to be read.
  • Step 3 Read each first field according to the second field of the second indication field to determine the address compression method used by the source node for the address information of the forwarding node 6.
  • the value of the sixth bit in the first field corresponding to the address compression method 1 is 0b0
  • the value of the sixth bit in the first field corresponding to the address compression method 2 is 0b0. That is, the source node does not use any address compression method for the address information of the forwarding node 6.
  • Step 4 Determine a position of the address information of the forwarding node 6 in the first indication domain according to a fifth indication domain for indicating a start position of the next element in the first indication domain. That is, the position of the fourth field in the forwarding node 6 in the first indication field.
  • Step 5 According to the position of the address information of the forwarding node 6 in the first indication domain, read 128-bit data from the first indication domain.
  • the 128-bit data is the fourth field corresponding to the forwarding node 6. That is, the address information of the forwarding node 6: 0xFC00 :: AAAA: 1234: 1234: 1278: AB12.
  • Step 6 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the forwarding node 7 in the first indication field, which will be used for The value of the field indicating the number of remaining nodes on the message forwarding path is modified to 3.
  • Step 9 Forward the message to the forwarding node 6 according to the address information of the forwarding node 6.
  • the forwarding node 6 may perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine the remaining 3 forwarding nodes of the current message forwarding path. That is, there are three forwarding nodes including the forwarding node 6.
  • Step 2 By analyzing the sixth indication field, it is determined that the elements indicated by the first indication field include compressed elements, and the second indication field needs to be read.
  • Step 3 Read each first field according to the second field of the second indication field to determine the address compression method used by the source node for the address information of the forwarding node 7.
  • the value of the seventh bit in the first field corresponding to the address compression method 2 is 0b1, that is, the source node uses the address compression method 2 for the address information of the forwarding node 7.
  • Step 4 Determine a position of the compressed address information of the forwarding node 7 in the first indication field according to a fifth indication field that indicates a start position of the next element in the first indication field. That is, the position of the fourth field in the forwarding node 7 in the first indication field.
  • Step 5 Read the fourth field corresponding to the forwarding node 7 from the first indication domain according to the compressed address information of the forwarding node 7 in the first indication domain.
  • Step 6 According to the value 0b1 of the first part of the fourth field corresponding to the forwarding node 7, determine that the address information of the forwarding node 7 and the address information of the destination node have the same prefix, and according to the second field of the fourth field corresponding to the forwarding node 7, The value of the part determines that the length of the compressed address information of the forwarding node 7 is 24 bits. Then read the 24 bits after the second part to get the third part of the fourth field, that is, the compressed address information 0x141235 of the forwarding node 7.
  • Step 7 Since the complete address information length of a forwarding node is 128 bits, the 104-bit prefix can be read from the address information of the destination node carried in the message, and the 104-bit prefix is spliced on the forwarding node 7 to In front of the compressed address information, the address information 0xFC00 :: 4567: 1234: 12FF: FE14: 1235 of the forwarding node 7 is obtained.
  • Step 8 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the forwarding node 7 in the first indication field, which will be used for The value of the field indicating the number of remaining nodes on the message forwarding path is modified to 2.
  • Step 9 Forward the message to the forwarding node 7 according to the address information of the forwarding node 7.
  • the forwarding node 7 may use the processing method of the forwarding node 6 to obtain the address information of the forwarding node 8 from the message, and according to the address information of the forwarding node 8, the report will be reported.
  • the text is forwarded to the forwarding node 8 and will not be repeated here.
  • the forwarding node 8 may perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine that there is one forwarding node remaining in the current message forwarding path. That is, there is a total of one forwarding node including the forwarding node 8, and there are no more forwarding nodes in the future. Therefore, the fifth indication domain can be read directly.
  • Step 2 Determine the position of the address information of the destination node in the first indication domain according to a fifth indication domain that indicates the start position of the next element in the first indication domain. That is, the position of the fourth field corresponding to the destination node D in the first indication field.
  • Step 3 According to the position of the address information of the destination node D in the first indication domain, read 128-bit data from the first indication domain.
  • the 128-bit data is the fourth field corresponding to the destination node D. That is, the address information of the destination node D: 0xFC00 :: 4567: 1234: 12FF: FE1A: ABEF.
  • Step 4 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the destination node in the first indication field, which will be used to indicate The value of the field of the number of remaining nodes on the packet forwarding path was changed to 0.
  • Step 5 Forward the message to the destination node D according to the address information of the destination node D.
  • the destination node D After receiving the message, the destination node D determines that there is no remaining forwarding node in the current message forwarding path according to a field indicating the number of remaining nodes on the message forwarding path, and then determines that it is the final destination address of the message. . Then the destination node D can parse and process the message in the manner of the prior art, and no longer forward it.
  • FIG. 9 is a schematic diagram of another message transmission scenario according to an embodiment of the present application.
  • the message transmission scenario in the embodiment of the present application is a scenario of an IoT smart meter that uses the IPv6 protocol for message transmission.
  • This scenario includes: a source node (ie, a gateway), a destination node D, and three forwarding nodes (forwarding node A to forwarding node C).
  • the destination node D and the forwarding node are both IoT nodes.
  • the line between the two nodes in FIG. 9 is a dashed line, it means that the two nodes are not directly connected.
  • the line between the two nodes is a solid line, it means that the two nodes can be directly connected. It may not be directly connected.
  • the IoT smart meter scenario is a closed LAN scenario, that is, all IoT nodes and gateways in the domain have the same prefix FC00: / 80.
  • Forwarding node A to forwarding node C are incrementally deployed IoT nodes, that is, forwarding node A to forwarding node C are devices deployed in this scenario in different batches. For example, forwarding node A is the first deployed device, forwarding node B is the second deployed device, and forwarding node C is the third deployed device.
  • forwarding node A to forwarding node C are devices deployed in the local area network in different batches. Therefore, as the number of devices in the local area network increases, the shorter batches of devices deployed to the local area network in the later batches become longer (that is, addresses in the address information other than the same prefix as the address information of the gateway).
  • the address information of each node is as follows As shown in Table 3:
  • the address information of the forwarding node A to the forwarding node C has the same prefix as the address information of the source node (gateway). You can use the address compression method 1 to forward node A to forwarding node C. Therefore, the compression of the address information of the forwarding node A to the address information of the forwarding node C is characterized by having the same prefix as the address information of the source node (gateway).
  • the address information of the forwarding node on the message forwarding path can be used as an address information set, and based on each element
  • the compression characteristics of the sub-set of the address information set can be specifically shown in Table 4 below:
  • the source node After the source node divides the elements in the address information set, it can compress the elements in the address information set one by one, specifically:
  • Element 1 has the same prefix as the address information of the source node. Therefore, the source node can remove the prefix "0xFC00 ::” in Element 1 which is the same as the address information of the source node, to obtain compressed element 1. "0x15”.
  • Element 2 has the same prefix as the address information of the source node. Therefore, the source node can remove the prefix "0xFC00 ::” in Element 2 that is the same as the address information of the source node to obtain the compressed element 2 "0x10A".
  • Element 3 has the same prefix as the address information of the source node. Therefore, the source node can remove the prefix "0xFC00 ::” in Element 3 that is the same as the address information of the source node, and obtain the compressed element 3 "0x1FF0".
  • FIG. 10 is a schematic diagram of another packet header according to an embodiment of the present application.
  • the fields in the packet header of the encapsulated packet that are related to the embodiment of the present application may be as follows:
  • a field for indicating the number of remaining nodes on the message forwarding path (for example, the Segment left field): Since there are 3 forwarding nodes remaining on the current message forwarding path, the value of this field can be 3.
  • the second field of the second indicator field in the message header can occupy two bits to indicate that the source node has used the message in this message.
  • the source node uses the address compression method 2 for the elements in the second subset, that is, a total of one address compression method is used. Therefore, the second field of the second indication field may be, for example, 0b01 or 0b10. Specifically, it can be determined according to the settings of the communication system.
  • FIG. 10 is a schematic diagram showing the value of the second field as 0b10.
  • the second indication field may include two first fields, one of which corresponds to the address compression method 1, and the other of the first field corresponds to the address compression method 2.
  • a bit in each first field corresponds to an element indicated by a first indication field.
  • each first field has 3 bits, and each bit corresponds to an element, which is used to indicate whether the element uses the address compression method corresponding to the first field.
  • the second indication field may include only the first field corresponding to the address compression method 2, and there is no corresponding address compression method 1.
  • FIG. 10 shows a schematic diagram of an example in which the second indication field includes two first fields, where the first field of the address compression method 1 filled with polka dots is indicated, and the first field may be in the current packet header. does not appear.
  • the corresponding The first field of compression method 2 may be: 0b111.
  • the highest bit of the first field indicates the first forwarding node on the forwarding path, and so on.
  • FIG. 10 is a schematic diagram including a third indication field in a packet header, where the third indication field filled with dots is used to indicate that the indication field may not appear in the current packet header.
  • the first indication field includes at least one fourth field, and each fourth field corresponds to an element indicated by the first indication field.
  • the first The four fields include the first part, the second part, and the third part.
  • the first part of the fourth field is used to indicate the identification of the address information of the source node with the same prefix as the second element or the destination node with the same prefix as the second element.
  • the identifier of the address information is used to indicate the length of the compressed element, and the third part of the fourth field is used to indicate the compressed element.
  • the source node can sequentially write each element in the first indication field in the order of the forwarding node corresponding to each element on the forwarding path. Taking the identifier of the address information of the source node as 0, and the length of the second part of the fourth field after the 7-bit indicating element is compressed, for example, specifically,
  • the first fourth field of the first indication field corresponds to element 1.
  • the first fourth field may include the first part, the second part, and the third part.
  • Element 1 has the same prefix as the address information of the source node. Therefore, The value of the first part of the first fourth field is 0b0.
  • the length of the compressed element 1 is 8 bits. Therefore, the value of the second part of the first fourth field is "0b0001000”.
  • the compressed element 1 is "0x15", so the value of the third part of the first fourth field is "0b00001111". In summary, the value of the first and fourth fields is "0b0,0b0001000,0b00001111".
  • the second fourth field of the first indication field corresponds to element 2.
  • the second fourth field may include the first part, the second part, and the third part.
  • Element 2 has the same prefix as the address information of the source node. Therefore, The value of the first part of the second fourth field is 0b0.
  • the length of the compressed element 2 is 12 bits. Therefore, the value of the second part of the second fourth field is "0b0001100”.
  • the compressed element 2 is "0x10A", so the value of the third part of the second fourth field is "0b000100001010". In summary, the value of the second and fourth fields is "0b0,0b0001100,0b000100001010".
  • the third fourth field of the first indication field corresponds to element 3, and the third fourth field may include the first part, the second part, and the third part.
  • Element 3 has the same prefix as the address information of the source node. Therefore, The value of the first part of the third fourth field is 0b0.
  • the length of the compressed element 3 is 16 bits, so the value of the second part of the third fourth field is "0b0010000”.
  • the compressed element 3 is "0x1FF0", so the value of the third part of the third fourth field is "0b0001111111110000".
  • the value of the third and fourth fields is "0b0,0b0010000,0b0001111111110000".
  • the first indication field may also be used to indicate element 4, which is the address information of the destination node. That is, the fourth fourth field of the first indication field corresponds to element 4, and since element 4 is not compressed, the value of the fourth fourth field is element 4, which is "0xFC00 :: 1FF0".
  • a fourth indication field for indicating a start position of the third indication field in the message, and the value of the indication field is a start position of the third indication field in the message.
  • FIG. 10 shows a schematic diagram including a fourth indication field in a packet header, where a fourth indication field filled with dots is indicated, and the indication field may not appear in the current packet header.
  • a fifth indication field for indicating the start position of the next element in the first indication field, and the initial value of the indication field is the position of the fourth field corresponding to element 2 in the first indication field.
  • a sixth indication field for indicating the type of the message is, for example, 100.
  • the hexadecimal number in the above message header will transmit the binary number corresponding to the hexadecimal number during actual transmission.
  • the above-mentioned fields in which commas and / or colons appear are only for marking different parts of the fields. The commas and / or colons and the prefix identifying the data base will not appear during actual transmission and encapsulation.
  • the source node can compress elements with different compression characteristics using different address compression methods, so that the length of each element can be compressed more, and the larger the compression, the more Elements.
  • the source node indicates these compressed elements through the first indication field of the message, fewer elements can be used to indicate these elements, thereby increasing the number of forwarding nodes that can be specified by the source node, which can further reduce Difficulty of network deployment.
  • the source node After the source node encapsulates the message, the source node can forward the message to the forwarding node A through the forwarding node X.
  • the forwarding node X knows the address information of the forwarding node A, refer to the prior art.
  • forwarding node A After forwarding node A receives the message, it can perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine the remaining 3 forwarding nodes of the current message forwarding path. That is, there are three forwarding nodes including the forwarding node A.
  • Step 2 By analyzing the sixth indication field, it is determined that the elements indicated by the first indication field include compressed elements, and the second indication field needs to be read.
  • Step 3 According to the second field of the second indication field, read the first field corresponding to the address compression method 2 to determine the address compression method used by the source node to forward the address information of the node B.
  • the value of the second bit in the first field corresponding to the address compression method 2 is 0b1, that is, the source node uses the address compression method 2 for the address information of the forwarding node B.
  • Step 4 Determine the position of the compressed address information of the forwarding node B in the first indication domain according to a fifth indication domain that indicates a start position of the next element in the first indication domain. That is, the position of the fourth field corresponding to the forwarding node B in the first indication field.
  • Step 5 Read the fourth field corresponding to the forwarding node B from the first indication domain according to the compressed address information of the forwarding node B in the first indication domain.
  • Step 6 According to the value 0b0 of the first part of the fourth field corresponding to the forwarding node B, determine that the address information of the forwarding node B has the same prefix as the address information of the source node. The value of the two parts determines that the length of the compressed address information of the forwarding node B is 8 bits. Then read 8 bits after the second part to get the third part of the fourth field, that is, the compressed address information of the forwarding node B is 0x15.
  • Step 7 Since the complete address information length of a forwarding node is 128 bits, a 120-bit prefix can be read from the address information of the source node carried in the message, and the 120-bit prefix is spliced into the forwarding node B. In front of the compressed address information, the address information of the forwarding node B is 0xFC00 :: 15.
  • Step 8 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the forwarding node C in the first indication field, which will be used for The value of the field indicating the number of remaining nodes on the message forwarding path is modified to 2.
  • Step 9 Forward the message to the forwarding node B according to the address information of the forwarding node B.
  • the forwarding node B After receiving the message sent by the forwarding node A, the forwarding node B can use the processing method of the forwarding node A to obtain the address information of the forwarding node C from the message, and according to the address information of forwarding node C, The text is forwarded to the forwarding node C, which will not be repeated here.
  • forwarding node C After forwarding node C receives the message sent by forwarding node B, it can perform the following steps:
  • Step 1 According to a field for indicating the number of remaining nodes on the message forwarding path, determine that there is one forwarding node remaining in the current message forwarding path. That is, there is a total of one forwarding node including the forwarding node C, and there are no more forwarding nodes in the future. Therefore, the fifth indication domain can be read directly.
  • Step 2 Determine the position of the address information of the destination node in the first indication domain according to a fifth indication domain that indicates the start position of the next element in the first indication domain. That is, the position of the fourth field corresponding to the destination node D in the first indication field.
  • Step 3 According to the position of the address information of the destination node D in the first indication domain, read 128-bit data from the first indication domain.
  • the 128-bit data is the fourth field corresponding to the destination node D. That is, the address information of the destination node D: 0xFC00 :: AABEF.
  • Step 4 Modify the value of the fifth indication field used to indicate the starting position of the next element in the first indication field to the position of the fourth field corresponding to the destination node in the first indication field, which will be used to indicate The value of the field of the number of remaining nodes on the packet forwarding path was changed to 0.
  • Step 5 Forward the message to the destination node D according to the address information of the destination node D.
  • the destination node D After receiving the message, the destination node D determines that there is no remaining forwarding node in the current message forwarding path according to a field indicating the number of remaining nodes on the message forwarding path, and then determines that it is the final destination address of the message. . Then the destination node D can parse and process the message in the manner of the prior art, and no longer forward it.
  • the message transmission method provided in the embodiment of the present application can forward messages with different compression characteristics when using the IPv6 protocol to transmit messages and using IP source routing technology to guide forwarding nodes on the message forwarding path to forward messages.
  • the address information of the nodes is compressed using different address compression methods to maximize the compression of the address information of more forwarding nodes, so that the length of the compressed address information is less than 128 bits, and passes the first indication field of the message. Instruct these compressed address information to implement IP source routing. In this way, when the length of the message is constant, the number of elements that can be indicated can be increased, so that the number of specifiable forwarding nodes can be increased, and the difficulty of network deployment can be reduced.
  • FIG. 11 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the communication device implements some or all of the functions of the compression node described above through software, hardware, or a combination of both.
  • the communication device may be a compression node or a chip applied to the compression node.
  • the communication apparatus may include a processing module 11 and a sending module 12. among them,
  • the processing module 11 is configured to generate a message according to the address information of the forwarding node on the message forwarding path; the message includes a first indication field, and the first indication field is used to indicate the compressed first element and The compressed second element, the first element and the second element are address information of different forwarding nodes, and the first element and the second element use different address compression methods;
  • the sending module 11 is configured to send the message.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first subsets Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset; the first element and the second element are Different address compression methods are used, including: the first element and the second element belong to different first subsets, and the prefix of the first subset to which the first element belongs is different from that of the second element to which the second element belongs.
  • a subset has different prefixes; the address compression method used for the first element is: removing the same portion of the first element as the prefix of the first subset to which the first element belongs, to obtain a compressed The first element; the address compression method used for the second element is: removing the second element from the same prefix as the first subset to which the second element belongs to obtain the compressed second element .
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second elements use different address compression methods
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are in A subset includes different elements, and each element of the second subset has the same prefix as the address information of the source node or the destination node
  • the third element is the same as the first element, the first The address compression methods used by the two elements are different, including: the third element belongs to the second subset; the address compression method used by the third element is: removing the third element from the source
  • the same prefix of the address information of the end node is used to obtain the compressed third element, or the third element is removed from the third element and has the same prefix as the address information of the destination node to obtain the compressed third element.
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second element uses different address compression methods
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element and each of the The media access control MAC address of the forwarding node corresponding to the third element is partially the same
  • the address compression method used by the third element is different from that of the first element and the second element, and includes:
  • the address compression method used is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes a second subset and at least one A first subset
  • the second subset includes at least one element
  • each of the first subset includes at least two elements
  • the elements included in the second subset and the at least one first subset include
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information of the source node or the destination node
  • Address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, including: the first element belongs to a first subset, and the second element Elements belong to the second subset;
  • the address compression method used by the first element is: removing the same prefix in the first element as the prefix of the first subset to which the first element belongs to obtain the compressed The
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second element uses different address compression methods
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset
  • the first The media access control MAC address of the forwarding element corresponding to each of the three elements of each of the three elements is partially the same
  • the address compression methods used by the third element, the first element, and the second element are different, including :
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the message forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least one first subset and The second element
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and each The media access control MAC addresses of the forwarding nodes corresponding to the second elements are partially the same
  • the address compression methods used by the first element and the second element are different, including: the first element belongs to a first A subset;
  • the address compression method used for the first element is: removing the same prefix in the first element as the first subset to which the first element belongs to obtain the compressed first element ;
  • the address compression method used by the second element is: removing the part of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain the compressed second element
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a second Element, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node, and the second prefix
  • the media access control MAC address of the forwarding node corresponding to each of the second element is partially the same; the address compression method used by the first element and the second element is different, and includes: the first element Belongs to the second subset; the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, Or removing the same prefix in the first element as the address information of the destination node to obtain a compressed first element; the address used by the second element is compressed Way: removing the same MAC address forwarding node portions of the second
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the message further includes a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one of the first indication fields.
  • the bit is the first value, it indicates that the element corresponding to the bit is the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the The element corresponding to the bit does not use the address compression manner corresponding to the first field.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1; and the second field is used to indicate an element indicated by the first indication field
  • N is an integer greater than or equal to 1
  • the second field is used to indicate an element indicated by the first indication field
  • a total of N address compression methods are used; each of the first fields corresponds to one of the N address compression methods, and one bit in each of the first fields corresponds to one of the first indication domains.
  • the bit is the first value, it indicates that the element corresponding to the bit is the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the The element corresponding to the bit does not use the address compression manner corresponding to the first field.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and a second part; the The first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the first indication field includes at least one fourth field; each of the fourth fields corresponds to an element indicated by the first indication field; an element corresponding to the fourth field belongs to
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate a first corresponding to a prefix of the first subset to which the element belongs.
  • the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed element; in the fourth field
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the second element has the same prefix as the second element.
  • the identifier of the address information of the source node or the identifier of the address information of the destination node having the same prefix as the second element, and the second part of the fourth field is used to indicate the compressed length of the element
  • the fourth The third part of the segment is used to indicate the compressed element; when the element corresponding to the fourth field is the same as the media access control MAC address of the forwarding node corresponding to the element, the first The four fields include a first part and a second part, the first part of the fourth field is used to indicate the length of the element after being compressed, and the second part of the fourth field is used to indicate the element after being compressed.
  • the message further includes a fourth indication field; the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the message further includes a fifth indication field; the fifth indication field is used to indicate a start position of a next element in the first indication field, and the next element corresponds to
  • the node is the node that forwards or receives the message next to the message forwarding path.
  • the message further includes a sixth indication field; the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify the first indication field
  • the indicated elements include compressed elements.
  • the communication device provided in the embodiment of the present application can perform the actions on the compression node side in the foregoing method embodiments. Actually, the principle and technical effect are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of another communication device according to an embodiment of the present application.
  • the communication device implements part or all of the functions of the foregoing forwarding node for receiving a message through software, hardware, or a combination of both.
  • the communication device may be the forwarding node or a chip applied to the forwarding node.
  • the communication device may include a receiving module 21, a processing module 22, and a sending module 23. among them,
  • the receiving module 21 is configured to receive a message; the message includes a first indication field, where the first indication field is used to indicate a compressed first element and a compressed second element, the first element And the second element is address information of different forwarding nodes on a message forwarding path, and the first element and the second element use different address compression methods;
  • a processing module 22 configured to determine address information of a next forwarding node according to the first indication domain
  • the sending module 23 is configured to send the message to the next forwarding node according to the address information of the next forwarding node.
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes at least two first subsets Each of the first subset includes at least two elements, and the same prefix between the elements of the first subset is the prefix of the first subset; the first element and the second element are Different address compression methods are used, including: the first element and the second element belong to different first subsets, and the prefix of the first subset to which the first element belongs is different from that of the second element to which the second element belongs.
  • a subset has different prefixes; the address compression method used for the first element is: removing the same portion of the first element as the prefix of the first subset to which the first element belongs, to obtain a compressed The first element; the address compression method used for the second element is: removing the second element from the same prefix as the first subset to which the second element belongs to obtain the compressed second element .
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second elements use different address compression methods
  • the address information set further includes: a second subset, the second subset includes at least one element, and the elements included in the second subset are in A subset includes different elements, and each element of the second subset has the same prefix as the address information of the source node or the destination node
  • the third element is the same as the first element, the first The address compression methods used by the two elements are different, including: the third element belongs to the second subset; the address compression method used by the third element is: removing the third element from the source
  • the same prefix of the address information of the end node is used to obtain the compressed third element, or the third element is removed from the third element and has the same prefix as the address information of the destination node to obtain the compressed third element.
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second element uses different address compression methods
  • the address information set further includes the third element, and the third element does not belong to the first subset, and the third element and each of the The media access control MAC address of the forwarding node corresponding to the third element is partially the same
  • the address compression method used by the third element is different from that of the first element and the second element, and includes:
  • the address compression method used is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the packet forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes a second subset and at least one A first subset
  • the second subset includes at least one element
  • each of the first subset includes at least two elements
  • the elements included in the second subset and the at least one first subset include
  • the elements included are different, the same prefix between the elements of the first subset is the prefix of each of the first subset, and each element of the second subset is the address information of the source node or the destination node
  • Address information has the same prefix and the same prefix length;
  • the address compression method used by the first element and the second element is different, including: the first element belongs to a first subset, and the second element Elements belong to the second subset;
  • the address compression method used by the first element is: removing the same prefix in the first element as the prefix of the first subset to which the first element belongs to obtain the compressed The
  • the first indication field is further used to indicate a compressed third element
  • the third element is address information of a forwarding node
  • the third element is related to the first element
  • the The second element uses different address compression methods
  • the address information set further includes the third element, and the third element does not belong to the first subset and the second subset
  • the first The media access control MAC address of the forwarding element corresponding to each of the three elements of each of the three elements is partially the same
  • the address compression methods used by the third element, the first element, and the second element are different, including :
  • the address compression method used for the third element is: removing the same portion of the third element as the MAC address of the forwarding node corresponding to the third element to obtain a compressed third element.
  • the address information of the forwarding node on the message forwarding path is an address information set
  • the address information of each forwarding node is an element
  • the address information set includes at least one first subset and The second element
  • each of the first subset includes at least two elements
  • the same prefix between the elements of the first subset is the prefix of the first subset
  • the second element and each The media access control MAC addresses of the forwarding nodes corresponding to the second elements are partially the same
  • the address compression methods used by the first element and the second element are different, including: the first element belongs to a first A subset;
  • the address compression method used for the first element is: removing the same prefix in the first element as the first subset to which the first element belongs to obtain the compressed first element ;
  • the address compression method used by the second element is: removing the part of the second element that is the same as the MAC address of the forwarding node corresponding to the second element to obtain the compressed second element
  • the address information of the forwarding node on the message forwarding path is an address information set, and the address information of each forwarding node is an element, and the address information set includes a second subset and a second Element, the second subset includes at least one element, and each element of the second subset has the same prefix and the same prefix length as the address information of the source node or the destination node, and the second prefix
  • the media access control MAC address of the forwarding node corresponding to each of the second element is partially the same; the address compression method used by the first element and the second element is different, and includes: the first element Belongs to the second subset; the address compression method used for the first element is: removing the same prefix in the first element as the address information of the source node to obtain the compressed first element, Or removing the same prefix in the first element as the address information of the destination node to obtain a compressed first element; the address used by the second element is compressed Way: removing the same MAC address forwarding node portions of the second
  • the first indication field is further used to indicate a fourth element, where the fourth element is address information of an uncompressed forwarding node on a message forwarding path.
  • the message further includes a second indication field, where the second indication field is used to indicate an address compression method used by the element indicated by the first indication field.
  • the second indication field includes at least one first field, each of the first fields corresponds to an address compression method, and one bit in each of the first fields corresponds to one of the first indication fields.
  • the bit is the first value, it indicates that the element corresponding to the bit is the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the The element corresponding to the bit does not use the address compression manner corresponding to the first field.
  • the second indication field includes a second field and N first fields, where N is an integer greater than or equal to 1; and the second field is used to indicate an element indicated by the first indication field
  • N is an integer greater than or equal to 1
  • the second field is used to indicate an element indicated by the first indication field
  • a total of N address compression methods are used; each of the first fields corresponds to one of the N address compression methods, and one bit in each of the first fields corresponds to one of the first indication domains.
  • the bit is the first value, it indicates that the element corresponding to the bit is the address compression method corresponding to the first field.
  • the bit is the second value, it indicates that the The element corresponding to the bit does not use the address compression manner corresponding to the first field.
  • the message includes a second indication field corresponding to each element indicated by the first indication field, and is used to indicate an address compression method used for the corresponding element.
  • the message further includes: a third indication field, where the third indication field is used to indicate prefix information of each of the first subset.
  • the third indication field includes at least one third field, and each of the third fields corresponds to a prefix of the first subset; each of the third fields includes a first part and a second part; the The first part of the third field is used to indicate the length of the corresponding prefix of the first subset, and the second part of the third field is used to indicate the corresponding prefix of the first subset.
  • the first indication field includes at least one fourth field; each of the fourth fields corresponds to an element indicated by the first indication field; an element corresponding to the fourth field belongs to
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate a first corresponding to a prefix of the first subset to which the element belongs.
  • the second part of the fourth field is used to indicate the compressed length of the element, and the third part of the fourth field is used to indicate the compressed element; in the fourth field
  • the fourth field includes a first part, a second part, and a third part, and the first part of the fourth field is used to indicate that the second element has the same prefix as the second element.
  • the identifier of the address information of the source node or the identifier of the address information of the destination node having the same prefix as the second element, and the second part of the fourth field is used to indicate the compressed length of the element
  • the fourth The third part of the segment is used to indicate the compressed element; when the element corresponding to the fourth field is the same as the media access control MAC address of the forwarding node corresponding to the element, the first The four fields include a first part and a second part, the first part of the fourth field is used to indicate the length of the element after being compressed, and the second part of the fourth field is used to indicate the element after being compressed.
  • the processing module 22 is specifically configured to determine an address compression method used for the address information of the next forwarding node according to the second indication domain, and according to the next forwarding node's The address compression method used for the address information, and the compressed address information of the next forwarding node indicated by the first indication domain, restores the address information of the next forwarding node.
  • the processing module 23 is specifically configured to: when the address information of the next forwarding node belongs to the first subset, according to an address compression method used by the address information of the next forwarding node, The prefix information of the first subset to which the address information of the next forwarding node indicated by the third indication domain belongs is added in front of the compressed address information of the next forwarding node, and the address of the next forwarding node is restored Information; when the address information of the next forwarding node belongs to the second subset, according to the address compression method used by the address information of the next forwarding node, the address information of the source node or the The address information of the destination node is the same prefix as the address information of the next forwarding node, and is added in front of the compressed address information of the next forwarding node to restore the address information of the next forwarding node; When the address information of the next forwarding node is partially the same as the media access control MAC address of the next forwarding node, Using an address compression method, adding the same part of the media
  • the message further includes a fourth indication field; the fourth indication field is used to indicate a start position of the third indication field in the message.
  • the message further includes a fifth indication field; the fifth indication field is used to indicate a start position of a next element in the first indication field, and the next element corresponds to
  • the node is the node that forwards or receives the message next to the message forwarding path.
  • the message further includes a sixth indication field; the sixth indication field is used to indicate a type of the message, and the type of the message is used to identify the first indication field
  • the indicated elements include compressed elements.
  • the communication device provided in the embodiment of the present application can perform the actions on the forwarding node side that received the message in the foregoing method embodiments.
  • the implementation principles and technical effects are similar, and details are not described herein again.
  • the above sending module may be a transmitter when it is actually implemented, and the receiver may be a receiver when it is actually implemented, and the processing module may be implemented by software through a processing element call; it may also be implemented by hardware.
  • the processing module may be a separately established processing element, or it may be integrated and implemented in a certain chip of the above-mentioned device.
  • it may also be stored in the form of program code in the memory of the above-mentioned device, and a certain processing element of the above-mentioned node Invoke and execute the functions of the above processing modules.
  • all or part of these modules can be integrated together, or they can be implemented independently.
  • the processing element described herein may be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules may be completed by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital signal processor (DSP), or one or more field programmable gate array (FPGA).
  • ASICs application specific integrated circuits
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code.
  • CPU central processing unit
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • FIG. 13 is a schematic structural diagram of still another communication device according to an embodiment of the present application.
  • the communication device may include a processor 31 (such as a CPU), a memory 32, and a transmitter 34; optionally, it may further include a receiver 33, and the receiver 33 and the transmitter 34 are both coupled to the processor.
  • the processor 31 controls the receiving action of the receiver 33, and the processor 31 controls the sending action of the transmitter 34;
  • the memory 32 may include a high-speed random access memory (RAM), and may also include non-volatile A memory (non-volatile memory, NVM), for example, at least one magnetic disk memory.
  • the memory 32 may store various instructions for completing various processing functions and implementing the method steps of the present application.
  • the communication device involved in this application may further include a power supply 35, a communication bus 36, and a communication port 37.
  • the receiver 33 and the transmitter 34 may be integrated in the transceiver of the communication device, or may be independent transmitting and receiving antennas on the communication device.
  • the communication bus 36 is used to implement a communication connection between the components.
  • the communication port 37 is used to implement connection and communication between the communication device and other peripheral devices.
  • the memory 32 is used to store computer-executable program code, and the program code includes instructions.
  • the instructions When the processor 31 executes the instructions, the instructions cause the processor 31 of the communication device to perform processing of the compression node in the foregoing method embodiment.
  • the action causes the receiver 33 to perform the receiving action of the compression node in the foregoing method embodiment, and causes the transmitter 34 to perform the sending action of the compression node in the above method embodiment.
  • FIG. 14 is a schematic structural diagram of still another communication device according to an embodiment of the present application.
  • the communication device may include: a processor 41 (such as a CPU), a memory 42, a receiver 43, and a transmitter 44; the receiver 43 and the transmitter 44 are both coupled to the processor 41, and the processor 41 controls receiving The receiving operation of the transmitter 43 and the transmitting operation of the transmitter 44 are controlled by the processor 41.
  • the memory 42 may include a high-speed RAM memory, and may also include a non-volatile memory NVM, such as at least one disk memory.
  • the memory 42 may store various instructions To complete various processing functions and implement the method steps of this application.
  • the communication device involved in this application may further include a power supply 45, a communication bus 46, and a communication port 47.
  • the receiver 43 and the transmitter 44 may be integrated in the transceiver of the communication device, or may be independent transmitting and receiving antennas on the communication device.
  • the communication bus 46 is used to implement a communication connection between the components.
  • the communication port 47 is used to implement connection and communication between the communication device and other peripheral devices.
  • the memory 42 is used to store computer-executable program code, and the program code includes instructions.
  • the instructions cause the processor 41 of the communication device to execute the forwarding node that receives the message in the foregoing method embodiment.
  • the processing action of the receiver 43 causes the receiver 43 to perform the receiving action of the forwarding node that receives the message in the foregoing method embodiment, and causes the transmitter 44 to perform the sending action of the forwarding node that receives the message in the method embodiment.
  • the implementation principle and technical effect thereof Similarly, I will not repeat them here.
  • FIG. 15 is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • the communication system may include a communication device 51 and a communication device 52.
  • the communication device 51 may be a compression node described in the foregoing embodiment, and the communication device 52 may be any forwarding node that receives a packet described in the foregoing embodiment.
  • the implementation principles and technical effects are similar, and are not described here. To repeat.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a web site, computer, server, or data center via a wired (e.g., Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integrations.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk (SSD)), and the like.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a DVD
  • a semiconductor medium for example, a solid state disk (Solid State Disk (SSD)
  • the term "plurality” herein refers to two or more.
  • the term “and / or” in this document is only a kind of association relationship describing related objects, which means that there can be three kinds of relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and exists alone B these three cases.
  • the character "/" in this article generally indicates that the related object is an "or” relationship; in the formula, the character "/" indicates that the related object is a "divide” relationship.
  • the size of the serial numbers of the above processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not be implemented in this application.
  • the implementation process of the example constitutes any limitation.

Abstract

本申请实施例提供一种报文传输方法、通信装置和系统,该方法包括:根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;发送所述报文。本申请实施例提供的报文传输方法、通信装置和系统,在采用IP源路由技术指导报文转发路径上的转发节点转发报文时,通过使用不同的地址压缩方式压缩不同的转发节点的地址信息,以增加报文所指示的转发节点的地址信息的数量,从而可以提高通过报文可指定的转发节点的数量,进而可以降低网络部署的难度。

Description

报文传输方法、通信装置和系统
本申请要求于2018年05月25日提交中国专利局、申请号为201810516567.2、申请名称为“报文传输方法、通信装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术,尤其涉及一种报文传输方法、通信装置和系统。
背景技术
物联网(Internet of things,IoT)是指物物相连的互联网。在IoT网络中,物与物之间可以通过互联网进行信息交换和通信,以实现智能化的识别、定位、跟踪、监控和管理等。IoT中的物可以称为节点。在大多数IoT场景中,节点的数目较多,一般都在几百甚至上千。节点同时扮演数据接收和转发的角色。即,节点不但要接收和处理IoT管理平台下发给本节点的消息,还要承担子节点和管理平台之间的数据转发任务。
由于节点的存储能力有限,极大的限制了节点可存储的路由表规模。因此,在IoT场景中,通常采用网络之间互连的协议(internet protocol,IP)源路由(source routing)技术来指导节点进行报文的转发。所谓源路由是指由源端节点指定报文的转发路径。以采用互联网协议第6版(internet protocol version 6,IPv6)协议进行报文传输为例,源端节点可以通过在报文的扩展报文头的地址列表字段中,添加该报文应当经过的部分或全部转发节点的地址信息(即IPv6地址),来指定该报文的转发路径。相应地,接收到该报文的节点可以根据地址列表字段所携带的转发节点的地址信息,对报文进行转发。这里所说的转发节点即为IoT场景中承担子节点和管理平台之间的数据转发任务的节点。在地址列表字段中,一个转发节点的地址信息可以称为地址列表字段的一个元素。
然而,由于地址信息较长(占用128比特),极大限制了地址列表字段中的元素的数量,即限制了源端节点可指定的转发节点的数量,给网络部署带来一定的困难。
发明内容
本申请实施例提供一种报文传输方法、通信装置和系统,用于解决在采用IPv6协议进行报文传输时,因每个转发节点的地址信息较长(占用128比特),极大限制了地址列表字段中的元素的数量,导致网络部署困难的技术问题。
第一方面,本申请实施例提供一种报文传输方法。该方法可以应用于压缩节点、也可以应用于压缩节点中的芯片。下面以应用于压缩节点为例对该方法进行描述,该方法包括:包括:
根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩 方式不同;
发送所述报文。
通过第一方面提供的报文传输方法,在采用IPv6协议进行报文传输报文、并采用IP源路由技术指导报文转发路径上的转发节点转发报文时,可以对具有不同压缩特点的转发节点的地址信息,采用不同的地址压缩方式进行压缩,以最大化的压缩更多转发节点的地址信息,使其被压缩后的地址信息的长度小于128比特,并通过报文的第一指示域指示这些被压缩后的地址信息来实现IP源路由。通过这种方式,在报文长度不变的情况,可以增加所指示的元素的数量,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素属于所述第二子集;
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可 以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
通过该可能的设计提供的报文传输方法,针对具有不同压缩特点的元素,可以使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可 以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
通过该可能的设计提供的报文传输方法,在采用IPv6协议进行报文传输报文、并采用IP源路由技术指导报文转发路径上的转发节点转发报文时,在存在无压缩特点的转发节点的地址信息和有压缩特点的转发节点的地址信息时,可以选择对有压缩特点的转发节点的地址信息进行压缩,对无压缩特点的转发节点的地址信息不压缩的方式,来最大化的压缩更多转发节点的地址信息,使其被压缩后的地址信息的长度小于128比特,并通过报文的第一指示域指示这些被压缩后的地址信息来实现IP源路由。通过这种方式,在报文长度不变的情况,可以增加所指示的元素的数量,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
在一种可能的设计中,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
通过该可能的设计提供的报文传输方法,接收到报文的转发节点通过第二指示域可以获知下一转发节点的地址信息(即元素)所使用的地址压缩方式,从而使得接收到报文的转发节点可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,以及,第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素),还原该下一转发节点完整的地址信息。这样,接收到报文的转发节点可以通过该下一转发节点的地址信息,将报文转发给下一转发节点,实现IP源路由。
在一种可能的设计中,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
通过该可能的设计提供的报文传输方法,可以通过设置与每种地址压缩方式对应的第一字段,来指示第一指示域所指示的每个元素所使用的地址压缩方式,从而使得接收到报文的转发节点通过第二指示域可以获知下一转发节点的地址信息(即元素)所使用的地址压缩方式,进而使得接收到报文的转发节点可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,以及,第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素),还原该下一转发节点完整的地址信息。这样,接收到报文的转发节点可以通过该下一转发节点的地址信息,将报文转发给下一转发节点,实现IP源路由。
在一种可能的设计中,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
通过该可能的设计提供的报文传输方法,通过设置指示第一指示域所指示的元素总计使用N种地址压缩方式的第二字段,以及与N种地址压缩方式中的每种地址压缩方式的第一字段,来实现指示第一指示域指示的每个元素所使用的地址压缩方式的同时,可以降低第二指示域的长度,降低了比特开销。
在一种可能的设计中,所述报文包括与所述第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
通过该可能的设计提供的报文传输方法,通过设置与元素对应的第二指示域指示该元素所使用的地址压缩方式,从而使得接收到报文的转发节点通过下一转发节点的地址信息对应的第二指示域,获知下一转发节点的地址信息(即元素)所使用的地址压缩方式,进而使得接收到报文的转发节点可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,以及,第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素),还原该下一转发节点完整的地址信息。这样,接收到报文的转发节点可以通过该下一转发节点的地址信息,将报文转发给下一转发节点,实现IP源路由。
在一种可能的设计中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
通过该可能的设计提供的报文传输方法,通过指示每个第一子集的前缀信息的第三指示域,使接收到该报文的转发节点,可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,将第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素)的前面,还原出下一转发节点的地址信息,以使得转发节点可以基于下一转发节点的地址信息转发报文,实现IP源路由。
在一种可能的设计中,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
通过该可能的设计提供的报文传输方法,通过第三字段的第一部分指示第一子集的前缀的长度,可以提高接收到该报文的转发节点解析第一子集的前缀的效率。
在一种可能的设计中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有 部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
通过该可能的设计提供的报文传输方法,通过第四字段指示所对应第一指示域所指示的一个元素的方式,可以提高接收到该报文的转发节点解析下一转发节点的地址信息的效率。
在一种可能的设计中,所述报文还包括第四指示域;
所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
通过该可能的设计提供的报文传输方法,在接收到该报文的转发节点需要使用某一第一子集的前缀信息还原下一转发节点的地址信息时,可以使接收到该报文的转发节点基于第四指示域,从第三指示域中快速提取到所需的第一子集的前缀信息,提升接收到该报文的转发节点从报文中解析出下一转发节点的地址信息的效率。
在一种可能的设计中,所述报文还包括第五指示域;
所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
通过该可能的设计提供的报文传输方法,通过第五指示域,可以使接收报文的转发节点在第一指示域中快速提取到下一转发节点的地址信息或下一转发节点被压缩后的地址信息,提升接收到该报文的转发节点从报文中解析出下一转发节点的地址信息的效率。
在一种可能的设计中,所述报文还包括第六指示域;
所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
通过该可能的设计提供的报文传输方法,通过第六指示域,可以使接收到该报文的转发节点获知第一指示域存在被压缩的元素,从而使得转发节点可以基于存在被压缩的元素的解析方式解析该报文的方式,从而提高了报文的解析效率。
第二方面,本申请实施例提供一种报文传输方法。该方法可以应用于报文转发路径上接收报文的转发节点、也可以应用于该转发节点中的芯片。下面以应用于转发节点为例对该方法进行描述,该方法包括:
接收报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为报文转发路径上不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
根据所述第一指示域,确定下一转发节点的地址信息;
根据所述下一转发节点的地址信息,向所述下一转发节点发送所述报文。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的 第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素属于所述第二子集;
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述 第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
在一种可能的设计中,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
在一种可能的设计中,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述报文包括与所述第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
在一种可能的设计中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
在一种可能的设计中,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
在一种可能的设计中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
在一种可能的设计中,所述根据所述第一指示域,确定下一转发节点的地址信息,包括:
根据所述第二指示域,确定所述下一转发节点的地址信息所使用的地址压缩方式;
根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息。
在一种可能的设计中,所述根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息,包括:
在所述下一转发节点的地址信息属于所述第一子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
在所述下一转发节点的地址信息属于所述第二子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述源端节点的地址信息或所述目的节点的地址信息与所述下一转发节点的地址信息相同的前缀,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
在所述下一转发节点的地址信息与所述下一转发节点的媒体访问控制MAC地址有部分地址相同时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述下一转发节点的媒体访问控制MAC地址中与所述下一转发节点的地址信息相同的部分,添加到所述下一转发节点被压缩后的地址信息中,还原所述下一转发节点的地址信息。
在一种可能的设计中,所述报文还包括第四指示域;
所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
在一种可能的设计中,所述报文还包括第五指示域;
所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
在一种可能的设计中,所述报文还包括第六指示域;
所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
上述第二方面和第二方面的各可能的设计所提供的报文传输方法,其有益效果可以参见上述第一方面和第一方面的各可能的设计所带来的有益效果,在此不加赘述。
第三方面,本申请实施例提供一种通信装置,该通信装置可以为压缩节点,也可以为应用于压缩节点的芯片,该通信装置包括:
处理模块,用于根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
发送模块,用于发送所述报文。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素属于所述第二子集;
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集 合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
在一种可能的设计中,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
在一种可能的设计中,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述报文包括与所述第一指示域所指示的每个元素对应的第二 指示域,用于指示对对应的元素所使用的地址压缩方式。
在一种可能的设计中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
在一种可能的设计中,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
在一种可能的设计中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
在一种可能的设计中,所述报文还包括第四指示域;
所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
在一种可能的设计中,所述报文还包括第五指示域;
所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
在一种可能的设计中,所述报文还包括第六指示域;
所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
上述第三方面和第三方面的各可能的设计所提供的通信装置,其有益效果可以参见上述第一方面和第一方面的各可能的设计所带来的有益效果,在此不加赘述。
第四方面,本申请实施例提供一种通信装置,该通信装置可以为报文转发路径上接收报文的转发节点,也可以为应用于该转发节点的芯片,该通信装置包括:
接收模块,用于接收报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为报文转发路径上不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
处理模块,用于根据所述第一指示域,确定下一转发节点的地址信息;
发送模块,用于根据所述下一转发节点的地址信息,向所述下一转发节点发送所述报文。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素属于所述第二子集;
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的 第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;
所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:
所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于一个第一子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;
所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
所述第一元素属于所述第二子集;
所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;
所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种可能的设计中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
在一种可能的设计中,所述报文还包括:第二指示域,所述第二指示域用于指示所述 第一指示域所指示的元素所使用的地址压缩方式。
在一种可能的设计中,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
在一种可能的设计中,所述报文包括与所述第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
在一种可能的设计中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
在一种可能的设计中,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
在一种可能的设计中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
在一种可能的设计中,所述处理模块,具体用于根据所述第二指示域,确定所述下一转发节点的地址信息所使用的地址压缩方式,并根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息。
在一种可能的设计中,所述处理模块,具体用于在所述下一转发节点的地址信息属于所述第一子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;在所述下一转发节点的地址信息属于所述第二子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述源端节点的地址信息或所述目的节点的地址信息与所述下一转发节点的地址信息相同的前缀,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;在所述下一转发节点的地址信息与所述下一转发节点的媒体访问控制MAC地址有部分地址相同时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述下一转发节点的媒体访问控制MAC地址中与所述下一转发节点的地址信息相同的部分,添加到所述下一转发节点被压缩后的地址信息中,还原所述下一转发节点的地址信息。
在一种可能的设计中,所述报文还包括第四指示域;
所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
在一种可能的设计中,所述报文还包括第五指示域;
所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
在一种可能的设计中,所述报文还包括第六指示域;
所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
上述第四方面和第四方面的各可能的设计所提供的通信装置,其有益效果可以参见上述第一方面和第一方面的各可能的设计所带来的有益效果,在此不加赘述。
第五方面,本申请实施例提供一种通信装置,所述通信装置包括:处理器、存储器、发送器;所述发送器均耦合至所述处理器,所述处理器控制所述发送器的发送动作;
其中,存储器用于存储计算机可执行程序代码,程序代码包括指令;当处理器执行指令时,指令使所述通信装置执行如第一方面或第一方面的各可能的设计所提供的报文传输方法。
第六方面,本申请实施例提供一种通信装置,所述通信装置包括:处理器、存储器、接收器、发送器;所述接收器和所述发送器均耦合至所述处理器,所述处理器控制所述接收器的接收动作,所述处理器控制所述发送器的发送动作;
其中,存储器用于存储计算机可执行程序代码,程序代码包括指令;当处理器执行指令时,指令使所述通信装置执行如第二方面或第二方面的各可能的设计所提供的报文传输方法。
第七方面,本申请实施例提供一种通信装置,包括用于执行以上第一方面或第一方面各可能的设计所提供的方法的单元、模块或电路。该通信装置可以为压缩节点,也可以为应用于压缩节点的一个模块,例如,可以为应用于压缩节点的芯片。
第八方面,本申请实施例提供一种通信装置,包括用于执行以上第二方面或第二方面各可能的设计所提供的方法的单元、模块或电路。该通信装置可以为报文转发路径上接收报文的转发节点,也可以为应用于该转发节点的一个模块,例如,可以为应用于该转发节 点的芯片。
第九方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的各种可能的设计中的方法。
第十方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二方面或第二方面的各种可能的设计中的方法。
第十一方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的各种可能的设计中的方法。
第十二方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第二方面或第二方面的各种可能的设计中的方法。
第十三方面,本申请实施例提供一种通信系统,所述通信系统包括:上述第三方面或第三方面的各种可能的设计中的通信装置,以及,上述第四方面或第四方面的各种可能的设计中的通信装置。
本申请实施例提供的报文传输方法、通信装置和系统,在采用IPv6协议进行报文传输报文、并采用IP源路由技术指导报文转发路径上的转发节点转发报文时,可以对具有不同压缩特点的转发节点的地址信息,采用不同的地址压缩方式进行压缩,以最大化的压缩更多转发节点的地址信息,使其被压缩后的地址信息的长度小于128比特,并通过报文的第一指示域指示这些被压缩后的地址信息来实现IP源路由。通过这种方式,在报文长度不变的情况,可以增加所指示的元素的数量,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
附图说明
图1为本申请实施例的应用场景图;
图2为现有的报文的扩展报文头的示意图;
图3为本申请实施例提供的一种报文传输方法的流程示意图;
图4为本申请实施例提供的一种报文头的格式;
图5为本申请实施例提供的另一种报文头的格式;
图6为本申请实施例提供的又一种报文头的格式;
图7为本申请实施例提供的一种报文传输场景示意图;
图8为本申请实施例提供的又一种报文头的示意图;
图9为本申请实施例提供的另一种报文传输场景示意图;
图10为本申请实施例提供的又一种报文头的示意图;
图11为本申请实施例提供的一种通信装置的结构示意图;
图12为本申请实施例提供的另一种通信装置的结构示意图;
图13为本申请实施例提供的又一种通信装置的结构示意图;
图14为本申请实施例提供的又一种通信装置的结构示意图;
图15为本申请实施例提供的一种通信系统的结构示意图。
具体实施方式
图1为本申请实施例的应用场景图。如图1所示,本申请实施例可以应用于包括源端节点、目的节点和至少一个转发节点(如图1中的转发节点1至转发节点6)的场景,例如,IoT网络场景、封闭组网场景、传统IP网络场景等。其中,源端节点、至少一个转发节点、目的节点所在的网络可以为有线网络或无线网络。在图1所示的应用场景中,源端节点可以通过该至少一个转发节点向目的节点发送报文。因此,该至少一个转发节点可以称为报文转发路径上的转发节点。本申请实施例对报文转发路径上的转发节点的具体数量不做限定。
上述所说的源端节点和目的节点可以为网络服务器设备,也可以为终端设备。终端设备也可以称为终端Terminal、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、手持式通信设备、手持式计算设备、IoT节点(也可以称为IoT设备,本申请实施例对此不进行区分)等。
上述所说的转发节点可以为专门用于转发报文的转发设备,例如路由器、网关、交换机等。上述转发节点也可以为具备转发功能的数据节点,例如IoT节点。
现有技术中,源端节点在通过该至少一个转发节点向目的节点发送报文时,可以采用IP源路由技术指导报文转发路径上的转发节点转发报文。即,源端节点通过在报文中添加该报文转发路径上的转发节点的地址信息(简称:地址列表),来指定该报文的转发路径。这样,接收到该报文的转发节点可以根据报文所携带的地址列表,对报文进行转发。
下面以采用IPv6协议进行报文传输为例,对现有技术中源端节点如何在报文中添加地址列表进行说明。
具体地,报文中设置有地址列表字段,源端节点可以通过该地址列表字段中添加该报文转发路径上的转发节点的地址信息(即长度为128比特(bit)的IPv6地址),来指定该报文的转发路径。上述地址列表字段可以设置在报文的扩展报文头中。图2为现有的报文的扩展报文头的示意图。如图2所示,该扩展报文头可以包括如下字段:
1、用于指示下一报文头的类型的字段(例如Next Header字段)。
2、用于指示当前报文头的长度的字段(例如Hdr Ext Len字段)。
3、用于指示当前报文头的类型的字段(例如Routing Type字段)。在本示例中,该字段的取值为0。
4、用于指示报文转发路径上剩余节点的数量的字段(例如Segment left字段)。
5、保留字段。
6、用于指示报文转发路径上的转发节点的地址信息的地址列表字段。其中,一个转发节点的地址信息(即IPv6地址)可以称为地址列表字段的一个元素。
由于每个转发节点的地址信息较长(占用128比特),所以,当源端节点指定的转发节点的数量较多时,即地址列表字段的元素较多时,会导致地址列表字段过长,进而导致 扩展报文头过长、报文的可用payload(即传输数据的字段)的空间变小,极大限制了地址列表字段中的元素的数量。另外,IEEE 802.15.4协议限制最大帧长为127字节,若IoT网络在二层采用IEEE 802.15.4协议传输报文,则为了避免因为报文超出最大帧长,导致报文分片、增加转发节点的处理负担的情况,需要限制报文的大小,进而限制了报文的地址列表字段中的元素的数量。
通过上述描述可以看出,在采用IPv6协议进行报文传输时,由于每个转发节点的地址信息较长(占用128比特),极大限制了地址列表字段中的元素的数量,即限制了源端节点可指定的转发节点的数量,给网络部署带来一定的困难。
考虑到上述问题,本申请实施例提供了一种报文传输方法,在采用IPv6协议进行报文传输报文、并采用IP源路由技术指导报文转发路径上的转发节点转发报文时,可以对具有不同压缩特点的转发节点的地址信息,采用不同的地址压缩方式进行压缩,以最大化的压缩更多转发节点的地址信息,使其被压缩后的地址信息的长度小于128比特,并通过报文的地址列表字段携带这些被压缩后的地址信息来实现IP源路由。通过这种方式,在报文的地址列表字段长度不变的情况,可以增加地址列表字段中的元素的数量,从而可以提高源端节点可指定的转发节点的数量,进而可以降低网络部署的难度。
可以理解,本申请实施例的方法可以适用于上述图1所示的应用场景。本申请实施例的执行主体可以为压缩节点,该压缩节点可以为源端节点、或、报文转发路径上的某一转发节点。在压缩节点为报文转发路径上的某一转发节点时,在该转发节点之前的节点之间可以不采用IP源路由技术发送该报文。以压缩节点为图1所示的转发节点3为例,则源端节点、转发节点1、转发节点2之间可以不采用IP源路由技术发送该报文,而是采用传统的查找路由表的方式发送该报文,具体可以参见现有技术,对此不再加以赘述。
下面结合图1所示的应用场景为例,通过一些实施例对本申请的技术方案进行详细说明。下面这几个实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图3为本申请实施例提供的一种报文传输方法的流程示意图。本实施例涉及的是压缩节点对报文转发路径上的一个或多个转发节点的地址信息采用不同的地址压缩方式进行压缩的过程。如图3所示,该方法包括:
S101、根据报文转发路径上的转发节点的地址信息,生成报文;报文包括第一指示域,第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,第一元素和第二元素为不同转发节点的地址信息,第一元素与第二元素所使用的地址压缩方式不同。
S102、发送报文。
具体的,报文转发路径上的转发节点的地址信息可以视为一个地址信息集合。其中,每个转发节点的地址信息作为地址信息集合中的一个元素。可以理解,当压缩节点为源端节点时,地址信息集合可以包括报文转发路径上的所有转发节点的地址信息,当压缩节点为报文转发路径上的某一转发节点时,地址信息集合可以包括该转发节点之后的所有转发节点的地址信息。
压缩节点在根据地址信息集合,生成报文时,可以先依据各个元素的压缩特点,对地址信息集合中的元素进行划分。其中,这里所说的元素的压缩特点例如可以为:与其他元素具有相同前缀、与源端节点的地址信息具有相同前缀、与目的节点的地址信息具有相同 前缀、与元素本身对应的转发节点的媒体访问控制(media access control,MAC)地址有部分地址相同等中的任一项。
下面以与其他元素具有相同前缀、与源端节点的地址信息具有相同前缀、与目的节点的地址信息具有相同前缀、与元素本身对应的转发节点的MAC地址有部分地址相同这些压缩特点为例,介绍压缩节点如何依据各个元素的压缩特点,对地址信息集合中的元素进行划分,具体地:
1、压缩节点确定地址信息集合中是否存在具有相同前缀的元素,若存在,将具有相同前缀的元素划分为一个第一子集。其中,每个第一子集包括至少两个元素,第一子集的元素之间相同的前缀为该第一子集的前缀。各第一子集的前缀不同,例如,前缀长度不同,或者前缀长度相同、但前缀内容不同等。
2、压缩节点确定地址信息集合中是否存在与源端节点的地址信息、或者、目的节点的地址信息具有相同前缀的元素。若存在,将这些元素划分为第二子集。可以理解,对于第二子集中与源端节点的地址信息具有相同的前缀的元素,各元素与源端节点的地址信息所具有的相同前缀的长度可以相同也可以不同。相应地,对于第二子集中与目的节点的地址信息具有相同的前缀的元素,各元素与目的节点的地址信息所具有的相同前缀的长度可以相同也可以不同。
3、压缩节点确定地址信息集合中是否存在与元素本身对应的转发节点的MAC地址有部分地址相同,若存在,将这些元素划分为第三子集。可以理解,第三子集中的各元素与该元素本身对应的转发节点的MAC地址相同部分的长度,可以相同也可以不同。
可以理解,当地址信息集合包括多个子集时,各个子集所包括的元素不同。即,各个子集之间无交集。
压缩节点在依据上述压缩特点,对地址信息集合中的元素进行划分之后,可以对地址信息集合中所包括的元素进行压缩,并生成报文,以通过报文的第一指示域指示这些被压缩后的元素。具体可以包括如下几种场景:
第一种场景:地址信息集合包括至少两个第一子集。
在该场景下,针对每个第一子集中的元素的压缩特点(即同一子集中的元素之间具有相同的前缀),压缩节点可以通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上述第一子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于不同的第一子集的第一元素和第二元素、以及,不属于任何一个第一子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被 压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
第二种场景:地址信息集合包括第二子集和至少一个第一子集。
在该场景下,针对每个第一子集中的元素的压缩特点(即同一子集中的元素之间具有相同的前缀),压缩节点可以通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。针对第二子集中的元素的压缩特点(即与源端节点的地址信息或目的节点的地址信息具有相同的前缀),压缩节点可以通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上述任一子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于其中一个第一子集的第一元素、属于第二子集的第二元素、以及,不属于任何一个子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,得到被压缩后的第二元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
以属于其中一个第一子集的第一元素、属于另一个第一子集的第二元素、属于第二子集的第三元素、以及,不属于任何一个子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。压缩节点对第三元素所使用的地址压缩方式可以为:去除第三元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,得到被压缩后的第三元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素、第二元素和第三元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素。
第三种场景:地址信息集合包括第三子集和至少一个第一子集。
在该场景下,针对每个第一子集中的元素的压缩特点(即同一子集中的元素之间具有相同的前缀),压缩节点可以通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。针对第三子集中的元素的压缩特点(即与该元素本身对应的转发节点的MAC地址有部分地址相同),压缩节点可以通过去除该元素中与该元素对应的转发节点的MAC地址相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上 述任一子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于其中一个第一子集的第一元素、属于第三子集的第二元素、以及,不属于任何一个子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与该第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
以属于其中一个第一子集的第一元素、属于另一个第一子集的第二元素、属于第三子集的第三元素、以及,不属于任何一个子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。压缩节点对第三元素所使用的地址压缩方式可以为:去除第三元素中与该第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素、第二元素和第三元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素。
第四种场景:地址信息集合中存在第二子集和第三子集。
在该场景下,针对第二子集中的元素的压缩特点(即与源端节点的地址信息或目的节点的地址信息具有相同的前缀),压缩节点可以通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。针对第三子集中的元素的压缩特点(即与该元素本身对应的转发节点的MAC地址有部分地址相同),压缩节点可以通过去除该元素中与该元素对应的转发节点的MAC地址相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上述任一子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于第二子集的第一元素、属于第三子集的第二元素、以及,不属于任何一个子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与该第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。压缩节点可以对第四元素不进 行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
第五种场景:地址信息集合包括第二子集、第三子集、至少一个第一子集。
在该场景下,针对每个第一子集中的元素的压缩特点(即同一子集中的元素之间具有相同的前缀),压缩节点可以通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。
针对第二子集中的元素的压缩特点(即与源端节点的地址信息或目的节点的地址信息具有相同的前缀),压缩节点可以通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。
针对第三子集中的元素的压缩特点(即与该元素本身对应的转发节点的MAC地址有部分地址相同),压缩节点可以通过去除该元素中与该元素对应的转发节点的MAC地址相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。
若地址信息集合中存在不属于上述任一子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以第一元素、第二元素、第三元素和第四元素为例,当第一元素属于其中一个第一子集、第二元素属于第二子集、第三元素属于第三子集、第四元素不属于任何一个子集时,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,得到被压缩后的第二元素。压缩节点对第三元素所使用的地址压缩方式可以为:去除第三元素中与该第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素、第二元素和第三元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、被压缩后的第三元素、未被压缩的第四元素。
第六种场景:地址信息集合包括第二子集。
在该场景下,针对第二子集中的元素的压缩特点(即与源端节点的地址信息或目的节点的地址信息具有相同的前缀),压缩节点可以通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上述第二子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于第二子集的第一元素和第二元素、以及,不属于第二子集的第四元素为例,其中,第一元素与源端节点的地址信息具有相同的前缀、第二元素与目的节点的地址信息具有相同的前缀,则压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与源端节点的地址信息相同的前缀,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与目的节点的地址信息相同的前缀,得到被压缩后的第二元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
第七种场景:地址信息集合包括第三子集。
在该场景下,针对第三子集中的元素的压缩特点(即与该元素本身对应的转发节点的MAC地址有部分地址相同),压缩节点可以通过去除该元素中与该元素对应的转发节点的MAC地址相同的部分,来对该元素进行压缩,得到被压缩后的元素(长度小于128比特)。若地址信息集合中存在不属于上述第三子集的元素,说明该元素无法进行压缩,则压缩节点可以对该元素不进行压缩。然后,压缩节点可以根据这些被压缩后的元素、未被压缩的元素,生成报文,以通过报文的第一指示域指示每个被压缩后的元素和每个未被压缩的元素。
以属于第三子集的第一元素和第二元素、以及,不属于第三子集的第四元素为例,压缩节点对第一元素所使用的地址压缩方式可以为:去除第一元素中与该第一元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第一元素。压缩节点对第二元素所使用的地址压缩方式可以为:去除第二元素中与该第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。压缩节点可以对第四元素不进行压缩。即,针对能够被压缩、且具有不同压缩特点的第一元素和第二元素,压缩节点可以通过去除不同前缀的方式进行压缩(即不同的地址压缩方式)。然后,压缩节点可以根据被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素,生成报文,以通过报文的第一指示域指示被压缩后的第一元素、被压缩后的第二元素、未被压缩的第四元素。
通过上述列举的各个场景可以看出,在本申请实施例中,压缩节点可以针对具有不同压缩特点的元素,使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,压缩节点在通过报文的第一指示域指示这些被压缩后的元素时,可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高源端节点可指定的转发节点的数量,进而可以降低网络部署的难度。
需要说明的是,上述所列举的元素的压缩特点、对地址信息集合中元素的划分方式、以及所列举的场景仅是一种示例,本申请实施例对此并不限定,具体可以基于地址信息集合中元素的压缩特点确定。
可选的,在一些实施例中,上述报文转发路径上还存在一个或多个转发节点为非IP地址类的转发节点,即,在向该转发节点发送报文时,不是通过该转发节点的地址信息将报文发送给该转发节点,而是通过该转发节点的其他标识信息将报文发送给该转发节点。例如,标签信息、设备身份标识号(identification,ID)等。针对这些转发节点,上述压缩 节点可以通过第一指示域指示这些非IP地址类的转发节点的标识,来指导报文的转发路径。
继续以图1所示的场景为例,假定转发节点1、转发节点2、转发节点3、转发节点6至转发节点8为非多协议标签交换(multi-protocol label switching,MPLS)域的节点,这些节点均为IP地址类的转发节点。即,节点之间以节点的地址信息作为标识进行通信。转发节点4和转发节点5为MPLS域的节点,这些节点以节点的MPLS标签作为标识进行通信。
以压缩节点为源端节点为例,则压缩节点可以通过报文的第一指示域指示转发节点1、转发节点2、转发节点3、转发节点6至转发节点8的地址信息,并通过第一指示域指示转发节点4的标签信息和转发节点5的标签信息,来指导报文的转发路径。
通过上述列举的场景可以看出,在本申请实施例中,在报文转发路径上存在非IP地址类的转发节点和IP地址类的转发节点时,压缩节点可以针对具有不同压缩特点的IP地址类的转发节点的地址信息,使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个IP地址类的转发节点的地址信息的长度,以及,更大化的压缩更多的IP地址类的转发节点的地址信息。这样,压缩节点可以在第一指示域长度一定的情况下,通过第一指示域指示更多的元素,从而可以提高源端节点可指定的转发节点的数量,进而可以降低网络部署的难度。
如前述实施例所说,压缩节点可以针对具有不同压缩特点的元素,使用不同的地址压缩方式进行压缩,因此,在本申请实施例的一种实现方式中,上述报文还可以包括第二指示域。其中,第二指示域用于指示第一指示域所指示的元素所使用的地址压缩方式。
其中,本申请实施例不限定上述第二指示域指示第一指示域所指示的元素所使用的地址压缩方式的实现方式。例如,第二指示域可以包括至少一个第一字段,每个第一字段对应一种地址压缩方式,每个第一字段中的一个比特位对应一个第一指示域所指示的一个元素,当比特位为第一值时,指示对比特位对应的元素使用第一字段对应的地址压缩方式,当比特位为第二值时,指示对比特位对应的元素未使用第一字段对应的地址压缩方式。当第一值为0时,第二值可以为1,或者,第一值为1时,第二值为0。
或者,第二指示域包括第二字段和N个第一字段,N为大于或等于1的整数。其中,第二字段,用于指示第一指示域所指示的元素总计使用N种地址压缩方式。每个第一字段对应N种地址压缩方式中的一种地址压缩方式,每个第一字段中的一个比特位对应一个第一指示域所指示的一个元素。当比特位为第一值时,指示对比特位对应的元素使用第一字段对应的地址压缩方式,当比特位为第二值时,指示对比特位对应的元素未使用第一字段对应的地址压缩方式。
或者,报文包括与第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
因此,接收到报文的转发节点通过第二指示域可以获知下一转发节点的地址信息(即元素)所使用的地址压缩方式,从而使得接收到报文的转发节点可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,以及,第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素),还原该下一转发节点完整的地址信息。这样,接收到报文的转发节点可以通过该下一转发节点的地址信息,将报文转发给下一转发节点。
例如,当上述下一转发节点的地址信息(即元素)所使用的地址压缩方式为,去除下 一转发节点的地址信息中与源端节点的地址信息或目的节点的地址信息相同的前缀,得到下一转发节点被压缩后的地址信息(即被压缩后的元素)时,接收到报文的转发节点可以从报文携带的源端节点的地址信息或目的节点的地址信息中提取前缀,并将该前缀添加至第一指示域所指示的下一转发节点被压缩后的地址信息的前面,以还原出下一转发节点的地址信息。
再例如,当上述下一转发节点的地址信息(即元素)所使用的地址压缩方式为,去除下一转发节点的地址信息中与该下一转发节点的MAC地址相同的部分,得到下一转发节点被压缩后的地址信息(即被压缩后的元素)时,接收到报文的转发节点可以使用该下一转发节点的MAC地址,将第一指示域所指示的下一转发节点被压缩后的地址信息补齐至128比特,以还原出下一转发节点的地址信息。
可选的,在一些实施例中,当报文转发路径上还存在一个或多个非IP地址类的转发节点时,上述第二指示域还用于指示第一指示域所指示的元素是否为非IP地址类的转发节点的标识。
其中,本申请实施例不限定上述第二指示域指示第一指示域所指示的元素是否为非IP地址类的转发节点的标识的实现方式。例如,可以在第二指示域中新增一个第一字段,每个第一字段中的一个比特位对应一个第一指示域所指示的一个元素,当比特位为第一值时,指示对比特位对应的元素为非IP地址类的转发节点的标识,当比特位为第二值时,指示对比特位对应的元素为IP地址类的转发节点的标识。或者,报文包括与第一指示域所指示的每个元素对应的第二指示域,用于指示对应的元素所使用的地址压缩方式,或,用于指示对应的元素是否为非IP地址类的转发节点的标识。
因此,当下一转发节点为非IP地址类的转发节点时,接收到报文的转发节点通过第二指示域可以获知下一转发节点为非IP地址类的转发节点,从而使得接收到报文的转发节点可以第一指示域所指示的下一转发节点的标识,将报文转发给下一转发节点。
当上述第一指示域所指示的被压缩的元素为第一子集中的元素时,上述报文中还可以包括第三指示域,用于指示每个第一子集的前缀信息。通过这种方式,可以使接收到该报文的转发节点,可以基于下一转发节点的地址信息(即元素)所使用的地址压缩方式,将第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到第一指示域所指示的下一转发节点被压缩后的地址信息(即被压缩后的元素)的前面,还原出下一转发节点的地址信息。
其中,本申请实施例不限定上述第三指示域指示每个第一子集的前缀信息的方式。例如,上述第三指示域包括至少一个第三字段,每个第三字段对应一个第一子集的前缀,用于指示对应的第一子集的前缀。在另一实现方式中,每个第三字段可以包括第一部分和第二部分,其中,第三字段的第一部分用于指示对应的第一子集的前缀的长度,第三字段的第二部分,用于指示对应的第一子集的前缀。通过第一部分指示第一子集的前缀的长度,可以提高解析第一子集的前缀的效率。
在该实现方式下,上述第一指示域可以包括至少一个第四字段;每个第四字段对应第一指示域所指示的一个元素;
在第四字段对应的元素属于第一子集时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示元素所属的第一子集的前缀对应的第三字段,第四字段 的第二部分用于指示元素被压缩后的长度,第四字段的第三部分用于指示被压缩后的元素;
在第四字段对应的元素属于第二子集时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示与第二元素具有相同前缀的源端节点的地址信息的标识或者与第二元素具有相同前缀的目的节点的地址信息的标识,第四字段的第二部分用于指示元素被压缩后的长度,第四字段的第三部分用于指示被压缩后的元素;
在第四字段对应的元素与元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,第四字段包括第一部分和第二部分,第四字段的第一部分用于指示元素被压缩后的长度,第四字段的第二部分用于指示被压缩后的元素;
在第四字段对应的元素为非IP地址类的转发节点的标识时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示元素的类型(例如标签、ID等),第四字段的第二部分用于指示元素的长度,第四字段的第三部分用于指示元素。
可以理解,上述第四字段中也可以不包括用于指示元素被压缩后的长度的部分,具体可以根据使用需求确定。
在另一实现方式中,上述报文还可以包括如下指示域中的一个或多个指示域:
第四指示域,用于指示第三指示域在报文中的起始位置。
第五指示域,用于指示下一元素在第一指示域中的起始位置,下一元素对应的节点为报文转发路径上下一个转发或接收报文的节点。通过第四指示域和/或第五指示域,可以提升接收到该报文的转发节点从报文中解析出下一转发节点的地址信息的效率。
第六指示域,用于指示报文的类型,报文的类型用于标识第一指示域所指示的元素包括被压缩的元素。通过第六指示域,可以使接收到该报文的转发节点获知第一指示域存在被压缩的元素,从而使得转发节点可以基于存在被压缩的元素的解析方式解析该报文的方式,从而提高了报文的解析效率。
上述各指示域可以位于报文的数据域中,也可以位于报文的某一报文头中,还可以一部分指示域位于报文的数据域中,一部分指示域位于报文的报文头中。
下面以各指示域位于报文中现有的用于实现IP源路由的扩展报文头为例,对该报文头的格式进行说明和介绍,具体可以包括如下几种格式:
第一种格式:图4为本申请实施例提供的一种报文头的格式。如图4所示,该报文头可以包括如下字段:
1、用于指示下一报文头的类型的字段(例如Next Header字段)。
2、用于指示当前报文头的长度的字段(例如Hdr Ext Len字段)。
3、用于指示报文转发路径上剩余节点的数量的字段(例如Segment left字段)。
4、用于指示第一指示域所指示的元素所使用的地址压缩方式的第二指示域。在本示例中,第二指示域包括第二字段和N个第一字段。其中,N的取值具体与压缩节点在发送该报文时,对该报文转发路径上的转发节点的地址信息所使用的地址压缩方式确定。例如,压缩节点使用了如下地址压缩方式:通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对元素进行压缩的地址压缩方式,以及,通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩的地址压缩方式。则上述第二指示域可以包括两个第一字段。即N等于2。图4示出的是以N等于2为例的示意图。
5、用于指示每个第一子集的前缀信息的第三指示域。
6、用于指示每个被压缩后的元素和每个未被压缩的元素的第一指示域。其中,一个转发节点的地址信息(即IPv6地址)可以称为地址列表字段的一个元素。
可选的,该报文头还可以包括如下至少一个字段:
7、用于指示第三指示域在报文中的起始位置的第四指示域。
8、用于指示下一元素在第一指示域中的起始位置的第五指示域。
9、用于指示报文的类型的第六指示域。在本申请实施例中,该字段的取值例如为100。
具体实现时,上述第六指示域例如可以为原扩展报文头的Routing Type字段。原扩展报文头的保留字段可以被拆分成如下几个指示域中的一个或多个:第四指示域、第五指示域、第二指示域。原扩展报文头的地址列表字段可以被拆分成如下几部分:第三指示域、第一指示域、目的节点的地址信息。可以理解,上述图4仅是一种示意,本申请实施例并不限定各个指示域在报文头中的位置,以及,各个指示域的长度(即占用的比特数)。
第二种格式:图5为本申请实施例提供的另一种报文头的格式。如图5所示,该报文头与图4所示的报文头的区别在于:图5所示的报文头包括与第一指示域所指示的每个元素对应的第二指示域。即报文头所包括的第二指示域的数量与元素的数量一一对应,以指示对应的元素所使用的地址压缩方式。关于报文头所包括的其他字段和/或指示域,可以参见图4的描述,在此不再一一赘述。
则在该实现方式下,原扩展报文头的保留字段可以被拆分成如下几个指示域中的一个或多个:第四指示域、第五指示域。原扩展报文头的地址列表字段可以被拆分成如下几部分:第三指示域、第二指示域、第一指示域、目的节点的地址信息。可以理解,上述图5仅是一种示意,本申请实施例并不限定各个指示域在报文头中的位置,以及,各个指示域的长度(即占用的比特数)。
可选的,在一种实现方式中,上述第二指示域可以包括如下字段:用于指示地址压缩方式的字段、至少一个用于指示元素对应的功能的字段(该字段所指示的具体功能可以根据实际需要设置)。
第三种格式:图6为本申请实施例提供的又一种报文头的格式。如图6所示,该报文头与图4所示的报文头的区别在于:图6所示的报文头中的第二指示域可以包括至少一个第一字段。其中,第一字段的数量与压缩节点所能够支持的地址压缩方式确定。例如,压缩节点支持通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对元素进行压缩的地址压缩方式,以及,通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩的地址压缩方式,以及,通过去除元素中与该元素对应的转发节点的MAC地址相同的部分,来对该元素进行压缩的地址压缩方式。则上述第二指示域可以包括三个第一字段。即X等于3。
也就是说,在图6所示的报文头格式中,即便压缩节点对该报文转发路径上的转发节点的地址信息并未使用某一种地址压缩方式,但是该地址压缩方式对应的第一字段仍然存在于该报文头中。而在图4所示的报文头格式中,若压缩节点对该报文转发路径上的转发节点的地址信息未使用某一种地址压缩方式,则该地址压缩方式对应的第一字段可以不存在于该报文头中。
关于报文头所包括的其他字段和/或指示域,可以参见图6的描述,在此不再一一赘述。
则在该实现方式下,原扩展报文头的保留字段可以被拆分成如下几个指示域中的一个 或多个:第四指示域、第五指示域。原扩展报文头的地址列表字段可以被拆分成如下几部分:第三指示域、第二指示域、第一指示域、目的节点的地址信息。可以理解,上述图5仅是一种示意,本申请实施例并不限定各个指示域在报文头中的位置,以及,各个指示域的长度(即占用的比特数)。
下面以图4所示的报文头格式为例,通过两个具体的示例对本申请实施例提供的报文传输方法进行详细说明。在下述示例中,源端节点S为压缩节点,即,源端节点S采用IP源路由技术指导报文转发路径上的转发节点转发报文。该场景中的转发节点支持如下两种地址压缩方式:
地址压缩方式1、通过去除该元素中与该元素所属的第一子集的前缀相同的部分,来对元素进行压缩的地址压缩方式。
地址压缩方式2、通过去除该元素中与源端节点的地址信息或目的节点的地址信息相同的前缀,来对该元素进行压缩的地址压缩方式。
示例1、
图7为本申请实施例提供的一种报文传输场景示意图。如图7所示,本申请实施例的报文传输场景为采用IPv6协议进行报文传输的广域网路由场景。该场景包括:源端节点S、目的节点D,以及,8个转发节点。图7中两个节点之间的连线为虚线时,说明该两个节点之间不是直连,两个节点之间的连线为实线时,说明该两个节点可以是直连,也可以不是直连。
每个节点的地址信息(即采用16进制表示的IPv6地址)如下述表1所示:
表1
Figure PCTCN2019088397-appb-000001
通过表1可以获知如下信息:
1、转发节点1的地址信息至转发节点3的地址信息,以及,源端节点S的地址信息,属于同一自治域(即AS1)内的地址信息。由于同一自治域的节点的地址信息具有相同的前缀,可以使用地址压缩方式2对转发节点1至转发节点3的地址信息进行压缩,因此,转发节点1的地址信息至转发节点3的地址信息的压缩特点为:与源端节点S的地址信息具有相同的前缀。
2、转发节点4的地址信息和转发节点5的地址信息属于同一自治域(即AS2)内的地址信息,且与源端节点S的地址信息和目的节点D的地址信息均不属于同一自治域。由 于同一自治域的节点的地址信息具有相同的前缀,可以使用地址压缩方式1对转发节点4至转发节点5的地址信息进行压缩,因此,转发节点4的地址信息和转发节点5的地址信息的压缩特点为:转发节点4的地址信息和转发节点5的地址信息之间具有相同的前缀。
3、转发节点6的地址信息单独属于一个自治域(即AS3)。即,转发节点6的地址信息与源端节点S的地址信息和目的节点D的地址信息均不属于同一自治域,与其他转发节点的地址信息也不属于同一自治域,无法对转发节点6的地址信息进行压缩。因此,转发节点6的地址信息无压缩特点。
4、转发节点7的地址信息和转发节点8的地址信息,以及,目的节点D的地址信息,属于同一自治域(即AS4)内的地址信息。由于同一自治域的节点的地址信息具有相同的前缀,可以使用地址压缩方式2对转发节点7至转发节点8的地址信息进行压缩,因此,转发节点7的地址信息和转发节点8的地址信息的压缩特点为:与目的节点的地址信息具有相同的前缀。
在本示例中,当源端节点S获取到报文转发路径上的转发节点的地址信息后,可以将报文转发路径上的转发节点的地址信息作为一个地址信息集合,并基于各个元素的压缩特点,对该地址信息集合划分子集,具体可以如下述表2所示:
表2
Figure PCTCN2019088397-appb-000002
在表2所示的地址信息集合的划分方式下,第一子集的前缀为0xFC00:0000:0000:5678:1234:12 34:12,一共104个比特。可以理解,上述元素6与元素4和元素5也具有相同的前缀0xFC00::。因此,也可以将元素4、元素5和元素6划分为一个第一子集。具体如何划分地址信息集合,可以由压缩节点根据实际需求确定。另外,为了便于区分十六进制、十进制和二进制,下述申请文件中添加0b前缀的数据为二进制数据,添加0x前缀的数据为十六进制数据,未添加前缀的数据为十进制数据。需要说明的是,上述前缀仅是为了标明数据的进制。
源端节点在对地址信息集合中的元素进行划分后,可以对地址信息集合中的元素逐个进行压缩,具体地:
元素1:元素1与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素1中与源端节点的地址信息相同的前缀“0xFC00::ABCD:1234:12FF:FE”,得到被压缩后的元素1“0x0F1234”。
元素2:元素2与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素2中与源端节点的地址信息相同的前缀“0xFC00::ABCD:1234:12FF:FE”,得到被压缩后 的元素2“0x34:AB12”。
元素3:元素3与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素3中与源端节点的地址信息相同的前缀“0xFC00::ABCD:1234:12FF:FE”,得到被压缩后的元素3“0xCD:ABCD”。
元素4:元素4与元素5具有相同的前缀,该前缀即为第一子集的前缀“0xFC00:0000:0000:5678:1234:1234:12”。因此,源端节点可以去除元素4中与第一子集的前缀相同的部分,得到被压缩后的元素4“0x34:1234”。
元素5:元素4与元素5具有相同的前缀,该前缀即为第一子集的前缀“0xFC00:0000:0000:5678:1234:1234:12”。因此,源端节点可以去除元素5中与第一子集的前缀相同的部分,得到被压缩后的元素5“0x56:AB12”。
元素7:元素7与目的节点的地址信息具有相同的前缀,因此,源端节点可以去除元素7中与目的节点的地址信息相同的前缀“0xFC00::4567:1234:12FF:FE”,得到被压缩后的元素3“0x14:1235”。
元素8:元素8与目的节点的地址信息具有相同的前缀,因此,源端节点可以去除元素8中与目的节点的地址信息相同的前缀“0xFC00::4567:1234:12FF:FE”,得到被压缩后的元素8“0x1A:ABEE”。
然后,源端节点可以基于上述每个被压缩的元素,以及,未被压缩的元素6,生成报文,并按照图4所示的报文头的格式封装该报文。图8为本申请实施例提供的又一种报文头的示意图。如图8所示,封装后的报文的报文头中与本申请实施例相关的字段可以如下所示:
1、用于指示报文转发路径上剩余节点的数量的字段(例如Segment left字段):由于当前报文转发路径上剩余8个转发节点,因此,该字段的取值可以为8。
2、用于指示第一指示域所指示的元素所使用的地址压缩方式的第二指示域:
由于源端节点支持两种地址压缩方式,因此,报文头的第二指示域的第二字段可以占用两个比特,以通过该两个比特来指示源端节点在此次报文中使用了几种地址压缩方式。对应到本申请实施例中,源端节点对第一子集中的元素可以使用地址压缩方式1,对第二子集中的元素使用地址压缩方式2,即,一共可以使用两种地址压缩方式,因此,上述第二指示域的第二字段可以为11。
上述第二指示域可以包括两个第一字段,一个第一字段对应地址压缩方式1、一个第一字段对应地址压缩方式2。每个第一字段中的一个比特位对应一个第一指示域所指示的一个元素。在本示例中一共有8个元素,因此,每个第一字段有8个比特,每个比特对应一个元素,用于指示该元素是否使用该第一字段对应的地址压缩方式。
以比特为1用于指示该比特对应的元素使用该第一字段对应的地址压缩方式、比特为0用于指示该比特对应的元素未使用该第一字段对应的地址压缩方式为例,则对应压缩方式1的第一字段可以为:0b00011000、对应压缩方式2的第一字段可以为:0b11100011。每个第一字段的最高位表示转发路径上的第一个转发节点,依次类推。
3、用于指示每个第一子集的前缀信息的第三指示域:
由于本示例仅有一个第一子集的前缀,因此,第三指示域可以包括一个第三字段。该第三字段的第一部分用于指示第一子集的前缀的长度,第三字段的第二部分,用于指示对 应的第一子集的前缀。其中,第三字段的第一部分的长度具体可以根据需求设定。
在本示例中,第一子集的前缀为:“0xFC00:0000:0000:5678:1234:1234:12”,一共104个比特。以第三字段的第一部分的长度为8个比特为例,则第三字段的第一部分的取值可以为:“0b11100111”。第三字段的第二部分为“0xFC00:0000:0000:5678:1234:1234:12”(需要说明的是,由于二进制数据太长,因此,为了便于理解,在此以十六进制来表示某些字段的部分,但是本领域技术人员可以理解的是,实际传输时传输的是该十六进制数对应的二进制数据,下述申请文件中出现十六进制的原因相同,不再一一赘述)。
综上,第三字段的取值为“0b11100111,0xFC00:0000:0000:5678:1234:1234:12”。
可以理解,当存在多个第一子集时,本申请实施例不限定各第一子集的前缀对应的第三字段在第三指示域中的顺序。
4、用于指示每个被压缩后的元素和每个未被压缩的元素的第一指示域:
以第一指示域包括至少一个第四字段,每个第四字段对应第一指示域所指示的一个元素为例,如前述所说,在第四字段对应的元素属于第一子集时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示元素所属的第一子集的前缀对应的第三字段,第四字段的第二部分用于指示元素被压缩后的长度,第四字段的第三部分用于指示被压缩后的元素;在第四字段对应的元素属于第二子集时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示与第二元素具有相同前缀的源端节点的地址信息的标识或者与第二元素具有相同前缀的目的节点的地址信息的标识,第四字段的第二部分用于指示元素被压缩后的长度,第四字段的第三部分用于指示被压缩后的元素。
因此,源端节点可以按照各个元素对应的转发节点在转发路径上的顺序在第一指示域中依次写入各个元素。以源端节点的地址信息的标识为0、目的节点的地址信息的标识为1、第四字段的第二部分通过7比特指示元素被压缩后的长度为例,具体地,
第一指示域的第一个第四字段对应元素1,第一个第四字段可以包括第一部分、第二部分和第三部分,元素1与源端节点的地址信息具有相同的前缀,因此,第一个第四字段的第一部分的取值为0b0。被压缩后的元素1的长度为24比特,因此,第一个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素1为“0x0F:1234”,因此,第一个第四字段的第三部分的取值为“0x0F:1234”。综上,第一个第四字段的取值为“0b0,0b0011000,0x0F:1234”。
第一指示域的第二个第四字段对应元素2,第二个第四字段可以包括第一部分、第二部分和第三部分,元素2与源端节点的地址信息具有相同的前缀,因此,第二个第四字段的第一部分的取值为0b0。被压缩后的元素2的长度为24比特,因此,第二个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素2为“0x34:AB12”,因此,第二个第四字段的第三部分的取值为“0x34:AB12”。综上,第二个第四字段的取值为“0b0,0b0011000,0x34:AB12”。
第一指示域的第三个第四字段对应元素3,第三个第四字段可以包括第一部分、第二部分和第三部分,元素3与源端节点的地址信息具有相同的前缀,因此,第三个第四字段的第一部分的取值为0b0。被压缩后的元素3的长度为24比特,因此,第三个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素3为“0xCD:ABCD”,因此,第三个第四字段的第三部分的取值为“0xCD:ABCD”。综上,第三个第四字段的取值为 “0b0,0b0011000,0xCD:ABCD”。
第一指示域的第四个第四字段对应元素4,第四个第四字段可以包括第一部分、第二部分和第三部分,元素4对应第三指示域指示的第一个第一子集的前缀(在本示例中也是唯一一个),因此,第四个第四字段的第一部分的取值为0b001(第一部分具体占用的比特数可以根据实际使用需求设定)。被压缩后的元素4的长度为24比特,因此,第四个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素4为“0x34:1234”,因此,第四个第四字段的第三部分的取值为“0x34:1234”。综上,第四个第四字段的取值为“0b001,0b0011000,0x34:1234”。
第一指示域的第五个第四字段对应元素5,第五个第四字段可以包括第一部分、第二部分和第三部分,元素5对应第三指示域指示的第一个第一子集的前缀(在本示例中也是唯一一个),因此,第五个第四字段的第一部分的取值为0b001(第一部分具体占用的比特数可以根据实际使用需求设定)。被压缩后的元素5的长度为24比特,因此,第五个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素4为“0x34:1234”,因此,第五个第四字段的第三部分的取值为“0x34:AB12”。综上,第五个第四字段的取值为“0b001,0b0011000,0x34:AB12”。
第一指示域的第六个第四字段对应元素6,由于元素6未被压缩,因此,第六个第四字段的取值为元素6,即“0xFC00::AAAA:1234:1234:1278:AB12”。
第一指示域的第七个第四字段对应元素7,第七个第四字段可以包括第一部分、第二部分和第三部分,元素7与目的节点的地址信息具有相同的前缀,因此,第七个第四字段的第一部分的取值为0b1。被压缩后的元素7的长度为24比特,因此,第七个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素7为“0x14:1234”,因此,第七个第四字段的第三部分的取值为“0x14:1234”。综上,第七个第四字段的取值为“0b1,0b0011000,0x14:1234”。
第一指示域的第八个第四字段对应元素8,第八个第四字段可以包括第一部分、第二部分和第三部分,元素8与目的节点的地址信息具有相同的前缀,因此,第八个第四字段的第一部分的取值为0b1。被压缩后的元素8的长度为24比特,因此,第八个第四字段的第二部分的取值为“0b0011000”。被压缩后的元素8为“0x1A:ABEE”,因此,第八个第四字段的第三部分的取值为“0x1A:ABEE”。综上,第八个第四字段的取值为“0b1,0b0011000,0x1A:ABEE”。
在本示例中,第一指示域还可以用于指示元素9,该元素9为目的节点的地址信息。即,第一指示域的第九个第四字段对应元素9,,由于元素9未被压缩,因此,第九个第四字段的取值为元素9,即“0xFC00::4567:1234:12FF:FE1A:ABEF”。
5、用于指示第三指示域在报文中的起始位置的第四指示域,该指示域的取值为第三指示域在报文中的起始位置。
6、用于指示下一元素在第一指示域中的起始位置的第五指示域,该指示域的初始取值为元素2对应的第四字段在第一指示域中的位置。
7、用于指示报文的类型的第六指示域。在本示例中,该指示域的取值例如为100。
可以理解,上述报文头中十六进制数在实际传输时,会传输该十六进制数对应的二进制数。另外,上述出现逗号和/或冒号的字段仅是为了标记该字段的不同部分,实际传输和 封装时不会出现逗号和/或冒号,以及标识该数据进制的前缀。
通过上述描述可以看出,源端节点可以针对具有不同压缩特点的元素,使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,源端节点在通过报文的第一指示域指示这些被压缩后的元素时,可以使用较少的比特指示这些元素,从而可以增加源端节点可指定的转发节点的数量,进而可以降低网络部署的难度。
上述源端节点在将上述报文封装之后,可以根据转发节点1的地址信息,将上述报文发送给转发节点1。
转发节点1在接收到该报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余8个转发节点。即,包括转发节点1一共有8个转发节点。
步骤2、通过解析第六指示域,确定第一指示域所指示的元素包括被压缩的元素,需要读取第二指示域。
步骤3、根据第二指示域的第二字段,读取每个第一字段,确定源端节点对转发节点2的地址信息所使用的地址压缩方式。例如,可以先读取地址压缩方式1对应的第一字段中第2个比特位的取值,并判断该取值是否为0b1。若是,则表示源端节点对转发节点2的地址信息使用的是地址压缩方式1。若否,则读取地址压缩方式2对应的第一字段中第2个比特位的取值,并判断该取值是否为0b1。若是,则表示源端节点对转发节点2的地址信息使用的是地址压缩方式2。若否,表示源端节点对转发节点2的地址信息未使用任何地址压缩方式。在本示例中,地址压缩方式2对应的第一字段中第2个比特位的取值为0b1,即,源端节点对转发节点2的地址信息使用的是地址压缩方式2。
步骤4、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定转发节点2被压缩后的地址信息在第一指示域中的位置。即对应转发节点2的第四字段在第一指示域中的位置。
步骤5:根据转发节点2被压缩后的地址信息在第一指示域中的位置,从第一指示域中读取转发节点2对应的第四字段。
步骤6:根据转发节点2对应的第四字段的第一部分的取值0b0,确定转发节点2的地址信息与源端节点的地址信息具有相同的前缀,根据转发节点2对应的第四字段的第二部分的取值,确定转发节点2被压缩后的地址信息长度为24比特。然后读取第二部分之后的24比特,得到第四字段的第三部分,即转发节点2被压缩后的地址信息0x0F1234。
步骤7、由于一个转发节点完整的地址信息长度为128比特,因此,可以从报文所携带的源端节点的地址信息中读取104比特的前缀,将该104比特的前缀拼接在转发节点2被压缩后的地址信息的前面,得到转发节点2的地址信息0xFC00::ABCD:1234:12FF:FE0F:1234。
步骤8:将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为转发节点3对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为7。
步骤9:根据转发节点2的地址信息,将报文转发给转发节点2。
转发节点2在接收到转发节点1发送的报文之后,可以采用转发节点1对报文的处理 方式,从报文中获取转发节点3的地址信息,并根据转发节点3的地址信息,将报文转发给转发节点3,在此不再加以赘述。
转发节点3在接收到转发节点2发送的报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余6个转发节点。即,包括转发节点3一共有6个转发节点。
步骤2、通过解析第六指示域,确定第一指示域所指示的元素包括被压缩的元素,需要读取第二指示域。
步骤3、根据第二指示域的第二字段,读取每个第一字段,确定源端节点对转发节点4的地址信息所使用的地址压缩方式。在本示例中,地址压缩方式1对应的第一字段中第4个比特位的取值为0b1,即,源端节点对转发节点4的地址信息使用的是地址压缩方式1。
步骤4、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定转发节点4被压缩后的地址信息在第一指示域中的位置。即对应转发节点4的第四字段在第一指示域中的位置。
步骤5:根据转发节点4被压缩后的地址信息在第一指示域中的位置,从第一指示域中读取转发节点4对应的第四字段。
步骤6:根据转发节点4对应的第四字段的第一部分的取值0b001,确定转发节点4的地址信息的前缀与第三指示域所指示的第一个第一子集的前缀相同,根据转发节点4对应的第四字段的第二部分的取值,确定转发节点4被压缩后的地址信息长度为24比特。然后读取第二部分之后的24比特,得到第四字段的第三部分,即转发节点4被压缩后的地址信息0x34:1234。
步骤7、根据用于指示第三指示域在报文中的起始位置的第四指示域的取值,确定第三指示域在报文中的起始位置。即,第一个第一子集的前缀对应的第三字段在报文中的起始位置。
步骤8、根据第一个第一子集的前缀对应的第三字段在报文中的起始位置,读取第一个第一子集的前缀对应的第三字段。根据第三字段的第一部分,确定第一子集的前缀长度为104比特。然后读取第一部分之后的104比特,得到第三字段的第二部分,即第一子集的前缀0xFC00:0000:0000:5678:1234:12 34:12。
步骤9、将第一子集的前缀拼接在转发节点4被压缩后的地址信息的前面,得到转发节点4的地址信息0xFC00::5678:1234:1234:1234:1234。
步骤10:将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为转发节点5对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为5。
步骤9:根据转发节点4的地址信息,将报文转发给转发节点4。
转发节点4在接收到转发节点3发送的报文之后,可以采用转发节点3对报文的处理方式,从报文中获取转发节点5的地址信息,并根据转发节点5的地址信息,将报文转发给转发节点5,在此不再加以赘述。
转发节点5在接收到转发节点4发送的报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余4个转发节点。即,包括转发节点5一共有4个转发节点。
步骤2、通过解析第六指示域,确定第一指示域所指示的元素包括被压缩的元素,需要读取第二指示域。
步骤3、根据第二指示域的第二字段,读取每个第一字段,确定源端节点对转发节点6的地址信息所使用的地址压缩方式。在本示例中,地址压缩方式1对应的第一字段中第6个比特位的取值为0b0,地址压缩方式2对应的第一字段中第6个比特位的取值为0b0。即,源端节点对转发节点6的地址信息并未使用任何地址压缩方式。
步骤4、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定转发节点6的地址信息在第一指示域中的位置。即对应转发节点6的第四字段在第一指示域中的位置。
步骤5:根据转发节点6的地址信息在第一指示域中的位置,从第一指示域中读取128比特的数据,该128比特的数据即为转发节点6对应的第四字段。即,转发节点6的地址信息:0xFC00::AAAA:1234:1234:1278:AB12。
步骤6:将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为转发节点7对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为3。
步骤9:根据转发节点6的地址信息,将报文转发给转发节点6。
转发节点6在接收到该报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余3个转发节点。即,包括转发节点6一共有3个转发节点。
步骤2、通过解析第六指示域,确定第一指示域所指示的元素包括被压缩的元素,需要读取第二指示域。
步骤3、根据第二指示域的第二字段,读取每个第一字段,确定源端节点对转发节点7的地址信息所使用的地址压缩方式。在本示例中,地址压缩方式2对应的第一字段中第7个比特位的取值为0b1,即,源端节点对转发节点7的地址信息使用的是地址压缩方式2。
步骤4、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定转发节点7被压缩后的地址信息在第一指示域中的位置。即对应转发节点7的第四字段在第一指示域中的位置。
步骤5:根据转发节点7被压缩后的地址信息在第一指示域中的位置,从第一指示域中读取转发节点7对应的第四字段。
步骤6:根据转发节点7对应的第四字段的第一部分的取值0b1,确定转发节点7的地址信息与目的节点的地址信息具有相同的前缀,根据转发节点7对应的第四字段的第二部分的取值,确定转发节点7被压缩后的地址信息长度为24比特。然后读取第二部分之后的24比特,得到第四字段的第三部分,即转发节点7被压缩后的地址信息0x141235。
步骤7、由于一个转发节点完整的地址信息长度为128比特,因此,可以从报文所携带的目的节点的地址信息中读取104比特的前缀,将该104比特的前缀拼接在转发节点7被压缩后的地址信息的前面,得到转发节点7的地址信息0xFC00::4567:1234:12FF:FE14:1235。
步骤8:将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为转发节点7对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点 的数量的字段取值修改为2。
步骤9:根据转发节点7的地址信息,将报文转发给转发节点7。
转发节点7在接收到转发节点6发送的报文之后,可以采用转发节点6对报文的处理方式,从报文中获取转发节点8的地址信息,并根据转发节点8的地址信息,将报文转发给转发节点8,在此不再加以赘述。
转发节点8在接收到该报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余1个转发节点。即,包括转发节点8一共有1个转发节点,后续不再有转发节点,因此,可以直接读取第五指示域。
步骤2、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定目的节点的地址信息在第一指示域中的位置。即对应目的节点D的第四字段在第一指示域中的位置。
步骤3、根据目的节点D的地址信息在第一指示域中的位置,从第一指示域中读取128比特的数据,该128比特的数据即为目的节点D对应的第四字段。即,目的节点D的地址信息:0xFC00::4567:1234:12FF:FE1A:ABEF。
步骤4、将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为目的节点对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为0。
步骤5、根据目的节点D的地址信息,将报文转发给目的节点D。
目的节点D在接收到该报文之后,根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径无剩余转发节点,进而确定自己即为该报文的最终目的地址。则目的节点D可以按照现有技术的方式,对报文进行解析和处理,不再转发。
示例2、
图9为本申请实施例提供的另一种报文传输场景示意图。如图9所示,本申请实施例的报文传输场景为采用IPv6协议进行报文传输的IoT智能电表场景。该场景包括:源端节点(即网关)、目的节点D,以及,3个转发节点(转发节点A至转发节点C)。其中,目的节点D和转发节点均为IoT节点。图9中两个节点之间的连线为虚线时,说明该两个节点之间不是直连,两个节点之间的连线为实线时,说明该两个节点可以是直连,也可以不是直连。
在本示例中,IoT智能电表场景为封闭的局域网场景,即域内各个IoT节点和网关均有相同前缀FC00:/80。转发节点A至转发节点C为增量式部署的IoT节点,即,转发节点A至转发节点C为不同批次部署在该场景中的设备。例如,转发节点A为第一批部署的设备,转发节点B为第二批部署的设备,转发节点C为第三批部署的设备。
由于转发节点A至转发节点C为不同批次部署至局域网中的设备。因此,随着局域网中设备数量的增加,越是靠后批次部署至局域网中的设备的短地址越长(即地址信息中除与网关的地址信息相同的前缀之外的地址)。
假设转发节点A的短地址为8比特,转发节点B的短地址为12比特,转发节点C的短地址为16比特,则每个节点的地址信息(即十六进制的IPv6地址)如下述表3所示:
表3
Figure PCTCN2019088397-appb-000003
通过表3可以获知,转发节点A的地址信息至转发节点C的地址信息,均与源端节点(网关)的地址信息具有相同的前缀,可以使用地址压缩方式1对转发节点A至转发节点C的地址信息进行压缩,因此,转发节点A的地址信息至转发节点C的地址信息的压缩特点为:与源端节点(网关)的地址信息具有相同的前缀。
在本示例中,当源端节点(网关)获取到报文转发路径上的转发节点的地址信息后,可以将报文转发路径上的转发节点的地址信息作为一个地址信息集合,并基于各个元素的压缩特点,对该地址信息集合划分子集,具体可以如下述表4所示:
表4
Figure PCTCN2019088397-appb-000004
源端节点在对地址信息集合中的元素进行划分后,可以对地址信息集合中的元素逐个进行压缩,具体地:
元素1:元素1与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素1中与源端节点的地址信息相同的前缀“0xFC00::”,得到被压缩后的元素1“0x15”。
元素2:元素2与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素2中与源端节点的地址信息相同的前缀“0xFC00::”,得到被压缩后的元素2“0x10A”。
元素3:元素3与源端节点的地址信息具有相同的前缀,因此,源端节点可以去除元素3中与源端节点的地址信息相同的前缀“0xFC00::”,得到被压缩后的元素3“0x1FF0”。
然后,源端节点可以基于上述每个被压缩的元素,生成报文,并按照图4所示的报文头的格式封装该报文。图10为本申请实施例提供的又一种报文头的示意图。如图10所示,封装后的报文的报文头中与本申请实施例相关的字段可以如下所示:
1、用于指示报文转发路径上剩余节点的数量的字段(例如Segment left字段):由于当前报文转发路径上剩余3个转发节点,因此,该字段的取值可以为3。
2、用于指示第一指示域所指示的元素所使用的地址压缩方式的第二指示域:
由于源端节点支持两种地址压缩方式,因此,报文头的第二指示域的第二字段可以占用两个比特,以通过该两个比特来指示源端节点在此次报文中使用了几种地址压缩方式。对应到本示例中,源端节点对第二子集中的元素使用地址压缩方式2,即,一共使用一种地址压缩方式,因此,上述第二指示域的第二字段例如可以为0b01或0b10,具体可以根据通信系统的设置确定。图10示出的是以第二字段取值为0b10的示意图。
上述第二指示域可以包括两个第一字段,一个第一字段对应地址压缩方式1、一个第 一字段对应地址压缩方式2。每个第一字段中的一个比特位对应一个第一指示域所指示的一个元素。在本示例中一共有3个元素,因此,每个第一字段有3个比特,每个比特对应一个元素,用于指示该元素是否使用该第一字段对应的地址压缩方式。在另一实现方式中,由于在此次发送报文时,并未使用地址压缩方式1,因此,上述第二指示域可以只包括对应地址压缩方式2的第一字段,无对应地址压缩方式1的第一字段。图10示出的是以第二指示域包括两个第一字段为例的示意图,其中,填充有波点的地址压缩方式1的第一字段表示,该第一字段可以在当前报文头中不出现。
以比特为1用于指示该比特对应的元素使用该第一字段对应的地址压缩方式、比特为0用于指示该比特对应的元素未使用该第一字段对应的地址压缩方式为例,则对应压缩方式2的第一字段可以为:0b111。该第一字段的最高位表示转发路径上的第一个转发节点,依次类推。
3、用于指示每个第一子集的前缀信息的第三指示域:
由于在此次发送报文时,并未使用地址压缩方式1,因此,也不存在第一子集的前缀。所以,上述第三指示域可以为空,或者,上述报文头不包括第三指示域。图10示出的是以报文头包括第三指示域的示意图,其中,填充有波点的第三指示域表示,该指示域可以在当前报文头中不出现。
4、用于指示每个被压缩后的元素和每个未被压缩的元素的第一指示域:
以第一指示域包括至少一个第四字段,每个第四字段对应第一指示域所指示的一个元素为例,如前述所说,在第四字段对应的元素属于第二子集时,第四字段包括第一部分、第二部分和第三部分,第四字段的第一部分用于指示与第二元素具有相同前缀的源端节点的地址信息的标识或者与第二元素具有相同前缀的目的节点的地址信息的标识,第四字段的第二部分用于指示元素被压缩后的长度,第四字段的第三部分用于指示被压缩后的元素。
因此,源端节点可以按照各个元素对应的转发节点在转发路径上的顺序在第一指示域中依次写入各个元素。以源端节点的地址信息的标识为0、第四字段的第二部分通过7比特指示元素被压缩后的长度为例,具体地,
第一指示域的第一个第四字段对应元素1,第一个第四字段可以包括第一部分、第二部分和第三部分,元素1与源端节点的地址信息具有相同的前缀,因此,第一个第四字段的第一部分的取值为0b0。被压缩后的元素1的长度为8比特,因此,第一个第四字段的第二部分的取值为“0b0001000”。被压缩后的元素1为“0x15”,因此,第一个第四字段的第三部分的取值为“0b00001111”。综上,第一个第四字段的取值为“0b0,0b0001000,0b00001111”。
第一指示域的第二个第四字段对应元素2,第二个第四字段可以包括第一部分、第二部分和第三部分,元素2与源端节点的地址信息具有相同的前缀,因此,第二个第四字段的第一部分的取值为0b0。被压缩后的元素2的长度为12比特,因此,第二个第四字段的第二部分的取值为“0b0001100”。被压缩后的元素2为“0x10A”,因此,第二个第四字段的第三部分的取值为“0b000100001010”。综上,第二个第四字段的取值为“0b0,0b0001100,0b000100001010”。
第一指示域的第三个第四字段对应元素3,第三个第四字段可以包括第一部分、第二部分和第三部分,元素3与源端节点的地址信息具有相同的前缀,因此,第三个第四字段 的第一部分的取值为0b0。被压缩后的元素3的长度为16比特,因此,第三个第四字段的第二部分的取值为“0b0010000”。被压缩后的元素3为“0x1FF0”,因此,第三个第四字段的第三部分的取值为“0b0001111111110000”。综上,第三个第四字段的取值为“0b0,0b0010000,0b0001111111110000”。
在本示例中,第一指示域还可以用于指示元素4,该元素4为目的节点的地址信息。即,第一指示域的第四个第四字段对应元素4,由于元素4未被压缩,因此,第四个第四字段的取值为元素4,即“0xFC00::1FF0”。
5、用于指示第三指示域在报文中的起始位置的第四指示域,该指示域的取值为第三指示域在报文中的起始位置。
由于上述第三指示域可以为空,或者,上述报文头不包括第三指示域。因此,用于指示第三指示域在报文中的起始位置的第四指示域也可以为空、或者,上述报文头不包括第四指示域。图10示出的是以报文头包括第四指示域的示意图,其中,填充有波点的第四指示域表示,该指示域可以在当前报文头中不出现。
6、用于指示下一元素在第一指示域中的起始位置的第五指示域,该指示域的初始取值为元素2对应的第四字段在第一指示域中的位置。
7、用于指示报文的类型的第六指示域。在本示例中,该指示域的取值例如为100。
可以理解,上述报文头中十六进制数,在实际传输时会传输该十六进制数对应的二进制数。另外,上述出现逗号和/或冒号的字段仅是为了标记该字段的不同部分,实际传输和封装时不会出现逗号和/或冒号,以及标识该数据进制的前缀。
通过上述描述可以看出,源端节点可以针对具有不同压缩特点的元素,使用不同的地址压缩方式进行压缩,从而可以更大化的压缩每个元素的长度,以及,更大化的压缩更多的元素。这样,源端节点在通过报文的第一指示域指示这些被压缩后的元素时,可以使用较少的比特指示这些元素,从而可以增加源端节点可指定的转发节点的数量,进而可以降低网络部署的难度。
上述源端节点在将上述报文封装之后,可以通过转发节点X将报文转发给转发节点A。其中,转发节点X如何获知转发节点A的地址信息,可以参见现有技术。
转发节点A在接收到该报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余3个转发节点。即,包括转发节点A一共有3个转发节点。
步骤2、通过解析第六指示域,确定第一指示域所指示的元素包括被压缩的元素,需要读取第二指示域。
步骤3、根据第二指示域的第二字段,读取地址压缩方式2对应的第一字段,确定源端节点对转发节点B的地址信息所使用的地址压缩方式。在本示例中,地址压缩方式2对应的第一字段中第2个比特位的取值为0b1,即,源端节点对转发节点B的地址信息使用的是地址压缩方式2。
步骤4、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定转发节点B被压缩后的地址信息在第一指示域中的位置。即对应转发节点B的第四字段在第一 指示域中的位置。
步骤5:根据转发节点B被压缩后的地址信息在第一指示域中的位置,从第一指示域中读取转发节点B对应的第四字段。
步骤6:根据转发节点B对应的第四字段的第一部分的取值0b0,确定转发节点B的地址信息与源端节点的地址信息具有相同的前缀.根据转发节点B对应的第四字段的第二部分的取值,确定转发节点B被压缩后的地址信息长度为8比特。然后读取第二部分之后的8比特,得到第四字段的第三部分,即转发节点B被压缩后的地址信息0x15。
步骤7、由于一个转发节点完整的地址信息长度为128比特,因此,可以从报文所携带的源端节点的地址信息中读取120比特的前缀,将该120比特的前缀拼接在转发节点B被压缩后的地址信息的前面,得到转发节点B的地址信息0xFC00::15。
步骤8:将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为转发节点C对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为2。
步骤9:根据转发节点B的地址信息,将报文转发给转发节点B。
转发节点B在接收到转发节点A发送的报文之后,可以采用转发节点A对报文的处理方式,从报文中获取转发节点C的地址信息,并根据转发节点C的地址信息,将报文转发给转发节点C,在此不再加以赘述。
转发节点C接收到转发节点B发送的报文之后,可以执行如下步骤:
步骤1、根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径剩余1个转发节点。即,包括转发节点C一共有1个转发节点,后续不再有转发节点,因此,可以直接读取第五指示域。
步骤2、根据用于指示下一元素在第一指示域中的起始位置的第五指示域,确定目的节点的地址信息在第一指示域中的位置。即对应目的节点D的第四字段在第一指示域中的位置。
步骤3、根据目的节点D的地址信息在第一指示域中的位置,从第一指示域中读取128比特的数据,该128比特的数据即为目的节点D对应的第四字段。即,目的节点D的地址信息:0xFC00::AABEF。
步骤4、将用于指示下一元素在第一指示域中的起始位置的第五指示域的取值修改为目的节点对应的第四字段在第一指示域中的位置,将用于指示报文转发路径上剩余节点的数量的字段取值修改为0。
步骤5、根据目的节点D的地址信息,将报文转发给目的节点D。
目的节点D在接收到该报文之后,根据用于指示报文转发路径上剩余节点的数量的字段,确定当前报文转发路径无剩余转发节点,进而确定自己即为该报文的最终目的地址。则目的节点D可以按照现有技术的方式,对报文进行解析和处理,不再转发。
本申请实施例提供的报文传输方法,在采用IPv6协议进行报文传输报文、并采用IP源路由技术指导报文转发路径上的转发节点转发报文时,可以对具有不同压缩特点的转发节点的地址信息,采用不同的地址压缩方式进行压缩,以最大化的压缩更多转发节点的地址信息,使其被压缩后的地址信息的长度小于128比特,并通过报文的第一指示域指示这些被压缩后的地址信息来实现IP源路由。通过这种方式,在报文长度不变的情况,可以增加 可指示的元素的数量,从而可以提高可指定的转发节点的数量,进而可以降低网络部署的难度。
图11为本申请实施例提供的一种通信装置的结构示意图。该通信装置通过软件、硬件或者两者的结合实现上述压缩节点的部分或者全部功能。该通信装置可以为压缩节点,也可以为应用于压缩节点的芯片。如图11所示,该通信装置可以包括:处理模块11和发送模块12。其中,
处理模块11,用于根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
发送模块11,用于发送所述报文。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素属于所述第二子集;所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子 集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于一个第一子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于所述第二子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
在一种实现方式中,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
例如,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
再例如,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
再例如,所述报文包括与所述第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
在一种实现方式中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。例如,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
在一种实现方式中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
在一种实现方式中,所述报文还包括第四指示域;所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
在一种实现方式中,所述报文还包括第五指示域;所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
在一种实现方式中,所述报文还包括第六指示域;所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
本申请实施例提供的通信装置,可以执行上述方法实施例中压缩节点侧的动作,其实 现原理和技术效果类似,在此不再赘述。
图12为本申请实施例提供的另一种通信装置的结构示意图。该通信装置通过软件、硬件或者两者的结合实现上述接收报文的转发节点的部分或者全部功能。该通信装置可以为该转发节点,也可以为应用于该转发节点的芯片。如图12所示,该通信装置可以包括:接收模块21、处理模块22和发送模块23。其中,
接收模块21,用于接收报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为报文转发路径上不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
处理模块22,用于根据所述第一指示域,确定下一转发节点的地址信息;
发送模块23,用于根据所述下一转发节点的地址信息,向所述下一转发节点发送所述报文。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括:第二子集,所述第二子集包括至少一个元素,所述第二子集所包括的元素与所述第一子集所包括的元素不同,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素属于所述第二子集;所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第三元素,或者,去除所述第三元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第三元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子 集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示被压缩后的第三元素,所述第三元素为一个转发节点的地址信息,所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同;所述地址信息集合还包括所述第三元素、且所述第三元素不属于所述第一子集和所述第二子集,所述第三元素与每个所述第三元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第三元素与第一元素、所述第二元素所使用的地址压缩方式均不同,包括:所述第三元素所使用的地址压缩方式为:去除所述第三元素中与所述第三元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第三元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少一个第一子集和所述第二元素,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于一个第一子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和第二元素,所述第二子集包括至少一个元素,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同,所述第二元素与每个所述第二元素对应的转发节点的媒体访问控制MAC地址有部分地址相同;所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:所述第一元素属于所述第二子集;所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第一元素,或者,去除所述第一元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第一元素;所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素对应的转发节点的MAC地址相同的部分,得到被压缩后的第二元素。
在一种实现方式中,所述第一指示域还用于指示第四元素,所述第四元素为报文转发路上一个未被压缩的转发节点的地址信息。
在一种实现方式中,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
例如,所述第二指示域包括至少一个第一字段,每个所述第一字段对应一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
再例如,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
再例如,所述报文包括与所述第一指示域所指示的每个元素对应的第二指示域,用于指示对对应的元素所使用的地址压缩方式。
在一种实现方式中,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。例如,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
在一种实现方式中,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
在一种实现方式中,所述处理模块22,具体用于根据所述第二指示域,确定所述下一转发节点的地址信息所使用的地址压缩方式,并根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息。例如,所述处理模块23,具体用于在所述下一转发节点的地址信息属于所述第一子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;在所述下一转发节点的地址信息属于所述第二子集时,根据所述下一转发节点的地址信息所使 用的地址压缩方式,将所述源端节点的地址信息或所述目的节点的地址信息与所述下一转发节点的地址信息相同的前缀,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;在所述下一转发节点的地址信息与所述下一转发节点的媒体访问控制MAC地址有部分地址相同时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述下一转发节点的媒体访问控制MAC地址中与所述下一转发节点的地址信息相同的部分,添加到所述下一转发节点被压缩后的地址信息中,还原所述下一转发节点的地址信息。
在一种实现方式中,所述报文还包括第四指示域;所述第四指示域,用于指示所述第三指示域在所述报文中的起始位置。
在一种实现方式中,所述报文还包括第五指示域;所述第五指示域,用于指示下一元素在所述第一指示域中的起始位置,所述下一元素对应的节点为报文转发路径上下一个转发或接收所述报文的节点。
在一种实现方式中,所述报文还包括第六指示域;所述第六指示域,用于指示所述报文的类型,所述报文的类型用于标识所述第一指示域所指示的元素包括被压缩的元素。
本申请实施例提供的通信装置,可以执行上述方法实施例中接收到报文的转发节点侧的动作,其实现原理和技术效果类似,在此不再赘述。
需要说明的是,应理解以上发送模块实际实现时可以为发送器,接收模块实际实现时可以为接收器,而处理模块可以以软件通过处理元件调用的形式实现;也可以以硬件的形式实现。例如,处理模块可以为单独设立的处理元件,也可以集成在上述设备的某一个芯片中实现,此外,也可以以程序代码的形式存储于上述设备的存储器中,由上述节点的某一个处理元件调用并执行以上处理模块的功能。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,简称CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,简称SOC)的形式实现。
图13为本申请实施例提供的又一种通信装置的结构示意图。如图13所示,该通信装置可以包括:处理器31(例如CPU)、存储器32、发送器34;可选的,还可以包括接收器33,接收器33和发送器34均耦合至处理器31,处理器31控制接收器33的接收动作、处理器31控制发送器34的发送动作;存储器32可能包含高速随机存取存储器(random-access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器32中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方法步骤。可选的,本申请涉及的通信装置还可以包括:电源35、通信总线36以及通信端口37。接收器33和发送器34可以集成在通信装置的收发信机中,也可以为通信 装置上独立的收发天线。通信总线36用于实现元件之间的通信连接。上述通信端口37用于实现通信装置与其他外设之间进行连接通信。
在本申请实施例中,上述存储器32用于存储计算机可执行程序代码,程序代码包括指令;当处理器31执行指令时,指令使通信装置的处理器31执行上述方法实施例中压缩节点的处理动作,使接收器33执行上述方法实施例中压缩节点的接收动作,使发送器34执行上述方法实施例中压缩节点的发送动作,其实现原理和技术效果类似,在此不再赘述。
图14为本申请实施例提供的又一种通信装置的结构示意图。如图14所示,该通信装置可以包括:处理器41(例如CPU)、存储器42、接收器43、发送器44;接收器43和发送器44均耦合至处理器41,处理器41控制接收器43的接收动作、处理器41控制发送器44的发送动作;存储器42可能包含高速RAM存储器,也可能还包括非易失性存储器NVM,例如至少一个磁盘存储器,存储器42中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方法步骤。可选的,本申请涉及的通信装置还可以包括:电源45、通信总线46以及通信端口47。接收器43和发送器44可以集成在通信装置的收发信机中,也可以为通信装置上独立的收发天线。通信总线46用于实现元件之间的通信连接。上述通信端口47用于实现通信装置与其他外设之间进行连接通信。
在本申请中,上述存储器42用于存储计算机可执行程序代码,程序代码包括指令;当处理器41执行指令时,指令使通信装置的处理器41执行上述方法实施例中接收报文的转发节点的处理动作,使接收器43执行上述方法实施例中接收报文的转发节点的接收动作,使发送器44执行上述方法实施例中接收报文的转发节点的发送动作,其实现原理和技术效果类似,在此不再赘述。
图15为本申请实施例提供的一种通信系统的结构示意图。如图12所示,上述通信系统可以包括:通信装置51和通信装置52。其中,上述通信装置51可以为前述实施例所说的压缩节点,上述通信装置52可以为前述实施例所说的任一接收报文的转发节点,其实现原理和技术效果类似,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对 象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。

Claims (32)

  1. 一种报文传输方法,其特征在于,所述方法包括:
    根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
    发送所述报文。
  2. 根据权利要求1所述的方法,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
  3. 根据权利要求1所述的方法,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
  5. 根据权利要求4所述的方法,其特征在于,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
    所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
    每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时, 指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
  6. 根据权利要求2-5任一项所述的方法,其特征在于,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
  7. 根据权利要求6所述的方法,其特征在于,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
    所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
  8. 根据权利要求2-7任一项所述的方法,其特征在于,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
    在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
    在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
    在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
  9. 一种报文传输方法,其特征在于,所述方法包括:
    接收报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为报文转发路径上不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
    根据所述第一指示域,确定下一转发节点的地址信息;
    根据所述下一转发节点的地址信息,向所述下一转发节点发送所述报文。
  10. 根据权利要求9所述的方法,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的 第一子集的前缀相同的部分,得到被压缩后的第二元素。
  11. 根据权利要求9所述的方法,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式。
  13. 根据权利要求12所述的方法,其特征在于,所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
    所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
    每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
  14. 根据权利要求10-13任一项所述的方法,其特征在于,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息。
  15. 根据权利要求14所述的方法,其特征在于,所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
    所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
  16. 根据权利要求10-15任一项所述的方法,其特征在于,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
    在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
    在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识, 所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
    在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
  17. 根据权利要求16所述的方法,其特征在于,所述根据所述第一指示域,确定下一转发节点的地址信息,包括:
    根据所述第二指示域,确定所述下一转发节点的地址信息所使用的地址压缩方式;
    根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息。
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述下一转发节点的地址信息所使用的地址压缩方式,以及,所述第一指示域所指示的下一转发节点被压缩的地址信息,还原所述下一转发节点的地址信息,包括:
    在所述下一转发节点的地址信息属于所述第一子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
    在所述下一转发节点的地址信息属于所述第二子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述源端节点的地址信息或所述目的节点的地址信息与所述下一转发节点的地址信息相同的前缀,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
    在所述下一转发节点的地址信息与所述下一转发节点的媒体访问控制MAC地址有部分地址相同时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述下一转发节点的媒体访问控制MAC地址中与所述下一转发节点的地址信息相同的部分,添加到所述下一转发节点被压缩后的地址信息中,还原所述下一转发节点的地址信息。
  19. 一种通信装置,其特征在于,所述装置包括:
    处理模块,用于根据报文转发路径上的转发节点的地址信息,生成报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
    发送模块,用于发送所述报文。
  20. 根据权利要求19所述的装置,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的 第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
  21. 根据权利要求19所述的装置,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
  22. 根据权利要求19-21任一项所述的装置,其特征在于,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式;
    所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
    所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
    每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
  23. 根据权利要求20-22任一项所述的装置,其特征在于,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息;
    所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
    所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
  24. 根据权利要求20-23任一项所述的装置,其特征在于,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
    在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
    在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识, 所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
    在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
  25. 一种通信装置,其特征在于,所述装置包括:
    接收模块,用于接收报文;所述报文包括第一指示域,所述第一指示域用于指示被压缩后的第一元素和被压缩后的第二元素,所述第一元素和所述第二元素为报文转发路径上不同转发节点的地址信息,所述第一元素与所述第二元素所使用的地址压缩方式不同;
    处理模块,用于根据所述第一指示域,确定下一转发节点的地址信息;
    发送模块,用于根据所述下一转发节点的地址信息,向所述下一转发节点发送所述报文。
  26. 根据权利要求25所述的装置,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括至少两个第一子集,每个所述第一子集包括至少两个元素,所述第一子集的元素之间相同的前缀为所述第一子集的前缀;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素与所述第二元素属于不同的第一子集,所述第一元素所属的第一子集的前缀与所述第二元素所属的第一子集的前缀不同;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述第二元素所属的第一子集的前缀相同的部分,得到被压缩后的第二元素。
  27. 根据权利要求25所述的装置,其特征在于,所述报文转发路径上的转发节点的地址信息为一个地址信息集合,每个转发节点的地址信息为一个元素,所述地址信息集合包括第二子集和至少一个第一子集,所述第二子集包括至少一个元素,每个所述第一子集包括至少两个元素,所述第二子集所包括的元素与所述至少一个第一子集所包括的元素不同,所述第一子集的元素之间相同的前缀为每个所述第一子集的前缀,所述第二子集的每个元素与源端节点的地址信息或目的节点的地址信息具有相同的前缀、且前缀长度相同;
    所述第一元素与所述第二元素所使用的地址压缩方式不同,包括:
    所述第一元素属于一个第一子集,所述第二元素属于所述第二子集;
    所述第一元素所使用的地址压缩方式为:去除所述第一元素中与所述第一元素所属的第一子集的前缀相同的部分,得到被压缩后的第一元素;
    所述第二元素所使用的地址压缩方式为:去除所述第二元素中与所述源端节点的地址信息相同的前缀,得到被压缩后的第二元素,或者,去除所述第二元素中与所述目的节点的地址信息相同的前缀,得到被压缩后的第二元素。
  28. 根据权利要求25-27任一项所述的装置,其特征在于,所述报文还包括:第二指示域,所述第二指示域用于指示所述第一指示域所指示的元素所使用的地址压缩方式;
    所述第二指示域包括第二字段和N个第一字段,所述N为大于或等于1的整数;
    所述第二字段,用于指示所述第一指示域所指示的元素总计使用N种地址压缩方式;
    每个所述第一字段对应N种地址压缩方式中的一种地址压缩方式,每个所述第一字段中的一个比特位对应一个所述第一指示域所指示的一个元素,当所述比特位为第一值时,指示对所述比特位对应的元素使用所述第一字段对应的地址压缩方式,当所述比特位为第二值时,指示对所述比特位对应的元素未使用所述第一字段对应的地址压缩方式。
  29. 根据权利要求26-28任一项所述的装置,其特征在于,所述报文还包括:第三指示域,所述第三指示域用于指示每个所述第一子集的前缀信息;
    所述第三指示域包括至少一个第三字段,每个所述第三字段对应一个所述第一子集的前缀;每个所述第三字段包括第一部分和第二部分;
    所述第三字段的第一部分用于指示对应的所述第一子集的前缀的长度,所述第三字段的第二部分,用于指示对应的所述第一子集的前缀。
  30. 根据权利要求26-29任一项所述的装置,其特征在于,所述第一指示域包括至少一个第四字段;每个所述第四字段对应所述第一指示域所指示的一个元素;
    在所述第四字段对应的元素属于所述第一子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示所述元素所属的第一子集的前缀对应的第三字段,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示被压缩后的所述元素;
    在所述第四字段对应的元素属于所述第二子集时,所述第四字段包括第一部分、第二部分和第三部分,所述第四字段的第一部分用于指示与所述第二元素具有相同前缀的源端节点的地址信息的标识或者与所述第二元素具有相同前缀的目的节点的地址信息的标识,所述第四字段的第二部分用于指示所述元素被压缩后的长度,所述第四字段的第三部分用于指示所述被压缩后的所述元素;
    在所述第四字段对应的元素与所述元素对应的转发节点的媒体访问控制MAC地址有部分地址相同时,所述第四字段包括第一部分和第二部分,所述第四字段的第一部分用于指示所述元素被压缩后的长度,所述第四字段的第二部分用于指示被压缩后的所述元素。
  31. 根据权利要求30所述的装置,其特征在于,
    所述处理模块,具体用于根据所述第二指示域,确定所述下一转发节点的地址信息所使用的地址压缩方式;
    在所述下一转发节点的地址信息属于所述第一子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述第三指示域所指示的下一转发节点的地址信息所属的第一子集的前缀信息,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
    在所述下一转发节点的地址信息属于所述第二子集时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述源端节点的地址信息或所述目的节点的地址信息与所述下一转发节点的地址信息相同的前缀,添加到所述下一转发节点被压缩后的地址信息的前面,还原所述下一转发节点的地址信息;
    在所述下一转发节点的地址信息与所述下一转发节点的媒体访问控制MAC地址有部分地址相同时,根据所述下一转发节点的地址信息所使用的地址压缩方式,将所述下一转发节点的媒体访问控制MAC地址中与所述下一转发节点的地址信息相同的部分,添加到所 述下一转发节点被压缩后的地址信息中,还原所述下一转发节点的地址信息。
  32. 一种通信系统,其特征在于,所述通信系统包括:如权利要求19-24任一项所述的通信装置,以及,如权利要求25-31任一项所述的通信装置。
PCT/CN2019/088397 2018-05-25 2019-05-24 报文传输方法、通信装置和系统 WO2019223795A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19806754.8A EP3813318B1 (en) 2018-05-25 2019-05-24 Packet transmission method, communication device, and system
US17/103,297 US11444874B2 (en) 2018-05-25 2020-11-24 Packet transmission method, and communications apparatus and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810516567.2A CN110535812B (zh) 2018-05-25 2018-05-25 报文传输方法、通信装置和系统
CN201810516567.2 2018-05-25

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/103,297 Continuation US11444874B2 (en) 2018-05-25 2020-11-24 Packet transmission method, and communications apparatus and system

Publications (1)

Publication Number Publication Date
WO2019223795A1 true WO2019223795A1 (zh) 2019-11-28

Family

ID=68616592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088397 WO2019223795A1 (zh) 2018-05-25 2019-05-24 报文传输方法、通信装置和系统

Country Status (4)

Country Link
US (1) US11444874B2 (zh)
EP (1) EP3813318B1 (zh)
CN (3) CN110535812B (zh)
WO (1) WO2019223795A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020011143A1 (en) * 2018-07-13 2020-01-16 Huawei Technologies Co., Ltd. Mpls extension headers for in-network services
CN113395206B (zh) * 2020-03-13 2023-06-02 华为技术有限公司 路由确定方法、装置和网络设备
CN112583829A (zh) * 2020-12-14 2021-03-30 上海英方软件股份有限公司 一种自适配多级端到端传输行情信息流的方法和装置
CN113242180B (zh) * 2021-07-12 2021-12-14 广东省新一代通信与网络创新研究院 报文转发方法、装置、设备、可读存储介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909518A (zh) * 2006-08-29 2007-02-07 华为技术有限公司 一种路由方法和路由设备
WO2009036792A1 (en) * 2007-09-21 2009-03-26 Greenpeak Technologies Compressed source routing
KR20100105086A (ko) * 2009-03-20 2010-09-29 삼성전자주식회사 인터넷 프로토콜 패킷의 헤더의 압축 방법 및 이를 위한 복수 주소 기반의 네트워크를 구성하는 노드
US20130028095A1 (en) * 2011-07-28 2013-01-31 Cisco Technology, Inc. Dynamic allocation of context identifiers for header compression

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417744B1 (ko) * 2008-01-17 2014-07-09 경희대학교 산학협력단 인터넷 프로토콜 버전6 기반 저전력 무선네트워크에서이동성 헤더 압축 방법 및 장치
CN101645823B (zh) * 2009-09-02 2012-01-04 杭州华三通信技术有限公司 一种6to4隧道的压缩方法及装置
CN102118356A (zh) * 2009-12-30 2011-07-06 华为技术有限公司 一种报文发送方法和发送装置
CN101854361B (zh) * 2010-05-21 2012-09-26 南京邮电大学 一种基于物联网的下一代互联网协议报头压缩方法
CN103152770B (zh) * 2011-12-07 2015-11-04 中国移动通信集团广东有限公司 Ip报头压缩的方法及装置
US20140105098A1 (en) * 2012-10-16 2014-04-17 Stmicroelectronics, Inc. Frame specification for a wireless network communication
CN104168151B (zh) * 2013-05-17 2018-06-12 中国移动通信集团公司 一种基于IPv6的通信方法、监测设备、网关及系统
US20150003458A1 (en) * 2013-06-27 2015-01-01 Futurewei Technologies, Inc. Boarder Gateway Protocol Signaling to Support a Very Large Number of Virtual Private Networks
US11051140B2 (en) * 2014-09-19 2021-06-29 Texas Instruments Incorporated Compression of internet protocol version 6 addresses in wireless sensor networks
CN105743790B (zh) * 2014-12-08 2019-12-03 中兴通讯股份有限公司 一种sdn网络中流量转发的管理方法及装置
CN104506439B (zh) * 2014-12-19 2018-04-27 重庆邮电大学 一种适用于WIA-PA网络的IPv6报文传输系统及方法
CN106656781B (zh) * 2015-11-02 2020-12-11 中兴通讯股份有限公司 一种报文传输的方法、装置和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909518A (zh) * 2006-08-29 2007-02-07 华为技术有限公司 一种路由方法和路由设备
WO2009036792A1 (en) * 2007-09-21 2009-03-26 Greenpeak Technologies Compressed source routing
KR20100105086A (ko) * 2009-03-20 2010-09-29 삼성전자주식회사 인터넷 프로토콜 패킷의 헤더의 압축 방법 및 이를 위한 복수 주소 기반의 네트워크를 구성하는 노드
US20130028095A1 (en) * 2011-07-28 2013-01-31 Cisco Technology, Inc. Dynamic allocation of context identifiers for header compression

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUI J. W. ET AL.: "An IPv6 Routing Header for Source Routes with the Routing Protocol for Low- Power and Lossy Networks (RPL)", INTERNET ENGINEERING TASK FORCE (IETF) , RFC6554, 26 March 2012 (2012-03-26), pages 1 - 14, XP015081477 *

Also Published As

Publication number Publication date
CN110535812B (zh) 2021-01-29
EP3813318A1 (en) 2021-04-28
CN112804146A (zh) 2021-05-14
CN110535812A (zh) 2019-12-03
CN112804146B (zh) 2022-05-10
US20210083977A1 (en) 2021-03-18
EP3813318B1 (en) 2023-08-30
CN112804147A (zh) 2021-05-14
EP3813318A4 (en) 2021-06-30
US11444874B2 (en) 2022-09-13

Similar Documents

Publication Publication Date Title
WO2022078509A1 (zh) IPv6报文的扩展头封装方法及装置
WO2019223795A1 (zh) 报文传输方法、通信装置和系统
WO2020063707A1 (zh) 用于以太网数据的通信方法和装置
JP2016522627A (ja) パケット処理方法および装置
CN110855568B (zh) 报文转发方法及系统
EP4270898A1 (en) Message processing method, device, and computer storage medium
WO2022022229A1 (zh) 一种处理报文的方法及装置
EP4057576A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
WO2017041534A1 (zh) 一种电力线网络通信的方法及装置、计算机存储介质
EP2936765B1 (en) Method and apparatus for handling messages
WO2022028216A1 (zh) 网络层可达信息传输方法、系统、装置以及网络设备
CN111277580B (zh) 节点数据发送方法、接收方法以及传输方法
US20230078814A1 (en) Data transmission method and related device
CN115314563A (zh) 一种消息生成方法、处理方法及装置
WO2018045521A1 (zh) 无线网络中传输信令的方法和装置
CN111865884B (zh) 一种报文处理方法、装置及设备
CN113497767A (zh) 传输数据的方法、装置、计算设备及存储介质
CN107925516A (zh) 数据传输方法和装置
CN114556894A (zh) 用于分组转发控制协议消息捆绑的方法、装置和计算机程序产品
WO2022033496A1 (zh) 一种报文发送方法、报文处理方法及设备
WO2023216622A1 (zh) 报文处理方法、设备、系统及计算机可读存储介质
WO2023160516A1 (zh) 一种报文处理方法及相关设备
WO2023231428A1 (zh) IPv4报文的封装方法、电子设备和计算机存储介质
WO2023078144A1 (zh) 报文处理方法、装置及系统
WO2023174188A1 (zh) 一种报文处理的方法、路由通告的方法及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19806754

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019806754

Country of ref document: EP

Effective date: 20201204