Traffic distribution method and device for aggregated link, optical line terminal and medium

By utilizing port traffic prediction and load balancing elements to adjust port traffic in link aggregation technology, the problem of unbalanced port load in link aggregation is solved, achieving more efficient traffic allocation and resource utilization.

CN114095806BActive Publication Date: 2025-11-18ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010755745.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2025-11-18
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

Existing link aggregation technology, when dynamically allocating traffic, can easily lead to overloaded ports exceeding their traffic limits and underloaded ports wasting resources, failing to effectively reduce the load difference between physical ports and causing resource imbalance.

Method used

By predicting the average rate and average rate of port traffic within a monitoring period, the port traffic is dynamically adjusted. By using load sharing elements (preset message length ranges) to adjust the traffic of high-load ports to low-load ports, dynamic traffic distribution is achieved.

Benefits of technology

This reduces the load difference between physical ports, minimizes resource waste, and improves network reliability and bandwidth utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095806B_ABST
    Figure CN114095806B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a traffic distribution method and device for an aggregated link, an optical line terminal (OLT) and a medium. The traffic distribution method for the aggregated link comprises the following steps: predicting a predicted average rate of a port in a current monitoring period and a rate average value of a plurality of ports based on port traffic of the port in a monitoring period, wherein the rate average value is an average value of the predicted average rate; and adjusting port traffic of a to-be-adjusted port in the current monitoring period to an adjusted port according to a load sharing element, wherein the load sharing element comprises preset message length intervals of different rates in the port traffic, the to-be-adjusted port is a port with a predicted traffic rate greater than the rate average value, and the adjusted port is a port with a predicted traffic rate less than the rate average value. The traffic of each physical port of the aggregated link can be dynamically distributed, the load difference of each physical port is reduced, and resource waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of optical line terminal (OLT), and particularly relate to a traffic distribution method and device for aggregated link, an optical line terminal and a medium. BACKGROUND

[0002] With the popularization of 5G technology, various high-bandwidth demand APPs are emerging like mushrooms after rain, which puts higher requirements on data forwarding of OLT local terminal devices such as integrated access media gateway devices. In the data forwarding process, especially for the forwarding of super large traffic, even the super strong forwarding chip may face problems such as insufficient bandwidth, insufficient network transmission reliability and traffic congestion link. Link aggregation technology provides a solution. Link aggregation technology is to aggregate multiple physical links to form a complete logical link. The bandwidth of the aggregated link will be the sum of the bandwidths of each physical port, so the bandwidth of the data forwarding channel is expanded, solving the bandwidth bottleneck; in addition, aggregating multiple physical links to form a logical channel means that even if one of the links is damaged due to some reason, data will be adjusted to be transmitted using other links to be delivered to millions of households completely, undoubtedly improving the reliability of the network and solving the chain risk caused by link congestion.

[0003] However, IEEE802.3ad defines the framework and rules of link aggregation, but does not define which method to use. After link aggregation of multiple physical ports, the following scenarios may occur: a high-load transmission port may encounter high burst traffic, causing the port traffic to exceed the limit; some physical ports forward data with high load, while other physical ports are in a state of low traffic load and bandwidth is not fully utilized, causing resource waste. Therefore, how to dynamically distribute the traffic of each physical port of the aggregated link to minimize the load difference of each physical port has become a problem to be solved. SUMMARY

[0004] An object of one or more embodiments of the present application is to provide a traffic distribution method and device for aggregated link, an optical line terminal (OLT) and a medium, which can dynamically distribute the traffic of each physical port of the aggregated link, reduce the load difference of each physical port, and reduce resource waste.

[0005] To solve the above technical problems, one or more embodiments of the present application are implemented as follows:

[0006] In a first aspect, a method for traffic distribution of an aggregated link is provided. The method comprises: predicting a predicted average rate of each port in a current monitoring period and an average rate of all the ports based on port traffic of a previous monitoring period; and adjusting port traffic of a to-be-adjusted port in the current monitoring period to an adjusted port according to load sharing units, wherein the load sharing units comprise preset packet length intervals of different rates in the port traffic, the to-be-adjusted port is a port whose predicted traffic rate is greater than the average rate, and the adjusted port is a port whose predicted traffic rate is less than the average rate.

[0007] In a second aspect, a device for traffic distribution of an aggregated link is provided. The device comprises: a rate prediction module configured to predict a predicted average rate of each port in a current monitoring period and an average rate of all the ports based on port traffic of a previous monitoring period; and an adjustment module configured to adjust port traffic of a to-be-adjusted port in the current monitoring period to an adjusted port according to load sharing units, wherein the load sharing units comprise preset packet length intervals of different rates in the port traffic, the to-be-adjusted port is a port whose predicted traffic rate is greater than the average rate, and the adjusted port is a port whose predicted traffic rate is less than the average rate.

[0008] In a third aspect, an optical line terminal is provided. The optical line terminal comprises the device for traffic distribution of an aggregated link as described above.

[0009] In a fourth aspect, a storage medium for computer-readable storage is provided. The storage medium stores one or more programs that are executable by one or more processors to implement the steps of the method for traffic distribution of an aggregated link as described above.

[0010] The technical solution provided by the one or more embodiments of the present specification can be seen that the traffic distribution method for the aggregation link provided by the embodiments of the present application predicts the predicted average rate of the port in the current monitoring period and the rate average of all ports by using the port traffic in at least the last monitoring period of the port, and the port with the predicted average rate greater than the rate average is regarded as a to-be-adjusted port, and the port with the predicted average rate less than the rate average is regarded as an adjusted port, the purpose is to adjust the port traffic of the to-be-adjusted port to the adjusted port as the load distribution unit, the load distribution unit can include the preset message length interval of different rates in the port traffic, and the preset message length interval of different rates in the port traffic can be adjusted, the traffic of each physical port of the aggregation link can be dynamically distributed, the load difference of each physical port is reduced, and resource waste is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the one or more embodiments of the present specification or the prior art, the drawings needed to be used in the description of the one or more embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can also be obtained by those skilled in the art without creative labor under the premise of the drawings.

[0012] Figure 1 is a step schematic diagram of a traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0013] Figure 2 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0014] Figure 3 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0015] Figure 4 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0016] Figure 5 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0017] Figure 6 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0018] Figure 7 is a step schematic diagram of another traffic distribution method for an aggregation link provided by an embodiment of the present application.

[0019] Figure 8 is a step schematic diagram of another method for traffic distribution of an aggregated link provided by an embodiment of the present application.

[0020] Figure 9 is a structural schematic diagram of a device for traffic distribution of an aggregated link provided by an embodiment of the present application.

[0021] Figure 10 is a structural schematic diagram of an optical line terminal provided by an embodiment of the present application.

[0022] Figure 11 is a traffic prediction schematic diagram in another method for traffic distribution of an aggregated link provided by an embodiment of the present application.

[0023] Figure 12 is a traffic adjustment schematic diagram in a method for traffic distribution of an aggregated link provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the person skilled in the art better understand the technical solutions in the present specification, the technical solutions in one or more embodiments of the present specification will be described clearly and completely in the present specification by combining the drawings in one or more embodiments of the present specification. Obviously, the described one or more embodiments are only partial embodiments of the present specification, not all embodiments. Based on one or more embodiments in the present specification, all other embodiments obtained by the person skilled in the art without creative labor should belong to the protection scope of the present document.

[0025] The method for traffic distribution of an aggregated link provided by an embodiment of the present application is suitable for an aggregated link, and can dynamically adjust the port traffic between each physical port of the aggregated link, so as to realize the dynamic distribution of the traffic of the aggregated link and reduce the load difference of each physical port. The method for traffic distribution of an aggregated link provided by the present specification and each step thereof will be described in detail below.

[0026] It should be noted that in the method for traffic distribution of an aggregated link provided by an embodiment of the present application, the total port traffic of each physical port of the aggregated link remains unchanged in the current monitoring period, and the port traffic of part of the physical ports is dynamically adjusted between each port. The adjusted port and the adjusted port are both ports on the aggregated link.

[0027] Embodiment one

[0028] Reference Figure 1As shown, a step schematic diagram of a traffic distribution method for an aggregated link provided by an embodiment of the present application is shown. It can be understood that the traffic distribution method for an aggregated link provided by an embodiment of the present application is applicable to an optical line terminal (OLT) having an aggregated link. The traffic distribution method for an aggregated link comprises the following steps:

[0029] Step 10: predicting a predicted average rate of a port in a current monitoring period based on at least the port traffic of the port in a previous monitoring period, and predicting an average rate of all ports based on at least the predicted average rate of the port and an average rate of all ports in the current monitoring period, the average rate of all ports being an average of the predicted average rate;

[0030] The novelty of an embodiment of the present application is that a predicted average rate of a port in a current monitoring period can be predicted based on historical port traffic, satisfying the traffic demand of a complex traffic field. The port traffic of each port can be directly obtained by a current network monitoring module, without introducing additional calculation overhead, thereby saving time for fast distribution of the port traffic. The load sharing unit is divided according to the message length, and the load sharing unit is used as an adjustment granularity to distribute the port traffic of each port. The current network monitoring module can directly obtain the statistics of the message length, thereby also saving time for fast distribution of the port traffic.

[0031] The current network monitoring module can periodically obtain the traffic statistics of each port in the aggregated link and the statistics of the message length in each port traffic. The predicted average rate of the port in the current monitoring period is the throughput of the port traffic of the port in the current monitoring period, i.e., the total port traffic in the current monitoring period divided by the current monitoring period.

[0032] After reading the traffic statistics of each port from the current network monitoring module, the average rate of the port traffic of each port in the previous monitoring period is calculated. The average rate of the port traffic of a port in one monitoring period is regarded as a sampling sample, and the predicted average rate of the port in the current monitoring period can be predicted based on at least the average rate of the historical port traffic in the previous monitoring period. The average rate of all ports can be obtained based on the predicted average rate of each port, thereby preparing for the distinction between a to-be-adjusted port and an adjusted port.

[0033] Step 20: adjusting the port traffic of the to-be-adjusted port in the current monitoring period to the adjusted port according to the load sharing unit, wherein the load sharing unit comprises preset message length intervals of different rates in the port traffic, the to-be-adjusted port is a port in which the predicted traffic rate is greater than the average rate, and the adjusted port is a port in which the predicted traffic rate is less than the average rate.

[0034] The current network monitoring module periodically acquires the traffic statistics of each port and the statistics of the message length in the traffic of each port. Based on the statistics of the message length in the traffic of each port, the rate of each preset message length interval in the current monitoring period can be calculated. The preset message length interval can be set according to the traffic distribution requirement. For example, if the granularity of the load sharing element to be adjusted is larger, the preset message length interval can be set to a larger message length range, and vice versa. The rate of the preset message length interval is the passing rate of the messages of different lengths in the preset message length interval in the current monitoring period, that is, the total traffic of the messages of different lengths in the current monitoring period divided by the current monitoring period.

[0035] The predicted average rate of the to-be-adjusted port in the current monitoring period is greater than the average rate, and therefore the port traffic of the to-be-adjusted port in the current monitoring period needs to be adjusted. The port traffic of the adjusted port in the current monitoring period needs to be adjusted from the to-be-adjusted port, and needs to share the traffic with the to-be-adjusted port.

[0036] The definition of the preset message length interval can be seen from Table 1. In Table 1, the different preset message length intervals are coded with IDs for subsequent calling. In Table 1, the preset message length intervals of different rates become the minimum granularity that can be adjusted for traffic distribution.

[0037] Table 1

[0038] preset packet length interval preset packet length interval ID rate (0,64] 1 rate_1 (64,128] 2 rate_2 (128,256] 3 rate_3 (256,512] 4 rate_4 (512,1024] 5 rate_5 (1024,1500] 6 rate_6

[0039] Referring to Figure 2 In some embodiments, the traffic distribution method provided by the embodiments of the present application comprises the following steps 10: at least based on the port traffic in the last monitoring period, the predicted average rate of the port in the current monitoring period is predicted, and the step 10 specifically comprises the following steps:

[0040] Step 100: based on the port traffic, N sampling samples of the port are acquired, and the N sampling samples include the average rate of the port traffic in N monitoring periods including the last monitoring period;

[0041] The average rate of each port in the last monitoring period can be calculated according to the traffic statistics of each port, that is, the total traffic in the last monitoring period divided by the last monitoring period. The average rate in the last monitoring period is regarded as a sampling sample, and a plurality of monitoring periods including the last monitoring period are regarded as a sampling time window. When the monitoring time accumulates to reach the effective sampling time threshold, N data samples are obtained. A least square mathematical model is established for the N data samples, and the least square mathematical model is used to predict the predicted average rate of each port in the current monitoring period.

[0042] Step 110: predicting the predicted average rate of the port in the current monitoring period based on the N sampling samples.

[0043] After obtaining the N sampling samples, the predicted average rate of the port traffic in the current monitoring period can be predicted based on a least square mathematical model or other mathematical algorithms to meet the traffic demand of complex traffic field.

[0044] The execution steps of the specific traffic allocation method can be seen from the following example:

[0045] Initialize the monitoring parameters of the network monitoring module, the monitoring period is configured as T seconds, and the default is 30s; the effective sampling time threshold is T sample seconds, and the default is 300s; the sampling time window is N×T seconds, and N is 10 by default; the serial number of the monitoring period is a dependent variable n, which is initialized as 1. Define the load sharing element as the smallest unit that can be adjusted when the port performs load allocation, which is the message length interval here. The initialized message length interval table is shown in Table 1.

[0046] Start the network monitoring module, and the current start time is recorded as t start , obtain the port number, which is assumed to be p={p1,...,p n}.

[0047] For the first port p1, obtain the traffic in the first monitoring period, denoted as cnt 1n , calculate the average rate of the port in the monitoring period as rate 1n =cnt 1n / T, and calculate the average rate of other ports in the same way. The average rate is stored in the memory as the value of the sampling sample.

[0048] Determine whether n is less than N. If it is less than N, wait for the next monitoring period to come, and n=n+1, jump to the previous step to continue execution, otherwise execute the next step.

[0049] According to the least square mathematical model, take rate 1(n-1) ,...,rate 1(n-N) as samples to predict the predicted average rate of the first port in n+1 monitoring periods, such as using the historical N sampling samples to obtain the predicted average rate of the port in the current monitoring period, denoted as rate 1(n+1) . The predicted average rate of other ports in n+1 monitoring periods such as the current monitoring period is predicted in the same way. In this way, the predicted average rate set

[0050] See Figure 3As shown in some embodiments, after predicting the predicted average rates of the ports in the current monitoring period based on the N sampling samples by using the least square mathematical model, the traffic distribution method provided by the embodiments of the present application further comprises the following steps:

[0051] Step 120: obtaining the predicted average rates of all the ports respectively;

[0052] As described above, the predicted average rates of all the ports in the current monitoring period can be predicted based on the collected historical N sampling samples by using the least square mathematical model, as shown in Figure 11

[0053] Step 130: averaging the predicted average rates of all the ports to obtain a rate average value;

[0054] The purpose of averaging the predicted average rates of all the ports in the current monitoring period to obtain the rate average value is to distinguish the to-be-adjusted ports and the adjusted ports based on the predicted average rates of all the ports and the rate average value.

[0055] Step 140: determining the to-be-adjusted ports and the adjusted ports based on the predicted average rates and the rate average value.

[0056] The to-be-adjusted ports are the ports whose predicted traffic rates are greater than the rate average value, and the adjusted ports are the ports whose predicted traffic rates are less than the rate average value. The purpose of determining the to-be-adjusted ports and the adjusted ports is to realize the redistribution of the aggregated link traffic. The predicted average rate of the to-be-adjusted port in the current monitoring period is greater than the rate average value, so the port traffic of the to-be-adjusted port in the current monitoring period needs to be adjusted, and the port traffic of the adjusted port in the current monitoring period needs to be adjusted from the to-be-adjusted port and needs to share the traffic with the to-be-adjusted port.

[0057] As shown in some embodiments, after predicting the predicted average rates of the ports in the current monitoring period based on the N sampling samples by using the least square mathematical model, the traffic distribution method provided by the embodiments of the present application further comprises the following steps: Figure 4 Step 30: sorting all the ports according to the predicted average rates from large to small to form a port set;

[0058] Step 30: sorting all the ports according to the predicted average rates from large to small to form a port set;

[0059] Step 30: sorting all the ports according to the predicted average rates from large to small to form a port set;

[0060] ​Step 40: After selecting the ports to be adjusted sequentially from the port set, calculate the rate of the preset message length interval to which the messages of the ports to be adjusted belong within the current monitoring period based on the length of the messages in the port traffic, until the rate of the preset message length interval to which the messages of all ports to be adjusted belong is obtained.

[0061] The length of packets in the port traffic statistics within the current monitoring period can be used to calculate the traffic within a preset packet length range, which can then be divided by the current monitoring period time to obtain the rate of that preset packet length range within the current monitoring period. Therefore, obtaining the traffic of each load-sharing element of a port in the current monitoring period is similar to the port traffic statistics within the monitoring period. Then, the rate of each load-sharing element is calculated sequentially, and all load units in the port traffic of each port are sorted in ascending order of rate.

[0062] Let's call it rate_elem p1 ={rate p1,len1 rate p1,len2 rate p1,len3 rate p1,len4 The same method is used to calculate the rate of all load-sharing elements in the port traffic of other ports, and then sort them in ascending order of rate. Using the above method, the rate of the preset message length range to which all messages belong for all ports to be adjusted can be obtained.

[0063] See Figure 5 As shown, in some embodiments, the traffic allocation method provided by the present invention includes step 20: adjusting the port traffic of the port to be adjusted within the current monitoring period to the port to be adjusted according to the load sharing element, wherein the load sharing element includes a preset message length range of different rates in the port traffic, the port to be adjusted is the port whose predicted traffic rate is greater than the average rate, and the port to be adjusted is the port whose predicted traffic rate is less than the average rate, specifically including:

[0064] Step 200: Adjust the port traffic from the port to be adjusted to the port being adjusted in ascending order of the preset message length range, with the preset message length range as the granularity.

[0065] If the message length is uniform, there is only one preset message length range, and this preset message length range has only one rate. Therefore, the port traffic of the port to be adjusted can only be allocated according to the single preset message length range of this single rate as the adjustment granularity.

[0066] To select a port from all ports, for example, the first port from port set C1, let's denote its port number as p. balance_1Since the port set C1 is sorted in descending order of the predicted average rate of all ports, the first port has the largest predicted average rate in the current monitoring period, and thus the first port has the largest load in the current monitoring period and needs to be shared first. From the first port p balance_1 all load sharing elements rate_elem pbalance_1 select a load sharing element for traffic distribution, and record the ID of the load sharing element, the port number p balance_1 of the port to be adjusted, and the corresponding relationship of the corresponding port number of the adjusted port, until the predicted average rate of the first port is allocated near the average rate. As shown in Figure 12 , the port traffic of the first port is adjusted from the port to be adjusted to the adjusted port in the preset packet length interval as the granularity in the order of the rate of the preset packet length interval from small to large, Figure 12 the leftmost direction column represents different preset packet length intervals of different rates with different color blocks, and the smaller the area of the color block, the smaller the rate. For the port traffic of the first port, the port traffic is sequentially adjusted from the first port to the adjusted port in the order of the rate of the preset packet length interval from small to large, and the adjusted port is preferentially selected as the port whose predicted average rate in the current monitoring period is the most different from the average rate. Repeat the operation until the predicted average rate of the first port is allocated near the average rate. Repeat the operation until the predicted average rate of all adjusted ports is allocated near the average rate.

[0067] Step 210: Form a correspondence relationship between the port to be adjusted, the adjusted port, and the ID of the preset packet length interval.

[0068] The correspondence relationship between the port to be adjusted, the adjusted port, and the ID of the preset packet length interval can be an even load distribution table of the aggregated link, as shown in Table 2.

[0069] Table 2

[0070] to-be-adjusted port preset packet length interval ID adjusted port SRC_PORT1 1 ID_N ... ... ... PORT_N 4 DEST_PORT_N

[0071] After obtaining the user data packets in the current monitoring period, the even load distribution table can be queried to obtain the adjusted port after the preset packet length interval to which the packets of different rates in the port traffic of each port to be adjusted belong is obtained, so that the traffic of all physical ports on the aggregated link can be distributed.

[0072] Referring to Figure 6 , in some embodiments, the traffic distribution method provided by the embodiments of the present application, step 200: the port traffic is adjusted from the port to be adjusted to the adjusted port in the preset packet length interval as the granularity in the order of the rate of the preset packet length interval from small to large, specifically comprising:

[0073] Step 201: Use a greedy algorithm to adjust the port traffic from the port to be adjusted to the port being adjusted, with a preset message length range as the granularity, until the predicted average rate of the port to be adjusted is close to the average rate.

[0074] See Figure 12 As shown, the port traffic of the port to be adjusted is adjusted to the port to be adjusted according to a preset message length range using a greedy algorithm, and the ID of the load sharing element, the port to be adjusted, and the corresponding port number to be adjusted are recorded. The greedy algorithm can ensure that the predicted average rate of the port to be adjusted is as close as possible to the average rate.

[0075] See Figure 7 As shown, in some embodiments, after step 220: forming the correspondence between the port to be adjusted, the port being adjusted, and the ID of the preset message length range, the traffic allocation method provided by the embodiments of the present invention further includes:

[0076] Step 230: Determine the source port of the packet, the preset packet length range to which the packet belongs, and the ID of the preset packet length range based on the parameters carried in the packet in the port traffic;

[0077] Extract parameters carried in packets from port traffic, such as the `len` field in the packet header, to obtain the number of physical ports of the aggregated link and the source port of the packet. Based on the `len` field, determine the preset packet length range to which the packet belongs. The preset packet length range can be set to six intervals: (0, 64], (64, 128], (128, 256], (256, 512], (512, 1024], and (1024, 1518]. Obtain the ID of the preset packet length range to which the packet belongs. For example, the ID of the (0, 64] interval is 1, and the ID of the (64, 128] interval is 2, as shown in Table 1.

[0078] Step 240: Determine whether the source port and the ID of the preset message length range to which the message belongs exist in the correspondence;

[0079] Using the source port obtained from the parameters of the message and the ID of the preset message length range to which the message belongs as an index, query the corresponding relationship (see Table 2) to see if there is a common port to be adjusted and ID of the preset message length range.

[0080] Step 250: If it exists, replace the preset destination forwarding port of the packet in the port traffic with the port to be adjusted in the corresponding relationship and the port of the port to be adjusted corresponding to the number ID of the preset packet length range.

[0081] If the corresponding relationship exists, the adjusted port is taken from the corresponding relationship as the preset destination forwarding port, otherwise the original preset destination forwarding port dest remains unchanged, and the packet forwarding is completed.

[0082] Referring to Figure 8 As shown in the figure, before step 240: judging whether the corresponding relationship exists between the source port and the ID of the preset packet length interval to which the packet belongs, the traffic distribution method provided by the embodiment of the application further comprises the following steps:

[0083] Step 260: performing CRC operation based on the load sharing mode of the aggregation link;

[0084] The original destination forwarding port dest can be obtained based on the load sharing mode of the aggregation link. If the load sharing mode is based on the mac address of the source port, the mac address of the source port is taken to perform CRC32 operation, and the result is recorded as mac_crc, and then the preset destination forwarding port dest is obtained by taking the modulus of the number of all ports of the aggregation link, that is: dest = mac_crc % port_num.

[0085] Step 270: obtaining the preset destination forwarding port of the port traffic according to the operation result.

[0086] The preset destination forwarding port dest is obtained according to the load sharing mode of the aggregation link, and the preset destination forwarding ports obtained by different load sharing modes are different, but as long as the corresponding relationship exists between the same adjusted port and the preset packet length interval ID in the corresponding relationship and the source port and the ID of the preset packet length interval to which the packet belongs, the corresponding adjusted port in the corresponding relationship is taken as the preset destination forwarding port.

[0087] As can be seen from the above analysis, the traffic distribution method for the aggregation link provided by the embodiment of the application predicts the predicted average rate of the port and the rate average value of all ports in at least one monitoring period of the port, and takes the port with the predicted average rate greater than the rate average value as the adjusted port and the port with the predicted average rate less than the rate average value as the adjusted port, so as to adjust the port traffic of the adjusted port to the adjusted port according to the load sharing unit as the adjustment granularity. The load sharing unit can include preset packet length intervals with different rates in the port traffic, and the port traffic can be adjusted according to the preset packet length intervals with different rates in the port traffic, the traffic of each physical port of the aggregation link can be dynamically distributed, the load difference of each physical port can be reduced, and resource waste can be reduced.

[0088] Embodiment two

[0089] Referring to Figure 8As shown, the device 10 for traffic distribution of an aggregated link provided by the embodiment of the present application comprises a rate prediction module 100 and an adjustment module 120.

[0090] The rate prediction module 100 is configured to predict a predicted average rate of a port in a current monitoring period based on at least the port traffic of the port in a previous monitoring period, and predict an average rate of all ports based on the predicted average rate of the port.

[0091] The novelty of the embodiment of the present application is that the predicted average rate of the port in the current monitoring period can be predicted based on the historical port traffic, so as to meet the traffic demand of a complex traffic field. The port traffic of each port can be directly obtained by the current network monitoring module, without introducing additional calculation overhead, thereby saving time for fast distribution of the port traffic. The load sharing unit is divided according to the message length, and the load sharing unit is used as an adjustment granularity to distribute the port traffic of each port. The current network monitoring module can directly obtain the statistics of the message length, thereby saving time for fast distribution of the port traffic.

[0092] The current network monitoring module can periodically obtain the traffic statistics information of each port in the aggregated link and the statistics information of the message length in each port traffic. The predicted average rate of the port in the current monitoring period is the pass rate of the port traffic of the port in the current monitoring period.

[0093] After reading the traffic statistics information of each port from the current network monitoring module, the average rate of the port traffic of each port in the previous monitoring period is calculated. The average rate of the port traffic of a port in one monitoring period is regarded as a sampling sample, so as to predict the predicted average rate of the port in the current monitoring period based on at least the average rate of the historical port traffic in the previous monitoring period, and obtain the average rate of all ports based on the predicted average rate of each port, so as to prepare for the distinction between the to-be-adjusted port and the adjusted port.

[0094] The adjustment module 120 is configured to adjust the port traffic of the to-be-adjusted port in the current monitoring period to the adjusted port according to the load sharing unit, wherein the load sharing unit comprises preset message length intervals of different rates in the port traffic, the to-be-adjusted port is a port with a predicted traffic rate greater than the average rate, and the adjusted port is a port with a predicted traffic rate less than the average rate.

[0095] The current network monitoring module periodically acquires the traffic statistics of each port and the statistics of the message length in the traffic of each port. Based on the statistics of the message length in the traffic of each port, the rate of each preset message length interval in the current monitoring period can be calculated. The preset message length interval can be set according to the traffic distribution requirement, for example, the preset message length interval can be set to have a larger message length range when the granularity of the load sharing element to be adjusted is larger, and vice versa. The rate of the preset message length interval is the passing rate of different message lengths in the preset message length interval in the current monitoring period.

[0096] The predicted average rate of the to-be-adjusted port in the current monitoring period is greater than the average rate, and thus the port traffic of the to-be-adjusted port in the current monitoring period needs to be adjusted. The port traffic of the adjusted port in the current monitoring period needs to be adjusted from the to-be-adjusted port, and needs to share the traffic with the to-be-adjusted port.

[0097] The definition of the preset message length interval can be seen from Table 1. In Table 1, the different preset message length intervals are coded with IDs for subsequent calling. In Table 1, the preset message length intervals of different rates become the minimum granularity that can be adjusted for traffic distribution.

[0098] Table 3

[0099] preset packet length interval preset packet length interval ID rate (0,64] 1 rate_1 (64,128] 2 rate_2 (128,256] 3 rate_3 (256,512] 4 rate_4 (512,1024] 5 rate_5 (1024,1500] 6 rate_6

[0100] It can be seen from the above analysis that the traffic distribution method for the aggregated link provided by the embodiment of the application uses the port traffic in at least the last monitoring period to predict the predicted average rate of the port in the current monitoring period and the average rate of all ports, and regards the port with the predicted average rate greater than the average rate as a to-be-adjusted port and regards the port with the predicted average rate less than the average rate as an adjusted port. The purpose is to adjust the port traffic of the to-be-adjusted port to the adjusted port according to the load sharing element as the adjustment granularity. The load sharing element can include the preset message length interval of different rates in the port traffic, and the port traffic can be adjusted according to the preset message length interval of different rates in the port traffic. The traffic of each physical port of the aggregated link can be dynamically distributed, the load difference of each physical port can be reduced, and resource waste can be reduced.

[0101] Embodiment three

[0102] Referring to Figure 10 Fig. 1 shows an optical line terminal 1 provided by the embodiment of the application. The optical line terminal includes the traffic distribution device 10 for the aggregated link as described above. The traffic distribution device 10 for the aggregated link includes a rate prediction module 100 and an adjustment module 120. Wherein:

[0103] The rate prediction module 100 is configured to predict a predicted average rate of the port in the current monitoring period based on at least the port traffic in the previous monitoring period, and predict an average rate of all the ports, the average rate being an average of the predicted average rates.

[0104] The embodiment of the present application is novel in that the predicted average rate of the port in the current monitoring period can be predicted based on the historical port traffic, and the traffic demand of a complex traffic field can be met. The port traffic of each port can be directly obtained by the current network monitoring module, and no additional calculation overhead is introduced, thereby saving time for fast allocation of the port traffic. In addition, the load sharing unit is divided according to the message length, and the load sharing unit is used as the adjustment granularity to allocate the port traffic of each port. The current network monitoring module can directly obtain the statistical information of the message length, and the time for fast allocation of the port traffic is also saved.

[0105] The current network monitoring module can periodically obtain the traffic statistical information of each port in the aggregated link and the statistical information of the message length in each port traffic. The predicted average rate of the port in the current monitoring period is the pass rate of the port traffic of the port in the current monitoring period.

[0106] After the traffic statistical information of each port is read from the current network monitoring module, the average rate of the port traffic of each port in the previous monitoring period is calculated. The average rate of the port traffic of one port in one monitoring period is regarded as a sampling sample, and the predicted average rate of the port in the current monitoring period can be predicted based on at least the average rate of the historical port traffic in the previous monitoring period. In addition, the average rate of all the ports can be obtained based on the predicted average rate of each port, so as to prepare for the distinction between the to-be-adjusted port and the adjusted port.

[0107] The adjustment module 120 is configured to adjust the port traffic of the to-be-adjusted port in the current monitoring period to the adjusted port according to the load sharing unit, wherein the load sharing unit includes preset message length intervals of different rates in the port traffic, the to-be-adjusted port is a port with a predicted traffic rate greater than the average rate, and the adjusted port is a port with a predicted traffic rate less than the average rate.

[0108] The current network monitoring module periodically acquires the traffic statistics of each port and the statistics of the message length in the traffic of each port. Based on the statistics of the message length in the traffic of each port, the rate of each preset message length interval in the current monitoring period can be calculated. The preset message length interval can be set according to the traffic distribution requirement, for example, the preset message length interval can be set to have a larger message length range when the granularity of the load sharing element to be adjusted is larger, and vice versa. The rate of the preset message length interval is the passing rate of different message lengths in the preset message length interval in the current monitoring period.

[0109] The predicted average rate of the to-be-adjusted port in the current monitoring period is greater than the average rate, and thus the port traffic of the to-be-adjusted port in the current monitoring period needs to be adjusted. The port traffic of the adjusted port in the current monitoring period needs to be adjusted from the to-be-adjusted port, and needs to share the traffic with the to-be-adjusted port.

[0110] The definition of the preset message length interval can be referred to Table 1. In Table 1, different preset message length intervals are coded with IDs for subsequent calling. In Table 1, the preset message length intervals of different rates become the minimum granularity that can be adjusted for traffic distribution.

[0111] Table 4

[0112] preset packet length interval preset packet length interval ID rate (0,64] 1 rate_1 (64,128] 2 rate_2 (128,256] 3 rate_3 (256,512] 4 rate_4 (512,1024] 5 rate_5 (1024,1500] 6 rate_6

[0113] It can be seen from the above analysis that the traffic distribution method for the aggregation link provided by the embodiment of the application uses the port traffic in at least the last monitoring period to predict the predicted average rate of the port in the current monitoring period and the average rate of all ports, and regards the port with the predicted average rate greater than the average rate as a to-be-adjusted port and regards the port with the predicted average rate less than the average rate as an adjusted port. The purpose is to adjust the port traffic of the to-be-adjusted port to the adjusted port according to the load sharing element as the adjustment granularity. The load sharing element can include the preset message length interval of different rates in the port traffic, and the preset message length interval of different rates in the port traffic can be adjusted. The traffic of each physical port of the aggregation link can be dynamically distributed, the load difference of each physical port can be reduced, and resource waste can be reduced.

[0114] Embodiment four

[0115] The storage medium provided by the embodiment of the application is used for computer readable storage, and the storage medium stores one or more programs, the one or more programs can be executed by one or more processors to implement the steps of the traffic distribution method for the aggregation link as shown in Figures 1 to 8 The steps of the traffic distribution method for the aggregation link can be specifically implemented as follows:

[0116] Step 10: predicting the predicted average rate of the port in the current monitoring period based on at least the port traffic in the last monitoring period, and predicting the average rate of all ports, and the average rate is the average of the predicted average rate;

[0117] The novelty of the embodiment of the present application is that the predicted average rate of the port in the current monitoring period can be predicted according to the historical port traffic, which meets the traffic demand of complex traffic field. The port traffic of each port can be directly obtained by the current network monitoring module, without introducing additional calculation overhead, which saves time for fast allocation of port traffic. The second is that the load sharing unit is divided according to the message length, and the load sharing unit is used as the adjustment granularity to allocate the port traffic of each port. The current network monitoring module can directly obtain the statistics of the message length, which also saves time for fast allocation of port traffic.

[0118] The current network monitoring module can periodically obtain the traffic statistics information of each port in the aggregation link and the statistical information of the message length in each port traffic. The predicted average rate of the port in the current monitoring period is the pass rate of the port traffic of the port in the current monitoring period, that is, the sum of the port traffic in the current monitoring period divided by the current monitoring period.

[0119] After reading the traffic statistics information of each port from the current network monitoring module, the average rate of the port traffic of each port in the last monitoring period is calculated. The average rate of the port traffic of a port in a monitoring period is regarded as a sampling sample, and the predicted average rate of the port in the current monitoring period can be predicted based on at least the average rate of the historical port traffic in the last monitoring period. The average rate of all ports can be obtained based on the predicted average rate of each port, which prepares for the distinction between the port to be adjusted and the adjusted port.

[0120] Step 20: adjusting the port traffic of the port to be adjusted in the current monitoring period to the adjusted port according to the load sharing unit, wherein the load sharing unit includes preset message length intervals of different rates in the port traffic, the port to be adjusted is the port with a predicted traffic rate greater than the average rate, and the adjusted port is the port with a predicted traffic rate less than the average rate.

[0121] The current network monitoring module periodically acquires the traffic statistics of each port and the statistics of the message length in the traffic of each port. Based on the statistics of the message length in the traffic of each port, the rate of each preset message length interval in the current monitoring period can be calculated. The preset message length interval can be set according to the traffic distribution requirement, for example, the preset message length interval can be set to have a larger message length range when the granularity of the load sharing element to be adjusted is larger, and vice versa. The rate of the preset message length interval is the passing rate of different message lengths in the preset message length interval in the current monitoring period, that is, the total traffic of different message lengths in the current monitoring period divided by the current monitoring period.

[0122] The predicted average rate of the to-be-adjusted port in the current monitoring period is greater than the average rate, and thus the port traffic of the to-be-adjusted port in the current monitoring period needs to be adjusted. The port traffic of the adjusted port in the current monitoring period needs to be adjusted from the to-be-adjusted port, and needs to share the traffic with the to-be-adjusted port.

[0123] The definition of the preset message length interval can be referred to Table 1, in which the different preset message length intervals are coded with IDs for subsequent calling. The preset message length intervals of different rates in Table 1 become the minimum granularity of traffic distribution that can be adjusted.

[0124] Table 5

[0125] preset packet length interval preset packet length interval ID rate (0,64] 1 rate_1 (64,128] 2 rate_2 (128,256] 3 rate_3 (256,512] 4 rate_4 (512,1024] 5 rate_5 (1024,1500] 6 rate_6

[0126] It can be seen from the above analysis that the traffic distribution method for the aggregated link provided by the embodiment of the application predicts the predicted average rate of the port and the average rate of all ports in the at least last monitoring period of the port, and takes the port with the predicted average rate greater than the average rate as the to-be-adjusted port and takes the port with the predicted average rate less than the average rate as the adjusted port, so as to adjust the port traffic of the to-be-adjusted port to the adjusted port according to the load sharing unit as the adjustment granularity. The load sharing unit can include the preset message length interval of different rates in the port traffic, and the port traffic can be adjusted according to the preset message length interval of different rates in the port traffic, so that the traffic of each physical port of the aggregated link can be dynamically distributed, the load difference of each physical port is reduced, and resource waste is reduced.

[0127] In summary, the above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

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

[0129] The computer readable storage medium includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carriers.

[0130] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0131] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0132] The above described embodiments of the present specification have been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous.

Claims

1. A traffic allocation method for aggregated links, the method comprising: Based at least on the port traffic in the previous monitoring period, predict the predicted average rate of the port in the current monitoring period and the average rate of all the ports, wherein the average rate is the average of the predicted average rate; Sort all the ports in descending order of their predicted average rates to form a port set. After selecting the port to be adjusted from the port set, the rate of the preset message length interval to which the message of the port to be adjusted belongs in the current monitoring period is calculated based on the length of the message in the port traffic, until the rate of the preset message length interval to which the message of all the ports to be adjusted belongs is obtained; The port traffic of the port to be adjusted within the current monitoring period is adjusted to the port to be adjusted according to the load sharing element, wherein the load sharing element includes a preset message length range of different rates in the port traffic, the port to be adjusted is the port whose predicted traffic rate is greater than the average rate, and the port to be adjusted is the port whose predicted traffic rate is less than the average rate.

2. The traffic allocation method as described in claim 1, which predicts the average rate of the port in the current monitoring period based at least on the port traffic in the previous monitoring period, specifically includes: Based on the port traffic, N sample samples of the port are obtained, and the N sample samples include the average rate of the port traffic in N monitoring periods, including the previous monitoring period; Based on the N sampled samples, predict the average rate of the port within the current monitoring period.

3. The traffic allocation method as described in claim 1, wherein the port traffic of the port to be adjusted within the current monitoring period is adjusted to the port to be adjusted according to the load sharing element, wherein the load sharing element includes a preset message length range of different rates in the port traffic, the port to be adjusted is the port whose predicted traffic rate is greater than the average rate, and the port to be adjusted is the port whose predicted traffic rate is less than the average rate, specifically including: The port traffic is adjusted from the port to be adjusted to the port being adjusted, with the preset message length range as the granularity, in ascending order of the speed of the preset message length range. A correspondence is formed between the port to be adjusted, the port being adjusted, and the ID number of the preset message length range.

4. The traffic allocation method as described in claim 3, wherein the port traffic is adjusted from the port to be adjusted to the port being adjusted in ascending order of the preset message length range, with the preset message length range as the granularity, specifically including: A greedy algorithm is used to adjust the port traffic from the port to be adjusted to the port being adjusted, using the preset message length range as the granularity, until the predicted average rate of the port to be adjusted is close to the average rate.

5. The traffic allocation method as described in claim 3, after forming the correspondence between the port to be adjusted, the port of the port being adjusted, and the ID of the preset message length range, the method further includes: Based on the parameters carried in the packets in the port traffic, determine the source port of the packet, the preset packet length range to which the packet belongs, and the ID of the preset packet length range; determine whether the source port and the ID of the preset packet length range to which the packet belongs exist in the correspondence; If it exists, the preset destination forwarding port of the packet in the port traffic is replaced with the port of the port to be adjusted in the correspondence and the port of the port to be adjusted corresponding to the number ID of the preset packet length range.

6. The traffic allocation method as described in claim 5, before determining whether the source port and the ID of the preset message length range to which the message belongs exist in the correspondence, the method further includes: CRC calculation is performed based on the load sharing mode of the aggregated link; The preset destination forwarding port for the port traffic is obtained based on the calculation results.

7. A traffic distribution device for aggregated links, the device comprising: A rate prediction module is used to predict the predicted average rate of the port and the average rate of all ports in the current monitoring period based on the port traffic in the previous monitoring period, wherein the average rate is the average of the predicted average rate. The adjustment module is used to sort all the ports from largest to smallest according to the predicted average rate, forming a port set; After selecting the port to be adjusted from the port set, the rate of the preset message length interval to which the message of the port to be adjusted belongs in the current monitoring period is calculated based on the length of the message in the port traffic, until the rate of the preset message length interval to which the message of all the ports to be adjusted belongs is obtained; The port traffic of the port to be adjusted within the current monitoring period is adjusted to the port to be adjusted according to the load sharing element, wherein the load sharing element includes a preset message length range of different rates in the port traffic, the port to be adjusted is the port whose predicted traffic rate is greater than the average rate, and the port to be adjusted is the port whose predicted traffic rate is less than the average rate.

8. An optical line terminal, the optical line terminal comprising the traffic distribution device for aggregation links as described in claim 7.

9. A storage medium for computer-readable storage, the storage medium storing one or more programs, which, when executed by one or more processors, implement the steps of the traffic allocation method for aggregated links as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Link aggregation traffic distribution method, device and apparatus, and storage medium

    CN109218216A

  • Load sharing method and device, routing device and storage medium

    CN109218217A