CN115589384A - Message transmission method and device - Google Patents

Message transmission method and device Download PDF

Info

Publication number
CN115589384A
CN115589384A CN202110755856.XA CN202110755856A CN115589384A CN 115589384 A CN115589384 A CN 115589384A CN 202110755856 A CN202110755856 A CN 202110755856A CN 115589384 A CN115589384 A CN 115589384A
Authority
CN
China
Prior art keywords
period
label
message
cycle
duration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110755856.XA
Other languages
Chinese (zh)
Inventor
庄冠华
李峰
厉益舟
孟锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110755856.XA priority Critical patent/CN115589384A/en
Priority to PCT/CN2022/097449 priority patent/WO2023279903A1/en
Publication of CN115589384A publication Critical patent/CN115589384A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0078Timing of allocation

Abstract

A message transmission method and device are used for reducing message transmission delay. In the application, a first device receives a first message and a second message from a second device, wherein the first message comprises a first period label, and the second message comprises a second period label. The first device determines a third period label corresponding to the first period label, and sends a first message to the third device in a period corresponding to the third period label. And the first equipment determines a fourth period label corresponding to the second period label, and sends a second message to the third equipment in a period corresponding to the fourth period label. Wherein, the starting time of the period corresponding to the fourth period label is as follows: later than the start time of the period corresponding to the third cycle label and earlier than the end time of the period corresponding to the third cycle label. Because the period corresponding to the fourth period label starts before the period corresponding to the third period label is not finished, the sending speed of the second message can be accelerated, and the transmission delay of the second message is reduced.

Description

Message transmission method and device
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for transmitting a packet.
Background
The goal of Deterministic network (DIP) technology is to provide Deterministic delay and jitter guarantees based on the existing Internet Protocol (IP) forwarding mechanism, and its technical core is a periodic scheduling mechanism. Any two adjacent nodes on a data link in the deterministic network maintain a stable cycle mapping relationship, and the cycle mapping relationship indicates the mapping relationship between the cycle number sent by the message from the upstream device and the cycle number sent again by the downstream device. The downstream device receives the message at the input port, inquires a fixed period corresponding to the period label carried by the message according to the period mapping relation, and sends the message at the fixed period of the output port of the node, and the message only occupies the reserved resource of the node at the fixed period, so that each message can be ensured to have a determined scheduling period.
The downstream device may acquire the periodic mapping relationship by learning. For example, the downstream device first determines a first message (the first message carries a period tag Tx 1) sent by an output port of the upstream device in a period with a period tag Tx1, and determines time for the first message to reach an input port of the node, and the downstream device calculates, according to parameters such as a period corresponding to Tx1 and node jitter, the latest time for a tail message (the tail message also carries the period tag Tx 1) sent by the output port of the upstream device in the period of Tx1 to possibly reach the input port of the node, and based on the information, the downstream device can obtain a period mapping relationship between the output port of the upstream device and the output port of the node: period tag Tx1 → period tag Ty2 (e.g. the tag of the first period after the time when the header message arrives at the ingress port of the node + the duration of the period corresponding to period tag Tx1 + the jitter range).
In the deterministic network, since the duration of the period of the outgoing interface of the upstream device (for example, the duration of the period corresponding to the period tag Tx 1) is the same as the duration of the period of the outgoing interface of the downstream device (for example, the duration of the period corresponding to the period tag Ty 2), the delay and jitter experienced by the packet transmission always satisfy the preset upper bound.
However, in practical applications, the rate of the output interface of the upstream device may have a larger difference from the rate of the output interface of the downstream device, for example, the rate of the output interface of the upstream device is 100 megabits per second (Mbps), and the rate of the output interface of the downstream device is 10Mbps.
If the period duration of the output interface of the upstream device and the period duration of the output interface of the downstream device both use shorter durations, for example, both use 2.5 μ s, the Maximum Transmission Unit (MTU) of the upstream device and the downstream device is smaller, and under the condition that the transmission rate of the downstream device is lower, the maximum transmission unit of the downstream device is likely to fail to meet the service requirement. For example, MTU of the outgoing interface of the downstream device = duration of the period of the outgoing interface of the downstream device (2.5 μ s) × transmission rate of the downstream device (100 Mbps)/8 =30 bytes (Byte), where ×/denotes multiplication and/denotes division. It can be seen that the MTU of the downstream device is even smaller than the hard limit of the minimum ethernet frame 64Byte, and cannot meet the service requirement.
In order to meet the service requirement, the cycle duration of the output interface of the upstream device and the cycle duration of the output interface of the downstream device both adopt longer durations, for example, both adopt 12.5 microseconds (μ s), and thus, the message transmission delay is larger.
Disclosure of Invention
In order to improve the message transmission delay, embodiments of the present application provide a message transmission method and apparatus, where time domain resources of a period corresponding to a fourth period tag of a first device and a period corresponding to a third period tag of the first device are set to have a partially overlapping manner, so as to improve a message transmission rate and reduce the message transmission delay.
In a first aspect, the present application provides a method for transmitting a packet, where the method includes: the first device receives a first message and a second message from the second device. The first message includes a first period label, and the first message is a message sent by the second device through a period corresponding to the first period label. The second message includes a second periodic label, and the second message is a message sent by the second device in a period corresponding to the second periodic label. The first device determines a third cycle label corresponding to the first cycle label, and sends a first message to the third device in a cycle corresponding to the third cycle label. And the first equipment determines a fourth period label corresponding to the second period label, and sends a second message to the third equipment in a period corresponding to the fourth period label. Wherein, the starting time of the period corresponding to the fourth period label is as follows: later than the start time of the period corresponding to the third cycle label and earlier than the end time of the period corresponding to the third cycle label.
Because the period corresponding to the fourth period label is not started after the period corresponding to the third period label is finished, but is started before the period corresponding to the third period label is not finished, that is, the time domain resources of the period corresponding to the third period label and the period corresponding to the fourth period label are overlapped, the sending speed of the second message can be increased, and the transmission delay of the second message can be reduced.
In a possible implementation manner, the first device sends the first packet to the third device through the first port in a period corresponding to the third period label, and the first device sends the second packet to the third device through the first port in a period corresponding to the fourth period label. It can be seen that, in the embodiment of the present application, the time domain resources of the first port are divided, and the time domain resources of two periods of the same port may overlap, so that the transmission speed of the message on the first port may be increased. The first port may be a physical port, or may be a logical port bound to multiple physical ports.
In one possible implementation, the first duration is greater than the second duration. The first duration is the duration of the period corresponding to the third period label and the fourth period label. The second time length is the time length of the period corresponding to the first period label and the second period label. That is, the first duration is not necessarily equal to the second duration, and the first duration may also be longer than the second duration, so that, for example, in a scenario where the egress interface rate of the upstream device is greater than the egress interface rate of the downstream device, the upstream device may use the shorter second duration as the period duration, and the downstream device may use the longer first duration as the period duration, so that on one hand, the maximum transmission unit of the first device with the lower transmission rate may be increased. On the other hand, the time domain resources of the period corresponding to the fourth period label and the period corresponding to the third period label on the first device are partially overlapped, so that the message transmission rate of the first device can be improved.
In one possible embodiment, the time interval between the start time of the period corresponding to the fourth period label and the start time of the period corresponding to the third period label is equal to: the length of time between the start of the period corresponding to the second period label and the start of the period corresponding to the first period label. Because the intervals of the starting time of each period of the first device and the second device are the same, both the first device and the second device can reach the starting time of one period at the same interval, thereby reducing the complexity of message transmission of the first device and the second device by using a method based on periodic label switching and further simplifying the scheme.
In one possible implementation, the period corresponding to the fourth period label and the period corresponding to the third period label are two adjacent periods. The duration of the interval between the starting time of the period corresponding to the fourth period tag and the starting time of the period corresponding to the third period tag is equal to: a second duration. Because the intervals of the starting times of the periods of the first device and the second device are the same, and the interval of the starting times of the two adjacent periods of the first device is the duration of one period of the second device, the interval of the starting times of the two adjacent periods on the second device is the duration of one period of the first device, that is, the time domain resources of the two adjacent periods of the second device may not be overlapped, that is, the duration of the period on the second device may be shorter, each period may be transmitted in series, and the duration of the period on the first device may be longer, so as to improve the MTU of one period of the first device, and each period may be transmitted in parallel, thereby the message transmission rate on the first device may be accelerated. In addition, because the first device and the second device can reach the starting time of one period at the same time interval, the complexity of message transmission by the first device and the second device by using a method based on periodic label switching can be reduced, and the scheme is further simplified.
In one possible embodiment, the first duration is an integer multiple of the second duration. Therefore, the setting of the total number of the periodic labels on the first device can be simplified, the complexity of message transmission by the first device and the second device by using a method based on periodic label switching can be reduced, and the scheme is further simplified.
In a possible implementation manner, the total number of values corresponding to the value range of the third period tag is determined according to the first time length and the time length of the interval between the first time length and the start time of two adjacent periods of the first device. Therefore, the total value of the values corresponding to the value range of the third period label can be set based on the purpose that each period label of the first equipment can be used circularly, and a foundation can be laid for the cyclic use of each period label of the first equipment.
In a possible embodiment, the total number of values corresponding to the value range of the third periodic tag is: and the sum of R and C, wherein R is the ratio of the first time length to the time length of the interval between the starting moments of two adjacent periods of the first equipment, and C is a positive integer. Because at most R consecutive periods in the first device satisfy the condition that "time domain resources of any two periods overlap", the total number of values corresponding to the value range of the third period label is greater than R, and thus, each period label of the first device can be recycled.
In one possible implementation, the first device determining a third periodic tag corresponding to the first periodic tag includes: the first equipment determines a fifth cycle label corresponding to the first cycle label; the first device determines a third periodic tag corresponding to the fifth periodic tag. Wherein the second number is a common multiple of the first number and the third number. The first number is the total number of values corresponding to the value range of the first cycle label. The second number is the total number of values corresponding to the value range of the fifth cycle label. The third number is the total number of values corresponding to the value range of the third periodic label.
In a case that the total value number (first number) corresponding to the value range of the cycle label of the second device is small (smaller than the total value number (third number)) corresponding to the value range of the cycle label of the first device), the same cycle label of the second device may correspond to two different cycle labels of the first device, and in this case, it is not suitable to determine the cycle label of the message in the corresponding transmission cycle of the first device by a method of calculating delta. If the period label of the packet of the second device is converted first, or it can be understood that a period label is reassigned to the packet of the second device (for distinction, the newly assigned period label may be referred to as a logic period label), because the total value (the second value) corresponding to the value range of the logic period label is a common multiple of the first value and the third value, that is, the second value is not less than the third value, further, the period label of the packet in the transmission period of the first device is determined based on the logic period label assigned to the packet, and the period label of the packet in the corresponding transmission period of the first device may be determined by a method of calculating delta, thereby simplifying the calculation process of the period label mapping relationship from the second device to the first device, and reducing the calculation amount.
In one possible implementation, the determining, by the first device, a third periodic tag corresponding to the fifth periodic tag includes: and the first equipment determines a third period label according to the fifth period label, the receiving time of the first message and the preset processing time. Because the message of the second device is reassigned with a cycle label (for distinction, the newly assigned cycle label can be called a logic cycle label), and because the total number of values (the second number) corresponding to the value range of the logic cycle label is not less than the third number, the mapping relation between the new cycle label of the message and the cycle label of the transmission cycle of the first device can be learned according to the new cycle label, the fifth cycle label, the receiving time of the first message and the preset processing time length, so that the basis of calculating the transmission cycle of other messages in the first device according to the delta between the learned new cycle label and the cycle label of the transmission cycle of the first device can be laid.
In one possible implementation, the determining, by the first device, a fourth cycle tag corresponding to the sixth cycle tag includes: and the first equipment determines the period mapping relation between the first equipment and the second equipment according to the fifth period label and the third period label. The first device determines a sixth cycle label corresponding to the second cycle label. And the first equipment determines a fourth period label corresponding to the sixth period label according to the period mapping relation and the sixth period label. Because the message of the second device is reassigned with one period label (for distinction, the newly assigned period label may be referred to as a logic period label), and because the total value number (the second number) corresponding to the value range of the logic period label is not less than the third number, after the mapping relationship between the new period label of the message and the period label of the transmission period of the first device is learned, the transmission period of the other message in the first device may be calculated according to the delta between the learned new period label and the period label of the transmission period of the first device.
In a possible implementation manner, the determining, by the first device, a third period label corresponding to the first period label, and sending, to the third device, the first packet through a period corresponding to the third period label includes: and the first equipment determines a third period label corresponding to the first period label under the condition that the first condition is met, and sends a first message to the third equipment through a period corresponding to the third period label. Wherein the first condition comprises: the expected time when the first message is sent to the third device through the period corresponding to the third period label is earlier than: the start time of the period corresponding to the fourth period label.
If the first condition is not satisfied, that is, before the start time at which the second packet is allowed to be sent, the first packet is not sent completely, and if the first device sends the first packet to the third device through the period corresponding to the third period label, because the time domain resource of the period used by the first device to send the second packet overlaps with the time domain resource of the period used to send the first packet, the transmission delay of the second packet is increased by sending the first packet. In order not to affect the transmission delay of the first packet, the first packet is sent to the third device through the period corresponding to the third period label only when the first condition is satisfied, that is, before the start time when the second packet is allowed to be sent, the first packet has been sent, so that the transmission delay of the second packet is not affected by the first packet, and therefore, the first packet can be sent to the third device through the period corresponding to the third period label by the first device.
In one possible implementation, the first device, in the event that it is determined that the first condition is not satisfied: and reducing the sending priority of the first message or discarding the first message. If the first condition is not satisfied, that is, before the starting time when the second packet is allowed to be sent, the first packet is not sent completely, and if the first device sends the first packet to the third device through the period corresponding to the third period label, because the time domain resource of the period used by the first device to send the second packet overlaps with the time domain resource of the period used to send the first packet, the transmission delay of the second packet may be increased when the first packet is sent.
In one possible embodiment, the first condition further comprises: and the period corresponding to the fourth period label belongs to the period corresponding to the preset low-delay flow. Therefore, one or more low delay streams can be preset, for example, if the period corresponding to the fourth period label belongs to the period corresponding to the low delay stream, the influence of the messages in other periods on the transmission delay of the messages in the sending period occupied by the low delay stream can be reduced as much as possible, so that the transmission delay of the preset low delay stream can be ensured as much as possible.
In a possible implementation, the presetting of the period corresponding to the low-latency flow includes: the sixth cycle labels the corresponding cycle. In practical applications, some parameters may be configured in advance, for example, a logic period tag of a message, such as a sixth period tag. Therefore, the message in the sending period corresponding to the sixth period label of the first device can be determined to be a message for which low delay needs to be ensured, in order to ensure the transmission delay of such a message, other messages can be checked, and if the transmission of other messages can affect the transmission delay of such a message, the transmission delay of such a message can be ensured by discarding other messages or reducing the priority of other messages.
In a possible embodiment, the first condition further comprises at least one of: and the source address of the second message is the same as the source address corresponding to the preset low-delay flow. The target address of the second message is the same as the target address corresponding to the preset low-delay flow; or the priority information of the second message is the same as the priority information corresponding to the preset low-delay flow.
In practical applications, some parameters may be configured in advance, for example, at least one of a source address, a destination address, or priority information of a preset low latency flow, so that when a parameter corresponding to one packet matches with a preconfigured parameter, the packet may be determined to be a packet requiring low latency guarantee. In order to guarantee the transmission delay of the message, other messages can be checked, and if the transmission of other messages can affect the transmission delay of the message, the transmission delay of the message can be guaranteed in a mode of discarding other messages or reducing the priority of other messages.
The application also provides a communication device corresponding to the method provided by the first aspect. The communication device may be any device at the transmitting end (such as the second device) or a device at the receiving end (such as the first device) for performing data transmission in a wireless manner. Such as communication chips, network devices, etc. During communication, the device on the transmitting side and the device on the receiving side are opposite. In some communication processes, the communication apparatus may be used as the first device or a communication chip for the first device.
In a second aspect, a communication device, which may be the first device described above, includes a transceiver unit and a processing unit to perform any one of the embodiments of the first aspect and the first aspect described above. The transceiving unit is used to perform functions related to transmission and reception. Optionally, the transceiver unit includes a receiving unit and a transmitting unit. In one design, the communication device is a communication chip, and the transceiver unit may be an input-output circuit or a port of the communication chip.
In another design, the transceiver unit may be a transmitter and a receiver, or the transceiver unit may be a transmitter and a receiver.
Optionally, the communication device further includes various modules operable to perform any of the embodiments of the first aspect and the first aspect.
In a third aspect, a communication device is provided, which may be the aforementioned first device. Including a processor and a memory. Optionally, the communication device further comprises a transceiver, the memory is used for storing a computer program or instructions, and the processor is used for calling and executing the computer program or instructions from the memory, and when the processor executes the computer program or instructions in the memory, the communication device is enabled to execute any one of the embodiments of the first aspect and the first aspect.
Optionally, the number of the processors is one or more, and the number of the memories is one or more.
Alternatively, the memory may be integrated with the processor, or may be provided separately from the processor.
Optionally, the transceiver may include a transmitter (transmitter) and a receiver (receiver).
In a fourth aspect, a communication device is provided that includes a processor. The processor is coupled to the memory and is operable to perform the method of the first aspect as well as any possible implementation of the first aspect. Optionally, the communication device further comprises a memory. Optionally, the communication device further comprises a communication interface, the processor being coupled to the communication interface.
In one implementation, the communication device is a network device. When the communication device is a network device, the communication interface may be a transceiver, or an input/output interface. Alternatively, the transceiver may be a transmit-receive circuit. Alternatively, the input/output interface may be an input/output circuit.
In yet another implementation, the communication device is a chip or a system of chips. When the communication device is a chip or a system of chips, the communication interface may be an input/output interface, an interface circuit, an output circuit, an input circuit, a pin or related circuit, etc. on the chip or system of chips. A processor may also be embodied as a processing circuit or a logic circuit.
In a fifth aspect, a system is provided, which comprises the above second device and the first device.
In a sixth aspect, there is provided a computer program product comprising: a computer program (also referred to as code, or instructions), which when executed, causes a computer to perform the method of any of the possible implementations of the first aspect and the first aspect described above.
In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program (which may also be referred to as code or instructions) that, when executed on a computer, causes the computer to perform the method of any one of the above-mentioned first aspect and possible implementation manners of the first aspect.
In an eighth aspect, there is provided a processing apparatus comprising: input circuit, output circuit and processing circuit. The processing circuit is configured to receive a signal via the input circuit and transmit a signal via the output circuit, such that the method of any one of the possible implementations of the first aspect and the first aspect is implemented.
In a specific implementation process, the processing device may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a flip-flop, various logic circuits, and the like. The input signal received by the input circuit may be received and input by, for example and without limitation, a receiver, the signal output by the output circuit may be output to and transmitted by a transmitter, for example and without limitation, and the input circuit and the output circuit may be the same circuit that functions as the input circuit and the output circuit, respectively, at different times. The embodiment of the present application does not limit the specific implementation manner of the processor and various circuits.
Drawings
Fig. 1 is a schematic diagram of a network architecture suitable for use in the embodiment of the present application;
FIG. 2 is a schematic diagram of another network architecture suitable for use in embodiments of the present application;
fig. 3 is a schematic diagram of data transmission according to an embodiment of the present application;
FIG. 4 is a diagram illustrating the device R0 of FIG. 2 sending data to the device R1;
fig. 5 is a schematic flowchart of a message transmission method according to an embodiment of the present application;
fig. 6 is a schematic diagram of one possible example of the message transmission method provided in fig. 5;
fig. 7 is a schematic structural diagram of data transmission from a second device to a first device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a second device transmitting data to a first device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a communication device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another communication device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another communication device according to an embodiment of the present application.
Detailed Description
It should be understood that the technical solutions of the embodiments of the present application may be applied to various communication systems, for example: the communication system based on the Ethernet technology such as the field of mobile bearing forward transmission or return transmission, metropolitan area multi-service bearing, data center interconnection, industrial communication and the like, and the communication system among different components or modules in industrial or communication equipment.
Fig. 1 illustrates a schematic diagram of a network architecture suitable for use in the embodiment of the present application, as shown in fig. 1, the network architecture includes a first device and a second device, and optionally, the network architecture may further include a third device. The first device may receive a message from the second device and send the received message to the third device. The first device may send the message to the third device through the first port. The first port may comprise a physical port. The first port may also include a plurality of physical ports, which may be bound to a logical port.
The first device may be a network device. The second device may be a terminal device or a network device. The third device may be a terminal device or a network device. The network device may refer to a routing device (route), a switch, a gateway device (gateway), and the like. The gateway device is also called an inter-network connector and a protocol converter, and is a computer system or device that provides data conversion services among a plurality of networks. The gateway device may also refer to a device that connects two types of networks (for example, a device that connects a Deterministic Internet Protocol (DIP) network and other networks (for example, other networks such as IPv4 and the like, IPv6 networks and the like)), and the gateway device may also be a routing device, a switch, or a dedicated gateway device and the like.
Wherein any two devices in upstream and downstream relationship may be referred to as an upstream device and a downstream device, respectively. For example, the second device may be referred to as an upstream device and the first device may be referred to as a downstream device. For another example, the first device may be referred to as an upstream device and the third device may be referred to as a downstream device.
Fig. 2 is a schematic diagram illustrating another network architecture to which the embodiment of the present application is applicable, and as shown in fig. 2, the network architecture includes a sending device, at least one node, and a receiving device. At least one node may include n devices from the device R0 to the device Rn, where n may be a positive integer, and any one of the devices may be the network device. Device R0 may be a routing device, a switch, or a gateway device, for example device R0 may be an Ingress Gateway (iGW). The device Rn may be a routing device, a switch, or a gateway device, for example, the device Rn may be an egress gateway (egws). The sending device may be a terminal device or the network device. The receiving device may be a terminal device or the network device.
The three devices in fig. 1 may be three adjacent devices in fig. 2, for example, the device Rn-1, the device Rn and the receiving device in fig. 2 may be the second device, the first device and the third device in fig. 1 in sequence. Of course, the device Rn-2, the device Rn-1 and the device Rn may also be the second device, the first device and the third device in fig. 1 in sequence. For a clearer explanation of the embodiment of the present application, the following description takes the apparatus Rn-1, the apparatus Rn, and the receiving apparatus as the second apparatus, the first apparatus, and the third apparatus in fig. 1 in sequence as an example.
The connections between the sending device and the device R0 and between the receiving device and the device Rn in fig. 2 may be connected through an edge network, while two nodes from the device R0 to the device Rn may be connected through a core network. A deterministic network protocol (DIP) message, that is, a message transmitted under a condition that a deterministic delay is satisfied, may be transmitted between the sending device and the receiving device. The deterministic delay can be understood as that the delay and jitter experienced by the transmission of the message are within a preset range on the premise that certain bursty conditions are met. Of course, non-DIP messages may also be transmitted between the sending device and the receiving device. In addition, the sending device may also receive data sent by the receiving device, that is, data may be mutually transmitted between the sending device and the receiving device, and in the following embodiments of the present application, only the sending device sends data to the receiving device is taken as an example for description, and the present application is not limited thereto.
In a possible implementation manner, the scheme provided in the embodiment of the present application may be applied in a scenario where an outgoing interface rate of an upstream device is greater than an outgoing interface rate of a downstream device, for example, an outgoing interface rate of a device Rn-1 in fig. 2 is 100Mbps, and an outgoing interface rate of a device Rn is 10Mbps.
In yet another possible implementation manner, the scheme provided by the embodiment of the present application may also be applied in a scenario where the outgoing interface rate of the upstream device is equal to or less than the outgoing interface rate of the downstream device, for example, the scheme provided by the embodiment of the present application may be applied in a scenario where the outgoing interface rate of the device Rn-1 is equal to or less than the outgoing interface rate of the device Rn, or for example, the scheme provided by the embodiment of the present application may also be applied to two other adjacent devices in the network, which is not limited in the embodiment of the present application.
Based on the foregoing, the following description is provided for the terms and related technologies related to the embodiments of the present application.
(1) Period and period duration.
In this embodiment, an apparatus (for example, a sending apparatus, an apparatus R0, an apparatus R1, an apparatus Rn-1, an apparatus Rn, and the like in fig. 2) divides a time domain resource of an outgoing interface (in this embodiment, the outgoing interface may also be referred to as an interface or a port for sending a packet) to obtain multiple time domain resources of the outgoing interface, where the multiple time domain resources may be referred to as multiple periods. The duration of each time domain resource may be referred to as the duration of the period, or referred to as the period duration of the period.
Any two time domain resources of the outgoing interface of the device may be equal in duration. For example, the time domain resource of the outgoing interface of the device Rn-1 is divided into periods according to a length of 2.5 microseconds, that is, the duration of any one period of the outgoing interface of the device Rn-1 is 2.5 microseconds.
It should be noted that, in the embodiment of the present application, the durations of the periods corresponding to the two devices may be equal to or different from each other, for example, the duration of the period divided by the device R0 may be equal to or different from the duration of the period divided by the device R1.
Fig. 3 illustrates an exemplary data transmission diagram, as shown in fig. 3, the starting time of the periods divided by different devices may not be the same, and the distance of the period boundary between any two nodes is usually kept constant. As shown in FIG. 3, the difference between the period boundary of device R1 and the period boundary of device R0 is D, and D', and | D-D ≦ 1us, although the 1us may be switched to different values according to different scenarios. Similarly, the period boundaries of R0 and Rn differ by D1 and D1', and | D1-D1 | ≦ 1us.
(2) And (6) edge shaping.
As shown in fig. 3, the device R0 shapes the received traffic and transmits the shaped traffic in a manner that the number of bytes per cycle of each flow does not exceed Bi × T, where Bi represents a bandwidth specified by a Service-Level Agreement (SLA) of each flow, and T represents a duration of a cycle obtained by dividing time-domain resources on a port of the device R0 transmitting the flow.
(3) And (5) periodic labeling.
A period label may also be understood as a period number.
After the time domain resource of the output interface of one device is divided into a plurality of periods, the periods may be numbered or the periods may be labeled with period labels. The cycle number corresponds to a value range, or the cycle label may be said to correspond to a value range. For example, the value range may be [0,N ], the cycle number may be an integer in [0,N ], and N is a positive integer. The value range may also be some discrete specific values, and the embodiment of the present application is not limited.
A period label (or referred to as a period number) of a period divided by a time domain resource corresponding to one egress interface of one device may be cyclically valued in [0,N ]. For example, if N is 3, the cycle labels of the cycles divided by the time domain resource of the output interface of the device may be in turn: 0. 1, 2, 3, 0, 1, 2, 3 ….
Referring to fig. 3, a plurality of cycles exist at an output interface of a device R0, where a message sent in a T2 cycle carries a cycle label 2 (the specific form of carrying the cycle label 2 is various, for example, information used for indicating the cycle label 2 may be carried in the message, for example, several bits may be used to indicate a value of the cycle label), the cycle label 2 may be carried in a first message and zero, one, or multiple other messages in the T2 cycle, for example, the cycle label 2 may be carried in the first message only in the T2 cycle; for another example, the periodic tag 2 may be carried only in the first message and the last message in the T2 period; for example, the periodic tag 2 may be carried in all messages in the T2 period. Similarly, the message sent in the T3 period carries the period tag 3, and the message sent in the T0 period carries the period tag 0.
(4) And (5) message delay.
Fig. 4 exemplarily shows a schematic diagram of the device R0 in fig. 2 sending data to the device R1, and as shown in fig. 4, the time delay L of the message sent by the device R0 in the period T2 reaching the device R1 is calculated by the following formula:
l = A + (duration of one cycle of the outgoing interface of the device Rn-1) + Lmax + B … … equation (1)
In formula (1), a represents the time length of the first message in the T2 period of the device R0 from the transmission to the ingress interface of the arriving device R1;
lmax represents the maximum processing delay inside the device R1;
t1=t0+Lmax;
b represents a time length between the t1 time and a boundary of the first period after the t1 time, and a value range of B is [0 ] and a time length of a period corresponding to the output interface of the device R1 ].
It should be noted that the value of a may be understood as the line delay of the message sent by the device R0 to the device R1, and the line delay may be a fixed value. In a possible implementation manner, a first packet identifier may be added to the first message, and after receiving the message carrying the first packet identifier, the device R1 records the receiving time t0 of the first message; the sending time of the message at the device R0 can be obtained through information such as a timestamp carried in the message. It is also possible that the value of a is a preset value.
As shown in fig. 4, it can be determined through formula (1) that a message sent by the device R0 in a period corresponding to the periodic tag T2 needs to be sent in a period corresponding to the periodic tag T1 of the device R1.
(4) And (5) periodic mapping relation.
The downstream device may establish a periodic mapping relationship with the upstream device, where the periodic mapping relationship includes a mapping relationship between a periodic tag carried in a packet sent by the upstream device and a period for forwarding the packet to a next hop by the downstream device. Therefore, each device can stably forward the message according to the periodic mapping relationship, so that the time delay of message transmission is controlled within a preset time delay range, and a deterministic network is realized.
A downstream device may learn a period mapping relationship, and a scheme for learning a period mapping relationship by a downstream device is introduced below with reference to fig. 4, as shown in fig. 4, a device R1 receives a packet, where a period label carried by the packet is T2, a time of arrival of a tail packet in a period corresponding to the period label T2 is T1, and a next period of the device R1 corresponding to T1 is determined as a transmission period of the packet (or a period corresponding to a time after the time T1 is added by a time length B is determined as a transmission period of the packet), that is, the period T1 of the device R1 in fig. 4 is determined as the transmission period of the packet, so as to determine that the period mapping relationship corresponding to the device R0 and the device R1 learned by the device R1 is: the period T2 maps to the period T1.
The following is in a periodic mapping relationship: the mapping of Tx to Ty is described as an example, that is, after a message in the period Tx of the outgoing interface of the upstream device is sent to the downstream device, the message is sent in the period Ty of the outgoing interface of the downstream device.
Delta can be first calculated by the following equation (2):
delta = (Ty-Tx + Ny) mod Ny … … equation (2)
In the formula (2), ty is a periodic tag for sending a message by an output interface of the downstream device;
tx is a periodic label of a message sent by an output interface of upstream equipment;
ny is the value number in the value range of the periodic label of the downstream equipment; for example, the value range of the period label is [0,3], and the period label is an integer in the value range, the value number in the value range of the period label is 4; for example, the value range of the periodic label is [0,7], and the periodic label is an integer in the value range, the value number in the value range of the periodic label is 8;
mod is the remainder.
Then, the sending period Ty' corresponding to the message received by the downstream device can be calculated according to formula (3):
ty '= (Tx' + delta) mod Ny … … equation (3)
In formula (3), tx' is a periodic tag for an outgoing interface of the upstream device to send a packet;
delta is delta in formula (2);
mod is the remainder;
ny is the value number in the value range of the periodic label of the downstream equipment.
With continued reference to fig. 4, since it is calculated by the above equation (1): the message sent by the device R0 in the period corresponding to the periodic tag T2 needs to be sent in the period corresponding to the periodic tag T1 of the device R1. And the number of values in the value range of the period label of the device R1 is 4, so delta = (1-2+4) mod 4=3, that is, 3 is an adjustment value.
Further, referring to fig. 3, the device R1 calculates a transmission period corresponding to the device R1 of the message sent by the device R0 in the T3 period, and may calculate, according to the above formula (3), that a transmission period = (3+3) mod4=2 corresponding to the device R1 of the message sent by the device R0 in the T3 period, that is, a period label of the transmission period corresponding to the device R1 of the message sent by the device R0 in the T3 period is T2. Similarly, the period label of the message sent by the device R0 in the T0 period in the sending period corresponding to the device R1 is T3.
Further, the device R1 replaces the cycle label indicating T2 in the received message with the cycle label indicating T1, and sends the message after replacing the cycle label to the downstream device in the T1 cycle. Similarly, the device R1 replaces the cycle tag of the received message sent by the device R0 in the T3 cycle with T2, and then sends the message in the T2 cycle; the device R1 replaces the cycle tag of the received message sent by the device R0 in the T0 cycle with T3, and then sends the message in the T3 cycle.
Similarly, the equipment Rn-1 receives the message sent by the upstream equipment, and the equipment Rn-1 replaces the cycle label of the received message sent by the upstream equipment in the T0 cycle with T1 and then sends the message in the T1 cycle; the equipment Rn-1 replaces the received periodic label of the message sent by the upstream equipment in the T1 period with T2 and then sends the message in the T2 period; and the equipment Rn-1 replaces the received periodic tag of the message sent by the upstream equipment in the T2 period with T3 and then sends the message in the T3 period.
(4) And (5) sending periodically.
For an outgoing interface of a device (such as the sending device, the gateway device 1, the routing device, and the gateway device 2 in fig. 2), it is understood that there is a queue for each cycle of the outgoing interface, and the queue index is a cycle label. The messages corresponding to each periodic label can be sent circularly. In a possible embodiment, it may be understood that each queue corresponds to one gate control switch, the gate control switch of one queue is turned on may be understood as allowing to send a packet corresponding to the queue (i.e., a packet corresponding to a cycle tag corresponding to the queue), and the gate control switch of one queue is turned off may be understood as stopping sending a packet corresponding to the queue. The gating switch mentioned in the embodiment of the present application is only turned on and off to describe whether the message corresponding to the queue is in a state of being allowed to be sent, and in an actual scenario, the function of the gating switch may be implemented by a register, a timer, or some other device or module.
Referring to fig. 3, the output interface of the device R0 has 4 cycles, which correspond to 4 queues respectively, where a message with a cycle tag of T0 enters a queue corresponding to the cycle tag T0, a message with a cycle tag of T1 enters a queue corresponding to the cycle tag T1, a message with a cycle tag of T2 enters a queue corresponding to the cycle tag T2, and a message with a cycle tag of T3 enters a queue corresponding to the cycle tag T3. Each queue may be provided with a gate control switch, and when the gate control switch of the queue is turned on, the messages in the queue may be sent, and when the gate control switch of the queue is turned off, the messages in the queue are not sent. Each queue may be cyclically opened, for example, the device R0 shown in fig. 3 may open a gate control switch with a period tag of T2, and last for the duration of the period with the period tag of T2, during the opening of the gate control switch, a message with the period tag of T2 may be sent, and when the opening duration of the gate control switch reaches the duration of the period with the period tag of T2, the gate control switch is closed, that is, the sending of the message with the period tag of T2 is stopped. And then, a gating switch with a period label of T3 is started, the time length of the period with the period label of T3 is continued, a message with the period label of T3 can be sent during the starting period of the gating switch, and when the starting time length of the gating switch reaches the time length of the period with the period label of T3, the gating switch is closed, namely, the message with the period label of T3 is stopped from being sent.
Fig. 5 illustrates a flow chart of a message transmission method, which may be executed by the first device or a unit, module or chip inside the first device. The first device may be the first device in fig. 1, may be a device in the network shown in fig. 2, for example, may be one of the devices R1 to Rn, and in this embodiment, the first device is taken as the device Rn for example. As shown in fig. 5, the method includes:
s501, a first device receives a first message and a second message from a second device, wherein the first message comprises a first periodic label, and the first message is a message sent by the second device through a period corresponding to the first periodic label; the second message includes a second periodic tag, and the second message is a message sent by the second device through a period corresponding to the second periodic tag.
It should be noted that the port through which the second device sends the first packet and the second packet may be the same port, or may be two different ports. The period duration corresponding to the port for sending the first message on the second device is the same as the period duration corresponding to the port for sending the second message, and the value range of the period label corresponding to the port for sending the first message is the same as the value range of the period label corresponding to the port for sending the second message.
The second device may send one or more messages through a period corresponding to the first period label, where the first message may be one of the messages, may be a first message, and may also be a non-first message, such as a last message or a middle message. Similarly, the second device may send one or more messages through a period corresponding to the second period label, where the second message may be one of the messages, may be a first message, and may also be a non-first message, such as a last message or a middle message.
S502, the first device determines a third period label corresponding to the first period label, and sends a first message to the third device in a period corresponding to the third period label.
S503, the first device determines a fourth periodic tag corresponding to the second periodic tag, and sends the second packet to the third device in a period corresponding to the fourth periodic tag. Wherein, the starting time of the period corresponding to the fourth period label is as follows: later than the start time of the period corresponding to the third cycle label and earlier than the end time of the period corresponding to the third cycle label.
Because the period corresponding to the fourth period label is not started after the period corresponding to the third period label is finished, but is started before the period corresponding to the third period label is not finished, that is, the time domain resources of the period corresponding to the third period label and the period corresponding to the fourth period label are overlapped, the sending speed of the second message can be increased, and the transmission delay of the second message can be reduced.
In the above S502, the first device determines a third period label corresponding to the first period label, and may send the first packet to the third device through the first port in a period corresponding to the third period label. In the above S503, the first device determines the fourth cycle label corresponding to the second cycle label, and may send the second packet to the third device through the first port in the cycle corresponding to the fourth cycle label. It can be seen that, in the embodiment of the present application, the time domain resources of the first port are divided, and the time domain resources of two periods of the same port may overlap, so that the transmission speed of the message on the first port may be increased. The first port may be a physical port, or may be a logical port bound to multiple physical ports.
In the embodiment of the present application, a forwarding architecture of periodic label switching may be adopted, which supports the period setting of the output interface of the device for different durations. The time length of the period corresponding to the third period tag and the fourth period tag is the first time length, or it can be said that the time length of the period corresponding to the first port of the first device is the first time length. The period duration corresponding to the first period label and the second period label is the second duration, and it can also be said that the period duration corresponding to the port of the second device for sending the first message and the second message is the second duration.
The first duration may be equal to or different from the second duration. For example, the first duration may be less than the second duration, and the first duration may also be equal to the second duration. In a possible implementation manner, in order to improve the transmission delay of the data when the first duration is less than or equal to the second duration, the time domain resources of the period corresponding to the first period tag and the period corresponding to the second period tag may be obtained by dividing the same time domain resource of the second device, and the time domain resources of the two periods may overlap. That is, the start time of the period corresponding to the second period label on the second device may be located after the start time of the period corresponding to the first period label and before the end time of the period corresponding to the first period label.
For another example, the first duration may be longer than the second duration. In one possible implementation, in order to improve the transmission delay of the data, time domain resources of a period corresponding to the first period tag and a period corresponding to the second period tag may overlap. That is, the start time of the period corresponding to the second period label on the second device may be located after the start time of the period corresponding to the first period label and before the end time of the period corresponding to the first period label.
In another possible implementation manner, the time domain resources of the two periods on the second device are not overlapped, and the time domain resources of the two adjacent periods of the ports used for sending the first packet and the second packet on the second device are not overlapped. For example, if the period corresponding to the first period label and the period corresponding to the second period label are two adjacent periods, the start time of the period corresponding to the second period label on the second device is the same as the end time of the period corresponding to the first period label, or is located after the end time of the period corresponding to the first period label.
Fig. 6 is a schematic diagram illustrating a possible example of the message transmission method provided in fig. 5, and for easier understanding, the scheme in fig. 5 is described below with reference to fig. 6.
As shown in fig. 6, the second device is the device Rn-1 in fig. 2, and the first device is the device Rn in fig. 2. The duration of one period of the first device partition is longer than the duration of one period of the second device partition, which is illustrated in fig. 6 by the length of one period of the first device being longer than the length of one period of the second device.
In this embodiment of the present application, the second device may also determine, by using the scheme on the first device side in fig. 5, a sending cycle of the packet received by the second device on the second device, in this case, an upstream device of the second device may execute the scheme on the second device side in fig. 5, the second device may execute the scheme on the first device side in fig. 5, and a downstream device of the second device may execute the scheme on the third device side in fig. 5. Of course, the second device may also determine, by using other schemes, for example, the methods shown in fig. 3 and fig. 4, a sending period of the message received by the second device on the second device, which is not limited in this embodiment of the application.
Fig. 6 illustrates that each cycle of the second device is serial transmission, that is, it is shown that time domain resources of adjacent cycles of ports on the second device for sending the first packet and the second packet do not overlap. The time domain resources of the two periods on the second device in fig. 6 do not overlap. It can also be understood that two adjacent cycles are one in which the start time of one cycle is the end time of the other cycle or is located after the end time of the other cycle. Of course, in this application embodiment, the time domain resources of the second device side in two periods may also overlap, which is not limited in this application embodiment.
As shown in fig. 6, the first packet may be a packet a1, the second packet may be a packet a2, the first period label is T1, the period corresponding to the first period label may be referred to as a T1 period, the second period label is T2, the period corresponding to the second period label may be referred to as a T2 period, the third period label is T3, the period corresponding to the third period label may be referred to as a T3 period, the fourth period label is T4, and the period corresponding to the fourth period label may be referred to as a T4 period.
The second device sends a message a1 (first message) in a T1 period (period corresponding to the first period label). The first device receives the message a1, determines that the period label carried in the message a1 is T1, and determines that T1 (first period label) of the second device is mapped to T3 (third period label) of the first device according to the period mapping relation. The first device then sends a message a1 (first message) in a T3 period, for example, the first message is sent to the third device. Optionally, the first message sent by the first device may or may not carry the third cycle label, which is not limited in this embodiment of the application, and fig. 6 illustrates that the first message sent by the first device carries the third cycle label as an example for convenience of understanding.
Similarly, the second device sends the message a2 (second message) in the period T2 (the period corresponding to the label of the second period). The first device receives the message a2, determines that the period tag carried in the message a2 is T2, and according to the period mapping relationship, the first device determines that T2 (a second period tag) of the second device is mapped to T4 (a fourth period tag) of the first device, and then the first device sends the message a2 (a second message) in the T4 period, for example, sends the message a2 to the third device. Optionally, the fourth period tag may be carried in the second message sent by the first device, or the fourth period tag may not be carried in the second message sent by the first device, which is not limited in this embodiment of the application.
As can be seen from fig. 6, the start time of the period (T4 period of the first device) corresponding to the fourth period label is located between the start time and the end time of the period corresponding to the third period label, that is, the time domain resource of the period corresponding to the third period label overlaps with the time domain resource of the period corresponding to the fourth period label. It should be noted that, shown in fig. 6, a schematic diagram is shown for dividing time domain resources of the same port (for convenience of introduction, the port is referred to as a first port), and in this embodiment, it can also be understood that a period corresponding to a third period label and a period corresponding to a fourth period label are obtained by dividing the time domain resources of the first port, and the time domain resources of the period corresponding to the third period label are overlapped with the time domain resources of the period corresponding to the fourth period label.
On the other hand, if the first device has multiple ports, the scheme shown in fig. 6 may also be executed for other ports, that is, the time domain resource may also be divided for other ports, and the time domain resource dividing method may also be the same as or different from the time domain resource dividing method shown in fig. 6, and the embodiment of the present application is not limited.
As can be seen from fig. 6, the period duration (i.e., the first duration) divided on the first device may be greater than the period duration (the second duration) divided on the second device, so that even in a scenario where the outgoing interface rate of the first device is low, the MTU of the first device may be increased by increasing the period duration of the first device, so as to meet the MTU requirement of the service.
Further, if a serial method is used for transmission in each cycle, the message transmission delay is relatively large. If the cycle duration divided on the first device is increased in order to increase the MTU of the first device, the packet transmission delay is larger. For example, in fig. 6, the start time of the T4 period is located at the end time of the T3 period or after the end time of the T3 period, that is, the first device starts to transmit the packet mapped in the T4 period only at the end time of the T3 period, so that the time delay of the second packet to be sent in the T4 period is relatively large. To solve the problem, in the embodiment of the present application, a scheme of transmitting messages in multiple cycles in parallel is adopted, that is, a cycle corresponding to a fourth cycle label is not started after a cycle corresponding to a third cycle label is ended, but is started before a cycle corresponding to a third cycle label is not ended, that is, before a T3 cycle is not ended, a message in a T4 cycle may be transmitted, so that a transmission delay of a second message in the T4 cycle may be shortened.
Moreover, in practical applications, there may be a scenario, such as that the frequency of the messages transmitted between the device Rn and the receiving device in fig. 2 is relatively low, so that the messages mapped on each period of the first device are relatively sparse. In this case, when the scheme provided in fig. 5 or fig. 6 is applied to the device Rn, although there may be overlapping time domain resources between multiple cycles of the first port of the first device (that is, the total time domain resources corresponding to the multiple cycles are relatively reduced compared to the serial scheme), the time domain resources required for the first port of the first device to send the messages corresponding to the multiple cycles may also be satisfied.
In this embodiment of the application, an interval duration between the starting time of the period corresponding to the fourth period tag and the starting time of the period corresponding to the third period tag may be a preset value. For easy distinction, the interval duration between the start time of the period corresponding to the fourth period tag and the start time of the period corresponding to the third period tag may be referred to as a third duration, and the interval duration between the start time of the period corresponding to the second period tag and the start time of the period corresponding to the first period tag may be referred to as a fourth duration.
In a possible implementation manner, the third duration may be set according to parameters such as a load of sending a message on the first device, for example, if the load of sending the message is large, the third duration may also be set to be large, so that time domain resources overlapped between different periods are reduced, and total time domain resources corresponding to multiple periods are increased, thereby properly alleviating a congestion problem of the message.
For another example, if the load of sending the message is smaller, the third duration may also be set to be smaller, so that the time domain resources overlapped between different periods are increased, and the total time domain resources corresponding to multiple periods are reduced, thereby appropriately shortening the message transmission delay.
In a further possible embodiment, the third duration is equal to: the fourth duration of the interval between the starting time of the period corresponding to the second period label and the starting time of the period corresponding to the first period label. In this way, although the duration of each period is different on the first device and the second device, the start times of two adjacent periods on the first device and the second device are the same, so that the cyclic mapping relationship between the period labels can be easily constructed, the calculation amount brought by the conversion of the period labels can be reduced, and the jitter of the time delay can be further reduced.
For example, the message of each period is sent in series on the second device, that is, as shown in fig. 6, time domain resources of two adjacent periods of the same port of the second device are not overlapped, for example, the start time of one period is reached every second duration on the second device. If the period corresponding to the first period label is adjacent to the period corresponding to the second period label, and the interval duration between the starting moments of the two periods is the second duration, that is, the fourth duration is equal to the second duration, the third duration is equal to the second duration.
The relationship between the first duration and the second duration may or may not be a multiple relationship. In a possible implementation manner, in order to make the scheme more concise, the first duration may be set to be an integer multiple of the second duration. The first duration and the second duration may be set according to some parameters, for example, according to an output interface transmission rate of the device, an MTU to be satisfied, a buffer capacity, and the like.
The total number of values corresponding to the value range of the period label (for example, the third period label or the fourth period label) of the first device may be according to: a first duration of one period of the first device and a fifth duration of the interval between the start times of two adjacent periods of the first device. The total number of values corresponding to the value range of the periodic tag of the first device is at least an integer greater than the ratio of the first duration to the fifth duration. Thus, the period tag of the first device can be cycled within its corresponding value range.
The total number of values corresponding to the value range of the third cycle label may be represented as (Ny + 1), (Ny + 1) = R + C; r is the ratio of the first time length to the fifth time length, C is a positive integer, and Ny is an integer. The value range corresponding to the period label of the first device may be [0, ny ]. Thus, the period tag of the first device can be cycled within its corresponding value range.
When the period corresponding to the first period label and the period corresponding to the second period label are adjacent periods, and a second time interval is formed between two initial moments of the period corresponding to the first period label and the period corresponding to the second period label; if the period corresponding to the third period tag and the period corresponding to the fourth period tag are adjacent periods, then: the fifth duration is the fourth duration, and the fifth duration is the second duration. In this case, the total number of values corresponding to the value range of the periodic tag of the first device may be a number greater than the ratio of the first duration to the second duration.
For example, in connection with fig. 6, for example, in fig. 6, a period of the first device is 12.5 microseconds (i.e., the first time duration is 12.5 microseconds), a period of the second device is 5 microseconds (i.e., the fifth time duration is equal to the second time duration, and the second time duration is 2.5 microseconds), and R is 5. In this case (Ny + 1) needs to be an integer greater than 5, such as 6, 7 or 8. If (Ny + 1) =4, ny is 3, that is, the period label of the first device can only cycle between [0,3], but since the duration of T0 is 12.5 microseconds, the duration between two adjacent T0 is only 4 2.5 microseconds (since two adjacent T0 are separated by 4 periods and the start time of two adjacent periods is separated by 2.5 microseconds), that is, 10 microseconds, that is, when the last T0 period has not ended, the next T0 period reaches the start time again, which is obviously unreasonable. Therefore, in order to make the period label of the first device cyclically take values in [0, ny ], ny needs to be an integer greater than R.
On the other hand, the setting of C may be set empirically, or may be set according to various parameters, such as jitter of an internal processing packet of the network device, a cycle duration of the first port of the first device, and the like. For example, the larger the jitter of the internally processed message, the larger the value of C can be set. For another example, the longer the cycle duration of the first port, the smaller the value of C may be set. In FIG. 6, R is 5,C is 3 and Ny is 7.
It can also be understood that (Ny + 1) queues are arranged on the first device, it can be understood that (Ny + 1) gates exist, pipeline scheduling is adopted for the (Ny + 1) gates, one gate is opened in sequence every second time length, and the time length of each gate which is continuously opened is the first time length. In the same time, the gating of the R queues is in an open state, namely the data on the R queues is in a sending state, and the R queues can also be called as sending queues; meanwhile, the gating of the C queues is in a closed state, that is, the C queues are in a data receiving state, and the C queues may also be referred to as an ingress queue or a receive queue.
For example, referring to fig. 4, if the first device and the second device both use the first time length as the cycle time length, as shown in fig. 4, the maximum delay L of the packet may be written as (a + the first time length + Lmax + the first time length (B may take the maximum value of the first time length)). If the scheme shown in fig. 5 is adopted, that is, the first device adopts the first duration as the cycle duration, and the second device adopts the second duration, the maximum delay L of the packet may be written as (a + the second duration + Lmax + the second duration (B may take the maximum value as the second duration)). The difference between the time delays of the packets in the two schemes may be 2 x (the first time duration — the second time duration), where x represents the multiplication, and it can be seen that, compared with the scheme shown in fig. 5, the device adopts a longer time duration as the period, which can save the time delay.
In the above S502 and S503, there are various ways for the first device to determine the sending period corresponding to the received message carrying the period label, for example, in a possible implementation manner, the first device may calculate the sending period corresponding to the message in the first device according to the receiving time of the message received from the second device, the preset processing duration, the period label carried in the message, and the related scheme provided in the above fig. 4.
In yet another possible implementation, a value range of the period label (e.g., the first period label and/or the second period label) of the second device may be written as [0, nx ], and a total number of values of the value range of the period label of the second device is (Nx + 1). For the purpose of distinguishing, the total number of values corresponding to the value range of the periodic tag of the second device may be referred to as a first number.
The value range of the cycle label (for example, the third cycle label and/or the fourth cycle label) of the first device may be written as [0, ny ], and the total number of values of the value range of the cycle label of the first device is (Ny + 1). For the purpose of distinguishing, the total number of values corresponding to the value range of the periodic tag of the first device may be referred to as a third number.
In a specific implementation, there may be a case where (Nx + 1) is smaller than (Ny + 1), for example, (Nx + 1) is 4 and (Ny + 1) is 8, the period tag of the outgoing interface of the second device is cycled in [0,3] and the period tag of the outgoing interface of the first device is cycled in [0,7 ]. If the scheme shown in fig. 4 and the formula (2) are adopted to calculate the corresponding delay =0 between the period label of the second device and the period label of the first device, for example, one T0 of the second device corresponds to T0 of the first device. However, if the period tag of the second subsequent device is calculated according to equation (3) and the calculated delta, a problem arises: after one T0 of the second device is mapped to T0 of the first device according to the scheme shown in fig. 4, if the next T0 of the next second device is calculated according to the calculated data and the formula (3), the next T0 of the first device is also mapped to the next T0 of the first device. However, if the scheme shown in fig. 4 is used, the next T0 of the second device may be mapped to T4 of the first device. It can be seen that the same T0 of the second device calculated by the two methods may be mapped to T0 or T4, and the mapping result is incorrect. It can be seen that, if the scheme shown in fig. 4 and the schemes shown in the above equations (2) and (3) are directly passed through, an error occurs when the period label of the second device is mapped to the period label of the first device.
For a scenario in which (Nx + 1) is smaller than (Ny + 1), an embodiment of the present application may further provide a scheme, where a logic period tag (for example, a fifth period tag and a sixth period tag) may be set in the scheme, and the first device may map the period tag carried in the message sent by the second device to the logic period tag, and then map the logic period tag of the message to the period tag of the sending period of the first device. The value range of the logic period label is written as [0, nz ], that is, the total number of values corresponding to the value ranges of the fifth period label and the sixth period label is (Nz + 1). The total number of values corresponding to the value range of the fifth cycle label may be referred to as a second number for distinction.
In a possible embodiment, the second number is a common multiple of the first number and the third number, and may be, for example, a least common multiple. (Nz + 1) is a common multiple of (Nx + 1) and (Ny + 1). For example, nx is set to 3 and ny to 7. Nz may be 7, 15, etc., and Nz is taken as 7 in the embodiment of the present application as an example.
In the above S502, the first device determines a fifth cycle label corresponding to the first cycle label, and then the first device determines a third cycle label corresponding to the fifth cycle label. In step S503, the first device determines a sixth cycle label corresponding to the second cycle label, and then the first device determines a fourth cycle label corresponding to the sixth cycle label.
Fig. 7 exemplarily shows a schematic structural diagram of data transmission from the second device to the first device, and as shown in fig. 7, after receiving the packet sent by the second device, the first device may first perform first-time periodic mapping, and map the periodic tag carried in the packet to the logical periodic tag. For example, a counter may be set, and after receiving a period label, the counter automatically accumulates until the count of the counter reaches the maximum value of the logic period label, and then automatically clears the counter and recounts the count. The value of the counter may indicate a logic cycle label corresponding to a cycle label carried in a currently received message from the second device.
For example, the first device receives a message from the second device, where the message carries a period tag T0, the counter is started, the count is 1, and the corresponding logic period tag is T0 (also may be T1, T2, etc., and the logic period tag corresponding to the counter 1 may be preset); the first equipment receives a message from the second equipment, the message carries a periodic label T1, the count of the counter is changed into 2, and the corresponding logical periodic label is T1; in this way, … the first device receives the message from the second device, the message carries a period tag T0, the count of the counter is changed to 5, and the corresponding logic period tag is T4; the first equipment receives a message from the second equipment, the message carries a periodic label T1, the counting of the counter is changed into 6, and the corresponding logical periodic label is T5; by analogy, … receives a message from a second device by a first device, wherein the message carries a period tag T3, the count of the counter is changed to 8, and the corresponding logic period tag is T7; clearing the counter; next, the first device receives a message from the second device, where the message carries a period tag T0, the counter restarts counting, the count is 1, and the corresponding logic period tag is T0 ….
As shown in fig. 7, the first device may perform second-time period mapping, and map the logic period tag corresponding to the packet to the sending period of the first device, that is, determine the period tag of the sending period corresponding to the logic period tag corresponding to the received packet from the second device, and send the packet in the period corresponding to the period tag. The process that the first device maps the logical period label of the packet to the sending period of the first device may adopt the scheme shown in fig. 4 and the above formula (2) and formula (3) to distinguish that, in the calculation process, the period label of the packet in the sending period of the first device is no longer calculated by using the period label carried in the packet of the second device, but the period label of the packet in the sending period of the first device is calculated by using the logical period label corresponding to the packet sent by the second device, that is, tx is replaced by Tz in the above formula (2), and Tz is the logical period label corresponding to the period label of the outgoing interface of the upstream device for sending the packet; in the above formula (3), tx ' is replaced by Tz ', and Tz ' is a logic periodic tag corresponding to a periodic tag of a packet sent by an outgoing interface of the upstream device.
It should be noted that, the first device maps the logic period label of the received packet to the sending period of the first device, and the scheme shown in fig. 4 may be used to learn the period mapping relationship. The learning of the period mapping relationship may be triggered through many conditions, for example, the message sent by the second device to the first device may carry indication information used for indicating the first device to learn the period mapping relationship, where the indication information may be carried in a Differentiated Services Code Point (DSCP) field of Internet Protocol version 4 (Internet Protocol version 4, IPv 4) or Internet Protocol version 6 (Internet Protocol version 6, IPv 6) IPv4, for example, and optionally, the period label carried in the message may also be a DSCP field.
For example, the first device calculates that a logic period label corresponding to the first packet (carrying the period label T1 (first period label)) is T1 (fifth period label), and according to the scheme shown in fig. 4, the first device calculates that a transmission period of the first packet at the first device is T1 (third period label) according to the fifth period label, the receiving time of the first packet, and the preset processing time, and then calculates that delta is 0 according to the formula (2). Then, the first device calculates a sending period of the logic period tag corresponding to the received message at the first device according to the formula (3), for example, if the period tag carried by the message received by the first device is T1 and the corresponding logic period tag is T5, the sending period of the message at the first device calculated according to the formula (3) is T5. It can be seen that, when there are two messages carrying a periodic tag T1 and the logical periodic tags corresponding to the two messages are different, the sending periods of the two messages corresponding to the first device are also different, so that an error in the periodic tag mapping process can be avoided.
It should be noted that the logical period tag in this embodiment is only a period tag for mapping a period tag carried in a packet sent by the second device to a middle conversion of a sending period of the first device, and for distinguishing, the logical period tag is named as a logical period tag, and its substance may be a period tag, an index value, an identifier, or the like.
In practical applications, there may be some services with special requirements, for example, low latency of the service flow needs to be guaranteed, and these flows may also be called low latency flows.
For example, one or more parameters of the low delay jitter stream may be preset, and if the parameter of a certain service stream matches the parameter of at least one low delay jitter stream, it may be determined that the service stream is the low delay stream, that is, it is determined that the delay of the service stream needs to be guaranteed as much as possible, so as to avoid the delay from generating a large deviation as much as possible.
Wherein the preset low-latency flow parameter includes at least one of the following: a periodic tag; a source address; a target address; or, priority information.
The periodic tag may be a periodic tag of a certain transmission period on the first device. For example, the parameters such as the predetermined low latency flow include one or more logical period tags, such as a sixth period tag. In this scenario, the first device may determine that the packet corresponding to the sixth periodic tag belongs to the preset low-latency flow.
The source address may be a source Media Access Control (MAC) address, a source Internet Protocol (IP) address, and the like. The destination address may also be a destination MAC address, a destination IP address, or the like. The priority information may be information of Virtual Local Area Network (VLAN) priority.
For another example, if the parameter of the preset low latency flow includes a period label (for example, a sixth period label), a source address, a destination address, and priority information, when the first device determines that a logic period label allocated to a packet is the sixth period label, and the source address, the destination address, and the priority information of the packet are matched with or identical to the source address, the destination address, and the priority information in the preset low latency flow, the first device may determine that the packet belongs to the preset low latency flow.
The embodiment of the present application may further provide a possible implementation manner, where the implementation manner is used to further provide a delay guarantee for the low-delay stream. For example, the second packet is a packet in a low-latency flow that needs to be further guaranteed, in this case, S502 executed before S503 may be replaced with: and the first equipment determines a third period label corresponding to the first period label under the condition that the first condition is met, and sends a first message to the third equipment through a period corresponding to the third period label.
Wherein the first condition may include: the expected time when the first message is sent to the third device through the period corresponding to the third period label is earlier than: the start time of the period corresponding to the fourth period label.
Referring to fig. 7, the fourth starting time is the starting time of the period corresponding to the fourth periodic tag of the second packet sent by the first device. The first condition may be understood as that, if the first device may finish sending the first packet before starting sending the second packet, the first device may send the first packet through a period corresponding to the third period label.
However, if the first device does not finish sending the first message before the first device starts sending the second message, because the periods corresponding to the third period tag and the fourth period tag have overlapped time domain resources, when the starting time of the period corresponding to the fourth period tag reaches, the sending of the first message may affect the time delay of the second message, for example, the first message may need to be continuously sent first, and the second message is sent only after the first message is sent, so that the time delay of the second message belonging to the low-delay flow increases.
It should be noted that, if the second packet is a packet in the low-latency stream that needs to be further ensured, the packets to be sent in the period having the overlapping time domain resources with the period corresponding to the fourth period label used for sending the second packet may all be checked (for example, if the fourth period label in fig. 7 is T4, the packets to be sent in 4 periods corresponding to T0 to T3 before T4 may be checked), so as to ensure that, at the initial time of the period corresponding to the fourth period label, the transmission of other packets (i.e., the packets to be sent in 4 periods corresponding to T0 to T3 before T4) does not cause interference to the transmission of the second packet, that is, the other packets do not occupy the time domain resources of the second packet, and thus the time delay of the second packet may be ensured as much as possible. In this embodiment of the present application, how to check the first packet is illustrated, for the check performed on one packet in other packets (i.e., packets to be sent in 4 periods corresponding to T0 to T3 before T4), reference may be made to the foregoing contents, and only the expected time in the first condition needs to be replaced with: and finishing the expected moment of the message through the period corresponding to the period label corresponding to the message.
Fig. 8 illustrates still another message transmission method, and as shown in fig. 8, the first device may further receive a message b1, a message b2, and a message b3 from the fourth device. The period duration of the fourth device for sending the message b1, the message b2, and the message b3 is equal to the period duration of the first device for sending the message b1, the message b2, and the message b3. In a possible implementation manner, when the value range of the cycle label of the fourth device is smaller than the value range of the cycle label of the first device, for example, the value range of the cycle label of the fourth device is [0,3], the value range of the cycle label of the first device is [0,7], and the same scheme as that in the foregoing fig. 7 may be adopted to calculate the cycle mapping relationship between the fourth device and the first device. And calculating deltas corresponding to the first device and the fourth device according to the formula (2), wherein Tx in the formula (2) is replaced by Tz, and Tz is a logic period label corresponding to a period label of a message sent by an outgoing interface of the upstream device.
Further, when calculating the sending period Ty' corresponding to the message received by the first device from the fourth device, the formula (3) above cannot be used, but the following formula (4) needs to be used:
ty '= ((Tz' + delta) × R) mod Ny … … equation (4)
In formula (3), tz' is a logic periodic tag corresponding to a periodic tag of a message sent by an outgoing interface of the fourth device;
the delta is a delta corresponding to the first equipment and the fourth equipment;
* Represents a multiplication;
r represents the ratio of the time length c1 to the time length c2, wherein the time length c1 is the period time length of one period corresponding to a port used for sending the message b1 on the first equipment, and the time length c2 is the time length of the interval between the starting moments of two adjacent periods corresponding to the port used for sending the message b1 on the first equipment;
mod is the remainder;
ny is the value number in the value range of the periodic label of the downstream equipment.
With reference to fig. 8, if delta is 2, the time duration c1 is 12.5 microseconds, the time duration c2 is 5 microseconds, R is 5, ny is 8, tz 'is 2, ty' is 0; when Tz 'is 3, ty' is 5.
As can be seen from the scheme shown in fig. 8, in the scheme of fig. 7 provided in the embodiment of the present application, the first device may receive a message with a shorter cycle duration corresponding to the carried cycle tag; the method can also be compatible with the received message with longer period duration corresponding to the carried period label, and for the message of the type, the message can be obtained by calculation through the formula (3) when the sending period corresponding to the message is calculated.
In addition to the scheme shown in fig. 8, an embodiment of the present application may provide another possible implementation manner, where a value range of a cycle label of a fourth device is greater than or equal to a value range of a cycle label of a first device, in this case, a cycle label mapping relationship between the fourth device and the first device may be learned by using the scheme of the above-mentioned learning of the cycle mapping relationship in fig. 4, and then a delta is calculated according to the above-mentioned formula (2), and a corresponding transmission cycle of the cycle label, carried in a packet sent by the fourth device, on the first device is further calculated according to the formula (3).
According to the foregoing method, fig. 9 is a schematic structural diagram of a communication apparatus provided in this embodiment of the present application, and as shown in fig. 9, the communication apparatus may be a network device, or may be a chip or a circuit, such as a chip or a circuit that may be disposed in a network device. The communication apparatus shown in fig. 9 may be the first device in the foregoing, and may be configured to execute the foregoing S501, S502, and S503 in fig. 5.
The communication device 901 comprises a processor 902 and a transceiver 903.
Further, the communication device 901 may include a memory 904. The dashed lines in memory 904 are further meant to indicate that the memory is optional.
Further, the communication device 901 may further include a bus system, wherein the processor 902, the memory 904, and the transceiver 903 may be connected via the bus system.
It should be understood that the processor 902 may be a chip. For example, the processor 902 may be a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 902. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor, or in a combination of hardware and software modules included in the processor 902. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 904, and the processor 902 reads the information in the memory 904, and completes the steps of the above method in combination with the hardware thereof.
It should be noted that the processor 902 in the embodiment of the present application may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory 904 in the subject embodiments may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), SLDRAM (synchronous DRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In a possible implementation manner, the transceiver 903 is configured to receive a first message and a second message from a second device, where the first message includes a first periodic tag, and the first message is a message sent by the second device through a period corresponding to the first periodic tag; the second message includes a second periodic label, and the second message is a message sent by the second device in a period corresponding to the second periodic label.
A processor 902, configured to determine a third cycle label corresponding to the first cycle label, and send a first message to a third device through a transceiver 903 in a cycle corresponding to the third cycle label; determining a fourth period label corresponding to the second period label, and transmitting a second message to the third device through the transceiver 903 in a period corresponding to the fourth period label; wherein, the starting time of the period corresponding to the fourth period label is as follows: later than the start time of the period corresponding to the third cycle label and earlier than the end time of the period corresponding to the third cycle label.
In one possible implementation, the processor 902 is specifically configured to: determining a fifth cycle label corresponding to the first cycle label; and determining a third period label corresponding to the fifth period label. Wherein the second number is a common multiple of the first number and the third number; the first number is the total number of values corresponding to the value range of the first cycle label; the second number is the total number of values corresponding to the value range of the fifth cycle label; the third number is the total number of values corresponding to the value range of the third periodic label.
In one possible implementation, the processor 902 is specifically configured to: determining a periodic mapping relation between the first equipment and the second equipment according to the fifth periodic label and the third periodic label; determining a sixth periodic label corresponding to the second periodic label; and determining a fourth period label corresponding to the sixth period label according to the period mapping relation and the sixth period label.
In one possible implementation, the processor 902 is specifically configured to: and if the first condition is met, determining a third cycle label corresponding to the first cycle label, and sending the first message to the third device through the transceiver 903 in a cycle corresponding to the third cycle label. Wherein the first condition comprises: the expected time when the first message is sent to the third device through the period corresponding to the third period label is earlier than: the start time of the period corresponding to the fourth period label.
In one possible implementation, the processor 902 is further configured to: in a case where it is determined that the first condition is not satisfied: and reducing the sending priority of the first message or discarding the first message.
For the concepts, explanations, details and other steps related to the technical solutions provided in the embodiments of the present application related to the communication device, please refer to the descriptions of the foregoing methods or other embodiments, which are not repeated herein.
According to the foregoing method, fig. 10 is a schematic structural diagram of a communication device provided in an embodiment of the present application, and as shown in fig. 10, the communication device 1001 may include a communication interface 1003 and a processor 1002. Further, the communication device 1001 may include a memory 1004. The dashed lines in the figure indicate that the memory 1004 is optional. A communication interface 1003 for inputting and/or outputting information; a processor 1002, configured to execute a computer program or instructions, so that the communication apparatus 1001 implements the method at the first device side in the related scheme of fig. 5. In this embodiment of the application, the communication interface 1003 may implement the scheme implemented by the transceiver 903 in fig. 9, the processor 1002 may implement the scheme implemented by the processor 902 in fig. 9, and the memory 1004 may implement the scheme implemented by the memory 904 in fig. 9, which is not described herein again.
Based on the above embodiments and the same concept, fig. 11 is a schematic diagram of a communication apparatus provided in the embodiments of the present application, and as shown in fig. 11, the communication apparatus 1101 may be a network device, or may also be a chip or a circuit, for example, a chip or a circuit that may be disposed in a network device.
The communication device 1101 includes a processing unit 1102 and a communication unit 1103. Further, the communication apparatus 1101 may include the storage unit 1104, or may not include the storage unit 1104. The dashed line in the figure indicates that the memory unit 1104 is optional.
The communication device may correspond to the first apparatus in the above method. The communications apparatus can implement the steps performed by the first device in any one or any number of corresponding methods as shown in figure 5 above. The communication device may include a processing unit 1102, a communication unit 1103, and a storage unit 1104.
In a possible implementation manner, the communication unit 1103 is configured to receive a first packet and a second packet from a second device, where the first packet includes a first period label, and the first packet is a packet sent by the second device through a period corresponding to the first period label; the second message includes a second periodic label, and the second message is a message sent by the second device in a period corresponding to the second periodic label.
A processing unit 1102, configured to determine a third period label corresponding to the first period label, and send a first packet to a third device through a communication unit 1103 in a period corresponding to the third period label; determining a fourth period tag corresponding to the second period tag, and sending a second message to the third device through the communication unit 1103 in a period corresponding to the fourth period tag; wherein, the starting time of the period corresponding to the fourth period label is as follows: later than the start time of the period corresponding to the third cycle label and earlier than the end time of the period corresponding to the third cycle label.
The processing unit 1102 may be a processor or a controller, such as a general Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. The storage unit 1104 may be a memory. The communication unit 1103 is an interface circuit of the apparatus for receiving signals from other apparatuses. For example, when the device is implemented in the form of a chip, the communication unit 1103 is an interface circuit of the chip for receiving signals from other chips or devices, or an interface circuit of the chip for transmitting signals to other chips or devices.
The communication device 1101 may be the network device in any of the above embodiments, or may be a chip inside the network device. For example, when the communication device 1101 is a network device, the processing unit 1102 may be a processor, and the communication unit 1103 may be a transceiver, for example. Optionally, the transceiver may comprise radio frequency circuitry and the storage unit may be, for example, a memory. For example, when the communication device 1101 is a chip inside a network device, the processing unit 1102 may be a processor, and the communication unit 1103 may be an input/output interface, a pin, a circuit, or the like. The processing unit 1102 may execute a computer executable instruction stored in a storage unit, optionally, the storage unit is a storage unit in the chip, such as a register, a cache, and the like, and the storage unit may also be a storage unit located outside the chip in the session management network element, such as a read-only memory (ROM) or another type of static storage device that may store static information and instructions, a Random Access Memory (RAM), and the like.
For the concepts, explanations, details and other steps related to the technical solutions provided in the embodiments of the present application related to the communication device, please refer to the descriptions of the foregoing methods or other embodiments, which are not repeated herein.
It is to be understood that the functions of the units in the communication apparatus 1101 may refer to the implementation of the corresponding method embodiment, and are not described herein again.
It should be understood that the above division of the units of the communication device is only a division of logical functions, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. In this embodiment, the communication unit 1103 may be implemented by the transceiver 903 in fig. 9, and the processing unit 1102 may be implemented by the processor 902 in fig. 9.
According to the method provided by the embodiment of the present application, the present application further provides a computer program product, which includes: computer program code or instructions which, when run on a computer, cause the computer to perform the method of any one of the embodiments shown in figure 5.
According to the method provided by the embodiment of the present application, the present application further provides a computer-readable storage medium storing program code, which when run on a computer, causes the computer to execute the method of any one of the embodiments shown in fig. 5.
According to the method provided by the embodiment of the present application, a chip system is also provided, and the chip system may include a processor. The processor is coupled to the memory and is operable to perform the method of any of the embodiments shown in fig. 5. Optionally, the chip system further comprises a memory. A memory for storing a computer program (also referred to as code, or instructions). A processor for calling and running the computer program from the memory so that the device with the system on chip mounted thereon executes the method of any one of the embodiments shown in fig. 5.
According to the method provided by the embodiment of the present application, the present application further provides a system, which includes the aforementioned one or more second devices and one or more first devices.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The processes or functions according to the embodiments of the present application are generated in whole or in part when the computer instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
It is noted that a portion of this patent application contains material which is subject to copyright protection. The copyright owner reserves the copyright rights whatsoever, except for making copies of the patent files or recorded patent document contents of the patent office.
The first device and the second device in the above-mentioned respective apparatus embodiments correspond to the first device and the second device in the method embodiments, and the respective steps are executed by respective modules or units, for example, the communication unit (transceiver) executes the steps of receiving or transmitting in the method embodiments, and other steps besides transmitting and receiving may be executed by a processing unit (processor). The functions of the specific elements may be referred to in the respective method embodiments. The number of the processors may be one or more.
As used in this specification, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from two components interacting with another component in a local system, distributed system, and/or across a network such as the internet with other systems by way of the signal).
Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps (step) described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only a logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (27)

1. A method for packet transmission, comprising:
a first device receives a first message and a second message from a second device, wherein the first message comprises a first periodic label, and the first message is a message sent by the second device in a period corresponding to the first periodic label; the second message comprises a second periodic label, and the second message is a message sent by the second device in a period corresponding to the second periodic label;
the first equipment determines a third periodic label corresponding to the first periodic label, and sends the first message to third equipment in a period corresponding to the third periodic label;
the first device determines a fourth period label corresponding to the second period label, and sends the second message to the third device in a period corresponding to the fourth period label;
wherein, the starting time of the period corresponding to the fourth period label is as follows: the start time of the period corresponding to the third period label is later than the start time of the period corresponding to the third period label, and the end time of the period corresponding to the third period label is earlier than the end time of the period corresponding to the third period label.
2. The method of claim 1, wherein the first duration is greater than the second duration;
the first duration is the duration of a period corresponding to the third period tag and the fourth period tag;
the second time length is a time length of a period corresponding to the first period label and the second period label.
3. A method according to claim 1 or 2, wherein the period between the start of the period corresponding to the fourth period tag and the start of the period corresponding to the third period tag is equal in duration to: the length of time between the starting time of the period corresponding to the second period label and the starting time of the period corresponding to the first period label.
4. The method of claim 3, wherein the period corresponding to the fourth period label is two adjacent periods to the period corresponding to the third period label;
the duration of the interval between the starting time of the period corresponding to the fourth period label and the starting time of the period corresponding to the third period label is equal to: a second duration.
5. The method of claim 4, wherein the first duration is an integer multiple of the second duration.
6. The method of claim 5, wherein a total number of values corresponding to the value range of the third period label is determined according to the first time length and a time length of an interval between start times of two adjacent periods of the first device.
7. The method of any of claims 1-6, wherein the first device determining a third periodic tag corresponding to the first periodic tag comprises:
the first equipment determines a fifth cycle label corresponding to the first cycle label; the first device determines the third cycle label corresponding to the fifth cycle label;
wherein the second number is a common multiple of the first number and the third number;
the first number is the total number of values corresponding to the value range of the first cycle label;
the second number is the total number of values corresponding to the value range of the fifth cycle label;
the third number is the total number of values corresponding to the value range of the third periodic label.
8. The method of claim 7, wherein the first device determining the fourth cycle tag to which the sixth cycle tag corresponds comprises:
the first device determines a period mapping relationship between the first device and the second device according to the fifth period label and the third period label;
the first equipment determines a sixth periodic label corresponding to the second periodic label;
and the first device determines the fourth period label corresponding to the sixth period label according to the period mapping relation and the sixth period label.
9. The method of any of claims 1-8, wherein the first device determines a third cycle label corresponding to the first cycle label, and sends the first packet to a third device at a cycle corresponding to the third cycle label, comprising:
the first equipment determines a third period label corresponding to the first period label under the condition that a first condition is met, and sends the first message to third equipment through a period corresponding to the third period label;
wherein the first condition comprises:
the predicted time when the first packet is sent to the third device through the period corresponding to the third period label is earlier than: and the starting time of the period corresponding to the fourth period label.
10. The method of claim 9, wherein the first condition further comprises: and the period corresponding to the fourth period label belongs to the period corresponding to the preset low-delay flow.
11. The method of claim 9 or 10, wherein the first condition further comprises at least one of:
the source address of the second message is the same as the source address corresponding to the preset low-delay flow;
the target address of the second message is the same as the target address corresponding to the preset low-delay flow; or the like, or, alternatively,
and the priority information of the second message is the same as the priority information corresponding to the preset low-delay flow.
12. The method of any one of claims 9-11, further comprising:
the first device, if it is determined that the first condition is not satisfied: and reducing the sending priority of the first message, or discarding the first message.
13. A first device for transmitting messages, comprising a communication interface and a processor:
the communication interface is configured to receive a first packet and a second packet from a second device, where the first packet includes a first periodic tag, and the first packet is a packet that is sent by the second device in a period corresponding to the first periodic tag; the second message comprises a second periodic label, and the second message is a message sent by the second device in a period corresponding to the second periodic label;
the processor is configured to determine a third cycle label corresponding to the first cycle label, and send the first packet to a third device through the communication interface in a cycle corresponding to the third cycle label; determining a fourth period label corresponding to the second period label, and sending the second message to the third device through the communication interface in a period corresponding to the fourth period label; wherein, the starting time of the period corresponding to the fourth period label is as follows: the start time of the period corresponding to the third period label is later than the start time of the period corresponding to the third period label, and the end time of the period corresponding to the third period label is earlier than the end time of the period corresponding to the third period label.
14. The first apparatus of claim 13, wherein the first duration is greater than the second duration;
the first duration is the duration of a period corresponding to the third period tag and the fourth period tag;
the second time length is a time length of a period corresponding to the first period label and the second period label.
15. The communications device of claim 13 or 14, wherein the length of the interval between the start of the period corresponding to the fourth cycle tag and the start of the period corresponding to the third cycle tag is equal to: the length of time between the starting time of the period corresponding to the second period label and the starting time of the period corresponding to the first period label.
16. The communications device of claim 15, wherein the period corresponding to the fourth period label is two adjacent periods to the period corresponding to the third period label;
the duration of the interval between the starting time of the period corresponding to the fourth period label and the starting time of the period corresponding to the third period label is equal to: a second duration.
17. The communications device of claim 16, wherein said first duration is an integer multiple of said second duration.
18. The communications device of claim 17, wherein a total number of values corresponding to the value range of the third period tag is determined according to the first time length and a time length of an interval between start times of two adjacent periods of the first device.
19. The communication device of any one of claims 13 to 18, wherein the processor is specifically configured to:
determining a fifth cycle label corresponding to the first cycle label; determining the third period label corresponding to the fifth period label;
wherein the second number is a common multiple of the first number and the third number;
the first number is the total number of values corresponding to the value range of the first cycle label;
the second number is the total number of values corresponding to the value range of the fifth cycle label;
the third number is the total number of values corresponding to the value range of the third periodic label.
20. The communications device of claim 19, wherein the processor is specifically configured to:
determining a period mapping relationship between the first device and the second device according to the fifth period label and the third period label;
determining a sixth periodic label corresponding to the second periodic label;
and determining the fourth period label corresponding to the sixth period label according to the period mapping relation and the sixth period label.
21. The communication device of any one of claims 13 to 20, wherein the processor is specifically configured to:
determining a third period label corresponding to the first period label under the condition that a first condition is met, and sending the first message to a third device through the communication interface in a period corresponding to the third period label;
wherein the first condition comprises:
the predicted time when the first packet is sent to the third device through the period corresponding to the third period label is earlier than: and the starting time of the period corresponding to the fourth period label.
22. The communications device of claim 21, wherein said first condition further comprises: and the period corresponding to the fourth period label belongs to the period corresponding to the preset low-delay flow.
23. The communication device of claim 21 or 22, wherein the first condition further comprises at least one of:
the source address of the second message is the same as the source address corresponding to the preset low-delay flow;
the target address of the second message is the same as the target address corresponding to the preset low-delay flow; or the like, or, alternatively,
and the priority information of the second message is the same as the priority information corresponding to the preset low-delay flow.
24. The communications device of any one of claims 21-23, wherein the processor is further configured to:
in a case where it is determined that the first condition is not satisfied: and reducing the sending priority of the first message, or discarding the first message.
25. A communication apparatus, the apparatus comprising a processor and a memory,
the memory for storing computer programs or instructions;
the processor for executing a computer program or instructions in a memory, such that the method of any of claims 1-12 is performed.
26. A computer-readable storage medium having stored thereon computer-executable instructions which, when called by a computer, cause the computer to perform the method of any one of claims 1-12.
27. A chip system, comprising:
the communication interface is used for inputting and/or outputting information;
a processor for executing a computer executable program for causing a device on which the system-on-chip is installed to perform the method of any one of claims 1-12.
CN202110755856.XA 2021-07-05 2021-07-05 Message transmission method and device Pending CN115589384A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110755856.XA CN115589384A (en) 2021-07-05 2021-07-05 Message transmission method and device
PCT/CN2022/097449 WO2023279903A1 (en) 2021-07-05 2022-06-07 Message transmission method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110755856.XA CN115589384A (en) 2021-07-05 2021-07-05 Message transmission method and device

Publications (1)

Publication Number Publication Date
CN115589384A true CN115589384A (en) 2023-01-10

Family

ID=84771049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110755856.XA Pending CN115589384A (en) 2021-07-05 2021-07-05 Message transmission method and device

Country Status (2)

Country Link
CN (1) CN115589384A (en)
WO (1) WO2023279903A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10313416B2 (en) * 2017-07-21 2019-06-04 Nxp B.V. Dynamic latency control
CN111867087B (en) * 2019-04-30 2022-10-25 华为技术有限公司 Method and communication device for adjusting time domain resource boundary
CN112311494B (en) * 2019-07-23 2023-12-08 华为技术有限公司 Message transmission method, device and system
CN112398888B (en) * 2019-08-15 2023-02-28 北京华为数字技术有限公司 Communication method and device
CN114363270A (en) * 2020-09-28 2022-04-15 华为技术有限公司 Data forwarding method and related device

Also Published As

Publication number Publication date
WO2023279903A1 (en) 2023-01-12

Similar Documents

Publication Publication Date Title
US11245634B2 (en) Time-sensitive networking (TSN) packet forwarding
WO2021180073A1 (en) Packet transmission method and device, network node, and storage medium
EP2684321B1 (en) Data blocking system for networks
Alderisi et al. Introducing support for scheduled traffic over IEEE audio video bridging networks
CN102132535B (en) Method for transferring data packets in communication network and switching device
US9450894B2 (en) Integrated circuit device and method of performing cut-through forwarding of packet data
WO2023283902A1 (en) Message transmission method and apparatus
CN112311494B (en) Message transmission method, device and system
US11616586B2 (en) Period mapping method and network device
KR102360461B1 (en) Central network cofigurator, and time-sensitive networking control system including the same
US10367743B2 (en) Method for traffic management at network node, and network node in packet-switched network
CN112448896B (en) Method and device for determining transmission period in deterministic network
US20220210078A1 (en) Method implemented by computer means of a communicating entity in a packet-switched network, and computer program and computer-readable non-transient recording medium thereof, and communicating entity of a packet-switched network
US20200213240A1 (en) Method Of Synchronization Of Data Packet Transmission
CN114449586A (en) Communication scheduling method, device and storage medium
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN115589384A (en) Message transmission method and device
CN112751776A (en) Congestion control method and related device
Carvajal et al. Atacama: An open FPGA-based platform for mixed-criticality communication in multi-segmented Ethernet networks
CN112787953B (en) Deterministic traffic flow transmission method and device, electronic equipment and storage medium
WO2024016327A1 (en) Packet transmission
Berisa et al. Investigating and Analyzing CAN-to-TSN Gateway Forwarding Techniques
WO2022237415A1 (en) Packet forwarding method and related apparatus
WO2024055897A1 (en) Message processing methods, transmission method, communication device and system, medium, and product
WO2023246471A1 (en) Service data transmission method, and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination