Message sending and receiving method and device
Patent Information
- Application Number
- CN202280097437.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-02-07
AI Technical Summary
In wireless network communications, topology changes occur due to the movement of end nodes during the transmission of network layer data packets. The existing technology requires the entire network to sense the movement of all intermediate nodes, thereby increasing the burden of sensing topology changes in the network.
By carrying the network address of the intermediate node accessed by the destination node in the message header and routing header, and including the segment offset field in the routing header to update the destination address field, only the intermediate nodes directly connected to the destination node can sense its movement. , Reduce the number of intermediate nodes perceived by the entire network.
Effectively supports route addressing in the scenario of mobile mid-end nodes in the network, reduces the number of intermediate nodes that need to be sensed by topology changes in the network, and improves the efficiency and stability of data transmission.
Smart Images

Figure CN119404482A_ABST
Abstract
Description
Method and device for sending and receiving messages Technical Field
[0001] The present application relates to the field of communications, and in particular to a method and device for sending and receiving messages. Background Art
[0002] In network communications, a data message at the network layer starts from a source node and passes through at least one intermediate node to reach a destination node. The ordered set of nodes passed through at least one intermediate node is called a forwarding path of the data message.
[0003] The location of the source node or destination node may move, especially in wireless network communications, where movement is more frequent. When an end node in the network moves, the entire network needs to be aware of the topology changes brought about by the end node movement before messages can be sent.
[0004] Summary of the Invention
[0005] The present application discloses a method and device for sending and receiving messages, which can better support the forwarding of messages in the scenario of end node mobility in network communication, and is conducive to reducing the number of intermediate nodes in the network that need to perceive topology changes.
[0006] In a first aspect, the present application provides a message sending method, which is applied to a first node, and the method includes: receiving a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating the network address of a first intermediate node, the second destination address field of the routing header indicating the network address of the destination node, and the first intermediate node being an intermediate node that establishes a communication connection with the destination node; when the network address of the first node is not the network address of the first intermediate node, sending the first message; or when the network address of the first node is the network address of the first intermediate node, updating the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field, so as to generate a second message and send the second message.
[0007] The first node can be a network device with routing and forwarding capabilities, such as a wireless network device, a router, a three-layer switch (or a multi-layer switch), etc., or a component used in the above network device that can implement the above method, such as an integrated circuit, a line card, a chip, etc.
[0008] Here, the second message is the first message after the network address indicated by the first destination address field in the message header is changed.
[0009] In the above method, the first destination address field of the message header indicates the network address of the first intermediate node to which the destination node accesses, that is, the network location or access location of the destination node can be determined through the first destination address field of the message header, and the network address of the destination node where the message finally arrives is carried in the next extended header routing header of the message header. In this way, routing addressing in the scenario of end node movement in the network can be better supported. Only the intermediate nodes directly connected to the end node perceive the topology changes brought about by the movement of the end node. It is no longer the case that the entire network perceives the topology changes brought about by the movement of the end node in traditional routing, so the number of intermediate nodes in the network that need to perceive topology changes is reduced.
[0010] Optionally, the network address of the first intermediate node is obtained by the source node from the address resolution node, the source node is the starting sending node of the first message, and the address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, and the first mapping relationship indicates that the destination node is connected to the first intermediate node.
[0011] By implementing the above implementation method, the source node can promptly obtain the network address of the first intermediate node to which the destination node accesses from the address resolution node. In this way, even when the destination node moves, the source node can quickly determine the network location or access location of the destination node (i.e., the network address of the first intermediate node to which the destination node accesses) based on the information fed back by the address resolution node, which can well support the forwarding of messages in the end node mobile scenario.
[0012] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0013] By implementing the above implementation, the type of the routing header can be extended through the routing type field to support different routing header types.
[0014] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0015] By implementing the above implementation, a type of routing header including a source location identification field is expanded, and the access location or network location of the source node can be quickly determined through the source location identification field.
[0016] Optionally, when the source node is an end node in a network, the source location identification field indicates the network address of a second intermediate node, and the second intermediate node is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field indicates the network address of the source node.
[0017] By implementing the above implementation, the destination node can quickly reversely address the source node through the source location identification field, making it convenient for the destination node to quickly reply to the source node.
[0018] Optionally, the routing header also includes a third destination address field and a segment offset field, the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; updating the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field includes: changing the first value to a second value, determining that the second value corresponds to the second destination address field; updating the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field.
[0019] By implementing the above implementation method, the first intermediate node can obtain the network address of the destination node from the routing header by changing the value of the segment offset field, and update the network address of the destination node to the first destination address field in the message header, so that the message can be sent to the destination node.
[0020] Optionally, sending the first message includes: sending the first message according to a first forwarding table entry, wherein the first forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
[0021] Exemplarily, TCID and LCID may be pre-defined within the Starflash communication system, and are used for encapsulation and transmission of messages at the bottom layer (eg, the wireless basic service layer in the Starflash network).
[0022] By implementing the above implementation, the first message can be forwarded based on the first forwarding table entry.
[0023] Optionally, sending the second message includes: sending the second message according to a second forwarding table entry, wherein the second forwarding table entry records the correspondence between the network address of the destination node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
[0024] By implementing the above implementation, the second message can be forwarded based on the second forwarding table entry.
[0025] Optionally, the first forwarding table entry or the second forwarding table entry is obtained from a forwarding table, and the forwarding table is obtained based on a neighbor forwarding table of the first node and a routing table of the first node.
[0026] Here, the first forwarding table entry is a forwarding table entry corresponding to the network address of the first intermediate node found by the first node from the forwarding table based on the network address of the first intermediate node indicated by the first destination address field in the message header of the first message. The second forwarding table entry is a forwarding table entry corresponding to the network address of the destination node found by the first node from the forwarding table based on the network address of the destination node indicated by the first destination address field in the message header of the second message.
[0027] By implementing the above implementation method, the forwarding table entries in this application are obtained through the node's local neighbor forwarding table and routing table, which can guide the forwarding of messages in the network.
[0028] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0029] It can be seen that the network address of each node in this application is a network layer short address that can be used for addressing in the corresponding communication system. For example, in the Star Flash communication system, the type of the network address of the node can be a Star Flash network address. It can be understood that the Star Flash network address is another address type that is different from the IP address. Compared with the 32-bit IPv4 address and the 128-bit IPv6 address, the length of the network address carried in the message header and the routing header is much smaller, which greatly reduces the overhead of the message header and the routing header, and is conducive to increasing the proportion of data carried by the message.
[0030] In second aspect, the present application provides a message sending method, which is applied to a source node, and the method includes: obtaining a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating the network address of the first intermediate node, the second destination address field of the routing header indicating the network address of the destination node, and the first intermediate node being an intermediate node that establishes a communication connection with the destination node; and sending the first message.
[0031] The source node can be an electronic device with communication capabilities, such as a handheld terminal, a vehicle, a vehicle-mounted device, or a network-side device, a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a wireless communication device, a user agent or a user device, etc. It can also be a component contained in an independent device (such as a chip or an integrated circuit), or any possible smart terminal device (such as a mobile phone), smart transportation equipment (such as a vehicle, a drone, etc.), smart manufacturing equipment, smart home equipment (such as a large screen, a speaker, etc.), etc. It can also be a component used for the above-mentioned electronic device that can implement the above-mentioned method, and the component can be, for example, an integrated circuit, a line card, a chip, etc.
[0032] Exemplarily, obtaining the first message may include generating the first message.
[0033] In the above method, the source node carries the network address of the first intermediate node to which the destination node accesses in the message header of the generated first message, and the routing header carries the network address of the destination node to which the first message ultimately arrives. This can better support routing addressing in scenarios where end nodes in the network move. When the destination node moves, only the intermediate nodes directly connected to the destination node perceive the topology changes brought about by the destination node's movement. In traditional routing, it is no longer the case that the entire network perceives the topology changes brought about by the end node's movement. Therefore, the message header carrying the network address of the first intermediate node to which the destination node accesses can effectively reduce the number of intermediate nodes in the network that need to perceive topology changes.
[0034] Optionally, before obtaining the first message, the method also includes: sending an address request message to the address resolution node, the address request message carrying the network address of the destination node; receiving an address feedback message sent by the address resolution node, the address feedback message including a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, the first mapping relationship indicating that the destination node is connected to the first intermediate node; obtaining the network address of the first intermediate node from the first mapping relationship, the network address of the first intermediate node being used to generate the first message.
[0035] By implementing the above implementation method, the source node can promptly obtain the network address of the first intermediate node to which the destination node accesses from the address resolution node. Since the intermediate nodes in the network generally do not move, only the intermediate nodes directly connected to the end nodes can perceive the changes in the end nodes and update the connection relationship to the address resolution node. Even when the destination node moves, the source node can quickly determine the network location or access location of the destination node (that is, the network address of the first intermediate node to which the destination node accesses) based on the information fed back by the address resolution node, which can well support the forwarding of messages in the end node movement scenario.
[0036] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0037] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0038] Optionally, when the source node is an end node in a network, the source location identification field is used to indicate the network address of a second intermediate node, which is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
[0039] The specific technical effects of the above fields can be referred to the description of the corresponding fields in the first aspect, which will not be repeated here.
[0040] Optionally, the source node sends the first message, including: the source node determines the next hop of the source node based on the forwarding table entry, the forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the output interface of the source node, the layer 2 identifier of the next hop of the source node, the transmission channel identifier TCID of the source node and the logical channel identifier LCID of the source node; and sends the first message to the next hop of the source node.
[0041] Exemplarily, TCID and LCID may be pre-defined within the Starflash communication system, and are used for encapsulation and transmission of messages at the bottom layer (eg, the wireless basic service layer in the Starflash network).
[0042] By implementing the above implementation, the first message can be forwarded through the forwarding table entry defined in this application.
[0043] Optionally, the forwarding table entry is obtained from a forwarding table based on the network address of the first intermediate node, and the forwarding table is obtained based on a neighbor forwarding table of the source node and a routing table of the source node.
[0044] By implementing the above implementation, the forwarding table entries defined in this application can guide the forwarding of messages in the network.
[0045] Optionally, the routing header also includes a third destination address field and a segment offset field. When the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; the routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
[0046] By implementing the above implementation method, the first intermediate node can obtain the network address of the destination node from the routing header by changing the value of the segment offset field, and update the network address of the destination node to the first destination address field in the message header, so that the message can be sent to the destination node.
[0047] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0048] The technical effects of this feature can be referred to the description of the technical effects of the corresponding features of the first aspect above, and will not be repeated here.
[0049] In a third aspect, the present application provides a method for receiving a message, the method comprising: a destination node receives a first message, the first message comprising a message header and a routing header, the first destination address field of the message header indicating the network address of the destination node, the second destination address field of the routing header indicating the network address of the destination node, wherein the network address indicated by the first destination address field is obtained based on updating the network address of the first intermediate node to the network address of the destination node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; parsing the first message.
[0050] The destination node can be an electronic device with communication capabilities, such as a handheld terminal, a vehicle, a vehicle-mounted device, or a network-side device, a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a wireless communication device, a user agent or a user device, etc. It can also be a component contained in an independent device (such as a chip or an integrated circuit), or any possible smart terminal device (such as a mobile phone), smart transportation equipment (such as a vehicle, a drone, etc.), smart manufacturing equipment, smart home equipment (such as a large screen, a speaker, etc.), etc. It can also be a component used for the above electronic equipment that can implement the above method, and the component can be, for example, an integrated circuit, a line card, a chip, etc.
[0051] In the above method, the first message is sent from the source node to the destination node through the message header and routing header in the message. In addition, the method of updating the destination address in the message header with the network address of the destination node carried in the routing header of the message to achieve forwarding can better support routing addressing in scenarios where end nodes in the network are mobile, which helps reduce the number of intermediate nodes in the network that need to perceive topology changes.
[0052] Optionally, the network address of the first intermediate node is obtained by the source node from the address resolution node, the source node is the starting sending node of the first message, and the address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, and the first mapping relationship indicates that the destination node is connected to the first intermediate node.
[0053] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0054] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0055] Optionally, when the source node is an end node in a network, the source location identification field is used to indicate the network address of a second intermediate node, which is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
[0056] The specific technical effects of the above fields can be referred to the description of the technical effects of the corresponding fields in the first aspect, which will not be repeated here.
[0057] Optionally, when the routing header of the first message includes a source location identification field, the method further includes: obtaining the network address of the second intermediate node to which the source node is connected from the source location identification field; sending a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0058] By implementing the above implementation, the destination node can directly obtain the second intermediate network address accessed by the source node from the source location identification field in the routing header of the first message, which facilitates reverse addressing of the destination node.
[0059] Optionally, when the routing header of the first message does not include a source location identification field, the method further includes:
[0060] Obtain the network address of the second intermediate node to which the source node is connected from the address resolution node; send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0061] By implementing the above implementation, the destination node can obtain the second intermediate network address accessed by the source node from the address resolution node, which facilitates reverse addressing of the destination node.
[0062] Optionally, the routing header also includes a third destination address field and a segment offset field. When the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; the routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
[0063] The technical effects of this feature can be referred to the description of the technical effects of the corresponding features of the first aspect above, and will not be repeated here.
[0064] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0065] The technical effects of this feature can be referred to the description of the technical effects of the corresponding features of the first aspect above, and will not be repeated here.
[0066] In a fourth aspect, the present application provides a communication device, which is a first node or the device is included in the first node, and the device includes: a receiving unit for receiving a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating the network address of the first intermediate node, the second destination address field of the routing header indicating the network address of the destination node, and the first intermediate node being an intermediate node that establishes a communication connection with the destination node; a sending unit for sending the first message when the network address of the first node is not the network address of the first intermediate node; or, a processing unit for updating the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field when the network address of the first node is the network address of the first intermediate node, so as to generate a second message and send the second message through the sending unit.
[0067] Optionally, the network address of the first intermediate node is obtained by the source node from the address resolution node, the source node is the starting sending node of the first message, and the address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, and the first mapping relationship indicates that the destination node is connected to the first intermediate node.
[0068] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0069] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0070] Optionally, when the source node is an end node in a network, the source location identification field is used to indicate the network address of a second intermediate node, which is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
[0071] Optionally, the routing header also includes a third destination address field and a segment offset field, the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; the processing unit is specifically used to: change the value of the segment offset field from the first value to a second value, and determine that the second value corresponds to the second destination address field; based on the second destination address field, update the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node.
[0072] Optionally, the sending unit is specifically used to: send the first message according to a first forwarding table entry, wherein the first forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
[0073] Optionally, the sending unit is specifically used to: send the second message according to a second forwarding table entry, wherein the second forwarding table entry records the correspondence between the network address of the destination node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
[0074] Optionally, the first forwarding table entry or the second forwarding table entry is obtained from a forwarding table, and the forwarding table is obtained based on a neighbor forwarding table of the first node and a routing table of the first node.
[0075] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0076] In a fifth aspect, the present application provides a communication device, which is a source node or the device is included in the source node, and the device includes: an acquisition unit, used to acquire a first message, the first message including a message header and a routing header, the first destination address field of the message header indicates the network address of the first intermediate node, the second destination address field of the routing header indicates the network address of the destination node, and the first intermediate node is an intermediate node that establishes a communication connection with the destination node; a sending unit, used to send the first message.
[0077] Optionally, the sending unit is also used to: send an address request message to the address resolution node, the address request message carries the network address of the destination node; the device also includes a receiving unit, used to receive an address feedback message sent by the address resolution node, the address feedback message includes a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, the first mapping relationship indicating that the destination node is connected to the first intermediate node; the acquisition unit is also used to obtain the network address of the first intermediate node from the first mapping relationship, and the network address of the first intermediate node is used to generate the first message.
[0078] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0079] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0080] Optionally, when the source node is an end node in a network, the source location identification field is used to indicate the network address of a second intermediate node, which is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
[0081] Optionally, the sending unit is specifically used to: determine the next hop of the source node based on a forwarding table entry, the forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the outgoing interface of the source node, the layer 2 identifier of the next hop of the source node, the transmission channel identifier TCID of the source node, and the logical channel identifier LCID of the source node; and send the first message to the next hop of the source node.
[0082] Optionally, the forwarding table entry is obtained from a forwarding table based on the network address of the first intermediate node, and the forwarding table is obtained based on a neighbor forwarding table of the source node and a routing table of the source node.
[0083] Optionally, the routing header also includes a third destination address field and a segment offset field. When the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; the routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
[0084] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0085] In a sixth aspect, the present application provides a communication device, which is a destination node or the device is included in the destination node, and the device includes: a receiving unit, used to receive a first message, the first message including a message header and a routing header, the first destination address field of the message header indicates the network address of the destination node, and the second destination address field of the routing header indicates the network address of the destination node, wherein the network address indicated by the first destination address field is obtained based on the network address of the first intermediate node being updated to the network address of the destination node, and the first intermediate node is an intermediate node that establishes a communication connection with the destination node; a processing unit, used to parse the first message.
[0086] Optionally, the network address of the first intermediate node is obtained by the source node from the address resolution node, the source node is the starting sending node of the first message, and the address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, and the first mapping relationship indicates that the destination node is connected to the first intermediate node.
[0087] Optionally, the routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
[0088] Optionally, the type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
[0089] Optionally, when the source node is an end node in a network, the source location identification field is used to indicate the network address of a second intermediate node, which is an intermediate node that establishes a communication connection with the source node; or, when the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
[0090] Optionally, the device also includes a sending unit, wherein the processing unit is used to obtain the network address of the second intermediate node to which the source node is connected from the source location identification field when the routing header of the first message includes a source location identification field; the sending unit is used to send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0091] Optionally, the processing unit is used to obtain the network address of the second intermediate node to which the source node is connected from the address resolution node when the routing header of the first message does not include a source location identification field; the sending unit is also used to send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0092] Optionally, the routing header also includes a third destination address field and a segment offset field. When the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; the routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
[0093] Optionally, at least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
[0094] In the seventh aspect, the present application provides a communication device, which includes a processor and a memory, wherein the memory is used to store program instructions; the processor calls the program instructions in the memory, so that the device executes the method in the first aspect or any possible implementation of the first aspect, or causes the device to execute the method in the second aspect or any possible implementation of the second aspect, or causes the device to execute the method in the third aspect or any possible implementation of the third aspect.
[0095] In an eighth aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed by a processor, implement the method of the first aspect or any possible implementation of the first aspect, or implement the method of the second aspect or any possible implementation of the second aspect, or implement the method of the third aspect or any possible implementation of the third aspect.
[0096] In the ninth aspect, the present application provides a computer program product, which, when executed by a processor, can implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, or implement the method in the above-mentioned second aspect or any possible implementation of the second aspect, or implement the method in the above-mentioned third aspect or any possible implementation of the third aspect.
[0097] Exemplarily, the computer program product may be a software installation package.
[0098] In the tenth aspect, the present application provides a vehicle, which includes a device as described in the fourth aspect or any possible implementation of the fourth aspect, or includes a device as described in the fifth aspect or any possible implementation of the fifth aspect, or includes a device as described in the seventh aspect or any possible implementation of the seventh aspect.
[0099] In the eleventh aspect, the present application provides a terminal, which includes a device as described in the fourth aspect or any possible implementation of the fourth aspect, or includes a device as described in the fifth aspect or any possible implementation of the fifth aspect, or includes a device as described in the seventh aspect or any possible implementation of the seventh aspect.
[0100] Examples of the terminal include, but are not limited to: smart home devices (such as televisions, sweeping robots, smart desk lamps, audio systems, smart lighting systems, electrical control systems, home background music, home theater systems, intercom systems, video surveillance, etc.), smart transportation equipment (such as cars, ships, drones, trains, vans, trucks, etc.), smart manufacturing equipment (such as robots, industrial equipment, smart logistics, smart factories, etc.), smart terminals (mobile phones, computers, tablets, PDAs, desktops, headphones, audio, wearable devices, vehicle-mounted equipment, virtual reality equipment, augmented reality equipment, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0101] FIG1 is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application;
[0102] FIG2A is a schematic diagram of a format of a routing header provided in an embodiment of the present application;
[0103] FIG2B is a schematic diagram of another format of a routing header provided in an embodiment of the present application;
[0104] FIG3 is a schematic diagram of a topology of a network provided in an embodiment of the present application;
[0105] FIG4 is a flow chart of a message sending method provided in an embodiment of the present application;
[0106] FIG5A is a schematic diagram of the formats of a message header and a routing header in a first message provided in an embodiment of the present application;
[0107] FIG5B is a schematic diagram of the formats of a message header and a routing header in a first message provided in an embodiment of the present application;
[0108] FIG5C is a schematic diagram of the format of a message header and a routing header in a first message provided in an embodiment of the present application;
[0109] FIG5D is a schematic diagram of the format of a message header and a routing header in a first message provided in an embodiment of the present application;
[0110] FIG6 is a schematic diagram of the format of a second message provided in an embodiment of the present application;
[0111] FIG7A is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0112] FIG7B is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0113] FIG7C is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0114] FIG8 is a schematic structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0115] It should be noted that the prefixes such as "first" and "second" used in this application are only for distinguishing different description objects, and do not have any limiting effect on the position, order, priority, quantity or content of the described objects. For example, if the described object is a "field", then the ordinal number before the "field" in the "first field" and the "second field" does not limit the position or order between the "fields", and "first" and "second" do not limit whether the "fields" they modify are in the same message, nor do they limit the order of the "first field" and the "second field". For another example, if the described object is a "level", then the ordinal number before the "level" in the "first level" and the "second level" does not limit the priority between the "levels". For another example, the number of described objects is not limited by the prefix and can be one or more. Taking "first device" as an example, the number of "devices" can be one or more. In addition, the objects modified by different prefixes can be the same or different. For example, if the described object is a "device," then the "first device" and the "second device" can be the same device, the same type of device, or different types of devices. For another example, if the described object is "information," then the "first information" and the "second information" can be information of the same content or information of different contents. In short, the use of prefixes to distinguish the described objects in the embodiments of this application does not constitute a limitation on the described objects. For the description of the described objects, please refer to the description in the context of the claims or embodiments, and the use of such prefixes should not constitute an unnecessary limitation.
[0116] It should be noted that the descriptions used in the embodiments of the present application, such as "at least one of a1, a2, ..., and an" and the like, include any one of a1, a2, ..., and an existing alone, and any combination of any multiple of a1, a2, ..., and an, each of which can exist alone. For example, the description "at least one of a, b, and c" includes a alone, b alone, c alone, a combination of a and b, a combination of a and c, a combination of b and c, or a combination of ab and c.
[0117] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0118] Referring to FIG. 1 , FIG. 1 is a schematic diagram of the architecture of a communication system provided in an embodiment of the application. The communication system is used to forward data packets in a network. The communication system includes at least one end node and at least one intermediate node, wherein the at least one intermediate node constitutes a backbone network, and each of the at least one end node accesses the network through one of the at least one intermediate nodes.
[0119] For example, an end node may also be referred to as a wireless end system (WES), and an intermediate node may be referred to as a wireless intermediate system (WIS). In some possible embodiments, an intermediate node to which an end node is connected may also be referred to as an access point of the end node, or a WIS to which the end node is directly connected.
[0120] In Figure 1 , at least one end node includes, for example, node A, node K, and node E. At least one intermediate node includes, for example, node B, node C, node D, and node H, where node A accesses the network through node B, node K accesses the network through node D, and node E accesses the network through node H.
[0121] Through forwarding operations between multiple intermediate nodes, data exchange can be achieved between end nodes and the backbone network, or between end nodes and end nodes. For example, in Figure 1, each intermediate node can be used for message forwarding. Taking end node A sending a data message to end node K as an example, the data message from node A can be forwarded to node K via node B → node C → node D. The ordered node set consisting of nodes B, C, and D represents a forwarding path from node A to node K. In this case, end node A can be called the source node for the data message, and end node K can be called the destination node for the data message.
[0122] Among them, the intermediate node is a network device with routing and forwarding capabilities, such as a wireless network device, a router, a three-layer switch (or a multi-layer switch), etc. The intermediate node can also be a component in a router or a component in a three-layer switch, and the component can be, for example, a single board, a line card, a chip, etc.
[0123] An end node is an electronic device with communication capabilities. An end node can be, for example, a standalone device such as a handheld terminal, a vehicle, an onboard device, or a network-side device, user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, a wireless communication device, a user agent, or a user device. It can also be a component (such as a chip or integrated circuit) contained within a standalone device. An end node can also be any possible intelligent terminal device (such as a mobile phone), intelligent transportation equipment (such as a vehicle or drone), intelligent manufacturing equipment, or smart home devices (such as large screens and speakers).
[0124] For example, when the end node is an in-vehicle device, it can be a cockpit domain device or a module in the cockpit domain device, such as one or more modules such as a cockpit domain controller (CDC), a camera, a screen, a microphone, an audio system, an electronic key, a keyless entry or start system controller, etc. In a vehicle, the end node can also be a battery management system (BMS), a battery control unit (BCU) in the BMS, a battery monitoring unit (BMU) in the BMS, or a battery in a battery pack.
[0125] For example, when the end node is a handheld terminal, it can be a mobile phone, a wearable device, a tablet computer (pad), or a computer with data transceiver functions (such as a laptop computer, a PDA, etc.).
[0126] The communication system shown in FIG1 can be applied to a variety of application scenarios, such as the following application scenarios: mobile internet (MI), industrial control (industrial control), self-driving, transportation safety (transportation safety), Internet of Things (IoT), smart city (smart city), or smart home.
[0127] The communication system shown in Figure 1 can be applied to various network types, for example, one or more of the following network types: SparkLink, long term evolution (LTE) network, 5th generation mobile communication technology (5G), wireless local area network (for example, Wi-Fi), Bluetooth (BT), Zigbee, or vehicle-mounted short-range wireless communication network, etc.
[0128] Here, the network address of the end node and the network address of the intermediate node are both a type of network layer short address, which can be 2 bytes (i.e., 16 bits) in length and can be used for addressing in the corresponding communication system. For example, in the Star Flash communication system, the address type of the network address of the end node and the address type of the network address of the intermediate node can be a Star Flash network address. It can be understood that the Star Flash network address is another address type different from the IP address.
[0129] It is understood that the aforementioned end nodes and intermediate nodes are all nodes, which is a name for electronic devices with communication capabilities. In some application scenarios or certain network types, devices with similar communication capabilities may not be called nodes, for example, but may be called network devices. This is not specifically limited here.
[0130] It should be noted that Figure 1 is merely an exemplary architecture diagram and does not limit the number of network elements included in the system shown in Figure 1. Although not shown in Figure 1, Figure 1 may also include other functional entities in addition to the functional entities shown in Figure 1. Furthermore, the methods provided in the embodiments of the present application can be applied to the communication system shown in Figure 1. Of course, the methods provided in the embodiments of the present application can also be applied to other communication systems, and the embodiments of the present application are not limited in this regard.
[0131] Based on the architectural diagram shown in FIG1 , an embodiment of the present application provides a message sending method, which can better support the forwarding of messages on the data plane in a network mid-node mobility scenario through a message header and a predefined routing header.
[0132] Here, end node movement in a network refers to a change in the intermediate node to which the end node connects. For example, in Figure 1, consider node K, an end node in the network. The intermediate node currently connected to node D (assuming it is at position 1) is node D. If node K moves from position 1 to position 2, and the intermediate node it connects to at position 2 is node H, then node K has moved. Similarly, if node K moves from position 1 to position 2, and the intermediate node it connects to at position 2 is still node D, then node K has not moved.
[0133] The following describes the routing header defined in the embodiment of the present application:
[0134] In an embodiment of the present application, in scenarios where the end node is mobile, the message header and routing header are used in combination, with the routing header serving as the next header after the message header. For example, when a source node sends a message to a destination node, the destination address field in the message header indicates the network address of the first intermediate node to which the destination node accesses. In this case, the routing header carries the network address of the destination node, and the routing header can be used to guide the first intermediate node to forward the message to the destination node. In other words, during the message forwarding process, the network address carried by the destination address field in the message header can be updated based on the network address carried in the routing header.
[0135] In this embodiment of the present application, the routing header includes a routing type field, which is used to indicate the type of routing header. The value of the routing type field is related to whether the routing header includes a source location identifier field, wherein the source location identifier field is used by the destination node corresponding to the message to reversely address the source node corresponding to the message.
[0136] The present application embodiment provides two schematic diagrams of routing header formats, which can be specifically referred to in Figures 2A and 2B below:
[0137] In FIG2A , when the routing type field takes a first preset value (e.g., “0”), the routing type field indicates that the type of the routing header is the first type. In this case, the routing header shown in FIG2A includes multiple items of the following fields:
[0138] Next Header: This field is used to indicate the type of the next message extension header after the routing header. It is understood that if there is no message extension header after the routing header, the next header field can be omitted.
[0139] Header extension length (header ext len): This field is used to indicate the extended length of the routing header;
[0140] Routing type: This field is used to indicate the type of routing header. In Figure 2A, the value of this field is 0.
[0141] Multiple addresses: including n address fields as shown in FIG2A , namely, address[1], ..., address[n], where n is a positive integer greater than 1; here, the addresses stored in these n address fields include at least the network address of the destination node;
[0142] Segment Offset (Segment Left): The value of this field can change. When the value of the Segment Offset field changes, the target address field corresponding to the value of the current Segment Offset field in the above n address fields is determined based on the Segment Offset field, and the network address stored in the target address field is updated in the destination address field in the packet header.
[0143] Padding data (padding len): This field is used to indicate the number of bytes filled in the routing header.
[0144] In some possible embodiments, among the fields shown in FIG. 2A , the three fields of next header, header extension length, and padding data may all be optional fields.
[0145] In some possible embodiments, the Segment Offset field may be optional. For example, when the routing header carries only one address field, the Segment Offset field may be omitted, or the value of the Segment Offset field may correspond to the only address field currently in the routing header. For another example, when the routing header carries multiple address fields, the corresponding target address field may be determined from the multiple address fields by changing the value of the Segment Offset field.
[0146] In Figure 2B, when the routing type field takes the second preset value (for example, "1"), the routing type field indicates that the type of the routing header is the second type. In this case, the routing header shown in Figure 2B includes an additional source location identifier (source location ID) field compared to the routing header shown in Figure 2A.
[0147] Specifically, when the source node is an end node in the network, the source location identifier field indicates the network address of the second intermediate node to which the source node is connected; when the source node is an intermediate node in the network, the source location identifier field indicates the network address of the source node. The remaining fields in the routing header shown in FIG2B are specifically described with reference to the corresponding fields in the routing header shown in FIG2A , and for the sake of brevity, they are not repeated here.
[0148] It can be seen that the network location or access location of the source node can be determined through the source location identification field. In this way, even if the source node moves, the destination node can also quickly determine the network location or access location of the source node based on the source location identification field in the message sent by the source node.
[0149] Here, the network address indicated by each address field carried in the routing header shown in FIG. 2A or FIG. 2B is a network layer short address that is different from the IP address, and its length is generally 16 bits, that is, 2 bytes, and can be used for addressing in the corresponding communication system. For example, in the Star Flash communication system, the type of the network address of the node can be a Star Flash network address. In addition, the network address used in the embodiment of the present application is much smaller than the 32-bit IPv4 address and the 128-bit IPv6 address in the packet header and the routing header, which greatly reduces the overhead of the packet header and the routing header, and is conducive to increasing the proportion of data carried by the packet.
[0150] Referring to Figure 3, Figure 3 shows the network address and outbound interface identifier of each node in the network, compared to the architectural diagram shown in Figure 1. For example, the network address of node A is 100.1 and the outbound interface identifier of node A is if1, and the network address of node B is 2.2 and the outbound interface identifier of node B is if1. The network addresses and outbound interface identifiers of the remaining other nodes in Figure 3 can be identified from Figure 3 and are not listed one by one here. It can be seen that the network address of each node shown in Figure 3 is one. In some possible embodiments, multiple network addresses may also be configured on the same node, which is not specifically limited here.
[0151] As can be understood, node will realize the forwarding that message needs to rely on the forwarding table that node is locally generated. Embodiments of the present application define a kind of forwarding table, this forwarding table includes the forwarding table item corresponding to at least one destination address, wherein, the forwarding table item corresponding to the destination address has recorded the corresponding relation between the destination address (destination address), the identifier (out interface ID) of the outgoing interface of this node, the layer two identifiers (nexthop layer 2identifier, nexthop L2ID) of the next hop of this node, the transmission channel identifier (transport channel Identifier, TCID) of this node and the logical channel identifier (logical channel Identifier, LCID) of this node. As can be understood, node searches for corresponding forwarding table item from forwarding table based on destination address. Exemplarily, TCID and LCID are predefined in Star Flash communication system, and it is used for the encapsulation and transmission of message at bottom (for example, wireless basic service layer in Star Flash network).
[0152] The forwarding table that node A generates among Fig. 3 is taken as example and further illustrates the forwarding table item that destination address corresponds to in forwarding table.The forwarding table that node A generates among Fig. 3 can be expressed as the corresponding relation table shown in Table 1.As shown in Table 1, Table 1 stores three forwarding table items, namely the forwarding table item that destination address 0.0 corresponds to, the forwarding table item that destination address 2.2 corresponds to and the forwarding table item that destination address 100.1 corresponds to.
[0153] For example, in Table 1, the forwarding entry 2.2-if1-2222.2222.2222-20-2 corresponding to destination address 2.2 is represented by if1, which represents node A's outbound interface. 2222.2222.2222 represents the Layer 2 identifier of node A's next hop if the packet is to be forwarded to destination address 2.2. Figure 3 shows that 2222.2222.2222 is node B's Layer 2 identifier, 20 represents node A's transmission channel identifier, and 2 represents node A's logical channel identifier. When node A finds the forwarding entry corresponding to destination address 2.2 based on the network address indicated by the destination address field in the packet header, it performs bottom-level encapsulation on the packet based on the TCID and LCID in the forwarding entry and sends the packet to node B, whose Layer 2 identifier is 2222.2222.2222, via its local outbound interface if1, TCID, and LCID.
[0154] The forwarding table item corresponding to the destination address 0.0 in Table 1 can be the forwarding table item corresponding to the default route that node A generates locally by default as an end node. Specifically, after node A among Fig. 3 accesses the network by node B, node A generates the forwarding table item corresponding to the default route by default locally based on the wireless adjacency protocol (WAP). When node A sends a message, if the network address indicated based on the destination address field in the message header of the message does not find the forwarding table item corresponding to the same network address in the forwarding table, node A will send the message through the forwarding table item corresponding to the destination address 0.0.
[0155] It should be noted that the forwarding table generated by node A shown in Table 1 is only an example, and the embodiment of the present application does not limit the number of forwarding table entries in the forwarding table generated by node A shown in Figure 3.
[0156] Table 1
[0157]
[0158] It can be understood that the above Table 1 is only used as an example to reflect the correspondence between the destination address, the node's outbound interface identifier, the node's next hop layer 2 identifier, the node's transmission channel identifier, and the node's logical channel identifier. In actual applications, the text content and storage method of the correspondence can also be in other forms, which are not specifically limited here.
[0159] In an embodiment of the present application, the nodes in the network can generate the forwarding table in the embodiment of this application based on the local neighbor forwarding table and routing table, wherein the neighbor forwarding table and the routing table are associated through the identifier of the destination address and the outgoing interface, the layer 2 identifier, TCID and LCID of the next hop in the forwarding table can be obtained from the neighbor forwarding table, and the identifier of the destination address and the outgoing interface can be obtained from the routing table.
[0160] Taking node A generating a forwarding table as an example, after node A accesses the network, node A generates a neighbor forwarding table based on the WAP protocol, and generates a routing table through a routing protocol (for example, the wireless ad hoc network on-demand distance vector routing AODV protocol).
[0161] Exemplarily, the neighbor forwarding table includes at least one correspondence, wherein the correspondence in the neighbor forwarding table is specifically the correspondence between the network address of the neighbor node (i.e., the next hop of node A), the identifier of the local outgoing interface, the layer 2 identifier of the neighbor node, the local TCID, LCID and the link quality level.
[0162] Exemplarily, the routing table includes at least one corresponding relationship, wherein the corresponding relationship in the routing table is specifically a corresponding relationship between a destination address, an identifier of an outgoing interface, a network address of a next hop, a routing protocol type, and a routing protocol priority.
[0163] It can be understood that the network address of the neighbor node in the neighbor forwarding table is the network address of the next hop in the routing table, and the identifier of the local outgoing interface in the neighbor forwarding table is the identifier of the outgoing interface in the routing table, which means that the neighbor forwarding table and the routing table can be associated through the destination address and the identifier of the outgoing interface in the forwarding table.
[0164] Further, the generation process of the forwarding table item is illustrated with the forwarding table item corresponding to the destination address 2.2 in the above-mentioned table 1 as an example: node A searches the routing table item corresponding to the destination address 2.2 in the local routing table, obtains the mark if1 of the outgoing interface corresponding to the destination address 2.2 and the network address 2.2 of the next hop from the routing table item corresponding to the destination address 2.2, i.e., node A has obtained the destination address (i.e., 2.2) and the out interface ID (i.e., if1) in the forwarding table item corresponding to the destination address 2.2 in the above-mentioned table 1; Node A searches the neighbor forwarding table item corresponding to the combination of if1 and 2.2 from the neighbor forwarding table based on the mark if1 of the outgoing interface (equivalent to the mark of the local interface in the neighbor forwarding table) and the network address 2.2 of the next hop (equivalent to the network address of the neighbor node in the neighbor forwarding table), obtains the layer 2 mark 2222.2222.2222, the transmission channel mark 20 and the logical channel mark 2 of the neighbor node from the neighbor forwarding item, i.e., node A has obtained the nexthop in the forwarding table item corresponding to the destination address 2.2 in the above-mentioned table 1 The L2ID (i.e., 2222.2222.2222), TCID (i.e., 20), and LCID (i.e., 2) generate the forwarding entry corresponding to the destination address in Table 1 above: 2.2-if1-2222.2222.2222-20-2.
[0165] It should be noted that the generation process of the forwarding table on other nodes shown in FIG3 can refer to the generation process of the forwarding table of the node A, and for the sake of brevity of the description, it will not be repeated here.
[0166] The following describes a method for sending a message based on the routing header and forwarding table entries defined above.
[0167] See Figure 4, which is a flowchart of a message sending method provided in an embodiment of the present application.
[0168] This method can be applied to a communication system consisting of a source node, at least one intermediate node, and a destination node, wherein the source node is the starting sending node corresponding to the message, the destination node is the final receiving node corresponding to the message, and the source node can communicate with the destination node through at least one intermediate node. Exemplarily, the at least one intermediate node includes a first intermediate node and a second intermediate node, wherein the first intermediate node is an intermediate node that establishes a communication connection with the destination node (it can also be referred to as the destination node accessing the network through the first intermediate node), and the second intermediate node is an intermediate node that establishes a communication connection with the source node (it can also be referred to as the source node accessing the network through the second intermediate node). Exemplarily, the message sent by the second intermediate node can reach the first intermediate node through at least one hop. In some possible embodiments, the second intermediate node and the first intermediate node can also be the same intermediate node, or the second intermediate node can be directly connected to the first intermediate node, or there can be at least one intermediate node between the second intermediate node and the first intermediate node, which is not specifically limited here.
[0169] For example, the nodes in the communication system can adopt a proactive routing protocol, or they can select corresponding routing protocols according to the characteristics of their own nodes, such as the wireless ad hoc network on-demand distance vector routing protocol AODV, the optimized link state routing protocol OLSR, etc., which are not specifically limited here.
[0170] The method includes but is not limited to the following steps:
[0171] S401: A source node obtains a first message, which includes a message header and a routing header. The first destination address field in the message header indicates the network address of the first intermediate node, and the second destination address field in the routing header indicates the network address of the destination node.
[0172] The destination node is an end node connected to the first intermediate node.
[0173] In the embodiment of the present application, the source node obtains the first message, specifically: the source node generates the first message.
[0174] The network address of the first intermediate node may be obtained by the source node from an address resolution node, and the address resolution node at least stores a mapping relationship between the network address of an end node in the network and the network address of an intermediate node connected to the end node.
[0175] Specifically, before generating the first message, the source node sends an address request message to the address resolution node, and the address request message carries the network address of the destination node. After receiving the address request message, the address resolution node sends an address query message to the source node in response to the address request message. The address query message includes a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, wherein the first mapping relationship indicates that the destination node is connected to the first intermediate node. In this way, the source node obtains the network address of the first intermediate node from the address query information.
[0176] In the embodiment of the present application, the routing header is used to guide the first intermediate node to forward the message to the destination node.
[0177] In some possible embodiments, the routing header further includes a routing type field, wherein the routing type field is used to indicate the type of the routing header. The value of the routing type field is related to whether the routing header includes a source location identifier field, wherein the source location identifier field is used by the destination node to reversely address the source node.
[0178] Exemplarily, when the source node sets the routing type field in the routing header to a first preset value (for example, "0"), the routing header of the first message does not include a source location identification field; when the source node sets the routing type field in the routing header to a second preset value (for example, "1"), the routing header of the first message includes a source location identification field.
[0179] Here, when the source node is an end node in the network, the source location identification field indicates the network address of the second intermediate node; when the source node is an intermediate node in the network, the source location identification field indicates the network address of the source node.
[0180] In some possible embodiments, the routing header further includes a third destination address field, wherein the third destination address field indicates the network address of the first intermediate node. Furthermore, the routing header further includes a segment offset field, wherein the segment offset field takes a first value, and the first value corresponds to the third destination address field. In this case, the routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
[0181] Taking Figure 3 above as an example, assuming the source node is node A and the destination node is node K, the first intermediate node is node D, and the second intermediate node is node B. Node A obtains the network address of node D as 6.6 from the address resolution node (e.g., node H). In this case, the first message generated by node A can be in the following formats, for example:
[0182] First format:
[0183] See the schematic diagram of the formats of the message header and routing header in the first message shown in FIG5A.
[0184] First, the various fields in the message header shown in FIG5A are described:
[0185] Version number: indicates the version number of the network communication protocol;
[0186] Type of service (ToS): indicates the type of service and is related to the quality of service (QoS).
[0187] Payload length field: indicates the length of the payload of the message;
[0188] Next Header: Indicates the type of the next message extension header in the message header; in Figure 5A, this field indicates the routing header;
[0189] Hop limit: indicates the maximum number of hops for a message;
[0190] Source address field (source address): indicates the source address of the message; in Figure 5A, this field indicates the network address 100.1 of node A;
[0191] Destination address: indicates a destination address of the message; in FIG5A , this field indicates the network address 6.6 of the node D to which the node K accesses.
[0192] It should be noted that the message header shown in Figure 5A is only an example. In some possible embodiments, the number of fields in the message header may be more than the number of fields in the message header shown in Figure 5A, or less than the number of fields in the message header shown in Figure 5A, and no specific limitation is given here.
[0193] In the routing header shown in FIG5A , the routing header includes five fields, namely, the next header, the header extension length, the routing type, the address [1], and the source location identifier. Among them, the value of the routing type field is "1", the source location identifier field indicates the network address 2.2 (i.e., the network address of node B), and the address [1] indicates the network address 10.1 (the network address of node K). It can be seen that the number of addresses in the routing header is 1. For the description of the next header and the header extension length fields, please refer to the description of the corresponding content in FIG2A .
[0194] Second format:
[0195] See the format diagram of the message header and routing header in the first message shown in Figure 5B. In Figure 5B, the first message includes a message header and a routing header. The description of the message header can be specifically referred to the description of the message header in Figure 5A above. Here, the routing header shown in Figure 5B is specifically described.
[0196] The routing header shown in FIG5B differs from the routing header shown in FIG5A in that the routing header in FIG5B carries two address fields and a segment offset field, namely, address [1] and address [2]. Address [1] indicates the network address 10.1 (the network address of node K), and address [2] indicates the network address 6.6 (i.e., the network address of node D). The segment offset field currently has a value of 2, and the segment offset field currently corresponds to address [2]. In this case, the value of the subsequent segment offset field can change in a decreasing manner. The description of the three fields of Next Header, Header Extension Length, and Padding Length in the routing header shown in FIG5B can refer to the description of the corresponding content in FIG2A and will not be repeated here.
[0197] The third format:
[0198] See the format diagram of the message header and routing header in the first message shown in Figure 5C. In Figure 5C, the first message includes a message header and a routing header. The description of the message header can be specifically referred to the description of the message header in Figure 5A above. Here, the routing header shown in Figure 5C is specifically described.
[0199] The routing header shown in FIG5C differs from the routing header shown in FIG5B in that the value of the segment offset field in FIG5C and the corresponding relationship between the segment offset field and the address field are different. The routing header shown in FIG5C also includes two address fields, namely address [1] and address [2]. Address [2] indicates the network address 10.1 (the network address of node K), and address [1] indicates the network address 6.6 (i.e., the network address of node D). The segment offset field currently has a value of 1, and the segment offset field currently corresponds to address [1]. In this case, the value of the subsequent segment offset field can change in an incremental manner. The description of the three fields of Next Header, Header Extension Length, and Padding Length in the routing header shown in FIG5C can refer to the description of the corresponding content in FIG2A, and will not be repeated here.
[0200] The fourth format:
[0201] See the format diagram of the message header and routing header in the first message shown in Figure 5D. In Figure 5D, the first message includes a message header and a routing header. The description of the message header can be specifically referred to the description of the message header in Figure 5A above. Here, the routing header shown in Figure 5D is specifically described.
[0202] The routing header shown in FIG5D differs from the routing header shown in FIG5A in the following ways: the routing type field has a value of "0", the routing header shown in FIG5D does not include a source location identifier field, and the number of address fields carried in the routing header is 2, i.e., address [2] is added, and address [2] indicates network address 6.6 (i.e., the network address of node D). The description of the Next Header and Header Extension Length fields in the routing header shown in FIG5D can be referred to the description of the corresponding contents in FIG2A and will not be repeated here.
[0203] It should be noted that any of Figures 5A, 5B, 5C, or 5D above are examples of the message header and routing header in the first message, and do not limit the message header and routing header in the first message. In some possible embodiments, the number of fields in the first message may be less than the number of fields shown in Figure 5A. For example, one or more of the padding length field, the next header field, and the header extension length field in the routing header may be omitted. One or more of the flow label field, the payload length field, and the hop limit field in the message header may be omitted. No specific limitations are given herein. In some possible embodiments, the number of fields in the first message may be greater than the number of fields shown in Figure 5A. For example, a padding data field may be added to the routing header shown in Figure 5A.
[0204] S402: The source node sends a first message to the second intermediate node.
[0205] In an embodiment of the present application, after the source node obtains the network address of the first intermediate node from the address resolution node, it searches the local forwarding table for the forwarding entry corresponding to the first intermediate node's network address based on the first intermediate node's network address. Based on the forwarding entry corresponding to the first intermediate node's network address, the source node determines that the next hop is the second intermediate node, and therefore sends the first message to the second intermediate node. The specific process of generating the forwarding table can be found in the aforementioned description of the forwarding table, and for the sake of brevity, it will not be repeated here.
[0206] For example, in combination with Figure 3 and the above Table 1, assuming that node A obtains the network address 6.6 of the intermediate node connected to node K, that is, node D, node A searches the forwarding table corresponding to the destination address 0.0 in the forwarding table shown in Table 1 based on the network address 6.6 of node D, and guides the sending of the first message through the forwarding table corresponding to the destination address 0.0, that is, according to the layer 2 identifier of the next hop in the forwarding table corresponding to the destination address 0.0, it determines that the next hop of node A (that is, the second intermediate node) is node B, so node A sends the first message to node B.
[0207] In some possible embodiments, when the source node is an end node in the network, the source node may move, and the movement of the source node causes the second intermediate node to which the source node is connected to change. For example, in Figure 3, assuming that node A moves but node K does not move, node A changes from accessing node B to accessing node H. Then, node H can locally perceive the access of node A, node B can locally perceive the disconnection of node A, node A itself can perceive that it has accessed node H, and the corresponding forwarding table entry for node A's local destination address 0. will be updated accordingly. Node A can determine from the updated forwarding table entry that the second intermediate node is node H based on the network address 6.6 of node D.
[0208] In some possible embodiments, when the destination node is an end node in the network, the destination node may also move. The movement of the destination node causes the first intermediate node to which the destination node is connected to change. For example, in Figure 3, assuming that node K moves, node K changes from access node D to access node C. Accordingly, the mapping relationship between the network address of node K and the network address of node C will be updated to node H. Node H will send the mapping relationship between the network address of node K and the network address of node C to node A, so that node A determines that the first intermediate node to which node K is currently connected is node C. It can be understood that after node K moves and accesses node C, node C can locally perceive the access of node K, and node D can locally perceive the disconnection of node K.
[0209] In this way, based on the above-mentioned message header and routing header, routing addressing can be implemented in the scenario of end node mobility in the network. It can be seen that when the end node moves, only the intermediate nodes directly connected to the end node calculate the end node's route, but the topology changes caused by it do not affect the network backbone network, that is, the backbone node devices are not aware of the moving end node.
[0210] S403: Send the first message from the second intermediate node to the first intermediate node through at least one hop.
[0211] In the implementation of the present application, the second intermediate node receives the first message from the source node. When the second intermediate node determines that its own network address is not the network address indicated by the first destination address field in the message header of the first message, that is, when it determines that its own network address is not the network address of the first intermediate node, the second intermediate node forwards the first message.
[0212] Here, during the forwarding of the first message from the second intermediate node to the first intermediate node, the source address field and the destination address field in the message header of the first message remain unchanged. The forwarding of the first message at the intermediate node is guided by the intermediate node's local forwarding table. For details on the generation process of the intermediate node's local forwarding table, refer to the description of the forwarding table in the above embodiment.
[0213] In the embodiment of the present application, the second intermediate node may be directly connected to the first intermediate node, or the second intermediate node may be connected to the first intermediate node through at least one intermediate node, which is not specifically limited here.
[0214] For example, in Figure 3, node B receives the first message sent by node A and determines that the network address indicated by the destination address field in the message header of the first message is the network address of node D. Node B obtains the forwarding entry corresponding to node D's network address from the local forwarding table based on the network address of node D, and determines that the next hop of node B is node C based on the forwarding entry corresponding to the network address of node D. Therefore, node B forwards the first message to node C. Correspondingly, node C obtains the forwarding entry corresponding to node D's network address from the local forwarding table based on the network address of node D indicated by the destination address field in the message header of the first message, and determines that the next hop of node C is node D based on the forwarding entry corresponding to the network address of node D. Therefore, node C forwards the first message to node D.
[0215] S404: When the first intermediate node determines that the network address indicated by the first destination address field in the message header of the first message is its own network address, it updates the first destination address field in the message header of the first message based on the network address of the destination node carried in the routing header of the first message to generate a second message.
[0216] The second message is the first message after the first destination address field is updated.
[0217] Here, based on the different formats of the routing header in the first message, the network address indicated by the destination address field in the message header can be updated in the following ways:
[0218] The first one:
[0219] Specifically, the second destination address field in the routing header indicates the network address of the destination node. When the first intermediate node determines that the first destination address field in the message header of the first message indicates the network address of the first intermediate node, the first intermediate node obtains the network address of the destination node from the second destination address field in the routing header, and updates the network address indicated by the first destination address field in the message header of the first message from the network address of the first intermediate node to the network address of the destination node, thereby generating a second message.
[0220] For example, in combination with Figure 3 and Figure 5A, the first message received by node D in Figure 3 is shown in Figure 5A. The address field carried in the routing header of the first message shown in Figure 5A only contains address [1], where address [1] indicates the network address 10.1 of the destination node K. When node D determines that the network address 6.6 indicated by the destination address field in the message header of the first message shown in Figure 5A is its own network address, node D changes the network address indicated by the destination address field in the message header in Figure 5A from 6.6 to 10.1 based on the address [1] in the routing header.
[0221] The second type:
[0222] Specifically, the routing header also includes a third destination address field and a segment offset field, wherein the third destination address field indicates the network address of the first intermediate node, the segment offset field takes a first value, and the first value corresponds to the third destination address field. When the first intermediate node determines that the first destination address field in the message header of the first message indicates the network address of the first intermediate node, the first intermediate node processes the routing header, that is, changes the value of the segment offset field from the first value to the second value, determines that the second value corresponds to the second destination address field, and then updates the network address indicated by the first destination address field in the message header of the first message from the network address of the first intermediate node to the network address of the destination node based on the second destination address field, thereby generating a second message.
[0223] In one implementation, the first intermediate node may decrement the value of the segment offset field in the routing header.
[0224] For example, in conjunction with FIG3 and FIG5B, the first message received by node D in FIG3 is shown in FIG5B. The routing header of the first message shown in FIG5B includes address [1], address [2], and segment offset field, wherein address [1] indicates the network address 10.1 of destination node K, address [2] indicates the network address 6.6 of the first intermediate node D, and the segment offset field has a value of 2, that is, the segment offset field currently corresponds to address [2]. When node D determines that the network address 6.6 indicated by the destination address field in the message header of the first message shown in FIG5B is its own network address, node D subtracts 1 from the value of the segment offset field in the routing header so that the segment offset field corresponds to address [1], and obtains a value of 1 for the segment offset field. Then, based on address [1] in the routing header, the network address indicated by the destination address field in the message header in FIG5B is changed from 6.6 to 10.1, thereby obtaining a second message, which is shown in FIG6. Compared with the message header and routing header in the first message shown in Figure 5B, it can be seen that after processing by node D, the value of the segment offset field in the routing header in Figure 6 is changed from "2" in Figure 5B to "1", and the network address indicated by the destination address field in the message header shown in Figure 6 is changed from "6.6" in Figure 5B to "10.1". The other remaining fields in Figure 6 can be specifically referred to the description of the corresponding fields in Figure 5B, and will not be repeated here.
[0225] In one implementation, the first intermediate node may increment the value of the segment offset field in the routing header.
[0226] For example, in conjunction with Figure 3 and Figure 5C, the first message received by node D in Figure 3 is shown in Figure 5C. The routing header of the first message shown in Figure 5C includes address [1], address [2], and a segment offset field, wherein address [1] indicates the network address 6.6 of the first intermediate node D, address [2] indicates the network address 10.1 of the destination node K, and the segment offset field has a value of 1, that is, the segment offset field currently corresponds to address [1]. When node D determines that the network address 6.6 indicated by the destination address field in the message header of the first message shown in Figure 5C is its own network address, node D adds 1 to the value of the segment offset field in the routing header so that the segment offset field corresponds to address [2], obtaining a value of 2 for the segment offset field. Then, based on address [2] in the routing header, the network address indicated by the destination address field in the message header in Figure 5C is changed from 6.6 to 10.1.
[0227] The third type:
[0228] Specifically, the routing header also includes a third destination address field, but does not include a segment offset field, that is, the routing header carries two address fields, namely a second destination address field indicating the network address of the destination node and a third destination address field indicating the network address of the first intermediate node. In this case, when the first intermediate node determines that the first destination address field in the message header of the first message indicates the network address of the first intermediate node, the first intermediate node updates the network address indicated by the first destination address field in the message header of the first message to the network address of the destination node indicated by the second destination address field based on the address field (that is, the second destination address field) in the routing header that does not indicate its own network address.
[0229] For example, in combination with Figure 3 and Figure 5D, the first message received by node D in Figure 3 is shown in Figure 5D. The routing header of the first message shown in Figure 5D includes address [1] and address [2], wherein address [1] indicates the network address 10.1 of the destination node K, and address [2] indicates the network address 6.6 of the first intermediate node D. When node D determines that the network address 6.6 indicated by the destination address field in the message header of the first message shown in Figure 5D is its own network address, node D further determines that the network address 10.1 indicated by address [1] in the routing header is different from its own network address. Therefore, node D changes the network address indicated by the destination address field in the message header of the first message from 6.6 to 10.1 based on address [1] in the routing header.
[0230] S405: The first intermediate node sends a second message to the destination node.
[0231] Specifically, the first intermediate node searches the local routing table for the routing entry corresponding to the network address of the destination node based on the network address of the destination node indicated by the destination address field in the message header of the second message, determines that the next hop is the destination node based on the routing entry corresponding to the network address of the destination node, and therefore sends the second message to the destination node.
[0232] S406: The destination node receives the second message.
[0233] Specifically, the destination node determines that the second message is its own message based on the network address indicated by the destination address field in the message header of the second message. The destination node may parse the second message, or send the second message to an upper layer application of the destination node for processing.
[0234] In some possible embodiments, after receiving the second message, the destination node may also reply to the source node. Before the destination node replies to the source node, the destination node needs to first obtain the network address of the second intermediate node to which the source node is connected.
[0235] In one implementation, when the routing header of the second message includes a source location identification field, the destination node can obtain the network address of the second intermediate node from the source location identification field; and send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0236] In another implementation, when the routing header of the second message does not include a source location identification field, the destination node can obtain the network address of the second intermediate node from the address resolution node; and send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
[0237] Taking Figure 3 as an example, assume that the source node is node A, the destination node is node K, the first intermediate node is node D, the second intermediate node is node B, and the address resolution node is node H. After node K receives the second message sent by node D, node K sends a third message, wherein the source address field in the message header of the third message indicates the network address of node K, the destination address field in the message header indicates the network address of node B, and the next header field in the message header indicates the routing header, which carries the network address of node A. It can be understood that the network address of node B carried in the third message is obtained by node K from the source location identifier field in the routing header of the second message (if the routing header includes a source location identifier field), or is obtained by node K from the address resolution node.
[0238] It can be seen that the implementation of the embodiment of the present application can better support routing addressing in scenarios where end nodes in the network are mobile, by carrying the network address of the intermediate node to which the destination node is connected in the message header and the network address of the destination node in the next extended header routing header of the message header. When the destination node moves, only the intermediate nodes directly connected to the destination node perceive the topology changes brought about by the movement of the destination node. It is no longer the case that the entire network perceives the topology changes brought about by the movement of the end node in traditional routing. Therefore, the network address of the intermediate node to which the destination node is connected, carried by the message header, can effectively reduce the number of intermediate nodes in the network that need to perceive topology changes.
[0239] 7A is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, wherein the communication device 30 includes an acquisition unit 310 and a sending unit 312. The communication device 30 can be implemented by hardware, software, or a combination of hardware and software.
[0240] Among them, the acquisition unit 310 is used to obtain a first message, the first message includes a message header and a routing header, wherein the first destination address field of the message header indicates the network address of the first intermediate node, the second destination address field of the routing header indicates the network address of the destination node, and the first intermediate node is an intermediate node that establishes a communication connection with the destination node; the sending unit 312 is used to send the first message.
[0241] The communication device 30 may be used to implement the method on the source node side described in the embodiment of Figure 4. In the embodiment of Figure 4, the acquiring unit 310 may be used to execute S401, and the sending unit 312 may be used to execute S402.
[0242] Referring to Figure 7B , Figure 7B is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device 40 includes a receiving unit 410 and a sending unit 412. In some possible embodiments, the communication device 40 may also include a processing unit 414. The communication device 40 may be implemented in hardware, software, or a combination of hardware and software. The communication device 40 may be a first node or included in the first node.
[0243] Among them, the receiving unit 410 is used to receive a first message, the first message includes a message header and a routing header, wherein the first destination address field of the message header indicates the network address of the first intermediate node, and the second destination address field of the routing header indicates the network address of the destination node, and the first intermediate node is an intermediate node that establishes a communication connection with the destination node; the sending unit 412 is used to send the first message when the network address of the first node is not the network address of the first intermediate node; or the processing unit 414 is used to update the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field when the network address of the first node is the network address of the first intermediate node, so as to generate a second message and send the second message through the sending unit 412.
[0244] The communication device 40 may be used to implement the method described in the embodiment of FIG. 4 on the first intermediate node side, the second intermediate node side, or any one of the intermediate node sides.
[0245] For example, for the method on the second intermediate node side shown in the embodiment of FIG. 4 , the receiving unit 410 may be used to execute S402 , and the sending unit 412 may be used to execute S403 .
[0246] For example, for the method on the first intermediate node side shown in the embodiment of FIG. 4 , the receiving unit 410 may be used to execute S403 , the processing unit 414 may be used to execute S404 , and the sending unit 412 may be used to execute S405 .
[0247] 7C is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, wherein the communication device 50 includes a receiving unit 510 and a processing unit 512. The communication device 50 can be implemented by hardware, software, or a combination of hardware and software.
[0248] Among them, the receiving unit 510 is used to receive a first message, the first message includes a message header and a routing header, the first destination address field of the message header indicates the network address of the destination node, and the second destination address field of the routing header indicates the network address of the destination node, wherein the network address indicated by the first destination address field is obtained based on the network address of the first intermediate node being updated to the network address of the destination node, and the first intermediate node is an intermediate node that establishes a communication connection with the destination node; the processing unit is used to parse the first message.
[0249] The communication device 50 may be used to implement the method at the destination node side described in the embodiment of Figure 4. In the embodiment of Figure 4, the receiving unit 510 and the processing unit 512 may be used to execute S406.
[0250] Optionally, the communication device shown in FIG. 7A , FIG. 7B or FIG. 7C may be an independent device, such as a node, or may be a device in an independent device (such as a node), such as a chip or an integrated circuit.
[0251] It should be understood that the division of the various units in the embodiments shown in Figures 7A, 7B, or 7C above is merely a division of logical functions. In actual implementation, they may be fully or partially integrated into a single physical entity, or they may be physically separated. In addition, the units in the device may be implemented in the form of a processor calling software; for example, the device includes a processor, the processor is connected to a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of the various units of the device, wherein the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory within the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all of the units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit. For another example, in another implementation, the hardware circuit can be implemented by a programmable logic device (PLD). Taking a field programmable gate array (FPGA) as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the configuration file, thereby realizing the functions of some or all of the above units. All units of the above devices can be implemented in the form of software called by the processor, or in the form of hardware circuits, or in part by software called by the processor, and the rest by hardware circuits.
[0252] In an embodiment of the present application, a processor is a circuit with a signal processing capability. In one implementation, the processor can be a circuit with instruction reading and execution capability, such as a central processing unit (CPU), a microprocessor, a graphics processing unit (GPU) (which can be understood as a microprocessor), or a digital signal processor (DSP). In another implementation, the processor can implement certain functions through the logical relationship of a hardware circuit. The logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by a processor as an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as an FPGA. In a reconfigurable hardware circuit, the processor loads a configuration document to implement the process of hardware circuit configuration, which can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc.
[0253] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0254] In addition, the various units in the above apparatus may be fully or partially integrated together, or may be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-a-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the apparatus. The at least one processor may be of different types, for example, including a CPU and an FPGA, a CPU and an NPU, etc.
[0255] Referring to Figure 8 , which is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, as shown in Figure 8 , the communication device 60 includes a processor 601 , a communication interface 602 , a memory 603 , and a bus 604 . The processor 601 , the memory 603 , and the communication interface 602 communicate with each other via the bus 604 .
[0256] It should be understood that the present application does not limit the number of processors and memories in the communication device 60 .
[0257] In one implementation, the communication device 60 can be a network device with routing and forwarding capabilities, such as a wireless network device, a router, a three-layer switch (or a multi-layer switch), etc., or a component used in the above-mentioned network device that can implement the above-mentioned method, such as an integrated circuit, a line card, a chip, etc.
[0258] In another implementation, the communication device 60 can be an electronic device with communication capabilities, such as a handheld terminal, a vehicle, an on-board device, or a network-side device, a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a wireless communication device, a user agent, or a user device, or a component (such as a chip or integrated circuit) included in an independent device, or any possible smart terminal device (such as a mobile phone), smart transportation equipment (such as a vehicle, a drone, etc.), smart manufacturing equipment, smart home equipment (such as a large screen, a speaker, etc.), or a component used in the above electronic devices that can implement the above method, such as an integrated circuit, a line card, a chip, etc. In this case, the communication device 60 can be specifically referred to the corresponding description of the end node in the embodiment of Figure 1, and will not be repeated here.
[0259] Bus 604 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be categorized as address buses, data buses, and control buses. For ease of illustration, FIG8 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 604 may include a pathway for transmitting information between various components of communication device 60 (e.g., memory 603, processor 601, and communication interface 602).
[0260] The processor 601 can refer to the relevant description of the processor in the above embodiment, which will not be repeated here.
[0261] Memory 603 is used to provide storage space for data such as the operating system and computer programs. Memory 603 can be one or a combination of random access memory (RAM), erasable programmable read-only memory (EPROM), read-only memory (ROM), or compact disc read-only memory (CD-ROM). Memory 603 can exist independently or be integrated into processor 601.
[0262] The communication interface 602 can be used to provide information input or output for the processor 601. Alternatively, the communication interface 602 can be used to receive data sent externally and / or send data externally. The communication interface 602 can be a wireless link interface, such as an air interface, a cellular network interface, or a wireless local area network interface, or can be a wired link interface including an Ethernet cable, or can include a transmitter (such as a radio frequency transmitter, an antenna, etc.) or a receiver coupled to the interface. Exemplarily, when the communication interface 602 is a wireless link interface, the communication interface 602 can be configured to receive and send information according to one or more other types of wireless communications (e.g., protocols), such as Bluetooth, IEEE 802.11 communication protocol, cellular technology, Worldwide Interoperability for Microwave Access (WiMAX) or Long Term Evolution (LTE), ZigBee protocol, dedicated short range communications (DSRC), and radio frequency identification (RFID) communications, etc.
[0263] The processor 601 in the communication device 60 is used to read the computer program stored in the memory 603 to execute the aforementioned method, such as the method described in FIG. 4 .
[0264] In one possible design, the communication device 60 may be one or more modules in an execution entity (source node) that executes the method shown in FIG. 4 , and the processor 601 may be configured to read one or more computer programs stored in a memory to perform the following operations:
[0265] Acquiring a first message by the acquiring unit 310, where the first message includes a message header and a routing header, wherein the first destination address field of the message header indicates the network address of the first intermediate node, and the second destination address field of the routing header indicates the network address of the destination node, and the destination node accesses the network through the first intermediate node;
[0266] The first message is sent through the sending unit 312.
[0267] In one possible design, the communication device 60 may be one or more modules in an execution entity (intermediate node) that executes the method shown in FIG. 4 , and the processor 601 may be configured to read one or more computer programs stored in a memory to perform the following operations:
[0268] Receive a first message through the receiving unit 410, where the first message includes a message header and a routing header, wherein the first destination address field of the message header indicates the network address of the first intermediate node, and the second destination address field of the routing header indicates the network address of the destination node, and the destination node accesses the network through the first intermediate node;
[0269] When the network address of the first node is not the network address of the first intermediate node, the sending unit 412 sends the first message; or when the network address of the first node is the network address of the first intermediate node, the network address indicated by the first destination address field is updated from the network address of the first intermediate node to the network address of the destination node based on the second destination address field, so as to generate a second message and send the second message.
[0270] In one possible design, the communication device 60 may be one or more modules in an execution entity (destination node) that executes the method shown in FIG. 4 , and the processor 601 may be configured to read one or more computer programs stored in a memory to perform the following operations:
[0271] A first message is received by the receiving unit 510, where the first message includes a message header and a routing header. The first destination address field of the message header indicates the network address of the destination node, and the second destination address field of the routing header indicates the network address of the destination node. The network address indicated by the first destination address field is obtained based on the network address of the first intermediate node being updated to the network address of the destination node, and the destination node accesses the network through the first intermediate node.
[0272] In the embodiments described above, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant descriptions of other embodiments. In addition, in the various embodiments of this application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0273] It should be noted that, those skilled in the art can see that all or part of the steps in the various methods of the above embodiments can be completed by a program to instruct relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0274] The technical solution of the present application may essentially or contribute to the part or all or part of the technical solution in the form of a software product. The computer program product is stored in a storage medium and includes a number of instructions for enabling a device (which may be a personal computer, a server, or a network device, a robot, a single-chip microcomputer, a chip, a robot, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
Claims
1. A message sending method, characterized in that: The method is applied to a first node, and includes: receiving a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating a network address of a first intermediate node, the second destination address field of the routing header indicating a network address of a destination node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; When the network address of the first node is not the network address of the first intermediate node, sending the first message; or When the network address of the first node is the network address of the first intermediate node, the network address indicated by the first destination address field is updated from the network address of the first intermediate node to the network address of the destination node based on the second destination address field to generate a second message and send the second message.
2. The method according to claim 1, characterized in that The network address of the first intermediate node is obtained by the source node from the address resolution node. The source node is the starting sending node of the first message. The address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node. The first mapping relationship indicates that the destination node is connected to the first intermediate node.
3. The method according to claim 2, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
4. The method according to claim 3, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
5. The method according to claim 4, characterized in that When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
6. The method according to any one of claims 1 to 5, characterized in that The routing header further includes a third destination address field and a segment offset field, the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The updating, based on the second destination address field, of the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node includes: changing the value of the segment offset field from the first value to a second value, and determining that the second value corresponds to the second destination address field; The network address indicated by the first destination address field is updated from the network address of the first intermediate node to the network address of the destination node based on the second destination address field.
7. The method according to any one of claims 1 to 6, characterized in that The sending of the first message includes: The first message is sent according to the first forwarding table entry, wherein the first forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
8. The method according to any one of claims 1 to 7, characterized in that The sending of the second message includes: The second message is sent according to the second forwarding table entry, wherein the second forwarding table entry records the correspondence between the network address of the destination node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
9. The method according to claim 7 or 8, characterized in that The first forwarding table entry or the second forwarding table entry is obtained from a forwarding table, and the forwarding table is obtained based on a neighbor forwarding table of the first node and a routing table of the first node.
10. The method according to any one of claims 1 to 9, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
11. A message sending method, characterized in that: The method is applied to a source node, and comprises: Obtaining a first message, where the first message includes a message header and a routing header, where a first destination address field of the message header indicates a network address of a first intermediate node, and a second destination address field of the routing header indicates a network address of a destination node, where the first intermediate node is an intermediate node that establishes a communication connection with the destination node; Send the first message.
12. The method according to claim 11, characterized in that Before obtaining the first message, the method further includes: Sending an address request message to an address resolution node, wherein the address request message carries the network address of the destination node; receiving an address feedback message sent by the address resolution node, the address feedback message including a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, the first mapping relationship indicating that the destination node is connected to the first intermediate node; The network address of the first intermediate node is obtained from the first mapping relationship, and the network address of the first intermediate node is used to generate the first message.
13. The method according to claim 11 or 12, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
14. The method according to claim 13, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
15. The method according to claim 14, characterized in that When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
16. The method according to any one of claims 11 to 15, characterized in that The sending of the first message includes: Determining the next hop of the source node according to a forwarding table entry, the forwarding table entry recording a correspondence between the network address of the first intermediate node, the identifier of the outbound interface of the source node, the layer 2 identifier of the next hop of the source node, the transmission channel identifier TCID of the source node, and the logical channel identifier LCID of the source node; Send the first message to the next hop of the source node.
17. The method according to claim 16, characterized in that The forwarding table entry is obtained from a forwarding table based on the network address of the first intermediate node, and the forwarding table is obtained based on a neighbor forwarding table of the source node and a routing table of the source node.
18. The method according to any one of claims 11 to 17, characterized in that: The routing header further includes a third destination address field and a segment offset field, when the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
19. The method according to any one of claims 11 to 18, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
20. A message receiving method, characterized in that: The method is applied to a destination node, and includes: receiving a first message, the first message including a message header and a routing header, a first destination address field of the message header indicating a network address of a destination node, and a second destination address field of the routing header indicating the network address of the destination node, wherein the network address indicated by the first destination address field is obtained by updating the network address of the destination node to the network address of the destination node from the network address of a first intermediate node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; Parse the first message.
21. The method according to claim 20, characterized in that The network address of the first intermediate node is obtained by the source node from the address resolution node. The source node is the starting sending node of the first message. The address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node. The first mapping relationship indicates that the destination node is connected to the first intermediate node.
22. The method according to claim 21, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
23. The method according to claim 22, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
24. The method according to claim 23, wherein When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node of a network, the source location identification field is used to indicate the network address of the source node.
25. The method according to any one of claims 20 to 24, characterized in that In a case where the routing header of the first message includes a source location identification field, the method further includes: Acquire the network address of the second intermediate node to which the source node is connected from the source location identification field; A third message is sent based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, where the third message is a response to the first message.
26. The method according to any one of claims 20 to 24, characterized in that In a case where the routing header of the first message does not include a source location identification field, the method further includes: Obtaining, from an address resolution node, a network address of a second intermediate node to which the source node is connected; A third message is sent based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, where the third message is a response to the first message.
27. The method according to any one of claims 20 to 26, characterized in that: The routing header further includes a third destination address field and a segment offset field, when the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
28. The method according to any one of claims 20 to 27, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
29. A communication device, characterized in that: The device is a first node or is included in the first node, and the device includes: a receiving unit, configured to receive a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating a network address of a first intermediate node, the second destination address field of the routing header indicating a network address of a destination node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; a sending unit, configured to send the first message when the network address of the first node is not the network address of the first intermediate node; or A processing unit, configured to update the network address indicated by the first destination address field from the network address of the first intermediate node to the network address of the destination node based on the second destination address field when the network address of the first node is the network address of the first intermediate node, so as to generate a second message; the sending unit is also configured to send the second message.
30. The device according to claim 29, characterized in that The network address of the first intermediate node is obtained by the source node from the address resolution node. The source node is the starting sending node of the first message. The address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node. The first mapping relationship indicates that the destination node is connected to the first intermediate node.
31. The device according to claim 30, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
32. The device according to claim 31, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
33. The device according to claim 32, characterized in that When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
34. The device according to any one of claims 29 to 33, characterized in that The routing header further includes a third destination address field and a segment offset field, the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The processing unit is specifically configured to: changing the value of the segment offset field from the first value to a second value, and determining that the second value corresponds to the second destination address field; The network address indicated by the first destination address field is updated from the network address of the first intermediate node to the network address of the destination node based on the second destination address field.
35. The device according to any one of claims 29 to 34, characterized in that The sending unit is specifically configured to: The first message is sent according to the first forwarding table entry, wherein the first forwarding table entry records the correspondence between the network address of the first intermediate node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
36. The device according to any one of claims 29 to 35, characterized in that The sending unit is specifically configured to: The second message is sent according to the second forwarding table entry, wherein the second forwarding table entry records the correspondence between the network address of the destination node, the identifier of the output interface of the first node, the layer 2 identifier of the next hop of the first node, the transmission channel identifier TCID of the first node and the logical channel identifier LCID of the first node.
37. The device according to claim 35 or 36, characterized in that The first forwarding table entry or the second forwarding table entry is obtained from a forwarding table, and the forwarding table is obtained based on a neighbor forwarding table of the first node and a routing table of the first node.
38. The device according to any one of claims 29 to 37, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
39. A communication device, characterized in that: The device is a source node or is included in the source node, and the device includes: an acquiring unit, configured to acquire a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating a network address of a first intermediate node, the second destination address field of the routing header indicating a network address of a destination node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; A sending unit, configured to send the first message.
40. The device according to claim 39, characterized in that The sending unit is specifically configured to: send an address request message to the address resolution node, wherein the address request message carries the network address of the destination node; The apparatus further includes a receiving unit, configured to receive an address feedback message sent by the address resolution node, the address feedback message including a first mapping relationship between the network address of the destination node and the network address of the first intermediate node, the first mapping relationship indicating that the destination node is connected to the first intermediate node; The acquiring unit is further configured to acquire the network address of the first intermediate node from the first mapping relationship, where the network address of the first intermediate node is used to generate the first message.
41. The device according to claim 39 or 40, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
42. The device according to claim 41, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
43. The device according to claim 42, characterized in that When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node in a network, the source location identification field is used to indicate the network address of the source node.
44. The device according to any one of claims 39 to 43, characterized in that The sending unit is specifically configured to: Determining the next hop of the source node according to a forwarding table entry, the forwarding table entry recording a correspondence between the network address of the first intermediate node, the identifier of the outbound interface of the source node, the layer 2 identifier of the next hop of the source node, the transmission channel identifier TCID of the source node, and the logical channel identifier LCID of the source node; Send the first message to the next hop of the source node.
45. The device according to claim 44, characterized in that The forwarding table entry is obtained from a forwarding table based on the network address of the first intermediate node, and the forwarding table is obtained based on a neighbor forwarding table of the source node and a routing table of the source node.
46. The device according to any one of claims 39 to 45, characterized in that The routing header further includes a third destination address field and a segment offset field, when the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
47. The device according to any one of claims 39 to 46, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
48. A communication device, characterized in that The device is a destination node or is included in the destination node, and the device includes: a receiving unit, configured to receive a first message, the first message including a message header and a routing header, the first destination address field of the message header indicating a network address of a destination node, and the second destination address field of the routing header indicating the network address of the destination node, wherein the network address indicated by the first destination address field is obtained by updating the network address of the destination node to the network address of the destination node from the network address of a first intermediate node, the first intermediate node being an intermediate node that establishes a communication connection with the destination node; A processing unit, configured to parse the first message.
49. The device according to claim 48, characterized in that The network address of the first intermediate node is obtained by the source node from the address resolution node. The source node is the starting sending node of the first message. The address resolution node stores a first mapping relationship between the network address of the destination node and the network address of the first intermediate node. The first mapping relationship indicates that the destination node is connected to the first intermediate node.
50. The device according to claim 49, characterized in that The routing header further includes a routing type field, and the routing type field is used to indicate the type of the routing header.
51. The device according to claim 50, characterized in that The type of the routing header is: the routing header includes a source location identification field, and the source location identification field is used by the destination node to reversely address the source node.
52. The device according to claim 51, characterized in that When the source node is an end node in a network, the source location identification field is used to indicate a network address of a second intermediate node, where the second intermediate node is an intermediate node that establishes a communication connection with the source node; or When the source node is an intermediate node of a network, the source location identification field is used to indicate the network address of the source node.
53. The device according to any one of claims 48 to 52, characterized in that The device further includes a sending unit, wherein: The processing unit is configured to, when the routing header of the first message includes a source location identifier field, obtain the network address of the second intermediate node to which the source node is connected from the source location identifier field; The sending unit is configured to send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
54. The device according to any one of claims 48 to 52, characterized in that The device further includes a sending unit, wherein: The processing unit is configured to obtain, from an address resolution node, a network address of a second intermediate node connected to the source node when the routing header of the first message does not include a source location identifier field; The sending unit is configured to send a third message based on the network address of the second intermediate node, so that the second intermediate node forwards the third message to the source node, and the third message is a response to the first message.
55. The device according to any one of claims 48 to 54, characterized in that The routing header further includes a third destination address field and a segment offset field, when the segment offset field takes a first value, the first value corresponds to the third destination address field, and the third destination address field indicates the network address of the first intermediate node; The routing header is used to instruct the first intermediate node to change the value of the segment offset field from the first value to a second value and update the network address indicated by the first destination address field to the network address of the destination node based on the second destination address field corresponding to the second value.
56. The device according to any one of claims 48 to 55, characterized in that At least one of the length of the network address of the destination node and the length of the network address of the first intermediate node is 2 bytes.
57. A communication device, characterized in that It includes a processor, a transceiver and a memory; the memory is used to store instructions, the processor is used to execute the instructions, and the transceiver is used to communicate with other devices under the control of the processor; wherein, when the processor executes the instructions, it executes the method described in any one of claims 1-10 or 11-19 or 20-28.
58. A communication system, characterized in that The communication system includes at least a first device, a second device and a third device, wherein the first device is used to execute the method as described in any one of claims 1 to 10 above, the second device is used to execute the method as described in any one of claims 11 to 19 above, and the third device is used to execute the method as described in any one of claims 20 to 28 above.
59. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 10, 11 to 19, or 20 to 28.
60. A computer program product, characterized in that When the computer program product is run on a processor, it causes an apparatus to perform the method according to any one of claims 1-10, 11-19, or 20-28.