Message sending method, electronic equipment and readable storage medium

By determining the order value of the service packet in the queue to be sent on the outgoing port in the target node based on the reception time and delay deviation of the service packets, the problem of sending messages in the prior art is solved, and a lower delay lower bound and a higher service service quality are achieved.

CN119814680APending Publication Date: 2025-04-11ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311305088.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, messages are limited to a specified time slot and are difficult to meet the service requirements of a service flow requiring a lower delay boundary.

Method used

After receiving the service message on the target node, the target time when the service message reaches the outbound port of the target node is determined based on the reception time of the service message, the first time deviation of the target node and the forwarding delay within the node. Then, the transmission in progress slot corresponding to the outgoing port at the target time is obtained, and the sort value of the service message in the queue to be sent on the outgoing port is determined based on the time offset between the transmission in progress and the target outgoing time slot. Save the service packets in the queue to be sent according to the size of the sorted value.

Benefits of technology

While providing a guaranteed upper delay boundary, it provides a lower latency lower boundary to meet richer business needs, especially requiring lower latency lower boundary services, further improving the service quality of the business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814680A_ABST
    Figure CN119814680A_ABST
Patent Text Reader

Abstract

The invention discloses a message sending method, electronic equipment and a readable storage medium, and belongs to the field of data communication. The method comprises the following steps: after a target node receives a service message, determining a target moment when the service message arrives at an output port of the target node according to a receiving moment of the service message, a first time deviation when the target node receives the service message and an intra-node forwarding delay of the target node; obtaining a sending in-progress time slot in a sending state corresponding to the output port at the target moment, and determining a sorting value of the service message in a to-be-sent queue of the output port according to a time offset between the sending in-progress time slot and a target output time slot; and storing the service message in a to-be-sent queue according to the size of the sorting value for sending. Through the mode, a lower time delay lower bound can be provided while a guaranteed time delay upper bound is provided, so that richer service requirements can be met, and the service quality of services is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of packet switching technology in the field of data communication, and in particular to a method for sending a message, an electronic device, and a readable storage medium. Background Art

[0002] The draft draft-peng-detnet-packet-timeslot-mechanism-03 released by the Internet Engineering Task Force (IETF) describes a time slot-based queuing and forwarding mechanism (TQF for short), which turns time slots into resources and opens and reserves them for services. The draft describes a scheme for time slot resource allocation and notification. At the ingress node of the network, corresponding outbound time slot resources are reserved on the egress port for service flows with corresponding arrival times; at the intermediate node in the network, corresponding outbound time slot resources are reserved on the egress port for service flows with corresponding inbound time slots.

[0003] This solution mainly uses round-robin queues to support time slot-based message scheduling. Usually, one time slot corresponds to one queue, providing guaranteed delay and delay jitter for business flows. However, this solution only supports sending messages within the specified time slot and cannot be sent in advance. Therefore, it always experiences a constant upper limit of delay, which makes it difficult to meet the business needs of business flows that require a lower lower limit of delay. Summary of the invention

[0004] The embodiments of the present application provide a method for sending a message, an electronic device and a readable storage medium, so as to solve the problem in related methods that the message is limited to be sent within a specified time slot, which makes it difficult to meet the business needs of business flows that require a lower delay limit.

[0005] In a first aspect, an embodiment of the present application provides a method for sending a message, including:

[0006] After receiving the service message, the target node determines the target time when the service message arrives at the egress port of the target node according to the reception time of the service message, the first time deviation of the target node receiving the service message, and the intra-node forwarding delay of the target node;

[0007] Obtaining a sending-in-progress time slot in a sending state corresponding to the egress port at the target time, and determining a ranking value of the service message in a queue to be sent at the egress port according to a time offset between the sending-in-progress time slot and a target outgoing time slot; wherein the target outgoing time slot is an outgoing time slot reserved for the service message within a scheduling cycle of the egress port of the target node;

[0008] The service message is stored in the queue to be sent according to the size of the ranking value.

[0009] In a second aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect above are implemented.

[0010] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0011] The method for sending messages provided in the embodiment of the present application, after receiving the service message, the target node determines the target time for the service message to arrive at the egress port of the target node according to the reception time of the service message, the first time deviation of the target node receiving the service message and the intra-node forwarding delay of the target node; obtains the sending-in-progress time slot in the sending state corresponding to the egress port at the target time, and determines the ranking value of the service message in the queue to be sent of the egress port according to the time offset between the sending-in-progress time slot and the target outgoing time slot; and stores the service message in the queue to be sent according to the size of the ranking value for sending.

[0012] Compared with the existing sending method in which service messages are sent within a specified time slot and one time slot corresponds to one queue, after receiving the service message, the target node in the embodiment of the present application determines the sorting value of the service message according to the time offset between the ongoing sending time slot corresponding to the target moment when the service message arrives at the egress port and the reserved target outgoing time slot, and then stores the service message in the corresponding position of the queue to be sent according to the sorting value, so as to send the service messages in the queue to be sent in an orderly manner. In this way, while providing a guaranteed upper delay bound, a lower lower delay bound can be provided, thereby meeting more abundant business needs, especially business flows that require a lower lower delay bound, and further improving the service quality of the business.

[0013] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0015] Figure 1 A schematic diagram of a process of sending a message provided in an embodiment of the present application is shown;

[0016] Figure 2 A schematic diagram showing a deterministic forwarding path provided by an embodiment of the present application and corresponding orchestration cycles on each node port included in the path;

[0017] Figure 3 A schematic diagram showing the mapping relationship between sub-bursts and time slots on a head node port provided by an embodiment of the present application is shown;

[0018] Figure 4 A schematic diagram showing a mapping relationship between an actual arrival time and a start time of a target inbound timeslot when an intermediate node receives a service message provided by an embodiment of the present application;

[0019] Figure 5 A schematic diagram of a deterministic forwarding path provided by an embodiment of the present application is shown;

[0020] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] The standard RFC8655 released by IETF describes the architecture of deterministic networks and defines the Quality of Service (QoS) objectives of deterministic forwarding: the minimum and maximum delays from source to destination, as well as bounded delay jitter; the allowed packet loss rate; and the upper bound of out-of-order packet delivery.

[0023] In order to achieve these goals, deterministic networks use resource reservation, explicit routing, service protection and other means. In general, a deterministic path is a strictly explicit path calculated by a centralized controller, and resources are reserved at nodes along the path to meet the SLA (Service Level Agreement) requirements of deterministic services. Specifically, corresponding outbound time slot resources can be reserved on the egress port for service flows with corresponding arrival times at the ingress node of the network; corresponding outbound time slot resources can be reserved on the egress port for service flows with corresponding inbound time slots at the intermediate nodes in the network. This method usually uses a round-robin queue to support time slot-based message scheduling. Generally, one time slot corresponds to one queue. This message scheduling method can provide guaranteed delay and delay jitter for service flows, but only supports service messages to be sent within the specified time slot, and cannot be sent in advance, which makes it difficult to meet the service requirements of service flows that require a lower delay limit.

[0024] In response to the technical problems existing in the message forwarding process in the above-mentioned related technologies, an embodiment of the present application provides a method for sending messages. In order to meet more abundant business needs, especially business flows that require a lower lower bound on latency, an embodiment of the present application provides a time slot scheduling mechanism based on an ordered queue (sorted-queue) to provide a lower lower bound on latency while providing a guaranteed upper bound on latency. The ordered queue (sorted-queue) here is different from the traditional FIFO (first-in first-out) queue. It can support certain sorting rules (such as priority, time) to sort the messages inserted into the queue. That is, the messages inserted into the queue are not always inserted at the end of the queue like FIFO, but can be inserted at the appropriate position according to the sorting rules, but always get the message from the head of the queue to send. Specifically, Figure 1 A flow chart of a method for sending a message provided in an embodiment of the present application is shown. As shown in the figure, the method 100 for sending a message may include the following steps:

[0025] S101: After receiving a service message, the target node determines a target time for the service message to arrive at an egress port of the target node according to the reception time of the service message, the first time offset of the target node receiving the service message, and the intra-node forwarding delay of the target node;

[0026] S102: Acquire a sending-in-progress time slot in a sending state corresponding to the egress port at the target time, and determine a ranking value of the service message in a queue to be sent at the egress port according to a time offset between the sending-in-progress time slot and a target outgoing time slot;

[0027] The target outgoing time slot is an outgoing time slot reserved for the service message within the scheduling cycle of the outgoing port of the target node;

[0028] S103: storing the service message in the queue to be sent according to the size of the ranking value.

[0029] Through the above steps, since the target node determines the sorting value of the service message after receiving the service message, and then stores the service message in the queue to be sent according to the sorting value, each service message is stored in the corresponding position of the queue to be sent according to the sorting value, so that the service messages are sent in order in the queue to be sent, and the sorting value of the service message is determined according to the time offset between the sending time slot corresponding to the target time when the service message arrives at the egress port and the reserved target outgoing time slot. In this way, a lower delay lower bound can be provided while providing a guaranteed delay upper bound, thereby meeting more abundant business needs, especially business flows that require a lower delay lower bound, and further improving the service quality of the business.

[0030] This is explained with specific examples. Figure 2 As shown, a deterministic forwarding path includes a head node H, an intermediate node P (may include multiple nodes, not shown in the figure), and a tail node E, which is used to transmit a service flow sent from the source client side src to the destination client side dst.

[0031] On each port of each node included in the deterministic forwarding path, an orchestration period instance of the same specific length is enabled to allocate time slot resources for services within the range of the orchestration period. For example, an orchestration period instance of length OPL is enabled on port port-h1 of the head node H, and the orchestration period includes N1 time slots, an orchestration period instance of length OPL is enabled on port port-h2 of the head node H, and the orchestration period includes N2 time slots, and an orchestration period instance of length OPL is enabled on port port-p2 of the intermediate node P, and the orchestration period instance of length OPL is enabled, and the orchestration period includes N3 time slots.

[0032] Here, the reason why each port has a different number of time slots is that the configured time slot lengths are different. For example, the time slot length of port-h1 is TL1, the time slot length of port-h2 is TL2, and the time slot length of port-p2 is TL3. The time slots in each scheduling cycle are numbered starting from 0.

[0033] Taking the orchestration cycle instance enabled on the port port-h1 of the head node with the length of OPL orchestration cycle as an example, it takes the time T_base1 as the start of the first round of orchestration cycle, and then starts the second round of orchestration cycle at T_base1+OPL, and so on. The formed orchestration cycle sequence is abbreviated as OP-sequence-1.

[0034] Similarly, when an orchestration cycle instance with a length of OPL is enabled on the port port-h2 of the head node, it takes the time T_base2 as the start of the first round of orchestration cycle, and then starts the second round of orchestration cycle at T_base2+OPL, and so on. The formed orchestration cycle sequence is abbreviated as OP-sequence-2.

[0035] When an orchestration cycle instance with a length of OPL is enabled on the port port-p2 of the intermediate node P, it takes the time T_base3 as the start of the first round of orchestration cycle, and then starts the second round of orchestration cycle at T_base3+OPL, and so on. The formed orchestration cycle sequence is abbreviated as OP-sequence-3.

[0036] It should be noted that the time of each port within the node must be synchronized, that is, all ports of a node share the same set of local system time. For example, the above T_base1 and T_base2 are generally different local times within the head node H, and they can be configured as the same local time. In this way, whether it is a node restart or a port restart, these initial moments of the orchestration cycle (i.e., T_base1, or T_base2, or T_base3) can continue to be effective to avoid affecting the time slot mapping relationship between nodes. In practical applications, considering that with the passage of time, T_base is a historical moment that is too far away from the current system time, T_base will be updated regularly (for example, according to T_base=T_base+k*OPL, k is a natural number) to be closer to the current system time, but the updated value cannot exceed the current system time.

[0037] The message forwarded along the above-mentioned deterministic path will be forwarded in the specific outgoing time slot of the egress port of each target node, where the target nodes include the head node, the intermediate node and the tail node. For example, the message is first sent in the time slot z1 of the egress port port-h2 of the head node H, and then sent in the time slot z2 of the egress port port-p2 of the intermediate node P, and so on, until the tail node.

[0038] After receiving the service message, the target node determines the ranking value rank of the service message, and inserts the service message into the appropriate position of the queue to be sent according to the rank. Here, the appropriate position can be understood as the position corresponding to the ranking value rank in the queue to be sent. The rank determination process can be performed on the board where the ingress port of the target node is located, and then forwarded to the board where the egress port is located as auxiliary information along with the service message through internal switching, for queuing in the ordered queue of the egress port.

[0039] The target node determines the target time when the service message arrives at the egress port of the target node according to the reception time A of the service message, the first time deviation E of the target node receiving the service message, and the intra-node forwarding delay F of the target node. In a possible implementation, the target time t=A+E+F, wherein for the first time deviation E, the head node H can calculate it according to the time deviation between the "target inbound time slot" and the "actual inbound time slot" of the message, and the intermediate node P can directly obtain E from the service message (carried by the upstream node when sending). Note: E will be updated when sending at each hop. Then, the sending in-progress time slot in the sending state corresponding to the egress port at the target time is obtained, and the ranking value rank of the service message in the queue to be sent at the egress port is determined according to the time offset between the sending in-progress time slot and the target egress time slot.

[0040] In a possible implementation, in the above step S102, determining the ranking value of the service message in the queue to be sent of the egress port according to the time offset between the sending-in-progress time slot and the target outgoing time slot includes:

[0041] According to the scheduling cycle information of the egress port of the target node, the starting time of the sending time slot is determined; according to the starting time of the sending time slot and the time offset between the sending time slot and the target outgoing time slot, the starting time of the target outgoing time slot is determined; according to the starting time of the target outgoing time slot, the ranking value of the service message in the queue to be sent at the egress port is determined.

[0042] It can be seen from this that rank can be the starting time of the target outgoing time slot, and of course it can also be the middle time or end time of the target outgoing time slot. For the convenience of calculation, the embodiment of the present application determines the starting time of the target outgoing time slot as the ranking value rank, and stores the service message in the queue to be sent according to the size of the rank. This can provide a guaranteed upper limit of the delay while providing a lower lower limit of the delay.

[0043] Since each scheduling cycle contains the same target outbound time slot, it is necessary to determine the correct round of the scheduling cycle. Among them, the above scheduling cycle information may include the start time of the first scheduling cycle, the length of the scheduling cycle, the length of the outbound time slot, and the number of time slots included in the scheduling cycle; specifically, the start time of the time slot in progress of transmission can be determined by the following method:

[0044] t_j_begin = T_base + n * OPL + j * TL;

[0045] Among them,

[0046]

[0047] Among them, t_j_begin represents the start time of the time slot j in progress of transmission, T_base represents the start time of the first scheduling cycle, n represents the round of the scheduling cycle (note: the round of the first round is 0), OPL represents the length of the scheduling cycle, TL represents the length of the outbound time slot, represents taking the integer part, t represents the target time, % represents the modulo operation, and N represents the number of time slots included in the scheduling cycle.

[0048] It should be noted that t - T_base represents how much time has passed from T_base to t, and its implicit meaning is that T_base is earlier than t. In specific applications, the value of t is limited by the number of bits of the register and has a maximum value, so t may flip, resulting in the situation where t < T_base. At this time, t - T_base can be modified to (t - T_base + T_max) % T_max, where T_max represents the maximum value that triggers the flip to 0.

[0049] Furthermore, the start time of the target outbound time slot can be determined by the following method:

[0050] t_z_begin = t_j_begin + t_diff;

[0051] Among them, t_diff = [(z - j + N) % N] * TL;

[0052] Among them, t_z_begin represents the start time of the target outbound time slot z, and t_diff represents the time offset between the time slot j in progress of transmission and the target outbound time slot z.

[0053] In the above calculation process, t_z_begin is not directly calculated like t_j_begin because there may be a situation where z < j in the time slot number (for example, j is at the end of the current scheduling cycle and z is at the beginning of the next scheduling cycle). The above calculation method always ensures the selection of z after j.

[0054] In a possible implementation, the target node includes a head node, and the reception time of the service message can be obtained in the following manner:

[0055] When the service message arrives at the user network side (UNI) interface corresponding to the head node, the regulator of the UNI interface performs traffic regulation on the service message according to the preset traffic regulation rules; obtains the first moment when the service message leaves the regulator after the traffic regulation processing, and determines the first moment as the reception moment of the service message; wherein the traffic regulation rules can be pre-configured as needed.

[0056] In the specific implementation, the head node H will maintain the forwarding information related to the service flow, such as Figure 3 As shown in FIG. 1 , based on one or more sub-bursts uniformly distributed in the orchestration period of the UNI port after traffic regulation, the ideal target inbound time slot i and the target outbound time slot z reserved on the egress port are maintained for each sub-burst. In fact, if a service flow distributes m sub-bursts in the orchestration period, the forwarding information maintained by the head node H for the service flow should contain m records:

[0057] <target inbound time slot i_1, target outbound time slot z_1>

[0058] <target inbound time slot i_2, target outbound time slot z_2> ......

[0060] <target incoming slot i_m, target outgoing slot z_m>

[0061] Furthermore, the preset receiving time corresponding to the service message can be determined by:

[0062] Obtaining the target state record maintained by the head node for the service flow to which the service message belongs and the actual inbound time slot of the service message; wherein the actual inbound time slot is the time slot within the scheduling cycle of the user network side interface corresponding to the receiving time;

[0063] According to the starting time of the target incoming time slot in the target status record, determine the preset receiving time corresponding to the service message; wherein, the target incoming time slot is not earlier than the actual incoming time slot, and the target incoming time slot is the incoming time slot with the smallest offset between the actual incoming time slot and the multiple incoming time slots in the target status record.

[0064] The target state record table includes a plurality of inbound time slots and outbound time slots corresponding to the plurality of inbound time slots; the target outbound time slot reserved for the service message may be obtained in the following manner:

[0065] An outgoing time slot corresponding to the target incoming time slot in the target state record is determined as the target outgoing time slot.

[0066] Specifically, since the service message received from the source client side src does not always arrive ideally, it may not be in a target inbound time slot at time A after traffic adjustment. At this time, the head node H can determine the nearest target inbound time slot i after the actual arrival time A, which may include the following steps:

[0067] Step 1011: Obtain the actual inbound time slot i, Wherein, T_base1 represents the starting time of the first round of scheduling cycle of UNI port port-h1, TL1 represents the time slot length in the scheduling cycle of UNI port port-h1, and N1 represents the number of time slots included in the scheduling cycle of UNI port port-h1.

[0068] Step 1012: Determine the closest target incoming time slot i after time slot i', so that (i-i'+N1)%N1 is minimized, and i∈{i_1,i_2,...,i_m}.

[0069] Furthermore, after determining the reception time of the service message, the head node H determines the first time deviation E, which may specifically include the following steps:

[0070] Step 1013: Obtain the round number n of the orchestration cycle of the UNI port port-h1 at time A (note: the first round is round 0), that is,

[0071] Step 1014: Obtain the starting time of time slot i': t_i'_begin=T_base1+n*OPL+i'*TL1.

[0072] Step 1015: Obtain the time offset t_diff=[(i-i'+N1)%N1]*TL1 between the target inbound time slot i and the actual inbound time slot i'.

[0073] Step 1016: Obtain the starting time t_i_begin=t_i'_begin+t_diff of the target inbound time slot i.

[0074] Step 1017: Calculate and obtain the deviation E=t_i_begin-A.

[0075] Then, the head node H calculates the ranking value rank for the service message, which may include the following steps:

[0076] Step 102a1: Let t=A+E+F, which represents the target time when the message arrives at the egress port port-h2.

[0077] Step 102a2: Obtain the round number n of the scheduling cycle of the outbound port at time t (note: the first round is round 0), that is, T_base2 indicates the start time of the first round of orchestration cycle of the egress port port-h2.

[0078] Step 102a3: Obtain the time slot j at which the outbound port is in the sending state at time t. TL2 represents the time slot length of the scheduling cycle of the egress port port-h2, and N2 represents the number of time slots included in the scheduling cycle of the egress port port-h2.

[0079] Step 102a4: Obtain the starting time of time slot j: t_j_begin=T_base2+n*OPL+j*TL2.

[0080] Step 102a5: Obtain the time offset between the target outgoing time slot z1 and time slot j, t_diff = [(z1-j+N2)%N2]*TL2.

[0081] Step 102a6: The starting time of the target outgoing time slot z1 is t_z1_begin=t_j_begin+t_diff, which is the ranking value rank of the service message.

[0082] In another possible implementation, the target node includes an intermediate node; the reception time of the service message may be obtained in the following manner:

[0083] A second time when the service message arrives at the intermediate node is obtained, and the second time is determined as a receiving time of the service message.

[0084] Furthermore, in the above step S101, determining the target time when the service message arrives at the egress port according to the receiving time, the first time offset when the target node receives the service message, and the intra-node forwarding delay of the target node includes:

[0085] Obtaining a first time deviation corresponding to the service message;

[0086] The sum of the receiving time, the first time deviation and the intra-node forwarding delay is determined as the target time for the service message to arrive at the egress port.

[0087] In a specific implementation, the intermediate node P can directly obtain the time deviation E from the message sent by the upstream node. As described later, although the message is sorted in the ordered queue according to rank at the upstream node, the actual sending time time_tx of the message may deviate from the rank, which may be earlier than the rank (in this case, E is a positive value) or later than the rank (in this case, E is a negative value), that is, E = rank-time_tx, which will be carried in the sent message.

[0088] like Figure 4 As shown, the service message should be sent at the start time of the target outgoing time slot z1 of the upstream node (such as the head node H), but it is actually sent in advance in z1' (Note: the analysis of delayed sending is similar), resulting in the message arriving at the intermediate node P at time A.

[0089] Then, the intermediate node P calculates the ranking value rank for the service message, which may include the following steps:

[0090] Step 102b1: Let t=A+E+F, which represents the target time when the message arrives at the egress port port-p2.

[0091] Step 102b2: Obtain the round number n of the scheduling cycle of the outbound port at time t (note: the first round number is 0), that is, T_base3 indicates the start time of the first round of orchestration cycle of the egress port port-p2.

[0092] Step 102b3: Obtain the time slot j at which the outbound port is in the sending state at time t. TL3 represents the time slot length of the scheduling cycle of the egress port port-p2, and N3 represents the number of time slots included in the scheduling cycle of the egress port port-p2.

[0093] Step 102b4: Obtain the starting time of time slot j: t_j_begin=T_base3+n*OPL+j*TL3.

[0094] Step 102b5: Obtain the time offset between the target outgoing time slot z2 and time slot j, t_diff = [(z2-j+N3)%N3]*TL3.

[0095] Step 102b6: The starting time of the target outgoing time slot z2 is t_z2_begin=t_j_begin+t_diff, which is the ranking value rank of the service message.

[0096] In a possible implementation, the queue to be sent may include multiple ones, each queue to be sent has different scheduling rules; in the above step S103, storing the service message in the queue to be sent according to the size of the ranking value includes:

[0097] Determining the scheduling mode of the service message according to the scheduling mode identifier corresponding to the service message;

[0098] The service message is stored in a target queue to be sent according to the size of the ranking value, wherein the target queue to be sent is a queue to be sent among the multiple queues to be sent whose scheduling rules match the scheduling mode.

[0099] The scheduling mode identifier is used to indicate the scheduling rule of the queue to be sent configured by the user. Using the queue to be sent with different scheduling rules to send service messages can meet more diverse service requirements.

[0100] In a possible implementation, the queue to be sent includes a timely sending queue and an on-time sending queue, that is, the queue to be sent can be configured into one of two scheduling modes: one is an in-time scheduling mode, and the other is an on-time scheduling mode. It should be noted that a queue to be sent cannot be configured into both in-time and on-time scheduling modes at the same time, and only one of them can be selected. The above-mentioned storing the service message in the target queue to be sent according to the size of the ranking value includes:

[0101] When the target queue to be sent is a timely sending queue, storing the service message in the timely sending queue on the egress port according to the size of the ranking value, so that the timely sending queue sends the service message according to the first scheduling rule;

[0102] When the target queue to be sent is an on-time sending queue, storing the service message in the on-time sending queue on the egress port according to the size of the ranking value, so that the on-time sending queue sends the service message according to the second scheduling rule;

[0103] Among them, the first scheduling rule is: if the queue is not empty, always get the message from the head of the team for sending; the second scheduling rule is: if the queue is not empty and the ranking value of the current head message is equal to or earlier than the current system time, send the head message, otherwise do not send it.

[0104] According to the above-mentioned first scheduling rule and second scheduling rule, it can be determined that in the in-time scheduling mode, the actual sending time time_tx of the service message may be earlier or later than its rank; while in the on-time scheduling mode, the actual sending time time_tx of the service message cannot be earlier than its rank.

[0105] In a possible implementation, the step of storing the service message in a target queue to be sent according to the order of the ranking value includes:

[0106] Encapsulating the service message into a data packet, and storing the data packet in the target queue to be sent according to the size of the ranking value; wherein the data packet includes the service message, the scheduling mode identifier and the first time deviation;

[0107] When the target queue to be sent sends the service message, the first time deviation of the service message is updated.

[0108] Specifically, the scheduling mode identifier and the first time offset can be carried in the service message, wherein these two information can be carried in any L2 or L3 message header, such as Ethernet Header, IPv4 Header, IPv6 Header, MPLS Header, etc. And when the target queue to be sent sends the service message, the first time offset of the service message is updated.

[0109] The first time deviation of the service message can be updated in the following ways:

[0110] Determine the actual sending time of the service message; use the difference between the ranking value and the actual sending time as the update value of the first time deviation of the service message, and update the first time deviation of the service message according to the update value.

[0111] Specifically, taking the configuration of the queue to be sent into in-time scheduling mode or on-time scheduling mode as an example, in the in-time scheduling mode, the first time deviation E will be updated to E=rank-time_tx, its value may be positive, negative or 0, and will be carried in the sent business message; in the on-time scheduling mode, E will also be updated to E=rank-time_tx, its value may be negative or 0, and will be carried in the sent business message.

[0112] This is explained with specific examples. Figure 5 As shown, a deterministic forwarding path includes a head node PE1, intermediate nodes P1 and P2, and a tail node PE2, and is used to transmit a service flow sent from a source client side src to a destination client side dst.

[0113] On each port of each node included in the deterministic forwarding path, enable the same specific 100us orchestration cycle instance. To simplify the description, assume that the time slot length of the orchestration cycle of all ports is 10us and contains 10 time slots (time slots are numbered from #0 to #9). It is also assumed that the time of all nodes is actually synchronized, and T0 is the starting time of the first round of orchestration cycles of all ports.

[0114] It can be seen that for any integer k ≥ 0:

[0115] The time in the range of [T0+100*k, T0+100*k+10)us belongs to time slot #0;

[0116] The time in the range of [T0+100*k+10, T0+100*k+20)us belongs to time slot #1;

[0117] The time in the range of [T0+100*k+20, T0+100*k+30)us belongs to time slot #2; ......

[0119] The time in the range of [T0+100*k+90,T0+100*k+100)us belongs to time slot #9;

[0120] Assume that the maximum forwarding delay in all nodes is 10us and the propagation delay of all links is 10us.

[0121] It is assumed that the outbound port of the tail node PE2 facing the destination client side dst also adopts a scheduling mechanism based on time slots.

[0122] On the head node PE1, the service message received from the source client side src is expected to arrive in time slot #8 of each scheduling cycle of the ingress port port-1, that is, the ideal target inbound (ideal arrival) time slot is #8. The figure shows the situation where the ideal arrival time or the actual arrival time is in the first scheduling cycle.

[0123] Then, the service message is expected to be sent in time slot #3 of the second round of scheduling cycle of the egress port port-2, that is, the target outgoing (ideal send) time slot is #3.

[0124] Similarly, on the intermediate node P1, the service message is expected to be sent in time slot #9 of the second round of scheduling cycle of the egress port port-3, that is, the target outbound direction (ideal send) is #9.

[0125] Similarly, at the intermediate node P2, the service message is expected to be sent in time slot #5 of the third round of scheduling cycle of the egress port port-4, that is, the target egress (ideal send) time slot is #5.

[0126] However, the actual situation may be that at the head node PE1, the service message received from the source client side src arrives at time T0+55us. At this time, the time deviation E is calculated to be 25us. Then, combined with the forwarding delay of 10us in the node, the service message should arrive at the egress port at the target time T0+90us. The starting time of the target outgoing time slot #3 after T0+90us (i.e., T0+130us) should be used as the rank of the service message and inserted into the queue to be sent. If the service message is sent by PE1 at T0+130us, the time deviation E will be updated to 0. However, the figure shows the situation of sending in advance at T0+65us. At this time, the time deviation E is updated to 65us and is carried in the sent service message.

[0127] Next, on the intermediate node P1, after a link delay of 10us, the service message will arrive at the ingress port at T0+75us. Combined with the time deviation E and the forwarding delay of 10us within the node, the service message should arrive at the egress port at the target time T0+150us. The starting time of the target outgoing time slot #9 after T0+150us (i.e., T0+190us) should be used as the message's rank and inserted into the queue to be sent. The figure shows the situation of sending in advance at T0+85us, when the time deviation E is updated to 105us and is carried in the sent service message.

[0128] Next, on the intermediate node P2, after a link delay of 10us, the service message will arrive at the ingress port at T0+95us. Combined with the time deviation E and the forwarding delay of 10us within the node, the service message should arrive at the egress port at the target time T0+210us. The starting time of the target outgoing time slot #5 after T0+210us (i.e., T0+250us) should be used as the rank of the service message and inserted into the queue to be sent. The figure shows the situation of sending in advance at T0+105us. At this time, the time deviation E is updated to 145us and is carried in the sent service message.

[0129] Next, on the tail node PE2, after a link delay of 10us, the service message will arrive at the ingress port at T0+115us. Combined with the time deviation E and the forwarding delay of 10us within the node, the service message should arrive at the egress port at the target time T0+270us. The starting time of the target outgoing time slot #1 after T0+270us (i.e., T0+310us) should be used as the message's rank and inserted into the queue to be sent. The figure shows the situation of sending in advance at T0+125us. However, since the encapsulation corresponding to the deterministic forwarding path is usually removed when the service message is sent to the destination client side, the time deviation E does not need to be carried.

[0130] The method for sending a message provided in the embodiment of the present application is that after receiving the service message, the target node determines the target time when the service message arrives at the egress port of the target node according to the reception time of the service message, the first time deviation of the target node receiving the service message, and the intra-node forwarding delay of the target node; obtains the sending-in-progress time slot in the sending state corresponding to the egress port at the target time, and determines the ranking value of the service message in the queue to be sent of the egress port according to the time offset between the sending-in-progress time slot and the target outgoing time slot; stores the service message in the queue to be sent according to the size of the ranking value. In this way, while providing a guaranteed upper limit of delay, a lower lower limit of delay can be provided, so as to meet more abundant business needs and improve the service quality of the business.

[0131] Figure 6 A schematic diagram of the hardware structure of an electronic device that implements the embodiment of the present application is shown. Referring to the 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 a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0132] The processor, the network interface and the memory may be interconnected through an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0133] The memory stores the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0134] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a device for locating the target user at the logical level. The processor executes the program stored in the memory and specifically performs: Figure 1The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0135] The above application Figure 1 The method disclosed in the illustrated embodiment may be implemented in a processor or 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 may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. 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 conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature 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 completes the steps of the above method in combination with its hardware.

[0136] The computer device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0137] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices 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, but can also be hardware or logic devices.

[0138] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 1The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0139] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0140] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 1 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0141] The embodiments of the present application can be applied to various electronic device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablet computers; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablet computers and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., so as to meet the needs of users in various scenarios such as smart homes, smart offices, and smart travel.

[0142] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0143] The systems, devices, modules or units described in the above embodiments may be 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 a combination of any of these devices.

[0144] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (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 store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0145] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0146] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for sending a message, characterized in that: include: After receiving the service message, the target node determines the target time when the service message arrives at the egress port of the target node according to the reception time of the service message, the first time deviation of the target node receiving the service message, and the intra-node forwarding delay of the target node; Obtaining a sending-in-progress time slot in a sending state corresponding to the egress port at the target time, and determining a ranking value of the service message in a queue to be sent at the egress port according to a time offset between the sending-in-progress time slot and a target outgoing time slot; wherein the target outgoing time slot is an outgoing time slot reserved for the service message within a scheduling cycle of the egress port of the target node; The service message is stored in the queue to be sent according to the size of the ranking value.

2. The method according to claim 1, characterized in that The target node includes a head node; the receiving time of the service message is obtained by: When the service message arrives at the user network side interface corresponding to the head node, the regulator of the user network side interface performs flow regulation processing on the service message according to a preset flow regulation rule; Obtain the first moment when the service message leaves the regulator after traffic regulation processing, and determine the first moment as the reception moment of the service message.

3. The method according to claim 2, characterized in that The determining, according to the receiving time, a first time offset for the target node to receive the service message, and an intra-node forwarding delay of the target node, a target time at which the service message arrives at the egress port comprises: Determining a first time deviation of the service message according to the receiving time and a preset receiving time corresponding to the service message; The sum of the receiving time, the first time deviation and the intra-node forwarding delay is determined as the target time for the service message to arrive at the egress port.

4. The method according to claim 3, characterized in that The preset receiving time corresponding to the service message is determined by: Obtaining the target state record maintained by the head node for the service flow to which the service message belongs and the actual inbound time slot of the service message; wherein the actual inbound time slot is the time slot within the scheduling cycle of the user network side interface corresponding to the receiving time; According to the starting time of the target incoming time slot in the target status record, determine the preset receiving time corresponding to the service message; wherein, the target incoming time slot is not earlier than the actual incoming time slot, and the target incoming time slot is the incoming time slot with the smallest offset between the actual incoming time slot and the multiple incoming time slots in the target status record.

5. The method according to claim 4, characterized in that The target state record table includes a plurality of inbound time slots and outbound time slots corresponding to the plurality of inbound time slots; the target outbound time slot reserved for the service message is obtained by: An outgoing time slot corresponding to the target incoming time slot in the target state record is determined as the target outgoing time slot.

6. The method according to claim 1, characterized in that The target node includes an intermediate node; the receiving time of the service message is obtained by: A second time when the service message arrives at the intermediate node is obtained, and the second time is determined as a receiving time of the service message.

7. The method according to claim 6, characterized in that The determining, according to the receiving time, a first time offset for the target node to receive the service message, and an intra-node forwarding delay of the target node, a target time at which the service message arrives at the egress port comprises: Obtaining a first time deviation corresponding to the service message; The sum of the receiving time, the first time deviation and the intra-node forwarding delay is determined as the target time for the service message to arrive at the egress port.

8. The method according to claim 1, characterized in that The step of determining the ranking value of the service message in the queue to be sent at the egress port according to the time offset between the sending-in-progress time slot and the target outgoing time slot includes: Determining the start time of the sending in progress time slot according to the scheduling cycle information of the egress port of the target node; Determine the start time of the target outgoing time slot according to the start time of the sending in progress time slot and the time offset between the sending in progress time slot and the target outgoing time slot; According to the starting time of the target outgoing time slot, the ranking value of the service message in the queue to be sent at the egress port is determined.

9. The method according to claim 8, characterized in that The scheduling cycle information includes the start time of the first round of scheduling cycle, the length of the scheduling cycle, the length of the outgoing time slot, and the number of time slots included in the scheduling cycle; the start time of the sending time slot is determined by the following method: t_j_begin=T_base+n*OPL+j*TL; in, Wherein, t_j_begin indicates the start time of the sending of the ongoing time slot j, T_base indicates the start time of the first round of scheduling cycle, n indicates the round of the scheduling cycle, OPL indicates the length of the scheduling cycle, and TL indicates the length of the outgoing time slot. represents rounding down, t represents the target time, % represents the modulo operation, and N represents the number of time slots included in the scheduling cycle.

10. The method according to claim 9, characterized in that The starting time of the target outgoing time slot is determined by: t_z_begin=t_j_begin+t_diff; Wherein, t_diff=[(z-j+N)%N]*TL; Wherein, t_z_begin represents the starting time of the target outgoing time slot z, and t_diff represents the time offset between the sending ongoing time slot j and the target outgoing time slot z.

11. The method according to claim 1, characterized in that: The queues to be sent include a plurality of queues, each of which has a different scheduling rule; storing the service message in the queues to be sent according to the size of the ranking value and sending the service message includes: Determining the scheduling mode of the service message according to the scheduling mode identifier corresponding to the service message; The service message is stored in a target queue to be sent according to the size of the ranking value, wherein the target queue to be sent is a queue to be sent among the multiple queues to be sent whose scheduling rules match the scheduling mode.

12. The method according to claim 11, characterized in that The queue to be sent includes a timely sending queue and an on-time sending queue; the storing the service message in the target queue to be sent according to the size of the ranking value and sending the service message includes: When the target queue to be sent is a timely sending queue, storing the service message in the timely sending queue on the egress port according to the size of the ranking value, so that the timely sending queue sends the service message according to the first scheduling rule; When the target queue to be sent is an on-time sending queue, storing the service message in the on-time sending queue on the egress port according to the size of the ranking value, so that the on-time sending queue sends the service message according to the second scheduling rule; Among them, the first scheduling rule is: if the queue is not empty, always get the message from the head of the team for sending; the second scheduling rule is: if the queue is not empty and the ranking value of the current head message is equal to or earlier than the current system time, send the head message, otherwise do not send it.

13. The method according to claim 11, characterized in that The step of storing the service message in a target queue to be sent according to the size of the ranking value and sending the service message includes: Encapsulating the service message into a data packet, and storing the data packet in the target queue to be sent according to the size of the ranking value; wherein the data packet includes the service message, the scheduling mode identifier and the first time deviation; When the target queue to be sent sends the service message, the first time deviation of the service message is updated.

14. The method according to claim 13, characterized in that The updating of the first time offset of the service message includes: Determine the actual sending time of the service message; The difference between the ranking value and the actual sending time is used as an update value of the first time deviation of the service message, and the first time deviation of the service message is updated according to the update value.

15. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 14 are implemented.

16. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

Citation Information

Cited By

  • Packet sending method, electronic device, and readable storage medium

    EP4794296A1