Message forwarding method, forwarding device and computer-readable medium

By receiving and processing time slot information in the target message, determining the appropriate forwarding time slot and performing cache processing, the problem of message forwarding failure caused by mismatch in time slot length in asynchronous mode is solved, and stable forwarding of network devices is achieved.

CN114430401BActive Publication Date: 2025-09-02NANJING ZHONGXING SOFTWARE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011101517.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-15
Publication Date
2025-09-02
Estimated Expiration
2040-10-15

AI Technical Summary

Technical Problem

In asynchronous mode, if some devices in the network do not support the time slot length of upstream devices, the packet forwarding fails.

Method used

By receiving the first time slot information in the target message of the upstream device, the corresponding second time slot length and time slot identification are determined, and the message is forwarded after waiting for a preset time in the cache queue to ensure that the message is forwarded under the supported time slot length.

Benefits of technology

This avoids packet forwarding failure due to mismatch of time slot lengths, and realizes stable forwarding of network devices in asynchronous mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114430401B_ABST
    Figure CN114430401B_ABST
Patent Text Reader

Abstract

The present disclosure provides a message forwarding method, comprising: receiving a target message from an upstream device, the target message carrying first time slot information, the first time slot information including a first time slot length and a first time slot identifier; determining a corresponding second time slot length and second time slot identifier based on the first time slot length and the first time slot identifier; and forwarding the target message after the target message enters a cache queue corresponding to the second time slot length and the second time slot identifier and a preset waiting time has elapsed. The present disclosure also provides a forwarding 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 technology, and in particular to a message forwarding method, a forwarding device, and a computer-readable medium. Background Art

[0002] In the prior art, there are two solutions to the time synchronization problem of various devices in the network. In the synchronous mode, all devices in the network require strict time synchronization. The device receiving port determines the reception time of each message, determines the specific reception time period that the message falls into, 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, but their respective phases are different. During the message forwarding process, the sent message carries a time slot label, and each device determines the time slot for forwarding this message based on the time slot label.

[0003] In asynchronous mode, since it is necessary to ensure that the time slice size of each network device in the network is the same, that is, the supported time slot length is the same, when faced with the situation that the settings and supported time slots of some network devices are inconsistent with those of other devices, the forwarding device will not support the time slot length corresponding to the message sent by the upstream device, and will not be able to forward the message. Summary of the Invention

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

[0005] To achieve the above objectives, in a first aspect, an embodiment of the present disclosure provides a message forwarding method, comprising:

[0006] Receive a target message from an upstream device, where the target message carries first time slot information, where the first time slot information includes: a first time slot length and a first time slot identifier;

[0007] Determine a corresponding second time slot length and a second time slot identifier according to the first time slot length and the first time slot identifier;

[0008] After the target message enters the cache queue corresponding to the second time slot length and the second time slot identifier and a preset waiting time has passed, the target message is forwarded.

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

[0010] one or more processors;

[0011] a storage device for storing one or more programs;

[0012] 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.

[0013] In a third aspect, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, wherein when the program is executed by a processor, the steps in the message forwarding method as described in the above embodiment are implemented.

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

[0015] The embodiments of the present disclosure provide a message forwarding method, a forwarding device, and a computer-readable medium. The method can determine the corresponding second time slot length and second time slot identifier based on the first time slot length and first time slot identifier carried in the target message, place the target message in a cache corresponding to the second time slot length and second time slot identifier, and forward the message. This allows devices in the network to select a forwarding time slot based on the first time slot information indicated in the message, thereby avoiding a situation where the message cannot be forwarded due to unsupported time slot length selected by the upstream device when sending the message. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a message forwarding method provided in an embodiment of the present disclosure;

[0017] Figure 2 A flowchart of another message forwarding method provided in an embodiment of the present disclosure;

[0018] Figure 3 A flowchart of another message forwarding method provided in an embodiment of the present disclosure;

[0019] Figure 4 A schematic diagram of the format of a TLV triplet provided in an embodiment of the present disclosure;

[0020] Figure 5 This is a flowchart of a specific implementation method of step S02 in the embodiment of the present disclosure;

[0021] Figure 6 This is a flowchart of a specific implementation method of step S021 in the embodiment of the present disclosure;

[0022] Figure 7 This is a flowchart of another specific implementation method of step S021 in the embodiment of the present disclosure;

[0023] Figure 8 A schematic diagram of the structure of a forwarding device provided in an embodiment of the present disclosure;

[0024] Figure 9 A schematic diagram of the structure of a computer-readable medium provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0026] Example embodiments will be described more fully hereinafter 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. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.

[0027] The terms used herein are used only to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a," "an," 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 "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements, and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof is not excluded.

[0028] 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 to these terms. These terms are only used to distinguish one element from another. Therefore, without departing from the teachings of the present disclosure, the first element, first component, or first module discussed below may be referred to as the second element, second component, or second module.

[0029] 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 defined as such herein.

[0030] The message forwarding method, forwarding device and computer-readable medium provided by the present disclosure can be used to determine the corresponding second time slot length and second time slot identifier based on the first time slot length and first time slot identifier carried in the target message, put the target message into the cache corresponding to the second time slot length and second time slot identifier and forward it, so that the device in the network can select the forwarding time slot according to the first time slot information indicated in the message, avoiding the situation where the message cannot be forwarded due to the time slot length selected by the upstream device when sending the message not being supported. The corresponding method and device provided by the present disclosure are applicable to time-sensitive networks (TSN), deterministic networks (DetNet), networks using the IEEE802.1Qbv standard and the IEEE802.1Qch standard, and other networks using the Circular Queue Forwarding (CQF) mechanism.

[0031] Figure 1 Flowchart of a message forwarding method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0032] Step S1: Receive a target message from an upstream device.

[0033] The target message carries first time slot information, which includes a first time slot length and a first time slot identifier. Specifically, "upstream" is a relative concept, indicating that a device is located one position before the current device in the current communication link. This device can be a forwarding device or a user-side device. Accordingly, the current device is a downstream device in the current communication link relative to the "upstream device" in step S1. The first time slot information indicates the corresponding transmit time slot when the upstream device sends the target message, and the first time slot identifier identifies the transmit time slot. The first time slot identifier includes various forms, such as a time slot number and a time slot label.

[0034] In some embodiments, the first time slot information further includes the unit of the first time slot length. Specifically, the unit of the first time slot length is a time unit, which can be set to nanoseconds, microseconds, milliseconds, seconds, etc.

[0035] Step S2: Determine a corresponding second time slot length and a second time slot identifier according to the first time slot length and the first time slot identifier.

[0036] In some embodiments, the present device supports and maintains one or more time slot lengths. Specifically, the entire network time of the network described in the present device is divided into multiple continuous time slots of the same length, wherein the division basis of the process is the time slot length, and each time slot has its own time slot identifier. If there are multiple time slot lengths, there are multiple corresponding division methods. Exemplarily, the present device maintains multiple time slot lengths and their corresponding time slot identifiers. After receiving the target message from the upstream device, the step of determining the corresponding second time slot length and the second time slot identifier according to the first time slot length and the first time slot identifier in the target message may include the following implementation methods: using the time slot length maintained by the present device that is equal to the first time slot length as the second time slot length, and using the kth time slot identifier after the first time slot identifier as the second time slot identifier, that is, determining the kth time slot after the time slot corresponding to the first time slot identifier as the forwarding time slot, where k is an integer; or using the time slot length maintained by the present device that is an integer multiple of the first time slot length and is greater than the first time slot length as the second time slot length, and using the next time slot identifier with the same parity relationship as the first time slot identifier as the second time slot identifier.

[0037] It should be noted that the above description of determining the corresponding second time slot length and second time slot identifier based on the first time slot length and the first time slot identifier is only an optional implementation method in the present disclosure, which will not limit the technical solution of the present disclosure. Other methods of determining the second time slot length and second time slot identifier based on the time slot length and the first time slot identifier are also applicable to the technical solution of the present disclosure.

[0038] In some embodiments, the step of determining the corresponding second time slot length and second time slot identifier based on the first time slot length and the first time slot identifier includes: based on the time slot mapping relationship sent down by the network control plane, determining the corresponding second time slot length and second time slot identifier based on the first time slot length and the first time slot identifier.

[0039] Step S3: After the target message enters the cache queue corresponding to the second time slot length and the second time slot identifier and a preset waiting time has passed, the target message is forwarded.

[0040] In some embodiments, the waiting time is calculated and sent by the network control plane, or is set by the device itself based on network conditions, message size, system resources, etc. Generally speaking, the waiting time can be set according to the time slot length, for example, the waiting time is set to a time corresponding to a second time slot length.

[0041] In some embodiments, in step S3, the step of forwarding the target message includes: replacing the first time slot length with the second time slot length, replacing the first time slot identifier with the time slot identifier corresponding to the current time slot after the waiting time, and forwarding the target message for the downstream device of this device in the current link to perform corresponding identification and processing based on the replaced first time slot information. The downstream device can be a forwarding device or a user-side device.

[0042] An embodiment of the present disclosure provides a message forwarding method, which can be used to determine the corresponding second time slot length and second time slot identifier based on the first time slot length and first time slot identifier carried in the target message, place the target message into a cache corresponding to the second time slot length and second time slot identifier and forward it, so that the device in the network can select the forwarding time slot based on the first time slot information indicated in the message, avoiding the situation where the message cannot be forwarded due to not supporting the time slot length selected by the upstream device when sending the message.

[0043] Figure 2 Flowchart of another message forwarding method provided by the embodiment of the present disclosure. Figure 2 As shown, this method is based on Figure 1 A specific optional implementation of the method shown. Specifically, the method includes not only steps S1 and S3, but also step S2, the step of determining the corresponding second time slot length and second time slot identifier based on the first time slot length and the first time slot identifier, including step S201. Only step S201 is described in detail below.

[0044] Step S201: Use the first time slot length as the upstream time slot length, use the first time slot identifier as the upstream time slot identifier, find the corresponding downstream time slot length and downstream time slot identifier from the time slot mapping table, and use the downstream time slot length as the second time slot length and the downstream time slot identifier as the second time slot identifier.

[0045] The time slot mapping table records the mapping relationship between the upstream time slot identifier under the upstream time slot length and the downstream time slot identifier under its own downstream time slot length. Specifically, the upstream device and the current device each support and maintain one or more time slot lengths and time slot identifiers corresponding to the time slots divided according to each time slot length. The time slot mapping table is used to indicate the mapping relationship between the time slot identifier of the upstream device and the time slot identifier of the current device, wherein the corresponding time slot lengths and time slot identifiers are stored in the form of a tuple, and the mapping relationship is established between the tuples; or the time slot length is used as an upper-layer attribute, and the corresponding time slot identifier is stored thereunder, and the mapping relationship is established between the time slot identifiers under the time slot length.

[0046] Figure 3 Flowchart of another message forwarding method provided by the embodiment of the present disclosure. Figure 3As shown, this method is based on Figure 2 A specific optional implementation of the method shown. Specifically, the method not only includes steps S1 to S3, but also includes steps S01 and S02 before step S1, the step of receiving the target message from the upstream device. Only steps S01 and S02 are described in detail below.

[0047] Step S01: Obtain the time slot template information of the upstream device.

[0048] The time slot template information includes at least one time slot template, which includes a corresponding upstream time slot length and all upstream time slot identifiers for that upstream time slot length. Specifically, each forwarding device in the network maintains one or more time slot templates, and each device's neighboring devices and nodes need to know the relevant information about the device's time slot template.

[0049] In some embodiments, step S01, obtaining time slot template information of an upstream device, includes: receiving time slot template information sent by the upstream device via a Link Layer Discovery Protocol (LLDP); and the method further includes: sending information indicating the time slot template of the downstream device via the LLDP. Specifically, the time slot template information can be announced by carrying a TLV (Type Length Value) triplet in a LLDP message.

[0050] Figure 4 A schematic diagram of the format of a TLV triplet provided in an embodiment of the present disclosure. Figure 4As shown, the TLV includes: a type field (TLV type), a length field (TLV information string length), a subtype field (802.1sub type) and time slot template information (Time slot information). The type field and the length field constitute the message header area. Among them, the type field is used to indicate the type of the TLV, occupying 7 bits (bit). For example, the LLDPOrganizationally Specific TLV type is used. In this case, the type value is 127, or a new optional TLV type can be defined using the reserved value of the type field; the length field is used to indicate the length of the TLV, occupying 4+2*a bits, a is the number of time slot templates in the time slot template information; the subtype field is used to indicate the subtype of the TLV, occupying 1 byte. The subtype is a supplement to the type. In this example, the subtype of the TLV is a TLV carrying time slot template information (Time slot information TLV); the time slot template information includes at least one time slot template. A single time slot template occupies 2 bytes, including a time slot length field (Time slot occupies 1 byte) size), a time slot number field (Slotnumber) occupying 4 bits, and a reserved field (Reserved) occupying 4 bits. Specifically, the time slot length field can be the absolute value of the time slot length, or can be the quotient of the time slot length and the corresponding default time slot length, or can be b, and the time slot length is the product of the corresponding default cycle length and the bth root of 2, where b is an integer. In addition, the time slot identifier takes the form of a time slot number, which is taken by default from an arithmetic progression composed of natural numbers with the first term being 0, and is indicated by the time slot number field. For example, when the number of time slots is 2, the time slot identifiers are determined to be 0 and 1.

[0051] In some embodiments, step S01, the step of obtaining the time slot template information of the upstream device, includes: receiving the time slot template information of the upstream device sent by the network control plane; and the method also includes: sending information indicating its own time slot template to the network control plane through the Netconf protocol, so that the network control plane calculates the corresponding mapping relationship based on the information and sends it to its own downstream device.

[0052] It should be noted that the above description of each protocol message carrying time slot template information and other related information is only an optional implementation method in the present disclosure, which will not limit the technical solution of the present disclosure. Other protocol messages are also applicable to the technical solution of the present disclosure.

[0053] Step S02: Based on the upstream time slot lengths in all time slot templates and all preset downstream time slot lengths, a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths is established, and a time slot mapping table is generated.

[0054] Among them, a mapping relationship between corresponding time slot identifiers can be established based on the size relationship between the upstream time slot length and the downstream time slot length, or a mapping relationship between corresponding time slot identifiers can be established based on whether the upstream time slot length or the downstream time slot length meets the pre-set numerical conditions, or the corresponding mapping relationship can be matched from the preset mapping relationship issued from the network control plane based on the upstream time slot length and the downstream time slot length.

[0055] Figure 5 This is a flow chart of a specific implementation method of step S02 in the embodiment of the present disclosure. Figure 5 As shown, in step S02, the step of establishing a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths based on the upstream time slot lengths in all time slot templates and all downstream time slot lengths preset by themselves includes: step S021.

[0056] Step S021: Establish a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths based on the upstream time slot lengths in all time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths of the time slot template, and the number of downstream time slots corresponding to the downstream time slot lengths.

[0057] Among them, the number of time slots is obtained by the number of time slot identifiers in the time slot template; or, the number of upstream time slots corresponding to the upstream time slot length is the number of time slots in the circular queue in which the upstream time slot length itself is located, and accordingly, the number of downstream time slots corresponding to the downstream time slot length is the number of time slots in the circular queue in which the downstream time slot length itself is located.

[0058] Specifically, the time slot template is a time slot circular queue template, which divides the entire network time into multiple continuous and identical circular queues. The circular queue includes a fixed number of time slots and time slot identifiers corresponding to each time slot. The product of the number of time slots and the time slot length is the length of the circular queue. Therefore, the time slot identifiers in the entire network time are distributed cyclically.

[0059] Figure 6 This is a flow chart of a specific implementation method of step S021 in the embodiment of the present disclosure. Figure 6As shown, step S021, the step of establishing a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths according to the upstream time slot lengths in all time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths of the device itself, and the number of downstream time slots corresponding to the downstream time slot lengths, includes: step S021a, step S021b, and step S021c.

[0060] Step S021a, in response to the fact that the quotient N of the first downstream time slot length and the first upstream time slot length is an integer, and the product of the first upstream time slot length and the corresponding number of upstream time slots is equal to the product of the first downstream time slot length and the corresponding number of downstream time slots, establish a mapping relationship between N upstream time slot identifiers under the first upstream time slot length and one downstream time slot identifier under the first downstream time slot length.

[0061] In step S021a, for a downstream time slot length that is an integer multiple N of the upstream time slot length and in which the length of the circular queue is equal to the length of the circular queue corresponding to the upstream time slot length, the N upstream time slot identifiers under the upstream time slot length are mapped to a downstream time slot identifier under the downstream time slot length. Generally speaking, the established mapping relationship is a many-to-one mapping relationship. Therefore, in step S2, when the first time slot length and the first time slot identifier carried in the target message correspond to the upstream time slot length and one of the N upstream time slot identifiers, the downstream time slot length and the downstream time slot identifier are determined to be the second time slot length and the second time slot identifier.

[0062] Exemplarily, there is a first time slot template in the first upstream device, the corresponding upstream time slot length is 40 microseconds, and the corresponding number of upstream time slots is 4, then the length of its circular queue is 160 microseconds; there is a second time slot template in the first forwarding device downstream of the first upstream device, the corresponding downstream time slot length is 80 microseconds, and the corresponding number of downstream time slots is 2, then the length of its circular queue is 160 microseconds; when establishing a mapping relationship, every two upstream time slot identifiers under the upstream time slot length are mapped to one downstream time slot identifier under the downstream time slot length, and the generated first time slot mapping table is shown in Table 1.

[0063] Table 1 First time slot mapping table

[0064] (Upstream timeslot length, upstream timeslot identifier) (downstream time slot length, downstream time slot identifier) (40,0) (80,0) (40,1) (80,0) (40,2) (80,1) (40,3) (80,1)

[0065] Step S021b, in response to the fact that the quotient M of the second upstream time slot length and the second downstream time slot length is an integer, and the product of the second upstream time slot length and the corresponding number of upstream time slots is equal to the product of the second downstream time slot length and the corresponding number of downstream time slots, establish a mapping relationship between an upstream time slot identifier under the second upstream time slot length and M downstream time slot identifiers under the second downstream time slot length.

[0066] In step S021b, for an upstream time slot length that is an integer multiple M of the downstream time slot length and in which the length of the circular queue is equal to the length of the circular queue corresponding to the downstream time slot length, an upstream time slot identifier under the upstream time slot length is mapped to the M downstream time slot identifiers under the downstream time slot length. Generally speaking, the mapping relationship established is a one-to-many mapping relationship. Thus, in step S2, when the first time slot length and the first time slot identifier carried in the target message correspond to the upstream time slot length and one of the upstream time slot identifiers, the downstream time slot is determined. The length is the second time slot length, and one of the M downstream time slot identifiers is the second time slot identifier; in some embodiments, determining one from the M downstream time slot identifiers as the second time slot identifier may include the following implementation methods: randomly selecting one from the M downstream time slot identifiers as the second time slot identifier; selecting one of the M downstream time slot identifiers whose corresponding cache is still available as the second time slot identifier; according to the arrangement order of the M downstream time slot identifiers in the circular queue, selecting one of the M downstream time slot identifiers whose sorting position is in the front and whose corresponding cache is still available as the second time slot identifier, etc.

[0067] Exemplarily, there is a third time slot template in the second upstream device, the corresponding upstream time slot length is 80 microseconds, and the corresponding number of upstream time slots is 2, then the length of its circular queue is 160 microseconds; there is a fourth time slot template in the second forwarding device downstream of the second upstream device, the corresponding downstream time slot length is 40 microseconds, and the corresponding number of downstream time slots is 4, then the length of its circular queue is 160 microseconds; when establishing a mapping relationship, each upstream time slot identifier under the upstream time slot length is mapped to the two downstream time slot identifiers under the downstream time slot length, and the generated second time slot mapping table is shown in Table 2.

[0068] Table 2 Second time slot mapping table

[0069] (Upstream timeslot length, upstream timeslot identifier) (downstream time slot length, downstream time slot identifier) (80,0) (40,0) (80,0) (40,1) (80,1) (40,2) (80,1) (40,3)

[0070] Figure 7 FIG. 1 is another specific implementation method flow chart of step S021 in the embodiment of the present disclosure. Figure 7As shown, step S021, based on the upstream time slot lengths in all time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths of the device itself, and the number of downstream time slots corresponding to the downstream time slot lengths, establishes a mapping relationship between the upstream time slot identifiers under all upstream time slot lengths and the downstream time slot identifiers under all downstream time slot lengths, including: step S0211, step S0212, and step S0213.

[0071] Step S0211, in response to the situation that the product of the third upstream time slot length and the corresponding number of upstream time slots is not equal to the product of the third downstream time slot length and the corresponding number of downstream time slots, calculate the least common multiple of the third upstream time slot length, the number of upstream time slots corresponding to the third upstream time slot length, the third downstream time slot length and the number of downstream time slots corresponding to the third downstream time slot length.

[0072] In step S0211, for an upstream time slot length where the length of the circular queue is not equal to the length of the circular queue of each downstream time slot length, the least common multiple of the length of the circular queue of the upstream time slot length and the length of the circular queue of a downstream time slot length is calculated.

[0073] Step S0212: Establish at least one upstream time slot group based on the least common multiple, the third upstream time slot length, and the number of upstream time slots corresponding to the third upstream time slot length; establish at least one downstream time slot group based on the least common multiple, the third downstream time slot length, and the number of downstream time slots corresponding to the third downstream time slot length.

[0074] In step S0212, the number of upstream time slot groups is determined based on the quotient of the least common multiple and the length of the circular queue in which the upstream time slot length is located. A single upstream time slot group includes at least one time slot. Correspondingly, the number of downstream time slot groups is determined based on the quotient of the least common multiple and the length of the circular queue in which the downstream time slot length is located. The embodiments corresponding to step S021a and step S021b are essentially special cases in which the number of upstream time slot groups and the number of downstream time slot groups are both one.

[0075] Step S0213: Establish a mapping relationship between the upstream time slot identifiers of all time slots in all upstream time slot groups and the downstream time slot identifiers of all time slots in all downstream time slot groups.

[0076] Wherein, a mapping relationship between all upstream time slot identifiers and all downstream time slot identifiers may be established through the above process according to the size relationship of the number of time slots included in the time slot groups.

[0077] In some embodiments, the implementation methods corresponding to the above-mentioned step S021a, the implementation methods corresponding to step S021b, and the implementation methods corresponding to steps S0211 to S0213 can be deployed simultaneously, wherein, for the same upstream time slot length, a downstream time slot length can be selected by trial and error to establish a set of mapping relationships, or, multiple downstream time slot lengths can be selected by traversal to establish multiple sets of mapping relationships. When multiple sets of mapping relationships coexist, one of the mapping relationships can be selected by the upstream device carrying flag information in the target message, or one of the mapping relationships can be selected by the device's own policy judgment, or one of the mapping relationships can be selected according to the instruction information issued by the network control plane.

[0078] An embodiment of the present disclosure provides a message forwarding method, which can be used to establish a mapping relationship between each time slot identifier under each time slot length in the upstream device and the current device based on the time slots supported by the upstream device and the current device, in particular, the time slot template, based on the corresponding strategy, so that even if the device in the network does not support the time slot length selected by the upstream device when sending the message, it can select the forwarding time slot according to the first time slot information indicated in the message, avoiding the situation where the message cannot be forwarded due to not supporting the time slot length selected by the upstream device when sending the message.

[0079] The message forwarding method provided by the present invention is described in detail below in combination with practical applications. Specifically, the third upstream device supports 4 time slot templates, and the corresponding upstream time slot lengths are 10 microseconds, 20 microseconds, 40 microseconds and 80 microseconds, respectively, and the corresponding number of upstream time slots is 2; the third forwarding device located downstream of the third upstream device has 2 time slot templates, and the corresponding downstream time slot lengths are 40 microseconds and 80 microseconds, respectively, and the corresponding number of downstream time slots is 2; the third forwarding device receives the time slot template information including its 4 time slot templates sent by the third upstream device through the link layer discovery protocol, establishes a corresponding mapping relationship, and the generated third time slot mapping table is shown in Table 3.

[0080] Table 3 Third time slot mapping table

[0081] (Upstream timeslot length, upstream timeslot identifier) (downstream time slot length, downstream time slot identifier) (10,0) (40,0) (10,1) (40,0) (20,0) (40,1) (20,1) (40,1) (40,0) (80,0) (40,1) (80,0) (80,0) (80,1) (80,1) (80,1)

[0082] The third forwarding device receives the target message sent by the third upstream device, which carries the first time slot information (40,0), so the first time slot length is 40us and the first time slot identifier is 0; the first time slot length is used as the upstream time slot length, and the first time slot identifier is used as the upstream time slot identifier, and (80,0) is obtained from the time slot mapping table, that is, the downstream time slot length is 80us, the downstream time slot identifier is 0, then the second time slot length is 80us, and the second time slot identifier is 0; the target message is placed in the cache queue corresponding to the second time slot length 80us and the second time slot identifier 0, and the preset waiting time is the time corresponding to the second time slot length. After 80us, the time slot identifier corresponding to the current time slot is 1, the first time slot length 40us in the target message is replaced with 80us, the first time slot identifier 0 is replaced with 1, and the target message is forwarded.

[0083] Figure 8 This is a schematic diagram of the structure of a forwarding device provided by an embodiment of the present disclosure. Figure 8 As shown, the forwarding device includes:

[0084] One or more processors 101; 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 a message forwarding method as described in any of the above embodiments; one or more I / O interfaces 103, connected between the processor and the memory, and configured to implement information exchange between the processor and the memory.

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

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

[0087] Figure 9 A schematic diagram of the structure of a computer-readable medium provided in an embodiment of the present disclosure. The computer-readable medium stores a computer program, wherein the program, when executed by a processor, implements the steps of the message forwarding method in any of the above embodiments.

[0088] It will be appreciated by those skilled in the art that all or some of the steps in the method disclosed above, and the functional modules / units in the device can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, 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 skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0089] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A message forwarding method, wherein: include: Receive a target message from an upstream device, the target message carrying first time slot information, the first time slot information including: a first time slot length and a first time slot identifier; the first time slot information indicates a corresponding sending time slot when the upstream device sends the target message; determining a corresponding second time slot length and a second time slot identifier according to the first time slot length and the first time slot identifier; the second time slot length and the second time slot identifier indicate a forwarding time slot for forwarding the target message, the second time slot identifier under the second time slot length corresponds to the first time slot identifier under the first time slot length, and the second time slot length is different from the first time slot length; After the target message enters the cache queue corresponding to the second time slot length and the second time slot identifier and a preset waiting time has passed, the target message is forwarded.

2. The message forwarding method according to claim 1, wherein: The step of determining the corresponding second time slot length and second time slot identifier according to the first time slot length and the first time slot identifier comprises: Use the first time slot length as the upstream time slot length, use the first time slot identifier as the upstream time slot identifier, find out the corresponding downstream time slot length and downstream time slot identifier from the time slot mapping table, and use the downstream time slot length as the second time slot length, and use the downstream time slot identifier as the second time slot identifier; wherein, the time slot mapping table records the mapping relationship between the upstream time slot identifier under the upstream time slot length and the downstream time slot identifier under its own downstream time slot length.

3. The message forwarding method according to claim 2, wherein: Before the step of receiving the target message from the upstream device, the method further includes: Acquire time slot template information of the upstream device, where the time slot template information includes at least one time slot template, and the time slot template includes a corresponding upstream time slot length and all upstream time slot identifiers under the upstream time slot length; According to the upstream time slot lengths in all the time slot templates and all the preset downstream time slot lengths, a mapping relationship between the upstream time slot identifiers under all upstream time slot lengths and the downstream time slot identifiers under all downstream time slot lengths is established, and the time slot mapping table is generated.

4. The message forwarding method according to claim 3, wherein: The step of obtaining the time slot template information of the upstream device includes: Receive the time slot template information sent by the upstream device through the link layer discovery protocol.

5. The message forwarding method according to claim 3, wherein: The step of establishing a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths according to all upstream time slot lengths in the time slot templates and all downstream time slot lengths preset by the time slot templates includes: According to the upstream time slot lengths in all the time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths of the time slot template itself, and the number of downstream time slots corresponding to the downstream time slot lengths, a mapping relationship is established between the upstream time slot identifiers under all upstream time slot lengths and the downstream time slot identifiers under all downstream time slot lengths.

6. The message forwarding method according to claim 5, wherein: The step of establishing a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths based on the upstream time slot lengths in all the time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths preset by the self, and the number of downstream time slots corresponding to the downstream time slot lengths, includes: In response to the fact that a quotient N of the first downstream time slot length and the first upstream time slot length is an integer, and the product of the first upstream time slot length and the number of upstream time slots corresponding thereto is equal to the product of the first downstream time slot length and the number of downstream time slots corresponding thereto, establishing a mapping relationship between N upstream time slot identifiers under the first upstream time slot length and one downstream time slot identifier under the first downstream time slot length; In response to the fact that the quotient M of the second upstream time slot length and the second downstream time slot length is an integer, and the product of the second upstream time slot length and the corresponding number of upstream time slots is equal to the product of the second downstream time slot length and the corresponding number of downstream time slots, a mapping relationship is established between an upstream time slot identifier under the second upstream time slot length and M downstream time slot identifiers under the second downstream time slot length.

7. The message forwarding method according to claim 5, wherein: The step of establishing a mapping relationship between upstream time slot identifiers under all upstream time slot lengths and downstream time slot identifiers under all downstream time slot lengths based on the upstream time slot lengths in all the time slot templates, the number of upstream time slots corresponding to the upstream time slot lengths, all downstream time slot lengths preset by the user, and the number of downstream time slots corresponding to the downstream time slot lengths, further includes: In response to a situation where the product of the third upstream time slot length and the number of upstream time slots corresponding thereto is not equal to the product of the third downstream time slot length and the number of downstream time slots corresponding thereto, calculating a least common multiple of the third upstream time slot length, the number of upstream time slots corresponding to the third upstream time slot length, the third downstream time slot length, and the number of downstream time slots corresponding to the third downstream time slot length; establishing at least one upstream time slot group according to the least common multiple, the third upstream time slot length, and the number of upstream time slots corresponding to the third upstream time slot length, and establishing at least one downstream time slot group according to the least common multiple, the third downstream time slot length, and the number of downstream time slots corresponding to the third downstream time slot length; A mapping relationship is established between the upstream time slot identifiers of all time slots in all upstream time slot groups and the downstream time slot identifiers of all time slots in all downstream time slot groups.

8. The message forwarding method according to claim 1, wherein: The step of forwarding the target message includes: The first time slot length is replaced with the second time slot length, the first time slot identifier is replaced with the time slot identifier corresponding to the current time slot after the waiting time, and the target message is forwarded.

9. 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 message forwarding method according to any one of claims 1 to 8.

10. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the steps in the message forwarding method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Optimized dynamic bandwidth scheduler

    US20130315596A1