Message transmission method and system, electronic device, storage medium, and program product

By dividing the transmission port of an Ethernet device into time slots and using specially defined messages or code blocks to carry time slot information, the problem of uncertain client message transmission delay and jitter in traditional Ethernet devices is solved, achieving fixed delay and jitter control, and improving the transmission quality in industrial production lines and vehicle networks.

WO2025223346A1PCT designated stage Publication Date: 2025-10-30ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/090048
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-23
Filing Date
2025-04-21
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

Traditional Ethernet devices suffer from uncertain processing times when forwarding client packets, leading to uncertain transmission delays and jitter, which cannot meet the high quality requirements for client packet transmission in industrial production lines and vehicles.

Method used

The transmitting ports of the first and second devices are divided into multiple time slots according to time. Time slot information is carried by specially defined messages, code blocks or customer messages to ensure that customer messages are sent on a specific time slot, thereby achieving fixed delay and jitter control.

Benefits of technology

This achieves a fixed delay and jitter range for customer messages within a time slice, meeting the requirements for transmission delay and jitter and improving transmission quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025090048_30102025_PF_FP_ABST
    Figure CN2025090048_30102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a message transmission method and system, an electronic device, a storage medium, and a program product. The method is applied to a second device. A sending port of the second device and a sending port of a first device each are time-divided into a plurality of time slots. The method comprises: receiving a client message sent by the first device; determining a first time slot used when the first device sends the client message; determining a second time slot corresponding to the first time slot from among the plurality of time slots of the sending port of the second device; and sending the client message on the second time slot.
Need to check novelty before this filing date? Find Prior Art

Description

Message transmission methods, systems, electronic devices, storage media and program products

[0001] Cross-referencing

[0002] This application claims priority to Chinese Patent Application No. 202410489302.3, filed on April 23, 2024, entitled “Message Transmission Method, System, Electronic Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of Ethernet technology, and in particular to a message transmission method, system, electronic device, storage medium, and program product. Background Technology

[0004] Traditional Ethernet devices require various processing steps when forwarding client packets, such as table lookups, parsing, rate limiting, queuing, buffering, and scheduling. Since client packets on all physical ports of an Ethernet device share the device's processing resources, the processing time for each client packet is unpredictable, leading to uncertain latency and jitter during transmission. With the widespread adoption of Ethernet technology in industrial production lines and vehicles, higher demands are placed on the quality of client packet transmission, requiring latency and jitter to meet specific expectations. However, current Ethernet packet transmission schemes are clearly insufficient to meet these latency and jitter requirements. Summary of the Invention

[0005] This application provides a message transmission method, system, electronic device, storage medium, and program product.

[0006] This application is implemented as follows:

[0007] In a first aspect, a message transmission method is provided, applied to a second device, wherein the sending port of the second device and the sending port of the first device are both divided into multiple time slots according to time, comprising: receiving a client message sent by the first device; determining a first time slot used by the first device to send the client message; determining a second time slot corresponding to the first time slot from the multiple time slots of the sending port of the second device; and sending the client message on the second time slot.

[0008] Secondly, a message transmission system is provided, the system including at least a first device and a second device, wherein the sending port of the first device and the sending port of the second device are both divided into multiple time slots according to time, wherein: the first device sends a client message to the second device; the second device receives the client message; a first time slot used by the first device to send the client message is determined; a second time slot corresponding to the first time slot is determined from the multiple time slots of the sending port of the second device; and the client message is sent on the second time slot.

[0009] Thirdly, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in the first aspect.

[0010] Fourthly, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in the first aspect.

[0011] Fifthly, a computer program product is provided, the computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of the method described in the first aspect. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 is a schematic diagram of the processing of client packets by Ethernet devices when forwarding client packets in related technologies;

[0014] Figure 2 is a flowchart illustrating a message transmission method provided in an embodiment of this application;

[0015] Figure 3 is a schematic diagram of a first device and a second device according to an embodiment of this application, which divide the transmission port into multiple time slots according to time.

[0016] Figure 4 is a schematic diagram of a first device sending client packets in a time slot and a second device forwarding client packets in the corresponding time slot, according to an embodiment of this application.

[0017] Figure 5 is a schematic diagram of sending specially defined messages at the start and end boundary positions of a time slot according to an embodiment of this application;

[0018] Figure 6 is a schematic diagram of sending a specially defined message at the start boundary position of a time slot according to an embodiment of this application;

[0019] Figure 7 is a schematic diagram of sending a specially defined message at the end boundary position of a time slot according to an embodiment of this application;

[0020] Figure 8 is a schematic diagram of the structure of the Pause message in related technologies;

[0021] Figure 9 is a schematic diagram of the structure of a Pause message provided in an embodiment of this application;

[0022] Figure 10 is a schematic diagram of the code blocks included in an Ethernet packet in related technologies;

[0023] Figure 11 is a schematic diagram of carrying a slot number in an S-code block according to an embodiment of this application;

[0024] Figure 12 is a schematic diagram of carrying a slot number in a T-code block according to an embodiment of this application;

[0025] Figure 13 is a schematic diagram of carrying a slot number in an O code block according to an embodiment of this application;

[0026] Figure 14 is a schematic diagram of carrying a slot number in the S-code block of a customer message according to an embodiment of this application;

[0027] Figure 15 is a schematic diagram of the correspondence between the timeslot number of the receiving port and the timeslot number of the transmitting port at the same moment, provided by a second device according to an embodiment of this application;

[0028] Figure 16 is a schematic diagram of a device in an Ethernet network transmitting client packets in a time slot according to an embodiment of this application;

[0029] Figure 17 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0030] Figure 18 is a schematic diagram of the structure of a message transmission device provided in an embodiment of this application. Detailed Implementation

[0031] Traditional Ethernet technology forwards client packets using a best-effort approach, resulting in uncertain transmission latency and jitter. Figure 1 illustrates the processing of client packets by Ethernet devices in related technologies. Taking device 2 as an example, after receiving a client packet from device 1, device 2 performs table lookups, parsing, rate limiting, queuing, buffering, and scheduling before forwarding it to device 3. Since device 2 typically has multiple physical ports, and client packets from these ports share the processing resources within device 2, the processing time for each physical port is uncertain, as is the completion time, leading to uncertain transmission latency and jitter for client packets within device 2.

[0032] With the widespread use of Ethernet technology in network systems (such as automated production line networks in industrial parks and vehicle communication networks), higher requirements are being placed on the transmission quality of client packets in some scenarios. This necessitates that the transmission latency and jitter of client packets meet certain expected parameters. However, as mentioned earlier, traditional Ethernet technology forwards client packets based on a best-effort approach. The timing of client packet transmission is uncertain, resulting in uncertain transmission latency and jitter. Therefore, it cannot meet the requirements for low transmission latency and jitter in client packets.

[0033] This application provides a message transmission method, system, storage medium, and product program. When transmitting client messages based on traditional Ethernet technology, a first device and a second device can divide their sending ports into multiple time slots. After receiving a client message sent by the first device, the second device can determine the first time slot used by the first device to send the client message, and then determine the second time slot corresponding to the first time slot from among the multiple time slots of the second device's sending port, and send the client message in the second time slot. In this way, for a client message received in a certain time slot, since it can be sent out in the corresponding time slot, the client message can be forwarded at a certain time, ensuring that the delay time of the client message is always fixed and the range of delay time fluctuation is always limited to within a time slice, thereby meeting the requirements for the transmission delay and jitter of client messages.

[0034] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in this application will be clearly and completely described below with reference to the accompanying drawings of one or more embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this application.

[0035] The terms "first," "second," etc., used in this application and the claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that this application can be implemented in orders other than those illustrated or described herein. Furthermore, in this application and the claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0036] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0037] Figure 2 is a flowchart illustrating a message forwarding method according to an embodiment of this application. The message forwarding method shown in Figure 2 can be applied to a second device, where both the sending port of the second device and the sending port of the first device are divided into multiple time slots (i.e., multiple time slices). Both the first and second devices are devices that perform message forwarding based on Ethernet technology. The first device can be any of the upstream devices shown in Figure 1, and the second device can be a downstream device adjacent to the first device. The message forwarding method shown in Figure 2 may include the following steps.

[0038] S202: Receive client messages sent by the first device.

[0039] S204: Determine the first timeslot used by the first device when sending a client message.

[0040] S206: Determine the second time slot corresponding to the first time slot from multiple time slots of the second device's transmission port.

[0041] S208: Send client messages in the second time slot.

[0042] When both the first and second devices divide their transmitting ports into multiple time slots, the first device can choose to send a client message to the second device on one or more of these time slots. After receiving the client message, the second device, when forwarding it, can first determine the time slot used by the first device to send the message; for ease of distinction, this can be referred to as the first time slot. There can be one or more first time slots. After determining the first time slot, the second device can determine the corresponding time slot from its transmitting port; for ease of distinction, this can be referred to as the second time slot. There can also be one or more second time slots. After determining the second time slot, the second device can send the client message on that second time slot.

[0043] As shown in Figure 3, when the first and second devices divide their respective transmitting ports into multiple time slots, the process can be as follows. In Figure 3, the Ethernet transmitting port of the first device is divided into n1+1 time slots, represented by 0, 1, 2, 3, 4, ..., n1. Each time slot has the same duration, T1 (the time unit can be microseconds, milliseconds, etc.). These time slot sequences can appear periodically, with a cycle period of (n1+1)*T1. Similarly, the Ethernet transmitting port of the second device is divided into n2+1 time slots, represented by 0, 1, 2, 3, 4, ..., n2. Each time slot has the same duration, T2 (the time unit can be microseconds, milliseconds, etc.). These time slot sequences can appear periodically, with a cycle period of (n2+1)*T2. T1 and T2 can be the same or different, and n1 and n2 can be the same or different.

[0044] After the first and second devices divide their transmitting ports into multiple time slots, they can choose to send a client message on one or more of these time slots, as shown in Figure 4. In Figure 4, the first device, after dividing its Ethernet transmitting port into multiple time slots, can choose to send a client message on time slot number 0. After the first device sends the client message, it will be delayed via optical fiber or cable before being transmitted to the downstream second device. The second device also divides its Ethernet transmitting port into multiple time slots. After receiving a client packet, the second device's Ethernet receiving port determines that the time slot number used by the first device to send the client packet is 0. When forwarding the client packet, the second device selects time slot number 10 (corresponding to time slot number 0) from the multiple time slots of the transmitting port to send the client packet. That is, the time slot packet with time slot number 0 from the first device is sent in the second device in time slot number 10. There is a one-to-one correspondence between the time slot number 0 received by the receiving port and the time slot number 10 sent by the transmitting port of the second device.

[0045] In this way, after receiving the client message sent by the first device in the first time slot, the second device can send the client message out in the corresponding second time slot. Therefore, the client message can be forwarded at a fixed time, ensuring that the delay time of the client message is always fixed and the fluctuation range of the delay time is always limited to one time slice, thereby meeting the requirements for the transmission delay and jitter of the client message.

[0046] In S204 above, when the second device determines the first timeslot used by the first device to send a client message, it can first determine the boundary position and / or timeslot identifier (such as timeslot number) of the first timeslot, and then determine the first timeslot based on the boundary position and / or timeslot identifier. The following will explain in detail how the second device determines the first timeslot used by the first device to send a client message. Since the first device can use one or more timeslots to send a client message for a specific client, the number of first timeslots can be one or more. For ease of understanding and explanation, the following will use the example of a first timeslot consisting of one timeslot.

[0047] Optionally, in some implementations, the second device determining the first timeslot used by the first device when sending the client message may include at least one of the following:

[0048] The first timeslot used by the first device to send client messages is determined according to a special definition message.

[0049] Determine the first timeslot used by the first device when sending the customer message based on the customer message;

[0050] The first time slot used by the first device to send a client message is determined based on a specially defined code block or a specially defined code block group.

[0051] In other words, the second device can determine the first time slot used by the first device when sending a client message based on at least one of the following three options: a specially defined message, a client message, a specially defined code block, or a group of specially defined code blocks. These three methods will be explained separately below.

[0052] A special definition message is a non-client message agreed upon by the first and second devices to indicate the first time slot. The special definition message can carry the time slot information of the first time slot. When the first device sends a client message to the second device, it can simultaneously send the special definition message to the second device. Thus, after receiving the special definition message, the second device can determine the first time slot based on it.

[0053] In some implementations, the special-defined message may carry a timeslot identifier for the first timeslot. When the first device sends the special-defined message, it may do so at the boundary of the first timeslot (in which case the special-defined message also carries the boundary location information of the first timeslot). Thus, when the second device determines the first timeslot used by the first device to send the client message based on the special-defined message, it may include:

[0054] Determine the location where specially defined messages appear;

[0055] Extract the time slot identifier carried in specially defined messages;

[0056] The location where the specially defined message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the specially defined message is determined as the time slot identifier of the first time slot.

[0057] Since the first device sends the specially defined message at the boundary of the first time slot, the location where the specially defined message appears is the boundary of the first time slot. After detecting the specially defined message, the second device can determine its location as the boundary of the first time slot. Simultaneously, the second device can extract the time slot identifier carried in the specially defined message and identify it as the time slot identifier of the first time slot. Thus, by determining the boundary of the first time slot and its identifier, the first time slot used by the first device to send client messages can be determined.

[0058] The aforementioned boundary positions can be a start boundary position, an end boundary position, or both a start boundary position and an end boundary position. That is, when the first device sends a specially defined message at the boundary position of the first time slot, it can send the specially defined message at the start boundary position of the first time slot, or at the end boundary position of the first time slot, or at both the start and end boundary positions of the first time slot. Specifically, in the case where a specially defined message is sent at both the start and end boundary positions of the first time slot, the second device can directly determine the two boundary positions of the first time slot based on the location of the specially defined message. When a special-defined message is sent at the start or end boundary of the first time slot, since the time slots are continuous and the end boundary of the previous time slot is the start boundary of the next time slot, after detecting the location where the special-defined message appears, the location where the special-defined message appears and the location where the special-defined message was previously detected can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device sends a special-defined message at the end boundary of the first time slot), or the location where the special-defined message appears and the location where the special-defined message is detected next can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device sends a special-defined message at the start boundary of the first time slot).

[0059] Please refer to Figures 5 through 7. In Figure 5, the transmitting port can generate start and end boundary position information for each time slot. When sending special-defined messages, the transmitting port can send special-defined messages at the start and end boundary positions of the time slot. The transmitting and receiving ports negotiate to determine both the start and end position information of the time slot. Thus, after detecting a special-defined message, the receiving port can determine the start and end positions of each time slot based on the location of the special-defined message. All messages located between the start and end positions belong to the same time slot. The time slot of these messages can be determined based on the time slot identifier carried in the special-defined messages at the start and / or end positions.

[0060] In Figure 6, the transmitting port can generate only the start boundary position information for each time slot. When sending a special-defined message, the transmitting port can send the special-defined message only at the start boundary position of the time slot. The transmitting port and the receiving port negotiate to determine that only the start boundary position information of the time slot is available. In this way, after detecting a special-defined message, the receiving port can continue to detect the next special-defined message and determine the occurrence positions of the two special-defined messages as the start and end boundary positions of the time slot. All messages between two special-defined messages belong to the same time slot. The time slot number carried in the special-defined message at the start position of the time slot gives the specific time slot number to which these messages belong. Based on this time slot number, the time slot in which these messages belong can be determined.

[0061] In Figure 7, the transmitting port can generate only the end boundary position information for each time slot. When sending a special-defined message, the transmitting port can send the special-defined message only at the end boundary position of the time slot. The transmitting port and the receiving port negotiate to determine that only the end boundary position information of the time slot is available. In this way, after the receiving port detects a special-defined message, it can determine the start boundary position and end boundary position of the time slot based on the location where the special-defined message appears and the location where the special-defined message was last detected. All messages between two special-defined messages belong to the same time slot. The time slot number carried in the special-defined message at the end position of the time slot gives the specific time slot number to which these messages belong. Based on this time slot number, the time slot in which these messages belong can be determined.

[0062] The aforementioned specially defined messages are specially defined non-client messages. In some implementations, specially defined messages may include at least one of the following:

[0063] Special definition messages are custom messages that carry special flags;

[0064] Special definition messages are obtained by extending the functionality of Ethernet protocol messages.

[0065] The special flag can be pre-agreed upon by the first and second devices. Upon receiving a message, if the second device detects that the message carries a special flag, it can determine that the message is a specially defined message. A specially defined message can be an Ethernet message carrying a special flag. A specially defined message can be obtained by adding a special flag and a timeslot identifier to a regular Ethernet message. The special flag can take various forms; for example, using the characteristic value of the type field in the Ethernet message as 0xffff as the special flag, or using a special destination address value (such as 0xff-ff-ff-ff-ff-ff) in the destination address field of the Ethernet message as the special flag. No specific limitations are imposed here.

[0066] Specially defined messages can be messages obtained by functionally extending Ethernet protocol messages. For example, an Ethernet protocol message could be a destination Pause message carrying a time window value. In an Ethernet physical interface, a Pause frame can be used to notify the peer device to pause message transmission, limiting the transmission rate of client services. Upon receiving a Pause frame, the receiving end initiates flow control and then discards the Pause frame message. The Pause frame format is shown in Figure 8. In Figure 8, the destination address field in the Pause frame is a fixed value (0x01-80-C2-00-00-01), the type value is 0x8808, and the opcode is 0x0001. The operation parameter is the length of time the sender requests the receiver to stop transmitting data frames. The time measurement unit is the time taken to transmit 512 bits of data at the current transmission rate. The actual pause time for the receiver is the product of the operation parameter field content and the time taken to transmit 512 bits of data at the current transmission rate. In related technologies, the operation parameter is usually taken as 0xFFFF, and the pause time is taken as the maximum value. In this embodiment, the operation parameter can be set to 0x0000 (or other operation values) as a special flag (a Pause frame with an operation parameter of 0x0000 indicates no flow control during flow control), and the Pause message with an operation parameter of 0x0000 is a specially defined message, as shown in Figure 9. The time slot number (i.e., time slot identifier) ​​can be carried in the reserved field of the Pause message and sent to the receiver. After receiving a Pause message with an operation code of 0x0000, the receiver can extract the time slot number from the reserved field. Based on this time slot number and the location of the Pause message, the time slot used by the sender when sending the client message can be determined.

[0067] The above examples illustrate the form of special definition messages. In other possible implementations, special definition messages can also be other forms of non-client messages, as long as they can transmit the time slot boundary location information and time slot identifier. Here, no specific limitation is made on the form of special definition messages.

[0068] It should be noted that since the special definition message is a non-client message used to transmit the time slot boundary location information and time slot identifier, it loses its meaning after the transmission of the time slot boundary location information and time slot identifier is completed. Therefore, in some implementations, after the second device determines the first time slot used by the first device to send the client message based on the special definition message, it can discard the special definition message.

[0069] A specially defined code block (or simply a specific code block) is a code block obtained by specifically defining a code block. A specially defined code block group (or simply a specific code block group) is a sequence group composed of multiple specially defined code blocks. A specially defined code block or a specially defined code block group can carry the time slot information of the first time slot. When the first device sends a client message to the second device, it can simultaneously send the specially defined code block or the specially defined code block group to the second device. Thus, after receiving the specially defined code block or the specially defined code block group, the second device can determine the first time slot used by the first device when sending the client message based on the specially defined code block or the specially defined code block group.

[0070] In some implementations, the specially defined code block or group of specially defined code blocks can carry the time slot identifier of the first time slot. When the first device sends the specially defined code block or group of specially defined code blocks, it can send the specially defined code block or group of specially defined code blocks at the boundary position of the first time slot (at this time, the specially defined code block or group of specially defined code blocks also carries the boundary position information of the first time slot). Thus, when the second device determines the first time slot used by the first device to send the client message based on the specially defined code block or group of specially defined code blocks, it can include:

[0071] Determine the location of special-defined code blocks or groups of special-defined code blocks;

[0072] Extract the slot identifier carried in the special-defined code block or special-defined code block group;

[0073] The location of the occurrence of a specially defined code block or a group of specially defined code blocks is determined as the boundary location of the first time slot, and the time slot identifier carried in the specially defined code block or group of specially defined code blocks is determined as the time slot identifier of the first time slot.

[0074] Since the first device transmits a specially defined code block or group of specially defined code blocks at the boundary of the first time slot, the location where the specially defined code block or group of specially defined code blocks appears is the boundary of the first time slot. After detecting the specially defined code block or group of specially defined code blocks, the second device can determine the location of the detected specially defined code block or group of specially defined code blocks as the boundary of the first time slot. Simultaneously, after detecting the specially defined code block or group of specially defined code blocks, the second device can also extract the time slot identifier carried within the specially defined code block or group of specially defined code blocks and determine this time slot identifier as the time slot identifier of the first time slot. Thus, by determining the boundary location and time slot identifier of the first time slot, the first time slot used by the first device when transmitting client messages can be determined.

[0075] The aforementioned boundary positions can be a start boundary position, an end boundary position, or both a start boundary position and an end boundary position. That is, when the first device transmits a specially defined code block or a group of specially defined code blocks at the boundary positions of the first time slot, it can transmit the specially defined code block or group of specially defined code blocks at the start boundary position of the first time slot, or at the end boundary position of the first time slot, or at both the start and end boundary positions of the first time slot. Specifically, in the case where the specially defined code block or group of specially defined code blocks is transmitted at the start and end boundary positions of the first time slot, the second device can directly determine the two boundary positions of the first time slot based on the location of the specially defined code block or group of specially defined code blocks. When a specially defined code block or group of specially defined code blocks is transmitted at the start or end boundary of the first time slot, since the time slots are continuous and the end boundary of the previous time slot is the start boundary of the next time slot, after detecting the location of the occurrence of the specially defined code block or group of specially defined code blocks, this location and the location of the previous detection of the specially defined code block or group of specially defined code blocks can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device transmits the specially defined code block or group of specially defined code blocks at the end boundary of the first time slot), or the location of the occurrence and the location of the next detection of the specially defined code block or group of specially defined code blocks can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device transmits the specially defined code block or group of specially defined code blocks at the start boundary of the first time slot). See Figures 5 to 7 for specific examples; further details are omitted here.

[0076] Specially defined code blocks can be specially defined S-blocks, D-blocks, T-blocks, or other control code blocks. The Ethernet standard defines that Ethernet packets with speeds of 10G and higher are 64 / 66 encoded before transmission. Figure 10 shows the 64 / 66 encoding rules specified in the Ethernet IEEE 8.2.3 standard. The first two bits of a 66-bit code block are synchronization header bits. If the synchronization header bits are "01", it indicates that the code block is a data code block, i.e., a D-block. If the synchronization header bits are "10", it indicates that the code block is a control code block. There are many types of control code blocks, and the specific type of control code block is determined by the content of the first byte (control code blocks include S-blocks, T-blocks, 0-blocks, and ilde-blocks). After encoding, the Ethernet packet forms a 66-bit length code block stream. Each Ethernet packet, after encoding, consists of one S-block, several D-blocks, and one T-block. The structure of the S-block, D-block, and T-block (which can be simply referred to as S-block, D-block, and T-block) is shown in Figure 10. The S-block is the first block of the message, the D-block is the middle block (data block) carrying client information, and the T-block is the last block. In the 802.3 standard, there are eight different types of T-blocks: T0, T1, T2, T3, T4, T5, T6, and T7. The T0 block does not carry any client content, the T1 block carries one byte of client content, the T2 block carries two bytes of client content, and so on, with the T7 block carrying seven bytes of client content. Control blocks also include the I-block (also known as the idle block) and the O-block (also known as the fault maintenance management block).

[0077] Since the Ethernet standard defines a minimum message length of 64 bytes, the number of D blocks in a typical Ethernet message's encoded block sequence should be no less than four. If there are fewer than four D blocks, it is considered an illegal message block, and the receiving end will discard it. Therefore, a block stream sequence consisting of one S block + n D blocks (n being any value of 0, 1, 2, or 3) + one T block can be used as a specially defined block group. For example, an S+T block stream sequence, or an S+D+T block stream sequence, or an S+D+D+T block stream sequence, or an S+D+D+D+T block stream sequence can be used as a specially defined block group. When sending client messages, the transmitting port can send the specially defined block group at the edge of the time slot, and carry the time slot identifier within the specially defined block group. After detecting a specially defined code block group, the receiving port can determine the location of the specially defined code block group as the boundary location of the time slot, and determine the time slot number carried in the specially defined code block group as the time slot number.

[0078] As shown in Figure 11, the S+T code block stream sequence group can be used as a specially defined code block group, with the S code block carrying the time slot number. The transmitting port generates the specially defined code block group at the boundary position of the first time slot. After detecting the specially defined code block group, the receiving port determines the boundary position of the time slot based on the occurrence position of the specially defined code block group and extracts the time slot number carried in the S code block. Finally, the time slot used by the transmitting port to send the client message can be determined. In the case of the S+T code block stream sequence group as a specially defined code block group, in addition to carrying the time slot number in the S code block, the time slot number can also be carried in the T code block, as shown in Figure 12. The T code block in the S+T code block stream sequence group adopts the T1 code block type, and the time slot number can be carried in the T1 code block.

[0079] In some implementations, to reduce the number of code blocks carrying time slot numbers, specially defined single code blocks can be used to transmit the time slot numbers. For example, in the 802.3 standard, the O code block is used to transmit fault information. The structure of the O code block is shown in the upper half of Figure 13. In Figure 13, the first two bits of the O code block are "10" (indicating a control code block type), the control word content at byte 1 is 0x4B (indicating an O code block type), and bytes 2-4 contain three bytes of data: D1, D2, and D3. The first half byte (4 bits) of byte 5 contains the code block sequence value O0, which indicates the code block application type, i.e., the subtype. The second half byte of byte 5 and bytes 6-8 in the O code block are all reserved values ​​of 0. The four bits of the O0 value can represent 16 different numerical contents, representing 16 subtypes. The current standard already uses 0x0, 0x1, 0x2, 0x5, 0xC, and 0xF; other values ​​are not used. Therefore, other values ​​can be defined as special-defined code block flags. For example, using the O0 sequence value of 0xE as a special-defined flag O code block, this special-defined flag O code block transmits time slot boundary position information and time slot number information. In the specially defined O code block, the time slot number is transmitted in some byte positions of D1-D3, as shown in Figure 13 where the time slot number is transmitted in some byte positions of D3 in the O code block.

[0080] The above examples illustrate the forms of specially defined code blocks and specially defined code block groups. In other possible implementations, specially defined code blocks or specially defined code block groups can also be in other forms, as long as they can transmit the time slot boundary position information and time slot identifier. Here, no specific limitation is made on the form of specially defined code blocks or specially defined code block groups.

[0081] It should be noted that since the special-defined code block or special-defined code block group is used to transmit the time slot boundary location information and time slot identifier, it loses its meaning after the transmission of the time slot boundary location information and time slot identifier is completed. Therefore, in some embodiments, after the second device determines the first time slot used by the first device to send the client message based on the special-defined code block or special-defined code block group, it can discard the special-defined code block or special-defined code block group.

[0082] In some possible implementations, when the first device transmits time slot information using specially defined messages, specially defined code blocks, or specially defined code block groups, if it sends such messages or code blocks at the boundary positions of a time slot (start boundary position, end boundary position, or both start and end boundary positions), a client message may need to be initiated at that boundary position. In this case, the first device will be unable to insert and send the specially defined message or code block or code block group at the boundary position, and therefore cannot transmit time slot information using such messages or code blocks. In this situation, to achieve the transmission of time slot information, the first device can carry the time slot information of the first time slot in the client message, i.e., use the client message to transmit the time slot information of the first time slot. After receiving the client message, the second device can determine the first time slot used by the first device when sending the client message based on the time slot information carried in the client message.

[0083] In this embodiment, the first device can send multiple client packets within a first time slot. When the first device carries time slot information in the client packets, there are various methods for doing so. Optionally, in some implementations, the first device can carry the time slot identifier of the first time slot in each client packet within the first time slot. That is, the first device selects which client packets to send in the first time slot and carries the time slot identifier of the first time slot in those client packets. Thus, when the second device determines the first time slot used by the first device to send client packets based on the client packets, it can include:

[0084] The first time slot used by the first device to send the customer message is determined based on the time slot identifier carried in the customer message.

[0085] Since all client packets sent by the first device within the first time slot carry the time slot identifier of the first time slot (meaning the time slot to which the client packet belongs is directly indicated within the client packet), the second device, after receiving a client packet and extracting the time slot identifier carried in the client packet, can determine which time slot the client packet belongs to based on the time slot identifier carried in the client packet. Specifically, client packets carrying the time slot identifier of the first time slot are client packets within the first time slot, and the time slot identifier carried in the client packet is the time slot identifier of the first time slot.

[0086] For example, if the first device sends messages 1 to 10 to the second device in sequence, and messages 1 and 2 carry time slot number 1, and messages 3 to 10 carry time slot number 2, then after receiving these messages, the second device can determine that the time slot used by the first device to send messages 1 and 2 is time slot number 1, and the time slot used to send messages 3 to 10 is time slot number 2.

[0087] Optionally, in some embodiments, the first device may carry time slot information in the client message by carrying the time slot identifier of the first time slot in the first message of the client message. The first message is the client message located at the time slot boundary of the first time slot. That is, when the first device sends the client message, it can carry the time slot identifier in the client message sent at the time slot boundary. In this way, when the second device determines the first time slot used by the first device to send the client message based on the client message, it can include:

[0088] The location where the first message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the first message is determined as the time slot identifier of the first time slot.

[0089] Since the first device sends the first message at the boundary of the first time slot, and the first message carries the time slot identifier of the first time slot (meaning the first message appears at the boundary of the first time slot, and the time slot identifier carried in the first message is the time slot identifier of the first time slot), the second device, after detecting the first message carrying the time slot identifier, can determine the appearance location of the detected first message as the boundary of the first time slot when determining the first time slot. Simultaneously, the second device can also extract the time slot identifier carried in the first message and determine that time slot identifier as the time slot identifier of the first time slot. Thus, by determining the boundary location and time slot identifier of the first time slot, the first time slot used by the first device when sending the client message can be determined.

[0090] The aforementioned boundary positions can be a start boundary position, an end boundary position, or both a start boundary position and an end boundary position. That is, when the first device sends a client message, it can carry the time slot identifier of the first time slot in the client message sent at the start boundary position of the first time slot, or in the client message sent at the end boundary position of the first time slot, or in the client message sent at both the start and end boundary positions of the first time slot. In other words, the first device can send a client message carrying a time slot identifier (i.e., the first message) at the start boundary position and / or the end boundary position of the first time slot. Specifically, in the case where the first message is sent at both the start and end boundary positions of the first time slot, the second device can directly determine the two boundary positions of the first time slot based on the location where the first message appears. When a first message is sent at the start or end boundary of the first time slot, since time slots are continuous and the end boundary of the previous time slot is the start boundary of the next time slot, after detecting the location where the first message appears, this location and the location where the first message was previously detected can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device sends the first message at the end boundary of the first time slot), or the location where the first message appears and the location where the first message is subsequently detected can be determined as the two boundary locations of the first time slot (corresponding to the case where the first device sends the first message at the start boundary of the first time slot). See Figures 5 to 7 for specific examples; further details are omitted here.

[0091] As mentioned earlier, an Ethernet client packet consists of one S-block, several D-blocks, and one T-block. Therefore, when carrying a time slot identifier in the client packet, optionally, in some implementations, the time slot identifier can be carried within the S-block of the client packet. In an exemplary embodiment, in the Ethernet standard definition, the S-block consists of 66 bits, with the structure: "0b10" + "0x78" + six "0x55"s + one "0xD5". The "0b10" + "0x78" fields are used to identify the block as an S-block. The content of the following six "0x55"s and one "0xD5" can be customized. In this embodiment, some fields from the six "0x55"s can be used to carry the time slot identifier. For example, the first "0x55" can be used to carry the time slot number, as shown in Figure 14. When the S-code block carries the slot identifier, the slot identifier can be carried only in the S-code block of the message at the slot boundary. In this case, the S-code block can transmit not only the slot identifier information but also the slot boundary location information. Alternatively, the slot identifier can be carried in the S-code block of all messages within the slot. In this case, the S-code block directly indicates which slot each client message belongs to, and it is no longer necessary to determine which slot each message belongs to based on the slot boundary location information (start position and / or end position). The slot boundary location information becomes meaningless. For the transmitting port, it is no longer necessary to generate and transmit the slot boundary location information, and for the receiving port, it is no longer necessary to detect the slot boundary location information.

[0092] It should be noted that, regarding the three methods for transmitting the first time slot information (i.e., transmitting the first time slot information via a specially defined message, transmitting the first time slot information via a client message, and transmitting the first time slot information via a specially defined code block or a group of specially defined code blocks), in practical applications, the first device and the second device can agree on which method to use to transmit the first time slot information. Thus, when the first device sends a client message to the second device, it can use the agreed-upon method to transmit the first time slot information. After receiving the client message, the second device can determine the first time slot based on the agreed-upon method. For example, if the first device and the second device agree to use a specially defined message to transmit the first time slot information, then when the first device sends a client message on the first time slot, it can simultaneously send a specially defined message at the boundary position of the first time slot (if there is no client message to send at the boundary position). When the second device receives a client message, it can detect the specially defined message and determine the first time slot based on the detected specially defined message. If the first device and the second device agree to use specially defined code blocks or specially defined code block groups to transmit the time slot information of the first time slot, then when the first device sends a client message in the first time slot, it can simultaneously send specially defined code blocks or specially defined code block groups at the boundary positions of the first time slot (if there are no client messages to send at the boundary positions). When the second device receives a client message, it can detect the specially defined code blocks or specially defined code block groups and determine the first time slot based on the detected specially defined code blocks or specially defined code block groups. If the first device and the second device agree to use client messages to transmit the time slot information of the first time slot, then when the first device sends a client message in the first time slot, it can carry a time slot identifier in the client message sent at the time slot boundary position of the first time slot, or carry a time slot identifier in all client messages within a time slot. When the second device receives a client message, it can detect whether the client message carries a time slot identifier and determine the first time slot based on the detection result. Of course, the first and second devices can also choose not to agree on the method of transmitting time slot information. In this case, the first device can flexibly use specially defined messages and / or client messages to transmit time slot information according to the actual business situation. When receiving messages, the second device can detect specially defined messages, specially defined code blocks or groups of specially defined code blocks, and client messages, and determine the first time slot based on the detection results. No specific restrictions are placed on the method of transmitting time slot information here.

[0093] In S206 above, when the second device determines the second time slot corresponding to the first time slot from multiple time slots of the transmitting port, in some embodiments, it may include:

[0094] Based on the first correspondence relationship of time slot identifiers, determine the target time slot identifier corresponding to the time slot identifier of the first time slot;

[0095] The time slot corresponding to the target time slot identifier among the multiple time slots of the transmitting port of the second device is determined as the second time slot.

[0096] The first correspondence is the relationship between the timeslot identifier of the transmitting port of the first device and the timeslot identifier of the transmitting port of the second device. After determining the first timeslot used by the first device to transmit client packets, the second device can obtain the timeslot identifier of the first timeslot. After obtaining the timeslot identifier of the first timeslot, when determining the second timeslot corresponding to the first timeslot, the second device can determine the timeslot identifier corresponding to the timeslot identifier of the first timeslot (i.e., the target timeslot identifier) ​​according to the first correspondence, and then determine the timeslot corresponding to the target timeslot identifier among the multiple timeslots of the transmitting port of the second device as the second timeslot. For example, if the timeslot identifier of the first timeslot is 0, and the timeslot identifier corresponding to timeslot identifier 0 is determined to be 10 based on the first correspondence, then the timeslot with timeslot identifier 10 among the multiple timeslots of the transmitting port of the second device is timeslot 10, and the second device can determine timeslot 10 as the second timeslot.

[0097] The first correspondence between the aforementioned time slot identifiers can be determined or configured by the second device. In an exemplary embodiment, the first correspondence can be determined by the second device based on the receive time slot identifier of the second device's receiving port, the latency requirements of the customer service, the latency time of the customer service within the second device, and a second correspondence. The second correspondence is the correspondence between the receive time slot identifier of the second device's receiving port and the transmit time slot identifier of the transmitting port at the same time, and is obtained by the second device through measurement. That is, when determining or configuring the first correspondence, the second device can first measure the correspondence between the receive time slot identifier of the second device's receiving port and the transmit time slot identifier of the transmitting port at the same time, and then combine the receive time slot identifier of the second device's receiving port, the latency requirements of the customer service, and the latency time of the customer service within the second device to determine the first correspondence between the time slot identifier of the first device's transmitting port and the time slot identifier of the second device's transmitting port.

[0098] Optionally, in some implementations, the second device may determine or configure the first correspondence by the following methods:

[0099] During the forwarding of client packets, the second device can determine the correspondence between the timeslot number of the packet received by the receiving port (which can be represented as the receiving port's timeslot number or the receiving timeslot number) and the timeslot number of the packet sent by the sending port (which can be represented as the sending port's timeslot number or the sending timeslot number) at the same time (i.e., the second correspondence mentioned above), as shown in Figure 15, based on the packet forwarding situation. The second device can measure the correspondence between the receiving timeslot number of the receiving port and the sending timeslot number of the sending port at the same time. At a specific moment, the time of receiving timeslot 0 of the receiving port and a portion of the time of sending timeslot 6 or timeslot 7 of the sending port occur at the same time. This means that when the receiving port of the second device receives a client packet in timeslot 0, the sending port is sending a packet in timeslot 6 or timeslot 7 at that moment. The receiving port receives multiple client packets in timeslot 0 and cannot send them in timeslot 6 of the sending port (the packets are received in the later time segment of timeslot 0), and therefore cannot send them in timeslot 6 of the sending port. For a message received at the last moment of time slot 0 at the receiving port, although it can be sent in time slot 7 at the sending port (ignoring the internal delay of the message within the device), it will still fall within the last narrow time slice of time slot 7 at the sending port. Considering the transmission delay caused by the message's processing steps such as parsing, table lookup, and modification within the device from the receiving port, the message may miss the last narrow time slice of time slot 7 when it arrives at the sending port. It can only be scheduled for transmission in time slot 8 (in scenarios where the internal delay of the message is relatively small). That is, if the receiving port receives a message in time slot 0, in scenarios where the internal delay of the device is relatively small, the safe and guaranteed transmission time slot at the sending port is time slot 8 and other time slots after time slot 8. The correspondence between the receiving port's receiving time slot identifier and the sending port's sending time slot identifier measured by the second device at the current moment provides a reference basis for the receiving port to select a safe and reliable transmission time slot number at the sending port when receiving messages. The correspondence measured by the second device in Figure 15 (i.e., the second correspondence) can be shown in Table 1 below.

[0100] Table 1

[0101] As can be seen from Table 1, in the second device, the receiving port time slot 0 corresponds to the transmitting port time slots 6 and 7. Similarly, the receiving port time slot 1 corresponds to the transmitting port time slots 7 and 8, the receiving port time slot 2 corresponds to the transmitting port time slots 8 and 9, and so on.

[0102] Table 1 above is a table showing the correspondence between the timeslot number of the receiving port and the transmission timeslot number of the transmitting port at the same time, with the timeslot of the receiving port as the reference. In other embodiments, the timeslot number of the receiving port and the transmission timeslot number of the transmitting port at the same time can also be given with the timeslot of the transmitting port as the reference, as shown in Table 2.

[0103] Table 2

[0104] Besides providing a table showing the correspondence between the timeslot number of the receiving port and the timeslot number of the transmitting port at the same time, this correspondence can also be given by formula. For example, the correspondence shown in Table 1 can be expressed by the following formula:

[0105] (Receiver timeslot number + 6) <= Transmitter timeslot number <= (Receiver timeslot number + 7).

[0106] After determining the correspondence between the timeslot numbers of the receiving port and the transmitting port at the same time, the second device can, in conjunction with the receiving timeslot identifier of the second device's receiving port, the latency requirements of the customer service, and the latency time of the customer service within the second device, determine the correspondence between the timeslot identifiers of the transmitting port of the first device and the transmitting port of the second device. In an exemplary embodiment, all devices in the Ethernet network can measure and determine the correspondence between the timeslot numbers of their receiving ports and transmitting ports at the same time using the same method. Afterward, the Ethernet network possesses the foundation for deterministic service carrying technology. For a given customer, based on their business requirements (transmission path, latency requirements, etc.), a transmission path and the bearer timeslot numbers of each device along the path can be planned on the network. The source device determines which timeslots carry the customer's business. The source device is the first bearer device for the customer's business, and the adjacent downstream device is the second bearer device. The second bearer device plans and schedules the transmission timeslot numbers on each device's transmission port based on information such as the customer's message reception timeslot number, the customer's latency requirements, the customer's latency within the device, and the correspondence between the timeslot numbers of the receiving port and the sending port at the same time. Thus, for each device, the correspondence between the timeslot numbers of the upstream device's transmission port and the timeslot numbers of this device's transmission port can be obtained (i.e., the first correspondence).

[0107] In an Ethernet network, after each device determines the correspondence between the timeslot number of the upstream device's transmitting port and the timeslot number of its own transmitting port, upon receiving a client packet from the upstream device and determining the timeslot used by the upstream device, it can determine the corresponding timeslot from its own transmitting port based on this correspondence and transmit the client packet on that corresponding timeslot. As shown in Figure 16, timeslot number 0 of device 1's transmitting port corresponds to timeslot number 2 of device 2's transmitting port. Timeslot number 2 corresponds to timeslot number 4 of device 3's transmitting port, and timeslot number 4 corresponds to timeslot number n4 of device 4's transmitting port. Therefore, when forwarding client packets, if device 1 selects timeslot 0 for transmission, device 2 selects timeslot 2, device 3 selects timeslot 4, and device 4 selects timeslot n4.

[0108] In the above S208, when the second device sends a client message on the second time slot after determining the second time slot, optionally, in some embodiments, it may include at least one of the following:

[0109] Generate a second time slot; generate a specially defined message; send the specially defined message at the time slot boundary of the second time slot and send client messages on the second time slot;

[0110] Generate a second time slot; add the second time slot identifier to the client message; send the client message on the second time slot.

[0111] In other words, when the second device sends a client message in the second time slot, it can first generate the second time slot and then send the client message in the second time slot. In addition, when the second device has downstream devices, in order to facilitate the downstream devices in determining the second time slot used by the second device to send the client message, the second device can also transmit the time slot information of the second time slot to the downstream devices when sending the client message in the second time slot.

[0112] When transmitting time slot information for the second time slot, the second device can transmit it using at least one of specially defined messages and client messages. When transmitting time slot information using specially defined messages, the second device can first generate a specially defined message carrying the time slot identifier of the second time slot. Then, when sending client messages on the second time slot, the specially defined message is sent at the boundary position of the second time slot (which could be the start boundary position, the end boundary position, or both the start and end boundary positions). When transmitting time slot information using client messages, the second device can add the time slot identifier of the second time slot to the client message when sending it on the second time slot, and then send the client message carrying the time slot identifier to the downstream device. When adding the time slot identifier to the client message, the time slot identifier can be added to every client message sent within the second time slot, or it can be added only to client messages sent at the boundary position of the second time slot (which could be the start boundary position, the end boundary position, or both the start and end boundary positions). The specific implementation method of the second device transmitting the second time slot information can be found in the specific implementation method of the first device transmitting the first time slot information described above. The specific implementation method of the downstream device of the second device determining the second time slot after receiving the client message can be found in the specific implementation method of the second device determining the first time slot described above. These will not be described in detail here.

[0113] In this way, after receiving a client message, the second device can determine the first time slot carrying the client message and forward it in the corresponding second time slot. At the same time, it passes the time slot information of the second time slot to the next device so that the next device can also forward the client message in the corresponding time slot. Therefore, each sending device in the Ethernet network can send client messages in a determined time slot, and each receiving device can receive them in a fixed time slice and resend them in a fixed time slice. Even if the delay time of the client message changes within the device (the maximum delay time of the message needs to be tolerated when configuring the sending time slot), the client message is always sent in a fixed time slice (time slot number) at the sending port. Therefore, the delay time of the message is always fixed, the range of delay time fluctuation is limited to one time slice, and the jitter range is a fixed value. This can meet the requirements for the transmission of deterministic performance indicators of message delay time and delay jitter.

[0114] Based on the technical solution provided in this application embodiment, the first device and the second device can divide the transmission port into multiple time slots according to time. After receiving a client packet sent by the first device, the second device can determine the first time slot used by the first device to send the client packet, and then determine the second time slot corresponding to the first time slot among the multiple time slots of the second device's transmission port, and send the client packet in the second time slot. In this way, for a client packet received in a certain time slot, since it can be sent out in the corresponding time slot, the client packet can be forwarded at a certain time, ensuring that the delay time of the client packet is always fixed and the fluctuation range of the delay time is always limited to within a time slice, thereby meeting the requirements for the transmission delay and jitter of the client packet.

[0115] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0116] Figure 17 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Referring to Figure 17, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include RAM, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for other services.

[0117] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be categorized as an address bus, data bus, control bus, etc. For ease of illustration, only a single bidirectional arrow is used in Figure 17, but this does not imply that there is only one bus or one type of bus.

[0118] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0119] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a message passing mechanism at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0120] Receive client messages sent by the first device;

[0121] Determine the first timeslot used by the first device when sending the client message;

[0122] Determine the second time slot corresponding to the first time slot from multiple time slots of the second device's transmission port;

[0123] The client message is sent in the second time slot.

[0124] The message transmission device method disclosed in the embodiment shown in Figure 17 of this application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0125] The electronic device can also execute the method of FIG2 and realize the function of the message transmission device in the embodiment shown in FIG2, which will not be described in detail here.

[0126] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0127] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform the method of the embodiment shown in FIG2, and specifically to perform the following operations:

[0128] Receive client messages sent by the first device;

[0129] Determine the first timeslot used by the first device when sending the client message;

[0130] Determine the second time slot corresponding to the first time slot from multiple time slots of the second device's transmission port;

[0131] The client message is sent in the second time slot.

[0132] This application also proposes a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the above-described message transmission method embodiments.

[0133] Figure 18 is a schematic diagram of the structure of a message transmission device 180 provided in an embodiment of this application. Referring to Figure 18, in one software implementation, the message transmission device 180 may include: a receiving module 181, a first determining module 182, a second determining module 183, and a sending module 184, wherein:

[0134] Receiver module 181 receives client messages sent by the first device;

[0135] The first determining module 182 determines the first timeslot used by the first device when sending the client message;

[0136] The second determining module 183 determines a second time slot corresponding to the first time slot from multiple time slots of the transmitting port of the second device;

[0137] The sending module 184 sends the client message in the second time slot.

[0138] In some implementations, the first determining module 182 determines the first timeslot used by the first device when sending the client message, including at least one of the following:

[0139] The first time slot used by the first device to send the client message is determined according to a special definition message;

[0140] The first time slot used by the first device when sending the client message is determined based on the client message;

[0141] The first time slot used by the first device to send the client message is determined based on a specially defined code block or a specially defined code block group.

[0142] In some implementations, the specially defined message is sent by the first device at the boundary of the first time slot, and the specially defined message carries the time slot identifier of the first time slot; the first determining module 182 determines the first time slot used by the first device when sending the client message based on the specially defined message, including:

[0143] Determine the location where the specially defined message appears;

[0144] Extract the time slot identifier carried in the specially defined message;

[0145] The location where the special definition message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the special definition message is determined as the time slot identifier of the first time slot.

[0146] In some implementations, the specially defined message includes at least one of the following:

[0147] The specially defined message is a custom message carrying a special flag;

[0148] The specially defined message is obtained by extending the functionality of Ethernet protocol messages.

[0149] In some implementations, the specially defined code block or group of specially defined code blocks is transmitted by the first device at the boundary of the first time slot, and the specially defined code block or group of specially defined code blocks carries the time slot identifier of the first time slot; the first determining module 182 determines the first time slot used by the first device when transmitting the client message based on the specially defined code block or group of specially defined code blocks, including:

[0150] Determine the location where the special-defined code block or special-defined code block group appears;

[0151] Extract the slot identifier carried in the special-defined code block or special-defined code block group;

[0152] The location of the special-defined code block or special-defined code block group is determined as the boundary location of the first time slot, and the time slot identifier carried in the special-defined code block or special-defined code block group is determined as the time slot identifier of the first time slot.

[0153] In some implementations, each client packet within the first time slot carries a time slot identifier for the first time slot; the first determining module 182 determines the first time slot used by the first device when sending the client packet based on the client packet, including:

[0154] The first time slot used by the first device when sending the client message is determined based on the time slot identifier carried in the client message.

[0155] In some implementations, the first message of the client packet carries a timeslot identifier of the first timeslot, and the first message is located at the boundary of the first timeslot; the first determining module 182 determines the first timeslot used by the first device when sending the client packet based on the client packet, including:

[0156] The location where the first message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the first message is determined as the time slot identifier of the first time slot.

[0157] In some implementations, the client message includes an S-code block, a D-code block, and a T-code block, wherein the S-code block carries the time slot identifier of the first time slot.

[0158] In some implementations, the second determining module 183 determines a second time slot corresponding to the first time slot from a plurality of time slots of the transmitting port of the second device, including:

[0159] Based on the first correspondence relationship of time slot identifiers, determine the target time slot identifier corresponding to the time slot identifier of the first time slot;

[0160] The time slot corresponding to the target time slot identifier among the multiple time slots of the transmitting port of the second device is determined as the second time slot.

[0161] In some implementations, the first correspondence is determined based on the receive timeslot identifier of the receiving port of the second device, the latency requirements of the customer service, the latency time of the customer service in the second device, and the second correspondence, which is the correspondence between the receive timeslot identifier of the receiving port of the second device and the transmit timeslot identifier of the transmitting port at the same time.

[0162] In some implementations, the sending module 184 sends the client message on the second time slot, including at least one of the following:

[0163] Generate the second time slot; generate a special definition message; send the special definition message at the time slot boundary of the second time slot and send the client message on the second time slot;

[0164] Generate the second time slot; add the time slot identifier of the second time slot to the client message; send the client message on the second time slot.

[0165] In some implementations, the boundary position includes at least one of a start boundary position and an end boundary position.

[0166] The message transmission device 180 provided in this application can also execute the method of FIG2 and realize the function of the message transmission device 180 in the embodiment shown in FIG2, which will not be described again here.

[0167] This application embodiment also provides a message transmission system, which includes at least a first device and a second device. The transmitting ports of both the first device and the second device are divided into multiple time slots, wherein:

[0168] The first device sends a client message to the second device;

[0169] The second device receives the client message; determines the first time slot used by the first device when sending the client message; determines the second time slot corresponding to the first time slot from multiple time slots of the second device's sending port; and sends the client message on the second time slot.

[0170] In this embodiment, the specific implementation methods of each step executed by the first device and the specific implementation methods of each step executed by the second device can be referred to the specific implementation methods of the corresponding steps in the embodiment shown in Figure 2, and can achieve the same technical effect. They will not be described in detail here.

[0171] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0172] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0173] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0174] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0175] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

Claims

1. A message transmission method, applied to a second device, wherein the transmitting port of the second device and the transmitting port of the first device are both divided into multiple time slots according to time, the method comprising: Receive the client message sent by the first device; Determine the first timeslot used by the first device when sending the client message; Determine the second time slot corresponding to the first time slot from multiple time slots of the transmission port of the second device; The client message is sent in the second time slot.

2. The method of claim 1, wherein determining the first timeslot used by the first device when sending the client message includes at least one of the following: The first time slot used by the first device to send the client message is determined according to a special definition message; The first time slot used by the first device when sending the client message is determined based on the client message; The first time slot used by the first device to send the client message is determined based on a specially defined code block or a specially defined code block group.

3. The method as described in claim 2, wherein the special definition message is sent by the first device at the boundary position of the first time slot, and the special definition message carries the time slot identifier of the first time slot; The step of determining the first time slot used by the first device to send the client message according to a specially defined message includes: Determine the location where the specially defined message appears; Extract the time slot identifier carried in the specially defined message; The location where the special definition message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the special definition message is determined as the time slot identifier of the first time slot.

4. The method as described in claim 2 or 3, wherein the specially defined message includes at least one of the following: The specially defined message is a custom message carrying a special flag; The specially defined message is obtained by extending the functionality of Ethernet protocol messages.

5. The method as described in claim 2, wherein the special-defined code block or special-defined code block group is transmitted by the first device at the boundary position of the first time slot, and the special-defined code block or special-defined code block group carries the time slot identifier of the first time slot; The step of determining the first time slot used by the first device to send the client message based on a specially defined code block or a specially defined code block group includes: Determine the location where the special-defined code block or special-defined code block group appears; Extract the slot identifier carried in the special-defined code block or special-defined code block group; The location of the special-defined code block or special-defined code block group is determined as the boundary location of the first time slot, and the time slot identifier carried in the special-defined code block or special-defined code block group is determined as the time slot identifier of the first time slot.

6. The method of claim 2, wherein each client packet within the first time slot carries a time slot identifier of the first time slot; the step of determining the first time slot used by the first device when sending the client packet based on the client packet includes: The first time slot used by the first device when sending the client message is determined based on the time slot identifier carried in the client message.

7. The method of claim 2, wherein the first message of the client message carries a timeslot identifier of the first timeslot, and the first message is located at the boundary of the first timeslot; determining the first timeslot used by the first device when sending the client message based on the client message includes: The location where the first message appears is determined as the boundary location of the first time slot, and the time slot identifier carried in the first message is determined as the time slot identifier of the first time slot.

8. The method as described in claim 6 or 7, wherein the client message includes an S code block, a D code block, and a T code block, and the S code block carries the time slot identifier of the first time slot.

9. The method of claim 1, wherein determining the second time slot corresponding to the first time slot from a plurality of time slots of the transmitting port of the second device comprises: Based on the first correspondence relationship of time slot identifiers, determine the target time slot identifier corresponding to the time slot identifier of the first time slot; The time slot corresponding to the target time slot identifier among the multiple time slots of the transmitting port of the second device is determined as the second time slot.

10. The method of claim 9, wherein the first correspondence is determined based on the receive timeslot identifier of the receiving port of the second device, the delay requirement of the customer service, the delay time of the customer service in the second device, and the second correspondence, wherein the second correspondence is the correspondence between the receive timeslot identifier of the receiving port of the second device and the transmit timeslot identifier of the transmitting port at the same time.

11. The method of claim 1, wherein sending the client message in the second time slot comprises at least one of the following: Generate the second time slot; generate a special definition message; send the special definition message at the time slot boundary of the second time slot and send the client message on the second time slot; Generate the second time slot; Add the second time slot identifier to the customer message; The client message is sent in the second time slot.

12. The method of claim 3, 5, 7 or 11, wherein the boundary position includes at least one of a start boundary position and an end boundary position.

13. A message transmission system, the system comprising at least a first device and a second device, wherein the transmitting port of the first device and the transmitting port of the second device are each divided into multiple time slots, wherein: The first device sends a client message to the second device; The second device receives the client message; determines the first time slot used by the first device when sending the client message; Determine a second time slot corresponding to the first time slot from multiple time slots of the transmitting port of the second device; transmit the client message on the second time slot.

14. An electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method as claimed in any one of claims 1 to 12.

16. A computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of the method as claimed in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Time slot selection method, device, system and equipment and storage medium

    CN116419366A

  • Time reference position transmission method, message position determination method and communication equipment

    CN117834383A

  • Message transmission method, communication device, storage medium and program product

    CN117834390A

  • Method, subscriber device, wireless router, and communication system efficiently utilizing the receive / transmit switching time

    US6108314A