Message processing method, device, system and computer readable storage medium

CN117097657BActive Publication Date: 2026-10-27HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210929197.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-05-11
Filing Date
2022-08-03
Publication Date
2026-10-27
Estimated Expiration
2042-08-03

AI Technical Summary

Benefits of technology

[0085]第十一方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,安装有芯片的计算机执行上述各方面中的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117097657B_ABST
    Figure CN117097657B_ABST
Patent Text Reader

Abstract

The application discloses a message processing method, device, system and computer readable storage medium, and belongs to the technical field of communication. The method applied to a first node comprises: receiving a first message comprising a DA field and an SRH, the DA field comprising at least one C-SID arranged in order. Based on whether other C-SIDs are included after a first C-SID corresponding to the first node in the at least one C-SID, a first processing characteristic corresponding to the first C-SID is determined to indicate a moving operation or a replacing operation. If the first processing characteristic indicates the moving operation, a target field located after the first C-SID in the DA field is moved, so that the target field covers the first C-SID in the DA field. If the first processing characteristic indicates the replacing operation, a second C-SID in the SRH is used to replace the first C-SID in the DA field. The application can flexibly and efficiently process the message, and the compression efficiency of the message on the C-SID is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to message processing methods, devices, systems and computer-readable storage media. Background Technology

[0002] With the development of communication technology, there are more and more protocols used to process messages, and segment routing (SR) is one of them, which borrows from source routing technology. When the SR protocol is applied to the Internet Protocol version 6 (IPv6) data plane, it is also called IPv6 SR, or SRv6.

[0003] How to implement message processing based on SRv6 has become a problem worthy of attention. Summary of the Invention

[0004] This application provides a message processing method, apparatus, system, and computer-readable storage medium to implement message processing based on SRv6. The technical solution provided by this application includes the following aspects.

[0005] Firstly, a message processing method is provided. In this method, a first node first receives a first message, which includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation, and the at least one C-SID includes a first C-SID corresponding to the first node. Then, the first node determines, based on whether there are other C-SIDs following the first C-SID, whether the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation. Furthermore, if the first processing feature indicates a move operation, the first node moves the target field such that the target field covers the first C-SID in the DA field, and the target field is the field in the DA field that follows the first C-SID. Alternatively, if the first processing feature indicates a replacement operation, the first node replaces the first C-SID in the DA field with a second C-SID, which is a C-SID in the SRH.

[0006] In this application, by determining whether the first C-SID corresponding to the first node is followed by other C-SIDs, it is determined whether the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation. This allows for the execution of either a move or replacement operation on the first message. Consequently, flexible processing of the first message is achieved. Furthermore, since the DA field of the first message includes at least one C-SID, the compression efficiency of the first message for C-SIDs is high, resulting in high message processing efficiency for the first node.

[0007] In one possible implementation, the first node determines a first processing feature indicating a move or replacement operation based on whether other C-SIDs follow the first C-SID. This includes: the first node determining a move operation based on whether other C-SIDs follow the first C-SID; and the first node determining a replacement operation based on whether other C-SIDs follow the first C-SID. When other C-SIDs follow the first C-SID, it indicates that there are still unused C-SIDs in the DA field, so a move operation is performed to continue using the unused C-SIDs in the DA field. When no other C-SIDs follow the first C-SID, it indicates that all C-SIDs in the DA field have been used, so a replacement operation is performed to continue using the unused C-SIDs in the SRH, i.e., the second C-SID.

[0008] In one possible implementation, the first message further includes a first pointer and a second pointer. Before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: the first node updating the values ​​of the first pointer and the second pointer, such that the value of the first pointer indicates the position of the second C-SID within the container containing the second C-SID, and the value of the second pointer indicates the position of the container containing the second C-SID within the SRH; the first node determining the second C-SID based on the values ​​of the first pointer and the second pointer; the first node updating the value of the second pointer so that the second pointer points to a new container in the SRH; and the first node updating the value of the first pointer so that the first pointer points to a new C-SID within that new container. After the update is complete, the values ​​of the first pointer and the second pointer jointly indicate the second C-SID.

[0009] In one possible implementation, the first message also includes a first pointer and a second pointer. Before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: the first node updating the value of the first pointer such that the value of the first pointer indicates the location of the second C-SID within the container containing the second C-SID; the first node determining the second C-SID based on the values ​​of the first and second pointers, where the value of the second pointer indicates the location of the container containing the second C-SID within the SRH. If the first node does not update the value of the second pointer, the container pointed to by the value of the second pointer remains unchanged. If the first node updates the value of the first pointer such that the value of the first pointer points to a new C-SID within that container, after updating the value of the first pointer, the values ​​of the first and second pointers together indicate the second C-SID.

[0010] In one possible implementation, updating the value of the first pointer includes: determining the value of the first pointer to be N-1, where N is the maximum number of C-SIDs that the container can hold; or, decrementing the value of the first pointer by 1. A container can hold a maximum of N C-SIDs, and the values ​​of the first pointers corresponding to the N C-SIDs are 0, 1, ..., N-1, respectively. Specifically, when the first node needs to update the values ​​of both the first and second pointers, the first node determines the value of the first pointer to be N-1 and also decrements the value of the second pointer by 1. When the first node only needs to update the value of the first pointer, it decrements the value of the first pointer by 1.

[0011] In one possible implementation, the container is included in the SRH, and the container has a length of 128 bits.

[0012] In one possible implementation, after the first node moves the target field, the method further includes: the first node sets the field in the DA field that follows the moved target field to zero. By setting the field that follows the moved target field to zero, the length of the DA field can be kept at a specified length, such as 128 bits, avoiding message processing errors caused by the DA field being of a non-specified length, thus improving the reliability of message processing.

[0013] In one possible implementation, the first node stores a segment identifier (SID) table, which records the correspondence between C-SIDs and processing features. The method further includes: the first node querying the SID table based on at least one C-SID; in response to any C-SID among the at least one C-SID matching a C-SID recorded in the SID table, the first node determines that any C-SID is the first C-SID, and determines the processing feature corresponding to the matched C-SID as the first processing feature. In this application, the first node determines which of the at least one C-SIDs is the first C-SID that the first node itself needs to use by querying its local SID table. Correspondingly, the first node also determines whether the first C-SID corresponds to the first processing feature by querying its local SID table.

[0014] In one possible implementation, the method further includes: the first node sending a message obtained after performing a move operation or a replacement operation. After performing the move operation or the replacement operation, the first node may obtain a new message different from the first message, and therefore the first node continues to forward the new message so that the message is transmitted according to the specified forwarding path.

[0015] In one possible implementation, the processing feature is either the feature corresponding to the node behavior, i.e., flavor, or the processing feature is the node behavior, i.e., behavior. Processing features can take two different forms, increasing the flexibility in using them.

[0016] In one possible implementation, the first C-SID includes a node identifier field, and the next C-SID includes a function field. The next C-SID corresponds to the first node. The first C-SID, including the node identifier field, is used to route the first packet to the first node, enabling the first node to receive the first packet. Since the next C-SID also corresponds to the first node, the first node can continue to use the next C-SID after receiving the first packet. In this application, placing the node identifier field and function field corresponding to the first node in different C-SIDs reduces the length of each C-SID and improves the flexibility of the C-SIDs.

[0017] In one possible implementation, the first C-SID includes a function field, and the next C-SID corresponds to the downstream node of the first node in the forwarding path of the first packet. In this application, if the previous hop node of the first node can determine that the next hop node is the first node, then it is not necessary to rely on the node identifier field to route the first packet to the first node. Therefore, the first C-SID may only include the function field and not the node identifier field.

[0018] In one possible implementation, the first C-SID also includes a node identifier field. That is, the first C-SID includes both a node identifier field and a function field.

[0019] In one possible implementation, the length of the first C-SID is 16 bits or 32 bits. This allows for either 16-bit or 32-bit compression of the first C-SID. For example, if the first C-SID includes only the node identifier field or only the function field, its length is 16 bits; if it includes both the node identifier and function fields, its length is 32 bits. Again, if the first C-SID includes both the node identifier and function fields, its length is 16 bits.

[0020] In one possible implementation, the DA field also includes an address block preceding at least one C-SID. The first node, when querying the SID table, can perform a query based on both the address block and the first C-SID. For example, it can perform a longest match on SID table entries based on the address block and the first C-SID.

[0021] In one possible implementation, the sum of the address block length and the length of at least one C-SID is less than or equal to the length of the DA field. That is, the DA field can be filled with the address block and at least one C-SID, or it can be left unfilled. Whether to fill it or not can be chosen according to actual needs, which is quite flexible.

[0022] In one possible implementation, the length of the target field is the difference between the length of the DA field and the target length. The target length is the sum of the length of the address block and the length of the first C-SID. Alternatively, the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the zeroed bits in the DA field. That is, when the first node moves the target field, it can use all fields after the first C-SID as the target field and move them, or it can use the field carrying the C-SID among the fields after the first C-SID as the target field and move it. This makes the process of the first node performing the move operation more flexible.

[0023] In one possible implementation, the first message also includes an IPv6 header, which includes a DA field. The IPv6 header and the SRH are two different headers in the first message, with the DA field located within the IPv6 header.

[0024] In one possible implementation, the SRH also includes at least one SID with a length of 128 bits. This application can achieve hybrid compression of C-SID and SID, enhancing the applicability of the message processing method.

[0025] In one possible implementation, the SRH does not include the address block corresponding to the first C-SID. Therefore, each container in the SRH can carry a larger number of C-SIDs, improving the compression efficiency for C-SIDs.

[0026] Secondly, a message processing method is provided, in which a second node first receives a second message. Then, the second node obtains a first message based on the second message and sends the first message to the first node. The first message includes a DA field and an SRH (Search Engine Response Heading). The DA field includes at least one ordered C-SID, and any C-SID corresponds to a processing feature indicating a move or replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. Furthermore, the first processing feature corresponding to the first C-SID is used by the first node to determine whether the first processing feature indicates a move or replacement operation based on whether other C-SIDs follow the first C-SID. When the first processing feature indicates a move operation, it is used by the first node to move a target field such that the target field covers the first C-SID in the DA field. The target field is the field in the DA field following the first C-SID. When the first processing feature indicates a replacement operation, it is used by the first node to replace the first C-SID in the DA field with a second C-SID, which is a C-SID in the SRH.

[0027] In one possible implementation, the feature being processed is either the feature corresponding to the node behavior, or the feature being processed is the node behavior.

[0028] In one possible implementation, the first message also includes a first pointer. Before the second node sends the first message to the first node, the method further includes: the second node sets the value of the first pointer to zero. The value of the first pointer is used by the first node to update, such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID resides.

[0029] In one possible implementation, the first message also includes a second pointer. Before the second node sends the first message to the first node, the method further includes: the second node sets the value of the second pointer to an initial value, which is the number of containers included in the SRH. The value of the second pointer is used by the first node to update the first node so that the value of the second pointer indicates the position of the container where the second C-SID is located in the SRH.

[0030] In one possible implementation, the container is included in the SRH, and the container has a length of 128 bits.

[0031] In one possible implementation, the first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

[0032] In one possible implementation, the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the downstream node of the first node in the forwarding path of the first message.

[0033] In one possible implementation, the first C-SID also includes a node identifier field.

[0034] In one possible implementation, the length of the first C-SID is 16 bits or 32 bits.

[0035] In one possible implementation, the DA field also includes an address block preceding at least one C-SID.

[0036] In one possible implementation, the sum of the length of the address block and the length of at least one C-SID is less than or equal to the length of the DA field.

[0037] In one possible implementation, the length of the target field is the difference between the length of the DA field and the target length, and the target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the bits in the DA field that are set to zero.

[0038] In one possible implementation, the first message also includes an IPv6 header, which includes a DA field.

[0039] In one possible implementation, the SRH also includes at least one SID of 128 bits in length.

[0040] In one possible implementation, the SRH does not include the address block corresponding to the second C-SID.

[0041] Thirdly, a message processing method is provided, comprising: a second node receiving a second message; the second node obtaining a first message based on the second message, the first message including a DA field and an SRH, the DA field including at least one ordered C-SID, each of the at least one C-SID corresponding to a processing feature indicating a move operation or a replacement operation, the at least one C-SID including a first C-SID corresponding to a first node; the second node sending the first message to the first node; the first node receiving the first message; the first node determining, based on whether there are other C-SIDs after the first C-SID, a first processing feature corresponding to the first C-SID indicating a move operation or a replacement operation; when the first processing feature indicates a move operation, the first node moving a target field such that the target field covers the first C-SID in the DA field, the target field being the field in the DA field located after the first C-SID; when the first processing feature indicates a replacement operation, the first node replacing the first C-SID in the DA field with a second C-SID, the second C-SID being a C-SID in the SRH.

[0042] Fourthly, a message processing apparatus is provided, which is applied to a first node, and the apparatus includes:

[0043] The receiving module is used to receive a first message, the first message including a DA field and an SRH, the DA field including at least one C-SID arranged in an ordered manner, each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation, and the at least one C-SID includes a first C-SID corresponding to the first node. The determination module is used to determine, based on whether there are other C-SIDs after the first C-SID, the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation; The moving module is used to move the target field when the first processing feature indicates a moving operation, such that the target field covers the first C-SID in the DA field, and the target field is the field in the DA field that is located after the first C-SID; The replacement module is used to replace the first C-SID in the DA field with a second C-SID when the first processing feature indicates a replacement operation. The second C-SID is a C-SID in the SRH.

[0044] In some possible implementations, a determining module is used to determine a first processing feature indicating a move operation based on the first C-SID followed by other C-SIDs; and to determine a first processing feature indicating a replacement operation based on the first C-SID not being followed by other C-SIDs.

[0045] In some possible implementations, the first message also includes a first pointer and a second pointer. The replacement module is also used to update the values ​​of the first pointer and the second pointer, such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located, and the value of the second pointer indicates the location of the container where the second C-SID is located in the SRH; the second C-SID is determined based on the values ​​of the first pointer and the second pointer.

[0046] In some possible implementations, the first message also includes a first pointer and a second pointer, a replacement module for updating the value of the first pointer such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID resides; the second C-SID is determined based on the values ​​of the first pointer and the second pointer, the value of the second pointer indicating the location of the container where the second C-SID resides in the SRH.

[0047] In some possible implementations, a replacement module is used to determine the value of the first pointer as N-1, where N is the maximum number of C-SIDs that the container can hold; or, the value of the first pointer is decremented by 1.

[0048] In some possible implementations, the container is included in the SRH, and the container is 128 bits long.

[0049] In some possible implementations, the move module is also used to set the field in the DA field that follows the target field after the move to zero.

[0050] In some possible implementations, the first node stores a SID table, which records the correspondence between C-SIDs and processing features. The determination module is also used to query the SID table based on at least one C-SID. In response to any C-SID among at least one C-SID matching a C-SID recorded in the SID table, the module determines that any C-SID is the first C-SID and determines the processing feature corresponding to the matched C-SID as the first processing feature.

[0051] In some possible implementations, the apparatus also includes a sending module for sending a message obtained after performing a movement operation or a replacement operation.

[0052] In some possible implementations, the feature being processed is the feature corresponding to the node behavior, or the feature being processed is the node behavior.

[0053] In some possible implementations, the first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

[0054] In some possible implementations, the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the downstream node of the first node in the forwarding path of the first packet.

[0055] In some possible implementations, the first C-SID also includes a node identifier field.

[0056] In some possible implementations, the length of the first C-SID is 16 bits or 32 bits.

[0057] In some possible implementations, the DA field also includes an address block preceding at least one C-SID.

[0058] In some possible implementations, the sum of the length of the address block and the length of at least one C-SID is less than or equal to the length of the DA field.

[0059] In some possible implementations, the length of the target field is the difference between the length of the DA field and the target length, the target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID and the length of the bits in the DA field that are set to zero.

[0060] In some possible implementations, the first message also includes an IPv6 header, which includes a DA field.

[0061] In some possible implementations, the SRH also includes at least one SID of 128 bits in length.

[0062] In some possible implementations, the SRH does not include the address block corresponding to the first C-SID.

[0063] Fifthly, a message processing apparatus is provided, which is applied to a second node, the apparatus comprising: The receiving module is used to receive the second message; The module is used to obtain the first message based on the second message. The first message includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. The sending module is used to send the first message to the first node; The first processing feature corresponding to the first C-SID is used by the first node to determine whether there are other C-SIDs after the first C-SID, indicating a move operation or a replacement operation. When the first processing feature indicates a move operation, the first processing feature is used by the first node to move the target field so that the target field covers the first C-SID in the DA field. The target field is the field in the DA field located after the first C-SID. When the first processing feature indicates a replacement operation, the first processing feature is used by the first node to replace the first C-SID in the DA field with a second C-SID. The second C-SID is a C-SID in the SRH.

[0064] In some possible implementations, the feature being processed is the feature corresponding to the node behavior, or the feature being processed is the node behavior.

[0065] In some possible implementations, the first message also includes a first pointer. The sending module is also used to set the value of the first pointer to zero. The value of the first pointer is used for the first node update, so that the value of the first pointer indicates the position of the second C-SID in the container where the second C-SID is located.

[0066] In some possible implementations, the first message also includes a second pointer. The sending module is also used to set the value of the second pointer to an initial value, which is the number of containers included in the SRH. The value of the second pointer is used for the first node update, so that the value of the second pointer indicates the position of the container where the second C-SID is located in the SRH.

[0067] In some possible implementations, the container is included in the SRH, and the container is 128 bits long.

[0068] In some possible implementations, the first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

[0069] In some possible implementations, the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the downstream node of the first node in the forwarding path of the first packet.

[0070] In some possible implementations, the first C-SID also includes a node identifier field.

[0071] In some possible implementations, the length of the first C-SID is 16 bits or 32 bits.

[0072] In some possible implementations, the DA field also includes an address block preceding at least one C-SID.

[0073] In some possible implementations, the sum of the length of the address block and the length of at least one C-SID is less than or equal to the length of the DA field.

[0074] In some possible implementations, the length of the target field is the difference between the length of the DA field and the target length, the target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID and the length of the bits in the DA field that are set to zero.

[0075] In some possible implementations, the first message also includes an IPv6 header, which includes a DA field.

[0076] In some possible implementations, the SRH also includes at least one SID of 128 bits in length.

[0077] In some possible implementations, the SRH does not include the address block corresponding to the second C-SID.

[0078] In a sixth aspect, a message processing apparatus is provided, the apparatus including a memory and a processor; the memory stores at least one instruction, which is loaded and executed by the processor to enable the apparatus to implement the methods in the above aspects.

[0079] Optionally, there may be one or more processors and one or more memories.

[0080] Alternatively, the memory can be integrated with the processor, or the memory can be set up separately from the processor.

[0081] In a seventh aspect, a message processing system is provided, the system including a first node and a second node, the first node being used to execute the message processing method provided by the first aspect and its corresponding possible implementations, and the second node being used to execute the message processing method provided by the second aspect and its corresponding possible implementations.

[0082] Eighthly, a computer-readable storage medium is provided, which stores at least one instruction that is loaded and executed by a processor to enable a computer to implement the methods in the foregoing aspects.

[0083] Ninthly, a computer program product is provided, comprising a computer program or instructions, which are executed by a processor to enable a computer to perform the methods described in the preceding aspects.

[0084] In a tenth aspect, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, causing a computer equipped with the chip to perform the methods described in the foregoing aspects.

[0085] Eleventhly, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected by an internal connection path, the processor is used to execute code in the memory, and when the code is executed, a computer with the chip installed performs the methods in the above aspects.

[0086] It should be understood that the beneficial effects of the technical solutions and corresponding possible implementations of the second to eleventh aspects of this application can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0087] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of this application; Figure 2 A schematic diagram illustrating another implementation environment provided for an embodiment of this application; Figure 3 A schematic diagram of the structure of a SID provided in an embodiment of this application; Figure 4 A schematic diagram of a message structure encapsulated with a message header, provided for an embodiment of this application; Figure 5 A schematic diagram of a message structure encapsulated with a message header, generated based on generalized SRv6 (G-SRv6) technology, provided for embodiments of this application; Figure 6 A schematic diagram of another structure of a message encapsulated with a message header, generated based on G-SRv6 technology, provided for an embodiment of this application; Figure 7 A flowchart illustrating a message processing procedure based on G-SRv6 technology, provided for an embodiment of this application; Figure 8 A schematic diagram of a message structure with a header generated based on micro SID (uSID) technology, provided for an embodiment of this application; Figure 9 A schematic diagram illustrating a left shift operation based on uSID technology, provided for an embodiment of this application; Figure 10 A flowchart illustrating a message processing procedure based on uSID technology provided for an embodiment of this application; Figure 11 A flowchart illustrating a message processing method provided in this application embodiment; Figure 12 This is a schematic diagram of the structure of a first message provided in an embodiment of this application; Figure 13A schematic diagram of a moving target field provided in an embodiment of this application; Figure 14 A schematic diagram of another moving target field provided in an embodiment of this application; Figure 15 A schematic diagram of yet another moving target field provided in an embodiment of this application; Figure 16 This is a schematic diagram of another first message structure provided in an embodiment of this application; Figure 17 A flowchart illustrating another message processing method provided in this application embodiment; Figure 18 A flowchart illustrating yet another message processing method provided in this application embodiment; Figure 19 A flowchart illustrating a message processing procedure provided for an embodiment of this application; Figure 20 A flowchart illustrating another message processing procedure provided in an embodiment of this application; Figure 21 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application; Figure 22 A schematic diagram of another message processing apparatus provided in the embodiments of this application; Figure 23 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application. Detailed Implementation

[0088] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0089] This application provides an implementation environment, such as... Figure 1 As shown, this implementation environment includes at least one SRv6 domain, which includes a controller and multiple nodes R1 to RM, where M can be a positive integer greater than or equal to 2, and the value of M is not limited here. The multiple nodes are interconnected, with the edge node serving as the head node. The controller is interconnected with the head node. This implementation environment also includes terminal devices, which are also interconnected with the head nodes.

[0090] For example, a node can be a network device or a chip, such as a router, switch, repeater, or virtual machine, etc., without limitation. For example, a terminal device can be a personal computer, mobile phone, or tablet computer, etc., also without limitation.

[0091] exist Figure 1In the illustrated implementation environment, the terminal device sends messages to the head node, and the controller sends message transmission path information to the head node. Upon receiving a message from the terminal device, the head node generates a message header based on the message transmission path information sent by the controller, encapsulates the message header within the message, and sends the message with the encapsulated header. Thus, the message with the encapsulated header can be transmitted according to the message transmission path information.

[0092] For example, the controller acquires network topology information from multiple nodes, which is used to indicate the communication connections between the nodes. For instance, multiple nodes interact with the controller using network topology information extraction technologies such as Border Gateway Protocol (BGP) link state (LS). This includes proactively reporting network topology information to the controller via BGP LS technology, or feeding back network topology information to the controller based on instructions sent by the controller via BGP LS technology.

[0093] Subsequently, the controller performs path calculation based on the network topology information of multiple nodes and service requirements to obtain an SRv6 policy. This SRv6 policy includes at least one candidate path between the head node and the destination node, and each candidate path includes at least one set of packet transmission path information. Thus, the controller sends the aforementioned packet transmission path information to the head node by issuing the SRv6 policy. For example, service requirements include, but are not limited to, requirements for at least one aspect of latency and bandwidth, and are not limited here. For example, service requirements can be indicated by color, with each color corresponding one-to-one with both the service requirements and the SRv6 policy.

[0094] For example, see Figure 2 , Figure 2 An exemplary implementation environment is illustrated. The head node is R1, the destination node is terminal device 2, and the message transmission path information included in the SRv6 Policy indicates that the previous hop of terminal device 2 is node RM. After the controller sends the SRv6 Policy of the specified color to R1, RM will advertise a route of the same specified color to R1. This route includes a prefix and a next hop, where the next hop is terminal device 2. Exemplarily, RM can directly advertise this route to R1, or it can advertise it to... Figure 2The route reflector (RR) advertises the route so that it can be reflected back to R1. Upon receiving the route, R1 associates it with the SRv6 Policy because the route corresponds to the same specified color. After R1 receives a message from terminal device 1 containing a DA field belonging to terminal device 2, it queries the DA field of the message to obtain the aforementioned route and thus the SRv6 Policy associated with it. Therefore, R1 can redirect the message to the SRv6 Policy associated with the route, coloring the message with the color corresponding to the SRv6 Policy. That is, R1 generates a message header based on the message transmission path information included in the SRv6 Policy associated with the route, encapsulates this header in the outer layer of the message, and sends the message with the encapsulated header.

[0095] Of course, this color-based traffic redirection method is merely an example and is not intended to limit the traffic redirection method implemented by the head node. After receiving a message from the terminal device, the head node can also determine the SRv6 Policy used to transmit the message through other possible methods, thereby determining the message transmission path information so as to send the message encapsulated with the message header as described above.

[0096] The message transmission path information sent by the controller to the head node includes multiple ordered SIDs. Each SID is used to indicate a node and the node behavior (endpoint behavior) that the node needs to perform. The node behavior is also called an action. Each SID is 128 bits long.

[0097] See Figure 3 , Figure 3 The structure of a SID is shown. An SID includes a locator field and a function field. The locator field carries the locator network segment route, which indicates the node. This locator field can be further divided into an address block and a node identifier (Node ID) field. The address block is also called the common prefix. Within the same SRv6 domain, different nodes have the same address block, but different nodes have different node identifier fields, thus allowing them to be distinguished. The function field carries the operation code (opcode), which indicates the node behavior to be performed.

[0098] For example, such as Figure 3As shown, the SID can also include an arguments field and a padding field. The arguments field carries parameters related to the node's behavior and can be set to zero. The padding field ensures the SID is 128 bits long, by padding the portion after the position field, function field, and optional arguments field. The padding field exists when the sum of the lengths of the position field, function field, and arguments field is less than 128 bits, and in this case, it can be set to zero.

[0099] After receiving the message transmission path information, i.e., receiving multiple ordered SIDs, the head node needs to generate a message header. The head node needs to compress the multiple ordered SIDs into the message header, so that the message header carries the multiple ordered SIDs. Then, the message header is encapsulated in the outer layer of the message, resulting in a message with an encapsulated header. Therefore, after the head node sends the message with the encapsulated header, because the message header carries multiple ordered SIDs, the message with the encapsulated header can be forwarded hop-by-hop by the multiple ordered nodes indicated by the multiple ordered SIDs, thus realizing the transmission of the message with the encapsulated header according to the aforementioned message transmission path information.

[0100] The structure of a message encapsulated with a header can be found in [reference needed]. Figure 4 The message consists of an outer header, an inner header, and a payload. The inner header is the header carried within the message itself sent by the terminal device to the head node. This inner header includes, but is not limited to, the IPv6 header, the Internet Protocol version 4 (IPv4) header, etc. The payload is the payload carried within the message itself sent by the terminal device to the head node, while the outer header is the header generated by the head node based on the message transmission path information.

[0101] The outer header includes the IPv6 Basic Header and the SRH. Both the IPv6 Basic Header and the inner header include the version (V) field, traffic class (TC) field, flow label (FL) field, payload length (PL) field, next header (NH) field, hop limit (HL) field, source address (SA) field, and DA field. The SRH includes the next header field, header extension length (HEL) field, routing type (RT) field, segments left (SL) field, last entry (LE) field, flags (F) field, tag (T) field, segment list, and optional type lengthvalue (TLV) objects field.

[0102] The SRH segment list includes multiple ordered containers, each 128 bits long, carrying one SID. This allows the segment list to hold these ordered SIDs. The containers are used in reverse order of their original arrangement. For example, in... Figure 4 In the process, the first container used is the container SL[n1] which is arranged at the end, and the last container used is the container SL[0] which is arranged at the beginning. The value of n1 is the total number of containers minus 1.

[0103] However, compressing multiple ordered SIDs into the packet header—that is, carrying multiple ordered SIDs through a segment list—increases the header length, thus increasing the length of the packet encapsulated with the header. This not only requires more transmission resources to transmit this header-encapsulated packet between different nodes but also affects the packet processing efficiency of each node. To address this, related technologies one and two provide solutions to reduce the header length, thereby reducing the processing resources required for transmission and improving packet processing efficiency. These two related technologies will be described in detail below.

[0104] The solution provided by related technology is G-SRv6. In G-SRv6, the head node treats the address block, parameter field, and padding field as redundant information. Among multiple ordered SIDs, the first SID is retained, and this redundant information is removed from each of the other SIDs. The remaining node identifier field and function field are used as the C-SID. Compared to the SID, the C-SID is shorter, allowing a 128-bit container to carry at least two C-SIDs.

[0105] In G-SRv6 technology, the first SID is used first, followed by the C-SIDs within each container. The usage order of different containers is the same as described above, and the usage order of multiple containers is the reverse of their order. Within a single container, the usage order of at least two C-SIDs is the reverse of their order. For example, see... Figure 5 In a container, the first C-SID used is the C-SID arranged in the low bits of the container [n2], and the last C-SID used is the C-SID arranged in the high bits of the container [0]. The value of n2 is the total number of C-SIDs carried by the container minus 1, or the value of n2 is the maximum number of C-SIDs that a container can carry minus 1.

[0106] See also Figure 5 , Figure 5 This diagram illustrates the structure of a header-encapsulated packet generated by the head node using G-SRv6 technology. The first container in the SRH segment list, container SL[n1], carries a 128-bit SID, which is the first of the ordered SIDs mentioned above. This SID includes an address block, node identifier field, function field, and reference field. All other containers carry C-SIDs. After generating the header-encapsulated packet, the head node copies the 128-bit SID from the first container into the DA field and then queries the routing table according to the DA field to send the header-encapsulated packet.

[0107] Or see Figure 6 , Figure 6 This illustrates another structure for a message with a header encapsulated, generated by the header node based on G-SRv6 technology. Compared to... Figure 5 As shown, Figure 6In the scenario shown, the 128-bit SID is no longer located in the first container of the SRH segment list, but directly in the DA field. That is, the DA field carries a 128-bit SID, which includes the address block, node identifier, function, and reference fields. Each container in the SRH segment list carries the C-SID. After generating a packet encapsulated with a header, the head node directly queries the routing table according to the DA field and sends the packet encapsulated with the header.

[0108] It can be seen that, compared to Figure 5 As shown, Figure 6 In the scenario shown, the head node directly places the 128-bit SID in the DA field, thereby reducing the number of containers included in the SRH segment list. In other words, Figure 6 In the case shown, the value of n1 can be less than... Figure 5 The values ​​of n1 in the given situation. It is precisely because... Figure 6 The situation shown can reduce the number of containers, therefore Figure 6 The situation shown belongs to the reduce mode, while Figure 5 The situation shown is a non-reduce mode.

[0109] G-SRv6 also defines a continuation of compression (COC) flavor for use with C-SIDs. The first SID in a sequence of SIDs corresponds to a COC flavor, and all C-SIDs except the last one also have their own COC flavors. For a SID or C-SID with a corresponding COC flavor, the COC flavor indicates that the next C-SID in the segment list corresponding to that COC flavor needs to be updated in the DA field, so that the next C-SID replaces the node identifier and function fields in the DA field. It should be understood that when the DA field carries a 128-bit SID, the next C-SID replaces the node identifier and function fields of that SID; when the DA field carries address blocks, C-SIDs, etc., the next C-SID replaces that C-SID. It can be seen that the COCFlavor indicates a replacement operation.

[0110] A SID or C-SID includes a node identifier field that indicates which node it belongs to. The SID table stored locally on that node records the mapping between index entries and node behaviors. Index entries can be, for example, address blocks, node identifier fields, and function fields. If a SID or C-SID corresponds to a COC Flavor, then the SID table records not only the mapping between index entries and node behaviors but also the mapping between index entries and COC Flavors.

[0111] Accordingly, after receiving a packet encapsulated with a packet header, nodes other than the head node query their locally stored SID table based on the address block, node identifier, and function fields included in the DA field. If a match is found in the SID table, the node behavior corresponding to that index entry can be obtained, or the node behavior and COC Flavor corresponding to that index entry can be obtained. If the node behavior and COC Flavor corresponding to the index entry in the SID table are obtained, it means that the SID or C-SID included in the DA field corresponds to a COC Flavor. The node then needs to determine the next C-SID for the SID or C-SID included in the DA field in the segment list, and replace the node identifier and function fields (C-SID) in the DA field with this next C-SID, effectively obtaining a new packet encapsulated with a packet header. Afterward, this new packet encapsulated with a packet header is forwarded according to the node behavior corresponding to the index entry in the SID table.

[0112] In addition, G-SRv6 defines a two-dimensional pointer for use with COC Flavor and C-SID. The two-dimensional pointer indicates the position of the C-SID in the segment list. It includes an SL field and a SID index (SI) field. The value of the SL field indicates the position of the container containing the C-SID in the segment list, while the value of the SI field indicates the position of the C-SID within the container indicated by the SL field. Figure 6 As shown, the SI field can be located in the lowest few bits of the parameter fields included in the DA field. For example, the SI field can be located in the last 2 or 3 bits of the parameter field. Furthermore, the parameter field can be extended to the last bit of the DA field, thus extending the parameter field to 128 bits. In this case, the SI field, located in the lowest few bits of the parameter field, is also located in the lowest few bits of the DA field. Of course, the SID containing the parameter field has a certain type, and whether the parameter field extends to the last bit of the DA field can be determined according to the format definition of that type of SID in the relevant protocol.

[0113] In the header-encapsulated message sent by the head node, both the SL and SI fields have initial values. The initial value of the SL field equals the total number of containers, and the initial value of the SI field is 0. After receiving the header-encapsulated message, nodes other than the head node can update the values ​​of the SI and SL fields to determine the next C-SID (SID or C-SID) included in the DA field of the segment list. The next C-SID is the C-SID pointed to by the updated SI and SL values. Specifically, if a node receives a message with a SI field value of 0, it initializes the SI field to the maximum number of C-SIDs a container can include minus 1, and decrements the SL field value by 1. Alternatively, if a node receives a message with a non-zero SI field value, it only decrements the SI field value by 1 without updating the SL field value.

[0114] Below, in conjunction with Figure 7 This paper provides a comprehensive explanation of the message processing process based on G-SRv6 technology. Compared to the above... Figure 5 and Figure 6 The message shown, Figure 7 The packets shown omit some fields, displaying only the SA and DA fields in the IPv6 basic header (where B in the DA field indicates an address block), the SL field in the SRH, and the various containers and payloads in the segment list, to ensure... Figure 7 Simplicity. Figure 7 The system comprises 11 nodes, R1 to R11, with R1 being the head node. The first 128-bit SID includes a node identifier field and a function field of 2::1. The middle C-SIDs are 3::1 to 10::1, and the last C-SID is 11:11. Each C-SID is 32 bits. The first 128-bit SID and 3::1 to 10::1 all correspond to COC Flavor, while 11:11 does not correspond to COC Flavor.

[0115] The message received by R1 includes an inner message header ( Figure 7 (Not shown) and payload, R1 uses reduce mode to encapsulate a message header on the outer layer of this message, resulting in a message with an encapsulated message header, i.e. Figure 7The message 701 is shown. In message 701, the DA field includes the first 128 bits of the SID. The segment list in the SRH has three containers, n1=2 as mentioned above. 3::1 to 6::1 are located in container [2], 7::1 to 10::1 are located in container [1], and 11:11 is located in container [0]. Except for 11:11, all other fields in container [0] are padding fields, and the padding fields are set to zero. A container can carry four C-SIDs, n2=3 as mentioned above. 3::1, 7::1 and 11:11 are C-SIDs [3], 4::1 and 8::1 are C-SIDs [2], 5::1 and 9::1 are C-SIDs [1], and 6::1 and 10::1 are C-SIDs [0]. In addition, the value of the SI field is the initial value, SI=0, and the value of the SL field is also the initial value, SL=3. Subsequently, R1 forwards the packet based on the address block in the DA field and the 2::1 routing table lookup, ensuring that R2, indicated by the node identifier field included in 2::1, receives the packet. Figure 7 The message 701 shown is an example of R1 using reduce mode. It should be understood that R1 can also use non-reduce mode according to actual needs.

[0116] After receiving message 701, R2 queries its local SID table based on the address block and 2::1 in the DA field. It finds the index entry in the SID table and obtains the COC Flavor and node behavior corresponding to that index entry. Therefore, R2 determines that the SID carried in the DA field corresponds to a COC Flavor. Since the COC Flavor indicates a replacement operation, R2 needs to replace 2::1 in the DA field with the next C-SID of 2::1.

[0117] Since SI=0 in the message 701 received by R2, R2 initializes the value of the SI field to 3, resulting in SI=3, and decrements the value of the SL field by 1, resulting in SL=3-1=2. Therefore, R2 hits the container [2] based on SL=2 and the C-SID [3] based on SI=3, thus determining the next C-SID as the C-SID [3] in container [2], i.e., 3::1. Next, R2 replaces 2::1 in the DA field with 3::1, resulting in... Figure 7 The message 702 shown above is then forwarded according to the node behavior obtained from the SID table above, so that R3, indicated by the node identifier field included in 3::1, receives message 702.

[0118] After receiving message 702, R3 queries its local SID table to determine that 3::1 in the DA field corresponds to COCFlavor and node behavior. Since SI=3 in the received message, R3 simply decrements the SI field value by 1, resulting in SI=3-1=2, while the SL field value remains unchanged, resulting in SL=2. Therefore, R3 determines the next C-SID to be 4::1, replacing 3::1 in the DA field with 4::1, thus obtaining... Figure 7 The message 703 shown above is then forwarded according to the above node behavior, so that R4, indicated by the node identifier field included in 4::1, receives message 703.

[0119] After receiving message 703, R4 queries its local SID table to determine that 4::1 in the DA field corresponds to COCFlavor and node behavior. R4 calculates SI=2-1=0 and SL=2, thus determining the next C-SID to be 5::1. R4 replaces 4::1 in the DA field with 5::1, obtaining... Figure 7 The message 704 is shown. After that, R4 forwards the message according to the above node behavior, so that R5 receives the message 704.

[0120] The principle of message forwarding from R5 to R10 is the same as above. The messages sent by R5 to R10, which are encapsulated with message headers, are as follows: Figure 7 The messages 705, 706, 707, 708, 709 and 710 shown will not be described in detail here.

[0121] R11 received Figure 7 Following message 710, a query of R11's local SID table determines that 11::11 in the DA field does not correspond to a COC Flavor, but only to a node action. Therefore, R11 directly executes this node action. For example, R11 first decapsulates message 710 to obtain a new message. Decapsulation means deleting the encapsulated message header, or in other words, popping the encapsulated message header. The resulting new message includes the inner message header (…). Figure 7 (Not shown) and payload. Then, R11 forwards the new message according to the DA field in the inner header included in the new message header.

[0122] Thus, a message processing process based on G-SRv6 technology was completed.

[0123] The above explains related technology one. Although related technology one sets a shorter C-SID and provides COC Flavor and two-dimensional pointers to work with the C-SID, achieving a reduction in packet header length, related technology one still has certain technical problems. Specifically, when obtaining a packet with a header according to related technology one, the packet still needs to include a 128-bit SID (located in the DA field in reduce mode and in the SRH field in non-reduce mode). Furthermore, the DA field in related technology one can only carry one node identifier field and one function field, for example, only one C-SID. Therefore, related technology one has low compression efficiency. This compression efficiency can be understood as the efficiency of compressing the C-SID into the packet header. The fewer C-SIDs carried in a packet header of the same length, or the longer the packet header carrying the same number of C-SIDs, the lower the compression efficiency.

[0124] Related Technology 2 provides a solution based on uSID technology. uSID also includes a node identifier field and a function field. For an explanation of the node identifier field and function field, please refer to Related Technology 1 above; it will not be repeated here. In uSID technology, the header node removes the address block, parameter field, and padding field from each of the ordered multiple SIDs included in the message transmission path information, thus obtaining multiple ordered uSIDs.

[0125] See Figure 8 , Figure 8 The diagram illustrates the structure of a packet encapsulated with a header, generated by the header node based on uSID technology. The DA field of the IPv6 basic header includes an address block and at least two uSIDs, where these at least two uSIDs are the first two uSIDs from an ordered set of multiple uSIDs. The other uSIDs from the ordered set of multiple uSIDs, excluding the at least two uSIDs, are located within a 128-bit container included in the segment list. This allows the DA field and each container to carry at least two uSIDs. Furthermore, both the DA field and each container include an address block.

[0126] In uSID technology, the uSIDs carried in the DA field are used first, followed by the uSIDs carried in each container. The usage order of different containers is the same as described above, and the usage order of multiple containers is still the reverse of the order in which they are arranged. For example, see... Figure 8 After using the uSID carried in the DA field, the first container used is the last one, SL[n1], and the last container used is the first one, SL[0]. The value of n1 is the total number of containers minus 1. In the DA field and each container, the order in which at least two uSIDs are used is the same as the order in which the at least two uSIDs are listed. For example... Figure 8As shown, in the DA field and in each container, the first uSID used is the one that is arranged in the high bits and is adjacent to the address block, and the last uSID used is the one that is arranged in the low bits and is furthest from the address block.

[0127] The uSID technology also defines a left-shift operation to work in conjunction with the DA update operation and uSID defined in SRv6. Specifically, after receiving a packet encapsulated with a header, nodes other than the header node shift the uSIDs included in the DA field to the left according to the left-shift operation. Alternatively, they update the entire DA field to the next container in the segment list according to the DA update operation. That is, the DA field is updated with an address block and all uSIDs included in the next container of the DA field.

[0128] After receiving a message encapsulated with a message header, nodes other than the header node can query the locally stored SID table based on the address block included in the DA field and a uSID adjacent to the address block. This SID table records the correspondence between index entries and node behaviors; index entries include, for example, address blocks, node identifier fields, and function fields. If an index entry in the SID table is matched, the corresponding node behavior can be obtained.

[0129] If a node needs to perform a left shift operation, it does so based on a uSID adjacent to the address block. See also Figure 9 For a uSID adjacent to an address block, a left shift operation means shifting all other uSIDs after that adjacent uSID to the left by the length of the adjacent uSID. After the left shift operation, the address block is adjacent to other uSIDs, effectively resulting in a new packet with a header. The node can then forward this new packet with a header, following the node behavior described above, after completing the left shift operation.

[0130] If a node needs to perform a DA update operation, it first determines the next container for the DA field and then updates the DA field to the next container. The uSID technology uses a one-dimensional pointer, namely the SL field mentioned above, whose value indicates the container's position in the segment list. In the header-encapsulated packet generated by the head node, the SL field value is the initial value, equal to the total number of containers. Other nodes, besides the head node, update the SL field value upon receiving the header-encapsulated packet, for example, by decrementing the SL field value by 1, to determine the next container for the DA field. The next container is the one pointed to by the updated SL field value. Then, the node updates the DA field to the next container, that is, updates the DA field with the address block and all uSIDs in the next container, effectively obtaining a new header-encapsulated packet. After completing the DA update operation, the node can then forward the new header-encapsulated packet according to the node behavior described above.

[0131] Below, in conjunction with Figure 10 The process of message processing based on uSID technology is illustrated with an example. Compared to the above... Figure 8 The message shown, Figure 10 The packets shown omit some fields, retaining only the SA and DA fields in the IPv6 basic header, the SL field in the SRH, and the various containers and payloads in the segment list. Furthermore, the DA field and the 'B' in each container represent address blocks to ensure... Figure 10 Simplicity. Figure 10 The system comprises 11 nodes, R1 to R11, with R1 being the head node. The first uSID is 2::1, the middle uSIDs are 3::1 to 10::1, and the last uSID is 11:11. Each uSID is 32 bits.

[0132] The message received by R1 includes an inner message header ( Figure 10 (Not shown) and payload, R1 encapsulates the message header on the outer layer of the message, resulting in a message with the encapsulated header, i.e. Figure 10 The message 1001 is shown. In message 1001, the DA field includes one address block and 2::1 to 4::1. The segment list in the SRH has three containers, and n1=2 as mentioned above. Container [2] includes one address block and 4::1 to 7::1, container [1] includes one address block and 8::1 to 10::1, container [0] includes one address block and 11:11. The right side of 11:11 in container [0] is a padding field, which is set to zero. In addition, the value of the SL field in message 1001 is the initial value, SL=3. Afterwards, R1 queries the routing table based on the address block and 2::1 in the DA field to forward the message, so that R2, indicated by the node identifier field included in 2::1, receives the message. Figure 10The message shown is 1001.

[0133] After receiving message 1001, R2 queries its local SID table based on the address block in the DA field and 2::1. It finds the index entry in the SID table, obtains the node behavior corresponding to the index entry, and shifts 3::1 and 4::1 to the left. Figure 10 The message 1002 is shown. Afterwards, R2 forwards the message according to the above node behavior, so that R3, indicated by the node identifier field included in 3::1, receives message 1002.

[0134] After receiving message 1002, R3 queries its local SID table based on the address block in the DA field and 3::1, obtains the node behavior corresponding to the matched index entry, and shifts 4::1 to the left to obtain... Figure 10 The message 1003 is shown. Afterwards, R3 forwards the message according to the above node behavior, so that R4, indicated by the node identifier field included in 4::1, receives message 1003.

[0135] After receiving message 1003, R4 queries its local SID table based on the address block and 4::1 in the DA field to obtain the node behavior corresponding to the hit index entry, and decrements the value of the SL field by 1, resulting in SL=3-1=2. R4 hits the container [2] based on SL=2, thus determining that the next container in the DA field is the container [2]. Next, R4 updates the DA field as a whole to the address block and 4::1 to 7::1 included in the container [2], obtaining Figure 10 The message 1004 is shown. Then, the message is forwarded according to the node behavior described above, so that R5, indicated by the node identifier field included in 5::1, receives message 1004.

[0136] The principle of message forwarding from R5 to R10 is the same as above. The messages sent by R5 to R10, which are encapsulated with message headers, are as follows: Figure 10 The messages 1005, 1006, 1007, 1008, 1009 and 1010 shown in the image will not be described in detail here.

[0137] After receiving message 1010, R11 queries its local SID table to determine the node behavior corresponding to 11::11 in the DA field. Therefore, R11 directly executes this node behavior. For example, R11 first decapsulates message 1010 to obtain a new message. Decapsulation means deleting the encapsulated message header, or popping the encapsulated message header. The resulting new message includes the inner message header (…). Figure 10 (Not shown) and payload. Then, R11 forwards the new message according to the DA field in the inner header included in the new message header.

[0138] Thus, a message processing process based on uSID technology was completed.

[0139] The above explains related technology two. Although related technology two uses a shorter uSID and provides a left shift operation in conjunction with the DA update operation and uSID to reduce the packet header length, it still has certain technical problems. Specifically, because each container in the segment list carries an address block, and this address block occupies a certain number of bits within the container, the number of uSIDs that each container can carry is relatively small, resulting in lower compression efficiency. This compression efficiency can be understood as the efficiency of compressing uSIDs into the packet header. The fewer uSIDs carried in a packet header of the same length, or the longer the packet header carrying the same number of uSIDs, the lower the compression efficiency.

[0140] This application provides a message processing method that addresses the technical problems existing in related technologies one and two. Specifically, this method can be applied to a first node, which can be... Figure 1 or Figure 2 The nodes in the implementation environment shown are excluding the destination node. For example... Figure 11 As shown, the method includes the following steps 1101 to 1104.

[0141] Step 1101: The first node receives a first message. The first message includes a DA field and an SRH. The DA field includes at least one C-SID arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node.

[0142] The first message is a message encapsulated with a header. This header includes an outer header, an inner header, and a payload. The outer header is generated and encapsulated by the head node based on the message transmission path information issued by the controller. The DA field and SRH field included in the first message are both located in the outer header. In an exemplary embodiment, the first message also includes an IPv6 header, which includes the DA field. That is, the outer header includes both the IPv6 header and the SRH header, with the DA field located in the IPv6 header. The IPv6 header including the DA field is the basic IPv6 header, while the SRH is an IPv6 extended header.

[0143] For example, see Figure 12 , Figure 12An exemplary structure of the first message is shown. The DA field includes at least one C-SID arranged in an ordered manner. Exemplarily, each C-SID provided in this embodiment may include at least one of a node identifier field and a function field. Exemplarily, when a C-SID includes only a node identifier field, or only a function field, the length of the C-SID is 16 bits. Exemplarily, when a C-SID includes both a node identifier field and a function field, the length of the C-SID is 32 bits.

[0144] For example, such as Figure 12 As shown, in addition to including at least one ordered C-SID, the DA field may also include an address block preceding the at least one C-SID. Exemplarily, the sum of the length of the address block and the length of the at least one C-SID is less than or equal to the length of the DA field. In some embodiments, when the sum of the length of the address block and the length of the at least one C-SID is less than the length of the DA field, it indicates that the DA field is not filled by the address block and C-SIDs, and the unfilled bits can be used as a parameter field and set to zero. In this embodiment... Figure 12 The bits represented by the ellipses in the DA field shown can be all 0, or a combination of one or more C-SIDs and another set of 0. In other implementations, the DA field is considered full when the length of the address block and at least one C-SID is equal to the length of the DA field. This implementation... Figure 12 The bits represented by the ellipses in the DA field shown are all one or more C-SIDs.

[0145] See also Figure 12 The SRH segment list includes at least one container, meaning a container is included in the SRH, and each container is 128 bits long. In some implementations, when the SRH segment list includes only one container, this container is used to carry the second C-SID. This container may only include the second C-SID, or it may include the second C-SID and other C-SIDs. For ease of understanding, the second C-SID will be described in step 1104 below, and will not be repeated here. In other implementations, when the SRH segment list includes at least two containers, one of which is used to carry the second C-SID, while the other containers may be used to carry other C-SIDs, or they may be used to carry 128-bit SIDs. When the SRH segment list contains a container for carrying a 128-bit SID, it indicates that the SRH also includes at least one 128-bit SID.

[0146] Since nodes within the same SRv6 domain share the same address block, they carry at least one C-SID DA field and a container for carrying other C-SIDs. This allows the transmission of the first message within the same SRv6 domain to be guided, meaning nodes within the same SRv6 domain can forward the first message hop-by-hop based on these C-SIDs. The container carrying the 128-bit SID can guide the transmission of the first message not only within the same SRv6 domain but also outside of it. For example, "outside of the SRv6 domain" could refer to two different SRv6 domains. Through the combination of C-SID and SID, the transmission of the first message can be guided in cross-SRv6 domain scenarios, ensuring that the first message is transmitted according to the specified transmission path in different SRv6 domains. Therefore, by including at least one 128-bit SID in the SRH, the flexibility of transmitting the first message can be improved.

[0147] In the DA field, any one of the ordered C-SIDs can correspond to a processing feature that indicates a move operation or a replacement operation.

[0148] In some implementations, the processing feature is a flavor corresponding to a node behavior. Since the processing feature indicates a move (next) operation or a replace (COC) operation, in this implementation, the processing feature can be a NEXT & COC flavor. That is, C-SID corresponds to both a node behavior and a NEXT & COC flavor.

[0149] In this implementation, node behavior indicates the packet forwarding method, such as querying the routing table for packet forwarding, or forwarding packets through the link corresponding to a specified interface. NEXT & COC Flavor indicate a move or replacement operation. Furthermore, in this implementation, the C-SID is not a new type of C-SID because the node behavior is the same as that of existing types of C-SIDs. For example, querying the routing table for packet forwarding is the node behavior for an existing End SID type C-SID, while forwarding packets through the link corresponding to a specified interface is the node behavior for an existing End.XSID type C-SID.

[0150] Alternatively, in some implementations, the processing feature is the node behavior, and the node behavior corresponding to the C-SID is sufficient. This node behavior is used to indicate both the packet forwarding method and the move or replacement operation. Since this node behavior is different from the node behaviors corresponding to existing types of C-SIDs, in this implementation, the C-SID belongs to a new type of C-SID.

[0151] At least one C-SID includes a first C-SID corresponding to the first node. For ease of reference, the processing feature corresponding to the first C-SID is referred to as the first processing feature below. Since the DA field includes at least one C-SID, after receiving the first message, the first node needs to determine which of the at least one C-SIDs is the C-SID it needs to use itself, i.e., the first C-SID, and also needs to determine whether the first C-SID corresponds to a first processing feature indicating a move or replacement operation. Therefore, in an exemplary embodiment, the first node stores a SID table, which records the correspondence between C-SIDs and processing features. The method further includes: the first node querying the SID table based on at least one C-SID; in response to any C-SID matching a C-SID recorded in the SID table, the first node determines that any C-SID is the first C-SID, and determines the processing feature corresponding to the matched C-SID as the first processing feature.

[0152] Specifically, the C-SID recorded in the SID table locally stored by the first node is the first C-SID corresponding to the first node. The SID table also records the processing characteristics corresponding to the first C-SID, i.e., the first processing characteristics. Therefore, if any C-SID in at least one of the C-SIDs in the DA field matches a C-SID recorded in the SID table, it can be said that any C-SID is the first C-SID. Thus, the first node can determine that any C-SID is the first C-SID, and the first node can use the processing characteristics corresponding to the matched C-SID as the first processing characteristics.

[0153] For example, the SID table records C-SIDs in the form of index entries, each index entry including a combination of an address block and a C-SID. Accordingly, after receiving the first message, the first node queries its SID table based on the address block included in the DA field and a specified C-SID from at least one C-SID included in the DA field. If an index entry recorded in the SID table is matched, it indicates that the specified C-SID is the first C-SID corresponding to the first node. Furthermore, when the processing feature is a feature corresponding to a node behavior, the SID table records the correspondence between index entries, node behavior, and features. Alternatively, when the processing feature is a node behavior, the SID table records the correspondence between index entries and node behavior. Thus, after matching an index entry recorded in the SID table, the first node can use the processing feature corresponding to the index entry as the first processing feature.

[0154] In some implementations, the designated C-SID is a C-SID in the DA field that is adjacent to the address block. The order in which at least one C-SID in the DA field is used is the sorting order; that is, C-SIDs closer to the address block are used first, and C-SIDs farther from the address block are used last. For example, the first node can use longest mask matching to lock the address block and the designated C-SID. Longest mask matching involves first querying the SID table using all 128 bits of the DA field. If no index entry is found, the table is continuously reduced based on 128 bits until the address block and a C-SID adjacent to it are reached. This allows the index entry to be found based on the address block and the adjacent C-SID, and the C-SID adjacent to the address block is then used as the first C-SID corresponding to the first node.

[0155] In other implementations, the designated C-SID is the C-SID in the DA field that is furthest from the address block. In this case, the order of use of at least one C-SID in the DA field is the reverse of the sorted order; that is, C-SIDs farther from the address block are used first, and C-SIDs closer to the address block are used last. In this implementation, the first node can first determine the C-SID furthest from the address block, and then query the first node's SID table based on the address block and the determined C-SID to match the index entry in the SID table, thereby allowing the C-SID furthest from the address block to be used as the first C-SID.

[0156] In some implementations, the first C-SID includes a node identifier field, and the next C-SID includes a function field, corresponding to the first node. The first C-SID including the node identifier field can be either solely the node identifier field or include both the node identifier field and the function field. Since both the first C-SID and the next C-SID correspond to the first node, the first node will use the first C-SID first, and then execute the next C-SID. When the first processing feature is a feature corresponding to a node behavior, the first node first executes the node behavior and the first processing feature corresponding to the first C-SID, and then executes the node behavior and processing feature corresponding to the next C-SID. Alternatively, when the first processing feature is a node behavior, the first node first executes the first processing feature corresponding to the first C-SID, and then executes the processing feature corresponding to the next C-SID.

[0157] For example, the next C-SID can be located in the DA field along with the first C-SID, or it can be located in the SRH field. There is no limitation on the position of the next C-SID.

[0158] In other embodiments, the first C-SID includes a functional field, and the next C-SID of the first C-SID corresponds to a downstream node of the first node in the forwarding path of the first message, which is also the message transmission path described above. The first C-SID including a functional field may only include the functional field. Alternatively, the first C-SID may include both the functional field and a node identifier field, meaning that the first C-SID includes a node identifier field in addition to the functional field. Regardless of the fields included in the first C-SID, the first node will execute the node behavior and the first processing feature corresponding to the first C-SID when the first processing feature is a feature corresponding to node behavior, or the first node will execute the first processing feature corresponding to the first C-SID when the first processing feature is a node behavior.

[0159] For example, the length of the first C-SID can be either 16 bits or 32 bits. For instance, when the first C-SID includes only the node identifier field, or when the first C-SID includes only the function field, the length of the first C-SID is 16 bits. As another example, when the first C-SID includes both the node identifier field and the function field, the length of the first C-SID is 32 bits.

[0160] For example, when the first node receives the first message via a strict path, the first C-SID may only include the function field. A strict path means that the node preceding the first node can determine that the next node is the first node, so the node preceding the first node can directly send the first message to the first node without relying on the node identifier field used to indicate the first C-SID to route the first message to the first node. Therefore, the first C-SID may not include the node identifier field and only include the function field. For example, when the first node receives the first message via a loose path, the first C-SID cannot only include the function field and must include the node identifier field. A loose path means that the node preceding the first node cannot determine that the next node is the first node, so the node preceding the first node needs to rely on the node identifier field used to indicate the first C-SID to route the first message to the first node, and therefore the first C-SID needs to carry the node identifier field.

[0161] Step 1102: Based on whether there are other C-SIDs after the first C-SID, the first node determines whether the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation.

[0162] In step 1101, the first node has determined the first C-SID by querying its local SID table and has also determined the first processing feature corresponding to the first C-SID. This first processing feature indicates a move operation or a replacement operation. Therefore, the first node needs to further determine whether the first processing feature indicates a move operation or a replacement operation based on whether other C-SIDs follow the first C-SID. In this embodiment, the length of other C-SIDs is not limited. The length of other C-SIDs can be 16 bits, 32 bits, or other lengths less than 128 bits. When the lengths of the first C-SID and other C-SIDs are different, mixed compression of C-SIDs of different lengths is implemented in the first message.

[0163] In an exemplary embodiment, the first node determines whether the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation based on whether there are other C-SIDs after the first C-SID. This includes: if the first node determines that the first processing feature indicates a move operation based on whether there are other C-SIDs after the first C-SID, then the first node can continue to execute step 1103; if the first node determines that the first processing feature indicates a replacement operation based on whether there are other C-SIDs after the first C-SID, then the first node can continue to execute step 1104.

[0164] For example, the first node can determine whether other C-SIDs are included after the first C-SID by determining whether a specified length of bits following the first C-SID is zero. If the specified length of bits is zero, it indicates that no other C-SIDs are included after the first C-SID; if the specified length of bits is zero, it indicates that no other C-SIDs are included after the first C-SID. This application does not limit the specified length. For example, the specified length can be the same as the length of the first C-SID; for instance, if the first C-SID is 16 bits, then the specified length is also 16 bits; if the first C-SID is 32 bits, then the specified length is also 32 bits. Alternatively, the specified length can be other fixed lengths set based on experience or actual needs, such as a fixed 32 bits, 64 bits, etc.

[0165] Step 1103: When the first processing feature indicates a move operation, the first node moves the target field so that the target field covers the first C-SID in the DA field. The target field is the field in the DA field that is located after the first C-SID.

[0166] In some implementations, the first C-SID is a C-SID in the DA field that is adjacent to the address block; see [link to relevant documentation]. Figure 13 and Figure 14 The first node can move the target field by shifting the target field to the left by the length of the first C-SID, so that the target field covers the first C-SID.

[0167] For example, see Figure 13 The length of the target field is the difference between the length of the DA field and the target length, where the target length is the sum of the address block length and the length of the first C-SID. The target field may include only the C-SID, or it may include the C-SID and bits that are set to zero. For example, after the first node moves the target field, the method further includes: the first node setting the field in the DA field that follows the moved target field to zero. Figure 13 The field in the DA field that follows the target field after the move is shown.

[0168] Or see Figure 14 The length of the target field is the difference between the length of the DA field and the target length. The target length is the sum of the address block length, the length of the first C-SID, and the length of the zeroed bits in the DA field. This target field includes only the C-SID and excludes the zeroed bits. For example, after the first node moves the target field, the method further includes: the first node setting the fields in the DA field that follow the moved target field to zero. Figure 14It can be seen that the field in the DA field located between the shifted target field refers to the field between the shifted target field and the bit that is set to zero.

[0169] In other implementations, the first C-SID is the C-SID in the DA field that is furthest from the address block; see [link to relevant documentation]. Figure 15 The first node moves the target field, which can be done by shifting the target field to the right by the length of the first C-SID, so that the target field covers the first C-SID. For example, after the first node moves the target field, the method further includes: the first node sets the fields in the DA field that follow the moved target field to zero. Figure 15 As can be seen, the field in the DA field that follows the target field after the move refers to the field between the address block and the target field after the move.

[0170] Step 1104: When the first processing feature indicates a replacement operation, the first node replaces the first C-SID in the DA field with the second C-SID, where the second C-SID is a C-SID in the SRH.

[0171] The first node needs to first determine a second C-SID in the SRH, and then replace the first C-SID in the DA field with this second C-SID. For example, the first message also includes a first pointer and a second pointer, where the first pointer is the SI field and the second pointer is the SL field. See also... Figure 12 , Figure 12 This shows the case where the SI field is located within the DA field and the SL field is located within the SRH field. (Except for...) Figure 12 Besides the cases shown, the SI field can also be located in the flag field, tag field, etc., within the SRH; the position of the SI field in the first message is not limited here. Accordingly, based on the first pointer and the second pointer, the first node can determine the second C-SID through the following two implementation methods.

[0172] In some implementations, before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: the first node updating the values ​​of a first pointer and a second pointer such that the value of the first pointer indicates the position of the second C-SID in the container where the second C-SID is located, and the value of the second pointer indicates the position of the container where the second C-SID is located in the SRH; the first node determining the second C-SID based on the values ​​of the first pointer and the second pointer.

[0173] The first node can update the values ​​of both the first pointer and the second pointer when the value of the first pointer is zero (i.e., the value of the SI field is zero). For example, updating the value of the first pointer includes determining that its value is N-1, where N is the maximum number of C-SIDs in the container. Updating the value of the second pointer includes decrementing its value by 1, i.e., decrementing the value of the SL field by 1.

[0174] The reason is that when the SI field value is zero, it means that the last C-SID in the current container (the container that the second pointer points to before the value is updated) has already been used. The next C-SID to be used is the first C-SID in the next container. Therefore, the first node needs to decrement the SL value by 1, so that the updated SL field value points to the next container, that is, so that the SL field value indicates the position of the container containing the second C-SID in the SRH. Furthermore, the first node also needs to set the SI value to N-1, so that the updated SI value points to the first C-SID, that is, so that the SI field value indicates the position of the second C-SID in the container containing the second C-SID. Thus, the first node can determine the second C-SID based on the updated first pointer value and the updated second pointer value. The process of determining the first pointer value to N-1 is also called initializing the SI field value.

[0175] In other implementations, before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: the first node updating the value of a first pointer such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located; the first node determining the second C-SID based on the value of the first pointer and the value of the second pointer, the value of the second pointer indicating the location of the container where the second C-SID is located in the SRH.

[0176] In this scenario, the first node can update only the value of the first pointer without updating the value of the second pointer, provided that both the value of the first pointer and the value of the second pointer are not zero (i.e., both the values ​​of the SI and SL fields are not zero). For example, updating the value of the first pointer includes decrementing its value by 1.

[0177] The reason is that when both the SI and SL fields are non-zero, it indicates that there are still unused C-SIDs in the current container (the container pointed to by the second pointer before it was updated). Therefore, the next C-SID to be used is the next C-SID in the current container. Thus, the first node does not need to update the SL field; the unupdated SL field value is sufficient to indicate the position of the container containing the second C-SID within the SRH. Instead, the first node needs to decrement the SI field value by 1, making the updated SI field value point to the next C-SID, thus indicating the position of the second C-SID within its container. Therefore, the first node can determine the second C-SID based on the updated first pointer value and the unupdated second pointer value.

[0178] After determining the second C-SID, the first node can replace the first C-SID in the DA field with the second C-SID. That is, the first node replaces the first C-SID in the DA field with the second C-SID, so that the DA field includes the address block and the second C-SID.

[0179] As can be seen from step 1102, this embodiment of the application performs the replacement operation when no other C-SIDs are included after the first C-SID. For example, in this case, the DA field includes an address block, the first C-SID, and some bits that are already set to zero. During the replacement operation, if the length of the second C-SID is equal to the length of the first C-SID, then the replacement can be performed directly.

[0180] Alternatively, if the length of the second C-SID is less than the length of the first C-SID, then after replacing the first C-SID with the second C-SID, the first node also needs to set the bits that the first C-SID can cover but the second C-SID cannot cover to zero. For example, the DA field includes a 32-bit address block (bits 0-31), a 32-bit first C-SID (bits 32-63), and 64 bits set to zero (bits 64-127). If the length of the second C-SID is 16 bits, then bits 48-63 in the DA field are the bits that the first C-SID can cover but the second C-SID cannot cover, and these bits need to be set to zero.

[0181] Alternatively, if the length of the second C-SID is greater than the length of the first C-SID, then the second C-SID will not only cover the first C-SID but also cover a portion of the bits that are already set to zero. For example, the DA field includes a 32-bit address block (bits 0-31), a 16-bit first C-SID (bits 32-47), and 80 bits set to zero (bits 48-127). If the length of the second C-SID is 32 bits, then the second C-SID will not only cover the bits covered by the first C-SID but will also cover bits 48-63 in the DA field, thus reducing the number of bits set to zero from 48-127 bits to 64-127 bits.

[0182] After the first node executes step 1103 or step 1104, in an exemplary embodiment, the method further includes: the first node sending the message obtained after performing a move operation or a replacement operation. Compared to the first message received by the first node, since the first node performed a move operation or a replacement operation on the first message, a new message can be obtained, and the DA field of this new message is different from the DA field of the first message. Furthermore, as described in step 1101, the first node can obtain a certain message forwarding method by querying the SID table; therefore, the first node can send the new message obtained after performing the move operation or the replacement operation based on the DA field and according to the message forwarding method.

[0183] For example, steps 1101 to 1104 above are described assuming the first message includes both the DA and SRH fields. For example, the first message may also include only the DA field, which is located in the IPv6 basic header. The structure of the first message can be found in [reference needed]. Figure 16 The DA field of the first message includes at least one C-SID arranged in an ordered manner. Each of the at least one C-SID, except for the last C-SID, can correspond to a processing feature indicating a move operation or a replacement operation. In addition, the at least one C-SID includes a first C-SID corresponding to the first node.

[0184] In other words, the embodiments of this application can be implemented when the number of C-SIDs is large, that is, when the number of tag stack layers is large, according to... Figure 12 The structure shown compresses a large number of C-SIDs into the DA field and the SRH field respectively. This embodiment can also be used when the number of C-SIDs is small, i.e., when the number of tag stack layers is small, according to... Figure 16 The structure shown compresses fewer C-SIDs into the DA field, thus eliminating the need for the SRH field.

[0185] Received at the first node Figure 16 Following the message shown, it is also necessary to first determine the first C-SID and the first processing feature corresponding to the first C-SID according to the description in step 1101, and then determine whether the first processing feature indicates a move operation or a replacement operation according to the description in step 1102. However, the first node will determine that the first processing feature indicates a move operation, but will not determine that the first processing feature indicates a replacement operation. Therefore, the first node will only execute the move operation according to the description in step 1103, and the move operation will not be described in detail here.

[0186] The above, combined with Figures 11 to 16 The message processing method applied to the first node, provided in the embodiments of this application, has been described. For example, this method can be represented as the following pseudocode.

[0187] if NEXT&COC == TRUE: The first processing feature corresponding to the first C-SID is NEXT&COC Flavor if DA[Block+NF..Block+2NF-1] != 0 / / If the bits of the specified length following the first C-SID are non-zero, that is, if the DA field also includes other C-SIDs following the first C-SID. DA[Block.. 127-NF] = DA[Block+NF.. 127] / / Shift the target field in the DA field after the first C-SID to the left by the length of the first C-SID, so that the target field covers the first C-SID. DA[127-NF..127] = 0 / / Set the field in DA that follows the target field after the move to zero. forward else: / / If the specified number of bits following the first C-SID is zero, that is, the DA field does not include other C-SIDs following the first C-SID. if SI>0: If the value of the SI field is greater than zero SI--; / / Decrement the value of the SI field by 1; no need to update the value of the SL field. DA[Block..Block+NF-1] = SRH[SL][SI] / / Replace the first C-SID with the value of the SI field and the second C-SID pointed to by the value of the SL field, which is located in SRH. else: / / If the value of the SI field is equal to zero if SL>0: / / If the value of the SL field is greater than zero SL--; / / Decrement the value of the SL field by 1 SI = 128 / NF -1 / / Initialize the value of the SI field, that is, update the value of the SI field to the maximum number of C-SIDs in the container (i.e., 128 / NF) minus 1. DA[Block..Block+NF-1] = SRH[SL][SI] / / Replace the first C-SID with the value of the SI field and the second C-SID pointed to by the value of the SL field, which is located in SRH. else: / / If the value of the SL field is equal to zero upper layer processing / / Perform upper layer processing forward Compared to related technology one, the embodiments of this application do not require the first message to carry a 128-bit SID, and the DA field can carry at least one C-SID. Therefore, the method provided by the embodiments of this application improves the compression efficiency of C-SID, reduces the length of the first message, thereby occupying less transmission resources and improving the processing efficiency of the first message.

[0188] Compared to related technology 2, in the same SRv6 domain (i.e., the SRv6 domain where the first node is located), the first packet only needs to carry one address block corresponding to the first C-SID in the DA field, while each container included in the SRH does not need to carry an address block corresponding to the first C-SID. However, in different SRv6 domains, the containers included in the SRH can carry address blocks corresponding to other SRv6 domains, which are SRv6 domains outside the SRv6 domain where the first node is located. For example, one other SRv6 domain corresponds to one or more containers, and one of the containers can carry the address block corresponding to that other SRv6 domain. It can be seen that regardless of whether they are in the same SRv6 domain, the SRH can omit the address block corresponding to the first C-SID, thus each container can carry more C-SIDs. This improves the compression efficiency of C-SIDs, reduces the length of the first packet, thereby occupying less transmission resources and improving the processing efficiency of the first packet. Furthermore, when this application embodiment determines that a replacement operation needs to be performed, it replaces the first C-SID in the DA field with a second C-SID in the SRH, without replacing the entire 128-bit DA field with the entire 128-bit container. Therefore, the replacement operation provided by this application embodiment is more flexible and more efficient.

[0189] In summary, the message processing method applied to the first node provided in this application embodiment can flexibly process messages, and because the first message processed has high compression efficiency for C-SID, the message processing efficiency of the first node in processing the first message is also high.

[0190] This application also provides another message processing method, which can be applied to a second node, wherein the second node can be... Figure 1 or Figure 2 The head node in the implementation environment shown. For example... Figure 17 As shown, the method includes the following steps 1701 to 1703.

[0191] Step 1701: The second node receives the second message.

[0192] The second node can receive a second message from the terminal device, which may include... Figure 12 or Figure 16 The inner message header and payload are shown.

[0193] Step 1702: The second node obtains the first message based on the second message. The first message includes a DA field and an SRH. The DA field includes at least one C-SID arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node.

[0194] The second node can generate a message header based on the message transmission path information issued by the controller, and encapsulate the message header in the outer layer of the second message to obtain... Figure 12 or Figure 16 The first message shown.

[0195] In an exemplary embodiment, the first message further includes a first pointer, i.e., an SI field. Before the second node sends the first message to the first node, the method further includes: the second node sets the value of the first pointer to zero. The value of the first pointer is used by the first node to update, such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located.

[0196] For example, when the SI field is located in a field other than the DA field in the SRH, such as a flag field or a tag field, the second node reserves space for the SI field and initializes its value to zero. Alternatively, when the SI field is located within the DA field, for example, in the last two bits of the parameter field within the DA field, the second node may not reserve space for the SI field or initialize it. This allows the DA field to be filled with address blocks and multiple C-SIDs, increasing the number of C-SIDs that the DA field can carry.

[0197] In an exemplary embodiment, the first message further includes a second pointer, namely the SL field. Before the second node sends the first message to the first node, the method further includes: the second node sets the value of the second pointer to an initial value, the initial value being the number of containers included in the SRH. The value of the second pointer is used by the first node to update, such that the value of the second pointer indicates the location of the container where the second C-SID is located in the SRH.

[0198] Step 1703: The second node sends the first message to the first node.

[0199] The second node can send the first message to the first node through a loose path or a strict path. For details on loose paths and strict paths, please refer to the explanation in step 1101 above, which will not be repeated here.

[0200] In summary, the message processing method for the second node provided in this application embodiment can improve the compression efficiency of C-SID, facilitate the first node to process messages flexibly, and improve message processing efficiency.

[0201] Furthermore, embodiments of this application also provide a message processing method, which can be implemented through the interaction between a first node and a second node. For example... Figure 18 As shown, the method includes steps 1801 to 1807.

[0202] Step 1801: The second node receives the second message. Step 1801 can be found in the description of step 1701 above.

[0203] Step 1802: The second node obtains the first message based on the second message. The first message includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move or replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. Step 1802 can be referred to the descriptions in steps 1101 and 1702 above.

[0204] Step 1803: The second node sends the first message to the first node. Step 1803 can be found in the description of step 1703 above.

[0205] Step 1804: The first node receives the first message. Step 1804 can be found in the description of step 1101 above.

[0206] Step 1805: Based on whether there are other C-SIDs after the first C-SID, the first node determines whether the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation. Step 1804 can be found in the description of step 1102 above.

[0207] Step 1806: When the first processing feature indicates a move operation, the first node moves the target field so that the target field covers the first C-SID in the DA field. The target field is the field in the DA field that is located after the first C-SID. Step 1806 can be referred to the description in step 1103 above.

[0208] Step 1807: When the first processing feature indicates a replacement operation, the first node replaces the first C-SID in the DA field with the second C-SID, where the second C-SID is a C-SID in the SRH. Step 1806 can be found in the description of step 1104 above.

[0209] in addition, Figure 18 The technical effects of the message processing method shown can be found in [reference needed]. Figure 11 and Figure 17 The technical effects of the message processing method shown will not be elaborated here.

[0210] The above describes message processing methods applied to the first node, the second node, and the interaction between the first and second nodes. Next, two different application scenarios will be used to illustrate the methods provided in this application.

[0211] Scenario 1, see Figure 19 Scenario 1 involves a hybrid compression of 16-bit and 32-bit C-SIDs, and the message in Scenario 1 includes the DA field and SRH. Compared to the above... Figure 12 The message shown, Figure 19 Some fields have been omitted from the various messages shown to ensure... Figure 19 Simplicity.

[0212] exist Figure 19 The C-SID includes nodes R1 to R14, with R1 being the head node. The paths between R2 and R5 are loose paths, as are those between R8 and R10. All other paths are strict paths. F2 to F13 represent C-SIDs corresponding to the NEXT & COC Flavor, while VPN represents C-SIDs without the NEXT & COC Flavor. A single F indicates a C-SID containing only the node identifier field, a single N indicates a C-SID containing only the function field, and N+F indicates a C-SID containing both the node identifier and function fields. Therefore, N5+F5 is a 32-bit C-SID, while the remaining C-SIDs are 16-bit.

[0213] The message received by R1 includes an inner message header ( Figure 19 (Not shown) and payload, R1 generates and encapsulates the message header, resulting in Figure 19 The message 1901 shown has SL=1 and no SI field. R1 then sends message 1901 to R2 via a strict path based on the address block and F2.

[0214] R2 receives message 1901 via a strict path. Based on the address block and F2, it queries its local SID table to determine that F2 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F2. Since there are other C-SIDs following F2, namely N5+F5 to F7, R2 determines that the NEXT&COC Flavor indicates a move operation. Therefore, R2 shifts N5+F5 to F7 in the DA field 16 bits to the left and sets the fields after F7 in the DA field to zero, obtaining... Figure 19 The message 1902 shown has SL=1 and SI=0. Afterwards, R2 forwards message 1902 via a loose path based on the address block and N5+F5, according to the node behavior corresponding to F2.

[0215] R3 receives packet 1902 via a loose path. It queries its local SID table based on the address block and N5+F5, but fails to find a match. Therefore, R3 queries its routing table based on the address block and N5+F5 and forwards packet 1902 via the loose path.

[0216] R4 receives packet 1902 via a loose path. It queries its local SID table based on the address block and N5+F5, but fails to find a match. Therefore, R4 queries its routing table based on the address block and N5+F5 and forwards packet 1902 via the loose path.

[0217] R5 receives message 1902 via a loose path. Based on the address block and N5+F5, it queries its local SID table to determine that N5+F5 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to N5+F5. Since there are other C-SIDs after N5+F5, namely F6 and F7, R5 determines that the NEXT&COC Flavor indicates a move operation. Therefore, R5 shifts F6 and F7 in the DA field to the left by 32 bits and sets the fields after F7 in the DA field to zero, obtaining... Figure 19 The message 1905 shown has SL=1 and SI=0. Afterwards, R5, based on the address block and F6, sends message 1905 to R6 via a strict path, following the node behavior corresponding to N5+F5.

[0218] R6 receives message 1905 via a strict path. Based on the address block and F6, it queries its local SID table to determine that F6 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F6. Since there is another C-SID following F6, namely F7, R6 determines that the NEXT&COC Flavor indicates a move operation. Therefore, R6 shifts F7 in the DA field 16 bits to the left and sets the fields after F7 in the DA field to zero, obtaining... Figure 19 The message 1906 shown has SL=1 and SI=0. Afterwards, R6, based on the address block and F7, sends message 1906 to R7 via a strict path, following the node behavior corresponding to F6.

[0219] R7 receives message 1906 via a strict path. Based on the address block and F7, it queries its local SID table to determine that F7 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F7. Since there are no other C-SIDs after F7, R7 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=0, and the maximum number of C-SIDs in the container is 8, R7 updates the values ​​of the SI and SL fields, resulting in an initial SI=7 and SL=1-1=0. Since SL=0 and SI=7 point to F8 in the SRH, R7 replaces F7 in the DA field with F8, obtaining... Figure 19 The message 1907 shown has SL=0 and SI=7. Based on the address block and F8, R7 sends message 1907 to R8 via a strict path, according to the node behavior corresponding to F7.

[0220] R8 receives message 1907 via a strict path. Based on the address block and F8, it queries its local SID table to determine that F8 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F8. Since there are no other C-SIDs after F8, R8 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=7 > 0, R8 calculates SI=7-1=6, while SL=0 remains unchanged. Since SL=0 and SI=6 point to N10 in the SRH, R8 replaces F8 in the DA field with N10, obtaining... Figure 19 The message 1908 shown has SL=0 and SI=6. Afterwards, R8 forwards message 1908 via a loose path based on the address block and N10, following the node behavior corresponding to F8.

[0221] R9 receives packet 1908 via a loose path. It queries its local SID table based on the address block and N10, but fails to find a match. Therefore, R9 queries its routing table based on the address block and N10 and forwards packet 1908 via the loose path.

[0222] R10 receives message 1908 via a loose path. Based on the address block and N10, it queries its local SID table to determine that N10 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to N10. Since there are no other C-SIDs after N10, R10 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=6 > 0, R10 calculates SI=6-1=5, while SL=0 remains unchanged. Since SL=0 and SI=5 point to F10 in the SRH, R10 replaces N10 in the DA field with F10, obtaining... Figure 19 The message 1910-1 shown has SL=0 and SI=6. Afterwards, R10, based on the address block and F10, continues to query its local SID table according to the node behavior corresponding to N10.

[0223] R10 queries its local SID table based on the address block and F10 to determine that F10 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F10. Since there are no other C-SIDs after F10, R10 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=5 > 0, R10 calculates SI=5-1=4, while SL=0 remains unchanged. Since SL=0 and SI=4 point to F11 in the SRH, R10 replaces F10 in the DA field with F11, obtaining... Figure 19 The message 1910-2 shown has SL=0 and SI=4. Afterwards, R10, based on the address block and F11, sends message 1910-2 to R11 via a strict path, according to the node behavior corresponding to F10.

[0224] R11 receives message 1910-2 via a strict path. Based on the address block and F11, it queries its local SID table to determine that F11 corresponds to a NEXT&COC Flavor and obtains the node behavior corresponding to F11. Since there are no other C-SIDs after F11, R11 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=4>0, R11 calculates SI=4-1=3, while SL=0 remains unchanged. Since SL=0 and SI=3 point to F12 in the SRH, R11 replaces F11 in the DA field with F12, obtaining... Figure 19 The message 1911 shown has SL=0 and SI=3. Afterwards, R11, based on the address block and F12, sends message 1911 to R12 via a strict path, according to the node behavior corresponding to F11.

[0225] R12 receives message 1911 via a strict path. Based on the address block and F12, it queries its local SID table to determine that F12 corresponds to a NEXT&COC Flavor and obtains the node behavior corresponding to F12. Since there are no other C-SIDs after F12, R12 determines that the NEXT&COC Flavor indicates a replacement operation. Because SI=3>0, R12 calculates SI=3-1=2, while SL=0 remains unchanged. Since SL=0 and SI=2 point to F13 in the SRH, R12 replaces F12 in the DA field with F13, obtaining... Figure 19 The message 1912 shown has SL=0 and SI=2. Afterwards, R12, based on the address block and F13, sends message 1912 to R13 via a strict path, according to the node behavior corresponding to F12.

[0226] R13 receives message 1912 via a strict path. Based on the address block and F13, it queries its local SID table to determine that F13 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F13. Since there are no other C-SIDs after F13, the NEXT&COC Flavor indicates a replacement operation. Because SI=2>0, R12 calculates SI=2-1=1, while SL=0 remains unchanged. Since SL=0 and SI=1 point to the VPN in the SRH, R13 replaces F13 in the DA field with VPN, obtaining... Figure 19 The message 1913 shown has SL=0 and SI=1. Afterwards, R13, based on the address block and VPN, and following the node behavior corresponding to F13, sends message 1913 to R14 via a strict path.

[0227] R14 receives packet 1913 via a strict path. Based on the address block and the VPN C-SID, it queries its local SID table to obtain the node behavior corresponding to the VPN C-SID. This node behavior might be decapsulation and forwarding of the packet through the specified VPN instance. Furthermore, the VPN C-SID does not correspond to the NEXT & COC Flavor. Therefore, R14 decapsulates packet 1913, removing or popping the encapsulated packet header to obtain the inner packet header. Figure 19 (Not shown) and payload, and then forward the inner header and payload according to the VPN instance specified in the node behavior, so that the terminal device indicated by the DA field included in the inner header can obtain the inner header and payload.

[0228] Thus, a message processing procedure for scenario one was completed.

[0229] Scenario 2, see Figure 20Scenario two involves pure 16-bit C-SID compression, and in scenario two, the packet only includes the DA field and not the SRH field. Compared to the above... Figure 16 The message shown, Figure 20 Some fields have been omitted from the various messages shown to ensure... Figure 20 Simplicity.

[0230] exist Figure 20 In this context, nodes R1 through R7 are included, with R1 being the head node. The paths between R3 and R5 are loose paths, while the paths between the remaining nodes are strict paths. F2 through F6 represent C-SIDs corresponding to the NEXT & COC Flavor, while VPN represents C-SIDs not corresponding to the NEXT & COC Flavor. A single F indicates a C-SID containing only the node identifier field, and a single N indicates a C-SID containing only the function field. Figure 20 Each C-SID shown is a 16-bit C-SID.

[0231] The message received by R1 includes an inner message header ( Figure 20 (Not shown) and payload, R1 generates and encapsulates the message header, resulting in Figure 20 The message 2001 is shown. Afterwards, R1 sends message 2001 to R2 via a strict path, based on the address block and F2.

[0232] R2 receives message 2001 via a strict path. Based on the address block and F2, it queries its local SID table to determine that F2 corresponds to the NEXT & COC Flavor and obtains the node behavior corresponding to F2. Since there are other C-SIDs following F2, namely F3 to VPN (5 C-SIDs in total), R2 determines that the NEXT & COC Flavor indicates a move operation. Therefore, R2 shifts the F3 to VPN fields to the left by 16 bits in the DA field and sets the fields after the VPN C-SID in the DA field to zero, obtaining... Figure 20 The message 2002 is shown. Afterwards, R2, based on the address block and F3, sends message 2002 to R3 via a strict path, following the node behavior corresponding to F2.

[0233] R3 receives message 2002 via a strict path. Based on the address block and F3, it queries its local SID table to determine that F3 corresponds to the NEXT & COC Flavor and obtains the node behavior corresponding to F3. Since there are other C-SIDs following F3, namely N5 to VPN, R3 determines that the NEXT & COC Flavor indicates a move operation. Therefore, R3 shifts the N5 to VPN fields in the DA field 16 bits to the left and sets the fields after the VPN C-SID in the DA field to zero, obtaining... Figure 20The message 2003 is shown. Afterwards, R3, based on the address block and N5, sends message 2003 via a loose path, following the node behavior corresponding to F3.

[0234] R4 receives packet 2003 via a loose path. It queries its local SID table based on the address block and N5, but fails to find a match. Therefore, R4 queries its routing table based on the address block and N5 and forwards packet 2003 via the loose path.

[0235] R5 receives message 2003 via a loose path. Based on the address block and N5, it queries its local SID table to determine that N5 corresponds to the NEXT & COC Flavor and obtains the node behavior corresponding to N5. Since there are other C-SIDs after N5, namely F5 to VPN, R5 determines that the NEXT & COC Flavor indicates a move operation. Therefore, R5 shifts the F5 to VPN fields in the DA field 16 bits to the left and sets the fields after the VPN C-SID in the DA field to zero, obtaining... Figure 20 The message shown is 2005-1. Afterwards, based on the address block and F5, R5 continues to query its local SID table according to the node behavior corresponding to N5.

[0236] R5 queries its local SID table based on the address block and F5 to determine that F5 corresponds to the NEXT & COC Flavor, and obtains the node behavior corresponding to F5. Since F5 is followed by other C-SIDs, namely F6 and VPN, R5 determines that the NEXT & COC Flavor indicates a move operation. Therefore, R5 shifts F6 and VPN in the DA field 16 bits to the left, and sets the field after VPN in the DA field to zero, obtaining... Figure 20 The message 2005-2 is shown. Based on the address block and F6, R5 sends message 2005-2 to R6 via a strict path, according to the node behavior corresponding to F5.

[0237] R6 receives message 2005-2 via a strict path. Based on the address block and F6, it queries its local SID table to determine that F6 corresponds to the NEXT&COC Flavor and obtains the node behavior corresponding to F6. Since there are other C-SIDs after F6, namely VPN, R6 determines that the NEXT&COC Flavor indicates a move operation. Therefore, R6 shifts VPN in the DA field 16 bits to the left and sets the field after VPN in the DA field to zero, obtaining... Figure 20 The message 2006 is shown. Afterwards, R6, based on the address block and VPN, and following the node behavior corresponding to F6, sends message 2006 to R7 via a strict path.

[0238] R7 receives message 2006 via a strict path. Based on the address block and the VPN C-SID, it queries R7's local SID table to obtain the node behavior corresponding to the VPN C-SID. This node behavior might be, for example, decapsulation and forwarding the message through the specified VPN instance. Furthermore, the VPN C-SID does not correspond to the NEXT & COC Flavor. Therefore, R7 decapsulates message 2006, removing or popping the encapsulated message header to obtain the inner message header (…). Figure 20 (Not shown) and payload, and then forward the inner header and payload according to the VPN instance specified in the node behavior, so that the terminal device indicated by the DA field included in the inner header can obtain the inner header and payload.

[0239] Thus, one message processing step under scenario two was completed.

[0240] Corresponding to the various message processing methods described above, this application also provides a message processing apparatus. This apparatus is applied to a first node. This apparatus is used to process messages via… Figure 21 Each module shown performs the above... Figure 11 and Figure 18 The message processing method executed by the first node. For example... Figure 21 As shown in the embodiments of this application, the message processing apparatus includes the following modules.

[0241] The receiving module 2101 is used to receive a first message, the first message including a DA field and an SRH, the DA field including at least one C-SID arranged in an ordered manner, each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation, and the at least one C-SID includes a first C-SID corresponding to the first node. The determining module 2102 is used to determine, based on whether there are other C-SIDs after the first C-SID, the first processing feature corresponding to the first C-SID indicates a move operation or a replacement operation; The moving module 2103 is used to move the target field when the first processing feature indicates a moving operation, such that the target field covers the first C-SID in the DA field, and the target field is the field in the DA field that is located after the first C-SID; Replacement module 2104 is used to replace the first C-SID in the DA field with a second C-SID when the first processing feature indicates a replacement operation, wherein the second C-SID is a C-SID in the SRH.

[0242] In an exemplary embodiment, the determining module 2102 is configured to determine a first processing feature indicating a move operation based on the inclusion of other C-SIDs after the first C-SID; and to determine a first processing feature indicating a replacement operation based on the absence of other C-SIDs after the first C-SID.

[0243] In an exemplary embodiment, the first message further includes a first pointer and a second pointer. The replacement module 2104 is also used to update the values ​​of the first pointer and the second pointer, such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located, and the value of the second pointer indicates the location of the container where the second C-SID is located in the SRH; and the second C-SID is determined based on the values ​​of the first pointer and the second pointer.

[0244] In an exemplary embodiment, the first message further includes a first pointer and a second pointer, and a replacement module 2104 for updating the value of the first pointer such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located; the second C-SID is determined based on the value of the first pointer and the value of the second pointer, and the value of the second pointer indicates the location of the container where the second C-SID is located in the SRH.

[0245] In an exemplary embodiment, the replacement module 2104 is used to determine that the value of the first pointer is N-1, where N is the maximum number of C-SIDs that can be contained in the container; or, to decrement the value of the first pointer by 1.

[0246] In an exemplary embodiment, the container is included in the SRH, and the container has a length of 128 bits.

[0247] In an exemplary embodiment, the moving module 2103 is further configured to set the field in the DA field that follows the moved target field to zero.

[0248] In an exemplary embodiment, the first node stores a SID table, which records the correspondence between C-SIDs and processing features. The determining module 2102 is further configured to query the SID table based on at least one C-SID. In response to any C-SID among the at least one C-SID matching a C-SID recorded in the SID table, the module determines that any C-SID is the first C-SID and determines that the processing feature corresponding to the matched C-SID is the first processing feature.

[0249] In an exemplary embodiment, the apparatus further includes a sending module for sending a message obtained after performing a movement operation or a replacement operation.

[0250] In an exemplary embodiment, the processed feature is either the feature corresponding to the node behavior, or the processed feature is the node behavior.

[0251] In an exemplary embodiment, the first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

[0252] In an exemplary embodiment, the first C-SID includes a functional field, and the next C-SID of the first C-SID corresponds to a downstream node of the first node in the forwarding path of the first message.

[0253] In an exemplary embodiment, the first C-SID also includes a node identifier field.

[0254] In an exemplary embodiment, the length of the first C-SID is 16 bits or 32 bits.

[0255] In an exemplary embodiment, the DA field also includes an address block preceding at least one C-SID.

[0256] In an exemplary embodiment, the sum of the length of the address block and the length of at least one C-SID is less than or equal to the length of the DA field.

[0257] In an exemplary embodiment, the length of the target field is the difference between the length of the DA field and the target length, and the target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the bits in the DA field that are set to zero.

[0258] In an exemplary embodiment, the first message also includes an IPv6 header, which includes a DA field.

[0259] In an exemplary embodiment, the SRH also includes at least one SID with a length of 128 bits.

[0260] In an exemplary embodiment, the SRH does not include the address block corresponding to the first C-SID.

[0261] Corresponding to the various message processing methods described above, this application also provides a message processing apparatus. This apparatus is applied to a second node. This apparatus is used to... Figure 22 Each module shown performs the above... Figure 17 and Figure 18 The message processing method executed by the second node. For example... Figure 22 As shown in the embodiments of this application, the message processing apparatus includes the following modules.

[0262] Receiver module 2201 is used to receive the second message; The module 2202 is used to obtain the first message based on the second message. The first message includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. Sending module 2203 is used to send the first message to the first node; The first processing feature corresponding to the first C-SID is used by the first node to determine whether there are other C-SIDs after the first C-SID, indicating a move operation or a replacement operation. When the first processing feature indicates a move operation, the first processing feature is used by the first node to move the target field so that the target field covers the first C-SID in the DA field. The target field is the field in the DA field located after the first C-SID. When the first processing feature indicates a replacement operation, the first processing feature is used by the first node to replace the first C-SID in the DA field with a second C-SID. The second C-SID is a C-SID in the SRH.

[0263] In an exemplary embodiment, the processed feature is either the feature corresponding to the node behavior, or the processed feature is the node behavior.

[0264] In an exemplary embodiment, the first message further includes a first pointer. The sending module 2203 is also configured to set the value of the first pointer to zero. The value of the first pointer is used for updating the first node, such that the value of the first pointer indicates the location of the second C-SID in the container where the second C-SID is located.

[0265] In an exemplary embodiment, the first message further includes a second pointer. The sending module 2203 is also configured to set the value of the second pointer to an initial value, the initial value being the number of containers included in the SRH. The value of the second pointer is used for the first node update, such that the value of the second pointer indicates the location of the container containing the second C-SID in the SRH.

[0266] In an exemplary embodiment, the container is included in the SRH, and the container has a length of 128 bits.

[0267] In an exemplary embodiment, the first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

[0268] In an exemplary embodiment, the first C-SID includes a functional field, and the next C-SID of the first C-SID corresponds to a downstream node of the first node in the forwarding path of the first message.

[0269] In an exemplary embodiment, the first C-SID also includes a node identifier field.

[0270] In an exemplary embodiment, the length of the first C-SID is 16 bits or 32 bits.

[0271] In an exemplary embodiment, the DA field also includes an address block preceding at least one C-SID.

[0272] In an exemplary embodiment, the sum of the length of the address block and the length of at least one C-SID is less than or equal to the length of the DA field.

[0273] In an exemplary embodiment, the length of the target field is the difference between the length of the DA field and the target length, and the target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the bits in the DA field that are set to zero.

[0274] In an exemplary embodiment, the first message also includes an Internet Protocol version 6 (IPv6) header, which includes a DA field.

[0275] In an exemplary embodiment, the SRH also includes at least one SID with a length of 128 bits.

[0276] In an exemplary embodiment, the SRH does not include the address block corresponding to the second C-SID.

[0277] in, Figure 21 and Figure 22 The technical effects of the provided message processing device can be found in [reference needed]. Figure 11 , Figure 17 and Figure 18 The technical effects of the message processing method shown will not be elaborated here.

[0278] It should be understood that the above Figure 21 and Figure 22 The provided device, in implementing its functions, is only illustrated by the division of the above-described functional modules. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, and will not be repeated here.

[0279] In an exemplary embodiment, this application also provides a message processing device, which includes a memory and a processor; the memory stores at least one instruction, which is loaded and executed by the processor to enable the device to perform... Figure 11The message processing method shown, or its implementation Figure 17 The message processing method shown is described above. The message processing device can be either the first node or the second node described above.

[0280] See Figure 23 , Figure 23 A schematic diagram of the structure of an exemplary message processing device 2300 of this application is shown. The message processing device 2300 includes at least one processor 2301, a memory 2303, and at least one network interface 2304.

[0281] Processor 2301 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a GPU, a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application-specific integrated circuits (ASICs), programmable logic devices (PLDs), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, or any combination thereof for implementing the scheme of this application. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor. It is worth noting that the processor may be a processor supporting an advanced reduced instruction set machine (RISC) machine (ARM) architecture. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0282] Optionally, the message processing device 2300 also includes a bus 2302. The bus 2302 is used to transmit information between the components of the message processing device 2300. The bus 2302 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 2302 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 23 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.

[0283] The memory 2303 may be, for example, volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache.

[0284] By way of example, but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0285] The memory 2303 can also be other types of storage devices capable of storing static information and instructions. Alternatively, it can be other types of dynamic storage devices capable of storing information and instructions. It can also be other optical disc storage, optical disk storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. The memory 2303 may exist independently and be connected to the processor 2301 via bus 2302. The memory 2303 may also be integrated with the processor 2301.

[0286] Network interface 2304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), or wireless local area network (WLAN). Network interface 2304 can include wired network interfaces and wireless network interfaces. Specifically, network interface 2304 can be an Ethernet interface, such as Fast Ethernet (FE), Gigabit Ethernet (GE), Asynchronous Transfer Mode (ATM), WLAN, cellular network, or combinations thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of this application, network interface 2304 can be used by message processing device 2300 to communicate with other devices.

[0287] In specific implementations, as some embodiments, the processor 2301 may include one or more CPUs, such as Figure 23 The CPU0 and CPU1 shown are examples of processors. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0288] In specific implementations, as some embodiments, the message processing device 2300 may include multiple processors, such as... Figure 23 The processors 2301 and 2305 are shown in the diagram. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" may refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0289] In some embodiments, the memory 2303 is used to store program instructions 2310 for executing the scheme of this application, and the processor 2301 can execute the program instructions 2310 stored in the memory 2303. That is, the message processing device 2300 can implement the method provided in the method embodiment through the processor 2301 and the program instructions 2310 in the memory 2303. Figure 11 , Figure 17 and Figure 18 The method executed by the first or second node. Program instructions 2310 may include one or more software modules. Optionally, the processor 2301 itself may also store program instructions for executing the scheme of this application.

[0290] In specific implementation, the message processing device 2300 of this application can correspond to the first network element device used to execute the above method. The processor 2301 in the message processing device 2300 reads the instructions in the memory 2303, and makes... Figure 23 The message processing device 2300 shown is capable of performing all or part of the steps in the method embodiments.

[0291] The message processing device 2300 can also correspond to the above. Figure 21 or Figure 22 The device shown, Figure 21 or Figure 22 Each functional module in the illustrated device is implemented using software from the message processing device 2300. In other words, Figure 21 or Figure 22 The device shown includes functional modules generated by the processor 2301 of the message processing device 2300 after reading the program instructions 2310 stored in the memory 2303.

[0292] in, Figure 11 , Figure 17 and Figure 18 Each step of the method shown is completed through integrated logic circuits in the hardware or instructions in the software form of the processor of the message processing device 2300. The steps of the method embodiments disclosed in this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. Since the storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method embodiments; to avoid repetition, they will not be described in detail here.

[0293] In an exemplary embodiment, a message processing system is provided, the system including a first node and a second node, the first node being used to perform... Figure 11 or Figure 18The first node executes the message processing method, and the second node is used to execute... Figure 17 or Figure 18 The message processing method executed by the second node. This message processing system is used to implement... Figure 18 The message processing method shown.

[0294] In an exemplary embodiment, a computer-readable storage medium is provided, which stores at least one instruction that is loaded and executed by a processor to enable a computer to perform... Figure 11 , Figure 17 and Figure 18 The message processing method executed by the first or second node.

[0295] In an exemplary embodiment, a computer program product is provided, comprising a computer program or instructions, which are executed by a processor to enable a computer to perform... Figure 11 , Figure 17 and Figure 18 The message processing method executed by the first or second node.

[0296] In an exemplary embodiment, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, causing a computer equipped with the chip to perform the aforementioned operations. Figure 11 , Figure 17 and Figure 18 The message processing method executed by the first or second node.

[0297] In an exemplary embodiment, another chip is provided, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected via internal interconnection paths. The processor is used to execute code in the memory. When the code is executed, a computer with the chip installed performs the above-described actions. Figure 11 , Figure 17 and Figure 18 The message processing method executed by the first or second node.

[0298] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive).

[0299] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with substantially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another.

[0300] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second devices refer to two or more second devices. The terms "system" and "network" are often used interchangeably in this document.

[0301] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0302] It should also be understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0303] It should also be understood that the terms “if” and “if” can be interpreted as meaning “when” or “upon” or “in response to determination” or “in response to detection”. Similarly, depending on the context, the phrases “if determination…” or “if detection [the stated condition or event]” can be interpreted as meaning “when determination…” or “in response to determination…” or “when detection [the stated condition or event]” or “in response to detection [the stated condition or event]”.

[0304] The above description is merely an embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A message processing method, characterized in that, The method includes: The first node receives a first message, which includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. The first node determines the first processing feature corresponding to the first C-SID to indicate a move operation or a replacement operation based on whether the DA field also includes other C-SIDs located after the first C-SID. When the first processing feature indicates a move operation, the first node moves the target field so that the target field covers the first C-SID in the DA field, and the target field is the field in the DA field that is located after the first C-SID; When the first processing feature indicates a replacement operation, the first node replaces the first C-SID in the DA field with a second C-SID, where the second C-SID is a C-SID in the SRH.

2. The method according to claim 1, characterized in that, The first node determines, based on whether the DA field includes other C-SIDs following the first C-SID, a first processing feature corresponding to the first C-SID indicating a move or replacement operation, including: The first node determines the first processing feature to indicate a move operation based on the inclusion of other C-SIDs following the first C-SID in the DA field. The first node determines that the first processing feature indicates a replacement operation based on the fact that the DA field does not include any other C-SIDs located after the first C-SID.

3. The method according to claim 1 or 2, characterized in that, The first message also includes a first pointer and a second pointer. Before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: The first node updates the values ​​of the first pointer and the second pointer, such that the value of the first pointer indicates the position of the second C-SID in the container where the second C-SID is located, and the value of the second pointer indicates the position of the container where the second C-SID is located in the SRH; The first node determines the second C-SID based on the value of the first pointer and the value of the second pointer.

4. The method according to claim 1 or 2, characterized in that, The first message also includes a first pointer and a second pointer. Before the first node replaces the first C-SID in the DA field with the second C-SID, the method further includes: The first node updates the value of the first pointer so that the value of the first pointer indicates the position of the second C-SID in the container where the second C-SID is located; The first node determines the second C-SID based on the value of the first pointer and the value of the second pointer, wherein the value of the second pointer indicates the location of the container containing the second C-SID within the SRH.

5. The method according to claim 3, characterized in that, Updating the value of the first pointer includes: The value of the first pointer is determined to be N-1, where N is the maximum number of C-SIDs that the container can hold; or, Decrement the value of the first pointer by 1.

6. The method according to claim 3, characterized in that, The container is included in the SRH, and the container has a length of 128 bits.

7. The method according to any one of claims 1, 2, 5 or 6, characterized in that, After the first node moves the target field, the method further includes: The first node sets the field in the DA field that is located after the target field after the move to zero.

8. The method according to any one of claims 1, 2, 5 or 6, characterized in that, The first node stores a segment identifier (SID) table, which records the correspondence between C-SIDs and processing features. The method further includes: The first node queries the SID table based on the at least one C-SID; In response to any C-SID among the at least one C-SID matching a C-SID recorded in the SID table, the first node determines that any C-SID is the first C-SID and determines the processing feature corresponding to the matched C-SID as the first processing feature.

9. The method according to any one of claims 1, 2, 5 or 6, characterized in that, The method further includes: The first node sends the message obtained after performing the move operation or the replacement operation.

10. The method according to any one of claims 1, 2, 5 or 6, characterized in that, The processing feature is a feature corresponding to node behavior, or the processing feature is node behavior.

11. The method according to any one of claims 1, 2, 5 or 6, characterized in that, The first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

12. The method according to any one of claims 1, 2, 5 or 6, characterized in that, The first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the downstream node of the first node in the forwarding path of the first message.

13. The method according to claim 12, characterized in that, The first C-SID also includes a node identifier field.

14. The method according to claim 11, characterized in that, The length of the first C-SID is 16 bits or 32 bits.

15. The method according to any one of claims 1, 2, 5, 6, 13 or 14, characterized in that, The DA field also includes an address block that precedes the at least one C-SID.

16. The method according to claim 15, characterized in that, The sum of the length of the address block and the length of the at least one C-SID is less than or equal to the length of the DA field.

17. The method according to claim 15, characterized in that, The length of the target field is the difference between the length of the DA field and the target length. The target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the bits set to zero in the DA field.

18. The method according to any one of claims 1, 2, 5, 6, 13, 14, 16 or 17, characterized in that, The first message also includes an Internet Protocol version 6 (IPv6) header, which includes the DA field.

19. The method according to any one of claims 1, 2, 5, 6, 13, 14, 16 or 17, characterized in that, The SRH also includes at least one SID with a length of 128 bits.

20. The method according to any one of claims 1, 2, 5, 6, 13, 14, 16 or 17, characterized in that, The SRH does not include the address block corresponding to the first C-SID.

21. A message processing method, characterized in that, The method includes: The second node receives the second message; The second node obtains the first message based on the second message. The first message includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. The second node sends the first message to the first node; Wherein, the first processing feature corresponding to the first C-SID is used by the first node to determine whether the first processing feature indicates a move operation or a replacement operation based on whether the DA field also includes other C-SIDs located after the first C-SID. When the first processing feature indicates a move operation, the first processing feature is used by the first node to move the target field so that the target field covers the first C-SID in the DA field. The target field is the field in the DA field located after the first C-SID. When the first processing feature indicates a replacement operation, the first processing feature is used by the first node to replace the first C-SID in the DA field with a second C-SID. The second C-SID is a C-SID in the SRH.

22. The method according to claim 21, characterized in that, The processing feature is a feature corresponding to node behavior, or the processing feature is node behavior.

23. The method according to claim 21 or 22, characterized in that, The first message also includes a first pointer. Before the second node sends the first message to the first node, the method further includes: The second node sets the value of the first pointer to zero. The value of the first pointer is used to update the first node so that the value of the first pointer indicates the position of the second C-SID in the container where the second C-SID is located.

24. The method according to claim 21 or 22, characterized in that, The first message also includes a second pointer. Before the second node sends the first message to the first node, the method further includes: The second node sets the value of the second pointer to an initial value, which is the number of containers included in the SRH. The value of the second pointer is used for the first node to update, such that the value of the second pointer indicates the location of the container containing the second C-SID in the SRH.

25. The method according to claim 23, characterized in that, The container is included in the SRH, and the container has a length of 128 bits.

26. The method according to any one of claims 21, 22 or 25, characterized in that, The first C-SID includes a node identifier field, the next C-SID of the first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the first node.

27. The method according to any one of claims 21, 22 or 25, characterized in that, The first C-SID includes a function field, and the next C-SID of the first C-SID corresponds to the downstream node of the first node in the forwarding path of the first message.

28. The method according to claim 27, characterized in that, The first C-SID also includes a node identifier field.

29. The method according to claim 26, characterized in that, The length of the first C-SID is 16 bits or 32 bits.

30. The method according to any one of claims 21, 22, 25, 28 or 29, characterized in that, The DA field also includes an address block that precedes the at least one C-SID.

31. The method according to claim 30, characterized in that, The sum of the length of the address block and the length of the at least one C-SID is less than or equal to the length of the DA field.

32. The method according to claim 30, characterized in that, The length of the target field is the difference between the length of the DA field and the target length. The target length is the sum of the length of the address block and the length of the first C-SID, or the target length is the sum of the length of the address block, the length of the first C-SID, and the length of the bits set to zero in the DA field.

33. The method according to any one of claims 21, 22, 25, 28, 29, 31 or 32, characterized in that, The first message also includes an Internet Protocol version 6 (IPv6) header, which includes the DA field.

34. The method according to any one of claims 21, 22, 25, 28, 29, 31 or 32, characterized in that, The SRH also includes at least one SID with a length of 128 bits.

35. The method according to any one of claims 21, 22, 25, 28, 29, 31 or 32, characterized in that, The SRH does not include the address block corresponding to the second C-SID.

36. A message processing method, characterized in that, The method includes: The second node receives the second message; The second node obtains the first message based on the second message. The first message includes a destination address (DA) field and a segment routing header (SRH). The DA field includes at least one compressed segment identifier (C-SID) arranged in an ordered manner. Each of the at least one C-SID corresponds to a processing feature indicating a move operation or a replacement operation. The at least one C-SID includes a first C-SID corresponding to the first node. The second node sends the first message to the first node; The first node receives the first message; The first node determines the first processing feature corresponding to the first C-SID to indicate a move operation or a replacement operation based on whether the DA field also includes other C-SIDs located after the first C-SID. When the first processing feature indicates a move operation, the first node moves the target field so that the target field covers the first C-SID in the DA field, and the target field is the field in the DA field that is located after the first C-SID; When the first processing feature indicates a replacement operation, the first node replaces the first C-SID in the DA field with a second C-SID, where the second C-SID is a C-SID in the SRH.

37. A message processing device, characterized in that, The device includes a memory and a processor; the memory stores at least one instruction, which is loaded and executed by the processor to enable the device to implement the message processing method according to any one of claims 1-35.

38. A message processing system, characterized in that, The system includes a first node and a second node, wherein the first node is used to execute the message processing method according to any one of claims 1-20, and the second node is used to execute the message processing method according to any one of claims 21-35.

39. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to enable the computer to implement the message processing method as described in any one of claims 1-35.

40. A computer program product, characterized in that, The computer program product includes a computer program or instructions that are executed by a processor to enable a computer to implement the message processing method according to any one of claims 1-35.

Citation Information

Patent Citations

  • Method for forwarding message in SR network, device thereof and system

    CN112448888A