Message forwarding method, message sending method, device and computer-readable medium

By carrying source cycle information in the message, the forwarding device determines the forwarding cycle identification and forwards the message within the corresponding cycle, solving the cross-period forwarding problem caused by inconsistent time slices of network equipment in asynchronous mode, realizing accurate understanding of delay jitter and enhanced network applicability.

CN114363955BActive Publication Date: 2025-07-22NANJING ZHONGXING SOFTWARE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011099241.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-14
Publication Date
2025-07-22
Estimated Expiration
2040-10-14

AI Technical Summary

Technical Problem

In the network in asynchronous mode, the inconsistent time slice size of network devices leads to the problem of packet forwarding across cycles and the problem of delay jitter being impossible to determine.

Method used

By carrying source period information, including a predetermined period length and a source period identifier in the target message, the forwarding device determines the forwarding period identifier based on this information, and forwards the message within the period to ensure that the length of the forwarding period is the same as the predetermined period length.

Benefits of technology

It realizes accurate recognition of delay jitter, avoids cross-cycle forwarding, and enhances the applicability and flexibility of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363955B_ABST
    Figure CN114363955B_ABST
Patent Text Reader

Abstract

The present disclosure provides a packet forwarding method, which is applied to a forwarding device and includes: receiving a target packet, where the target packet carries source period information, and the source period information includes: a predetermined period length and a source period identifier; determining a corresponding forwarding period identifier according to the predetermined period length and the source period identifier, and forwarding the target packet within the forwarding period corresponding to the forwarding period identifier. The present disclosure also provides a packet sending method, a forwarding device, a source device, and a computer-readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and particularly to a message forwarding method, a message sending method, a forwarding device, a source device, and a computer-readable medium. Background Art

[0002] In the prior art, for the time synchronization problem of each device in a network, there are two solution modes. Among them, in the synchronization mode, all devices in the network need strict time synchronization. The receiving port of the device determines the receiving time of each message, determines the specific receiving time period in which the message falls, and sends it out within the specified time period thereafter; in the asynchronous mode, different devices in the network only need to maintain frequency synchronization and the same time slice size, and their respective phases are different. During the message forwarding process, the sent message carries a period label, and each device determines the period for forwarding this message according to the period label.

[0003] In the asynchronous mode, since it is necessary to ensure that the time slice sizes of all network devices in the network are the same, when facing the situation that the periods set by some network devices in practice are inconsistent with those of other devices, for example, when the sizes of data packets sent by different data sources in the network are different and their respective selected periods are also different, it will cause the downstream device to be unable to forward the message sent by the upstream device within one period, resulting in the message forwarding spanning multiple periods and the delay jitter being unable to be determined. Summary of the Invention

[0004] The present disclosure aims to at least solve one of the technical problems existing in the prior art, and provides a message forwarding method, a message sending method, a forwarding device, a source device, and a computer-readable medium.

[0005] To achieve the above object, in a first aspect, an embodiment of the present disclosure provides a message forwarding method, which is applied to a forwarding device and includes:

[0006] Receiving a target message, where the target message carries source period information, and the source period information includes: a predetermined period length and a source period identifier;

[0007] Determining a corresponding forwarding period identifier according to the predetermined period length and the source period identifier, and forwarding the target message within the forwarding period corresponding to the forwarding period identifier, where the length of the forwarding period is the same as the predetermined period length.

[0008] In a second aspect, an embodiment of the present disclosure further provides a message sending method, which is applied to a source device and includes:

[0009] Select a predetermined cycle length and send a target message to a forwarding device during a sending cycle corresponding to the predetermined cycle length. The target message carries source cycle information for indicating the sending cycle, and the source cycle information includes: the predetermined cycle length and a source cycle identifier of the sending cycle.

[0010] In a third aspect, an embodiment of the present disclosure further provides a forwarding device, including:

[0011] One or more processors;

[0012] A storage device for storing one or more programs;

[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the message forwarding method as described in the above embodiment.

[0014] In a fourth aspect, an embodiment of the present disclosure further provides a source device, including:

[0015] One or more processors;

[0016] A storage device for storing one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the message sending method as described in the above embodiment.

[0018] In a fifth aspect, an embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the message forwarding method as described in the above embodiment.

[0019] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the message sending method as described in the above embodiment.

[0020] The present disclosure has the following beneficial effects:

[0021] The embodiments of the present disclosure provide a message forwarding method, a message sending method, a forwarding device, a source device, and a computer-readable medium. By determining a corresponding forwarding cycle identifier according to the predetermined cycle length and the source cycle identifier carried in the target message, and forwarding the target message within the forwarding cycle corresponding to the forwarding cycle identifier, devices in the network can select a forwarding cycle according to the source cycle information indicated in the message, avoiding the problem of cross-cycle forwarding, and thus accurately knowing the delay jitter. Description of the Drawings

[0022] Figure 1Flowchart of a packet forwarding method provided by an embodiment of the present disclosure;

[0023] Figure 2 Flowchart of another packet forwarding method provided by an embodiment of the present disclosure;

[0024] Figure 3 Flowchart of yet another packet forwarding method provided by an embodiment of the present disclosure;

[0025] Figure 4 Flowchart of a specific implementation method of step S01 in an embodiment of the present disclosure;

[0026] Figure 5 Flowchart of a packet sending method provided by an embodiment of the present disclosure;

[0027] Figure 6 Schematic diagram of the encapsulation format of a time slot cell provided by an embodiment of the present disclosure;

[0028] Figure 7 For Figure 6 Schematic diagram of the format of the extended D block in the encapsulation format shown in;

[0029] Figure 8 Schematic diagram of a network structure provided by an embodiment of the present disclosure;

[0030] Figure 9 Schematic diagram of the structure of a forwarding device provided by an embodiment of the present disclosure;

[0031] Figure 10 Schematic diagram of the structure of a source device provided by an embodiment of the present disclosure;

[0032] Figure 11 Schematic diagram of the structure of a computer-readable medium provided by an embodiment of the present disclosure;

[0033] Figure 12 Schematic diagram of the structure of another computer-readable medium provided by an embodiment of the present disclosure. Detailed implementation manners

[0034] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the packet forwarding method, packet sending method, forwarding device, source device, and computer-readable medium provided by the present disclosure will be described in detail below with reference to the accompanying drawings.

[0035] In the following, example embodiments will be described more fully with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0036] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms "comprises" and / or "consisting of" are used in this specification, it specifies the presence of the stated features, wholes, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof.

[0037] It will be understood that although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. Thus, without departing from the teachings of the present disclosure, the first element, the first component, or the first module discussed below may be referred to as the second element, the second component, or the second module.

[0038] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0039] The packet forwarding method, packet sending method, forwarding device, source device, and computer-readable medium provided by the present disclosure can be used to determine the corresponding forwarding cycle identifier according to the predetermined cycle length and source cycle identifier carried in the target packet, and forward the target packet within the forwarding cycle corresponding to the forwarding cycle identifier, so that devices in the network can select the forwarding cycle according to the source cycle information indicated in the packet, avoid the problem of cross-cycle forwarding, and thus accurately know the delay jitter. The corresponding methods and devices provided by the present disclosure are applicable to time-sensitive networks (Time-sensitive Network, abbreviated as TSN), deterministic networks (Deterministic Networking, abbreviated as DetNet), networks adopting the IEEE 802.1Qbv standard and the IEEE 802.1Qch standard, and other networks adopting the Circular Queue Forwarding (CQF) mechanism, etc.

[0040] Figure 1 It is a flowchart of a packet forwarding method provided for an embodiment of the present disclosure. As Figure 1 shown, applied to a forwarding device (such as a router and a switch, etc.), the method includes:

[0041] Step S1, receiving a target packet.

[0042] Among them, the target message carries source period information, and the source period information includes a predetermined period length and a source period identifier; specifically, the source period information is used to indicate the transmission period corresponding to when the upstream device of the forwarding device (the device that is one position before the forwarding device in the current link, which can be the same forwarding device or a user-side device) sends the target message, and the source period identifier is used to identify the transmission period, and the source period identifier includes various forms such as a cycle number and a cycle label.

[0043] In some embodiments, the source period information further includes the unit of the predetermined period length. Specifically, the unit of the predetermined period length is a time unit, which can be set as nanoseconds, microseconds, milliseconds, seconds, etc.

[0044] It should be noted that the source period information, source period identifier, and similar concepts described in step S1 do not mean that the period information and period identifier are set by the source device and placed in the target message. They are only used to indicate the direct source of the target message and the previous node in the communication link, that is, the upstream device of the forwarding device. Only when the upstream device is the source device do these concepts point to the source device.

[0045] Step S2: Determine the corresponding forwarding period identifier according to the predetermined period length and the source period identifier.

[0046] In some embodiments, for the network to which the forwarding device belongs, its network-wide time is divided into multiple consecutive and equal-length periods. Among them, the division process is based on the corresponding unit period length. If there are multiple unit period lengths, there should be multiple division methods; the forwarding device pre-configures corresponding period identifiers for each period and configures message forwarding policies for each period, or the forwarding device receives the period identifiers and message forwarding policies allocated by the network control plane.

[0047] Specifically, the corresponding packet forwarding policy may be: receiving a packet and forwarding the packet in a specific period after the sending period of the upstream device. The specific period may be determined by presetting a waiting period or specifying a period identifier, etc. The specific moment for packet forwarding in the specific period may be determined by random selection or calculation based on the packet size, etc. Exemplarily, there are various ways to divide the network-wide time of the network to which the forwarding device belongs. The forwarding device has pre-configured corresponding period identifiers and packet forwarding policies for various division methods according to the network conditions, and it locally stores the unit period lengths corresponding to all division methods. Thus, after receiving a target packet and obtaining the preset period length and source period identifier carried therein, in step S2, the step of determining the corresponding forwarding period identifier according to the preset period length and source period identifier may include the following implementation manners: If the preset period length is equal to one of the unit period lengths, then in the corresponding division method, the nth period identifier after the source period identifier is used as the forwarding period identifier, that is, the nth period after the period corresponding to the source period identifier is determined as the forwarding period, where n is an integer; or, if the preset period length is one of the common multiples of the unit period lengths and 2, then in this unit period length, the next period identifier with the same parity relationship as the source period identifier is used as the forwarding period identifier.

[0048] It should be noted that the above description of determining the corresponding forwarding period identifier according to the preset period length and source period identifier is only an optional implementation manner in the present disclosure, and it will not limit the technical solution of the present disclosure. Other ways of determining the forwarding period identifier according to the period length and source period identifier are also applicable to the technical solution of the present disclosure.

[0049] Step S3: Forward the target packet within the forwarding period corresponding to the forwarding period identifier.

[0050] Among them, the length of the forwarding period is the same as the preset period length in the source period information carried by the target packet.

[0051] In some embodiments, between the step of determining the corresponding forwarding period identifier according to the preset period length and source period identifier and the step of forwarding the target packet within the forwarding period corresponding to the forwarding period identifier, it further includes: replacing the source period identifier in the source period information carried by the target packet with the forwarding period identifier for the downstream device of this forwarding device (the device that is in the next position in the current link after this forwarding device, which may be the same forwarding device or a user-side device) to perform corresponding identification and processing according to the replaced source period information.

[0052] An embodiment of the present disclosure provides a message forwarding method. This method can be used to determine a corresponding forwarding cycle identifier according to a predetermined cycle length and a source cycle identifier carried in a target message, and forward the target message within the forwarding cycle corresponding to the forwarding cycle identifier, so that devices in the network can select a forwarding cycle according to the source cycle information indicated in the message, avoid the problem of cross-cycle forwarding, and thus accurately know the delay jitter.

[0053] Figure 2 It is a flowchart of another message forwarding method provided by an embodiment of the present disclosure. As Figure 2 shown, this method is a specific optional implementation scheme based on the Figure 1 shown method. Specifically, this method not only includes step S1 and step S3. Among them, step S2, the step of determining a corresponding forwarding cycle identifier according to a predetermined cycle length and a source cycle identifier, includes: step S201.

[0054] Step S201: Match a corresponding candidate cycle length from multiple candidate cycle lengths according to the predetermined cycle length as the matching cycle length, use the source cycle identifier as the incoming interface cycle identifier, find the corresponding outgoing interface cycle identifier from the multi-cycle mapping table, and use the outgoing interface cycle identifier as the forwarding cycle identifier.

[0055] Among them, the multi-cycle mapping table records the mapping relationship between the incoming interface cycle identifier and the outgoing interface cycle identifier under each candidate cycle length. The incoming interface cycle identifier and the outgoing interface cycle identifier respectively correspond to the incoming interface and the outgoing interface configured for message forwarding on the forwarding device; multiple candidate cycle lengths are pre-stored in the forwarding device, that is, the multiple unit cycle lengths described above. Generally speaking, the matching cycle length is the candidate cycle length equal to the predetermined cycle length in the source cycle information among all candidate cycle lengths.

[0056] Figure 3 It is a flowchart of yet another message forwarding method provided by an embodiment of the present disclosure. As Figure 3 shown, this method is a specific optional implementation scheme based on the Figure 2 shown method. Specifically, this method not only includes steps S1 to S3. Before step S1, the step of receiving the target message, it further includes: step S01.

[0057] Step S01: Determine multiple candidate cycle lengths according to a pre-set cycle selection strategy, establish a mapping relationship between the incoming interface cycle identifier and the outgoing interface cycle identifier for each candidate cycle length, and generate a multi-cycle mapping table.

[0058] Figure 4This is a flowchart of a specific implementation method for step S01 in the embodiments of the present disclosure. In step S01, the step of determining multiple candidate cycle lengths according to a pre-set cycle selection strategy and establishing a mapping relationship between the incoming interface cycle identifier and the outgoing interface cycle identifier for each candidate cycle length includes: step S011.

[0059] Step S011: Generate at least one set of candidate cycle lengths according to a pre-set default cycle length, and establish a mapping relationship between the incoming interface cycle identifier and the outgoing interface cycle identifier for each candidate cycle length in all the sets of candidate cycle lengths.

[0060] Among them, all the generated sets of candidate cycle lengths include at least one of the following: the first set, which consists of default cycle lengths; the second set, where all the candidate cycle lengths in this set form an arithmetic sequence with the default cycle length as the first term; the third set, where all the candidate cycle lengths in this set form a geometric sequence with the default cycle length as the first term. Correspondingly, in step S202, match a corresponding candidate cycle length from multiple candidate cycle lengths according to a predetermined cycle length, that is, determine the set of candidate cycle lengths to which the predetermined cycle length belongs.

[0061] Specifically, the default cycle length can be one or more. When there are multiple default cycle lengths, correspondingly, the first set includes all the default cycle lengths, and there can be multiple second sets that form arithmetic sequences with each default cycle length as the first term, and there can be multiple third sets that form geometric sequences with each default cycle length as the first term; at the same time, since there are identical elements among the sets of candidate cycle lengths, that is, the predetermined cycle length in the target packet can match candidate cycle lengths in multiple different sets, the source device carries corresponding flag information when sending the target packet to indicate the set of candidate cycle lengths to which the predetermined cycle length belongs.

[0062] The embodiments of the present disclosure provide a packet forwarding method, which can be used to determine the corresponding mapping relationship according to the predetermined cycle length and the source cycle identifier carried in the target packet, and determine the forwarding cycle identifier, so as to achieve multi-cycle mapping in the network, increase the flexibility of packet forwarding, and enhance the applicability of the network.

[0063] Figure 5 This is a flowchart of a packet sending method provided by the embodiments of the present disclosure. As Figure 5 shown, it is applied to a source device (such as a personal computer, a mobile terminal, a tablet device, etc.), and this method includes:

[0064] Step S4: Select a predetermined cycle length and send a target packet to a forwarding device within a sending cycle corresponding to the predetermined cycle length.

[0065] Among them, the target message carries source period information for indicating the sending period, and the source period information includes a predetermined period length and a source period identifier of the sending period. Specifically, the predetermined period length can be selected through a local policy or a real-time system configuration.

[0066] In some embodiments, the source period information can be carried by a time slot cell, a layer 2 Ethernet frame, an IPv4 header, or an IPv6 header.

[0067] Figure 6 It is a schematic diagram of the encapsulation format of a time slot cell provided by an embodiment of the present disclosure. As Figure 6 shown, the length of the time slot cell is fixed and consists of an S block, multiple D blocks, and a T block. The cell includes an overhead area (Header) and a payload area (Payload), and the encoded customer service is mapped and carried in the payload area. Among them, the overhead area includes the following byte contents: label value, time slot information, sequence number, check value (cyclic redundancy check algorithm), management channel byte, multiframe number, and operation administration and maintenance (OAM) function field, etc.

[0068] Specifically, an extended D block in the overhead area can be used to carry the predetermined period length and the source period identifier.

[0069] Figure 7 For Figure 6 it is a schematic diagram of the format of the extended D block in the encapsulation format shown in. One D block corresponds to 8 bytes. In this D block, the lower 3 bytes are used to carry the predetermined period length and the source period identifier. The first 2 bytes are used as the predetermined period length, and the last 1 byte is used as the source period identifier.

[0070] Among them, corresponding to various situations where a candidate period length set is generated in the forwarding device. For example, as Figure 7 shown in a), in the first 2 bytes of the lower 3 bytes, the first 14 bits are used as the absolute value of the predetermined period length, and the last 2 bits are used as the unit of the predetermined period length. 00, 01, 10, and 11 correspond to nanoseconds, microseconds, milliseconds, and seconds respectively. This example corresponds to the situation where the forwarding device generates a first set composed of default period lengths. The predetermined period length in this example is one of all its default period lengths; specifically, as Figure 7 shown in b), in the first 2 bytes, the first 14 bits are 101101, and the last 2 bits are 01. Then the predetermined period length is 45 microseconds, and the last byte is 100, indicating that the source period number (identifier) is 4.

[0071] Or, as Figure 7As shown in c), in the first two bytes of the lower three bytes, the first 16 bits are the quotient of the predetermined cycle length and the corresponding default cycle length, that is, the multiple value of the default cycle length. In this example, it corresponds to the case where the forwarding device generates a second set. The predetermined cycle length in this example is an element in an arithmetic sequence with the default cycle length as the first term and composed of all candidate cycle lengths.

[0072] Or, as Figure 7 shown in d), in the first two bytes of the lower three bytes, the first 16 bits represent m, and the predetermined cycle length is the product of the corresponding default cycle length and the m-th root of 2. m is an integer. In this example, it corresponds to the case where the forwarding device generates a third set. The predetermined cycle length in this example is an element in a geometric sequence with the default cycle length as the first term and composed of all candidate cycle lengths; specifically, as Figure 7 shown in e), the default cycle length corresponding to the predetermined cycle length is 10 microseconds. In the first two bytes, the first 16 bits represent m, which is 10. Then the predetermined cycle length is 10 * 2 2 = 40 microseconds, and the last byte is 100, indicating that the source cycle number (identifier) is 4.

[0073] In some embodiments, multiple candidate cycle length sets are generated in the forwarding device. Correspondingly, the source cycle information further includes flag information, which is used to indicate the candidate cycle length set to which the predetermined cycle length belongs. It includes forms such as flag bits. Specifically, in the first two bytes of the lower three bytes, the first 2 bits are flag bits, and the last 14 bits are used to represent the predetermined cycle length in a corresponding form. Among them, flag bit 00 indicates that the last 14 bits are the absolute value of the predetermined cycle length, flag bit 01 indicates the quotient of the predetermined cycle length and the corresponding default cycle length, and flag bit 10 represents m, and the predetermined cycle length is the product of the corresponding default cycle length and the m-th root of 2, where m is an integer.

[0074] It should be noted that the above description of the source cycle information carried by the time slot cell is only an optional implementation manner in the present disclosure, and it will not limit the technical solution of the present disclosure. The specific content represented by each byte, as well as its arrangement and order, can be adjusted and configured accordingly. Other encapsulation formats and representation methods are also applicable to the technical solution of the present disclosure.

[0075] For the case where the source period information is carried by a layer 2 Ethernet frame, an IPv4 header, or an IPv6 header, where the layer 2 Ethernet frame includes a preamble, a start frame delimiter, a destination physical address (MAC), a source physical address, an 802.1Q tag, an Ethernet type, a payload, and a redundancy check part, and where the source period information can be carried by a 2-byte Ethernet type field; the IPv4 header includes a version, an IP header length, a service type, a packet length, a packet identification, fragmentation, a fragmentation offset, a time to live, an upper layer protocol number, a header checksum, a source IPv4 address, a destination IPv4 address, options, and a padding part, and where the source period information can be carried by a 1-byte service type or options field; the IPv6 header includes a version, a traffic class, a flow label, a payload length, a next header, a hop limit, a source address, and a destination address, and where the source period information can be carried by a 1-byte traffic class field.

[0076] It should be noted that the above description of carrying source period information in each protocol message is only an optional implementation manner in the present disclosure, and it will not limit the technical solution of the present disclosure. Other extensible protocol messages are equally applicable to the technical solution of the present disclosure.

[0077] The embodiments of the present disclosure provide a message sending method, which can be used to carry a predetermined period length and a source period identifier when a source device sends a message, so that a forwarding device and a receiving device can determine a corresponding forwarding period identifier therefrom, and forward a target message within a forwarding period corresponding to the forwarding period identifier. Devices in the network can select a forwarding period according to the source period information indicated in the message, avoiding the problem of cross-period forwarding, thereby accurately knowing the delay jitter.

[0078] The message sending method and the message forwarding method provided by the present disclosure are described in detail below in combination with actual applications.

[0079] Figure 8 It is a schematic diagram of a network structure provided by an embodiment of the present disclosure. As Figure 8 shown, the network includes a first forwarding device R1, a second forwarding device R2, a first user device H1, a second user device H2, a third user device H3, and a fourth user device H4; H1 acts as a source device and sends a first target message to H2, and H3 acts as a source device and sends a second target message to H4; the default period lengths are 10 us and 25 us, and the period identifier is represented in the form of a period number. R1 and R2 generate respective multi-period mapping tables according to the relevant information sent by the control plane, as shown in Table 1 and Table 2.

[0080] Table 1 R1 multi-period mapping table

[0081]

[0082]

[0083] Table 2 R2 Multi - cycle Mapping Table

[0084]

[0085] Among them, both R1 and R2 generate two candidate cycle length sets. In R1, the first candidate cycle length set consists of the default cycle lengths 10us and 25us. The second candidate cycle length set is obtained based on the default cycle length 10us, and all its elements are the products of 10 and the m - th power of 2, where m ∈ {0, 1, 2}. That is, all the candidate cycle lengths in it form a geometric sequence with the first term being the default cycle length 10us. R2 is similar to it, except that the mapping relationships between the incoming interface cycle numbers (identifications) and the outgoing interface cycle numbers (identifications) for each candidate cycle length are different.

[0086] Specifically, H1 sends the first target message to H2: H1 selects the predetermined cycle length of 10us and sends the first target message to H2 in the cycle with cycle number 3 and a predetermined cycle length of 10us. The first target message carries source cycle information including flag bit (information) 01, predetermined cycle length 10us, and source cycle number 3 of the sending cycle. After receiving the first target message, R1 matches the matching cycle length 10us in its first candidate cycle length set according to the flag bit and the predetermined cycle length, and uses the source cycle number 3 as the incoming interface cycle number to look up the table, obtaining the outgoing interface cycle number 0. Thus, the forwarding cycle number is 0. R1 replaces the source cycle number 3 with 0 according to the forwarding cycle number 0 and forwards the first target message in the cycle with cycle number 0. After receiving the first target message, R2 determines the forwarding cycle number 1 according to the same steps, replaces the source cycle number 0 with 1 according to the forwarding cycle number 1, and forwards the first target message in the cycle with cycle number 1. H2 receives the first target message.

[0087] H3 sends a second target message to H4: H3 selects a predetermined cycle length of 10 us and sends a second target message to H4 in the cycle with cycle number 2 and a predetermined cycle length of 10 us. The second target message carries source cycle information including flag bit 10, a predetermined cycle length of 10 us, and the source cycle number 2 of the sending cycle. After receiving the second target message, R1 matches the matching cycle length of 10 us in its second candidate cycle length set according to the flag bit and the predetermined cycle length, and uses the source cycle number 2 as the incoming interface cycle number to look up the table, obtaining an outgoing interface cycle number of 10. Thus, the forwarding cycle number is 10. R1 replaces the source cycle number 3 with 10 according to the forwarding cycle number 10 and forwards the second target message in the cycle with cycle number 10. After receiving the second target message, R2 determines the forwarding cycle number 7 from the source cycle number 10 according to the same steps, replaces the source cycle number 10 with 7 according to the forwarding cycle number 7, and forwards the second target message in the cycle with cycle number 7. H4 receives the second target message. Thus, the message forwarding is completed.

[0088] Figure 9 FIG. is a schematic structural diagram of a forwarding device provided by an embodiment of the present disclosure. As Figure 9 shown, the forwarding device includes:

[0089] One or more processors 101;

[0090] A memory (device) 102, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the message forwarding method as described in any of the above embodiments;

[0091] One or more I / O interfaces 103, connected between the processor and the memory, configured to implement information interaction between the processor and the memory.

[0092] Among them, the processor 101 is a device with data processing capabilities, which includes but is not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, which includes but is not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102 and can implement information interaction between the processor 101 and the memory 102, which includes but is not limited to a data bus (Bus), etc.

[0093] In some embodiments, the processor 101, the memory 102, and the I / O interface 103 are interconnected through a bus 104 and are further connected to other components of the computing device.

[0094] Figure 10A schematic structural diagram of a source device provided by an embodiment of the present disclosure. As Figure 10 shown, the source device includes:

[0095] One or more processors 201;

[0096] A memory 202, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the message sending method according to any one of the above embodiments;

[0097] One or more I / O interfaces 203, connected between the processor and the memory, configured to implement information interaction between the processor and the memory.

[0098] Among them, the processor 201 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 202 is a device with data storage capabilities, including but not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read / write interface) 203 is connected between the processor 201 and the memory 202 and can implement information interaction between the processor 201 and the memory 202, including but not limited to a data bus (Bus), etc.

[0099] In some embodiments, the processor 201, the memory 202, and the I / O interface 203 are interconnected through a bus 204 and further connected to other components of the computing device.

[0100] Figure 11 A schematic structural diagram of a computer-readable medium provided by an embodiment of the present disclosure. A computer program is stored on the computer-readable medium. When the program is executed by a processor, the steps in the message forwarding method according to any one of the above embodiments are implemented.

[0101] Figure 12 A schematic structural diagram of another computer-readable medium provided by an embodiment of the present disclosure. A computer program is stored on the computer-readable medium. When the program is executed by a processor, the steps in the message sending method according to any one of the above embodiments are implemented.

[0102] Those of ordinary skill in the art will understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the devices, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be executed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0103] Example embodiments have been disclosed herein, and although specific terms have been used, they are used for and should be construed only as general illustrative meanings and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in connection with other embodiments. Accordingly, those skilled in the art will understand that various forms and details may be changed without departing from the scope of the present disclosure as set forth by the appended claims.

Claims

1. A message forwarding method, wherein, Applied to a forwarding device, including: Receiving a target message, where the target message carries source period information, and the source period information includes: a predetermined period length and a source period identifier; Determining a corresponding forwarding period identifier according to the predetermined period length and the source period identifier; Forwarding the target message within the forwarding period corresponding to the forwarding period identifier, where the length of the forwarding period is the same as the predetermined period length; Among them, the step of determining a corresponding forwarding period identifier according to the predetermined period length and the source period identifier includes: Matching a corresponding candidate period length from multiple candidate period lengths according to the predetermined period length as the matching period length, using the source period identifier as the incoming interface period identifier, looking up the outgoing interface period identifier corresponding to the incoming interface period identifier under the matching period length from a multi-period mapping table, and using the outgoing interface period identifier as the forwarding period identifier; where the matching period length is equal to the predetermined period length, and the multi-period mapping table records the mapping relationship between the incoming interface period identifier and the outgoing interface period identifier under each candidate period length.

2. The message forwarding method according to claim 1, wherein, Before the step of receiving the target message, it further includes: Determining multiple candidate period lengths according to a pre-set period selection strategy, respectively establishing a mapping relationship between the incoming interface period identifier and the outgoing interface period identifier for each candidate period length, and generating the multi-period mapping table.

3. The message forwarding method according to claim 2, wherein, The step of determining multiple candidate period lengths according to a pre-set period selection strategy and respectively establishing a mapping relationship between the incoming interface period identifier and the outgoing interface period identifier includes: Generating at least one set of candidate period lengths according to a pre-set default period length, and respectively establishing a mapping relationship between the incoming interface period identifier and the outgoing interface period identifier for each candidate period length in all the sets of candidate period lengths; Among them, all the generated sets of candidate period lengths include at least one of the following: the first set, which consists of the default period length; the second set, where all the candidate period lengths in the second set form an arithmetic sequence with the default period length as the first term; the third set, where all the candidate period lengths in the third set form a geometric sequence with the default period length as the first term.

4. The message forwarding method according to claim 1, wherein, Between the step of determining a corresponding forwarding period identifier according to the predetermined period length and the source period identifier and the step of forwarding the target message within the forwarding period corresponding to the forwarding period identifier, it further includes: Replacing the source period identifier in the source period information carried by the target message with the forwarding period identifier.

5. A message sending method, wherein, Applied to a source device, including: Select a predetermined cycle length and send a target packet to a forwarding device in a transmission cycle corresponding to the predetermined cycle length, so that the forwarding device matches a corresponding candidate cycle length from multiple candidate cycle lengths as the matching cycle length according to the predetermined cycle length, uses the source cycle identifier as the incoming interface cycle identifier, looks up the outgoing interface cycle identifier corresponding to the incoming interface cycle identifier at the matching cycle length from a multi-cycle mapping table, and uses the outgoing interface cycle identifier as the forwarding cycle identifier to forward the target packet within the forwarding cycle corresponding to the forwarding cycle identifier; wherein, the matching cycle length is equal to the predetermined cycle length, the multi-cycle mapping table records the mapping relationship between the incoming interface cycle identifier and the outgoing interface cycle identifier at each candidate cycle length, the length of the forwarding cycle is the same as the predetermined cycle length, the target packet carries source cycle information for indicating the transmission cycle, and the source cycle information includes: the predetermined cycle length and the source cycle identifier of the transmission cycle.

6. The message sending method according to claim 5, wherein, The source cycle information is carried by any one of a time slot cell, a layer 2 Ethernet frame, an IPv4 header, and an IPv6 header.

7. The message sending method according to claim 5, wherein, Multiple candidate cycle length sets are generated in the forwarding device. The source cycle information further includes: flag information, and the flag information is used to indicate the candidate cycle length set to which the predetermined cycle length belongs.

8. A forwarding device, comprising: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the packet forwarding method according to any one of claims 1-4.

9. A source device, comprising: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the packet sending method according to any one of claims 5-7.

10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by a processor, it implements the steps in the packet forwarding method according to any one of claims 1-4.

11. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by a processor, it implements the steps in the packet sending method according to any one of claims 5-7.

Citation Information

Patent Citations

  • Periodic mapping method and network equipment

    CN110868363A