Packet forwarding method, electronic device, and storage medium

CN115037399BActive Publication Date: 2026-10-20ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110235437.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-03
Publication Date
2026-10-20
Estimated Expiration
2041-03-03

AI Technical Summary

Technical Problem

CQF要求节点间时间同步,然而在大规模三层确定性网络中,节点之间往往难以时间同步,因此在大规模网络中无法直接复用CQF技术提供有效的确定性转发服务

Benefits of technology

[0017]本发明实施例的方案,业务流的转发路径经过的第一节点确定所述业务流的流标识;第一节点根据所述流标识确定业务流中的第一报文的基础时隙编号;第一节点根据所述流标识确定所述第一节点针对所述业务流的时隙偏移量;第一节点根据所述基础时隙编号和所述时隙偏移量确定所述第一报文的入队时隙编号。如此,第一节点在接收到业务流后,根据业务流的流标识确定业务流的第一报文对应的基础时隙编号和时隙偏移量,进而根据基础时隙编号和所述时隙偏移量确定所述第一报文的入队时隙编号,通过转发面为报文提供有界时延和抖动的确定性转发服务。本方案不需要转发路径上的各个节点之间的时间同步,因此尤其适合大规模网络应用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115037399B_ABST
    Figure CN115037399B_ABST
Patent Text Reader

Abstract

The application discloses a message forwarding method, electronic equipment and storage medium. The method comprises the following steps: a first node in a forwarding path of a service flow determines a flow identifier of the service flow; the first node determines a basic time slot number of a first message in the service flow according to the flow identifier; the first node determines a time slot offset of the first node for the service flow according to the flow identifier; and the first node determines an enqueuing time slot number of the first message according to the basic time slot number and the time slot offset. Thus, the first node determines the basic time slot number and the time slot offset corresponding to the first message of the service flow according to the flow identifier of the service flow, and then determines the enqueuing time slot number of the first message according to the basic time slot number and the time slot offset, so that the forwarding surface provides a deterministic forwarding service with bounded time delay and jitter for the message. The present scheme does not need time synchronization between each node on the forwarding path, and is especially suitable for large-scale network applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically to a message forwarding method, an electronic device, and a storage medium. Background Technology

[0002] The Cyclic Queuing and Forwarding (CQF) mechanism proposed by the IEEE Time Sensitive Networking (TSN) working group in the 802.1Qch draft can provide deterministic forwarding services for TSN services. CQF requires time synchronization between nodes; however, in large-scale Layer 3 deterministic networks, time synchronization between nodes is often difficult. Therefore, CQF technology cannot be directly reused to provide effective deterministic forwarding services in large-scale networks. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] This invention provides a message forwarding method, an electronic device, and a storage medium that enable deterministic transmission in large-scale networks.

[0005] In a first aspect, embodiments of the present invention provide a message forwarding method applied to the first node traversed by the forwarding path of a service flow, the method comprising:

[0006] Determine the flow identifier of the service flow;

[0007] The base timeslot number of the first message in the service flow is determined based on the flow identifier;

[0008] The time slot offset of the first node for the service flow is determined based on the flow identifier;

[0009] The enqueue slot number of the first message is determined based on the base slot number and the slot offset.

[0010] Secondly, embodiments of the present invention provide a first node, which is a node traversed by the forwarding path of a service flow, characterized in that it includes:

[0011] The first determining module is used to determine the flow identifier of the service flow;

[0012] The second determining module is used to determine the basic timeslot number of the first message in the service flow based on the flow identifier;

[0013] The third determining module is used to determine the time slot offset of the first node for the service flow based on the flow identifier;

[0014] The fourth determining module is used to determine the enqueue slot number of the first message based on the basic slot number and the slot offset.

[0015] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the transmission method described in the first or second aspect above.

[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the transmission method described in the first or second aspect above.

[0017] In this embodiment of the invention, the first node along the forwarding path of a service flow determines the flow identifier of the service flow; the first node determines the base timeslot number of the first packet in the service flow based on the flow identifier; the first node determines the timeslot offset for the service flow based on the flow identifier; and the first node determines the enqueue timeslot number of the first packet based on the base timeslot number and the timeslot offset. Thus, after receiving a service flow, the first node determines the base timeslot number and timeslot offset corresponding to the first packet of the service flow based on the flow identifier, and then determines the enqueue timeslot number of the first packet based on the base timeslot number and the timeslot offset, providing a deterministic forwarding service with bounded latency and jitter through the forwarding plane. This solution does not require time synchronization between nodes along the forwarding path, making it particularly suitable for large-scale network applications.

[0018] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0019] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0020] Figure 1 This is a schematic diagram of the cyclic scheduling mechanism of CQF;

[0021] Figure 2 This is a flowchart of a message forwarding method provided in an embodiment of the present invention;

[0022] Figure 3 yes Figure 2Flowchart of the sub-steps in step S100;

[0023] Figure 4 This is a schematic diagram of the cyclic scheduling parameter list provided in an embodiment of the present invention;

[0024] Figure 5 yes Figure 2 Flowchart of the sub-steps in step S200;

[0025] Figure 6a yes Figure 2 Flowchart of the sub-steps in step S300;

[0026] Figure 6b yes Figure 2 Flowchart of the sub-steps in step S300;

[0027] Figure 7a This is a schematic diagram of the cyclic scheduling parameter list in Example 1 of the present invention;

[0028] Figure 7b This is a schematic diagram of the basic timeslot number corresponding to each message in Example 1 of the present invention;

[0029] Figure 7c This is a schematic diagram of the enqueue slot number corresponding to each message in Example 1 of the present invention;

[0030] Figure 8 This is a schematic diagram of the structure of a first node provided in an embodiment of the present invention;

[0031] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0033] It should be understood that in the description of the embodiments of the present invention, the use of terms such as "first" and "second" is only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the sequential relationship of the technical features indicated. "At least one" refers to one or more, and "more" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0034] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0035] To facilitate understanding, the relevant technologies of the embodiments of the present invention will be introduced first.

[0036] Please see Figure 1 In the CQF mechanism, each node has multiple buffer queues for buffering packets, each queue corresponding to a timeslot number. These buffer queues form a circular queue, and the packets are forwarded between the queues in a round-robin scheduling manner. In a given timeslot, the queue in the sending state sends packets within a defined timeslot duration (e.g., 10μs), while the other queues receive packets. Through circular enqueueing and forwarding, the end-to-end latency is related to the hop count and timeslot duration, while jitter is only related to the timeslot duration and has an upper bound. However, this scheme requires time synchronization between nodes, and therefore is only suitable for small-scale networks.

[0037] Related technologies have proposed a forwarding plane solution based on time slot label mapping between upstream and downstream nodes. Downstream nodes need to maintain a time slot mapping relationship between upstream and downstream time slot numbers, ensuring that all packets carrying the same time slot number are sent out in the same output time slot, thereby providing a deterministic service with bounded latency and jitter. However, this solution requires carrying time slot label information in the packets, necessitating modifications to existing packet encapsulation, which introduces interoperability and protocol compatibility issues.

[0038] This invention provides a message forwarding method, an electronic device, and a storage medium that enable deterministic transmission in large-scale networks.

[0039] It is understood that before deploying deterministic service flows, users first submit service flow-related information to the controller through the user network interface. The controller can be a Software Defined Network (SDN) controller, and the service flow-related information may include, but is not limited to, application ID, flow ID, traffic model, and Quality of Service (QoS) requirements. The controller reads network parameters, including but not limited to bandwidth and latency, the circular queue template maintained by the port, and the header-to-basic timeslot mapping policy supported by the node. Then, based on the latency and jitter requirements in the service flow's QoS, it determines the forwarding path for that service flow. This forwarding path passes through multiple nodes, for example: node A-node B-node C-node D-node E, with nodes connected by links. The node described in this embodiment can be a specific network device, such as a router or switch.

[0040] Please see Figure 2 This illustration shows a message forwarding method provided by an embodiment of the present invention. This message forwarding method is applied to the first node traversed by the forwarding path of a service flow, where the first node can be any node in the forwarding path. For example... Figure 2 As shown, the message forwarding method of this embodiment includes the following steps:

[0041] S100, determines the flow identifier of the service flow.

[0042] It is understood that, in order to avoid device interoperability and protocol compatibility issues without changing the existing packet encapsulation, the flow identifier (Flow ID) of the service flow in this embodiment of the invention can be a field or a combination of fields from the packet header. For example, Deterministic Networking (DetNet) Multi-Protocol Label Switching (MPLS) packets can use s-label and d-cw as Flow IDs, while DetNet IPv4 / IPv6 packets can use fields such as source IP address, destination IP address, source port, destination port, transport layer protocol type, and priority as Flow IDs.

[0043] Please see Figure 3 Determining the flow identifier of a business flow may include the following steps:

[0044] S101, Identify the type of the received service flow.

[0045] As an example, after receiving a service flow, the first node identifies the type of the service flow, which can be an MPLS packet, an IPv4 / IPv6 packet, etc.

[0046] S102, determine the field containing the flow identifier based on the type of business flow.

[0047] In practical implementation, a mapping relationship between service flow types and the fields containing flow identifiers can be established in advance. After identifying the type of the currently received service flow, the field containing the flow identifier of the currently received service flow is determined according to the mapping relationship between the service flow type and the field containing the flow identifier. For example, when the service flow type is identified as an MPLS packet, the field containing the flow identifier is determined to be s-label and / or d-cw; when the service flow type is identified as a Pv4 / IPv6 packet, the field containing the flow identifier is determined to be a combination of one or more fields from the following: source IP address, destination IP address, source port, destination port, transport layer protocol type, and priority.

[0048] S103, extract the flow identifier from the message header of the service flow based on the field where the flow identifier is located.

[0049] It is understandable that once the field containing the flow identifier is determined, the flow identifier is extracted from the corresponding field in the header of the business flow.

[0050] S200, determine the base timeslot number of the first message in the service flow based on the flow identifier.

[0051] As an example, the controller can pre-establish mapping rules between flow identifiers and base timeslot numbers based on service flows. After determining the forwarding path of a service flow, the controller distributes these mapping rules to each node along that path. The first node, after determining the flow identifier of the current service flow, can then determine the base timeslot number mapped to the first packet of that service flow based on the flow identifier. Here, the first packet belongs to that service flow, which includes one or more packets, and the first packet is any one of those packets.

[0052] It is understandable that when the flow identifier exists in the header field of the business flow, it is equivalent to mapping the basic timeslot based on the header field. In this way, the problem caused by the need to modify the existing message encapsulation when related technologies carry timeslot label information in the message is solved.

[0053] As an example, the controller constructs a cyclic scheduling parameter list for deterministic service flows. The specific form of this cyclic scheduling parameter list can be found in [reference needed]. Figure 4 The table shown is as follows. Figure 4 As shown, the round-robin scheduling parameter list may include the following fields:

[0054] Flow ID: The key-value field of the table entry is used to configure the deterministic business flow ID. When a node receives a business flow message, it first needs to match the Flow ID in the table to determine whether it needs to provide deterministic forwarding service.

[0055] Flow Interval: If the business flow is periodic, configure the period of the business flow in the FlowInterval field; otherwise, this field is null.

[0056] Max Packets PerInterval: If the service flow is periodic, configure the maximum number of packets sent within a single period in this field; otherwise, this field is null.

[0057] Slot Interval: Indicates the duration of a slot in the circular queue;

[0058] Slot Number: Represents the number of slots in the circular queue;

[0059] Slot Mapping Strategy: Represents the mapping rules from message header fields to base slot numbers;

[0060] ΔT: Time slot offset, obtained by the self-learning of the nodes in the forwarding plane, with an initial value of Null.

[0061] It should be noted that, Figure 4 The illustrated list of round-robin scheduling parameters is for illustrative purposes only. In a real implementation, the list of round-robin scheduling parameters can be more specific. Figure 4 The template shown may contain more or fewer fields, and this embodiment of the invention does not impose excessive limitations on this.

[0062] It is understandable that the controller distributes a list of round-robin scheduling parameters for deterministic service flows to each node belonging to that controller, guiding each node to perform round-robin scheduling. When a deterministic service flow needs to be forwarded deterministically, since the controller has previously distributed the round-robin scheduling parameter list to each node along the service flow's forwarding path, each node along the forwarding path performs round-robin scheduling for that deterministic service flow based on the unified round-robin scheduling parameter list.

[0063] It is understandable that the upstream and downstream nodes of the forwarding path use the same list of cyclic scheduling parameters, that is, they have the same time slot duration and number of cache queues, and the time slot polling frequency is synchronized.

[0064] Optionally, when the first node determines the flow identifier of the service flow, it also searches the pre-set list of cyclic scheduling parameters based on the flow identifier of the service flow. If the search is successful, it determines the base timeslot number of the first packet in the service flow based on the flow identifier; otherwise, it processes the service flow according to the original forwarding process.

[0065] For example, when the first node receives a service flow, it first determines the Flow ID of the service flow, such as s-label for DetNet MPLS packets and n-tuple for DetNet IPv4 / IPv6 packets; then it uses the Flow ID as the key to look up the list of round-robin scheduling parameters. If the lookup is successful, it indicates that deterministic forwarding service needs to be provided for the service flow; otherwise, it is processed according to the original forwarding process.

[0066] Please see Figure 5 For example, determining the base timeslot number of the first message in a service flow based on the flow identifier may include:

[0067] S201, based on the flow identifier, find the mapping rule corresponding to the flow identifier from the preset round-robin scheduling parameter list. The mapping rule includes key field indication information for mapping.

[0068] S202, Determine the key field value from the header of the first message based on the key field indication information;

[0069] S203, determine the base time slot number for mapping key field values ​​according to the mapping rules.

[0070] For example, after the first node determines the Flow ID of the currently received service flow 1, it looks up the corresponding Slot Mapping Strategy from the preset round-robin scheduling parameter list. This strategy indicates the base time slot number of the message based on the message sequence number. Here, the key field indicating information in the mapping strategy corresponding to the Flow ID is the message sequence number. After determining that the key field indicating information is the message sequence number, the message sequence number is extracted from the header of the first message, and then the base time slot number mapped to this message sequence number is determined according to the mapping strategy.

[0071] S300 determines the time slot offset of the first node for the service flow based on the flow identifier.

[0072] Please see Figure 6a In some embodiments, determining the time slot offset of the first node relative to the service flow based on the flow identifier includes:

[0073] S310: Based on the flow identifier, find the time slot offset corresponding to the flow identifier from the preset list of cyclic scheduling parameters.

[0074] It is understandable that after determining the flow ID of the currently received service flow, the first node can look up the ΔT corresponding to the current Flow ID from the preset list of cyclic scheduling parameters. If the ΔT field is not null, the time slot offset corresponding to the flow ID can be determined.

[0075] It is understandable that if the ΔT field corresponding to the current Flow ID in the preset cyclic scheduling parameter list is null, then the first node needs to learn its own time slot offset for the current business flow.

[0076] Please see Figure 6b In some embodiments, determining the time slot offset of the first node relative to the service flow based on the flow identifier includes:

[0077] S320: Based on the flow identifier, look up the time slot duration and number of time slots corresponding to the flow identifier from the preset cyclic scheduling parameter list;

[0078] For example, combining Figure 4 By searching the list of cyclic scheduling parameters for the SlotInterval and Slot Number fields corresponding to the current Flow ID, the time slot duration and number of time slots corresponding to the flow identifier can be obtained.

[0079] S321, Obtain the delay reference value of the first node, and determine the delay interval based on the delay reference value and the time slot duration;

[0080] For example, the delay reference value can be determined by the maximum forwarding delay value between the ingress port and the egress port of the first node. Assuming the delay reference value is maxdelay, the delay interval Δt can be determined by the following formula (1) based on the delay reference value maxdelay and the time slot duration t indicated in the cyclic scheduling parameter list:

[0081] Δt=maxdelay / t (1)

[0082] S322, obtain the time slot number currently scheduled for the first node.

[0083] For example, the time slot number corresponding to the queue that the first node is currently in the sending state is 3, that is, the time slot number currently scheduled by the first node is 3.

[0084] S323 determines the time slot offset based on the base time slot number, the currently scheduled time slot number, the delay interval, and the number of time slots.

[0085] For example, after determining the base timeslot number of the current first message, the timeslot number currently scheduled by the first node, the delay interval, and the number of timeslots, the timeslot offset of the current first message can be determined, which can be calculated using the following formula:

[0086] ΔT=(T2+Δt-T1+N)%N (2)

[0087] Where ΔT represents the time slot offset, T1 represents the base time slot number, T2 represents the currently scheduled time slot number, Δt represents the delay interval, and N represents the number of time slots.

[0088] It should be noted that the method of calculating the time slot offset using formula (2) provided in the embodiments of the present invention is only illustrative. Other calculation formulas obtained by transforming formula (2) can also be used to calculate the time slot offset. The embodiments of the present invention do not impose too many restrictions on this.

[0089] It is understandable that through the above steps S320 to S323, the first node can achieve self-learning of the time slot offset of the current service flow.

[0090] It is understandable that after determining the timeslot offset for the service flow, the first node will also record the timeslot offset in the preset cyclic scheduling parameter list for use by subsequent packets.

[0091] S400 determines the enqueue slot number of the first message based on the base slot number and slot offset.

[0092] It is understandable that after determining the timeslot offset, the base timeslot number is offset based on this offset to determine the enqueue timeslot number of the first message. The enqueue timeslot number obtained in this way can prevent the first node from failing to schedule in a timely manner, thereby ensuring the queuing delay of messages at the first node.

[0093] It is understandable that when the polling schedule reaches the enqueue slot number of the first message, the first message is sent to the next hop node, thus completing the forwarding of the first message at the current first node.

[0094] The following examples illustrate the message forwarding method of this invention.

[0095] Example 1:

[0096] Assume that the maximum processing delay (maxDelay) of node A is 40µs, and the list of cyclic scheduling parameters configured for node A is as follows: Figure 7a As shown, the list contains the cyclic scheduling parameters for a single business flow.

[0097] Suppose node A receives two IPv4 traffic flows. The 5-tuple for traffic flow 1 is {192.168.2.1,192.168.3.1,500,1000,10}, and the 5-tuple for traffic flow 2 is {192.168.1.1,192.168.2.2,1000,2000,10}.

[0098] For the business flow 1 message, node A extracts the message's 5-tuple and searches the list of cyclic scheduling parameters. The match fails, so the message is processed in the original way, such as sending the message into the outgoing port queue based on priority.

[0099] For the service flow 2 message, node A extracts the message's 5-tuple and searches the round-robin scheduling parameter list. A successful match indicates that the service flow 2 message needs to be processed according to the scheme of this embodiment. Based on the Slot Mapping Strategy field in the table entry, the basic time slot mapping is calculated based on the message sequence number. Assume the time slot mapping calculation formula used is:

[0100]

[0101] Where T1 represents the basic time slot number, cycle1 represents the service cycle, and t represents the time slot duration.

[0102] Combination Figure 7b The calculation results for the base timeslot number of each message in this example are as follows:

[0103] For Sequence Number = 1, the basic timeslot number is T11 = (1 * 150 / 20 / 3) % 5 = 2;

[0104] For Sequence Number = 2, the basic time slot number is T12 = (2 * 150 / 20 / 3) % 5 = 0;

[0105] For Sequence Number = 3, the basic time slot number is T13 = (3 * 150 / 20 / 3) % 5 = 2;

[0106] For Sequence Number = 4, the basic time slot number is T14 = (4 * 150 / 20 / 3) % 5 = 0;

[0107] For Sequence Number = 5, the basic time slot number is T15 = (5 * 150 / 20 / 3) % 5 = 2; ......

[0109] Based on the above calculation results, the base time slot number of the message with Sequence Number = 1 is 2. Looking up the ΔT field in the table entry, we find that ΔT is null. Therefore, ΔT is calculated using the node's self-learning method. The currently scheduled time slot number is 3. According to the formula (2) described earlier, ΔT = (3 + 2 - 2 + 5) % 5 = 3 is calculated. The node saves the calculated ΔT value into the table entry of the cyclic scheduling parameter list corresponding to the service flow.

[0110] Then, for a message with Sequence Number = 1, its enqueue slot number can be easily calculated as: cycle 入1= (T11+ΔT)%N=(2+3)%5=0, the node caches the message with Sequence Number=1 into the queue with time slot number 0 according to the calculation result. When the scheduler polls the queue with time slot number 0, it schedules and sends out the first message of the service flow.

[0111] For the second packet of received service flow 2 (Sequence Number = 2), the basic timeslot number mapping calculation method is the same as that for the first packet. Based on the above calculation result, the basic timeslot number is 0. When looking up the ΔT field in the table entry, ΔT = 3 is found. Therefore, the timeslot is directly offset to obtain the enqueue timeslot number of the second packet as: cycle. 入2 =(T12+ΔT)%N=(0+3)%5=3.

[0112] For the third packet of received service flow 2 (Sequence Number = 3), the basic timeslot number mapping calculation method is the same as that for the first packet. Based on the above calculation result, the basic timeslot number is 2. When looking up the ΔT field in the table entry, ΔT = 3 is found. Therefore, the timeslot is directly offset to obtain the enqueue timeslot number of the third packet as: cycle. 入3 =(T13+ΔT)%N=(2+3)%5=0.

[0113] For the fourth, fifth, sixth, ... messages received in subsequent traffic flows 2, the methods for mapping the basic timeslot number and calculating the enqueue timeslot number using timeslot offsets are the same as those for the second and third messages mentioned above, and therefore will not be repeated here. The final enqueue timeslot number for each message can be found in [reference needed]. Figure 7c .

[0114] Example 2:

[0115] This embodiment illustrates the strategy of using a hash algorithm to calculate the basic time slot mapping based on the message header Flow ID, that is, the basic time slot number T1 = hash(FlowID)%N, which means that a hash calculation is first performed based on the Flow ID, and then the basic time slot number is obtained by taking the modulo of the number of circular queues.

[0116] Suppose there are five DetNet MPLS service flows with Flow IDs s-label = 1, 2, 3, 4 and 5 respectively, and assume the number of time slots in the cyclic scheduling parameter list is N = 5.

[0117] Assume that the corresponding fields in the round-robin scheduling parameter list indicate that a hash algorithm is used to perform basic time slot mapping based on the Flow ID in the service flow packet header, and the hash calculation result of the Flow ID of each DetNet MPLS service flow is as follows:

[0118] For the first business flow, hash(1) = 150;

[0119] For the second business flow, hash(2) = 12;

[0120] For the third business flow, hash(3) = 34;

[0121] For the fourth business flow, hash(4) = 14;

[0122] For the fifth business flow, hash(5) = 53.

[0123] The basic timeslot mapping for each service flow packet is easily calculated based on T1 = hash(FlowID) % N. The calculation results are as follows:

[0124] For Flow ID=1, the basic time slot number is 150%5=0;

[0125] For Flow ID=2, the basic time slot number is 12%5=2;

[0126] For Flow ID=3, the basic time slot number is 34%5=4;

[0127] For Flow ID=4, the basic time slot number is 14%5=4;

[0128] For Flow ID=5, the basic time slot number is 53%5=4.

[0129] It should be noted that the corresponding basic time slot numbering calculation strategy can be flexibly adopted according to the actual application scenario requirements. The value examples in this embodiment are only for explanation and are not intended to limit the embodiments of the present invention.

[0130] Example 3:

[0131] This example further illustrates the calculation of the time slot offset ΔT.

[0132] Assume the formula for calculating ΔT is: ΔT=(T2+Δt-T1+N)%N

[0133] Where ΔT represents the time slot offset, T1 represents the base time slot number, T2 represents the currently scheduled time slot number, Δt represents the delay interval, and N represents the number of time slots.

[0134] Here, since (T2+Δt-T1) may be negative, N needs to be added before taking the modulus of the number of time slots N.

[0135] Assuming the maximum processing delay of the node is maxDelay is 20us, the base time slot number T1 of the first packet is calculated to be 4 according to the time slot calculation strategy. When the node receives the first packet, the time slot number it is currently in the scheduling state is 0. The number of time slots in the cyclic scheduling parameter list is N=5, and the time slot duration is t=10us. The time slot offset of this service flow is calculated as follows:

[0136] ΔT=(T2+Δt-T1+N)%N=(0+20 / 10-4+5)%5=3;

[0137] For the first message of this service, after offset adjustment ΔT = 3, the enqueue slot for this message is:

[0138] cycle 入 =(T1+ΔT)%N=(4+3)%5=2;

[0139] Assuming another message for this service is subsequently received, and the base timeslot number T1 obtained according to the timeslot mapping calculation strategy is 3, then after timeslot offset adjustment ΔT = 3, the enqueue timeslot of this message will be:

[0140] cycle 入 =(T1+ΔT)%N=(3+3)%5=1.

[0141] In this embodiment of the invention, after receiving a service flow, the first node determines the basic timeslot number and timeslot offset corresponding to the first packet of the service flow based on the flow identifier. Then, it determines the enqueue timeslot number of the first packet based on the basic timeslot number and timeslot offset, providing a deterministic forwarding service with bounded latency and jitter through the forwarding plane. This solution does not require time synchronization between nodes along the forwarding path, making it particularly suitable for large-scale network applications. Using the forwarding method provided in this embodiment, intermediate nodes do not introduce additional jitter, and the maximum end-to-end jitter is 2*t, where t is the timeslot duration in the cyclic scheduling parameter list.

[0142] Please see Figure 8 This embodiment of the invention also provides a first node 400, which is a node traversed by the forwarding path of the service flow, characterized in that it includes:

[0143] The first determining module 410 is used to determine the flow identifier of the service flow;

[0144] The second determining module 420 is used to determine the basic timeslot number of the first message in the service flow based on the flow identifier;

[0145] The third determining module 430 is used to determine the time slot offset of the first node for the service flow based on the flow identifier;

[0146] The fourth determining module 440 is used to determine the enqueue slot number of the first message based on the basic slot number and the slot offset.

[0147] For example, the first determining module 410 specifically includes:

[0148] The identification unit is used to identify the type of the received service flow;

[0149] The first determining unit determines the field containing the flow identifier based on the type of the business flow.

[0150] The extraction unit extracts the flow identifier from the message header of the business flow based on the field where the flow identifier is located.

[0151] For example, the second determining module 420 specifically includes:

[0152] The first lookup unit is used to look up the mapping rule corresponding to the flow identifier from the preset list of cyclic scheduling parameters. The mapping rule includes key field indication information for mapping.

[0153] The second determining unit is used to determine the value of the key field from the header of the first message based on the key field indication information;

[0154] The third determining unit is used to determine the base time slot number for mapping key field values ​​according to the mapping rules.

[0155] For example, the third determining module 430 specifically includes:

[0156] The second lookup unit is used to look up the time slot duration and number of time slots corresponding to the flow identifier from a preset list of cyclic scheduling parameters.

[0157] The fourth determining unit is used to obtain the delay reference value of the first node and determine the delay interval based on the delay reference value and the time slot duration;

[0158] The acquisition unit is used to acquire the time slot number currently scheduled by the first node;

[0159] The fifth determining unit is used to determine the time slot offset based on the base time slot number, the currently scheduled time slot number, the delay interval, and the number of time slots.

[0160] For example, the second lookup unit is also configured to: look up the time slot offset corresponding to the flow identifier from a preset list of cyclic scheduling parameters based on the flow identifier.

[0161] For example, the third determining module 430 further includes:

[0162] The recording unit is used to record the time slot offset in a preset list of cyclic scheduling parameters.

[0163] For example, the first node 400 in this embodiment of the invention further includes:

[0164] The scheduling module is used to send the first message to the next hop node when the first message is scheduled to be enqueued in the poll.

[0165] For example, a round-robin scheduling parameter list is pre-set in each node through which the service flow passes, and the round-robin scheduling parameter list is used to guide each node to perform round-robin scheduling.

[0166] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0167] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0168] Please see Figure 9 The present invention illustrates an electronic device 500 provided in an embodiment of the present invention, including: a memory 510, a processor 520, and a computer program stored on the memory 510 and executable on the processor 520.

[0169] The processor 520 and memory 510 can be connected via a bus or other means.

[0170] Memory 510, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 510 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to processor 520, and these remote memories can be connected to processor 520 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0171] The non-transient software program and instructions required to implement the transmission method of the above embodiments are stored in the memory 510. When executed by the processor 520, the message forwarding method in any of the above embodiments is executed.

[0172] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0173] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that is executed by a processor or controller. When the computer program is executed by the processor or controller, the message forwarding method in any of the above embodiments is performed.

[0174] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0175] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A message forwarding method, applied to the first node traversed by the forwarding path of a service flow, the method comprising: Determine the flow identifier of the service flow; The base timeslot number of the first message in the service flow is determined based on the flow identifier; The time slot offset of the first node for the service flow is determined based on the flow identifier; The enqueue slot number of the first message is determined based on the base slot number and the slot offset; Determining the time slot offset of the first node for the service flow based on the flow identifier includes: Based on the flow identifier, the time slot duration and number of time slots corresponding to the flow identifier are searched from the preset cyclic scheduling parameter list; Obtain the latency reference value of the first node, and determine the latency interval based on the latency reference value and the time slot duration, wherein the latency reference value is determined based on the maximum forwarding latency value between the ingress port and the egress port of the first node; Obtain the time slot number currently scheduled for the first node; The time slot offset is determined based on the base time slot number, the currently scheduled time slot number, the delay interval, and the number of time slots.

2. The method according to claim 1, characterized in that, Determining the base timeslot number of the first packet in the service flow based on the flow identifier includes: The mapping rule corresponding to the flow identifier is found from a preset list of cyclic scheduling parameters based on the flow identifier. The mapping rule includes key field indication information for mapping. The key field values ​​are determined from the header of the first message based on the key field indication information; The base time slot number to which the key field value is mapped is determined according to the mapping rule.

3. The method according to claim 1, characterized in that, Determining the time slot offset of the first node for the service flow based on the flow identifier includes: The time slot offset corresponding to the flow identifier is retrieved from the preset list of cyclic scheduling parameters based on the flow identifier.

4. The method according to claim 1, characterized in that, After determining the time slot offset based on the base time slot number, the currently scheduled time slot number, the delay interval, and the number of time slots, the method further includes: The time slot offset is recorded in the preset list of cyclic scheduling parameters.

5. The method according to any one of claims 1-4, characterized in that, The cyclic scheduling parameter list is preset in each node through which the service flow passes, and the cyclic scheduling parameter list is used to guide each node to perform cyclic polling scheduling.

6. The method according to claim 1, characterized in that, Also includes: When the polling schedule reaches the enqueue slot number of the first message, the first message is sent to the next hop node.

7. The method according to claim 1, characterized in that, Determining the flow identifier of the service flow includes: Identify the type of the received service flow; The field containing the flow identifier is determined based on the type of the service flow; The flow identifier is extracted from the header of the service flow based on the field containing the flow identifier.

8. A message forwarding node, wherein the message forwarding node is a node traversed by the forwarding path of a service flow, characterized in that, include: The first determining module is used to determine the flow identifier of the service flow; The second determining module is used to determine the basic timeslot number of the first message in the service flow based on the flow identifier; The third determining module is used to determine the time slot offset of the packet forwarding node for the service flow based on the flow identifier; The fourth determining module is used to determine the enqueue slot number of the first message based on the basic slot number and the slot offset; Determining the time slot offset of the packet forwarding node for the service flow based on the flow identifier includes: Based on the flow identifier, the time slot duration and number of time slots corresponding to the flow identifier are searched from the preset cyclic scheduling parameter list; Obtain the delay reference value of the packet forwarding node, and determine the delay interval based on the delay reference value and the time slot duration, wherein the delay reference value is determined based on the maximum forwarding delay value between the ingress port and egress port of the packet forwarding node; Obtain the time slot number currently scheduled by the message forwarding node; The time slot offset is determined based on the base time slot number, the currently scheduled time slot number, the delay interval, and the number of time slots.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the message forwarding method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the message forwarding method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Message sending method, network node and system

    CN110474853A