A dynamic bandwidth allocation method, apparatus and optical line terminal

By setting up multiple token bucket queues in the OLT and dynamically allocating bandwidth based on priority and the number of tokens, the problem of unfair bandwidth allocation in XGSPON is solved, achieving more efficient bandwidth allocation and reducing data transmission latency.

CN119728567BActive Publication Date: 2025-10-28NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411932621.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-10-28
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In 10G Symmetrical Passive Optical Network (XGSPON), the existing dynamic bandwidth allocation method results in some ONUs not being polled for a long time, their bandwidth demand not being met, and the fairness of dynamic bandwidth allocation is poor.

Method used

In the OLT, multiple token bucket queues are set up, and each token bucket queue corresponds to a TCONT. The token bucket queues are traversed in descending order of priority. A bandwidth authorization value is allocated to the TCONT according to the number of tokens, and a bandwidth mapping is generated and distributed.

Benefits of technology

This ensures that high-priority TCONTs can fairly acquire bandwidth resources over a long period of time, reducing bandwidth allocation latency and ONU uplink data transmission latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728567B_ABST
    Figure CN119728567B_ABST
Patent Text Reader

Abstract

This application provides a dynamic bandwidth allocation method, apparatus, and optical line terminal (OLT), relating to the field of passive optical network (PON) technology. The method is applied to an OLT in a PON. The OLT has multiple token bucket queues, each with a priority level. Each token bucket in each queue corresponds to a TCONT (Trusted Token Terminal). The number of tokens in each token bucket indicates the configured bandwidth. The method includes: traversing multiple token bucket queues in descending order of priority during each bandwidth allocation cycle; allocating bandwidth authorization values ​​to the TCONT corresponding to each token bucket based on the number of tokens in each queue, until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is complete; generating a bandwidth mapping using the bandwidth authorization values ​​allocated to each TCONT; and distributing the bandwidth mapping to the ONUs (Optical Units) in the PON. This scheme improves the fairness of dynamic bandwidth allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of passive optical network technology, and in particular to a dynamic bandwidth allocation method, apparatus and optical line terminal. Background Technology

[0002] To improve the efficiency of uplink bandwidth in a 10G Symmetrical Passive Optical Network (XGSPON), the Optical Line Terminal (OLT) dynamically adjusts the bandwidth between Optical Network Units (ONUs). Specifically, the OLT's Dynamic Bandwidth Assignment (DBA) module collects DBA reports from the ONUs via the Passive Optical Network (PON) port. The DBA algorithm module polls the ONUs in a specific order, performs calculations based on the DBA reports and the bandwidth requests from each ONU, and allocates bandwidth to each Transmission Container (TCONT) connected to the ONU. The allocation results are then distributed to each ONU in the form of a bandwidth map (BWmap). Each ONU determines the bandwidth for each TCONT based on the BWmap and uses the corresponding bandwidth to send uplink data to the OLT.

[0003] This dynamic bandwidth allocation method is simple and easy to implement. Each time an ONU is polled, a bandwidth calculation is performed based on the bandwidth requirements of each TCONT on that ONU, and bandwidth is allocated to each TCONT. This may result in some ONUs not being polled for a long time, and their bandwidth requirements not being met for a long time, resulting in poor fairness in dynamic bandwidth allocation. Summary of the Invention

[0004] The purpose of this application is to provide a dynamic bandwidth allocation method, apparatus, and optical line terminal to improve the fairness of dynamic bandwidth allocation. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a dynamic bandwidth allocation method applied to an OLT in a passive optical network. The OLT is configured with multiple token bucket queues, each token bucket in each queue corresponding to a TCONT. The number of tokens in each token bucket indicates the configured bandwidth. The method includes:

[0006] Within each bandwidth allocation cycle, the multiple token bucket queues are traversed in descending order of priority.

[0007] Based on the number of tokens included in each token bucket in the traversed token bucket queue, allocate a bandwidth authorization value to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed;

[0008] A bandwidth map is generated using the bandwidth grant value allocated to each TCONT;

[0009] The bandwidth mapping is then distributed to the ONUs in the passive optical network.

[0010] In some embodiments, the step of allocating a bandwidth authorization value to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes:

[0011] If the token bucket queue that is traversed is the first token bucket queue corresponding to the best-effort bandwidth, then the multiple token bucket queues in the first token bucket queue are traversed in descending order of priority of the token bucket sub-queues in the first token bucket queue, with each token bucket queue corresponding to a priority.

[0012] Based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket, a first bandwidth authorization value is allocated to each first TCONT until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed.

[0013] In some embodiments, the step of allocating a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket includes:

[0014] Calculate the difference between the first request bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket sub-queue and the bandwidth authorization value already allocated to the first TCONT, to obtain the second request bandwidth of each first TCONT;

[0015] Calculate the proportion of the allocation weight of each first TCONT in the total allocation weight of all first TCONTs in the traversed token bucket subqueue to obtain the first bandwidth proportion of each first TCONT.

[0016] Calculate the product of the first bandwidth percentage and the remaining bandwidth for each first TCONT to obtain the first allocable bandwidth corresponding to each first TCONT;

[0017] The minimum value among the number of tokens, the second requested bandwidth, and the first allocable bandwidth included in the first token bucket corresponding to each first TCONT is determined as the first bandwidth authorization value for each first TCONT.

[0018] In some embodiments, after allocating a first bandwidth license value to each first TCONT, the method further includes:

[0019] According to the bandwidth growth rate of the first TCONT in descending order, traverse the first TCONT corresponding to each first token bucket in the target token bucket queue, where the target token bucket queue is the token bucket queue currently being traversed.

[0020] Increase the first bandwidth license value of the first TCONT encountered by a first preset percentage to obtain a new first bandwidth license value, until the remaining bandwidth is empty, or the bandwidth growth rate of the first TCONT encountered is less than the preset growth rate.

[0021] In some embodiments, the step of allocating a bandwidth authorization value to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes:

[0022] If the token bucket queue that is traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT. The second token bucket is the token bucket in the second token bucket queue.

[0023] Calculate the proportion of the bandwidth sum of each second TCONT in the total bandwidth sum of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum is the sum of the fixed bandwidth and the guaranteed bandwidth;

[0024] Calculate the product of the second bandwidth percentage and the remaining bandwidth for each second TCONT to obtain the second allocable bandwidth corresponding to each second TCONT;

[0025] The minimum of the number of tokens in the second token bucket, the third request bandwidth, and the second allocable bandwidth included in the second TCONT is determined as the second bandwidth authorization value for each second TCONT.

[0026] In some embodiments, after allocating a second bandwidth grant value to each second TCONT, the method further includes:

[0027] Traverse each second TCONT in descending order of bandwidth growth rate;

[0028] Increase the second bandwidth grant value of the traversed second TCONT by a second preset percentage to obtain a new second bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate.

[0029] In some embodiments, the step of allocating a bandwidth authorization value to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes:

[0030] If the token bucket queue traversed is the third token bucket queue corresponding to the fixed bandwidth, then the number of tokens included in each third token bucket is determined as the third bandwidth authorization value of the third TCONT corresponding to each third token bucket, and the third token bucket is the token bucket in the third token bucket queue.

[0031] If the token bucket queue encountered is the fourth token bucket queue corresponding to the guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value already allocated to the fourth TCONT to obtain the fourth requested bandwidth of each fourth TCONT. The fourth token bucket is the token bucket in the fourth token bucket queue. The minimum value between the number of tokens included in the fourth token bucket corresponding to each fourth TCONT and the fourth requested bandwidth is determined as the fourth bandwidth authorization value of each fourth TCONT.

[0032] Alternatively, the step of allocating a bandwidth authorization value to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes:

[0033] If the token bucket queue traversed is the fifth token bucket queue corresponding to fixed bandwidth and guaranteed bandwidth, then calculate the sum of the number of tokens in the third token bucket and the fourth token bucket corresponding to each fifth TCONT in the fifth token bucket queue, and obtain the number of fifth tokens corresponding to each fifth TCONT. The configured bandwidth indicated by the third token bucket is the fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is the guaranteed bandwidth.

[0034] If the first request bandwidth of each fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to each fifth TCONT, then the number of tokens included in the third token bucket corresponding to each fifth TCONT is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0035] If the first requested bandwidth of each fifth TCONT is greater than the number of tokens in the third token bucket corresponding to each fifth TCONT, then the minimum value between the number of fifth tokens corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0036] In some embodiments, before traversing the plurality of token bucket queues in descending order of bandwidth priority, the method further includes:

[0037] Determine whether the bandwidth template parameters of each TCONT have been updated, and obtain the determination result. The bandwidth template parameters of each TCONT include the configured bandwidth of that TCONT.

[0038] If the judgment result indicates that the target bandwidth template parameters of the target TCONT have been updated, then the token bucket corresponding to the target TCONT is adjusted according to the target configuration bandwidth and bandwidth allocation period included in the target bandwidth template parameters.

[0039] In some embodiments, the target configured bandwidth includes fixed bandwidth, guaranteed bandwidth, non-guaranteed maximum bandwidth, and / or best-effort bandwidth;

[0040] The step of adjusting the token bucket corresponding to the target TCONT based on the target configured bandwidth and bandwidth allocation period duration included in the target bandwidth template parameters includes:

[0041] The number of tokens included in the third token bucket corresponding to the target TCONT is adjusted to the number of first tokens, where the number of first tokens is the product of the fixed bandwidth and the bandwidth allocation period duration, and the third token bucket corresponds to the fixed bandwidth.

[0042] The number of tokens included in the fourth token bucket corresponding to the target TCONT is adjusted to the number of second tokens, where the number of second tokens is the product of the guaranteed bandwidth and the bandwidth allocation period duration, and the fourth token bucket corresponds to the guaranteed bandwidth.

[0043] Adjust the number of tokens in the first token bucket corresponding to the target TCONT to a third token number, where the third token number is the product of the best-effort bandwidth and the bandwidth allocation period duration, and the first token bucket corresponds to the best-effort bandwidth; and / or,

[0044] Calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth to obtain the non-guaranteed bandwidth; adjust the number of tokens in the fourth token bucket corresponding to the target TCONT to the second token number, where the second token number is the product of the guaranteed bandwidth and the bandwidth allocation period duration, and the fourth token bucket corresponds to the guaranteed bandwidth; adjust the number of tokens in the second token bucket corresponding to the target TCONT to the fourth token number, where the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation period duration, and the second token bucket corresponds to the non-guaranteed bandwidth.

[0045] In some embodiments, the method further includes:

[0046] A timed interrupt signal is generated for each bandwidth allocation cycle.

[0047] When a timer interrupt signal is detected, the step of generating a bandwidth map using the bandwidth grant value allocated to each TCONT is executed.

[0048] Secondly, embodiments of this application provide a dynamic bandwidth allocation device applied to an OLT in a passive optical network. The OLT has multiple token bucket queues, each token bucket queue corresponding to a priority level. Each token bucket in each token bucket queue corresponds to a TCONT. The number of tokens included in each token bucket indicates the configured bandwidth. The device includes:

[0049] The traversal module is used to traverse the multiple token bucket queues in descending order of priority within each bandwidth allocation cycle.

[0050] The allocation module is used to allocate a bandwidth authorization value to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue, until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed;

[0051] The generation module is used to generate bandwidth maps using the bandwidth grant value allocated to each TCONT;

[0052] The distribution module is used to distribute the bandwidth mapping to the ONUs in the passive optical network.

[0053] Thirdly, embodiments of this application provide an optical line terminal, including a first processor and a logic chip; the first processor is configured with multiple token bucket queues, each token bucket in each token bucket queue corresponds to a transmission container TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth;

[0054] The first processor is configured to, in each bandwidth allocation cycle, traverse the multiple token bucket queues in descending order of priority; allocate bandwidth authorization values ​​to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queues, until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed; and send the bandwidth authorization values ​​allocated to each TCONT to the logic chip.

[0055] The logic chip is used to generate a bandwidth mapping using the bandwidth grant value allocated to each TCONT; and to send the bandwidth mapping to the optical network unit (ONU) in the passive optical network.

[0056] In some embodiments, the OLT further includes a second processor;

[0057] The second processor is used to obtain the bandwidth template parameters of each TCONT, the bandwidth template parameters including the configuration bandwidth corresponding to the bandwidth type used by each TCONT; and to send the bandwidth template parameters of each TCONT to the first processor.

[0058] The first processor is further configured to determine whether the bandwidth template parameters of each TCONT have been updated, and obtain a determination result. The bandwidth template parameters of each TCONT include the configured bandwidth of the TCONT. If the determination result indicates that the target bandwidth template parameters of the target TCONT have been updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and bandwidth allocation period included in the target bandwidth template parameters.

[0059] In some embodiments, the first processor is further configured to: generate a timer interrupt signal every time a bandwidth allocation cycle is interrupted; and send each TCONT allocated bandwidth grant value to the logic chip when a timer interrupt signal is detected.

[0060] Beneficial effects of the embodiments in this application:

[0061] In the technical solution provided in this application embodiment, the OLT pre-configures token bucket queues with multiple priorities. Each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens in a token bucket represents the configured bandwidth of the corresponding TCONT. During each bandwidth allocation cycle, the OLT traverses the token bucket queues in descending order of priority, prioritizing the allocation of bandwidth to TCONTs corresponding to higher-priority token buckets. This ensures that high-priority bandwidth demands are met and that all TCONTs have fair access to bandwidth resources over a long period.

[0062] Furthermore, within each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values ​​to TCONTs based on the number of tokens included in the token bucket, generate bandwidth mappings, and send them to the ONU. In this embodiment, the OLT utilizes the token bucket to pre-set the configuration bandwidth for each TCONT. When dynamically allocating bandwidth to TCONTs, there is no need to repeatedly calculate the configuration bandwidth, reducing the workload during bandwidth allocation and simplifying the implementation. This, in turn, reduces the latency of dynamic bandwidth allocation and lowers the latency of ONU sending uplink data.

[0063] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

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

[0065] Figure 1 This is a schematic diagram of a first process for a dynamic bandwidth allocation method provided in an embodiment of this application;

[0066] Figure 2 This is a first schematic diagram of multiple token bucket queues provided in an embodiment of this application;

[0067] Figure 3 This is a second schematic diagram of multiple token bucket queues provided in an embodiment of this application;

[0068] Figure 4 This is a second flowchart illustrating the dynamic bandwidth allocation method provided in the embodiments of this application;

[0069] Figure 5 This is a third schematic diagram of multiple token bucket queues provided in the embodiments of this application;

[0070] Figure 6 This is a third flowchart illustrating the dynamic bandwidth allocation method provided in the embodiments of this application.

[0071] Figure 7 A schematic diagram of the bandwidth allocation process provided in the embodiments of this application;

[0072] Figure 8 This is a schematic diagram of a first structure of the dynamic bandwidth allocation device provided in an embodiment of this application;

[0073] Figure 9 This is a schematic diagram of a first structure of an OLT provided in an embodiment of this application;

[0074] Figure 10 This is a schematic diagram of a second structure of the OLT provided in an embodiment of this application;

[0075] Figure 11 This is a schematic diagram of a third structure of the OLT provided in an embodiment of this application;

[0076] Figure 12 A schematic diagram of the dynamic bandwidth allocation process provided in the embodiments of this application;

[0077] Figure 13 This is a schematic diagram of a first processor provided in an embodiment of this application. Detailed Implementation

[0078] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0079] XGSPON: An optical access network consisting of three core modules: an OLT, an Optical Distribution Network (ODN), and ONUs. XGSPON uses a one-to-many tree structure, where one OLT connects to one or more ONUs via the ODN, and each ONU can connect to one or more TCONTs. Uplink data from the ONU to the OLT is transmitted using time-division multiplexing, while downlink data from the OLT to the ONU is transmitted via broadcast.

[0080] TCONT: The smallest unit of DBA. One TCONT corresponds to one bandwidth service, which has its own Quality of Service (QoS) characteristics. QoS characteristics are mainly reflected in bandwidth guarantees, and can be divided into bandwidth types such as: fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, best-effort bandwidth, and hybrid bandwidth, as shown in Table 1.

[0081] Table 1

[0082]

[0083]

[0084] In Table 1, type 1 TCONT uses fixed bandwidth to transmit data; type 2 TCONT uses guaranteed bandwidth to transmit data; type 3 TCONT uses both guaranteed and non-guaranteed bandwidth to transmit data; type 4 TCONT uses best-effort bandwidth to transmit data; and type 5 TCONT uses a mixture of fixed bandwidth, guaranteed bandwidth, and best-effort bandwidth to transmit data, or a mixture of fixed bandwidth, guaranteed bandwidth, and non-guaranteed bandwidth to transmit data.

[0085] Fixed bandwidth is the highest priority bandwidth, allocated periodically and fully reserved. This means that bandwidth requests from TCONTs are not considered; a fixed amount of authorization is allocated each bandwidth allocation period. For example, if a Type 1 TCONT reserves fixed bandwidth but has no cells to send, the OLT will still send the fixed bandwidth authorization to the TCONT, and the ONU will then send idle cells to the OLT. Fixed bandwidth is suitable for delay-sensitive services, as it allows for low cell transmission delays.

[0086] Assured bandwidth is a periodically allocated, provisioned bandwidth with a fixed size but variable time slot usage. For example, when a Type 2 TCONT transmits cells, the ONU can always use the guaranteed bandwidth; if the TCONT does not transmit cells, the guaranteed bandwidth can be used by other TCONTs. Assured bandwidth is suitable for latency-insensitive services and can participate in dynamic bandwidth allocation.

[0087] Non-assured bandwidth is additional bandwidth dynamically allocated to TCONTs with guaranteed bandwidth (such as Type 3 TCONTs), and it has a higher priority among these additional bandwidths. Non-assured bandwidth is suitable for latency-insensitive services and can participate in dynamic bandwidth allocation.

[0088] Best-effort bandwidth is dynamically allocated bandwidth; it is the bandwidth that a TCONT (such as a Type 4 TCONT) can use when no high-priority service is using that bandwidth. Best-effort bandwidth is suitable for latency-insensitive services and can only participate in dynamic bandwidth allocation.

[0089] To improve the effectiveness of XGSPON uplink bandwidth, the OLT dynamically adjusts the bandwidth between ONUs. Specifically, the DBA algorithm module collects uplink DBA reports (Dynamic Bandwidth Report upstream, DBRu) from the ONU side through the OLT port and the ONU internal scheduler. The DBA report can include requested bandwidth (which can be represented as remaining buffer space). The DBA algorithm module polls the ONUs in a certain order, performs relevant calculations based on the DBA report and the requested bandwidth of each polled ONU, allocates bandwidth for each TCONT connected to the ONU, and sends the allocation result to each ONU in the form of a BWmap. Each ONU determines the bandwidth for each TCONT based on the BWmap and then uses the corresponding bandwidth to send uplink data to the OLT.

[0090] This dynamic bandwidth allocation method is simple and easy to implement, but every time an ONU is polled, a bandwidth calculation needs to be performed based on the bandwidth requirements of each TCONT on that ONU in order to allocate bandwidth to each TCONT, resulting in high bandwidth allocation latency.

[0091] To address the aforementioned problems, embodiments of this application provide a dynamic bandwidth allocation method, such as... Figure 1 As shown, this method is applied to an OLT in a passive optical network. The OLT has multiple token bucket queues, each with a priority level. Each token bucket in each queue corresponds to a TCONT, and the number of tokens in a token bucket indicates the configured bandwidth. The method includes the following steps:

[0092] Step S101: In each bandwidth allocation cycle, traverse multiple token bucket queues in descending order of their priority.

[0093] Step S102: Based on the number of tokens included in each token bucket in the traversed token bucket queue, allocate a bandwidth authorization value to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or until multiple token bucket queues have been traversed.

[0094] Step S103: Generate a bandwidth mapping using the bandwidth grant value allocated to each TCONT;

[0095] Step S104: The bandwidth mapping is sent to the ONU in the passive optical network.

[0096] In the technical solution provided in this application embodiment, the OLT pre-configures token bucket queues with multiple priorities. Each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens in a token bucket represents the configured bandwidth of the corresponding TCONT. During each bandwidth allocation cycle, the OLT traverses the token bucket queues in descending order of priority, prioritizing the allocation of bandwidth to TCONTs corresponding to higher-priority token buckets. This ensures that high-priority bandwidth demands are met and that all TCONTs have fair access to bandwidth resources over a long period.

[0097] Furthermore, within each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values ​​to TCONTs based on the number of tokens included in the token bucket, generate bandwidth mappings, and send them to the ONU. In this embodiment, the OLT utilizes the token bucket to pre-set the configuration bandwidth for each TCONT. When dynamically allocating bandwidth to TCONTs, there is no need to repeatedly calculate the configuration bandwidth, reducing the workload during bandwidth allocation and simplifying the implementation. This, in turn, reduces the latency of dynamic bandwidth allocation and lowers the latency for ONUs to send uplink data.

[0098] In this embodiment, the passive optical network can be XGSPON or other types of PON, and there is no limitation thereto. Multiple token bucket queues are set up in the OLT, and each token bucket queue is configured with a corresponding priority. The specific priority division method can be set according to actual needs.

[0099] In one example, the priority of the token bucket queue can be determined based on the bandwidth template parameter. For instance, the bandwidth template parameter includes the priority of the token bucket queue. This priority of the token bucket queue can also be understood as the priority of the TCONT. The TCONT is associated with the bandwidth template parameter, and correspondingly, the token bucket corresponding to the TCONT is added to the token bucket queue corresponding to the priority included in the bandwidth template parameter.

[0100] In another example, the priority of the token bucket queues can be determined based on the bandwidth type. For instance, bandwidth types include fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth. The priorities of these four bandwidth types, from highest to lowest, are: fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth. The OLT sets up four token bucket queues: T1 for fixed bandwidth, T2 for guaranteed bandwidth, T3 for non-guaranteed bandwidth, and T4 for best-effort bandwidth. Correspondingly, the priorities of the token bucket queues, from highest to lowest, are: T1, T2, T3, and T4.

[0101] Specifically, the token bucket queue corresponding to fixed bandwidth indicates that the number of tokens included in the token buckets in the token bucket queue indicates that the configured bandwidth is fixed bandwidth, and the token buckets in the token bucket queue corresponding to fixed bandwidth are the token buckets corresponding to fixed bandwidth; the number of tokens included in the token bucket queue corresponding to guaranteed bandwidth indicates that the configured bandwidth is guaranteed bandwidth, and the token buckets in the token bucket queue corresponding to guaranteed bandwidth are the token buckets corresponding to guaranteed bandwidth; the number of tokens included in the token bucket queue corresponding to non-guaranteed bandwidth indicates that the configured bandwidth is non-guaranteed bandwidth, and the token buckets in the token bucket queue corresponding to non-guaranteed bandwidth are the token buckets corresponding to non-guaranteed bandwidth; the number of tokens included in the token bucket queue corresponding to best-effort bandwidth indicates that the configured bandwidth is best-effort bandwidth, and the token buckets in the token bucket queue corresponding to best-effort bandwidth are the token buckets corresponding to best-effort bandwidth.

[0102] In this embodiment of the application, a token bucket queue includes one or more token buckets. In a token bucket queue, one token bucket corresponds to one TCONT, and different token buckets correspond to different TCONTs; token buckets in different token bucket queues may correspond to the same TCONT.

[0103] like Figure 2The OLT sets up a token bucket queue T1 for fixed bandwidth, a token bucket queue T2 for guaranteed bandwidth, a token bucket queue T3 for non-guaranteed bandwidth, and a token bucket queue T4 for best-effort bandwidth. Figure 2 In this context, each trapezoidal bucket represents a token bucket, and the filled portion at the bottom of the trapezoidal bucket represents the tokens contained in that token bucket. Figure 2 In the token bucket queue T1, N1 token buckets correspond to TCONT. 11 TCONT 12 ..., TCONT 1N1 In token bucket queue T2, N2 token buckets correspond to TCONT. 21 TCONT 12 TCONT 23 ..., TCONT 2N2 In token bucket queue T3, N3 token buckets correspond to TCONT. 31 TCONT 12 TCONT 33 ..., TCONT 3N3 In token bucket queue T4, N4 token buckets correspond to TCONT. 11 TCONT 42 ..., TCONT 4N4 Token bucket queues T1 through T3 all contain tokens related to TCONT. 12 The corresponding token bucket.

[0104] In this embodiment of the application, the OLT can also be configured with more token bucket queues, for example, such as Figure 3 The OLT sets up four token bucket queues: T1 for fixed bandwidth, T2 for guaranteed bandwidth, T3 for non-guaranteed bandwidth, and T4 for best-effort bandwidth. Token bucket queue T4 is further subdivided into several sub-queues, including T41 and T42. Sub-queue T41 has a higher priority than T42, and T42 has a higher priority than the other sub-queues. No restrictions are imposed on this.

[0105] In step S101, the duration of the bandwidth allocation period can be set according to actual needs. For example, the duration of a bandwidth allocation period can be 125 microseconds (μs), 250μs, or 500μs.

[0106] OLT can evenly distribute the total interface bandwidth to obtain the total bandwidth available for allocation over a bandwidth allocation cycle. For example, if the total interface bandwidth is 500Mbps and the duration of a bandwidth allocation cycle is 125μs, then the total bandwidth available for allocation over a bandwidth allocation cycle is 500Mbps × 125μs / 10. 6 =62500bps.

[0107] When the bandwidth allocation period arrives, the OLT traverses multiple token bucket queues in descending order of priority. Figure 2 Taking the token bucket queues 1 through 4 as an example, the priority of the token bucket queues from high to low is token bucket queue 1, token bucket queue 2, token bucket queue 3, and token bucket queue 4. The OLT can traverse token bucket queues 1, 2, 3, and 4 in that order.

[0108] In step S102, the number of tokens included in the token bucket indicates the configured bandwidth; that is, the larger the number of tokens, the larger the configured bandwidth, and the smaller the number of tokens, the smaller the configured bandwidth. The remaining bandwidth is the total bandwidth available for allocation in one bandwidth allocation cycle minus the allocated bandwidth.

[0109] When traversing a token bucket queue, for each token bucket in the queue, the OLT allocates bandwidth to the corresponding TCONT based on the number of tokens contained in that token bucket; that is, it allocates a bandwidth authorization value to the TCONT corresponding to that token bucket. After allocating bandwidth to the TCONTs corresponding to the token buckets in the token bucket queue, if there is still remaining bandwidth and there are token bucket queues that have not been traversed, then the traversal of the token bucket queue continues.

[0110] After allocating bandwidth to the TCONT corresponding to the token bucket in the token bucket queue, if the remaining bandwidth is empty, or if all token bucket queues have been traversed, then stop traversing the token bucket queues.

[0111] After stopping the traversal of the token bucket queue, the bandwidth authorization value of each TCONT in this bandwidth allocation cycle is determined, and the OLT generates an authorization table, which includes the bandwidth authorization value allocated to each TCONT.

[0112] In step S103, after obtaining the bandwidth grant value for each TCONT, the OLT can generate a bandwidth map (BWmap) using the bandwidth grant value allocated to each TCONT. The BWmap indicates the uplink bandwidth of each TCONT, i.e., the bandwidth grant value of each TCONT.

[0113] Then, step S104 is executed, which uses broadcast, multicast, or unicast to send the BWmap to the ONU in the passive optical network.

[0114] In some embodiments, to further reduce the latency of dynamic bandwidth allocation and the latency of ONU uplink data transmission, this application also provides a dynamic bandwidth allocation method, such as... Figure 4 As shown, this method is applied to an OLT in a passive optical network. The method may include the following steps:

[0115] Step S401: In each bandwidth allocation period, multiple token bucket queues are traversed in descending order of priority. Step S401 is the same as step S101.

[0116] Step S402: Based on the number of tokens included in each token bucket in the traversed token bucket queue, allocate a bandwidth authorization value to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or until multiple token bucket queues have been traversed; Step S402 is the same as Step S102.

[0117] Step S403: Generate a timing interrupt signal for each bandwidth allocation cycle;

[0118] In this embodiment, the timer interrupt signal is a timed interrupt signal. The generation period of the timer interrupt signal is the same as the bandwidth allocation period. The OLT generates a timer interrupt signal every bandwidth allocation period.

[0119] Step S404: When a timer interrupt signal is detected, a bandwidth mapping is generated using the bandwidth grant value allocated to each TCONT;

[0120] Step S405: The bandwidth mapping is sent to the ONUs in the passive optical network. Step S405 is the same as step S104 above.

[0121] In this embodiment, the OLT can monitor the timed interrupt signal in real time. If no timed interrupt signal is detected, the OLT will not process the bandwidth grant value for each TCONT, i.e., it will not process the grant table. When a timed interrupt signal is detected, it begins to generate a bandwidth mapping using the bandwidth grant value allocated to each TCONT, and executes step S405.

[0122] To facilitate the generation of bandwidth mapping, the OLT can set an interrupt flag. When a timer interrupt signal is generated, the OLT sets the interrupt flag; if the interrupt flag is not set, the bandwidth grant value of each TCONT will not be processed; if the interrupt flag is set, the OLT can determine that a timer interrupt signal has been detected, and then use the bandwidth grant value allocated to each TCONT to generate a bandwidth mapping and execute step S405.

[0123] The OLT can also use other methods to detect timer interrupt signals, such as setting a register corresponding to the timer interrupt signal; when a timer interrupt signal is generated, the OLT sets this register. This application does not limit the method of detecting timer interrupt signals.

[0124] In this embodiment, the OLT pre-allocates bandwidth authorization values ​​to each TCONT. When a timer interrupt signal is detected, it directly generates and distributes the bandwidth mapping. That is, the OLT uses the token bucket queue and the timer interrupt signal to pre-allocate bandwidth authorization values ​​to each TCONT. When the time for distributing the bandwidth mapping arrives, the OLT directly uses the pre-allocated bandwidth authorization values ​​to generate and distribute the bandwidth mapping. This further reduces the latency of dynamic bandwidth allocation and the latency of the ONU sending uplink data.

[0125] In some embodiments, the OLT can configure the management and control interface (OMCI) of the optical network unit (ONT), that is, configure the TCONT bandwidth template to obtain the bandwidth template parameters. The bandwidth template parameters include the configured bandwidth of the corresponding TCONT.

[0126] In this embodiment of the application, based on the five bandwidth types of TCONT, the TCONT bandwidth template may include the following five types:

[0127] (1)dba{type1 fix fix-bandwidth};

[0128] (2)dba{type2 assure-bandwidth};

[0129] (3)dba{type3 assure assure-bandwidth max max-bandwidth};

[0130] (4)dba{type4 max max-bandwidth[priority priority|weight weight]};

[0131] (5)dba{type5 fix fix-bandwidth assure-bandwidth max max-bandwidth[additional-bandwidth{non-assure|best-effort[priority priority|weight weight]}.

[0132] The TCONT bandwidth template (1) above corresponds to TCONT of type 1, where fix represents fixed bandwidth and fix-bandwidth represents the specific value of fixed bandwidth; the TCONT bandwidth template (2) above corresponds to TCONT of type 2, where assure represents guaranteed bandwidth and assure-bandwidth represents the specific value of guaranteed bandwidth.

[0133] The above TCONT bandwidth template (3) corresponds to TCONT of type 3. Assure means guaranteed bandwidth, assure-bandwidth means the specific value of guaranteed bandwidth, and max means non-guaranteed maximum bandwidth, which is the sum of guaranteed bandwidth and non-guaranteed bandwidth. Max-bandwidth means the specific value of non-guaranteed maximum bandwidth.

[0134] The above TCONT bandwidth template (4) corresponds to TCONT of type 4. max represents the best-effort bandwidth, max-bandwidth represents the specific value of the best-effort bandwidth, the first priority represents the priority of the corresponding TCONT, the second priority represents the specific value of the priority, the first weight represents the weight of the corresponding TCONT, and the second weight represents the specific value of the weight.

[0135] The TCONT bandwidth template (5) above corresponds to type 5 TCONT. The meaning of each parameter can be found in the relevant descriptions in the TCONT bandwidth templates (1) to (4) above. In the TCONT bandwidth template (5), additional-bandwidth represents the bandwidth corresponding to max, that is, non-assure bandwidth or best-effort bandwidth. When the best-effort bandwidth corresponds to max, the TCONT bandwidth template (5) also includes priority and weight.

[0136] For each bandwidth type, the OLT can set multiple TCONT bandwidth templates for that bandwidth type, with different parameters in each TCONT bandwidth template. For example, the OLT can set two TCONT bandwidth templates (1), one with a fixed bandwidth of 5Mbps, i.e., dba{type1 fix 5M}, and the other with a fixed bandwidth of 3Mbps, i.e., dba{type1 fix 3M}.

[0137] After each TCONT is connected to the PON, the OLT associates the TCONT with a TCONT bandwidth template to obtain the configured bandwidth of the TCONT. For example, if TCONT1 is associated with dba{type1 fix 5M}, then the configured bandwidth of TCONT1 is a fixed bandwidth of 5Mbps.

[0138] Based on the TCONT bandwidth template associated with each TCONT, the OLT generates a token bucket corresponding to each TCONT.

[0139] For a TCONT associated with the TCONT bandwidth template (1), the configured bandwidth of the TCONT is a fixed bandwidth. The OLT can calculate the product of the fixed bandwidth of the TCONT and the bandwidth allocation period duration to obtain a first quantity; and generate a token bucket containing the first quantity of tokens as the token bucket of the TCONT. Specifically, the OLT can use the following formula (1) to obtain the number of tokens (TokensFix) included in the token bucket of the TCONT associated with the TCONT bandwidth template (1):

[0140] TokensFix=R F ×Tsch; (1)

[0141] Where TokensFix represents the first quantity, R F For fixed bandwidth, Tsch represents the bandwidth allocation period.

[0142] For a TCONT associated with the TCONT bandwidth template (2), the configured bandwidth of the TCONT is the guaranteed bandwidth. The OLT can calculate the product of the guaranteed bandwidth of the TCONT and the bandwidth allocation period duration to obtain a second quantity; and generate a token bucket containing the second quantity of tokens as the token bucket of the TCONT. Specifically, the OLT can use the following formula (2) to obtain the number of tokens TokensAss included in the token bucket of the TCONT associated with the TCONT bandwidth template (2):

[0143] TokensAss=R A ×Tsch; (2)

[0144] Where TokensAss is the second quantity, R A To ensure bandwidth, Tsch is the bandwidth allocation period.

[0145] For a TCONT associated with the TCONT bandwidth template (3), the configured bandwidth of the TCONT includes guaranteed bandwidth and non-guaranteed maximum bandwidth. The OLT can calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth of the TCONT to obtain the non-guaranteed bandwidth of the TCONT; calculate the product of the guaranteed bandwidth of the TCONT and the bandwidth allocation period duration to obtain the second quantity, and calculate the product of the non-guaranteed bandwidth of the TCONT and the bandwidth allocation period duration to obtain the third quantity; generate a token bucket including the second quantity of tokens and a token bucket including the third quantity of tokens as the two token buckets of the TCONT. Specifically, the OLT can use the following formulas (2) and (3) to obtain the number of tokens TokensAss and TokensNA included in the two token buckets of the TCONT associated with the TCONT bandwidth template (3):

[0146] TokensNA=R NA ×Tsch; (3)

[0147] Among them, TokensNA is the third quantity, R NA For non-guaranteed bandwidth, Tsch represents the bandwidth allocation period.

[0148] For a TCONT associated with a TCONT bandwidth template (4), the configured bandwidth of the TCONT includes the best-effort bandwidth. The OLT can calculate the product of the best-effort bandwidth of the TCONT and the bandwidth allocation period duration to obtain the fourth quantity; and generate a token bucket containing the fourth quantity of tokens as the token bucket of the TCONT. Specifically, the OLT can use the following formula (4) to obtain the number of tokens TokensBE included in the token bucket of the TCONT associated with the TCONT bandwidth template (4):

[0149] TokensBE=R BE ×Tsch; (4)

[0150] Where TokensBE represents the fourth quantity, R BE To maximize bandwidth, Tsch represents the bandwidth allocation period.

[0151] For a TCONT associated with a TCONT bandwidth template (5), the configured bandwidth of the TCONT includes fixed bandwidth, guaranteed bandwidth and non-guaranteed bandwidth, or the configured bandwidth of the TCONT includes fixed bandwidth, guaranteed bandwidth and best-effort bandwidth. If the configured bandwidth of the TCONT includes fixed bandwidth, guaranteed bandwidth and non-guaranteed bandwidth, then the OLT can use the above formulas (1) to (3) to obtain the first quantity, the second quantity and the third quantity, and then generate three token buckets containing the first quantity, the second quantity and the third quantity of tokens respectively, as the token buckets of the TCONT.

[0152] If the configured bandwidth of the TCONT includes fixed bandwidth, guaranteed bandwidth and best-effort bandwidth, then the OLT can use the above formulas (1), (2) and (4) to obtain the first quantity, the second quantity and the fourth quantity, and then generate three token buckets containing the first quantity, the second quantity and the fourth quantity of tokens respectively, as the token buckets of the TCONT.

[0153] After obtaining the token buckets of each TCONT, the OLT can determine the token bucket queue corresponding to each token bucket and add each token bucket to the corresponding token bucket queue.

[0154] For example, the OLT pre-configures four token bucket queues: T1 for fixed bandwidth, T2 for guaranteed bandwidth, T3 for non-guaranteed bandwidth, and T4 for best-effort bandwidth. Figure 2 As shown. The OLT can add the token bucket corresponding to the fixed bandwidth to the token bucket queue T1, that is, add the token bucket obtained by formula (1) to the token bucket queue T1; the OLT can add the token bucket corresponding to the guaranteed bandwidth to the token bucket queue T2, that is, add the token bucket obtained by formula (2) to the token bucket queue T2; the OLT can add the token bucket corresponding to the non-guaranteed bandwidth to the token bucket queue T3, that is, add the token bucket obtained by formula (3) to the token bucket queue T3; the OLT can add the token bucket corresponding to the best-effort bandwidth to the token bucket queue T4, that is, add the token bucket obtained by formula (4) to the token bucket queue T4.

[0155] For example, the OLT pre-configures three token bucket queues: T5 for fixed bandwidth and guaranteed bandwidth, T3 for non-guaranteed bandwidth, and T4 for best-effort bandwidth. Figure 5As shown. The OLT can add the token bucket corresponding to the fixed bandwidth and the token bucket corresponding to the guaranteed bandwidth to the token bucket queue T5, that is, add the token buckets obtained by formula (1) and formula (2) to the token bucket queue T5; the OLT can add the token bucket corresponding to the non-guaranteed bandwidth to the token bucket queue T3, that is, add the token bucket obtained by formula (3) to the token bucket queue T3; the OLT can add the token bucket corresponding to the best-effort bandwidth to the token bucket queue T4, that is, add the token bucket obtained by formula (4) to the token bucket queue T4.

[0156] For example, if TCONT1 is of type 3, the OLT uses formula (2) to obtain token bucket 1 corresponding to TCONT1 and formula (3) to obtain token bucket 2 corresponding to TCONT1. Token bucket 1 corresponds to the guaranteed bandwidth, and the OLT adds token bucket 1 to the token bucket queue T2 corresponding to the guaranteed bandwidth; token bucket 2 corresponds to the non-guaranteed bandwidth, and the OLT adds token bucket 2 to the token bucket queue T3 corresponding to the non-guaranteed bandwidth.

[0157] The OLT can pre-specify the token bucket queue corresponding to each TCONT, so that the token buckets of each TCONT can be added to the corresponding token bucket queue. The OLT can also pre-specify the priority of each TCONT, such as configuring the priority of TCONT through the TCONT bandwidth template; using the priority of TCONT, the OLT adds the token bucket of TCONT to the token bucket queue corresponding to its priority.

[0158] To ensure the accuracy of bandwidth allocation, embodiments of this application also provide a dynamic bandwidth allocation method, such as... Figure 6 As shown, it may include the following steps:

[0159] Step S601: Determine whether the bandwidth template parameters of each TCONT have been updated, and obtain the determination result; wherein, the bandwidth template parameters of each TCONT include the configured bandwidth of the TCONT;

[0160] The OLT can detect whether the bandwidth template parameters of each TCONT are updated in real time, or at intervals of bandwidth allocation, or through event triggering. There are no restrictions on the specific method used to detect whether the bandwidth template parameters of each TCONT are updated.

[0161] If no bandwidth template parameter update for a TCONT is detected, the OLT can directly proceed to step S603. When a bandwidth template parameter update for a TCONT is detected, the OLT can use that TCONT as the target TCONT. The bandwidth template parameter of the target TCONT is the target bandwidth template parameter, which includes the configured bandwidth of the target TCONT, i.e., the target configured bandwidth.

[0162] Step S602: If the judgment result indicates that the target bandwidth template parameter of the target TCONT has been updated, then adjust the token bucket corresponding to the target TCONT according to the target configuration bandwidth and bandwidth allocation period included in the target bandwidth template parameter.

[0163] In this embodiment, if the target configured bandwidth includes a fixed bandwidth, the OLT can adjust the number of tokens in the third token bucket corresponding to the target TCONT to the number of first tokens. The number of first tokens is the product of the fixed bandwidth and the bandwidth allocation period duration. The third token bucket corresponds to the fixed bandwidth. That is, the third token bucket is located in the token bucket queue corresponding to the fixed bandwidth. The OLT can calculate the number of first tokens using formula (1) and update the third token bucket so that the third token bucket includes the number of first tokens.

[0164] If the target configured bandwidth includes the guaranteed bandwidth, the OLT can adjust the number of tokens in the fourth token bucket corresponding to the target TCONT to the number of tokens in the second token bucket. The number of tokens in the second token bucket is the product of the guaranteed bandwidth and the bandwidth allocation period. The fourth token bucket corresponds to the guaranteed bandwidth. That is, the fourth token bucket is located in the token bucket queue corresponding to the guaranteed bandwidth. The OLT can use formula (2) to calculate the number of tokens in the second token bucket and update the fourth token bucket so that the fourth token bucket includes the number of tokens in the second token bucket.

[0165] If the target configured bandwidth includes the best-effort bandwidth, the OLT can adjust the number of tokens in the first token bucket corresponding to the target TCONT to the third token number. The third token number is the product of the best-effort bandwidth and the bandwidth allocation period duration. The first token bucket corresponds to the best-effort bandwidth. That is, the first token bucket is located in the token bucket queue corresponding to the best-effort bandwidth. The OLT can calculate the third token number using formula (4) and update the first token bucket so that the first token bucket includes the third token number of tokens.

[0166] If the target configured bandwidth includes the non-guaranteed maximum bandwidth, the OLT can calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth to obtain the non-guaranteed bandwidth; adjust the number of tokens in the second token bucket corresponding to the target TCONT to the fourth token number, where the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation period duration, and the second token bucket corresponds to the non-guaranteed bandwidth. That is, the second token bucket is located in the token bucket queue corresponding to the non-guaranteed bandwidth, and the OLT can use formula (3) to calculate the fourth token number and update the second token bucket so that the second token bucket includes the fourth token number of tokens.

[0167] In this embodiment, the OLT can obtain the required number of tokens based on the bandwidth type of the target TCONT, such as fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, best-effort bandwidth, or mixed bandwidth, using the above formulas (1) to (4), and then update the token bucket. After the token bucket is updated, step S603 is executed.

[0168] Step S603: In each bandwidth allocation cycle, traverse multiple token bucket queues in descending order of priority.

[0169] Step S604: Based on the number of tokens included in each token bucket in the traversed token bucket queue, allocate a bandwidth authorization value to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or until multiple token bucket queues have been traversed.

[0170] Step S605: Generate a bandwidth mapping using the bandwidth grant value allocated to each TCONT;

[0171] Step S606: The bandwidth mapping is sent to the ONU in the passive optical network.

[0172] Steps S603 to S606 are the same as steps S101 to S104, and will not be repeated here.

[0173] In the technical solution provided in this application embodiment, before allocating the bandwidth authorization value to TCONT, the OLT first updates the token bucket according to the bandwidth template parameters. This effectively ensures that the bandwidth is allocated based on the accurate token bucket, thus improving the accuracy of bandwidth allocation.

[0174] In this embodiment, the specific implementation of step S102 differs depending on the bandwidth type and priority of the token bucket queues. For example, considering bandwidth types including fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth, and token bucket queues including those corresponding to fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth, the mixed bandwidth in this embodiment can be decomposed into fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth, with the corresponding token buckets added to four token bucket queues.

[0175] In this case, step S102 above can be divided into the following five situations:

[0176] Scenario 1: The token bucket queue encountered is the token bucket queue corresponding to fixed bandwidth, such as the third token bucket queue. The token buckets in the third token bucket queue are third token buckets, and the TCONTs corresponding to the third token buckets are third TCONTs. If the token bucket queue encountered is the third token bucket queue corresponding to fixed bandwidth, the OLT can determine the third bandwidth authorization value of the third TCONT corresponding to each third token bucket by the number of tokens included in each third token bucket.

[0177] For each third token bucket, the OLT can determine the number of tokens included in that third token bucket as the fixed bandwidth license value for the corresponding third TCONT, i.e., the third bandwidth license value. The allocation of the third bandwidth license value can be expressed as:

[0178] GrantSize_1 i =TokensFix i ;

[0179] Among them, GrantSize_1 i TCONT i The third bandwidth authorization value, TokensFix i For TCONT i The number of tokens included in the corresponding third token bucket.

[0180] Still with Figure 2 Let's take an example to illustrate. The OLT iterates to the token bucket queue T1 (i.e., the third token bucket queue). Token bucket queue T1 includes TCONT... 11 TCONT 12 ..., TCONT 1N1 The corresponding N1 token buckets (i.e., the third token bucket). OLT will use TCONT 11 The corresponding token bucket includes the number of tokens (TokensFix). 11 Confirmed as TCONT 11 The bandwidth license value is 11 (i.e., the third bandwidth license value); TCONT 12 The corresponding third token bucket includes the number of tokens, TokensFix. 12 Confirmed as TCONT 12 The bandwidth license value is 12 (i.e., the third bandwidth license value); TCONT 1N1 The corresponding token bucket includes the number of tokens (TokensFix). 1N1 It was determined to be TCONT. 1N1 The bandwidth license value is 1N1 (i.e., the third bandwidth license value).

[0181] In this embodiment, the fixed bandwidth can be the highest priority bandwidth type, and the corresponding token bucket queue is the highest priority token bucket queue. This portion of bandwidth is fixedly allocated to users, and even if a user does not use this fixed bandwidth, other users cannot occupy it. A fixed amount of bandwidth authorization is allocated to users in each bandwidth allocation cycle, regardless of the user's bandwidth request.

[0182] Scenario 2: The token bucket queue encountered is the token bucket queue corresponding to the guaranteed bandwidth, such as the fourth token bucket queue. The token buckets in the fourth token bucket queue are the fourth token buckets, and the TCONTs corresponding to the fourth token buckets are the fourth TCONTs. The fourth TCONT can be the same as or different from the third TCONT. If the token bucket queue encountered is the fourth token bucket queue corresponding to the guaranteed bandwidth, the OLT can calculate the difference between the first requested bandwidth of each fourth token bucket and the bandwidth authorization value already allocated to the fourth TCONT, thus obtaining the fourth requested bandwidth of each fourth TCONT. The minimum value between the number of tokens included in the fourth token bucket corresponding to each fourth TCONT and the fourth requested bandwidth is determined as the fourth bandwidth authorization value for each fourth TCONT.

[0183] In this embodiment, the first requested bandwidth is the bandwidth originally requested by the TCONT. The TCONT can report the first requested bandwidth to the OLT via a DBA report. The fourth requested bandwidth is the remaining unauthorized requested bandwidth of the CONT. Besides the guaranteed bandwidth, the fourth TCONT can also correspond to other bandwidths. Therefore, before allocating guaranteed bandwidth to the fourth TCONT, a bandwidth authorization value may have already been allocated to it.

[0184] For example, a fourth TCONT also corresponds to a fixed bandwidth. The token bucket corresponding to the fourth TCONT is included in the third token bucket queue. That is, the fourth TCONT is also a third TCONT. And the priority of the third token bucket queue is higher than the priority of the fourth token bucket queue. Then the OLT first traverses to the third token bucket queue and allocates the third bandwidth authorization value to the fourth TCONT. Then it traverses to the fourth token bucket queue and calculates the difference between the first requested bandwidth and the third bandwidth authorization value of the fourth TCONT to obtain the fourth requested bandwidth of the fourth TCONT.

[0185] For each fourth TCONT, the OLT calculates the difference between the first requested bandwidth of the fourth TCONT and the bandwidth authorization value already allocated to the fourth TCONT, thus obtaining the fourth requested bandwidth of the fourth TCONT. The minimum value between the number of tokens in the fourth token bucket corresponding to the fourth TCONT and the fourth requested bandwidth corresponding to the fourth TCONT is determined as the guaranteed bandwidth authorization value of the fourth TCONT, i.e., the fourth bandwidth authorization value. The allocation of the fourth bandwidth authorization value can be expressed as follows:

[0186] Request_2 i =Request_1 i -GrantSize_1 i ;

[0187] GrantSize_2 i =min(TokensAss) i Request_2 i );

[0188] Among them, GrantSize_1 i This indicates that it is already TCONT i The allocated bandwidth grant value, such as the third bandwidth grant value, GrantSize_2 i TCONT i The fourth bandwidth authorization value, TokensAss i For TCONT i The corresponding fourth token bucket includes the number of tokens, Request_1 i TCONT i The first request bandwidth, Request_2 i TCONT i The fourth request bandwidth.

[0189] Still with Figure 2 Let's take an example. After the OLT allocates bandwidth authorization values ​​to the TCONT corresponding to each token bucket in the token bucket queue T1, it iterates through the token bucket queue T2 (i.e., the fourth token bucket queue). The token bucket queue T2 includes TCONTs... 21 TCONT 12 TCONT 23 ..., TCONT 2N2 The corresponding N2 token buckets (i.e., the fourth token bucket).

[0190] For TCONT 21 OLT did not give TCONT 21 Allocate bandwidth authorization value, TCONT 21 The first request bandwidth is Request 21 TCONT 21 The corresponding token bucket contains a quantity of tokens called TokensAss. 21 OLT can calculate TCONT 21 The fourth request bandwidth Request 21 -0, meaning Request 21 Select Request 21 and TokensAss 21The minimum value in, such as in Request 21 Therefore, the Request 21 As TCONT 21 The bandwidth license value is 21 (i.e., the fourth bandwidth license value).

[0191] For TCONT 12 OLT has become TCONT 12 The third bandwidth authorization value TokensFix was allocated. 12 TCONT 12 The first request bandwidth is Request 12 TCONT 12 The corresponding fourth token bucket contains TokensAss 12 OLT can calculate TCONT 12 The fourth request bandwidth (Request) 12 -TokensFix 12 Select (Request) 12 -TokensFix 12 ) and TokensAss 12 The minimum value in, such as TokensAss 12 , and thus TokensAss 12 As TCONT 12 The bandwidth license value is 22 (i.e., the fourth bandwidth license value).

[0192] For TCONT 2N2 OLT did not give TCONT 2N2 Allocate bandwidth authorization value, TCONT 2N2 The first request bandwidth is Request 2N2 TCONT 2N2 The corresponding token bucket contains a quantity of tokens called TokensAss. 2N2 OLT can calculate TCONT 2N2 The fourth request bandwidth Request 2N2 -0, meaning Request 2N2 Select Request 2N2 and TokensAss 2N2 The minimum value in, such as in Request 2N2 Therefore, the Request 2N2 As TCONT 2N2 The bandwidth license value is 2N2 (i.e., the fourth bandwidth license value).

[0193] In this embodiment, the priority of guaranteed bandwidth can be lower than that of fixed bandwidth; that is, the priority of the fourth token bucket queue corresponding to guaranteed bandwidth is lower than that of the third token bucket queue corresponding to fixed bandwidth. After allocating bandwidth to each TCONT corresponding to the first token bucket queue, if there is still remaining bandwidth, bandwidth will continue to be allocated to each TCONT corresponding to the fourth token bucket queue. Guaranteed bandwidth ensures the bandwidth available to a TCONT when it needs to use bandwidth. When the actual traffic of the fourth TCONT does not reach the guaranteed bandwidth, the DBA mechanism can allocate its remaining bandwidth to the services of other TCONTs. Therefore, the required bandwidth authorization value needs to be calculated based on the real-time bandwidth request of the TCONT (such as remaining cache or remaining bandwidth) and the number of tokens.

[0194] Scenario 3: The token bucket queues encountered are those corresponding to fixed bandwidth and guaranteed bandwidth, such as the fifth token bucket queue. The fifth token bucket queue includes the third token bucket corresponding to fixed bandwidth and the fourth token bucket corresponding to guaranteed bandwidth. That is, the configured bandwidth indicated by the third token bucket is fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is guaranteed bandwidth. The TCONT corresponding to the token buckets in the fifth token bucket queue is the fifth TCONT. The fifth TCONT, fourth TCONT, and third TCONT can be the same or different. A token bucket corresponding to a fifth TCONT can include the third token bucket, or include the fourth token bucket, or include both the third and fourth token buckets; there is no limitation on this.

[0195] If the token bucket queue encountered is the fifth token bucket queue corresponding to fixed bandwidth and guaranteed bandwidth, the OLT can calculate the sum of the number of tokens in the third and fourth token buckets corresponding to each fifth TCONT in the fifth token bucket queue to obtain the fifth token quantity corresponding to each fifth TCONT. If the first requested bandwidth of each fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to each fifth TCONT, then the number of tokens included in the third token bucket corresponding to each fifth TCONT is determined as the fifth bandwidth authorization value of each fifth TCONT. If the first requested bandwidth of each fifth TCONT is greater than the number of tokens in the third token bucket corresponding to each fifth TCONT, then the minimum value between the fifth token quantity corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0196] In this embodiment of the application, the first requested bandwidth is the bandwidth originally requested by TCONT. For example, TCONT can report the first requested bandwidth to OLT through DBA report.

[0197] The OLT obtains the third and fourth token buckets corresponding to the same fifth TCONT. For each fifth TCONT, it calculates the sum of the token counts in the third and fourth token buckets to obtain the fifth token count for that fifth TCONT. Then, the OLT compares the first requested bandwidth, the fifth token count, and the token count in the third token bucket of that fifth TCONT. If the first requested bandwidth of the fifth TCONT is less than or equal to the token count in the third token bucket, the token count in the third token bucket is determined as the fifth bandwidth authorization value for that fifth TCONT. If the first requested bandwidth of the fifth TCONT is greater than the token count in the third token bucket, the minimum value between the fifth token count and the first requested bandwidth is determined as the fifth bandwidth authorization value for that fifth TCONT.

[0198] The allocation of the fifth bandwidth license value can be represented as:

[0199] TokensFA i =TokensFix i +TokensAss i ;

[0200]

[0201] Among them, GrantSize_5 i This indicates that it is already TCONT i The allocated bandwidth authorization value, such as the fifth bandwidth authorization value, TokensFix i For TCONT i The corresponding third token bucket includes the number of tokens, TokensAss i For TCONT i The corresponding fourth token bucket includes the number of tokens, TokensFA i For TCONT i The corresponding number of fifth tokens, Request_1 i TCONT i The first requested bandwidth.

[0202] Still with Figure 5 Let's take an example to illustrate. The OLT iterates to token bucket queue T5 (i.e., the fifth token bucket queue). Token bucket queue T5 includes TCONT... 11 TCONT 12 ..., TCONT 1N1 The corresponding N1 token buckets (i.e., the third token bucket), and TCONT 21 TCONT12 TCONT 23 ..., TCONT 2N2 The corresponding N 12 The fourth token bucket.

[0203] With TCONT 12 For example, for TCONT 12 TCONT 12 The first request bandwidth is Request 12 TCONT 12 The corresponding third token bucket includes TokensFix. 12 TCONT 12 The corresponding fourth token bucket contains TokensAss 12 OLT can calculate TokensFA 12 =TokensFix 12 +TokensAss 12 .

[0204] If Request 12 ≤TokensFix 12 Then the OLT will fix Tokens. 12 As TCONT 12 The bandwidth authorization value is 52 (i.e., the fifth bandwidth authorization value); if Request 12 TokensFix 12 Then the OLT selects TokensFA. 12 and Request 12 The minimum value in, such as in Request 12 Therefore, the Request 12 As TCONT 12 The bandwidth license value is 52 (i.e., the fifth bandwidth license value).

[0205] Case 4: The token bucket queue encountered is a token bucket queue corresponding to non-guaranteed bandwidth, such as the second token bucket queue. The token buckets in the second token bucket queue are the second token buckets, and the TCONT corresponding to the second token bucket is the second TCONT. The second TCONT, the fourth TCONT, and the third TCONT can be the same or different.

[0206] If the token bucket queue encountered is the second token bucket queue corresponding to non-guaranteed bandwidth, the OLT can calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT; calculate the proportion of the bandwidth sum of each second TCONT in the bandwidth sum of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum is the sum of fixed bandwidth and guaranteed bandwidth; calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth to obtain the second allocable bandwidth corresponding to each second TCONT; and determine the second bandwidth authorization value of each second TCONT by the minimum value among the number of tokens included in the second token bucket, the third requested bandwidth, and the second allocable bandwidth in the second token bucket corresponding to each second TCONT.

[0207] In this embodiment, the first requested bandwidth is the bandwidth originally requested by the TCONT. The TCONT can report the first requested bandwidth to the OLT via a DBA report. The third requested bandwidth is the remaining unauthorized requested bandwidth of the TCONT. The second TCONT can correspond to not only non-guaranteed bandwidth but also guaranteed bandwidth and other bandwidths. Therefore, before allocating guaranteed bandwidth to the second TCONT, a bandwidth authorization value may have already been allocated to it. The remaining bandwidth is the total allocable bandwidth for one bandwidth allocation cycle minus the allocated bandwidth authorization value.

[0208] For example, a second TCONT also corresponds to a guaranteed bandwidth. The token bucket corresponding to the second TCONT is included in the fourth token bucket queue, which means that the second TCONT is also a fourth TCONT. Since the priority of the fourth token bucket queue is higher than that of the second token bucket queue, the OLT first traverses to the fourth token bucket queue and allocates a fourth bandwidth authorization value to the second TCONT. Then it traverses to the second token bucket queue and calculates the difference between the first requested bandwidth and the fourth bandwidth authorization value of the second TCONT to obtain the third requested bandwidth of the second TCONT.

[0209] For each second TCONT, the OLT calculates the difference between the first requested bandwidth and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of the second TCONT; it calculates the proportion of the bandwidth sum of the second TCONT in the bandwidth sum of all second TCONTs to obtain the bandwidth proportion of the second TCONT, i.e., the second bandwidth proportion; it calculates the product of the second bandwidth proportion of the second TCONT and the remaining bandwidth to obtain the allocable bandwidth corresponding to the second TCONT, i.e., the second allocable bandwidth; it determines the minimum value among the number of tokens in the second token bucket corresponding to the second TCONT, the third requested bandwidth corresponding to the second TCONT, and the second allocable bandwidth corresponding to the second TCONT, and determines this minimum value as the non-guaranteed bandwidth authorization value of the second TCONT, i.e., the second bandwidth authorization value. The allocation of the second bandwidth authorization value can be expressed as:

[0210] Request_4 i =Request_1 i -GrantSize_1 i -GrantSize_2 i ;

[0211] R NA i =Remainband × sum i / SUM;

[0212] GrantSize_4 i =min(R) NA i TokensNA i Request_4 i );

[0213] Among them, GrantSize_1 i This indicates that it is already TCONT i The allocated bandwidth grant value, such as the third bandwidth grant value, GrantSize_2 i This indicates that it is already TCONT i The allocated bandwidth grant value, such as the fourth bandwidth grant value, GrantSize_4 i TCONT i The second bandwidth authorization value, Request_1 i TCONT i The first request bandwidth, Request_4 i TCONT i The third request bandwidth, R NA i TCONT iThe second allocatable bandwidth, Remainband is the remaining bandwidth, sum i TCONT i SUM represents the sum of the fixed and guaranteed bandwidths of all second TCONTs. TokensNA i For TCONT i The corresponding number of tokens included in the second token bucket.

[0214] Still with Figure 2 Let's take an example. After the OLT allocates bandwidth authorization values ​​to the TCONT corresponding to each token bucket in token bucket queues T1 and T2, it iterates through token bucket queue T3 (i.e., the second token bucket queue). Token bucket queue T3 includes TCONT... 31 TCONT 12 TCONT 33 ..., TCONT 3N3 The corresponding N3 token buckets (i.e., the second token bucket).

[0215] For TCONT 31 OLT did not give TCONT 31 Allocate bandwidth authorization value, TCONT 21 The first request bandwidth is Request 31 TCONT 31 The corresponding token bucket contains TokensNA. 31 OLT can calculate TCONT 31 Third request bandwidth Request 31 -0, meaning Request 31 And calculate TCONT 31 The corresponding allocatable bandwidth R NA 31 =Remainband × sum 31 / SUM, select R NA 31 Request 31 and TokensNA 31 The minimum value in, such as in Request 31 Therefore, the Request 31 As TCONT 31 The bandwidth license value is 31 (i.e., the second bandwidth license value).

[0216] For TCONT 12 OLT has become TCONT 12 The third bandwidth authorization value TokensFix was allocated. 12And the fourth bandwidth authorization value TokensAss 12 TCONT 12 The first request bandwidth is Request 12 TCONT 12 The corresponding second token bucket contains TokensNA. 12 .

[0217] OLT can calculate TCONT 12 Third request bandwidth (Request) 12 -TokensFix 12 -TokensAss 12 ), and calculate TCONT 12 The corresponding allocatable bandwidth R NA 12 =Remainband × sum 12 / SUM, select R NA 12 、(Request 12 -TokensFix 12 -TokensAss 12 ) and TokensNA 12 The minimum value in, such as R NA 12 , and thus R NA 12 As TCONT 12 The bandwidth license value is 32 (i.e., the second bandwidth license value).

[0218] For TCONT 3N3 OLT did not give TCONT 3N3 Allocate bandwidth authorization value, TCONT 3N3 The first request bandwidth is Request 3N3 TCONT 3N3 The corresponding token bucket contains TokensNA. 3N3 OLT can calculate TCONT 3N3 Third request bandwidth Request 3N3 -0, meaning Request 3N3 And calculate TCONT 3N3 The corresponding allocatable bandwidth R NA3N3 =Remainband × sum 3N3 / SUM, select R NA NA3N3 Request 3N3 and TokensNA 3N3 The minimum value in, such as in Request3N3 Therefore, the Request 3N3 As TCONT 3N3 The bandwidth license value is 3N3 (i.e., the second bandwidth license value).

[0219] In this embodiment of the application, if the token bucket queue traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, the OLT may also disregard the second bandwidth proportion. That is, if the token bucket queue traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, the OLT can calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT; the minimum value between the number of tokens included in the second token bucket corresponding to each second TCONT and the third requested bandwidth is determined as the second bandwidth authorization value of each second TCONT.

[0220] In some embodiments, after allocating a second bandwidth grant value to each second TCONT, the OLT can also traverse each second TCONT in descending order of bandwidth growth rate; increase the second bandwidth grant value of the traversed second TCONT by a second preset percentage bandwidth grant value to obtain a new second bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate.

[0221] In this embodiment, the preset growth rate can be set according to actual needs, and the second preset percentage can also be set according to actual needs, such as 5%, 10%, etc. After allocating the second bandwidth authorization value to all second TCONTs, for each second TCONT, the OLT can compare the actual bandwidth used by the second TCONT in the current bandwidth allocation cycle (i.e., the first requested bandwidth) with the actual bandwidth used in the previous bandwidth allocation cycle to obtain the bandwidth growth rate of the second TCONT. The OLT iterates through the second TCONTs in descending order of bandwidth growth rate.

[0222] If the bandwidth growth rate of the second TCONT encountered during the traversal is greater than or equal to the preset growth rate, and there is remaining bandwidth, the OLT will increase the second bandwidth license value of the encountered second TCONT by a second preset percentage, resulting in a new second bandwidth license value. The OLT can then update the second bandwidth license value of the currently encountered second TCONT in the license table to the new second bandwidth license value.

[0223] If the bandwidth growth rate of the second TCONT encountered during the traversal is less than the preset growth rate, or if the remaining bandwidth is empty, the OLT stops traversing the second TCONT and ends the bandwidth allocation for the second TCONT.

[0224] In this embodiment, the OLT can monitor the bandwidth request status of TCONTs in real time, such as requested bandwidth and bandwidth growth rate. Based on the real-time bandwidth request status, it dynamically adjusts the bandwidth authorization value. This effectively addresses packet loss caused by short-term traffic surges and improves short-term bandwidth utilization. During long-term bandwidth allocation, the OLT uses the token bucket of TCONTs with high short-term bandwidth growth rates to compensate for the token bucket of TCONTs with low short-term bandwidth growth rates, ensuring long-term bandwidth allocation and improving the service quality of network resources.

[0225] In this embodiment, the priority of non-guaranteed bandwidth can be lower than that of guaranteed bandwidth. Specifically, the priority of the second token bucket queue corresponding to non-guaranteed bandwidth is lower than that of the fourth token bucket queue corresponding to guaranteed bandwidth, or the priority of the second token bucket queue is lower than that of the fifth token bucket queue. After allocating bandwidth to each TCONT corresponding to the second token bucket queue, if there is still remaining bandwidth, bandwidth will continue to be allocated to each TCONT corresponding to the second token bucket queue. Non-guaranteed bandwidth refers to the maximum additional bandwidth a user can use. Bandwidth allocation is performed based on the proportion of the sum of the fixed bandwidth and guaranteed bandwidth of each TCONT in the second token bucket queue, according to the following formula: first, the proportion of remaining bandwidth is calculated; then, the bandwidth authorization value is allocated based on the number of tokens in the token bucket.

[0226] R NA i / (R F i +R A i ) = R NA j / (R F j +R A j );

[0227] Among them, R NA i TCONT i The second allocatable bandwidth, R F i TCONT i Fixed bandwidth, R A i TCONT i Guaranteed bandwidth, R NA j TCONT j The second allocatable bandwidth, R F j TCONT j Fixed bandwidth, R A jTCONT j Guaranteed bandwidth.

[0228] Based on the above proportional relationship, the OLT can determine the allocatable bandwidth R of each TCONT when allocating non-guaranteed bandwidth. NA i =Remainband × sum i / SUM.

[0229] Case 5: The token bucket queue encountered is the token bucket queue corresponding to the best-effort bandwidth, such as the first token bucket queue. The token buckets in the first token bucket queue are the first token buckets, and the TCONT corresponding to the first token bucket is the first TCONT. The first TCONT, the fourth TCONT, and the third TCONT can be the same or different.

[0230] In this embodiment, if the token bucket queue traversed is the first token bucket queue corresponding to the best-effort bandwidth, the OLT can allocate a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket and the first requested bandwidth of the first TCONT corresponding to each first token bucket. For example, the OLT can calculate the difference between the first requested bandwidth of the first TCONT corresponding to each first token bucket and the bandwidth authorization value already allocated to the first TCONT to obtain the second requested bandwidth of each first TCONT; calculate the proportion of the allocation weight of each first TCONT in the allocation weight of all first TCONTs to obtain the first bandwidth proportion of each first TCONT; calculate the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth to obtain the first allocable bandwidth corresponding to each first TCONT; and determine the first bandwidth authorization value of each first TCONT by the minimum value among the number of tokens included in the first token bucket, the second requested bandwidth, and the first allocable bandwidth.

[0231] In this embodiment, the first token bucket queue may include multiple token bucket sub-queues. If the token bucket queue being traversed is the first token bucket queue corresponding to the best-effort bandwidth, the OLT can traverse the multiple token bucket queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue; based on the number of tokens included in each first token bucket in the traversed token bucket queues and the first requested bandwidth of the first TCONT corresponding to each first token bucket, a first bandwidth authorization value is allocated to each first TCONT until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed.

[0232] In some embodiments, the above-mentioned allocation of a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket can be as follows: calculate the difference between the first requested bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket queue and the bandwidth authorization value already allocated to the first TCONT to obtain the second requested bandwidth of each first TCONT; calculate the proportion of the allocation weight of each first TCONT in the allocation weight of all first TCONTs in the traversed token bucket queue to obtain the first bandwidth proportion of each first TCONT; calculate the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth to obtain the first allocable bandwidth corresponding to each first TCONT; and determine the first bandwidth authorization value of each first TCONT by the minimum value among the number of tokens included in the first token bucket, the second requested bandwidth, and the first allocable bandwidth of the first TCONT.

[0233] In this embodiment, the first requested bandwidth is the bandwidth originally requested by the TCONT. The TCONT can report the first requested bandwidth to the OLT via a DBA report. The second requested bandwidth is the remaining unauthorized requested bandwidth of the TCONT. Besides the best-effort bandwidth, the first TCONT can also correspond to fixed bandwidth, guaranteed bandwidth, and other bandwidths. Therefore, before allocating best-effort bandwidth to the first TCONT, a bandwidth authorization value may have already been allocated to it.

[0234] For example, a first TCONT also corresponds to a guaranteed bandwidth. The fourth token bucket queue includes the token bucket corresponding to the first TCONT, meaning that the first TCONT is also a fourth TCONT. Since the priority of the fourth token bucket queue is higher than that of the first token bucket queue, the OLT first traverses to the fourth token bucket queue and allocates a fourth bandwidth authorization value to the first TCONT. Then, it traverses to the first token bucket queue and calculates the difference between the first requested bandwidth and the fourth bandwidth authorization value of the first TCONT to obtain the second requested bandwidth of the first TCONT.

[0235] For each first token bucket corresponding to a first TCONT in the traversed token bucket subqueue, the OLT calculates the difference between the first requested bandwidth of the first TCONT and the bandwidth authorization value already allocated to the first TCONT, obtaining the second requested bandwidth of each first TCONT; it calculates the proportion of the allocation weight of the first TCONT in the allocation weight of all first TCONTs in the currently traversed token bucket queue, obtaining the bandwidth proportion of the first TCONT, i.e., the first bandwidth proportion; it calculates the product of the first bandwidth proportion of the first TCONT and the remaining bandwidth, obtaining the allocable bandwidth corresponding to the bandwidth proportion first TCONT, i.e., the first allocable bandwidth; it determines the minimum value among the number of tokens in the first token bucket corresponding to the first TCONT, the second requested bandwidth corresponding to the first TCONT, and the first allocable bandwidth corresponding to the first TCONT, and uses this minimum value as the best-effort bandwidth authorization value of the first TCONT, the first bandwidth authorization value. The allocation of the first bandwidth authorization value can be expressed as:

[0236] Request_3 i =Request_1 i -GrantSize_1 i -GrantSize_2 i ;

[0237] R BE i =Remainband × W i / W SUM ;

[0238] GrantSize_3 i =min(R) BE i TokensBE i Request_3 i );

[0239] Among them, GrantSize_1 i This indicates that it is already TCONT i The allocated bandwidth grant value, such as the third bandwidth grant value, GrantSize_2 i This indicates that it is already TCONT i The allocated bandwidth grant value, such as the fourth bandwidth grant value, GrantSize_3 i TCONT i The first bandwidth authorization value, Request_1 i TCONT i The first request bandwidth, Request_3 i TCONT i The second requested bandwidth, RBE i TCONT i The first allocable bandwidth, Remainband is the remaining bandwidth, W i TCONT i The allocation weight, W i The size can be set through the weight in the TCONT bandwidth template (4) above, W SUM TokensBE represents the sum of the allocation weights of all first TCONTs in the currently traversed token bucket queue. i For TCONT i The number of tokens included in the corresponding first token bucket.

[0240] Still with Figure 2 Let's take an example. After the OLT allocates bandwidth authorization values ​​to the TCONT corresponding to each token bucket in token bucket queues T1, T2, and T3, it iterates through token bucket queue T4 (i.e., the first token bucket queue). Token bucket queue T4 includes TCONT... 11 TCONT 42 ..., TCONT 4N4 The corresponding N4 token buckets (i.e., the first token bucket). The token bucket queue T4 includes multiple token bucket sub-queues, such as token bucket sub-queue T41{TCONT 11 The corresponding token bucket, TCONT 42 The corresponding token bucket, TCONT 43 The corresponding token bucket}, token bucket sub-queue T42{TCONT 44 The corresponding token bucket, TCONT 45 The corresponding token bucket, TCONT 46 The corresponding token buckets, etc. Token bucket sub-queue T41 has a higher priority than token bucket queue T42, and token bucket queue T42 has a higher priority than other token bucket queues.

[0241] OLT first iterates to the token bucket queue T41. When iterating to the token bucket queue T41, the token bucket queue T41{TCONT 11 The corresponding token bucket, TCONT 42 The corresponding token bucket, TCONT 43 The corresponding token bucket}.

[0242] For TCONT 11 OLT has become TCONT 11 The third bandwidth authorization value TokensFix was allocated. 11 TCONT 11 The first request bandwidth is Request11 TCONT 11 The corresponding first token bucket contains TokensBE. 11 OLT can calculate TCONT 11 The second request bandwidth (Request) 11 -TokensFix 11 ), and calculate TCONT 11 The corresponding allocatable bandwidth R BE 11 =Remainband × W 11 / W SUM Choose R BE 11 、(Request 11 -TokensFix 11 ) and TokensBE 11 The minimum value in, such as TokensBE 11 Therefore, TokensBE 11 As TCONT 11 The bandwidth license value is 41 (i.e., the first bandwidth license value).

[0243] For TCONT 42 OLT did not give TCONT 42 Allocate bandwidth authorization value, TCONT 42 The first request bandwidth is Request 42 TCONT 42 The corresponding first token bucket contains TokensBE. 42 OLT can calculate TCONT 42 The second request bandwidth (Request) 42 -0), i.e., Request 42 Calculate TCONT 42 The corresponding allocatable bandwidth R BE 42 =Remainband × W 42 / W SUM Choose R BE 42 Request 42 and TokensBE 42 The minimum value in, such as TokensBE 42 Therefore, TokensBE 42 As TCONT 42 The bandwidth license value is 42 (i.e., the first bandwidth license value).

[0244] Similarly, the OLT determines TCONT.43 The bandwidth license value is 43 (i.e., the first bandwidth license value).

[0245] At this point, bandwidth allocation for all TCONTs corresponding to the token buckets included in token bucket sub-queue T41 is complete. If there is remaining bandwidth, the process continues traversing token bucket sub-queue T42. The bandwidth allocation process for TCONTs corresponding to the token buckets included in token bucket sub-queue T42 is similar to that for TCONTs corresponding to the token buckets included in token bucket sub-queue T41, and will not be repeated here. If the remaining bandwidth is empty, the process stops traversing token bucket sub-queue T42.

[0246] In this embodiment of the application, when the token bucket queue traversed is the first token bucket queue corresponding to the best-effort bandwidth, the OLT may also disregard the first bandwidth proportion. That is, the above-mentioned allocation of a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket can be: calculating the difference between the first requested bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket queue and the bandwidth authorization value already allocated to the first TCONT to obtain the second requested bandwidth of each first TCONT; calculating the product of the allocation weight of each first TCONT and the remaining bandwidth to obtain the first allocable bandwidth corresponding to each first TCONT; and determining the minimum value among the number of tokens included in the first token bucket corresponding to each first TCONT, the second requested bandwidth, and the first allocable bandwidth as the first bandwidth authorization value of each first TCONT.

[0247] In some embodiments, after allocating a first bandwidth grant value to each first TCONT, the OLT can also traverse the first TCONTs corresponding to each first token bucket in the target token bucket queue in descending order of the bandwidth growth rate of the first TCONTs, where the target token bucket queue is the token bucket queue currently being traversed; increase the first bandwidth grant value of the traversed first TCONT by a first preset percentage bandwidth grant value to obtain a new first bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed first TCONT is less than the preset growth rate.

[0248] In this embodiment, the preset growth rate can be set according to actual needs, and the first preset percentage can also be set according to actual needs, such as 5%, 10%, etc. After allocating the first bandwidth authorization value to all first TCONTs corresponding to the current token sub-queue, for each first TCONT corresponding to the current token sub-queue, the OLT can compare the actual bandwidth used by the first TCONT in the current bandwidth allocation cycle (i.e., the first requested bandwidth) with the actual bandwidth used in the previous bandwidth allocation cycle to obtain the bandwidth growth rate of the first TCONT. The OLT traverses the first TCONTs corresponding to the current token sub-queue in descending order of bandwidth growth rate.

[0249] If the bandwidth growth rate of the first TCONT encountered during the iteration is greater than or equal to the preset growth rate, and there is remaining bandwidth, the OLT increases the first bandwidth license value of the first TCONT encountered during the iteration by a first preset percentage, resulting in a new first bandwidth license value. The OLT can update the first bandwidth license value of the currently encountered first TCONT in the license table to the new first bandwidth license value. If the bandwidth growth rate of the first TCONT encountered during the iteration is less than the preset growth rate, or the remaining bandwidth is empty, the OLT stops iterating over the first TCONT and ends the bandwidth allocation for the first TCONT.

[0250] Using a token bucket subqueue T41{TCONT 11 The corresponding token bucket, TCONT 42 The corresponding token bucket, TCONT 43 The corresponding token bucket}, token bucket sub-queue T42{TCONT 44 The corresponding token bucket, TCONT 45 The corresponding token bucket, TCONT 46 The corresponding token bucket, with a first preset percentage of 5%, is used as an example. OLT is set to TCONT. 11 TCONT 42 TCONT 43 After allocating bandwidth license values ​​41 to 43, TCONT is traversed in descending order of bandwidth growth rate. 11 TCONT 42 TCONT 43 , with TCONT 11 Bandwidth growth rate > TCONT 42 Bandwidth growth rate > TCONT 43 For example, the OLT traverses to TCONT 11 If TCONT 11 If the bandwidth growth rate is less than the preset growth rate, or if the remaining bandwidth is empty, then there is no need to update the bandwidth authorization value 41, and traversal of TCONT should be stopped; if TCONT 11If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, then the bandwidth authorization value 41 will be updated to (1+5%) bandwidth authorization value 41.

[0251] Then, the OLT iterates to TCONT. 42 If TCONT 42 If the bandwidth growth rate is less than the preset growth rate, or if the remaining bandwidth is empty, then there is no need to update the bandwidth authorization value 42, and traversal of TCONT should be stopped; if TCONT 42 If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, then the bandwidth authorization value 42 will be updated to (1+5%) bandwidth authorization value 42.

[0252] Then, iterate through TCONT. 43 If TCONT 43 If the bandwidth growth rate is less than the preset growth rate, or if the remaining bandwidth is empty, then there is no need to update the bandwidth authorization value 43, and traversal of TCONT should be stopped; TCONT 423 If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, then the bandwidth authorization value 43 will be updated to (1+5%) bandwidth authorization value 43.

[0253] After the bandwidth authorization value 43 is updated, if there is still bandwidth remaining, the OLT will continue to allocate bandwidth to the TCONT corresponding to the token bucket queue T42. 44 TCONT 45 TCONT 46 The principle of bandwidth allocation is the same as that of bandwidth allocation for TCONT corresponding to token bucket sub-queue T41, so it will not be repeated here.

[0254] In this embodiment, the OLT can monitor the bandwidth request status of TCONTs in real time, such as requested bandwidth and bandwidth growth rate. Based on the real-time bandwidth request status, it dynamically adjusts the bandwidth authorization value. This effectively addresses packet loss caused by short-term traffic surges and improves short-term bandwidth utilization. During long-term bandwidth allocation, the OLT uses the token bucket of TCONTs with high short-term bandwidth growth rates to compensate for the token bucket of TCONTs with low short-term bandwidth growth rates, ensuring long-term bandwidth allocation and improving the service quality of network resources.

[0255] In this embodiment, the priority of best-effort bandwidth can be lower than the priority of non-guaranteed bandwidth; that is, the priority of the first token bucket queue corresponding to best-effort bandwidth is lower than the priority of the second token bucket queue corresponding to non-guaranteed bandwidth. After allocating bandwidth to each TCONT corresponding to the fourth token bucket queue, if there is still remaining bandwidth, bandwidth will continue to be allocated to each TCONT corresponding to the first token bucket queue.

[0256] Best-effort bandwidth refers to the maximum bandwidth allocated to a TCONT when no high-priority service uses that bandwidth. The OLT can schedule bandwidth based on the priority and weight in the TCONT bandwidth template (4), that is, sorting the token buckets in the first token bucket queue corresponding to the best-effort bandwidth according to priority, and allocating bandwidth to token buckets in sub-queues of the same priority according to weight, where priority and weight are user-configured parameters. The proportion of remaining bandwidth occupied by each TCONT in the token bucket queues of the same priority is shown in the following formula.

[0257] R BE i / W i =R BE j / W j ;

[0258] Among them, R BE i TCONT i The first allocatable bandwidth, R BE j TCONT j The first allocatable bandwidth, W i TCONT i The weights (i.e., the assigned weights), W j TCONT j The weights (i.e., the weight allocation).

[0259] Based on the above proportional relationship, the OLT can determine the allocatable bandwidth R of each TCONT when allocating best-effort bandwidth. BE i =Remainband × W i / W SUM .

[0260] The following is combined with Figure 7 The bandwidth allocation process shown illustrates the dynamic bandwidth allocation method provided in the embodiments of this application.

[0261] Step S701: The OLT checks whether the OMCI configuration has been updated.

[0262] In step S701, the OLT checks whether the bandwidth template parameters of each TCONT have been updated. If yes, such as if the bandwidth template parameters of one TCONT have been updated, it means that the OMCI configuration has been updated, and step S702 is executed. If no, that is, the bandwidth template parameters of each TCONT have not been updated, it means that the OMCI configuration has not been updated, and step S703 is executed.

[0263] In step S702, the OLT generates the token bucket corresponding to the updated bandwidth template parameters of the TCONT. Then, step S703 is executed.

[0264] If the bandwidth template parameter of a TCONT is updated, the OLT will update the token bucket corresponding to that TCONT.

[0265] In step S703, the OLT determines whether it is the last token bucket.

[0266] In step S703, the OLT traverses the token bucket queue in descending order of priority and determines whether it is the last token bucket, that is, whether it is the last TCONT to be allocated bandwidth.

[0267] If it is not the last token bucket, that is, not the last TCONT to be allocated bandwidth, then proceed to step S704; if it is the last token bucket, that is, the last TCONT to be allocated bandwidth, then proceed to step S707.

[0268] The OLT can traverse the token bucket queue based on cases 1, 2, 4, and 5 in step S102 above, or it can traverse the token bucket queue based on cases 3 to 5 in step S102 above. Traversing the token bucket queue based on cases 3 to 5 in step S102 above can reduce the number of traversals, shorten the traversal time, and thus traverse more TCONTs within a fixed scheduling period, increasing the TCONT specifications supported by the OLT and reducing the latency of ONU sending uplink data.

[0269] Step S704: The OLT obtains the requested bandwidth from the TCONT.

[0270] In step S704, the OLT obtains the requested bandwidth of the TCONT corresponding to the token bucket in the traversed token bucket queue.

[0271] Step S705: The OLT executes the bandwidth allocation algorithm.

[0272] In step S705, the OLT can use the above step S102 to subdivide case 1, case 2, case 4 and case 5 (or case 3 to case 5) to allocate bandwidth to the TCONT.

[0273] In step S706, the OLT determines whether there is remaining bandwidth. If there is remaining bandwidth, it returns to step S703 and continues to traverse the token bucket queue; if there is no remaining bandwidth, it proceeds to step S707.

[0274] Step S707: The OLT generates a bandwidth authorization table.

[0275] In this embodiment, the OLT may allocate multiple bandwidth grant values ​​to a TCONT. For example, for a TCONT that uses non-guaranteed bandwidth for data transmission, the OLT may allocate a fourth bandwidth grant value and a second bandwidth grant value to the TCONT. In the bandwidth grant table, the bandwidth grant value of a TCONT is the sum of the multiple bandwidth grant values ​​allocated to the TCONT by the OLT.

[0276] In step S708, the OLT determines whether the timer interrupt flag is set; if not, it continues to execute step S708; if yes, it executes step S709.

[0277] In step S709, the OLT generates a bandwidth mapping (BWmap) and distributes the BWmap.

[0278] In the technical solution provided in this application embodiment, the OLT pre-sets token bucket queues with multiple priorities. Each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens included in a token bucket represents the configured bandwidth of the corresponding TCONT. During each bandwidth allocation cycle, the OLT traverses the token bucket queues in descending order of priority, prioritizing the allocation of bandwidth to TCONTs corresponding to higher-priority token buckets. This ensures high-priority bandwidth requirements are met and guarantees fair bandwidth resource acquisition for all TCONTs over a long period. Furthermore, during each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values ​​to TCONTs based on the number of tokens included in the token bucket, generate bandwidth mappings, and send them to the ONU. In this application embodiment, the OLT utilizes token buckets to pre-set the configured bandwidth for each TCONT. When dynamically allocating bandwidth to TCONTs, there is no need to repeatedly calculate the configured bandwidth, reducing the workload during bandwidth allocation and simplifying the implementation. This, in turn, reduces the latency of dynamic bandwidth allocation and lowers the latency of the ONU sending uplink data.

[0279] Corresponding to the above-described dynamic bandwidth allocation method, this application also provides a dynamic bandwidth allocation device, such as... Figure 8 As shown, an OLT applied in a passive optical network is described. The OLT has multiple token bucket queues, each with a priority level. Each token bucket in each queue corresponds to a transport container (TCONT). The number of tokens in each token bucket indicates the configured bandwidth. The device includes:

[0280] Traversal module 801 is used to traverse multiple token bucket queues in descending order of priority within each bandwidth allocation cycle.

[0281] The allocation module 802 is used to allocate bandwidth authorization values ​​to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue, until the remaining bandwidth is empty, or multiple token bucket queues have been traversed.

[0282] The generation module 803 is used to generate a bandwidth map using the bandwidth grant value allocated to each TCONT;

[0283] The distribution module 804 is used to distribute bandwidth mappings to ONUs in the passive optical network.

[0284] In the technical solution provided in this application embodiment, the OLT pre-configures token bucket queues with multiple priorities. Each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens in a token bucket represents the configured bandwidth of the corresponding TCONT. During each bandwidth allocation cycle, the OLT traverses the token bucket queues in descending order of priority, prioritizing the allocation of bandwidth to TCONTs corresponding to higher-priority token buckets. This ensures that high-priority bandwidth demands are met and that all TCONTs have fair access to bandwidth resources over a long period.

[0285] Furthermore, within each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values ​​to TCONTs based on the number of tokens included in the token bucket, generate bandwidth mappings, and send them to the ONU. In this embodiment, the OLT utilizes the token bucket to pre-set the configuration bandwidth for each TCONT. When dynamically allocating bandwidth to TCONTs, there is no need to repeatedly calculate the configuration bandwidth, reducing the workload during bandwidth allocation and simplifying the implementation. This, in turn, reduces the latency of dynamic bandwidth allocation and lowers the latency of ONU sending uplink data.

[0286] In some embodiments, the allocation module 802 may be specifically used to: if the token bucket queue traversed is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue, with each token bucket queue corresponding to a priority; allocate a first bandwidth authorization value to each first TCONT according to the number of tokens included in each first token bucket in the traversed token bucket queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket, until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed.

[0287] In some embodiments, the allocation module 802 may be specifically used to: calculate the difference between the first requested bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket sub-queue and the bandwidth authorization value already allocated to the first TCONT, to obtain the second requested bandwidth of each first TCONT; calculate the proportion of the allocation weight of each first TCONT in the allocation weight of all first TCONTs in the traversed token bucket queue, to obtain the first bandwidth proportion of each first TCONT; calculate the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth, to obtain the first allocable bandwidth corresponding to each first TCONT; and determine the first bandwidth authorization value of each first TCONT by the minimum value among the number of tokens, the second requested bandwidth, and the first allocable bandwidth included in the first token bucket corresponding to each first TCONT.

[0288] In some embodiments, the allocation module 802 can also be used to: after allocating a first bandwidth authorization value to each first TCONT, traverse the first TCONTs corresponding to each first token bucket in the target token bucket queue in descending order of the bandwidth growth rate of the first TCONTs, where the target token bucket queue is the token bucket queue currently being traversed; increase the first bandwidth authorization value of the traversed first TCONT by a first preset percentage bandwidth authorization value to obtain a new first bandwidth authorization value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed first TCONT is less than the preset growth rate.

[0289] In some embodiments, the allocation module 802 may be specifically used to: if the token bucket queue traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT, where the second token bucket is the token bucket in the second token bucket queue; calculate the proportion of the bandwidth sum value of each second TCONT in the bandwidth sum value of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum value is the sum of fixed bandwidth and guaranteed bandwidth; calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth to obtain the second allocable bandwidth corresponding to each second TCONT; and determine the second bandwidth authorization value of each second TCONT by the minimum value among the number of tokens included in the second token bucket corresponding to each second TCONT, the third requested bandwidth, and the second allocable bandwidth.

[0290] In some embodiments, the allocation module 802 can also be used to: after allocating a second bandwidth grant value to each second TCONT, traverse each second TCONT in descending order of bandwidth growth rate; increase the second bandwidth grant value of the traversed second TCONT by a second preset percentage bandwidth grant value to obtain a new second bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate.

[0291] In some embodiments, the allocation module 802 may be specifically used for:

[0292] If the token bucket queue that is traversed is the third token bucket queue corresponding to the fixed bandwidth, then the number of tokens included in each third token bucket is determined as the third bandwidth authorization value of the third TCONT corresponding to each third token bucket, and the third token bucket is the token bucket in the third token bucket queue.

[0293] If the token bucket queue encountered is the fourth token bucket queue corresponding to the guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value already allocated to the fourth TCONT to obtain the fourth requested bandwidth of each fourth TCONT. The fourth token bucket is the token bucket in the fourth token bucket queue. The minimum value between the number of tokens included in the fourth token bucket corresponding to each fourth TCONT and the fourth requested bandwidth is determined as the fourth bandwidth authorization value of each fourth TCONT.

[0294] Alternatively, allocation module 802 can be used specifically for:

[0295] If the token bucket queue traversed is the fifth token bucket queue corresponding to fixed bandwidth and guaranteed bandwidth, then calculate the sum of the number of tokens in the third token bucket and the fourth token bucket corresponding to each fifth TCONT in the fifth token bucket queue, and obtain the number of fifth tokens corresponding to each fifth TCONT. The configured bandwidth indicated by the third token bucket is the fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is the guaranteed bandwidth.

[0296] If the first request bandwidth of each fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to each fifth TCONT, then the number of tokens included in the third token bucket corresponding to each fifth TCONT is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0297] If the first requested bandwidth of each fifth TCONT is greater than the number of tokens in the third token bucket corresponding to each fifth TCONT, then the minimum value between the number of fifth tokens corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0298] In some embodiments, the above-described dynamic bandwidth allocation device may further include:

[0299] The judgment module is used to determine whether the bandwidth template parameters of each TCONT have been updated before traversing multiple token bucket queues in descending order of bandwidth priority, and to obtain the judgment result. The bandwidth template parameters of each TCONT include the configured bandwidth of that TCONT.

[0300] The adjustment module is used to adjust the token bucket corresponding to the target TCONT according to the target configured bandwidth and bandwidth allocation period duration included in the target bandwidth template parameters if the judgment result indicates that the target bandwidth template parameters of the target TCONT have been updated.

[0301] In some embodiments, the target configured bandwidth includes fixed bandwidth, guaranteed bandwidth, non-guaranteed maximum bandwidth, and / or best-effort bandwidth; the adjustment module may specifically be used for:

[0302] Adjust the number of tokens in the third token bucket corresponding to the target TCONT to the number of tokens in the first token bucket. The number of tokens in the first token bucket is the product of the fixed bandwidth and the bandwidth allocation period. The third token bucket corresponds to the fixed bandwidth.

[0303] Adjust the number of tokens in the fourth token bucket corresponding to the target TCONT to the number of tokens in the second token bucket. The number of tokens in the second token bucket is the product of the guaranteed bandwidth and the bandwidth allocation period duration. The fourth token bucket corresponds to the guaranteed bandwidth.

[0304] Adjust the number of tokens in the first token bucket corresponding to the target TCONT to the number of third tokens. The number of third tokens is the product of the best-effort bandwidth and the bandwidth allocation period duration. The first token bucket corresponds to the best-effort bandwidth; and / or,

[0305] Calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth to obtain the non-guaranteed bandwidth; adjust the number of tokens in the second token bucket corresponding to the target TCONT to the fourth token number, which is the product of the non-guaranteed bandwidth and the bandwidth allocation period duration. The second token bucket corresponds to the non-guaranteed bandwidth.

[0306] In some embodiments, the above-described dynamic bandwidth allocation device may further include:

[0307] The interrupt module is used to generate a timed interrupt signal for each bandwidth allocation cycle.

[0308] The generation module is specifically used to generate a bandwidth mapping by using the bandwidth authorization value allocated to each TCONT when a timer interrupt signal is detected.

[0309] Corresponding to the aforementioned dynamic bandwidth allocation, this application also provides an OLT, such as... Figure 9As shown, it includes a first processor 901 and a logic chip 902; the first processor 901 is configured with multiple token bucket queues, each token bucket in each token bucket queue corresponds to a TCONT, and the number of tokens in the token bucket indicates the configured bandwidth;

[0310] The first processor 901 is used to traverse multiple token bucket queues in descending order of priority during each bandwidth allocation cycle; allocate bandwidth authorization values ​​to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queues, until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed; and send the bandwidth authorization values ​​allocated to each TCONT to the logic chip 902.

[0311] The logic chip 902 is used to generate a bandwidth map using the bandwidth grant value allocated to each TCONT; and to distribute the bandwidth map to the ONU in the passive optical network.

[0312] In the technical solution provided in this application embodiment, the OLT pre-configures token bucket queues with multiple priorities. Each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens in a token bucket represents the configured bandwidth of the corresponding TCONT. During each bandwidth allocation cycle, the OLT traverses the token bucket queues in descending order of priority, prioritizing the allocation of bandwidth to TCONTs corresponding to higher-priority token buckets. This ensures that high-priority bandwidth demands are met and that all TCONTs have fair access to bandwidth resources over a long period.

[0313] Furthermore, within each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values ​​to TCONTs based on the number of tokens included in the token bucket, generate bandwidth mappings, and send them to the ONU. In this embodiment, the OLT utilizes the token bucket to pre-set the configuration bandwidth for each TCONT. When dynamically allocating bandwidth to TCONTs, there is no need to repeatedly calculate the configuration bandwidth, reducing the workload during bandwidth allocation and simplifying the implementation. This, in turn, reduces the latency of dynamic bandwidth allocation and lowers the latency of ONU sending uplink data.

[0314] In this embodiment, the first processor 901 can be a real-time processor used to perform real-time bandwidth allocation. The logic chip 902 can be a field-programmable gate array (FPGA) used to perform the reporting of remaining cache (dbru) (i.e., the reporting of DBA reports) and the packaging and distribution of BWmap.

[0315] In some embodiments, such as Figure 10 As shown, the OLT may also include a second processor 903;

[0316] The second processor 903 is used to obtain the bandwidth template parameters of each TCONT, including the configuration bandwidth corresponding to the bandwidth type used by each TCONT; and to send the bandwidth template parameters of each TCONT to the first processor.

[0317] The first processor 901 can also be used to determine whether the bandwidth template parameters of each TCONT have been updated and obtain the determination result. The bandwidth template parameters of each TCONT include the configured bandwidth of the TCONT. If the determination result indicates that the target bandwidth template parameters of the target TCONT have been updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and bandwidth allocation period included in the target bandwidth template parameters.

[0318] In this embodiment of the application, the second processor 903 can be a general-purpose processor used to perform OMCI configuration, i.e., TCONT bandwidth template configuration.

[0319] To meet the ever-increasing and evolving bandwidth demands of users, improve the performance and speed of dynamic bandwidth allocation in passive optical networks (PONs), and reduce the complexity of dynamic bandwidth allocation, the OLT can utilize a modular design, distributing the OLT's dynamic bandwidth allocation function modules across different processing chips, such as... Figure 11 As shown, the host computer module runs on a general-purpose processor (i.e., the second processor 903) and is implemented in software to complete the OMCI configuration, i.e., the TCONT bandwidth template configuration; the real-time bandwidth allocation module runs on a real-time processor (i.e., the first processor 901) and is implemented in software to complete the calculation of dynamic bandwidth allocation; the BWmap encapsulation module is implemented in FPGA hardware, reports the remaining cache of TCONT, encapsulates BWmap and sends it down to TCONT, improving the speed of reporting and distribution and reducing latency.

[0320] In this embodiment, OMCI configuration, dynamic bandwidth allocation calculation, and BWMap encapsulation are handled by dedicated processors and FPGAs respectively, which can effectively reduce the processing pressure of a single CPU. Furthermore, hardware modules with specific functions can be added or replaced as needed without replacing the entire system, making the system more flexible and scalable.

[0321] Real-time processors are used for dynamic bandwidth scheduling. They can collect and analyze network conditions in a timely manner and react to traffic changes within microseconds, ensuring the timeliness and accuracy of bandwidth allocation and optimizing user experience.

[0322] FPGAs, with their high programmability, allow for the adjustment and optimization of bandwidth mapping logic and strategies to adapt to different network environments and requirements.

[0323] By designing the dynamic bandwidth allocation function module in layers and implementing it with dedicated hardware and processors, the processing load of dynamic bandwidth allocation is reduced, which can significantly improve the efficiency and performance of the system, reduce the complexity and latency of the dynamic bandwidth allocation algorithm, and provide greater flexibility and scalability.

[0324] Based on the hierarchical design of the dynamic bandwidth allocation functional modules described above, the dynamic bandwidth allocation process can be found in [reference needed]. Figure 12 As shown, the user sends the TCONT bandwidth template parameters to the real-time bandwidth allocation module through the OMCI configuration module (i.e., the host computer module). The real-time bandwidth allocation module, based on the TCONT bandwidth template parameters and a fixed bandwidth allocation period, allocates a corresponding token bucket for each TCONT, constructs a priority token bucket queue, performs bandwidth allocation, and sends the bandwidth authorization table to the BWmap encapsulation module.

[0325] In this embodiment, the real-time bandwidth allocation module determines the latency and scheduling accuracy of the entire system. To improve the performance of the real-time bandwidth allocation system, this embodiment utilizes a fixed interrupt cycle to pre-generate token buckets corresponding to each TCONT, and classifies and sorts them according to service priority to obtain multiple token bucket queues, reducing the execution tasks of real-time bandwidth allocation. Simultaneously, a timed interrupt triggers dynamic bandwidth allocation during the interrupt cycle; that is, when a timed interrupt signal is detected, the bandwidth authorization table is sent to the BWmap encapsulation module, ensuring the time accuracy of the bandwidth authorization values.

[0326] The aforementioned interruption period is the bandwidth allocation period, which can be set by the user at the initial stage of the device.

[0327] In some embodiments, the first processor 901 may be specifically configured to: if the token bucket queue traversed is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue, with each token bucket queue corresponding to a priority; allocate a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket in the traversed token bucket queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket, until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed.

[0328] In some embodiments, the first processor 901 may be specifically configured to: calculate the difference between the first requested bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket sub-queue and the bandwidth authorization value already allocated to the first TCONT, to obtain the second requested bandwidth of each first TCONT; calculate the proportion of the allocation weight of each first TCONT in the allocation weight of all first TCONTs in the traversed token bucket queue, to obtain the first bandwidth proportion of each first TCONT; calculate the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth, to obtain the first allocable bandwidth corresponding to each first TCONT; and determine the first bandwidth authorization value of each first TCONT by the minimum value among the number of tokens, the second requested bandwidth, and the first allocable bandwidth included in the first token bucket corresponding to each first TCONT.

[0329] In some embodiments, the first processor 901 can also be configured to: after allocating a first bandwidth authorization value to each first TCONT, traverse the first TCONTs corresponding to each first token bucket in the target token bucket queue in descending order of the bandwidth growth rate of the first TCONTs, wherein the target token bucket queue is the token bucket queue currently being traversed; increase the first bandwidth authorization value of the traversed first TCONTs by a first preset percentage bandwidth authorization value to obtain a new first bandwidth authorization value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed first TCONTs is less than the preset growth rate.

[0330] In some embodiments, the first processor 901 may be specifically configured to: if the token bucket queue traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT, wherein the second token bucket is the token bucket in the second token bucket queue; calculate the proportion of the bandwidth sum value of each second TCONT in the bandwidth sum value of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, wherein the bandwidth sum value is the sum of fixed bandwidth and guaranteed bandwidth; calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth to obtain the second allocable bandwidth corresponding to each second TCONT; and determine the second bandwidth authorization value of each second TCONT by the minimum value among the number of tokens included in the second token bucket corresponding to each second TCONT, the third requested bandwidth, and the second allocable bandwidth.

[0331] In some embodiments, the first processor 901 can also be used to: after allocating a second bandwidth grant value to each second TCONT, traverse each second TCONT in descending order of the bandwidth growth rate of the second TCONT; increase the second bandwidth grant value of the traversed second TCONT by a second preset percentage bandwidth grant value to obtain a new second bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate.

[0332] In this embodiment of the application, to further improve bandwidth utilization and address packet loss caused by short-term bursts of traffic, such as... Figure 13 As shown, the first processor 901 may include a traffic monitoring module 911, a dynamic adjustment module 921, and a real-time allocation module 931. The traffic monitoring module 911 is used to monitor the traffic status of TCONTs corresponding to non-guaranteed bandwidth or best-effort bandwidth in real time, such as counting whether TCONTs request bandwidth and the growth rate of the requested bandwidth. The dynamic adjustment module 921 is used to traverse TCONTs in descending order of bandwidth growth rate within the same priority token bucket queue (or the same priority token bucket sub-queue) based on the monitoring data. The real-time allocation module 931 is used to perform bandwidth allocation on the traversed TCONTs.

[0333] Specifically, for the second token bucket queue corresponding to non-guaranteed bandwidth, after the dynamic adjustment module 921 allocates a second bandwidth authorization value to each second TCONT, it traverses each second TCONT in descending order of bandwidth growth rate; the real-time allocation module 931 increases the second bandwidth authorization value of the traversed second TCONT by a second preset percentage bandwidth authorization value to obtain a new second bandwidth authorization value.

[0334] For the first token bucket queue corresponding to the best-effort bandwidth, after allocating a first bandwidth authorization value to each first TCONT, the dynamic adjustment module 921 traverses the first TCONTs corresponding to each first token bucket in the target token bucket sub-queue in descending order of the bandwidth growth rate of the first TCONTs. The target token bucket queue is the token bucket queue currently being traversed. The real-time allocation module 931 increases the first bandwidth authorization value of the traversed first TCONTs by a first preset percentage bandwidth authorization value to obtain a new first bandwidth authorization value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed first TCONTs is less than the preset growth rate.

[0335] In some embodiments, the first processor 901 may be specifically used for:

[0336] If the token bucket queue that is traversed is the third token bucket queue corresponding to the fixed bandwidth, then the number of tokens included in each third token bucket is determined as the third bandwidth authorization value of the third TCONT corresponding to each third token bucket, and the third token bucket is the token bucket in the third token bucket queue.

[0337] If the token bucket queue encountered is the fourth token bucket queue corresponding to the guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value already allocated to the fourth TCONT to obtain the fourth requested bandwidth of each fourth TCONT. The fourth token bucket is the token bucket in the fourth token bucket queue. The minimum value between the number of tokens included in the fourth token bucket corresponding to each fourth TCONT and the fourth requested bandwidth is determined as the fourth bandwidth authorization value of each fourth TCONT.

[0338] Alternatively, if the token bucket queue encountered is the fifth token bucket queue corresponding to fixed bandwidth and guaranteed bandwidth, then the sum of the number of tokens in the third and fourth token buckets corresponding to each fifth TCONT in the fifth token bucket queue is calculated to obtain the fifth token quantity corresponding to each fifth TCONT. The configured bandwidth indicated by the third token bucket is the fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is the guaranteed bandwidth. If the first requested bandwidth of each fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to each fifth TCONT, then the number of tokens included in the third token bucket corresponding to each fifth TCONT is determined as the fifth bandwidth authorization value of each fifth TCONT. If the first requested bandwidth of each fifth TCONT is greater than the number of tokens in the third token bucket corresponding to each fifth TCONT, then the minimum value between the fifth token quantity corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.

[0339] In some embodiments, the first processor 901 can also be used to: before traversing multiple token bucket queues in descending order of bandwidth priority, determine whether the bandwidth template parameters of each TCONT have been updated, and obtain a determination result, wherein the bandwidth template parameters of each TCONT include the configured bandwidth of the TCONT; if the determination result indicates that the target bandwidth template parameters of the target TCONT have been updated, then adjust the token bucket corresponding to the target TCONT according to the target configured bandwidth and bandwidth allocation period included in the target bandwidth template parameters.

[0340] In some embodiments, the target configured bandwidth includes fixed bandwidth, guaranteed bandwidth, non-guaranteed maximum bandwidth, and / or best-effort bandwidth; the first processor 901 may be specifically used for:

[0341] Adjust the number of tokens in the third token bucket corresponding to the target TCONT to the number of tokens in the first token bucket. The number of tokens in the first token bucket is the product of the fixed bandwidth and the bandwidth allocation period. The third token bucket corresponds to the fixed bandwidth.

[0342] Adjust the number of tokens in the fourth token bucket corresponding to the target TCONT to the number of tokens in the second token bucket. The number of tokens in the second token bucket is the product of the guaranteed bandwidth and the bandwidth allocation period duration. The fourth token bucket corresponds to the guaranteed bandwidth.

[0343] Adjust the number of tokens in the first token bucket corresponding to the target TCONT to the number of third tokens. The number of third tokens is the product of the best-effort bandwidth and the bandwidth allocation period duration. The first token bucket corresponds to the best-effort bandwidth; and / or,

[0344] Calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth to obtain the non-guaranteed bandwidth; adjust the number of tokens in the second token bucket corresponding to the target TCONT to the fourth token number, which is the product of the non-guaranteed bandwidth and the bandwidth allocation period duration. The second token bucket corresponds to the non-guaranteed bandwidth.

[0345] In some embodiments, the first processor 901 can also be used to: generate a timed interrupt signal at each bandwidth allocation cycle; and when the timed interrupt signal is detected, send the bandwidth allocation value for each TCONT to the logic chip 902. In this way, the logic chip 902 can use the bandwidth allocation value allocated to each TCONT to generate a bandwidth map; and distribute the bandwidth map to the ONUs in the passive optical network.

[0346] In this embodiment, by executing bandwidth allocation with a fixed bandwidth allocation cycle through a real-time processor, the number of tokens for each TCONT in a bandwidth allocation cycle can be calculated in advance. This reduces the workload and simplifies the real-time bandwidth allocation module; for example, it only needs to select the minimum value between the number of tokens and the requested bandwidth, thereby improving the speed of bandwidth allocation and reducing data frame latency. The priority-based token bucket queue traversal algorithm allocates bandwidth more flexibly and accurately according to the importance of different types of services, ensuring the needs of important real-time services are met. When there is remaining bandwidth, less important services can be allocated bandwidth.

[0347] The technical solution provided in this application can be used in campus network sites of PON switch product lines, with economic benefits reaching tens of millions. Based on a priority token bucket queue, bandwidth allocation for various service types can be flexibly adapted to achieve fine-grained and fair scheduling.

[0348] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the above-described dynamic bandwidth allocation methods.

[0349] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the dynamic bandwidth allocation methods described above.

[0350] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0351] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0352] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for devices, OLTs, storage media, and program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0353] The above are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A dynamic bandwidth allocation method, characterized in that, An optical line terminal (OLT) applied in a passive optical network (PON) is provided, wherein the OLT is configured with multiple token bucket queues, each token bucket queue corresponding to a priority, and each token bucket in each token bucket queue corresponding to a transport container (TCONT). The number of tokens in each token bucket indicates the configured bandwidth. The method includes: Within each bandwidth allocation cycle, the multiple token bucket queues are traversed in descending order of priority. Based on the number of tokens included in each token bucket in the traversed token bucket queue, allocate a bandwidth authorization value to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed; A bandwidth map is generated using the bandwidth grant value allocated to each TCONT; The bandwidth mapping is then distributed to the optical network unit (ONU) in the passive optical network.

2. The method according to claim 1, characterized in that, The step of allocating bandwidth authorization values ​​to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes: If the token bucket queue encountered is the first token bucket queue corresponding to the best-effort bandwidth, then the multiple token bucket queues in the first token bucket queue are traversed in descending order of priority of the token bucket sub-queues in the first token bucket queue, with each token bucket queue corresponding to a priority. Based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket, a first bandwidth authorization value is allocated to each first TCONT until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed.

3. The method according to claim 2, characterized in that, The step of allocating a first bandwidth authorization value to each first TCONT based on the number of tokens included in each first token bucket in the traversed token bucket sub-queue and the first requested bandwidth of the first TCONT corresponding to each first token bucket includes: Calculate the difference between the first request bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket sub-queue and the bandwidth authorization value already allocated to the first TCONT, to obtain the second request bandwidth of each first TCONT; Calculate the proportion of the allocation weight of each first TCONT in the total allocation weight of all first TCONTs in the traversed token bucket subqueue to obtain the first bandwidth proportion of each first TCONT. Calculate the product of the first bandwidth percentage and the remaining bandwidth for each first TCONT to obtain the first allocable bandwidth corresponding to each first TCONT; The minimum value among the number of tokens, the second requested bandwidth, and the first allocable bandwidth included in the first token bucket corresponding to each first TCONT is determined as the first bandwidth authorization value for each first TCONT.

4. The method according to claim 2, characterized in that, After allocating a first bandwidth license value to each first TCONT, the following is also included: According to the bandwidth growth rate of the first TCONT in descending order, traverse the first TCONT corresponding to each first token bucket in the target token bucket queue, where the target token bucket queue is the token bucket queue currently being traversed. Increase the first bandwidth license value of the first TCONT encountered by a first preset percentage to obtain a new first bandwidth license value, until the remaining bandwidth is empty, or the bandwidth growth rate of the first TCONT encountered is less than the preset growth rate.

5. The method according to claim 1, wherein The step of allocating bandwidth authorization values ​​to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes: If the token bucket queue that is traversed is the second token bucket queue corresponding to non-guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value already allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT. The second token bucket is the token bucket in the second token bucket queue. Calculate the proportion of the bandwidth sum of each second TCONT in the total bandwidth sum of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum is the sum of the fixed bandwidth and the guaranteed bandwidth; Calculate the product of the second bandwidth percentage and the remaining bandwidth for each second TCONT to obtain the second allocable bandwidth corresponding to each second TCONT; The minimum of the number of tokens in the second token bucket, the third request bandwidth, and the second allocable bandwidth included in the second TCONT is determined as the second bandwidth authorization value for each second TCONT.

6. The method according to claim 5, characterized in that, After allocating a second bandwidth license value to each second TCONT, the following is also included: Traverse each second TCONT in descending order of bandwidth growth rate; Increase the second bandwidth grant value of the traversed second TCONT by a second preset percentage to obtain a new second bandwidth grant value, until the remaining bandwidth is empty, or the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate.

7. The method according to claim 1, characterized in that, The step of allocating bandwidth authorization values ​​to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes: If the token bucket queue traversed is the third token bucket queue corresponding to the fixed bandwidth, then the number of tokens included in each third token bucket is determined as the third bandwidth authorization value of the third TCONT corresponding to each third token bucket, and the third token bucket is the token bucket in the third token bucket queue. If the token bucket queue encountered is the fourth token bucket queue corresponding to the guaranteed bandwidth, then calculate the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value already allocated to the fourth TCONT to obtain the fourth requested bandwidth of each fourth TCONT. The fourth token bucket is the token bucket in the fourth token bucket queue. The minimum value between the number of tokens included in the fourth token bucket corresponding to each fourth TCONT and the fourth requested bandwidth is determined as the fourth bandwidth authorization value of each fourth TCONT. Alternatively, the step of allocating a bandwidth authorization value to the TCONT corresponding to each token bucket based on the number of tokens included in each token bucket in the traversed token bucket queue includes: If the token bucket queue traversed is the fifth token bucket queue corresponding to fixed bandwidth and guaranteed bandwidth, then calculate the sum of the number of tokens in the third token bucket and the fourth token bucket corresponding to each fifth TCONT in the fifth token bucket queue, and obtain the number of fifth tokens corresponding to each fifth TCONT. The configured bandwidth indicated by the third token bucket is the fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is the guaranteed bandwidth. If the first request bandwidth of each fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to each fifth TCONT, then the number of tokens included in the third token bucket corresponding to each fifth TCONT is determined as the fifth bandwidth authorization value of each fifth TCONT. If the first requested bandwidth of each fifth TCONT is greater than the number of tokens in the third token bucket corresponding to each fifth TCONT, then the minimum value between the number of fifth tokens corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.

8. The method according to claim 1, characterized in that, Before traversing the multiple token bucket queues in descending order of bandwidth priority, the method further includes: Determine whether the bandwidth template parameters of each TCONT have been updated, and obtain the determination result. The bandwidth template parameters of each TCONT include the configured bandwidth of that TCONT. If the judgment result indicates that the target bandwidth template parameters of the target TCONT have been updated, then the token bucket corresponding to the target TCONT is adjusted according to the target configuration bandwidth and bandwidth allocation period duration included in the target bandwidth template parameters.

9. The method according to claim 8, characterized in that, The target configured bandwidth includes fixed bandwidth, guaranteed bandwidth, non-guaranteed maximum bandwidth, and / or best-effort bandwidth. The step of adjusting the token bucket corresponding to the target TCONT based on the target configured bandwidth and bandwidth allocation period duration included in the target bandwidth template parameters includes: The number of tokens included in the third token bucket corresponding to the target TCONT is adjusted to the number of first tokens, where the number of first tokens is the product of the fixed bandwidth and the bandwidth allocation period duration, and the third token bucket corresponds to the fixed bandwidth. The number of tokens included in the fourth token bucket corresponding to the target TCONT is adjusted to the number of second tokens, where the number of second tokens is the product of the guaranteed bandwidth and the bandwidth allocation period duration, and the fourth token bucket corresponds to the guaranteed bandwidth. Adjust the number of tokens in the first token bucket corresponding to the target TCONT to a third token number, where the third token number is the product of the best-effort bandwidth and the bandwidth allocation period duration, and the first token bucket corresponds to the best-effort bandwidth; and / or, Calculate the difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth to obtain the non-guaranteed bandwidth; adjust the number of tokens in the second token bucket corresponding to the target TCONT to the fourth token number, the fourth token number being the product of the non-guaranteed bandwidth and the bandwidth allocation period duration, and the second token bucket corresponding to the non-guaranteed bandwidth.

10. The method according to any one of claims 1-9, characterized in that, The method further includes: A timed interrupt signal is generated for each bandwidth allocation cycle. When a timer interrupt signal is detected, the step of generating a bandwidth map using the bandwidth grant value allocated to each TCONT is executed.

11. A dynamic bandwidth allocation device, characterized in that, An optical line terminal (OLT) for use in passive optical networks (PONs), wherein the OLT is configured with multiple token bucket queues, each token bucket queue corresponding to a priority, and each token bucket in each token bucket queue corresponding to a transport container (TCONT), wherein the number of tokens in each token bucket indicates the configured bandwidth, and the device includes: The traversal module is used to traverse the multiple token bucket queues in descending order of priority within each bandwidth allocation cycle. The allocation module is used to allocate a bandwidth authorization value to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue, until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed; The generation module is used to generate bandwidth maps using the bandwidth grant value allocated to each TCONT; The distribution module is used to distribute the bandwidth mapping to the optical network unit (ONU) in the passive optical network.

12. An optical line terminal, characterized in that, It includes a first processor and a logic chip; the first processor is configured with multiple token bucket queues, each token bucket in each token bucket queue corresponds to a transmission container TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth; The first processor is configured to traverse the multiple token bucket queues in descending order of priority during each bandwidth allocation period; and allocate bandwidth authorization values ​​to the TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queues, until the remaining bandwidth is empty, or the traversal of the multiple token bucket queues is completed. The bandwidth grant value allocated to each TCONT is sent to the logic chip; The logic chip is used to generate a bandwidth mapping using the bandwidth grant value allocated to each TCONT; and to send the bandwidth mapping to the optical network unit (ONU) in the passive optical network.

13. The optical line terminal according to claim 12, characterized in that, The optical line terminal also includes a second processor; The second processor is used to obtain the bandwidth template parameters of each TCONT, the bandwidth template parameters including the configuration bandwidth corresponding to the bandwidth type used by each TCONT; and to send the bandwidth template parameters of each TCONT to the first processor. The first processor is further configured to determine whether the bandwidth template parameters of each TCONT have been updated, and obtain a determination result. The bandwidth template parameters of each TCONT include the configured bandwidth of the TCONT. If the determination result indicates that the target bandwidth template parameters of the target TCONT have been updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and bandwidth allocation period included in the target bandwidth template parameters.

14. The optical line terminal according to claim 12, characterized in that, The first processor is further configured to: generate a timer interrupt signal at each bandwidth allocation cycle; and send each TCONT allocated bandwidth authorization value to the logic chip when the timer interrupt signal is detected.

Citation Information

Patent Citations

  • Message forwarding method and device based on token bucket

    CN101557348A

  • Queue allocation method and apparatus

    CN108259377A