Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The embodiment of the invention provides a flow scheduling method, which controls the frequency of repeated scheduling of the same path by setting an issuing interval threshold of the path so as to achieve the purpose of inhibiting oscillation.
Referring to fig. 1, a flowchart of an embodiment of a traffic scheduling method according to the present invention is shown, where the traffic scheduling process is described from an SDN controller side.
Step 101, selecting a path meeting the service constraint condition for the current service.
The service constraint condition is usually a specific service requirement such as bandwidth and delay.
And 102, judging whether a path information table item matched with the path exists in a local path information table or not.
See table 1 for an example of a path information table maintained locally for the controller.
TABLE 1
The path information table comprises a plurality of path information table entries, and each path information table entry is used for recording the corresponding relation between the service, the path issuing time and the issuing interval threshold. The meaning of each parameter in the path information entry is described below, and is not repeated for the moment.
And 103, when a path information table item matched with the path exists, determining a sending time interval of the path according to the current time and the path sending time recorded in the matched path information table item.
Specifically, when there is a path information entry matching the path selected by the service, it indicates that the selected path has been issued for the current service, and at this time, the controller calculates a difference between the current time and a path issuance time (a time when the path was issued for the current service for the last time) recorded in the path information entry as an issuance time interval of the path (a time interval when the path is issued for two adjacent times for the current service).
104, when the sending time interval is larger than the sending interval threshold value in the matched path information table item, sending the path and updating the path sending time in the matched path information table item; and when the issuing time interval is less than or equal to the issuing interval threshold value in the matched path information table item, prohibiting issuing the path.
The issuing interval threshold is a time interval which is set by the controller for the same service and is not allowed to issue the same path repeatedly. When the issuing time interval obtained in the step 103 is greater than the set issuing interval threshold, the controller issues the currently selected path and updates the issuing time of the path in the path information table item; when the delivery time interval obtained through step 103 is less than or equal to the delivery interval threshold, the controller prohibits delivery of the selected path. Namely, the invention sets the sending interval threshold to inhibit oscillation (repeatedly selects the same path in short time).
Further, the issued interval threshold of the present invention can be dynamically adjusted, and the specific implementation manner is as follows:
in one embodiment, when the controller inhibits the delivery of the selected path according to step 104, a duplicate selection flag is added to the currently selected path to indicate that the path was selected within the current delivery interval threshold. When the controller selects the path again according to step 101 and issues the selected path according to step 104, it is further determined whether there is a duplicate selection flag for the currently selected path.
When the repeated selection mark exists, prolonging the issuing interval threshold of the path selected by the current service, which is to consider the condition that the possible quality of the path is better, thereby reducing the frequency of the path being issued again, playing the purpose of further inhibiting oscillation, and simultaneously clearing the repeated selection mark; when no repeated selection mark exists, the issuing interval threshold value is shortened, and the sensitivity of path selection is improved.
In another embodiment, as shown in table 1, the path information entry includes a duplicate selection flag, and it is determined whether the selected path is selected within the delivery interval threshold according to a difference in values of the duplicate selection flag in the path information entry. Specifically, when the controller prohibits the selected path from being issued according to step 104, the repeated selection flag in the path information entry matching the selected path is set to a first flag value indicating that the path has been selected within the current issue interval threshold. When the controller selects the path again according to step 101 and issues the selected path according to step 104, the repeated selection mark in the path information table entry matching the selected path is further acquired.
Respectively executing the following processing according to different values of the acquired repeated selection marks: when the obtained repeated selection mark is a first mark value, prolonging the issuing interval threshold value in the matched path information table item to increase the difficulty of issuing the path again, and achieving the purpose of further inhibiting oscillation; and when the obtained repeated selection mark is a second mark value, shortening the issuing interval threshold value in the path information table item and improving the sensitivity of path selection.
It should be noted that, the first flag value and the second flag value may also adopt other values, for example, the first flag value is true, and the second flag value is false, as long as the two values are different, as long as the two values can identify whether the path is repeatedly selected within the current issuing threshold.
Certainly, the present invention does not extend or shorten the issuing interval threshold without limitation, specifically, when the issuing interval threshold is extended, it is determined whether the extended issuing interval threshold reaches the interval threshold upper limit; when the prolonged issuing interval threshold reaches the interval threshold upper limit, the issuing interval threshold is set as the interval threshold upper limit, so that the condition that the service cannot be adjusted for a long time is avoided. When the issuing interval threshold is shortened, judging whether the shortened issuing interval threshold reaches an interval threshold lower limit or not; when the shortened issuing interval threshold reaches the interval threshold lower limit, the issuing interval threshold is set as the interval threshold lower limit, that is, the issuing interval threshold is prevented from being shortened without limit, and the oscillation inhibiting effect is not achieved.
In addition, when the path information table item matched with the path selected by the service does not exist according to the judgment of the step 102, the controller directly issues the selected path; meanwhile, a path information table entry of the path selected by the current service is added in the path information table, and preparation is made for path issuing (step 103 and step 104) by subsequently matching the path information table entry, which is not described herein again.
To complement a point, step 101 selects a path satisfying a service constraint condition for a current service, and specifically includes the following steps: firstly, determining a path meeting a service constraint condition for a current service; when the number of the determined paths is more than 1, randomly selecting one path from the determined paths; or calculating the health degree of the path aiming at each determined path, and selecting the path with the highest health degree.
Wherein, calculating the path health degree comprises: calculating the health degree of each link in the path, wherein the health degree of each link is determined by the health parameters of the link, and the health parameters include but are not limited to: link remaining bandwidth, delay, packet loss rate, and the number of link state changes (usually counting the number of times a link changes from available to unavailable within a certain time). And selecting the lowest health degree from the calculated health degrees of the links as the health degree of the path.
In one embodiment, the link health is calculated as follows:
the link health degree is the score of residual bandwidth, delay score, packet loss rate and link state change;
wherein,
remaining bandwidth score ═ (link remaining bandwidth/link allocable bandwidth) × 100;
delay score is 100/(1+ delay);
the packet loss rate score is 100/(1+ packet loss rate);
link state change score of 100/(2)Number of changes in lambda link state)。
The invention fully considers the influence of the link strategy when calculating the link residual bandwidth, and obtains the link residual bandwidth according to the link assignable bandwidth, the link protection strategy bandwidth percentage and the actual used bandwidth of the link. Specifically, link remaining bandwidth (link allocable bandwidth × link protection policy bandwidth percentage) -link actually used bandwidth.
Since some links bind link protection policies, multiple traffic scheduling policies take effect simultaneously, which may result in conflicts between traffic scheduling policies. For example, as shown in fig. 2, when a path is selected for traffic, the initially selected path is SW1 → SW2 → SW 5. When the automatic adjustment of the traffic is triggered, it is assumed that the new path is calculated as SW1 → SW4 → SW5, and if the link SW1 → SW4 binds the link protection policy, the traffic is scheduled to the path SW1 → SW4 → SW5, and then the link protection policy adjustment is triggered. Therefore, on the basis of the above embodiment, when selecting a path for a service, the remaining bandwidth of the selected path must be greater than the actual bandwidth of the service. Specifically, link residual bandwidths of links in the path are calculated, and as described above, the link residual bandwidths may be determined by link allocable bandwidths, link protection policy bandwidth percentages, and actual used bandwidths of the links, and a path with a path residual bandwidth greater than an actual traffic bandwidth is selected as the path residual bandwidth which is the smallest link residual bandwidth from among the calculated link residual bandwidths.
In addition, when the bandwidth of the whole network is not enough, the actual bandwidth change of the service can also cause the violent oscillation of the whole network. Therefore, on the basis of the above embodiment, the bandwidth utilization rate of the whole network can be determined according to the current allocable bandwidth of the whole network and the actual bandwidth of the whole network, when the bandwidth utilization rate of the whole network reaches the preset utilization rate threshold, it indicates that the bandwidth of the whole network is not enough, the traffic scheduling can be stopped, that is, the down-sending path is prohibited, and meanwhile, the optimization of the current existing service path is performed. For example, shortest path optimization, improves the utilization of the whole network bandwidth.
Thus, the flow shown in fig. 1 is completed.
As can be seen from the flow shown in fig. 1, the present invention controls the frequency of the same path that is repeatedly scheduled by setting the issuing interval threshold of the path, so as to achieve the purpose of suppressing oscillation.
The flow shown in fig. 1 is described below by a specific embodiment:
referring to fig. 2, a schematic diagram of an SDN network according to the present embodiment is shown. The SDN network comprises a Controller SDN Controller and switching devices SW 1-SW 5.
Assuming that the traffic of the current service (denoted as service 1) is forwarded through SW1 → SW2 → SW5 (denoted as path 1), the SDN Controller detects that the path 1 no longer satisfies the constraint condition of the service 1, and therefore, triggers the traffic adjustment to select a new path for the service 1.
Assume that there are two paths that satisfy the traffic 1 constraint, which are SW1 → SW3 → SW5 (denoted as path 2) and SW1 → SW4 → SW5 (denoted as path 3). The SDN Controller calculates the health of path 2 and path 3, respectively.
The path 2 is composed of a link SW1 → SW3 and a link SW3 → SW5, and the health degrees of the two links are calculated according to the remaining bandwidth, the delay, the packet loss rate and the number of link state changes of the links. Assuming that the health degree of the link SW1 → SW3 is V21, the health degree of the link SW3 → SW5 is V22, and V21< V22, V21 having a relatively low health degree is selected as the health degree of the path 2. Similarly, the health of route 3 is calculated and recorded as V32. Assuming that V32> V21, the SDN Controller selects a path 3 with relatively high health as a path to be delivered, that is, selects a path with superior comprehensive performance (residual bandwidth, delay, packet loss rate, and link state) for delivery, so as to reduce the probability of oscillation after delivery.
After the SDN Controller selects the path 3 for the service 1, it is determined whether a path information table entry matching the path 3 selected by the service 1 exists in the local path information table (table 1). As can be seen from table 1, the 3 rd path information entry is matched. Assuming that the current time is 11:00:20, the delivery time interval between the current time 11:00:20 and the path delivery time 11:00:00 recorded in the 3 rd path information entry is calculated to be 20 seconds and is less than the delivery interval threshold of the path 3 by 30 seconds, so that the path 3 is not delivered for the service 1, that is, the traffic scheduling is not performed, and meanwhile, the repeated selection flag of the 3 rd path information entry is set to be 1 to indicate that the path 3 is selected within 30 seconds of the delivery interval threshold, see table 2.
TABLE 2
Assuming that when the flow adjustment is triggered again, the SDN Controller still selects the path 3 for the service 1, and at this time, the time is 11:00:40, 40 seconds are separated from the last delivery time 11:00:00 of the path 3 recorded in table 2, and is greater than the delivery interval threshold value for 30 seconds, the path 3 is delivered, the flow of the service 1 is guided to be forwarded along the path 3, and the delivery time of the path 3 is updated. Further, a duplicate selection flag of the 3 rd path information entry in table 2 is obtained, and a value of the duplicate selection flag is 1, so that the issue interval threshold of path 3 is extended, for example, set to 60 seconds, and the duplicate selection flag of the 3 rd path information entry is set to 0, which indicates that path 3 has not been selected within 60 seconds of the issue interval threshold, see table 3.
TABLE 3
If the traffic of the service 1 is adjusted from the path 3 to the path 1 in the subsequent adjustment process, and then the adjustment is again intended for the path 3, the time interval between the issuing is necessarily greater than the threshold value of the issuing interval by 60 seconds, and then the path 3 is issued again. Meanwhile, a repeated selection marker of the 3 rd path information table entry matched with the path 3 in the table 3 is further obtained, and the value of the repeated selection marker is 0, so that the issuing interval threshold of the path 3 is shortened, for example, is reset to 30 seconds, see table 4.
TABLE 4
This completes the description of the present embodiment.
Corresponding to the embodiment of the traffic scheduling method, the invention also provides an embodiment of a traffic scheduling device.
The embodiment of the traffic scheduling device can be applied to an SDN controller. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. A software implementation is taken as an example, and a logical means is formed by a processor of the device in which it is located running corresponding computer program instructions in a memory. From a hardware aspect, as shown in fig. 3, the hardware structure diagram of the device in which the traffic scheduling apparatus is located is shown, except for the processor and the nonvolatile memory shown in fig. 3, the device in which the apparatus is located in the embodiment may also include other hardware according to an actual function of the device, which is not described again.
Fig. 4 is a schematic structural diagram of a traffic scheduling device according to an embodiment of the present invention. The traffic scheduling apparatus includes a path selection unit 401, a table item determination unit 402, an interval determination unit 403, and a path issuing unit 404, where:
a path selecting unit 401, configured to select a path that meets a service constraint condition for a current service;
a table item determining unit 402, configured to determine whether a path information table item matching the path exists in a local path information table, where the path information table item is used to record a corresponding relationship between a service, a path issuing time, and an issuing interval threshold;
an interval determining unit 403, configured to determine, when a path information entry matching the path exists, a sending time interval of the path according to the current time and the path sending time recorded in the matching path information entry;
a path issuing unit 404, configured to issue the path and update the path issuing time in the matched path information table entry when the issuing time interval is greater than the issuing interval threshold in the matched path information table entry; and when the issuing time interval is less than or equal to the issuing interval threshold value in the matched path information table item, prohibiting issuing the path.
Further, the air conditioner is provided with a fan,
the path issuing unit 404 is further configured to issue the path when a path information table entry matching the path does not exist in the local path information table; and adding the path information table item matched with the path in the path information table.
Further, the apparatus further comprises:
a threshold adjusting unit, configured to add a repeat selection flag to the path when the path issuing unit 404 prohibits issuing the path; when the path issuing unit 404 issues the path, determining whether the path has a repeated selection flag; when the repeated selection mark exists, prolonging the issuing interval threshold value in the matched path information table item, and clearing the repeated selection mark; when the repeated selection mark does not exist, shortening the issuing interval threshold value in the matched path information table item;
or,
a threshold adjusting unit, configured to set a repeated selection flag in a path information table entry matched with the path as a first flag value when the path issuing unit 404 prohibits issuing the path; when the path issuing unit 404 issues the path, a repeated selection marker in a path information table entry matched with the path is obtained; when the obtained repeated selection mark is a first mark value, prolonging the issuing interval threshold value in the matched path information table item, and setting the repeated selection mark as a second mark value; and when the obtained repeated selection mark is a second mark value, shortening the issuing interval threshold value in the matched path information table item.
Further, the air conditioner is provided with a fan,
the path selecting unit 401 is specifically configured to determine, for the current service, a path that meets a service constraint condition; when the number of the determined paths is more than 1, randomly selecting one path from the determined paths;
or,
the path selecting unit 401 includes:
the health degree calculation module is used for calculating the health degree of each determined path;
and the path selection module is used for selecting the path with the highest health degree.
Further, the air conditioner is provided with a fan,
the health degree calculation module is used for calculating the health degree of each link in the path; wherein the health of the link is determined by the health parameters of the link, including but not limited to: link residual bandwidth, time delay, packet loss rate and link state change times; and selecting the lowest health degree from the calculated health degrees of the links as the health degree of the path.
Further, the air conditioner is provided with a fan,
the path selecting unit 401 is specifically configured to calculate link remaining bandwidths of links in a path, where the link remaining bandwidths are determined by link allocable bandwidths, link protection policy bandwidth percentages, and actual used bandwidths of the links; selecting the minimum link residual bandwidth from the calculated link residual bandwidths as a path residual bandwidth; and selecting the path with the residual bandwidth larger than the actual bandwidth of the service.
Further, the apparatus further comprises:
the path optimization unit is used for determining the bandwidth utilization rate of the whole network according to the current whole network allocable bandwidth and the actual bandwidth of the whole network; and when the bandwidth utilization rate of the whole network reaches a preset utilization rate threshold value, forbidding to send the path, and performing path optimization on the current existing service.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.