Message forwarding method, electronic equipment and computer readable storage medium
By introducing operation instructions for target DeNet messages into the MPLS network, the problem of synchronization complexity of the entire network device in the MPLS network is solved, the service requirements of deterministic forwarding and low jitter are realized, and the synchronization process of network devices is simplified.
Patent Information
- Application Number
- CN202311866212.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
In the existing MPLS network, time synchronization is required for all devices, resulting in complex and costly implementation processes.
The first operation instruction is introduced into the target DeNet message, and the time domain information is transmitted in the MPLS network through the MPLS tag stack, indicating the transmission time domain information of the target DeNet message, and avoiding time synchronization of the entire network device.
The deterministic forwarding of the target DeNet packets is achieved, which meets the needs of bounded service delay and low jitter, simplifies the synchronization process of network equipment, and reduces the implementation complexity and cost.
Smart Images

Figure CN120238491A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technologies, and particularly relates to a method for forwarding packets, an electronic device, and a computer-readable storage medium. Background Art
[0002] Multiprotocol Label Switching (MPLS), as a widely deployed high-speed forwarding technology, will still exist in the network for a long time. In this regard, in order to meet the requirements of bounded latency and low jitter of services, it is necessary to achieve time synchronization for all devices in the MPLS network, such as high-precision time synchronization across the entire network.
[0003] However, in the foregoing technical solution, since it is necessary to achieve time synchronization for all devices in the MPLS network, problems such as complex implementation process and high cost are caused. Summary of the Invention
[0004] Embodiments of this application provide a method for forwarding packets, an electronic device, and a computer-readable storage medium, which can avoid problems such as complex implementation process and high cost caused by achieving time synchronization for all devices in the MPLS network.
[0005] In a first aspect, a method for forwarding packets is provided, which is applied to a source node in a target forwarding path. The method includes: obtaining the target forwarding path, and determining a first operation instruction according to the target forwarding path, where the first operation instruction is used to indicate the transmission time domain information of a target Deterministic Network (DeNet) packet in a Multiprotocol Label Switching (MPLS) network; encapsulating the first operation instruction in the MPLS label stack of the target DeNet packet; and transmitting the target DeNet packet in the MPLS network according to the MPLS label stack.
[0006] In a second aspect, a method for forwarding packets is provided, which is applied to a forwarding node other than the source node in a target forwarding path. The method includes: receiving a target Deterministic Network (DeNet) packet, where the target DeNet packet includes an MPLS label stack, and the first operation instruction is encapsulated in the MPLS label stack, where the first operation instruction is used to indicate the transmission time domain information of the target DeNet packet in the MPLS network; and forwarding the target DeNet packet in the Multiprotocol Label Switching (MPLS) network according to the first operation instruction.
[0007] In a third aspect, embodiments of this application provide an electronic device, including: a memory, a processor, and computer-executable instructions stored on the memory and executable on the processor, where when the computer-executable instructions are executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0008] Fourthly, an embodiment of the present application provides a computer-readable storage medium for storing computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0009] In an embodiment of the present application, in this embodiment, by introducing a first operation instruction into the target DeNet packet to indicate the transmission time domain information of the target DeNet packet in the MPLS network, deterministic forwarding of the target DeNet packet based on the MPLS network can be achieved, avoiding the problem of time synchronization of devices in the entire MPLS network in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is one of the flow diagrams of the packet forwarding method provided by an exemplary embodiment of the present application.
[0011] Figure 2a is a schematic diagram of the first operation instruction provided by an exemplary embodiment of the present application.
[0012] Figure 2b is a schematic diagram of the second operation instruction provided by an exemplary embodiment of the present application.
[0013] Figure 2c is a schematic diagram of the third operation instruction provided by an exemplary embodiment of the present application.
[0014] Figure 2d is a schematic diagram of the MPLS label stack provided by an exemplary embodiment of the present application.
[0015] Figure 3a is one of the schematic diagrams of the packet forwarding scenario provided by an exemplary embodiment of the present application.
[0016] Figure 3b is one of the schematic diagrams of the target Denet packet provided by an exemplary embodiment of the present application.
[0017] Figure 4a is the second of the schematic diagrams of the packet forwarding scenario provided by an exemplary embodiment of the present application.
[0018] Figure 4b is the second of the schematic diagrams of the target Denet packet provided by an exemplary embodiment of the present application.
[0019] Figure 4c is the third of the schematic diagrams of the target Denet packet provided by an exemplary embodiment of the present application.
[0020] Figure 5It is the second schematic flowchart of the packet forwarding method provided by an exemplary embodiment of the present application.
[0021] Figure 6 It is the first schematic structural diagram of the packet forwarding device provided by an exemplary embodiment of the present application.
[0022] Figure 7 It is the second schematic structural diagram of the packet forwarding device provided by an exemplary embodiment of the present application.
[0023] Figure 8 It is the schematic structural diagram of the electronic device provided by an exemplary embodiment of the present application. Detailed implementation manners
[0024] In order to enable those skilled in the art to better understand the technical solutions in the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0025] Figure 1 Fig. shows a schematic flowchart of a packet forwarding method 100 provided by an embodiment of the present application. The method 100 can be executed by a source node in a target forwarding path, and the source node can be a terminal device or a server device. In other words, the method 100 can be executed by software or hardware installed on the source node. The server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. As Figure 1 shown, the method 100 may include but is not limited to the following steps.
[0026] S110, obtain the target forwarding path, and determine a first operation instruction according to the target forwarding path.
[0027] Among them, there are various ways to obtain the target forwarding path.
[0028] For example, in the case of a centralized packet forwarding scenario, the control device in this scenario can collect the transmission time domain information of each node in the entire MPLS network, and calculate a forwarding path that meets the service constraint conditions according to the transmission time domain information, that is, the target forwarding path. It can be understood that if the control device can be the source node, or other nodes other than the source node. Among them, if the control device is not the source node, then after determining the target forwarding path, the control device will send it to the source node.
[0029] For a distributed scenario, a specified node (such as a head node or a source node) in this scenario collects the transmission time domain information of each node in the entire MPLS network, and calculates a forwarding path that meets the service constraint conditions based on this transmission time domain information, that is, the target forwarding path.
[0030] The first operation instruction is used to indicate the transmission time domain information of the target DeNet message in the MPLS network, such as the transmission time domain information of each forwarding node in the MPLS network receiving the target DeNet message, so that each forwarding node in the target forwarding path can forward the target DeNet message according to the first operation instruction. Optionally, the transmission time domain information may be slot information or cycle information.
[0031] It should be noted that in this application, by introducing the first operation instruction in the target DeNet message, it is equivalent to using the MPLS 2.0 technology to indicate the transmission time domain information of the target DeNet message in the target forwarding path by expanding the corresponding network operation instructions, thus avoiding the problem of needing to synchronize the time of all devices in the entire MPLS network in the related art and realizing the deterministic forwarding of the target Denet message. For example, when the transmission time domain information is slot information and cycle information, accurate scheduling of cycles and slots can be realized during the forwarding of the DeNet message, meeting the increasing and rich communication expansion requirements.
[0032] S120, encapsulate the first operation instruction in the MPLS label stack of the target DeNet message.
[0033] Among them, the encapsulation method of the first operation instruction is not limited here. For example, it can refer to the instruction stack encapsulation method in the MPLS technology.
[0034] S130, transmit the target DeNet message in the MPLS network according to the MPLS label stack.
[0035] In this embodiment, by introducing the first operation instruction in the target DeNet message to indicate the transmission time domain information of the target DeNet message in the MPLS network, the deterministic forwarding of the target DeNet message based on the MPLS network can be realized, and the problem of needing to synchronize the time of devices in the entire MPLS network in the related art can be avoided.
[0036] Based on this, in an alternative implementation, the process by which the source node determines the first operation instruction according to the target forwarding path can be various. For example, in this embodiment, the source node may first obtain the time-domain mode during the transmission of the target DeNet message, such as the stack mode or the swap mode, and then determine the transmission time-domain information when the first receiving node receives the target DeNet message according to the time-domain mode and the time-domain information mapping relationship corresponding to the target forwarding path. Finally, the first operation instruction is determined according to the transmission time-domain information corresponding to the first receiving node.
[0037] Among them, the time-domain information mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time-domain information of the target DeNet message. In this embodiment, the time-domain mapping relationship can be collected by the control device in the centralized scenario or the source node in the distributed scenario when determining the target forwarding path, and no limitation is made here.
[0038] Based on this, in one implementation, if the source node determines that the time-domain mode is the stack Stack mode, the first receiving node can be other nodes in the target forwarding path except the source node. That is to say, for the case where the time-domain mode is the stack Stack mode, when the source node encapsulates the first operation instruction, it needs to determine the first operation instructions corresponding to all or all forwarding nodes in the target forwarding path and encapsulate them in the MPLS label stack of the target DeNet message.
[0039] For example, for the case where the time-domain mode is the Stack mode, there are multiple first receiving nodes, and each first receiving node corresponds to a first operation instruction.
[0040] Correspondingly, taking the first receiving node as the next-hop forwarding node of the source node as an example, after receiving the target DeNet message, the first receiving node can forward the target DeNet message in the MPLS network according to the first operation instruction corresponding to itself.
[0041] In one implementation, considering that after the first receiving node completes the target DeNet message, the first operation instruction corresponding to the first receiving node in the target DeNet message has no effect in subsequent forwarding. Therefore, in order to avoid redundancy in the message forwarding process, the first access node can pop or eject the corresponding first operation instruction.
[0042] It can be understood that in the process of forwarding the target Denet message, adopting the stack mode can eliminate the maintenance of the periodic time slot mapping relationship by the device and make the message forwarding control more flexible.
[0043] In one implementation, if the source node determines that the time-domain mode is the Swap mode, then the first receiving node is the next-hop forwarding node of the source node in the target forwarding path. That is to say, for the case where the time-domain mode is the Swap mode, when the source node encapsulates the first operation instruction, it only needs to determine the first operation instruction of the downstream forwarding node adjacent to the source node and encapsulate it in the MPLS label stack of the target DeNet message. That is, for the case where the time-domain mode is the stack Swap mode, the MPLS label stack of the target DeNet message includes one such first operation instruction.
[0044] Correspondingly, as the next-hop forwarding node of the source node, after receiving the target DeNet message, the first receiving node can forward the target DeNet message in the MPLS network according to the first operation instruction corresponding to itself. It should be noted that when the first receiving node forwards the target DeNet message in the MPLS network according to the first operation instruction in the MPLS label stack, it needs to update the transmission time-domain information indicated by the first operation instruction in the MPLS label stack to the transmission time-domain information when the second receiving node receives the target DeNet message according to the time-domain information mapping relationship corresponding to the target forwarding path. Among them, the second receiving node is the next-hop forwarding node of the forwarding node in the target forwarding path, and the time-domain information mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time-domain information of the target DeNet message; finally, the target DeNet message is sent to the second receiving node according to the updated MPLS label stack.
[0045] That is to say, for each forwarding node in the target forwarding path, when it receives the target DeNet message sent by the upstream node, it needs to modify the first operation instruction in the target DeNet message according to the transmission time-domain information of the next-hop forwarding node in the time-domain information mapping relationship maintained by itself, such as modifying it to the transmission time-domain information when the next-hop forwarding node receives the target DeNet message, such as cycle information, time slot information, etc., so as to achieve end-to-end deterministic delay and service guarantee.
[0046] In an alternative implementation, to ensure that during the forwarding process of the target DeNet packet, each forwarding node can clearly know the time-domain mode of the target DeNet packet during transmission, so as to determine the forwarding method of the target DeNet packet according to the time-domain mode, thereby improving the packet forwarding efficiency. Therefore, the first operation instruction is also used to indicate the time-domain mode, and the time-domain mode is one of the Stack mode and the Swap mode.
[0047] In one implementation, at least one of a second operation instruction and a third operation instruction may also be encapsulated in the MPLS label stack in the target DeNet packet. Among them, the second operation instruction is used to indicate the flow identifier (Flow-ID) corresponding to the target DeNet packet. Among them, the flow identifier is used to identify the DeNet flow during the forwarding process of the target DeNet packet.
[0048] The third operation instruction is used to indicate the flow sequence information corresponding to the target DeNet packet. Among them, the flow sequence information is used to identify the sequence number of each data stream of the DeNet flow corresponding to the target DeNet packet. The sequence number is allocated based on each DeNet flow, and this sequence number is used for packet replication, elimination, and sorting functions during the DeNet flow forwarding process.
[0049] Based on this, in this embodiment, there can be various implementation manners of the foregoing operation instructions for indicating different information, and the following will respectively give exemplary descriptions thereof.
[0050] For example, assuming that the first operation instruction is used to indicate the transmission time-domain information and time-domain mode of the target DeNet packet in the MPLS network, then as Figure 2a shown, the operation code corresponding to the first operation instruction is "opcode = TBA2". Its format can be, but is not limited to, the label stack entry (Label Stack Entry, LSE) format (Format) C, and it can act on the global and post-stack data.
[0051] Among them, Figure 2a the first operation instruction in can carry 20-bit data. Among them, the high 1 bit (such as "M" in Figure 2a ) is used to carry the time-domain mode. For example, "0" is used to indicate the swap mode, and "1" is used to indicate the stack mode. The middle 7 bits are reserved bits, such as "RSV" in Figure 2a . The subsequent 8 bits can be used to carry the time-slot information, such as "TIME-SLOT" in Figure 2a . The low 4 bits are used to carry the cycle information, such as "CYCLE" in Figure 2a .
[0052] Optionally, Figure 2a is only an example of the first operation instruction. For example, the order of the 20-bit data it carries can be changed, such as the cycle information and the time slot information can be interchanged, etc. In addition, the number of bits corresponding to different data can also be Figure 2a more or fewer bits, which is not limited here.
[0053] For another example, assuming that the second operation instruction is used to indicate the flow identifier corresponding to the target DeNet message, then, as Figure 2b shown, the operation code corresponding to this second operation instruction is "opcode=TBA1". Its format can be, but is not limited to, LSE Format C, and it can act on global, post-stack-free data.
[0054] Among them, Figure 2b the second operation instruction in can carry 20-bit data to be used to identify the deterministic network flow.
[0055] For still another example, assuming that the third operation instruction is used to indicate the flow identifier corresponding to the target DeNet message, then as Figure 2c shown, the operation code corresponding to the third operation instruction is "opcode=TBA3", and its format can be, but is not limited to, LSE Format C, and it can act on global, post-stack-free data.
[0056] It should be noted that, similar to the aforementioned first operation instruction, Figure 2b , Figure 2c are only examples of the second operation instruction and the third operation instruction, but are not limited thereto. For example, the order of the 20-bit data it carries can be changed, such as the cycle information and the time slot information can be interchanged, etc. In addition, the number of bits corresponding to different data can also be Figure 2b , Figure 2c more or fewer bits, which is not limited here.
[0057] In addition, considering that in MPLS2.0, it mainly includes such as Figure 2dThe four encapsulation formats shown, namely LSE Format A, LSE Format B, LSE Format C, and LSE Format D, and the MPLS network operation instructions start with LSE Format A and LSE Format B, and can include zero, one, or more LSE Format C and LSE Format D. Among them, the LSE Format A can be understood as being used to indicate the MPLS 2.0 sub-stack (The MA Sub stack Indicator). The LSE Format B can be understood as being used to indicate the initial opcode. The LSE Format C can be understood as being used to indicate subsequent opcodes. The LSE Format C can be understood as being used to indicate additional data. In addition, Figure 2d In Figure 2d , the TC bit is used to indicate the classifying identifier, the S bit is used to indicate whether it is the bottom of the stack, the TTL bit is used to indicate the time to live, the opcode bit is used to identify the extended type, the P bit is used to indicate whether there is data after the stack, the HIS bit is used to indicate at which nodes the carried message data is processed, the RES bit is used to identify the reserved bit, the U bit is used to indicate the message processing method adopted when the node does not recognize the message, the NAL bit is used to indicate the length of the subsequent Format D, and the NASL bit is used to indicate the lengths of Format C and Format D.
[0058] In this case, when the present application encapsulates the foregoing first operation instruction, second operation instruction, and third operation instruction in the MPLS label stack, if the first operation instruction, second operation instruction, and third operation instruction are Format C, then they can be encapsulated after LSE Format A and LSE Format B of the MPLS label stack, but the encapsulation order among the first operation instruction, second operation instruction, and third operation instruction can be unrestricted.
[0059] Based on the description of the foregoing method embodiment 100, to more clearly understand the implementation process of the message forwarding method provided by the present application, the following further describes its implementation process by way of examples 1 - 3, and the content is as follows.
[0060] Example 1
[0061] As Figure 3aAs shown in the figure, assume that the target forwarding path includes three nodes: R1, R2, and R3. Among them, R1 is the source node and supports receiving and sending Detnet messages encapsulated with MPLS 2.0. Then, if the MPLS label includes a second operation instruction and a third operation instruction, the second operation instruction is used to indicate the flow identifier corresponding to the target DeNet message, and the third operation instruction is used to indicate the flow sequence information corresponding to the target DeNet message.
[0062] Based on this, the format of the target Detnet message sent by the source node R1 can be as Figure 3b shown. "FLOW-ID" is used to identify the Detnet flow during message forwarding; "SEQ" is used to identify the sequence number of each data stream in the Detnet flow. The sequence number is allocated based on each Detnet flow and is used for message replication, elimination, and sorting functions during Detnet flow forwarding.
[0063] It should be noted that for Figure 3b and subsequent Figure 4b , Figure 4c etc., it is a standard MPLS label stack. The S bit in it is used to indicate whether it is the bottom of the stack, TTL is used to indicate the time to live, opcode is used to identify the extended type, TC is used to indicate the classifying identifier, P is used to indicate whether there is data after the stack, HIS is used to indicate which nodes process the carried message data, RES is used to identify the reserved bit, and U is used to indicate the message processing method when the node does not recognize the message.
[0064] Example 2
[0065] Assume that the time domain mode of the target DeNet message in this Example 2 is the Swap mode. Then, as Figure 4a shown, the source node R1 and the forwarding node R2 learned the time domain information mapping relationship on the link link1-2 by forwarding messages, that is, the message is sent from the 3rd time slot of cycle 10 on the link link1-2. Affected by the link propagation delay, it will be received at the 4th time slot of cycle 10 on the next-hop forwarding node R2; after passing through the node delay at R2, it is sent from the 6th time slot of cycle 10 and will be received at the 7th time slot of cycle 10 on the downstream device R3 affected by the link propagation delay.
[0066] Based on this, the target Detnet message sent by R1 only needs to include the first operation instruction corresponding to its next-hop forwarding node (i.e., R2). Among them, the format of the target Detnet message can be as Figure 4bAs shown in the figure, a first operation instruction, namely the "deterministic network period and time slot" instruction, is added to the target Detnet message, where 0 represents the swap mode; the middle 7 bits are reserved; the subsequent 8 bits are used to carry time slot information (SLOT = 4), and the lower 4 bits are used to carry period information (CYCLE being 2 indicates a scheduling queue with a time slot of 10 ms). This mode relies on the device to perform cycle time slot mapping learning and maintain the cycle time slot mapping relationship, and modifies the time slot information in the MPLS label stack accordingly during the deterministic forwarding process to achieve end-to-end deterministic delay and service guarantee.
[0067] It can be understood that during the actual forwarding process, the target Detnet message sent by the R1 may also include a second operation instruction and a third operation instruction, which are used to indicate the flow identifier and flow sequence information corresponding to the target DeNet message, and are not limited here.
[0068] Example 3
[0069] Suppose the time domain mode of the target DeNet message in this Example 3 is the Stack mode. Then, as Figure 4a shown, the source node R1 and the forwarding node R2 learn the time domain information mapping relationship on the link link1-2 through forwarding messages, that is, the message is sent out from the 3rd time slot of cycle 10 on the link link1-2. Affected by the link propagation delay, it will be received at the 4th time slot in cycle 10 on the next-hop forwarding node R2; after passing through the node delay on the R2 device, it is sent from the 6th time slot in cycle 10 and, affected by the link propagation delay, will be received at the 7th time slot in cycle 10 on the downstream device R3.
[0070] Based on this, the target Detnet message sent by R1 includes two first operation instructions corresponding to R2 and R3. Its format is as Figure 4c shown, two first operation instructions corresponding to R2 and R3 are added to the target Detnet message, namely the "deterministic network period and time slot" instruction, where 1 represents the stack mode; the middle 7 bits are reserved; the subsequent 8 bits are used to carry time slot information (SLOT = 3), and the lower 4 bits are used to carry period information (CYCLE being 2 indicates a scheduling queue with a time slot of 10 ms). This Stack mode does not rely on the device to perform cycle time slot mapping learning. During the deterministic forwarding process, it only needs to forward according to the cycle and time slot information in the MPLS label stack. After each node completes the forwarding action according to the scheduling and time slot, the "deterministic network period and time slot" information in the MPLS stack can be popped out, that is, the first operation instruction corresponding to itself can be deleted or stripped. Its operation is similar to the MPLS label operation, so as to be able to eliminate the node's maintenance of the time domain information mapping relationship and improve the flexibility of message forwarding control.
[0071] As shown in Figure 5 FIG. 500 is a schematic flowchart of a packet forwarding method provided by an exemplary embodiment of the present application. The method 500 may be, but is not limited to, executed by a forwarding node other than the source node in the target forwarding path, and may be specifically executed by hardware or software installed in the forwarding node. In this embodiment, the method 500 may at least include the following steps.
[0072] S510: Receive a target deterministic network (DeNet) packet. The target DeNet packet includes an MPLS label stack, and a first operation instruction is encapsulated in the MPLS label stack. The first operation instruction is used to indicate the transmission time domain information of the target DeNet packet in the MPLS network.
[0073] S520: Forward the target DeNet packet in the multi-protocol label switching (MPLS) network according to the first operation instruction.
[0074] In an optional implementation, the first operation instruction is further used to indicate the time domain mode during the transmission of the target DeNet packet, and the time domain mode is one of the stack (Stack) mode and the swap (Swap) mode.
[0075] In an optional implementation, when the time domain mode indicated by the first operation instruction is the Stack mode, forwarding the target DeNet packet in the MPLS network according to the first operation instruction in the MPLS label stack includes: popping the first operation instruction corresponding to the forwarding node from the MPLS label stack; forwarding the target DeNet packet in the MPLS network according to the MPLS label stack after the popping process.
[0076] In an optional implementation, when the time domain mode indicated by the first operation instruction is the Swap mode, forwarding the target DeNet packet in the MPLS network according to the first operation instruction in the MPLS label stack includes: updating the transmission time domain information indicated by the first operation instruction in the MPLS label stack to the transmission time domain information when the second receiving node receives the target DeNet packet according to the time domain information mapping relationship corresponding to the target forwarding path, where the second receiving node is the next-hop forwarding node of the forwarding node in the target forwarding path, and the time domain information mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time domain information of the target DeNet packet; sending the target DeNet packet to the second receiving node according to the updated MPLS label stack.
[0077] In an alternative implementation, the transmission time domain information includes time slot information and period information.
[0078] In an alternative implementation, the following at least one item is further encapsulated in the MPLS label stack: a second operation instruction for indicating a flow identifier corresponding to the target DeNet packet; a third operation instruction for indicating flow sequence information corresponding to the target DeNet packet.
[0079] It can be understood that each implementation in method embodiment 500 has the same or corresponding technical features as those in the foregoing method embodiment 100. Therefore, for each implementation in method embodiment 500, reference may be made to the relevant descriptions in the foregoing method embodiment 100.
[0080] For the packet forwarding method provided in the embodiments of the present application, the execution subject may be a packet forwarding device. In the embodiments of the present application, taking the packet forwarding device executing the packet forwarding method as an example, the packet forwarding device provided in the embodiments of the present application is described.
[0081] As Figure 6 shown, it is a schematic structural diagram of a packet forwarding device 600 provided in an embodiment of the present application. The device 600 includes: an obtaining module 610, configured to obtain the target forwarding path and determine a first operation instruction according to the target forwarding path, where the first operation instruction is used to indicate transmission time domain information of a target deterministic network DeNet packet in a multi-protocol label switching MPLS network; an encapsulation module 620, configured to encapsulate the first operation instruction in the MPLS label stack of the target DeNet packet; and a forwarding module 630, configured to transmit the target DeNet packet in the MPLS network according to the MPLS label stack.
[0082] In an alternative implementation, when the obtaining module 610 determines the first operation instruction according to the target forwarding path, it includes: obtaining a time domain mode when the target DeNet packet is transmitted; determining, according to the time domain mode and a time domain information mapping relationship corresponding to the target forwarding path, transmission time domain information when a first receiving node receives the target DeNet packet; and determining the first operation instruction according to the transmission time domain information corresponding to the first receiving node; where the time domain mapping relationship includes a mapping relationship between at least one forwarding node in the target forwarding path and the transmission time domain information of the target DeNet packet.
[0083] In an alternative implementation, when the time domain mode is the stack Stack mode, the first receiving node is other nodes in the target forwarding path except the source node.
[0084] In an alternative implementation, when there are multiple first receiving nodes, each first receiving node corresponds to one first operation instruction.
[0085] In an alternative implementation, when the time domain mode is the Swap mode, the first receiving node is the next-hop forwarding node of the source node in the target forwarding path.
[0086] In an alternative implementation, the transmitted time domain information includes time slot information and period information.
[0087] In an alternative implementation, the first operation instruction is further used to indicate the time domain mode, and the time domain mode is one of the Stack mode and the Swap mode.
[0088] In an alternative implementation, the following at least one item is further encapsulated in the MPLS label stack: a second operation instruction for indicating the flow identifier corresponding to the target DeNet packet; a third operation instruction for indicating the flow sequence information corresponding to the target DeNet packet.
[0089] The packet forwarding device 600 in the embodiments of the present application may be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or a server, a Network Attached Storage (NAS), etc. other than the terminal. The embodiments of the present application do not make specific limitations.
[0090] The packet forwarding device 600 provided in the embodiments of the present application can implement Figure 1 each process implemented by the method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein again.
[0091] As Figure 7 shown, the following is a schematic structural diagram of a packet forwarding device 700 provided in an embodiment of the present application. The device 700 includes: a receiving module 710, configured to receive a target deterministic network (DeNet) packet, where the target DeNet packet includes an MPLS label stack, and a first operation instruction is encapsulated in the MPLS label stack, where the first operation instruction is used to indicate the transmitted time domain information of the target DeNet packet in the MPLS network; a forwarding module 720, configured to forward the target DeNet packet in a multi-protocol label switching (MPLS) network according to the first operation instruction.
[0092] In an alternative implementation, the first operation instruction is further configured to indicate a time domain mode when the target DeNet packet is transmitted, and the time domain mode is one of a stack mode and a swap mode.
[0093] In an alternative implementation, when the time domain mode indicated by the first operation instruction is the stack mode, the forwarding module 720 forwards the target DeNet packet in the MPLS network according to the first operation instruction in the MPLS label stack, including: popping the first operation instruction corresponding to the forwarding node from the MPLS label stack; forwarding the target DeNet packet in the MPLS network according to the MPLS label stack after the popping process.
[0094] In an alternative implementation, when the time domain mode indicated by the first operation instruction is the swap mode, the forwarding module 720 forwards the target DeNet packet in the MPLS network according to the first operation instruction in the MPLS label stack, including: updating the transmission time domain information indicated by the first operation instruction in the MPLS label stack to the transmission time domain information when the second receiving node receives the target DeNet packet according to the time domain information mapping relationship corresponding to the target forwarding path, where the second receiving node is the next-hop forwarding node of the forwarding node in the target forwarding path, and the time domain mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time domain information of the target DeNet packet; sending the target DeNet packet to the second receiving node according to the updated MPLS label stack.
[0095] In an alternative implementation, the transmission time domain information includes time slot information and period information.
[0096] In an alternative implementation, the following at least one item is further encapsulated in the MPLS label stack: a second operation instruction for indicating a flow identifier corresponding to the target DeNet packet; a third operation instruction for indicating a flow sequence information corresponding to the target DeNet packet.
[0097] The packet forwarding device 700 in the embodiments of the present application may be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or a server, a network attached storage (NAS), etc. other than the terminal, and the embodiments of the present application do not make specific limitations.
[0098] The message forwarding device 700 provided by the embodiments of the present application can implement each process implemented by the method embodiments in FIG. 2 and achieve the same technical effects. To avoid repetition, details are not described herein again.
[0099] Figure 8 FIG. shows a schematic hardware structure diagram of an electronic device provided by the embodiments of the present application. Referring to this figure, at the hardware level, the electronic device includes a processor, and optionally, an internal bus, a network interface, and a memory. Among them, the memory may include internal memory, such as high-speed random access memory (Random-Access Memory, RAM), and may also include non-volatile memory, such as at least one disk memory, etc. Of course, the electronic device may also include other hardware required for other services.
[0100] The processor, network interface, and memory can be interconnected through the internal bus. The internal bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only a bidirectional arrow is used in this figure, but it does not mean that there is only one bus or one type of bus.
[0101] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provide instructions and data to the processor.
[0102] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a device for locating a specified user at the logical level. The processor executes the program stored in the memory and is specifically used to execute: Figure 1 or Figure 5 The method disclosed in the illustrated embodiment and implement the functions and beneficial effects of each method described in the foregoing method embodiments are not described herein again.
[0103] The above as in the present application Figure 1 or Figure 5The method disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor or by instructions in the form of software. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0104] The electronic device can also execute the various methods described in the foregoing method embodiments and achieve the functions and beneficial effects of the various methods described in the foregoing method embodiments, which will not be elaborated herein.
[0105] Of course, in addition to the software implementation manner, the electronic device of the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
[0106] The embodiments of the present application also propose a computer-readable storage medium. The computer-readable medium stores one or more programs. When the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device is caused to execute Figure 1 or Figure 5 the method disclosed in the illustrated embodiment and achieve the functions and beneficial effects of the various methods described in the foregoing method embodiments, which will not be elaborated herein.
[0107] Among them, the computer-readable storage medium includes a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, an optical disc, etc.
[0108] Furthermore, an embodiment of the present application also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the following processes are implemented: Figure 1 - Implement the method disclosed in the embodiment shown in Figure 3 and achieve the functions and beneficial effects of the various methods described in the foregoing method embodiments, which will not be elaborated herein.
[0109] In summary, the foregoing are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0110] The systems, devices, modules or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0111] Computer-readable media includes both permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0112] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising said element.
[0113] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and reference can be made to the relevant parts of the method embodiments for the relevant content.
Claims
1. A message forwarding method, applied to a source node in a target forwarding path, the method comprising: Obtain the target forwarding path, and determine a first operation instruction according to the target forwarding path, where the first operation instruction is used to indicate the transmission time domain information of a target deterministic network (DeNet) message in a multi-protocol label switching (MPLS) network; Encapsulate the first operation instruction in the MPLS label stack of the target DeNet message; Transmit the target DeNet message in the MPLS network according to the MPLS label stack.
2. The method according to claim 1, wherein The determining the first operation instruction according to the target forwarding path includes: Obtain the time domain mode when the target DeNet message is transmitted; According to the time domain mode and the time domain information mapping relationship corresponding to the target forwarding path, determine the transmission time domain information when a first receiving node receives the target DeNet message; Determine the first operation instruction according to the transmission time domain information corresponding to the first receiving node; Wherein, the time domain information mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time domain information of the target DeNet message.
3. The method according to claim 2, wherein When the time domain mode is the stack (Stack) mode, the first receiving node is a node other than the source node in the target forwarding path.
4. The method according to claim 3, wherein When there are multiple first receiving nodes, each first receiving node corresponds to one first operation instruction.
5. The method according to claim 2, wherein When the time domain mode is the swap (Swap) mode, the first receiving node is the next-hop forwarding node of the source node in the target forwarding path.
6. The method according to any one of claims 1-5, characterized in that The transmission time domain information includes time slot information and period information.
7. The method according to any one of claims 1-5, characterized in that, The first operation instruction is further used to indicate the time domain mode, and the time domain mode is one of the Stack mode and the Swap mode.
8. The method according to any one of claims 1-5, characterized in that, The following at least one item is further encapsulated in the MPLS label stack: A second operation instruction, used to indicate the flow identifier corresponding to the target DeNet message; A third operation instruction, used to indicate the flow sequence information corresponding to the target DeNet message.
9. A message forwarding method, applied to a forwarding node other than the source node in a target forwarding path, the method comprising: Receive a target deterministic network (DeNet) message, where the target DeNet message includes an MPLS label stack, and a first operation instruction is encapsulated in the MPLS label stack, where the first operation instruction is used to indicate the transmission time domain information of the target DeNet message in the MPLS network; Forward the target DeNet message in the multi-protocol label switching (MPLS) network according to the first operation instruction.
10. The method according to claim 9, characterized in that, The first operation instruction is further used to indicate the time domain mode when the target DeNet message is transmitted, and the time domain mode is one of the stack (Stack) mode and the swap (Swap) mode.
11. The method according to claim 10, wherein When the time domain mode indicated by the first operation instruction is the Stack mode, the forwarding the target DeNet message in the MPLS network according to the first operation instruction in the MPLS label stack includes: Pop the first operation instruction corresponding to the forwarding node from the MPLS label stack; Forward the target DeNet packet in the MPLS network according to the MPLS label stack after the popping process.
12. The method according to claim 10, wherein When the first operation instruction indicates that the time domain mode is the Swap mode, the forwarding of the target DeNet packet in the MPLS network according to the first operation instruction in the MPLS label stack includes: According to the time domain information mapping relationship corresponding to the target forwarding path, update the transmission time domain information indicated by the first operation instruction in the MPLS label stack to the transmission time domain information when the second receiving node receives the target DeNet packet, where the second receiving node is the next-hop forwarding node of the forwarding node in the target forwarding path, and the time domain information mapping relationship includes the mapping relationship between at least one forwarding node in the target forwarding path and the transmission time domain information of the target DeNet packet; Send the target DeNet packet to the second receiving node according to the updated MPLS label stack.
13. The method according to any one of claims 9 to 12, characterized in that, The transmission time domain information includes time slot information and period information.
14. The method according to any one of claims 9 to 12, characterized in that, The following at least one item is further encapsulated in the MPLS label stack: A second operation instruction for indicating the flow identifier corresponding to the target DeNet packet; A second operation instruction for indicating the flow sequence information corresponding to the target DeNet packet.
15. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method according to any one of claims 1-14 are implemented.
16. A computer-readable medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, the steps of the method according to any one of claims 1-14 are implemented.