Dynamic bandwidth allocation method and device and optical line terminal
By setting up multiple token bucket queues in the OLT of the passive optical network and allocating bandwidth authorization values according to the number of tokens in the token bucket, the problem of poor fairness in dynamic bandwidth allocation is solved, and the effect of TCONT obtaining bandwidth fairly over a long period of time is achieved, and the delay of dynamic bandwidth allocation is reduced.
Patent Information
- Application Number
- CN202411932621.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In the prior art, the fairness of dynamic bandwidth allocation in passive optical networks is poor, resulting in some ONUs being unable to be polled for a long time and their bandwidth requirements cannot be met for a long time.
Set up multiple token bucket queues in OLT, and each token bucket queue corresponds to a TCONT. The bandwidth authorization value is allocated to each TCONT according to the number of tokens in the token bucket. The priority of the token bucket queue is traversed from high to low to ensure that the bandwidth requirements of the high priority are met.
By prioritizing the allocation of high priority bandwidth, all TCONTs are ensured to obtain bandwidth resources fairly over a long period of time, reducing the delay of dynamic bandwidth allocation, and improving the efficiency of ONU sending uplink data.
Smart Images

Figure CN119728567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of passive optical networks, and in particular to a method and device for dynamic bandwidth allocation and an optical line terminal. Background Art
[0002] In order to improve the effectiveness of the upstream bandwidth of the 10G Symmetrical Passive Optical Network (XGSPON), the optical line terminal (OLT) dynamically adjusts the bandwidth between the optical network units (ONUs), which can be specifically: the dynamic bandwidth allocation (DBA) module inside the OLT collects the DBA report of the ONU side through the passive optical network (PON) port, and the DBA algorithm module polls the ONU in a certain order, performs relevant calculations based on the DBA report and the requested bandwidth of each ONU polled, allocates bandwidth to each transmission container (TCONT) connected to the ONU, and sends the allocation result to each ONU in the form of bandwidth mapping (BWmap). Each ONU determines the bandwidth of each TCONT according to the BWmap, and then uses the corresponding bandwidth to send upstream data to the OLT.
[0003] This dynamic bandwidth allocation method is simple and easy to implement. Every time an ONU is polled, a bandwidth calculation is performed based on the bandwidth requirements of each TCONT on the ONU to allocate bandwidth to each TCONT. This may cause some ONUs to be unable to be polled for a long time, and their bandwidth requirements cannot be met for a long time, and the fairness of dynamic bandwidth allocation is poor. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device and optical line terminal for dynamic bandwidth allocation to improve the fairness of dynamic bandwidth allocation. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a dynamic bandwidth allocation method, which is applied to an OLT in a passive optical network, wherein a plurality of token bucket queues are set in the OLT, each token bucket included in each token bucket queue corresponds to a TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth, and the method comprises:
[0006] In each bandwidth allocation cycle, traverse the multiple token bucket queues in descending order of priority of the token bucket queues;
[0007] According to the number of tokens included in each token bucket in the traversed token bucket queue, a bandwidth authorization value is allocated 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] Generate a bandwidth map using the bandwidth authorization value allocated to each TCONT;
[0009] The bandwidth mapping is sent down to the ONU in the passive optical network.
[0010] In some embodiments, the step of allocating a bandwidth authorization value to a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue includes:
[0011] If the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket sub-queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue, each token bucket sub-queue corresponding to a priority;
[0012] According to the number of tokens included in each first token bucket in the traversed token bucket sub-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 the multiple token bucket sub-queues is completed.
[0013] In some embodiments, the step of allocating 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 subqueue and the first requested bandwidth of the first TCONT corresponding to each first token bucket includes:
[0014] 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 allocated to the first TCONT to obtain the second requested bandwidth of each first TCONT;
[0015] Calculate the proportion of the allocation weight of each first TCONT in the allocation weights of all first TCONTs in the traversed token bucket sub-queues to obtain the first bandwidth proportion of each first TCONT;
[0016] Calculate the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth to obtain a first allocatable bandwidth corresponding to each first TCONT;
[0017] 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 allocatable bandwidth is determined as the first bandwidth authorization value of each first TCONT.
[0018] In some embodiments, after allocating the first bandwidth authorization value to each first TCONT, the method further includes:
[0019] According to the order of the bandwidth growth rate of the first TCONT from large to small, traverse the first TCONT corresponding to each first token bucket in the target token bucket sub-queue, wherein the target token bucket sub-queue is the token bucket sub-queue currently traversed;
[0020] The first bandwidth authorization value of the traversed first TCONT is increased by a first preset percentage of the 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.
[0021] In some embodiments, the step of allocating a bandwidth authorization value to a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue includes:
[0022] If the traversed token bucket queue is the second token bucket queue corresponding to the non-guaranteed bandwidth, the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value allocated to the second TCONT is calculated to obtain the third requested bandwidth of each second TCONT, and the second token bucket is the token bucket in the second token bucket queue;
[0023] Calculate the proportion of the bandwidth sum value of each second TCONT in the bandwidth sum values of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum value is the sum of the fixed bandwidth and the guaranteed bandwidth;
[0024] Calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth to obtain the second allocatable bandwidth corresponding to each second TCONT;
[0025] 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 allocatable bandwidth is determined as the second bandwidth authorization value for each second TCONT.
[0026] In some embodiments, after allocating the second bandwidth authorization value to each second TCONT, the method further includes:
[0027] Traverse each second TCONT in descending order of bandwidth growth rate of the second TCONT;
[0028] The second bandwidth authorization value of the traversed second TCONT is increased by a second preset percentage of the bandwidth authorization value to obtain a new second bandwidth authorization 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 a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue includes:
[0030] If the traversed token bucket queue is a third token bucket queue corresponding to a fixed bandwidth, 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 a token bucket in the third token bucket queue;
[0031] If the traversed token bucket queue is the fourth token bucket queue corresponding to the guaranteed bandwidth, the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value allocated to the fourth TCONT is calculated to obtain the fourth requested bandwidth of each fourth TCONT, and the fourth token bucket is the token bucket in the fourth token bucket queue; the minimum value of 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 a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue includes:
[0033] If the traversed token bucket queue is the fifth token bucket queue corresponding to the fixed bandwidth and the 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 fifth number of 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 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, 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, the minimum value of the fifth token number 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 order of bandwidth priorities of the token bucket queues from high to low, the method further includes:
[0037] Determine whether a bandwidth template parameter of each TCONT is updated, and obtain a determination result, wherein the bandwidth template parameter of each TCONT includes a configured bandwidth of the TCONT;
[0038] If the determination result indicates that the target bandwidth template parameters of the target TCONT are updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters.
[0039] In some embodiments, the target configured bandwidth includes a fixed bandwidth, a guaranteed bandwidth, a non-guaranteed maximum bandwidth, and / or a best effort bandwidth;
[0040] The step of adjusting the token bucket corresponding to the target TCONT according to the target configuration bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters includes:
[0041] Adjust the number of tokens included in the third token bucket corresponding to the target TCONT to the first token number, where the first token number is the product of the fixed bandwidth and the bandwidth allocation cycle length, and the third token bucket corresponds to the fixed bandwidth;
[0042] Adjust the number of tokens included 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 cycle length, and the fourth token bucket corresponds to the guaranteed bandwidth;
[0043] Adjusting the number of tokens included 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 cycle length, 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 included in the fourth token bucket corresponding to the target TCONT to the second token number, the second token number is the product of the guaranteed bandwidth and the bandwidth allocation cycle length, and the fourth token bucket corresponds to the guaranteed bandwidth; adjust the number of tokens included in the second token bucket corresponding to the target TCONT to the fourth token number, the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation cycle length, and the second token bucket corresponds to the non-guaranteed bandwidth.
[0045] In some embodiments, the method further comprises:
[0046] Generate a timing interrupt signal at each bandwidth allocation cycle;
[0047] When a timing interrupt signal is detected, the step of generating a bandwidth map using the bandwidth authorization value allocated to each TCONT is performed.
[0048] In a second aspect, an embodiment of the present application provides a dynamic bandwidth allocation device, which is applied to an OLT in a passive optical network, wherein a plurality of token bucket queues are set in the OLT, each token bucket queue corresponds to a priority, each token bucket included in each token bucket queue corresponds to a TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth, and the device includes:
[0049] A traversal module, used to traverse the multiple token bucket queues in descending order of priority of the token bucket queues in each bandwidth allocation cycle;
[0050] An allocation module, configured to allocate a bandwidth authorization value to a 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;
[0051] A generating module, used for generating a bandwidth map by using the bandwidth authorization value allocated to each TCONT;
[0052] The sending module is used to send the bandwidth mapping to the ONU in the passive optical network.
[0053] In a third aspect, an embodiment of the present application provides an optical line terminal, including a first processor and a logic chip; a plurality of token bucket queues are set in the first processor, each token bucket included 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 used to traverse the multiple token bucket queues in order of priority from high to low in each bandwidth allocation cycle; allocate bandwidth authorization values to TCONTs 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 bandwidth mapping by using the bandwidth authorization value allocated to each TCONT; and 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 configured to obtain bandwidth template parameters of each TCONT, where the bandwidth template parameters include a configured bandwidth corresponding to a bandwidth type used by each TCONT; and 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 are 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 are updated, then according to the target configured bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters, adjust the token bucket corresponding to the target TCONT.
[0059] In some embodiments, the first processor is further configured to: generate a timing interrupt signal at each bandwidth allocation cycle; and send each TCONT allocated bandwidth authorization value to the logic chip when the timing interrupt signal is detected.
[0060] Beneficial effects of the embodiments of the present application:
[0061] In the technical solution provided by the embodiment of the present application, token bucket queues of multiple priorities are pre-set in the OLT, each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens included in a token bucket is the configured bandwidth of the corresponding TCONT. In each bandwidth allocation cycle, the OLT traverses the token bucket queues in order from high to low priority of the token bucket queues to give priority to allocating bandwidth to the TCONT corresponding to the high-priority token buckets, thereby ensuring high-priority bandwidth requirements and ensuring that all TCONTs obtain bandwidth resources fairly over a long period of time.
[0062] In addition, in each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values to the TCONT according to the number of tokens included in the token bucket, and generate a bandwidth map and send it to the ONU. In the embodiment of the present application, the OLT uses the token bucket to pre-set the configuration bandwidth of each TCONT. When dynamically allocating bandwidth to the TCONT, there is no need to repeatedly calculate the configuration bandwidth, which reduces the amount of bandwidth allocation tasks, makes bandwidth allocation simpler, and thus reduces the delay of dynamic bandwidth allocation and reduces the delay of the ONU sending upstream data.
[0063] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0065] Figure 1 A schematic diagram of a first flow chart of a dynamic bandwidth allocation method provided in an embodiment of the present application;
[0066] Figure 2 A first schematic diagram of multiple token bucket queues provided in an embodiment of the present application;
[0067] Figure 3 A second schematic diagram of multiple token bucket queues provided in an embodiment of the present application;
[0068] Figure 4 A second flow chart of the dynamic bandwidth allocation method provided in an embodiment of the present application;
[0069] Figure 5 A third schematic diagram of multiple token bucket queues provided in an embodiment of the present application;
[0070] Figure 6 A third flow chart of the dynamic bandwidth allocation method provided in an embodiment of the present application;
[0071] Figure 7 A schematic diagram of a bandwidth allocation process provided in an embodiment of the present application;
[0072] Figure 8 A schematic diagram of the first structure of a dynamic bandwidth allocation device provided in an embodiment of the present application;
[0073] Fig. 9 A schematic diagram of the first structure of the OLT provided in the embodiment of the present application;
[0074] Fig.10 A second structural diagram of an OLT provided in an embodiment of the present application;
[0075] Fig.11 A third structural diagram of the OLT provided in the embodiment of the present application;
[0076] Fig.12 A schematic diagram of a dynamic bandwidth allocation process provided in an embodiment of the present application;
[0077] Fig.13 A schematic diagram of the structure of a first processor provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0079] XGSPON: An optical access network, consisting of three core modules: OLT, Optical Distribution Network (ODN) and ONU. XGSPON is a one-to-many tree structure. An OLT is connected to one or more ONUs through ODN, and each ONU can be connected to one or more TCONTs. The upstream data from ONU to OLT is transmitted by time division multiplexing, and the downstream data from OLT to ONU is transmitted by broadcasting.
[0080] TCONT: The smallest unit of DBA. One TCONT corresponds to a bandwidth service, which has its own Quality of Service (QoS) characteristics. QoS characteristics are mainly reflected in bandwidth guarantee, which can be divided into: fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, best-effort bandwidth, hybrid bandwidth and other bandwidth types, as shown in Table 1.
[0081] Table 1
[0082]
[0083]
[0084] In Table 1, TCONT of type 1 uses fixed bandwidth to transmit data; TCONT of type 2 uses guaranteed bandwidth to transmit data; TCONT of type 3 uses guaranteed bandwidth and non-guaranteed bandwidth to transmit data; TCONT of type 4 uses best-effort bandwidth to transmit data; TCONT of type 5 uses a mixed bandwidth such as fixed bandwidth, guaranteed bandwidth, best-effort bandwidth to transmit data, or uses a mixed bandwidth such as fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth to transmit data.
[0085] Fixed bandwidth is the highest priority bandwidth. It is a periodically allocated fully reserved bandwidth. That is, regardless of the bandwidth request of TCONT, a fixed-size authorization value is allocated in each bandwidth allocation cycle. For example, a type 1 TCONT reserves a fixed bandwidth, but the TCONT has no cells to send. The OLT still sends the authorization value of using the fixed bandwidth to the TCONT. At this time, the ONU sends idle cells to the OLT. Fixed bandwidth is suitable for delay-sensitive services. Using fixed bandwidth can achieve a small cell transmission delay.
[0086] Assured bandwidth is a periodically allocated incompletely reserved bandwidth with a fixed bandwidth size and a non-fixed occupied time slot. For example, when a type 2 TCONT sends a cell, the ONU can always use the guaranteed bandwidth; when the TCONT does not send a cell, the guaranteed bandwidth can be used by other TCONTs. Guaranteed bandwidth is suitable for services that are not sensitive to latency, and guaranteed bandwidth can participate in dynamic bandwidth allocation.
[0087] Non-assured bandwidth is the additional bandwidth dynamically allocated to TCONTs with guaranteed bandwidth (such as type 3 TCONTs), and it has a higher priority in the additional bandwidth. Non-assured bandwidth is suitable for services that are not sensitive to latency, and non-assured bandwidth can participate in dynamic bandwidth allocation.
[0088] Best-effort bandwidth is dynamically allocated bandwidth; it is the bandwidth that a TCONT (such as type 4 TCONT) can use when no high-priority services use the bandwidth. Best-effort bandwidth is suitable for services that are not sensitive to latency and can only participate in dynamic bandwidth allocation.
[0089] To improve the effectiveness of XGSPON upstream bandwidth, OLT dynamically adjusts the bandwidth between ONUs. Specifically, the DBA algorithm module collects the upstream DBA report (Dynamic Bandwidth Report upstream, DBRu) on the ONU side through the OLT port and the internal scheduler of the OUN. The DBA report can include the requested bandwidth (which can be represented by the remaining buffer). The DBA algorithm module polls the ONU in a certain order, and performs relevant calculations based on the DBA report and the requested bandwidth of each ONU polled to allocate bandwidth for each TCONT connected to the ONU, and sends the allocation result to each ONU in the form of BWmap. Each ONU determines the bandwidth of each TCONT according to the BWmap, and then uses the corresponding bandwidth to send upstream data to the OLT.
[0090] This dynamic bandwidth allocation method is simple and easy to implement, but each time an ONU is polled, a bandwidth calculation needs to be performed based on the bandwidth requirements of each TCONT on the ONU to allocate bandwidth to each TCONT, resulting in a high bandwidth allocation delay.
[0091] To solve the above problems, the present application provides a method for dynamic bandwidth allocation. Figure 1 As shown, it is applied to OLT in passive optical network. Multiple token bucket queues are set in OLT, each token bucket queue corresponds to a priority, each token bucket included in each token bucket queue corresponds to a TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth. The method comprises the following steps:
[0092] Step S101, in each bandwidth allocation cycle, traverse multiple token bucket queues in descending order of priority of the token bucket queues;
[0093] Step S102, according to the number of tokens included in each token bucket in the traversed token bucket queue, a bandwidth authorization value is allocated to the TCONT corresponding to each token bucket until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed;
[0094] Step S103, generating a bandwidth map using the bandwidth authorization value allocated to each TCONT;
[0095] Step S104: Send the bandwidth mapping to the ONU in the passive optical network.
[0096] In the technical solution provided by the embodiment of the present application, token bucket queues of multiple priorities are pre-set in the OLT, each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens included in a token bucket is the configured bandwidth of the corresponding TCONT. In each bandwidth allocation cycle, the OLT traverses the token bucket queues in order from high to low priority of the token bucket queues to give priority to allocating bandwidth to the TCONT corresponding to the high-priority token buckets, thereby ensuring high-priority bandwidth requirements and ensuring that all TCONTs obtain bandwidth resources fairly over a long period of time.
[0097] In addition, in each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values to the TCONT according to the number of tokens included in the token bucket, and generate a bandwidth map and send it to the ONU. In the embodiment of the present application, the OLT uses the token bucket to pre-set the configuration bandwidth of each TCONT. When dynamically allocating bandwidth to the TCONT, there is no need to repeatedly calculate the configuration bandwidth, which reduces the amount of tasks during bandwidth allocation, makes bandwidth allocation simpler, and thus reduces the delay of dynamic bandwidth allocation and reduces the delay of the ONU sending upstream data.
[0098] In the embodiment of the present application, the passive optical network may be an XGSPON or other types of PON, which is not limited. A plurality of token bucket queues are set in the OLT, each token bucket queue is configured with a corresponding priority, and 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 according to the bandwidth template parameter. For example, the bandwidth template parameter includes the priority of the token bucket queue. The priority of the token bucket queue can also be understood as the priority of TCONT. TCONT is associated with the bandwidth template parameter, and accordingly, the token bucket corresponding to 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 queue can be determined according to the bandwidth type. For example, the bandwidth types include fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth. The priorities of these four types of bandwidth are from high to low: fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth, and best-effort bandwidth. Four token bucket queues are set in the OLT, namely, token bucket queue T1 corresponding to fixed bandwidth, token bucket queue T2 corresponding to guaranteed bandwidth, token bucket queue T3 corresponding to non-guaranteed bandwidth, and token bucket queue T4 corresponding to best-effort bandwidth. Correspondingly, the priorities of the token bucket queues are from high to low: token bucket queue T1, token bucket queue T2, token bucket queue T3, and token bucket queue T4.
[0101] Among them, the token bucket queue corresponding to the fixed bandwidth indicates that the configured bandwidth indicated by the number of tokens included in the token bucket in the token bucket queue is the fixed bandwidth, and the token bucket queue corresponding to the fixed bandwidth indicates that the token bucket in the token bucket queue is the token bucket corresponding to the fixed bandwidth; the configured bandwidth indicated by the number of tokens included in the token bucket in the token bucket queue corresponding to the guaranteed bandwidth is the guaranteed bandwidth, and the token bucket in the token bucket queue corresponding to the guaranteed bandwidth is the token bucket corresponding to the guaranteed bandwidth; the configured bandwidth indicated by the number of tokens included in the token bucket in the token bucket queue corresponding to the non-guaranteed bandwidth is the non-guaranteed bandwidth, and the token bucket in the token bucket queue corresponding to the non-guaranteed bandwidth is the token bucket corresponding to the non-guaranteed bandwidth; the configured bandwidth indicated by the number of tokens included in the token bucket in the token bucket queue corresponding to the best-effort bandwidth is the best-effort bandwidth, and the token bucket in the token bucket queue corresponding to the best-effort bandwidth is the token bucket corresponding to the best-effort bandwidth.
[0102] In the embodiment of the present 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 2As shown in the multiple token bucket queues, the OLT is provided with a token bucket queue T1 corresponding to a fixed bandwidth, a token bucket queue T2 corresponding to a guaranteed bandwidth, a token bucket queue T3 corresponding to a non-guaranteed bandwidth, and a token bucket queue T4 corresponding to a best-effort bandwidth. Figure 2 In the figure, each trapezoidal bucket represents a token bucket, and the filled portion at the bottom of the trapezoidal bucket represents the tokens included in the token bucket. Figure 2 In 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 to T3 all include TCONT 12 The corresponding token bucket.
[0104] In the embodiment of the present application, the OLT may also set more token bucket queues, for example, Figure 3 The multiple token bucket queues shown in the figure, OLT sets 4 token bucket queues, namely, token bucket queue T1 corresponding to fixed bandwidth, token bucket queue T2 corresponding to guaranteed bandwidth, token bucket queue T3 corresponding to non-guaranteed bandwidth, and token bucket queue T4 corresponding to best-effort bandwidth; wherein, token bucket queue T4 is subdivided into multiple token bucket sub-queues such as token bucket sub-queue T41 and token bucket sub-queue T42, the priority of token bucket sub-queue T41 is higher than the priority of token bucket sub-queue T42, and the priority of token bucket sub-queue T42 is higher than the priority of other token bucket sub-queues. There is no limitation on this.
[0105] In step S101, the duration of the bandwidth allocation cycle can be set according to actual needs. For example, the duration of a bandwidth allocation cycle can be 125 microseconds (μs), 250 μs, or 500 μs.
[0106] The OLT can evenly distribute the total bandwidth of the interface to obtain the total bandwidth that can be allocated in a bandwidth allocation cycle. For example, if the total bandwidth of the interface is 500Mbps and the duration of a bandwidth allocation cycle is 125μs, the total bandwidth that can be allocated in 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 token bucket queues 1 to 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 queue 1, token bucket queue 2, token bucket queue 3, and token bucket queue 4 in this 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 that can be allocated in a bandwidth allocation cycle minus the allocated bandwidth.
[0109] When traversing a token bucket queue, for each token bucket in the token bucket queue, the OLT can allocate bandwidth to the TCONT corresponding to the token bucket according to the number of tokens included in the token bucket, that is, allocate bandwidth authorization value to the TCONT corresponding to the token bucket. After allocating bandwidth to the TCONT corresponding to the token bucket in the token bucket queue, if there is still remaining bandwidth and there are token bucket queues that have not been traversed, the token bucket queues will continue to be traversed.
[0110] After bandwidth allocation for the TCONT corresponding to the token bucket in the token bucket queue is completed, if the remaining bandwidth is empty or all token bucket queues have been traversed, the traversal of the token bucket queue is stopped.
[0111] After stopping traversing the token bucket queue, the bandwidth authorization value of each TCONT in the current 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 authorization value of each TCONT, the OLT can generate a bandwidth map (BWmap) using the bandwidth authorization value allocated to each TCONT. The BWmap indicates the uplink bandwidth of each TCONT, that is, the bandwidth authorization value of each TCONT.
[0113] Then, step S104 is executed to send the BWmap to the ONUs in the passive optical network by broadcast, multicast or unicast.
[0114] In some embodiments, in order to further reduce the delay of dynamic bandwidth allocation and reduce the delay of ONU sending uplink data, the embodiment of the present application also provides a dynamic bandwidth allocation method, such as Figure 4 As shown, the 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 cycle, traverse multiple token bucket queues in descending order of priority of the token bucket queues; the above step S401 is the same as the above step S101.
[0116] Step S402, according to the number of tokens included in each token bucket in the traversed token bucket queue, allocate bandwidth authorization value to TCONT corresponding to each token bucket until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed; the above step S402 is the same as the above step S102.
[0117] Step S403, generating a timing interrupt signal at each bandwidth allocation period;
[0118] In the embodiment of the present application, the timing interrupt signal is an interrupt signal generated regularly. The generation cycle of the timing interrupt signal is the same as the bandwidth allocation cycle. The OLT generates a timing interrupt signal every bandwidth allocation cycle.
[0119] Step S404, when a timing interrupt signal is detected, a bandwidth map is generated using the bandwidth authorization value allocated to each TCONT;
[0120] Step S405, sending the bandwidth mapping to the ONU in the passive optical network. Step S405 is the same as the above step S104.
[0121] In the embodiment of the present application, the OLT can monitor the timing interrupt signal in real time. If the timing interrupt signal is not monitored, the OLT will not process the bandwidth authorization value of each TCONT, that is, it will not process the authorization table. When the timing interrupt signal is monitored, the bandwidth authorization value allocated to each TCONT is used to generate a bandwidth mapping, and step S405 is executed.
[0122] In order to facilitate the generation of bandwidth mapping, the OLT can set an interrupt flag. When a timing interrupt signal is generated, the OLT sets the interrupt flag; if it is detected that the interrupt flag is not set, the bandwidth authorization value of each TCONT will not be processed; if it is detected that the interrupt flag is set, the OLT can determine that the timing interrupt signal is detected, and then use the bandwidth authorization value allocated to each TCONT to generate a bandwidth mapping and execute step S405.
[0123] The OLT may also use other methods to detect the timing interrupt signal, such as setting a register corresponding to the timing interrupt signal; when the timing interrupt signal is generated, the OLT sets the register. The embodiment of the present application does not limit the method for detecting the timing interrupt signal.
[0124] In the embodiment of the present application, the OLT pre-allocates a bandwidth authorization value for each TCONT, and when a timing interrupt signal is detected, a bandwidth mapping is directly generated and issued. In other words, the OLT uses the token bucket queue and the timing interrupt signal to allocate a bandwidth authorization value for each TCONT in advance. When the time to issue the bandwidth mapping is reached, the OLT directly uses the allocated bandwidth authorization value to generate and issue the bandwidth mapping. This further reduces the delay of dynamic bandwidth allocation and reduces the delay of the ONU sending upstream data.
[0125] In some embodiments, the OLT can configure the management and control interface (OMCI) of the optical network terminal (Optical Network Unit, ONT), that is, configure the TCONT bandwidth template to obtain bandwidth template parameters. The bandwidth template parameters include the configuration bandwidth of the corresponding TCONT.
[0126] In the embodiment of the present application, according to 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 above TCONT bandwidth template (1) corresponds to TCONT of type 1 (type 1), where fix indicates fixed bandwidth, and fix-bandwidth indicates the specific value of the fixed bandwidth; the above TCONT bandwidth template (2) corresponds to TCONT of type 2 (type 2), where assure indicates guaranteed bandwidth, and assure-bandwidth indicates the specific value of guaranteed bandwidth;
[0133] The above TCONT bandwidth template (3) corresponds to type 3 TCONT, where assure indicates guaranteed bandwidth, assure-bandwidth indicates the specific value of guaranteed bandwidth, max indicates non-guaranteed maximum bandwidth, i.e., the sum of guaranteed bandwidth and non-guaranteed bandwidth, and max-bandwidth indicates the specific value of non-guaranteed maximum bandwidth;
[0134] The above TCONT bandwidth template (4) corresponds to type 4 TCONT, max indicates the best-effort bandwidth, max-bandwidth indicates the specific value of the best-effort bandwidth, the first priority indicates the priority of the corresponding TCONT, the second priority indicates the specific value of the priority, the first weight indicates the weight of the corresponding TCONT, and the second weight indicates the specific value of the weight.
[0135] The above TCONT bandwidth template (5) corresponds to a TCONT of type 5. For the meaning of each parameter, refer to the relevant descriptions in the above TCONT bandwidth templates (1) to (4). In the TCONT bandwidth template (5), additional-bandwidth indicates the bandwidth corresponding to max, i.e., non-assure bandwidth or best-effort bandwidth. When max corresponds to best-effort bandwidth, the TCONT bandwidth template (5) further includes priority and weight.
[0136] For each TCONT bandwidth template corresponding to each bandwidth type, the OLT can set multiple TCONT bandwidth templates corresponding to the bandwidth type, and the parameters in each TCONT bandwidth template are different. For example, the OLT can set two TCONT bandwidth templates (1), one TCONT bandwidth template (1) has a fixed bandwidth of 5 Mbps, that is, dba{type1 fix 5M}, and the other TCONT bandwidth template (1) has a fixed bandwidth of 3 Mbps, that is, 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}, the configured bandwidth of TCONT1 is a fixed bandwidth of 5Mbps.
[0138] According to the TCONT bandwidth template associated with each TCONT, the OLT generates a token bucket corresponding to each TCONT.
[0139] For a TCONT associated with a TCONT bandwidth template (1), the configured bandwidth of the TCONT is a fixed bandwidth. The OLT may calculate the product of the fixed bandwidth of the TCONT and the bandwidth allocation cycle length to obtain a first quantity; and generate a token bucket including the first quantity of tokens as the token bucket of the TCONT. Specifically, the OLT may 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] Among them, TokensFix represents the first quantity, R F is a fixed bandwidth, and Tsch is the bandwidth allocation cycle duration.
[0142] For a TCONT associated with the TCONT bandwidth template (2), the configured bandwidth of the TCONT is the guaranteed bandwidth. The OLT may calculate the product of the guaranteed bandwidth of the TCONT and the bandwidth allocation cycle length to obtain a second number; and generate a token bucket including the second number of tokens as the token bucket of the TCONT. Specifically, the OLT may 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] Among them, TokensAss is the second amount, R A To ensure bandwidth, Tsch is the bandwidth allocation cycle duration.
[0145] For the TCONT associated with the TCONT bandwidth template (3), the configured bandwidth of the TCONT includes a guaranteed bandwidth and a 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 cycle length to obtain a second number, and calculate the product of the non-guaranteed bandwidth of the TCONT and the bandwidth allocation cycle length to obtain a third number; generate a token bucket including the second number of tokens and a token bucket including the third number of tokens as two token buckets of the TCONT. Specifically, the OLT can use the following formulas (2) and (3) to obtain the token quantities 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 It is a non-guaranteed bandwidth, and Tsch is the bandwidth allocation cycle duration.
[0148] For a TCONT associated with a TCONT bandwidth template (4), the configured bandwidth of the TCONT includes a best-effort bandwidth. The OLT may calculate the product of the best-effort bandwidth of the TCONT and the bandwidth allocation cycle length to obtain a fourth quantity; and generate a token bucket including the fourth quantity of tokens as the token bucket of the TCONT. Specifically, the OLT may 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] Among them, TokensBE represents the fourth quantity, R BE For best effort bandwidth, Tsch is the bandwidth allocation cycle duration.
[0151] For a TCONT associated with a TCONT bandwidth template (5), the configured bandwidth of the TCONT includes a fixed bandwidth, a guaranteed bandwidth, and a non-guaranteed bandwidth, or the configured bandwidth of the TCONT includes a fixed bandwidth, a guaranteed bandwidth, and a best-effort bandwidth. If the configured bandwidth of the TCONT includes a fixed bandwidth, a guaranteed bandwidth, and a non-guaranteed bandwidth, the OLT may 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 including 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 a fixed bandwidth, a guaranteed bandwidth, and a best-effort bandwidth, 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 including 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 may determine the token bucket queue corresponding to each token bucket, and add each token bucket to the corresponding token bucket queue.
[0154] For example, OLT pre-sets four token bucket queues, namely, token bucket queue T1 corresponding to fixed bandwidth, token bucket queue T2 corresponding to guaranteed bandwidth, token bucket queue T3 corresponding to non-guaranteed bandwidth, and token bucket queue T4 corresponding to 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, OLT pre-sets three token bucket queues, namely, token bucket queue T5 corresponding to fixed bandwidth and guaranteed bandwidth, token bucket queue T3 corresponding to non-guaranteed bandwidth, and token bucket queue T4 corresponding to 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 using 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 using 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 using formula (4) to the token bucket queue T4.
[0156] For example, the type of TCONT1 is type 3. The OLT uses formula (2) to obtain the token bucket 1 corresponding to TCONT1, and uses formula (3) to obtain the 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 as to add the token bucket of each TCONT to the corresponding token bucket queue. The OLT can also pre-specify the priority of each TCONT, such as configuring the priority of the TCONT through the TCONT bandwidth template; using the priority of the TCONT, the OLT adds the token bucket of the TCONT to the token bucket queue corresponding to its priority.
[0158] In order to ensure the accuracy of bandwidth allocation, the embodiment of the present application also provides a dynamic bandwidth allocation method, such as Figure 6 As shown, the following steps may be included:
[0159] Step S601, determining whether the bandwidth template parameters of each TCONT are updated, and obtaining a 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 detect whether the bandwidth template parameters of each TCONT are updated at each bandwidth allocation period, or detect whether the bandwidth template parameters of each TCONT are updated by event triggering. The specific method of detecting whether the bandwidth template parameters of the TCONT are updated is not limited.
[0161] If no bandwidth template parameter update of the TCONT is detected, the OLT can directly execute step S603. When a bandwidth template parameter update of a TCONT is detected, the OLT can use the TCONT as the target TCONT, and the bandwidth template parameter of the target TCONT is the target bandwidth template parameter, which includes the configured bandwidth of the target TCONT, that is, the target configured bandwidth.
[0162] Step S602: If the determination result indicates that the target bandwidth template parameters of the target TCONT are updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters.
[0163] In the embodiment of the present application, if the target configured bandwidth includes a fixed bandwidth, the OLT can adjust the number of tokens included in the third token bucket corresponding to the target TCONT to the first token number, the first token number is the product of the fixed bandwidth and the bandwidth allocation cycle length, and 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, and the OLT can use formula (1) to calculate the first token number and update the third token bucket so that the third token bucket includes the first token number of tokens.
[0164] If the target configured bandwidth includes the guaranteed bandwidth, the OLT may adjust the number of tokens included in the fourth token bucket corresponding to the target TCONT to the second token number, the second token number being the product of the guaranteed bandwidth and the bandwidth allocation cycle length, and the fourth token bucket corresponding to the guaranteed bandwidth. That is, the fourth token bucket is located in the token bucket queue corresponding to the guaranteed bandwidth, the OLT may calculate the second token number using formula (2), and update the fourth token bucket so that the fourth token bucket includes the second token number of tokens.
[0165] If the target configured bandwidth includes the best-effort bandwidth, the OLT may adjust the number of tokens included 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 cycle length, and 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, and the OLT may 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; the number of tokens included in the second token bucket corresponding to the target TCONT is adjusted to the fourth token number, the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation cycle length, 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 the embodiment of the present application, the OLT can obtain the required number of tokens according to 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 formula (1) to formula (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 of the token bucket queues;
[0169] Step S604, according to the number of tokens included in each token bucket in the traversed token bucket queue, a bandwidth authorization value is allocated to the TCONT corresponding to each token bucket, until the remaining bandwidth is empty, or the traversal of multiple token bucket queues is completed;
[0170] Step S605, generating a bandwidth map using the bandwidth authorization value allocated to each TCONT;
[0171] Step S606: Send the bandwidth mapping to the ONU in the passive optical network.
[0172] The above steps S603 to S606 are the same as the above steps S101 to S104 and will not be described again here.
[0173] In the technical solution provided by the embodiment of the present application, before allocating bandwidth authorization value to TCONT, OLT first updates token bucket according to bandwidth template parameters, which effectively ensures that bandwidth is subsequently allocated according to accurate token bucket and improves the accuracy of bandwidth allocation.
[0174] In the embodiment of the present application, the specific implementation of the above step S102 is different according to the different bandwidth types and priorities corresponding to the token bucket queues. Take the bandwidth types including fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth and best-effort bandwidth, that is, the token bucket queue includes a token bucket queue corresponding to the fixed bandwidth, a token bucket queue corresponding to the guaranteed bandwidth, a token bucket queue corresponding to the non-guaranteed bandwidth and a token bucket queue corresponding to the best-effort bandwidth as an example. In the embodiment of the present application, the hybrid bandwidth can be decomposed into fixed bandwidth, guaranteed bandwidth, non-guaranteed bandwidth and best-effort bandwidth, and the corresponding token buckets are added to the four token bucket queues respectively.
[0175] In this case, the above step S102 can be divided into the following five cases:
[0176] In case 1, the token bucket queue traversed is a token bucket queue corresponding to a fixed bandwidth, such as a third token bucket queue. The token bucket in the third token bucket queue is the third token bucket, and the TCONT corresponding to the third token bucket is the third TCONT. If the token bucket queue traversed is the third token bucket queue corresponding to a fixed bandwidth, the OLT can determine the number of tokens included in each third token bucket as the third bandwidth authorization value of the third TCONT corresponding to each third token bucket.
[0177] For each third token bucket, the OLT may determine the number of tokens included in the third token bucket as the fixed bandwidth authorization value of the third TCONT corresponding to the third token bucket, that is, the third bandwidth authorization value. The allocation of the third bandwidth authorization value may be expressed as:
[0178] GrantSize_1 i =TokensFix i ;
[0179] Among them, GrantSize_1 i Indicates TCONT i The third bandwidth authorization value, TokensFix i TCONT i The number of tokens included in the corresponding third token bucket.
[0180] Still Figure 2 Take this as an example. The OLT traverses to the token bucket queue T1 (i.e., the third token bucket queue), which includes TCONT 11 、TCONT 12 , …, TCONT 1N1 The corresponding N1 token bucket (i.e., the third token bucket). The OLT will TCONT 11 The number of tokens in the corresponding token bucket TokensFix 11 Determined as TCONT 11 The bandwidth authorization value of TCONT is 11 (i.e., the third bandwidth authorization value); 12 The number of tokens in the corresponding third token bucket TokensFix 12 Determined as TCONT 12 The bandwidth authorization value is 12 (ie, the third bandwidth authorization value); TCONT 1N1 The number of tokens in the corresponding token bucket TokensFix 1N1 , determined as TCONT 1N1 The bandwidth authorization value is 1N1 (ie, the third bandwidth authorization value).
[0181] In the embodiment of the present application, the fixed bandwidth can be the bandwidth type with the highest priority, and the corresponding token bucket queue is the token bucket queue with the highest priority. This part of the bandwidth is fixedly allocated to the user. Even if the user does not use the fixed bandwidth, other users cannot occupy it. Each bandwidth allocation cycle allocates a fixed size of bandwidth authorization value to the user, regardless of the user's bandwidth request.
[0182] Case 2: The traversed token bucket queue is the token bucket queue corresponding to the guaranteed bandwidth, such as the fourth token bucket queue. The token bucket in the fourth token bucket queue is the fourth token bucket, and the TCONT corresponding to the fourth token bucket is the fourth TCONT. The fourth TCONT may be the same as or different from the third TCONT. If the traversed token bucket queue is the fourth token bucket queue corresponding to the guaranteed bandwidth, the OLT may calculate the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value allocated to the fourth TCONT to obtain the fourth requested bandwidth of each fourth TCONT; the minimum value of 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.
[0183] In the embodiment of the present application, the first requested bandwidth is the bandwidth originally requested by TCONT, such as TCONT can report the first requested bandwidth to OLT through DBA report. The fourth requested bandwidth is the remaining requested bandwidth of CONT that has not been authorized. In addition to corresponding to the guaranteed bandwidth, the fourth TCONT can also correspond to other bandwidths. Therefore, before allocating the guaranteed bandwidth to the fourth TCONT, it is likely that the bandwidth authorization value has been allocated to the fourth TCONT.
[0184] For example, a fourth TCONT also corresponds to a fixed bandwidth, and the third token bucket queue includes the token bucket corresponding to the fourth TCONT, 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. The OLT first traverses the third token bucket queue and allocates a third bandwidth authorization value to the fourth TCONT; then traverses the fourth token bucket queue, calculates the difference between the first requested bandwidth of the fourth TCONT and the third bandwidth authorization value, and obtains 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 allocated to the fourth TCONT to obtain the fourth requested bandwidth of the fourth TCONT; the minimum value of the number of tokens included 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, that is, the fourth bandwidth authorization value. The allocation of the fourth bandwidth authorization value can be expressed as:
[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 Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the third bandwidth authorization value, GrantSize_2 i Indicates TCONT i The fourth bandwidth authorization value, TokensAss i TCONT i The number of tokens in the corresponding fourth token bucket, Request_1 i Indicates TCONT i The first request bandwidth, Request_2 i Indicates TCONT i The fourth requested bandwidth.
[0189] Still Figure 2 After the OLT completes allocating bandwidth authorization values for TCONT corresponding to each token bucket included in the token bucket queue T1, it traverses the token bucket queue T2 (i.e., the fourth token bucket queue). 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 number of tokens included in the corresponding token bucket is TokensAss 21 The OLT can calculate TCONT 21 The fourth request bandwidth Request 21 -0, Request 21 , select Request 21 and TokensAss 21The minimum value in Request 21 , and then, Request 21 As TCONT 21 The bandwidth authorization value is 21 (ie, the fourth bandwidth authorization value).
[0191] For TCONT 12 , OLT has been TCONT 12 The third bandwidth authorization value TokensFix is allocated 12 , TCONT 12 The first request bandwidth is Request 12 , TCONT 12 The number of tokens included in the corresponding fourth token bucket is TokensAss 12 The 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 TokensAss 12 , and then TokensAss 12 As TCONT 12 The bandwidth authorization value is 22 (ie, the fourth bandwidth authorization 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 number of tokens included in the corresponding token bucket is TokensAss 2N2 The OLT can calculate TCONT 2N2 The fourth request bandwidth Request 2N2 -0, Request 2N2 , select Request 2N2 and TokensAss 2N2 The minimum value in Request 2N2 , and then, Request 2N2 As TCONT 2N2 The bandwidth authorization value is 2N2 (ie, the fourth bandwidth authorization value).
[0193] In the embodiment of the present application, the priority of the guaranteed bandwidth can be lower than the priority of the fixed bandwidth, that is, the priority of the fourth token bucket queue corresponding to the guaranteed bandwidth is lower than the priority of the third token bucket queue corresponding to the fixed bandwidth. After the bandwidth allocation for each TCONT corresponding to the first token bucket queue is completed, if there is still residual bandwidth, the bandwidth allocation for each TCONT corresponding to the fourth token bucket queue will continue. Guaranteed bandwidth is to ensure that the bandwidth available when the TCONT needs to use the bandwidth. When the actual flow of the fourth TCONT does not reach the guaranteed bandwidth, the DBA mechanism can allocate its remaining bandwidth to the business of other TCONTs. Therefore, it is necessary to calculate the required bandwidth authorization value according to the real-time bandwidth request of TCONT (such as residual buffer or residual bandwidth) and the number of tokens.
[0194] In case 3, the token bucket queue traversed is a token bucket queue corresponding to a fixed bandwidth and a guaranteed bandwidth, such as the fifth token bucket queue. The fifth token bucket queue includes a third token bucket corresponding to a fixed bandwidth and a fourth token bucket corresponding to a guaranteed bandwidth, that is, the configured bandwidth indicated by the third token bucket is a fixed bandwidth, and the configured bandwidth indicated by the fourth token bucket is a guaranteed bandwidth. The TCONT corresponding to the token bucket in the fifth token bucket queue is the fifth TCONT, and the fifth TCONT, the fourth TCONT and the third TCONT may be the same or different. A token bucket corresponding to the fifth TCONT may include the third token bucket, or include the fourth token bucket, or include the third token bucket and the fourth token bucket, and this is not limited.
[0195] If the traversed token bucket queue is the fifth token bucket queue corresponding to the fixed bandwidth and the guaranteed bandwidth, the OLT can 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; 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, 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, the minimum value of the fifth token number corresponding to each fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of each fifth TCONT.
[0196] In the embodiment of the present application, the first requested bandwidth is the bandwidth originally requested by the TCONT. For example, the TCONT may report the first requested bandwidth to the OLT through a DBA report.
[0197] The OLT obtains the third token bucket and the fourth token bucket corresponding to the same fifth TCONT, and for each fifth TCONT, calculates the sum of the number of tokens in the third token bucket and the fourth token bucket corresponding to the fifth TCONT, and obtains the fifth token number corresponding to the fifth TCONT. Afterwards, the OLT can compare the first requested bandwidth of the fifth TCONT, the fifth token number, and the number of tokens included in the third token bucket corresponding to the fifth TCONT; if the first requested bandwidth of the fifth TCONT is less than or equal to the number of tokens in the third token bucket corresponding to the fifth TCONT, the number of tokens included in the third token bucket corresponding to the fifth TCONT is determined as the fifth bandwidth authorization value of the fifth TCONT; if the first requested bandwidth of the fifth TCONT is greater than the number of tokens in the third token bucket corresponding to the fifth TCONT, the minimum value of the fifth token number corresponding to the fifth TCONT and the first requested bandwidth is determined as the fifth bandwidth authorization value of the fifth TCONT.
[0198] The allocation of the fifth bandwidth authorization value can be expressed as:
[0199] TokensFA i =TokensFix i +TokensAss i ;
[0200]
[0201] Among them, GrantSize_5 i Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the fifth bandwidth authorization value, TokensFix i TCONT i The number of tokens in the corresponding third token bucket, TokensAss i TCONT i The number of tokens in the corresponding fourth token bucket, TokensFA i TCONT i The corresponding fifth token quantity, Request_1 i Indicates TCONT i The first request bandwidth.
[0202] Still Figure 5 Take this as an example. The OLT traverses to the token bucket queue T5 (i.e., the fifth token bucket queue), which 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 A token bucket (i.e., the fourth token bucket).
[0203] TCONT 12 For example, for TCONT 12 , TCONT 12 The first request bandwidth is Request 12 , TCONT 12 The number of tokens included in the corresponding third token bucket is TokensFix 12 , TCONT 12 The number of tokens included in the corresponding fourth token bucket is TokensAss 12 , OLT can calculate TokensFA 12 =TokensFix 12 +TokensAss 12 .
[0204] If Request 12 ≤TokensFix 12 , then OLT will TokensFix 12 As TCONT 12 The bandwidth authorization value is 52 (the fifth bandwidth authorization value); if Request 12 >TokensFix 12 , then OLT selects TokensFA 12 and Request 12 The minimum value in Request 12 , and then, Request 12 As TCONT 12 The bandwidth authorization value is 52 (i.e., the fifth bandwidth authorization value).
[0205] In case 4, the token bucket queue traversed is a token bucket queue corresponding to a non-guaranteed bandwidth, such as the second token bucket queue. The token bucket in the second token bucket queue is the second token bucket, and the TCONT corresponding to the second token bucket is the second TCONT. The second TCONT, the fourth TCONT and the third TCONT may be the same or different.
[0206] If the traversed token bucket queue is the second token bucket queue corresponding to the 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 allocated to the second TCONT, and obtain the third requested bandwidth of each second TCONT; calculate the proportion of the bandwidth sum value of each second TCONT in the bandwidth sum value of all second TCONTs, and obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum value is the sum of the fixed bandwidth and the guaranteed bandwidth; calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth, and obtain the second allocatable bandwidth corresponding to each second TCONT; and determine 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 allocatable bandwidth as the second bandwidth authorization value of each second TCONT.
[0207] In the embodiment of the present application, the first requested bandwidth is the bandwidth originally requested by TCONT, such as TCONT can report the first requested bandwidth to OLT through DBA report. The third requested bandwidth is the remaining requested bandwidth of TCONT that has not been authorized. In addition to corresponding to non-guaranteed bandwidth, the second TCONT can also correspond to guaranteed bandwidth and other bandwidths. Before allocating guaranteed bandwidth to the second TCONT, it is likely that a bandwidth authorization value has been allocated to the second TCONT. The remaining bandwidth is the bandwidth remaining after deducting the allocated bandwidth authorization value from the total bandwidth that can be allocated in a bandwidth allocation cycle.
[0208] For example, a second TCONT also corresponds to a guaranteed bandwidth, and the fourth token bucket queue includes the token bucket corresponding to the second TCONT, that is, the second TCONT is also a fourth TCONT, and the priority of the fourth token bucket queue is higher than the priority of the second token bucket queue. The OLT first traverses the fourth token bucket queue and allocates a fourth bandwidth authorization value to the second TCONT; then traverses the second token bucket queue, calculates the difference between the first requested bandwidth of the second TCONT and the fourth bandwidth authorization value, and obtains the third requested bandwidth of the second TCONT.
[0209] For each second TCONT, the OLT calculates the difference between the first requested bandwidth of the second TCONT and the bandwidth authorization value allocated to the second TCONT to obtain the third requested bandwidth of the second TCONT; 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, that is, the second bandwidth proportion; calculates the product of the second bandwidth proportion of the second TCONT and the remaining bandwidth to obtain the allocatable bandwidth corresponding to the second TCONT, that is, the second allocatable bandwidth; determines the minimum value among the number of tokens included in the second token bucket corresponding to the second TCONT, the third requested bandwidth corresponding to the second TCONT, and the second allocatable bandwidth corresponding to the second TCONT, and determines the minimum value as the non-guaranteed bandwidth authorization value of the second TCONT, that is, 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 Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the third bandwidth authorization value, GrantSize_2 i Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the fourth bandwidth authorization value, GrantSize_4 i Indicates TCONT i The second bandwidth authorization value, Request_1 i Indicates TCONT i The first request bandwidth, Request_4 i Indicates TCONT i The third requested bandwidth, R NA i Indicates TCONT iThe second allocatable bandwidth is Remainband, and sum i Indicates TCONT i The sum of the fixed bandwidth and guaranteed bandwidth of the second TCONT. SUM represents the sum of the fixed bandwidth and guaranteed bandwidth of all second TCONTs. TokensNA i TCONT i The number of tokens included in the corresponding second token bucket.
[0214] Still Figure 2 After the OLT completes allocating bandwidth authorization values for TCONT corresponding to each token bucket included in token bucket queues T1 and T2, it traverses token bucket queue T3 (i.e., the second token bucket queue). 31 、TCONT 12 、TCONT 33 , …, TCONT 3N3 The corresponding N3 token buckets (i.e., the second token buckets).
[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 number of tokens included in the corresponding token bucket is TokensNA 31 The OLT can calculate TCONT 31 The third request bandwidth Request 31 -0, 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 Request 31 , and then, Request 31 As TCONT 31 The bandwidth authorization value is 31 (ie, the second bandwidth authorization value).
[0216] For TCONT 12 , OLT has been TCONT 12 The third bandwidth authorization value TokensFix is allocated 12And the fourth bandwidth authorization value TokensAss 12 , TCONT 12 The first request bandwidth is Request 12 , TCONT 12 The number of tokens included in the corresponding second token bucket is TokensNA 12 .
[0217] OLT can calculate TCONT 12 The 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 R NA 12 , and then R NA 12 As TCONT 12 The bandwidth authorization value is 32 (ie, the second bandwidth authorization 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 number of tokens included in the corresponding token bucket is TokensNA 3N3 The OLT can calculate TCONT 3N3 The third request bandwidth Request 3N3 -0, 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 Request3N3 , and then, Request 3N3 As TCONT 3N3 The bandwidth authorization value is 3N3 (i.e., the second bandwidth authorization value).
[0219] In the embodiment of the present application, in the case where the traversed token bucket queue is the second token bucket queue corresponding to the non-guaranteed bandwidth, the OLT may not consider the second bandwidth proportion. That is, if the traversed token bucket queue is the second token bucket queue corresponding to the non-guaranteed bandwidth, the OLT may calculate the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value allocated to the second TCONT to obtain the third requested bandwidth of each second TCONT; the minimum value of 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 the second bandwidth authorization value to each second TCONT, the OLT may also traverse each second TCONT in order of the bandwidth growth rate of the second TCONT from large to small; increase the second bandwidth authorization value of the traversed second TCONT by the bandwidth authorization value of a second preset percentage to obtain a new second bandwidth authorization 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 the embodiment of the present application, the preset growth rate can be set according to actual needs, and the second preset percentage can be set according to actual needs, such as the second preset percentage can be 5%, 10%, etc. After completing the allocation of 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 this 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 traverses the second TCONT in the order of bandwidth growth rate from large to small.
[0222] If the bandwidth growth rate of the traversed second TCONT is greater than or equal to the preset growth rate and there is remaining bandwidth, the OLT increases the second bandwidth authorization value of the traversed second TCONT by the second preset percentage of the bandwidth authorization value to obtain a new second bandwidth authorization value. The OLT can update the second bandwidth authorization value of the second TCONT currently traversed in the authorization table to the new second bandwidth authorization value.
[0223] If the bandwidth growth rate of the traversed second TCONT is less than the preset growth rate, or the remaining bandwidth is empty, the OLT stops traversing the second TCONT and ends bandwidth allocation to the second TCONT.
[0224] In the embodiment of the present application, the OLT can monitor the bandwidth request status such as the requested bandwidth and bandwidth growth rate of the TCONT in real time, and dynamically adjust the bandwidth authorization value according to the real-time bandwidth request status, which can effectively deal with the packet loss problem caused by short-term traffic bursts and improve the utilization rate of short-term bandwidth. In the long-term bandwidth allocation, the OLT will use the token bucket of the TCONT with a large short-term bandwidth growth rate to make up for the token bucket of the TCONT with a small short-term bandwidth growth rate, ensuring the long-term work card allocation bandwidth and improving the service quality of network resources.
[0225] In an embodiment of the present application, the priority of non-guaranteed bandwidth may be lower than the priority of guaranteed bandwidth, that is, the priority of the second token bucket queue corresponding to the non-guaranteed bandwidth is lower than the priority of the fourth token bucket queue corresponding to the guaranteed bandwidth, or the priority of the second token bucket queue is lower than 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 allocation for each TCONT corresponding to the second token bucket queue continues. Non-guaranteed bandwidth refers to the maximum additional bandwidth value that a user can use. The bandwidth is allocated according to the proportion of the sum of the fixed bandwidth and the guaranteed bandwidth of each TCONT in the second token bucket queue according to the following formula, that is, first calculate the proportion of the remaining bandwidth, and then allocate the bandwidth authorization value according to 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 Indicates TCONT i The second allocatable bandwidth, R F i Indicates TCONT i The fixed bandwidth, R A i Indicates TCONT i The guaranteed bandwidth, R NA j Indicates TCONT j The second allocatable bandwidth, R F j Indicates TCONT j The fixed bandwidth, R A jIndicates TCONT j guaranteed bandwidth.
[0228] Based on the above proportional relationship, OLT can determine the allocatable bandwidth R of each TCONT when allocating non-guaranteed bandwidth. NA i =Remainband×sum i / SUM.
[0229] In case 5, the token bucket queue traversed is a token bucket queue corresponding to the best-effort bandwidth, such as the first token bucket queue. The token bucket in the first token bucket queue is the first token bucket, and the TCONT corresponding to the first token bucket is the first TCONT. The first TCONT, the fourth TCONT and the third TCONT may be the same or different.
[0230] In the embodiment of the present application, if the token bucket queue traversed is the first token bucket queue corresponding to the best-effort bandwidth, the OLT can allocate the first bandwidth authorization value to each first TCONT according to 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 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 weights 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 allocatable bandwidth corresponding to each first TCONT; determine 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 allocatable bandwidth as the first bandwidth authorization value of each first TCONT.
[0231] In the embodiment of the present application, the first token bucket queue may include multiple token bucket sub-queues. If the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, the OLT may traverse the multiple token bucket sub-queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue; and 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 sub-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 sub-queues is completed.
[0232] In some embodiments, the above-mentioned allocating the 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 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 sub-queue and the bandwidth authorization value allocated to the first TCONT, to obtain the second requested bandwidth of each first TCONT; calculating the proportion of the allocation weight of each first TCONT in the allocation weights of all first TCONTs in the traversed token bucket sub-queue, to obtain the first bandwidth proportion of each first TCONT; calculating the product of the first bandwidth proportion of each first TCONT and the remaining bandwidth, to obtain the first allocatable 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 allocatable bandwidth as the first bandwidth authorization value of each first TCONT.
[0233] In the embodiment of the present application, the first requested bandwidth is the bandwidth originally requested by TCONT, such as TCONT can report the first requested bandwidth to OLT through DBA report. The second requested bandwidth is the remaining requested bandwidth of TCONT that has not been authorized. In addition to the best effort bandwidth, the first TCONT can also correspond to fixed bandwidth, guaranteed bandwidth and other bandwidths. Before the best effort bandwidth is allocated to the first TCONT, the bandwidth authorization value may have been allocated to the first TCONT.
[0234] For example, a first TCONT also corresponds to a guaranteed bandwidth, and the fourth token bucket queue includes the token bucket corresponding to the first TCONT, that is, the first TCONT is also a fourth TCONT, and the priority of the fourth token bucket queue is higher than the priority of the first token bucket queue. The OLT first traverses the fourth token bucket queue and allocates a fourth bandwidth authorization value to the first TCONT; then traverses the first token bucket queue, calculates the difference between the first requested bandwidth of the first TCONT and the fourth bandwidth authorization value, and obtains the second requested bandwidth of the first TCONT.
[0235] For the first TCONT corresponding to each first token bucket 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 allocated to the first TCONT, and obtains the second requested bandwidth of each first TCONT; calculates the proportion of the allocation weight of the first TCONT in the allocation weights of all first TCONTs in the currently traversed token bucket subqueue, and obtains the bandwidth proportion of the first TCONT, that is, the first bandwidth proportion; calculates the product of the first bandwidth proportion of the first TCONT and the remaining bandwidth, and obtains the allocatable bandwidth corresponding to the first TCONT of the bandwidth proportion, that is, the first allocatable bandwidth; determines the minimum value among the number of tokens included in the first token bucket corresponding to the first TCONT, the second requested bandwidth corresponding to the first TCONT, and the first allocatable bandwidth corresponding to the first TCONT, and uses the 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 Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the third bandwidth authorization value, GrantSize_2 i Indicates that it has been TCONT i The allocated bandwidth authorization value, such as the fourth bandwidth authorization value, GrantSize_3 i Indicates TCONT i The first bandwidth authorization value, Request_1 i Indicates TCONT i The first request bandwidth, Request_3 i Indicates TCONT i The second requested bandwidth, RBE i Indicates TCONT i The first allocatable bandwidth, Remainband is the remaining bandwidth, W i Indicates TCONT i The allocation weight, W i The size of can be set by the weight in the TCONT bandwidth template (4) above, W SUM Indicates the sum of the allocation weights of all the first TCONTs in the token bucket subqueue currently traversed, TokensBE i TCONT i The number of tokens included in the corresponding first token bucket.
[0240] Still Figure 2 After the OLT completes allocating bandwidth authorization values for TCONT corresponding to each token bucket included in token bucket queues T1, T2, and T3, it traverses token bucket queue T4 (i.e., the first token bucket queue), which includes TCONT. 11 、TCONT 42 , …, TCONT 4N4 The corresponding N4 token buckets (ie, the first token bucket). The token bucket queue T4 includes multiple token bucket sub-queues, such as the token bucket sub-queue T41 {TCONT 11 Corresponding token bucket, TCONT 42 Corresponding token bucket, TCONT 43 Corresponding token bucket}, token bucket subqueue T42{TCONT 44 Corresponding token bucket, TCONT 45 Corresponding token bucket, TCONT 46 The corresponding token bucket}, etc. The priority of the token bucket sub-queue T41 is higher than the priority of the token bucket sub-queue T42, and the priority of the token bucket sub-queue T42 is higher than the priorities of other token bucket sub-queues.
[0241] The OLT first traverses to the token bucket subqueue T41. When traversing to the token bucket subqueue T41, the token bucket subqueue T41 {TCONT 11 Corresponding token bucket, TCONT 42 Corresponding token bucket, TCONT 43 Corresponding token bucket}.
[0242] For TCONT 11 , OLT has been TCONT 11 The third bandwidth authorization value TokensFix is allocated 11 , TCONT 11 The first request bandwidth is Request11 , TCONT 11 The number of tokens included in the corresponding first token bucket is TokensBE 11 The 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 , select R BE 11 、(Request 11 -TokensFix 11 ) and TokensBE 11 The minimum value in , such as TokensBE 11 , and then, TokensBE 11 As TCONT 11 The bandwidth authorization value is 41 (ie, the first bandwidth authorization 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 number of tokens included in the corresponding first token bucket is TokensBE 42 The 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 , select R BE 42 、Request 42 and TokensBE 42 The minimum value in , such as TokensBE 42 , and then, TokensBE 42 As TCONT 42 The bandwidth authorization value is 42 (ie, the first bandwidth authorization value).
[0244] Similarly, OLT determines TCONT43 The bandwidth authorization value is 43 (ie, the first bandwidth authorization value).
[0245] At this point, the bandwidth allocation of TCONTs corresponding to all token buckets included in the token bucket subqueue T41 is completed. If there is any remaining bandwidth, continue to traverse the token bucket subqueue T42. For the bandwidth allocation process of TCONTs corresponding to the token buckets included in the token bucket subqueue T42, refer to the bandwidth allocation process of TCONTs corresponding to the token buckets included in the token bucket subqueue T41, which will not be repeated here. If the remaining bandwidth is empty, the token bucket subqueue T42 will no longer be traversed.
[0246] In the embodiment of the present application, in the case where the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, the OLT may also not consider the first bandwidth proportion. That is, the above allocation of the 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 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 sub-queue and the bandwidth authorization value 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 allocatable 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 allocatable bandwidth as the first bandwidth authorization value of each first TCONT.
[0247] In some embodiments, after allocating a first bandwidth authorization value to each first TCONT, the OLT may also traverse the first TCONT corresponding to each first token bucket in the target token bucket subqueue in order of the bandwidth growth rate of the first TCONT from large to small, where the target token bucket subqueue is the token bucket subqueue currently traversed; increase the first bandwidth authorization value of the traversed first TCONT by a first preset percentage of the 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.
[0248] In the embodiment of the present application, the preset growth rate can be set according to actual needs, and the first preset percentage can be set according to actual needs, such as the first preset percentage can be 5%, 10%, etc. After completing the allocation of the first bandwidth authorization value for all first TCONTs corresponding to the current token subqueue, for each first TCONT corresponding to the current token subqueue, the OLT can compare the actual bandwidth used by the first TCONT in this 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 TCONT corresponding to the current token subqueue in order of bandwidth growth rate from large to small.
[0249] If the bandwidth growth rate of the traversed first TCONT is greater than or equal to the preset growth rate, and there is remaining bandwidth, the OLT increases the first bandwidth authorization value of the traversed first TCONT by the first preset percentage of the bandwidth authorization value to obtain a new first bandwidth authorization value. The OLT can update the first bandwidth authorization value of the first TCONT currently traversed in the authorization table to the new first bandwidth authorization value. If the bandwidth growth rate of the traversed first TCONT is less than the preset growth rate, or the remaining bandwidth is empty, the OLT stops traversing the first TCONT and ends the bandwidth allocation to the first TCONT.
[0250] With token bucket queue T41{TCONT 11 Corresponding token bucket, TCONT 42 Corresponding token bucket, TCONT 43 Corresponding token bucket}, token bucket subqueue T42{TCONT 44 Corresponding token bucket, TCONT 45 Corresponding token bucket, TCONT 46 The first preset percentage is 5% for example. 11 、TCONT 42 、TCONT 43 After allocating bandwidth authorization values 41 to 43, traverse TCONT 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, OLT traverses to TCONT 11 , if TCONT 11 If the bandwidth growth rate is less than the preset growth rate, or the remaining bandwidth is empty, there is no need to update the bandwidth authorization value 41, and stop traversing TCONT; if TCONT 11If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, the bandwidth authorization value 41 is updated to (1+5%) bandwidth authorization value 41;
[0251] After that, OLT traverses to TCONT 42 , if TCONT 42 If the bandwidth growth rate is less than the preset growth rate, or the remaining bandwidth is empty, there is no need to update the bandwidth authorization value 42, and stop traversing TCONT; if TCONT 42 If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, the bandwidth authorization value 42 is updated to (1+5%) bandwidth authorization value 42;
[0252] After that, traverse to TCONT 43 , if TCONT 43 If the bandwidth growth rate is less than the preset growth rate, or the remaining bandwidth is empty, there is no need to update the bandwidth authorization value 43, and the traversal of TCONT is stopped; TCONT 423 If the bandwidth growth rate is greater than or equal to the preset growth rate and there is remaining bandwidth, the bandwidth authorization value 43 is updated to (1+5%) bandwidth authorization value 43.
[0253] After the bandwidth authorization value 43 is updated, if there is any remaining bandwidth, the OLT continues to update the TCONT corresponding to the token bucket sub-queue T42. 44 、TCONT 45 、TCONT 46 The bandwidth is allocated. The principle of allocation is the same as the principle of allocating bandwidth to TCONT corresponding to the token bucket sub-queue T41, which will not be repeated here.
[0254] In the embodiment of the present application, the OLT can monitor the bandwidth request status such as the requested bandwidth and bandwidth growth rate of the TCONT in real time, and dynamically adjust the bandwidth authorization value according to the real-time bandwidth request status, which can effectively deal with the packet loss problem caused by short-term traffic bursts and improve the utilization rate of short-term bandwidth. In the long-term bandwidth allocation, the OLT will use the token bucket of the TCONT with a large short-term bandwidth growth rate to make up for the token bucket of the TCONT with a small short-term bandwidth growth rate, ensuring the long-term work card allocation bandwidth and improving the service quality of network resources.
[0255] In the embodiment of the present application, the priority of the best-effort bandwidth may be lower than the priority of the non-guaranteed bandwidth, that is, the priority of the first token bucket queue corresponding to the best-effort bandwidth is lower than the priority of the second token bucket queue corresponding to the 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 the bandwidth. The OLT can schedule based on the priority and weight in the TCONT bandwidth template (4), that is, sort the token buckets in the first token bucket queue corresponding to the best-effort bandwidth according to the priority, and allocate bandwidth to the token buckets in the token bucket sub-queues of the same priority according to the weight, where the priority and weight are user-configured parameters. In the token bucket sub-queues of the same priority, the proportion of the remaining bandwidth occupied by each TCONT is as follows.
[0257] R BE i / W i =R BE j / W j ;
[0258] Among them, R BE i Indicates TCONT i The first allocatable bandwidth, R BE j Indicates TCONT j The first allocatable bandwidth, W i Indicates TCONT i The weight (i.e., the distribution weight), W j Indicates TCONT j The weight of (i.e., the distribution weight).
[0259] Based on the above proportional relationship, OLT can determine the allocatable bandwidth R of each TCONT when allocating best-effort bandwidth. BE i =Remainband×W i / W SUM .
[0260] Combine the following Figure 7 The bandwidth allocation process shown is used to illustrate the dynamic bandwidth allocation method provided in the embodiment of the present application.
[0261] Step S701: OLT detects whether to update OMCI configuration.
[0262] In step S701, the OLT detects whether the bandwidth template parameters of each TCONT are updated. If so, for example, the bandwidth template parameters of one TCONT are updated, it means that the OMCI configuration is updated, and step S702 is executed; if not, that is, the bandwidth template parameters of each TCONT are not updated, it means that the OMCI configuration is not updated, and step S703 is executed.
[0263] Step S702: OLT generates a token bucket corresponding to TCONT with updated bandwidth template parameters, and then executes step S703.
[0264] If the bandwidth template parameters of a TCONT are updated, the OLT updates the token bucket corresponding to the TCONT.
[0265] 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, determines 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, execute step S704; if it is the last token bucket, that is, the last TCONT to be allocated bandwidth, execute step S707.
[0268] The OLT may traverse the token bucket queue based on cases 1, 2, 4, and 5 in the above step S102, or may traverse the token bucket queue based on cases 3 to 5 in the above step S102. Traversing the token bucket queue based on cases 3 to 5 in the above step S102 can reduce the number of traversals and shorten the traversal time, thereby traversing more TCONTs within a fixed scheduling cycle, increasing the TCONT specifications supported by the OLT, and reducing the latency of the ONU in sending upstream data.
[0269] Step S704: OLT obtains the requested bandwidth of 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 a bandwidth allocation algorithm.
[0272] In step S705, the OLT may 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] Step S706, the OLT determines whether there is any remaining bandwidth. If there is any remaining bandwidth, the process returns to step S703 and continues to traverse the token bucket queue; if there is no remaining bandwidth, the process proceeds to step S707.
[0274] Step S707: The OLT generates a bandwidth authorization table.
[0275] In the embodiment of the present application, the OLT may allocate multiple bandwidth authorization values to a TCONT. For example, for a TCONT that uses non-guaranteed bandwidth to transmit data, the OLT may allocate a fourth bandwidth authorization value and a second bandwidth authorization value to the TCONT. In the bandwidth authorization table, the bandwidth authorization value of a TCONT is: the sum of multiple bandwidth authorization values allocated by the OLT to the TCONT.
[0276] In step S708, the OLT determines whether the timing interrupt flag is set; if not, continue to execute step S708; if so, execute step S709.
[0277] Step S709: The OLT generates a bandwidth map BWmap and sends the BWmap.
[0278] In the technical solution provided by the embodiment of the present application, token bucket queues of multiple priorities are pre-set in the OLT, and each token bucket queue includes token buckets corresponding to one or more TCONTs, and the number of tokens included in a token bucket is the configuration bandwidth of the corresponding TCONT. In each bandwidth allocation cycle, the OLT traverses the token bucket queues in a descending order according to the priority of the token bucket queues, and allocates bandwidth to the TCONT corresponding to the token buckets with high priority in priority, thereby ensuring the bandwidth demand with high priority and ensuring that all TCONTs obtain bandwidth resources fairly in a long time. In addition, in each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values to the TCONT according to the number of tokens included in the token bucket, and generates bandwidth mapping, which is sent to the ONU. In the embodiment of the present application, the OLT uses the token bucket to pre-set the configuration bandwidth of each TCONT, and when dynamically allocating bandwidth to the TCONT, there is no need to repeatedly calculate the configuration bandwidth, which reduces the task amount during bandwidth allocation, and the bandwidth allocation is simpler to implement, thereby reducing the delay of dynamic bandwidth allocation and reducing the delay of ONU sending uplink data.
[0279] Corresponding to the above-mentioned dynamic bandwidth allocation method, the embodiment of the present application also provides a dynamic bandwidth allocation device, such as Figure 8 As shown, an OLT in a passive optical network is applied, a plurality of token bucket queues are set in the OLT, each token bucket queue corresponds to a priority, each token bucket included 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 device includes:
[0280] The traversal module 801 is used to traverse multiple token bucket queues in descending order of priority of the token bucket queues in each bandwidth allocation cycle;
[0281] The allocation module 802 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 multiple token bucket queues is completed;
[0282] A generating module 803, configured to generate a bandwidth map using the bandwidth authorization value allocated to each TCONT;
[0283] The sending module 804 is used to send the bandwidth mapping to the ONU in the passive optical network.
[0284] In the technical solution provided by the embodiment of the present application, token bucket queues of multiple priorities are pre-set in the OLT, each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens included in a token bucket is the configured bandwidth of the corresponding TCONT. In each bandwidth allocation cycle, the OLT traverses the token bucket queues in order from high to low priority of the token bucket queues to give priority to allocating bandwidth to the TCONT corresponding to the high-priority token buckets, thereby ensuring high-priority bandwidth requirements and ensuring that all TCONTs obtain bandwidth resources fairly over a long period of time.
[0285] In addition, in each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values to the TCONT according to the number of tokens included in the token bucket, and generate a bandwidth map and send it to the ONU. In the embodiment of the present application, the OLT uses the token bucket to pre-set the configuration bandwidth of each TCONT. When dynamically allocating bandwidth to the TCONT, there is no need to repeatedly calculate the configuration bandwidth, which reduces the amount of bandwidth allocation tasks, makes bandwidth allocation simpler, and thus reduces the delay of dynamic bandwidth allocation and reduces the delay of the ONU sending upstream data.
[0286] In some embodiments, the allocation module 802 can be specifically used to: if the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket sub-queues in the first token bucket queue in order from high to low priority of the token bucket sub-queues in the first token bucket queue, each token bucket sub-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 sub-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 sub-queues is completed.
[0287] In some embodiments, the allocation module 802 can 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 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 weights of all first TCONTs in the traversed token bucket sub-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 allocatable bandwidth corresponding to each first TCONT; determine the minimum value of the number of tokens included in the first token bucket corresponding to each first TCONT, the second requested bandwidth and the first allocatable bandwidth as the first bandwidth authorization value of 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 TCONT corresponding to each first token bucket in the target token bucket subqueue in order of the bandwidth growth rate of the first TCONT from large to small, where the target token bucket subqueue is the token bucket subqueue currently traversed; increase the first bandwidth authorization value of the traversed first TCONT by a first preset percentage of the 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 can be specifically used to: if the traversed token bucket queue is the second token bucket queue corresponding to the 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 allocated to the second TCONT, and 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 of each second TCONT in the bandwidth sum of all second TCONTs, and 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 proportion of each second TCONT and the remaining bandwidth, and obtain the second allocatable bandwidth corresponding to each second TCONT; and determine 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 allocatable bandwidth as the second bandwidth authorization value of each second TCONT.
[0290] In some embodiments, the allocation module 802 may also be used to: after allocating the second bandwidth authorization value to each second TCONT, traverse each second TCONT in order of the bandwidth growth rate of the second TCONT from large to small; increase the second bandwidth authorization value of the traversed second TCONT by the bandwidth authorization value of a second preset percentage to obtain a new second bandwidth authorization 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 configured to:
[0292] If the traversed token bucket queue is the third token bucket queue corresponding to the fixed bandwidth, 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 traversed token bucket queue is the fourth token bucket queue corresponding to the guaranteed bandwidth, the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value allocated to the fourth TCONT is calculated to obtain the fourth requested bandwidth of each fourth TCONT, and the fourth token bucket is the token bucket in the fourth token bucket queue; the minimum value of 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, the allocation module 802 may be specifically configured to:
[0295] If the traversed token bucket queue is the fifth token bucket queue corresponding to the fixed bandwidth and the guaranteed bandwidth, 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 is calculated to 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 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, 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, the minimum value of the fifth token number 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-mentioned dynamic bandwidth allocation device may further include:
[0299] A judgment module is used to judge whether the bandwidth template parameter of each TCONT is updated before traversing multiple token bucket queues in order of bandwidth priority of the token bucket queue from high to low, and obtain a judgment result, wherein the bandwidth template parameter of each TCONT includes the configured bandwidth of the TCONT;
[0300] The adjustment module is used to adjust the token bucket corresponding to the target TCONT according to the target configuration bandwidth and bandwidth allocation cycle duration included in the target bandwidth template parameters if the judgment result indicates that the target bandwidth template parameters of the target TCONT are updated.
[0301] In some embodiments, the target configured bandwidth includes a fixed bandwidth, a guaranteed bandwidth, a non-guaranteed maximum bandwidth and / or a best effort bandwidth; the adjustment module may be specifically used to:
[0302] The number of tokens included in the third token bucket corresponding to the target TCONT is adjusted to the first token number, where the first token number is the product of the fixed bandwidth and the bandwidth allocation cycle length, and the third token bucket corresponds to the fixed bandwidth;
[0303] Adjust the number of tokens included 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 cycle length, and the fourth token bucket corresponds to the guaranteed bandwidth;
[0304] The number of tokens included in the first token bucket corresponding to the target TCONT is adjusted to a third token number, where the third token number is the product of the best-effort bandwidth and the bandwidth allocation cycle length, and the first token bucket corresponds to the best-effort bandwidth; and / or,
[0305] The difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth is calculated to obtain the non-guaranteed bandwidth; the number of tokens included in the second token bucket corresponding to the target TCONT is adjusted to the fourth token number, where the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation cycle length, and the second token bucket corresponds to the non-guaranteed bandwidth.
[0306] In some embodiments, the above-mentioned dynamic bandwidth allocation device may further include:
[0307] An interrupt module is used to generate a timing interrupt signal every bandwidth allocation cycle;
[0308] The generating module is specifically used to generate a bandwidth map by using the bandwidth authorization value allocated to each TCONT when a timing interrupt signal is detected.
[0309] Corresponding to the above-mentioned dynamic bandwidth allocation, the embodiment of the present application further provides an OLT, such as Fig. 9As shown, it includes a first processor 901 and a logic chip 902; a plurality of token bucket queues are set in the first processor 901, each token bucket included in each token bucket queue corresponds to a TCONT, and the number of tokens included in the token bucket indicates the configured bandwidth;
[0310] The first processor 901 is used to traverse multiple token bucket queues in order of priority from high to low in each bandwidth allocation cycle; allocate bandwidth authorization value to 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 value allocated to each TCONT to the logic chip 902;
[0311] The logic chip 902 is used to generate a bandwidth map using the bandwidth authorization value allocated to each TCONT; and send the bandwidth map to the ONU in the passive optical network.
[0312] In the technical solution provided by the embodiment of the present application, token bucket queues of multiple priorities are pre-set in the OLT, each token bucket queue includes one or more token buckets corresponding to TCONTs, and the number of tokens included in a token bucket is the configured bandwidth of the corresponding TCONT. In each bandwidth allocation cycle, the OLT traverses the token bucket queues in order from high to low priority of the token bucket queues to give priority to allocating bandwidth to the TCONT corresponding to the high-priority token buckets, thereby ensuring high-priority bandwidth requirements and ensuring that all TCONTs obtain bandwidth resources fairly over a long period of time.
[0313] In addition, in each bandwidth allocation cycle, the OLT can directly allocate bandwidth authorization values to the TCONT according to the number of tokens included in the token bucket, and generate a bandwidth map and send it to the ONU. In the embodiment of the present application, the OLT uses the token bucket to pre-set the configuration bandwidth of each TCONT. When dynamically allocating bandwidth to the TCONT, there is no need to repeatedly calculate the configuration bandwidth, which reduces the amount of bandwidth allocation tasks, makes bandwidth allocation simpler, and thus reduces the delay of dynamic bandwidth allocation and reduces the delay of the ONU sending upstream data.
[0314] In the embodiment of the present application, the first processor 901 may be a real-time processor for performing real-time bandwidth allocation. The logic chip 902 may be a field programmable gate array (FPGA) for performing reporting of the remaining cache (dbru) (i.e., reporting of the DBA report) and packaging and sending of the BWmap.
[0315] In some embodiments, Fig.10 As shown, the OLT may further include a second processor 903;
[0316] The second processor 903 is configured to obtain bandwidth template parameters of each TCONT, where the bandwidth template parameters include a configured bandwidth corresponding to a bandwidth type used by each TCONT; and send the bandwidth template parameters of each TCONT to the first processor;
[0317] The first processor 901 may also be configured to determine whether the bandwidth template parameters of each TCONT are 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 are updated, then the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters.
[0318] In the embodiment of the present application, the second processor 903 may be a general processor, configured to execute OMCI configuration, that is, TCONT bandwidth template configuration.
[0319] In order to meet the needs of users for continuous bandwidth upgrade and evolution, improve the performance and speed of dynamic bandwidth allocation of passive optical networks, and reduce the complexity of dynamic bandwidth allocation, OLT can use modular design to distribute the dynamic bandwidth allocation function modules of OLT on different processing chips, such as Fig.11 As shown, the host computer module runs on a general processor (i.e., the second processor 903) and is implemented by software to complete OMCI configuration, i.e., 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 by software to complete the calculation of dynamic bandwidth allocation; the BWmap encapsulation module is implemented by FPGA hardware, reports the remaining cache of TCONT, encapsulates BWmap and sends it to TCONT, thereby improving the speed of reporting and distribution and reducing delay.
[0320] In the embodiment of the present application, OMCI configuration, dynamic bandwidth allocation calculation and BWMap encapsulation are respectively handed over to a dedicated processor and FPGA for processing, which can effectively share the processing pressure of a single CPU. In addition, 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] The real-time processor is used for dynamic bandwidth scheduling. It can collect and analyze network conditions in a timely manner and respond to traffic changes within microseconds to ensure the timeliness and accuracy of bandwidth allocation and optimize user experience.
[0322] FPGA has a high degree of programmability, and the logic and strategy of bandwidth mapping can be adjusted and optimized as needed to adapt to different network environments and requirements.
[0323] The dynamic bandwidth allocation function module is designed in layers and implemented using dedicated hardware and processors to reduce the processing load of dynamic bandwidth allocation, which can significantly improve the efficiency and performance of the system, reduce the complexity and delay of the dynamic bandwidth allocation algorithm, and have higher flexibility and scalability.
[0324] Based on the hierarchical design of the above dynamic bandwidth allocation function modules, the dynamic bandwidth allocation process can be found in Fig.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 allocates corresponding token buckets for each TCONT according to the TCONT bandwidth template parameters and the fixed bandwidth allocation cycle, builds a token bucket queue with priority, and performs bandwidth allocation, and sends the bandwidth authorization table to the BWmap encapsulation module.
[0325] In the embodiment of the present application, 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. In the embodiment of the present application, a fixed interruption cycle is used to generate token buckets corresponding to each TCONT in advance, and they are classified and sorted according to the service priority to obtain multiple token bucket queues, thereby reducing the execution tasks of real-time bandwidth allocation. At the same time, the timed interrupt triggers the dynamic bandwidth allocation of the interruption cycle, that is, when the timed interruption signal is detected, the bandwidth authorization table is sent to the BWmap encapsulation module, ensuring the time accuracy of the bandwidth authorization value issued.
[0326] The above interruption period is the bandwidth allocation period, which can be set by the user when the device is initialized.
[0327] In some embodiments, the first processor 901 can be specifically used to: if the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket sub-queues in the first token bucket queue in order from high to low priority of the token bucket sub-queues in the first token bucket queue, each token bucket sub-queue corresponding to a priority; according to 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, allocate a first bandwidth authorization value to each first TCONT until the remaining bandwidth is empty, or the traversal of multiple token bucket sub-queues is completed.
[0328] In some embodiments, the first processor 901 can 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 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 weights of all first TCONTs in the traversed token bucket sub-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 allocatable bandwidth corresponding to each first TCONT; determine the minimum value of the number of tokens included in the first token bucket corresponding to each first TCONT, the second requested bandwidth and the first allocatable bandwidth as the first bandwidth authorization value of each first TCONT.
[0329] In some embodiments, the first processor 901 may also be used to: after allocating a first bandwidth authorization value to each first TCONT, traverse the first TCONT corresponding to each first token bucket in the target token bucket subqueue in order of the bandwidth growth rate of the first TCONT from large to small, where the target token bucket subqueue is the token bucket subqueue currently traversed; increase the first bandwidth authorization value of the traversed first TCONT by a first preset percentage of the 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.
[0330] In some embodiments, the first processor 901 can be specifically used to: if the traversed token bucket queue is a second token bucket queue corresponding to a 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 allocated to the second TCONT, and obtain the third requested bandwidth of each second TCONT, where the second token bucket is a token bucket in the second token bucket queue; calculate the proportion of the bandwidth sum of each second TCONT in the bandwidth sum of all second TCONTs, and 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 proportion of each second TCONT and the remaining bandwidth, and obtain the second allocatable bandwidth corresponding to each second TCONT; and determine 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 allocatable bandwidth as the second bandwidth authorization value of each second TCONT.
[0331] In some embodiments, the first processor 901 may also be configured to: after allocating a second bandwidth authorization 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 authorization value of the traversed second TCONT by a second preset percentage of the bandwidth authorization value to obtain a new second bandwidth authorization 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 the embodiment of the present application, in order to further improve the bandwidth utilization and deal with the packet loss caused by short-term burst traffic, such as Fig.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 the TCONT corresponding to the non-guaranteed bandwidth or the best-effort bandwidth in real time, such as counting whether the TCONT requests and the growth rate of the requested bandwidth; the dynamic adjustment module 921 is used to traverse the TCONT in the same priority token bucket queue (or the same priority token bucket sub-queue) according to the monitoring data in the order of bandwidth growth rate from large to small; the real-time allocation module 931 is used to perform bandwidth allocation on the traversed TCONT.
[0333] Specifically, for the second token bucket queue corresponding to the non-guaranteed bandwidth, the dynamic adjustment module 921 traverses each second TCONT in the order of the bandwidth growth rate of the second TCONT from large to small after allocating the second bandwidth authorization value to each second TCONT; the real-time allocation module 931 increases the second bandwidth authorization value of the traversed second TCONT by the bandwidth authorization value of the second preset percentage to obtain a new second bandwidth authorization value.
[0334] For the first token bucket queue corresponding to the best-effort bandwidth, after allocating the first bandwidth authorization value to each first TCONT, the dynamic adjustment module 921 traverses the first TCONT corresponding to each first token bucket in the target token bucket sub-queue in order of the bandwidth growth rate of the first TCONT from large to small, and the target token bucket sub-queue is the token bucket sub-queue currently traversed; the real-time allocation module 931 increases the first bandwidth authorization value of the traversed first TCONT by the bandwidth authorization value of the first preset percentage 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.
[0335] In some embodiments, the first processor 901 may be specifically configured to:
[0336] If the traversed token bucket queue is the third token bucket queue corresponding to the fixed bandwidth, 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 traversed token bucket queue is the fourth token bucket queue corresponding to the guaranteed bandwidth, the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value allocated to the fourth TCONT is calculated to obtain the fourth requested bandwidth of each fourth TCONT, and the fourth token bucket is the token bucket in the fourth token bucket queue; the minimum value of 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 traversed token bucket queue is the fifth token bucket queue corresponding to the fixed bandwidth and the guaranteed bandwidth, 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 is calculated to obtain the fifth token number 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, 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, the minimum value of the fifth token number 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 may also be used to: before traversing multiple token bucket queues in order of bandwidth priority from high to low, determine whether the bandwidth template parameters of each TCONT are 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 are updated, adjust the token bucket corresponding to the target TCONT according to the target configured bandwidth and bandwidth allocation cycle duration included in the target bandwidth template parameters.
[0340] In some embodiments, the target configured bandwidth includes a fixed bandwidth, a guaranteed bandwidth, a non-guaranteed maximum bandwidth and / or a best effort bandwidth; the first processor 901 may be specifically configured to:
[0341] The number of tokens included in the third token bucket corresponding to the target TCONT is adjusted to the first token number, where the first token number is the product of the fixed bandwidth and the bandwidth allocation cycle length, and the third token bucket corresponds to the fixed bandwidth;
[0342] Adjust the number of tokens included 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 cycle length, and the fourth token bucket corresponds to the guaranteed bandwidth;
[0343] The number of tokens included in the first token bucket corresponding to the target TCONT is adjusted to a third token number, where the third token number is the product of the best-effort bandwidth and the bandwidth allocation cycle length, and the first token bucket corresponds to the best-effort bandwidth; and / or,
[0344] The difference between the non-guaranteed maximum bandwidth and the guaranteed bandwidth is calculated to obtain the non-guaranteed bandwidth; the number of tokens included in the second token bucket corresponding to the target TCONT is adjusted to the fourth token number, where the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation cycle length, and the second token bucket corresponds to the non-guaranteed bandwidth.
[0345] In some embodiments, the first processor 901 may also be used to: generate a timing interrupt signal at each bandwidth allocation cycle; when the timing interrupt signal is detected, send the bandwidth authorization value allocated to each TCONT to the logic chip 902. In this way, the logic chip 902 can generate a bandwidth map using the bandwidth authorization value allocated to each TCONT; and send the bandwidth map to the ONU in the passive optical network.
[0346] In the embodiment of the present application, by executing bandwidth allocation in a fixed bandwidth allocation cycle of a real-time processor, the number of tokens of each TCONT in a bandwidth allocation cycle can be calculated in advance, so that the tasks of the real-time bandwidth allocation module are fewer and simpler, such as only needing to select a minimum value from the number of tokens and the requested bandwidth, thereby increasing the speed of bandwidth allocation and reducing the latency of data frames. According to the priority token bucket queue traversal algorithm, allocation is more flexible and accurate according to the importance of different types of services, ensuring important real-time business needs, and in the case of surplus bandwidth, bandwidth can be allocated to unimportant services.
[0347] The technical solution provided by the embodiment of the present application can be used in campus network points of the PON switch product line, and its economic benefits can reach tens of millions. Based on the token bucket queue with priority, the bandwidth allocation of various service types can be flexibly adapted to achieve fine and fair scheduling.
[0348] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned dynamic bandwidth allocation methods is implemented.
[0349] In another embodiment provided by the present application, a computer program product including instructions is also provided, and when the computer is run on the computer, the computer is enabled to execute any one of the dynamic bandwidth allocation methods in the above embodiments.
[0350] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0351] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0352] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, OLT, storage medium and program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0353] The above are only preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the protection scope of the present application.
Claims
1. A dynamic bandwidth allocation method, characterized in that: The invention is applied to an optical line terminal OLT in a passive optical network, wherein a plurality of token bucket queues are arranged in the OLT, each token bucket queue corresponds to a priority, each token bucket included in each token bucket queue corresponds to a transmission container TCONT, and the number of tokens included in the token bucket indicates a configured bandwidth. The method comprises: In each bandwidth allocation cycle, traverse the multiple token bucket queues in descending order of priority of the token bucket queues; According to the number of tokens included in each token bucket in the traversed token bucket queue, a bandwidth authorization value is allocated 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; Generate a bandwidth map using the bandwidth authorization value allocated to each TCONT; The bandwidth mapping is sent to an optical network unit ONU in a passive optical network.
2. The method according to claim 1, characterized in that: The step of allocating a bandwidth authorization value to a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue comprises: If the traversed token bucket queue is the first token bucket queue corresponding to the best-effort bandwidth, then traverse multiple token bucket sub-queues in the first token bucket queue in descending order of priority of the token bucket sub-queues in the first token bucket queue, each token bucket sub-queue corresponding to a priority; According to the number of tokens included in each first token bucket in the traversed token bucket sub-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 the multiple token bucket sub-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 according to 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 requested bandwidth of the first TCONT corresponding to each first token bucket in the traversed token bucket sub-queue and the bandwidth authorization value 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 weights of all first TCONTs in the traversed token bucket sub-queues 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 a first allocatable bandwidth corresponding to each first TCONT; 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 allocatable bandwidth is determined as the first bandwidth authorization value of each first TCONT.
4. The method according to claim 2, characterized in that: After allocating the first bandwidth authorization value to each first TCONT, the method further includes: According to the order of the bandwidth growth rate of the first TCONT from large to small, traverse the first TCONT corresponding to each first token bucket in the target token bucket sub-queue, wherein the target token bucket sub-queue is the token bucket sub-queue currently traversed; The first bandwidth authorization value of the traversed first TCONT is increased by a first preset percentage of the 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.
5. The method according to claim 1, characterized in that The step of allocating a bandwidth authorization value to a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue comprises: If the traversed token bucket queue is the second token bucket queue corresponding to the non-guaranteed bandwidth, the difference between the first requested bandwidth of the second TCONT corresponding to each second token bucket and the bandwidth authorization value allocated to the second TCONT is calculated to obtain the third requested bandwidth of each second TCONT, and 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 values of all second TCONTs to obtain the second bandwidth proportion of each second TCONT, where the bandwidth sum value is the sum of the fixed bandwidth and the guaranteed bandwidth; Calculate the product of the second bandwidth proportion of each second TCONT and the remaining bandwidth to obtain the second allocatable bandwidth corresponding to each second TCONT; 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 allocatable bandwidth is determined as the second bandwidth authorization value for each second TCONT.
6. The method according to claim 5, characterized in that After allocating the second bandwidth authorization value to each second TCONT, the method further includes: Traverse each second TCONT in descending order of bandwidth growth rate of the second TCONT; The second bandwidth authorization value of the traversed second TCONT is increased by a second preset percentage of the bandwidth authorization value to obtain a new second bandwidth authorization 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 a bandwidth authorization value to a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue comprises: If the traversed token bucket queue is a third token bucket queue corresponding to a fixed bandwidth, 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 a token bucket in the third token bucket queue; If the traversed token bucket queue is the fourth token bucket queue corresponding to the guaranteed bandwidth, the difference between the first requested bandwidth of the fourth TCONT corresponding to each fourth token bucket and the bandwidth authorization value allocated to the fourth TCONT is calculated to obtain the fourth requested bandwidth of each fourth TCONT, and the fourth token bucket is the token bucket in the fourth token bucket queue; the minimum value of 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 a TCONT corresponding to each token bucket according to the number of tokens included in each token bucket in the traversed token bucket queue includes: If the traversed token bucket queue is the fifth token bucket queue corresponding to the fixed bandwidth and the 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 fifth number of 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 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, 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, the minimum value of the fifth token number 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 order of bandwidth priorities of the token bucket queues from high to low, the method further includes: Determine whether a bandwidth template parameter of each TCONT is updated, and obtain a determination result, wherein the bandwidth template parameter of each TCONT includes a configured bandwidth of the TCONT; If the determination result indicates that the target bandwidth template parameters of the target TCONT are updated, the token bucket corresponding to the target TCONT is adjusted according to the target configured bandwidth and the bandwidth allocation cycle 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 according to the target configuration bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters includes: Adjust the number of tokens included in the third token bucket corresponding to the target TCONT to the first token number, where the first token number is the product of the fixed bandwidth and the bandwidth allocation cycle length, and the third token bucket corresponds to the fixed bandwidth; Adjust the number of tokens included 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 cycle length, and the fourth token bucket corresponds to the guaranteed bandwidth; Adjusting the number of tokens included 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 cycle length, 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 included in the second token bucket corresponding to the target TCONT to a fourth token number, where the fourth token number is the product of the non-guaranteed bandwidth and the bandwidth allocation cycle length, and the second token bucket corresponds to the non-guaranteed bandwidth.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: Generate a timing interrupt signal at each bandwidth allocation cycle; When a timing interrupt signal is detected, the step of generating a bandwidth map using the bandwidth authorization value allocated to each TCONT is performed.
11. A dynamic bandwidth allocation device, characterized in that: The invention is applied to an optical line terminal OLT in a passive optical network, wherein a plurality of token bucket queues are arranged in the OLT, each token bucket queue corresponds to a priority, each token bucket included 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 device comprises: A traversal module, used to traverse the multiple token bucket queues in descending order of priority of the token bucket queues in each bandwidth allocation cycle; An allocation module, configured to allocate a bandwidth authorization value to a 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; A generating module, used for generating a bandwidth map by using the bandwidth authorization value allocated to each TCONT; The sending module is used to send 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; a plurality of token bucket queues are set in the first processor, each token bucket included 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 used to traverse the multiple token bucket queues in order of priority from high to low in each bandwidth allocation cycle; according to the number of tokens included in each token bucket in the traversed token bucket queues, 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; Sending the bandwidth authorization value allocated to each TCONT to the logic chip; The logic chip is used to generate bandwidth mapping by using the bandwidth authorization value allocated to each TCONT; and 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 OLT also includes a second processor; The second processor is configured to obtain bandwidth template parameters of each TCONT, where the bandwidth template parameters include a configured bandwidth corresponding to a bandwidth type used by each TCONT; and 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 are 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 are updated, then according to the target configured bandwidth and the bandwidth allocation cycle duration included in the target bandwidth template parameters, adjust the token bucket corresponding to the target TCONT.
14. The optical line terminal according to claim 12, characterized in that: The first processor is further configured to: generate a timing interrupt signal at each bandwidth allocation cycle; and send each TCONT allocation bandwidth authorization value to the logic chip when the timing interrupt signal is detected.
Citation Information
Patent Citations
Message forwarding method and device based on token bucket
CN101557348A
Method and device for dynamically allocating bandwidth by adopting associated token bucket algorithm
CN101719869A
Message transmission method and device
CN103701721A
Queue allocation method and apparatus
CN108259377A
Data transmission method and device, network equipment and storage medium
CN117914965A