WO2018082518A1 - 一种隧道调整方法和装置和计算机存储介质 - Google Patents
一种隧道调整方法和装置和计算机存储介质 Download PDFInfo
- Publication number
- WO2018082518A1 WO2018082518A1 PCT/CN2017/108318 CN2017108318W WO2018082518A1 WO 2018082518 A1 WO2018082518 A1 WO 2018082518A1 CN 2017108318 W CN2017108318 W CN 2017108318W WO 2018082518 A1 WO2018082518 A1 WO 2018082518A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- tunnel
- weight
- user session
- session
- user
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/08—Load balancing or load distribution
- H04W28/082—Load balancing or load distribution among bearers or channels
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/08—Load balancing or load distribution
- H04W28/09—Management thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0011—Control or signalling for completing the hand-off for data sessions of end-to-end connection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0083—Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
Definitions
- the present disclosure relates to the field of mobile communications, and in particular to a tunnel adjustment method and apparatus and computer storage medium.
- L2TP network is the current The popular network security tunneling protocol is widely used. How to better utilize the current L2TP protocol, and better ensure the network transmission security, the tunnel user session needs to be better allocated to improve bandwidth utilization and user experience.
- L2TP tunnel load balancing in order to implement Layer 2 Tunneling Protocol (L2TP) tunnel load balancing in a communication network, the L2TP tunnel is established between the source devices in the network and the multiple destination devices, and the proportion of the number of users is established for each tunnel. Further, the weighted number of each tunnel is multiplied by the number of users to obtain the weight of each tunnel, wherein the weighted number can be determined according to a given ratio; when the user goes online, the tunnel with the lowest weight among all tunnels is selected to establish a user. Connection, and when the number of users in any tunnel changes, recalculate the weight of the tunnel.
- L2TP Layer 2 Tunneling Protocol
- the tunnel allocation is only performed for the link establishment of the new user. If the A and B users are in the tunnel 1, C and D are in the tunnel 2, and the traffic of the A is greatly decreased, the load of the tunnel 2 is still greater than the tunnel 1 The user's tunnel adjustment cannot be performed, and bandwidth is still wasted, resulting in poor user experience.
- the embodiments of the present invention provide a tunnel adjustment method and device, which are used to solve the technical problem of waste of resources and poor user experience caused by tunnel adjustment even if the traffic of a user session changes.
- the embodiment of the present invention provides a tunnel adjustment method, the method includes: acquiring a weight of each user session in each tunnel; acquiring a tunnel weight of each tunnel; Tunnel weighting is performed on the weight of the session and/or the tunnel weight of each tunnel.
- the method before acquiring the weight of each user session in each tunnel, the method further includes: establishing a link state table; determining a weight of each user session in each tunnel; and performing, according to each user session in each tunnel The weight of the tunnel is determined by the weight of each tunnel; and the weight of each user session and the tunnel weight of each tunnel are added to the state link table.
- determining the weight of each user session in each tunnel includes: determining a weight of each user session according to an average rate and an average delay of each user session.
- determining a weight of each user session according to an average rate and an average delay of each user session including: weighting an average rate and an average delay of each user session; The result of the weighting operation is used as the weight of the user session.
- performing tunnel adjustment according to the weight of each user session and/or the tunnel weight of each tunnel including: receiving a user session establishment request; responding to the user session establishment request, in a tunnel The tunnel with the smallest weight establishes a user session.
- the tunnel adjustment is performed according to the weight of each user session and/or the tunnel weight of each tunnel, including: determining whether to adjust the time of the tunnel; if the tunnel has been reached At the adjusted time point, the average value of the tunnel weight of the tunnel with the largest tunnel weight and the tunnel with the lowest tunnel weight is calculated; and the weight of the user session is found from the tunnel with the largest tunnel weight and the average The user session with the smallest difference between the values; the user session that minimizes the difference between the weight of the found user session and the average value is switched to the tunnel with the smallest tunnel weight.
- the user session that minimizes the difference between the weight of the found user session and the average value is switched to the tunnel with the smallest tunnel weight, including: the minimum weight in the tunnel Establishing a first session, wherein the first session is a user session in which the difference between the weight of the found user session and the average value is the smallest; in the first session and the second session Transmitting data simultaneously, wherein the second session is the difference between the weight of the user session found in the tunnel with the largest tunnel weight and the average value a small user session; after determining that the data transmitted in the first session and the second session are consistent, the second session is disconnected.
- determining whether to adjust the time of the tunnel includes: determining whether the tunnel weight of one or more tunnels in the tunnel exceeds a preset threshold; if there is one or more tunnels If the weight exceeds the preset threshold, it is determined that the time point for adjusting the tunnel is reached.
- the tunnel includes: a Layer 2 tunneling protocol tunnel.
- the embodiment of the present invention further provides a tunnel adjustment apparatus, where the apparatus includes: a first acquiring module, configured to acquire a weight of each user session in each tunnel; and a second acquiring module, configured to acquire the tunnels The tunneling weight; the adjusting module is configured to perform tunnel adjustment according to the weight of each user session and/or the tunnel weight of each tunnel.
- the apparatus further includes: an establishing module, configured to establish a link state table before acquiring weights of user sessions in each tunnel; and the first determining module is configured to determine each user session in each tunnel a second determining module, configured to determine a tunnel weight of each tunnel according to a weight of each user session in each tunnel; and adding a module, configured to set a weight of each user session and each tunnel The tunnel weight is added to the status link table.
- an establishing module configured to establish a link state table before acquiring weights of user sessions in each tunnel
- the first determining module is configured to determine each user session in each tunnel
- a second determining module configured to determine a tunnel weight of each tunnel according to a weight of each user session in each tunnel
- adding a module configured to set a weight of each user session and each tunnel The tunnel weight is added to the status link table.
- the first determining module is configured to determine a weight of each user session according to an average rate and an average delay of each user session.
- the first determining module includes: a weighting unit configured to perform a weighting operation on an average rate and an average delay of each user session; and a generating unit configured to use a result of the weighting operation as the user session Weight.
- the adjusting module comprises: a receiving unit, configured to receive a user session establishment request; and an establishing unit, configured to establish a user session in a tunnel with the smallest tunnel weight in response to the user session establishment request.
- the adjustment module includes: a determining unit configured to determine whether to adjust to a time point of adjusting the tunnel; and a calculating unit configured to calculate the tunnel if it is determined that the time point for adjusting the tunnel has been reached The average value of the tunnel weights of the tunnel with the largest weight and the tunnel with the lowest weight; the search unit is set to find the weight of the user session from the tunnel with the largest tunnel weight and the average value The user session with the smallest difference; the switching unit is configured to switch the user session with the smallest difference between the weight of the found user session and the average value to the tunnel with the smallest tunnel weight.
- the switching unit includes: a establishing subunit, configured to establish a first session in the tunnel with the smallest tunnel weight, wherein the first session is the searched user session a user session having a smallest difference between the weight and the average value; a transmission subunit configured to simultaneously transmit data in the first session and the second session, wherein the second session is a tunnel with the largest tunnel weight a user session in which the difference between the weight of the user session found and the average value is the smallest; the disconnecting unit is configured to, after determining that the data transmitted in the first session and the second session are consistent, Disconnect the second session.
- the determining unit includes: a first determining subunit, configured to determine whether a tunnel weight of one or more tunnels in each tunnel exceeds a preset threshold; and the second determining subunit is set to When it is determined that the tunnel weight of one or more tunnels exceeds the preset threshold, it is determined that the time point for adjusting the tunnel is reached.
- An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores one or more programs executable by a computer, and when the one or more programs are executed by the computer, causing the computer to execute the foregoing method .
- the technical solution provided by the embodiment of the present invention has the following beneficial effects: the tunnel adjustment is performed by the weight of each user session and/or the tunnel weight of each tunnel, because the weight of each user session and the tunnel weight are considered, thereby It can make the adjustment result more effective and improve the bandwidth utilization and user experience.
- FIG. 1 is a flow chart of a method for adjusting a tunnel in an embodiment of the present invention
- FIG. 2 is a block diagram showing a structure of a tunnel adjusting device according to an embodiment of the present invention
- FIG. 3 is a block diagram showing another structure of a tunnel adjusting device according to an embodiment of the present invention.
- FIG. 4 is a flow chart of another method of the tunnel adjustment method in the embodiment of the present invention.
- the present invention provides a tunnel adjustment method and device, and the following provides a solution to the problem of resource waste and user experience in the prior art, even if the traffic of the user session changes, and the tunnel adjustment cannot be performed.
- the invention and its embodiments are further described in detail. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
- a tunnel adjustment method is provided, which may include the following steps:
- Step 101 Acquire weights of user sessions in each tunnel.
- real-time measurement may be used, or a pre-calculation method may be used. If the pre-computation method is adopted, a table for recording the link status may be set, and the weight of each user session or the tunnel weight of each tunnel may be recorded therein, and the direct search and read may be performed when needed.
- the link state table is established before the weights of the user sessions in each tunnel are obtained; the weights of the user sessions in each tunnel are determined; and the tunnels are determined according to the weights of the user sessions in the tunnels.
- the tunnel weight; the weight of each user session and the tunnel weight of each tunnel are added to the state link table.
- the weight of each user session in each tunnel may be determined according to an average rate and an average delay of each user session. That is, the network traffic (ie, the average rate) of each user session and the average delay obtained by performing multiple ping detections in this period of time may be used to perform a certain weighting calculation on the two.
- the weighting calculation may be set according to specific network environment requirements (that is, different tunnels may carry different services, which may have different requirements for network characteristics of different tunnels). For example, if the tunnel is for ftp big data download (including but not limited to ftp), the weight of the rate can be relatively increased to ensure that the tunnel can perform high-speed and high-traffic data transmission. If the tunnel is http-connected (including but not limited to http), the weight of the delay can be relatively increased to ensure the fluency of the network and the response time.
- the tunnel weight of the tunnel may be obtained by accumulating the weight of the user session of the tunnel.
- Step 102 Obtain a tunnel weight of each tunnel.
- the weight of the tunnel When the weight of the tunnel is obtained, it can be calculated in real time or obtained by looking up the table.
- the specific acquisition method can be selected according to the actual situation and needs. This application does not limit this.
- Step 103 Perform tunnel adjustment according to the weight of each user session and/or the tunnel weight of each tunnel.
- the tunnel adjustment may include the following two aspects based on the weight of each user session and/or the tunnel weight of each tunnel:
- the user session After receiving the user session establishment request, the user session may be established in the tunnel with the smallest tunnel weight in response to the user session establishment request.
- the user session whose weight of the user session is the closest to the average value is switched to the tunnel with the smallest tunnel weight, which may include: In the tunnel with the smallest value, a first session is established, where the first session is a user session in which the difference between the weight of the found user session and the average value is the smallest; in the first session and the first session Transmitting data in the second session, wherein the second session is a user session in which the difference between the weight of the user session found in the tunnel with the largest tunnel weight and the average value is the smallest; After the session and the data transmitted in the second session are consistent, the second session is disconnected.
- a threshold may be set to determine whether the tunnel weight of one or more tunnels in each tunnel exceeds a preset threshold; if there is one or more If the tunnel weight of the tunnel exceeds the preset threshold, it is determined that the time point for adjusting the tunnel is reached.
- the threshold may be determined according to the mean value of the tunnel weights of the respective tunnels recorded in the last record table when actually implemented.
- the above tunnel may include, but is not limited to, a Layer 2 tunneling protocol tunnel.
- a tunnel adjusting device is also provided in the embodiment of the present invention, as described in the following embodiments. Since the principle of solving the problem by the tunnel adjusting device is similar to the tunnel adjusting method, the implementation of the tunnel adjusting device can be referred to the implementation of the tunnel adjusting method, and the repeated description will not be repeated.
- the term "unit" or "module” may implement a combination of software and/or hardware of a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- 2 is a structural block diagram of a tunnel adjusting apparatus according to an embodiment of the present invention. As shown in FIG. 2, the first acquiring module 201, the second obtaining module 202, and the adjusting module 203 may be included.
- the first obtaining module 201 may be configured to acquire weights of user sessions in each tunnel.
- the second obtaining module 202 may be configured to acquire a tunnel weight of each tunnel.
- the adjusting module 203 may be configured to: according to the weight of each user session and/or the tunnel right of each tunnel Value, for tunnel adjustment.
- the tunnel adjustment apparatus may include: an establishing module, configured to establish a link state table before acquiring weights of user sessions in each tunnel; and the first determining module is configured to determine each user in each tunnel The weight of the session; the second determining module is configured to determine the tunnel weight of each tunnel according to the weight of each user session in each tunnel; and add a module, and set the weight of each user session and The tunnel weight of each tunnel is added to the state link table.
- the first determining module 201 may be configured to determine the weight of each user session according to an average rate and an average delay of the user sessions.
- the first determining module 201 may include: a weighting unit configured to perform a weighting operation on an average rate and an average delay of each user session; and a generating unit configured to use a result of the weighting operation as the user session Weight.
- the adjustment module 203 may include: a receiving unit configured to receive a user session establishment request; and an establishing unit configured to establish a user session in a tunnel with the smallest tunnel weight in response to the user session establishment request.
- the adjusting module 203 may include: a determining unit, configured to determine whether to adjust to a time point of adjusting the tunnel; and a calculating unit configured to calculate the tunnel if it is determined that the time point for adjusting the tunnel has been reached The average value of the tunnel weights of the tunnel with the largest weight and the tunnel with the lowest weight; the search unit is set to find the weight of the user session from the tunnel with the largest tunnel weight and the average value The user session with the smallest difference; the switching unit is configured to switch the user session with the smallest difference between the weight of the found user session and the average value to the tunnel with the smallest tunnel weight.
- the switching unit may include: a establishing subunit, configured to establish a first session in the tunnel with the smallest tunnel weight, wherein the first session is the right of the found user session a user session having a smallest difference between the value and the average value; a transmission subunit configured to simultaneously transmit data in the first session and the second session, wherein the second session is in a tunnel having the largest tunnel weight Determining a user session in which the difference between the weight of the user session and the average value is the smallest; the disconnecting unit is configured to, after determining that the data transmitted in the first session and the second session are consistent, Open the second session.
- the determining unit may include: a first determining subunit, configured to determine whether a tunnel weight of one or more tunnels in the each tunnel exceeds a preset threshold; and the second determining subunit is set to be at If it is determined that the tunnel weight of one or more tunnels exceeds the preset threshold, it is determined that the tunnel is adjusted. The whole time.
- the table can have parameters such as: tunnel id, session id, session weight, and tunnel weight, where tunnel id and session
- tunnel id is the L2TP tunnel and the id of the user is provided by the related protocol.
- the session weight is the weight of the user session.
- the calculation of the weight can include the user session data traffic per unit time (can be provided by the iptables function, of course, not limited to The iptables rate statistics can be determined by other methods, and the ping detection function is added in a certain period of time.
- the CPE device constructs ICMP packets in the user session and sends them to the peer end of the L2TP user session to calculate the current user.
- the delay of the session so as to obtain the state information of the current user session, and perform a certain weighted calculation on the two to obtain the corresponding user session weight.
- the tunnel weight is the superposition of all session weights in each tunnel.
- the tunnel state table can be set to update automatically every interval (this is mainly due to the instability of network traffic) or Data updates (ie, weight calculations) are also performed first when a new user session is established.
- the L2TP tunnel link state table can be as shown in Table 1 below.
- the weights and thresholds in Table 1 can be set as follows:
- the session (user session) weight can collect the network traffic (ie, the average rate) of each user session for a certain period of time and the average delay obtained by performing multiple ping detections during this period of time, Both perform a certain weighted calculation.
- the weighting calculation may be set according to specific network environment requirements (that is, different tunnels may carry different services, which may have different requirements for network characteristics of different tunnels). If the tunnel is performing ftp big data download (including but not limited to ftp), the weight of the rate can be relatively increased, thereby ensuring that the tunnel can perform high-speed and large-traffic data transmission. If the tunnel is http-connected (including but not limited to http), the weight of the delay is relatively increased, thereby ensuring network fluency and response time requirements.
- the tunnel weight is the sum of all session weights in this tunnel.
- the threshold is the average weight of all tunnels (the average weight here may be the average value obtained when the link state table was last updated regularly), as shown in Table 1,
- the threshold is 124.
- the setting of this threshold is to better optimize the network bandwidth of the tunnel and avoid the sudden blockage of the tunnel when a sudden traffic explosion occurs, resulting in data loss and even network paralysis.
- the soft handover can be applied to the case where the user session is adjusted in the L2TP tunnel.
- the three tunnels are used as an example (including, but not limited to, three tunnels).
- the weight of tunnel 23900 is 51
- the weight of tunnel 45690 is 58
- the weight of tunnel 55750 is 15.
- Scenario 1 If you are now creating a new user session. It is established directly in the tunnel 55750 tunnel.
- Scenario 2 When the time node arrives, the tunnel state of the user session is adjusted. The tunnel with the largest weight and the tunnel with the smallest weight are averaged, that is, 58 plus 15 divided by 2, and the data 36 is obtained, and then calculated.
- the 58-36 is 22, which will be the user session closest to 22.
- the user session of session 3525 will be adjusted from tunnel id 45690 to tunnel 55750.
- the user session is first established in the tunnel 55750.
- the CPE device will copy the transmitted data packets and transmit them in the new and old user sessions.
- the device at the other end of the tunnel compares all marked messages in the new and old sessions.
- the new L2TP tunnel link state table can be as shown in Table 2 below:
- the tunnel user session 3525 is adjusted to tunnel 55750, and then the three weights are 51, 40, 33.
- the highest and lowest average is 44, and the difference between any tunnel weight is less than any session in its tunnel. The value of weight, so the adjustment ends.
- an equalization device is also provided.
- the device may include the following modules: a listening module, an L2TP state link table module, a soft switching module, a firewall module, and an advanced policy routing module.
- the listening module is configured to listen to all user sessions and determine whether it is a known user session.
- the L2TP state link table module is configured to record user session information and tunnel state weights in each tunnel.
- the soft switching module is configured to establish an adjusted user session in a new tunnel when the user session is adjusted. When the data is completely circulated, the user session of the current tunnel is cut off, thereby achieving uninterrupted user session. Improve the user experience.
- a firewall module that is set to tag different user sessions.
- the advanced policy routing is set to perform policy allocation according to the marking of the firewall module and the corresponding information in the dynamic routing table, and the data stream marked with a specific label.
- Step 1 The CPE device monitors the user session data incoming on the LAN side.
- Step 2 The CPE device records the transmitted user session and extracts key information, such as the session number. Data destination address, source address, destination port, and source port.
- Step 3 Find the entry in the self-built link state table. If it is found, go to step 5. If it is not found, go to step 4.
- Step 4 If no information is found, create a new user session. In this case, query the information in the link state table, find the tunnel with the lowest weight, and create a new user session, calculate its weight and record it in the link state table. in.
- Step 5 If it is an existing user session, the device monitors the user sessions in all tunnels and calculates the weights in real time. This is just to avoid adjusting the tunnel where the user session is located too frequently. These weights are not updated to the link in real time. In the status table, but a threshold is set here. If the weight of a tunnel exceeds this threshold, the operation of updating the link state table will be initiated first, followed by soft handover. If the threshold is not exceeded, the data is transmitted in accordance with the original user session.
- Step 6 After a period of time, the device calculates an average weight according to each tunnel state information in the period of time, thereby updating the state link table, and performing soft handover according to the weight.
- Step 7 According to the link data entry, the mesh filter function of the netfilter is used to perform different label marking work on different user session packets passing through the CPE.
- Step 8 Configure the advanced policy routing according to the label configured by the netfilter rule, and use different user sessions for data transmission.
- the user session in the L2TP tunnel is intelligently established and adjusted.
- the L2T tunnel session establishment is random, so that when the tunnel is very congested, it is still possible to perform new users in the tunnel.
- the establishment of the session which leads to the inability to effectively utilize its bandwidth even if other tunnels are very smooth, which brings great trouble to the user experience.
- some implementations are based on the number of user sessions to adjust users in different tunnels, it will still be very blunt, because even if the number of user sessions in a tunnel is large, perhaps these user sessions are only for low-traffic data transmission, and A user session in a tunnel with a small number of user sessions is undergoing big data transmission.
- the tunnel adjustment is performed by the weight of each user session and/or the tunnel weight of each tunnel, because the weight of each user session and the tunnel weight are considered, so that the adjustment result can be made more effective. It can make tunnel resources more efficient use. Further, in controlling the user session to be in a manner that the tunnel can be switched, the tunnel resources can be allocated more efficiently, thereby improving bandwidth utilization and user experience.
- the technical solution provided by the embodiment of the present invention can be applied to the field of mobile communications.
- the tunnel adjustment is performed by the weight of each user session and/or the tunnel weight of each tunnel, because the weight of each user session and the tunnel weight are taken into account, so that the adjustment result is more effective and the bandwidth utilization is improved. And user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本公开涉及一种隧道调整方法和装置,其中,该方法包括:获取各隧道中各用户会话的权值;获取所述各隧道的隧道权值;根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。本发明实施例考虑到了每个用户会话的权值以及隧道权值,从而可以使得调整结果更为有效,提升了带宽利用率和用户体验。 (图1)
Description
本公开涉及移动通讯领域,特别是涉及一种隧道调整方法和装置和计算机存储介质。
随着互联网的快速发展,CPE(Customer Premise Equipment,客户终端设备)作为一种较为便携式的通讯终端得到了广泛的应用,用户以及运营商对网络传输中的安全越来越重视,L2TP网络作为当前流行的网络安全隧道协议广受应用,如何更好地利用当前的L2TP协议,在保证网络传输安全的前提下,需要更好地分配隧道用户会话,以提升带宽利用率和用户体验。
目前,为了在通信网络中实现二层隧道协议(L2TP)隧道负载均衡,在网络中的源设备分别与多台目的设备之间建立所述L2TP隧道,并给定各隧道建立用户数的比例。进一步的,将各隧道的加权数和用户数相乘以得到各隧道的权值,其中,加权数可以根据给定的比例确定;当用户上线时,选择所有隧道中权值最低的隧道建立用户连接,以及当任意一隧道的用户数变化时,重新计算该隧道的权值。
然而上述隧道负载均衡方式存在以下问题:
1)仅简单地利用隧道的加权数和用户数相乘来得到各隧道的权值,并依据权值最低的隧道给新上线的用户建立链接,这就导致如果A用户的实际流量非常大,但B、C、D用户的流量之和也不如A用户,那么仍然会将新用户分配到A相同的隧道,这就导致实际情况下A所在的隧道负载更加大于B、C、D所在隧道,未能充分利用带宽,导致用户体验不好。
2)仅针对新用户的链接建立来进行隧道分配,如果A、B用户在隧道1,C、D在隧道2,此时A的流量大量下降,那就仍会导致隧道2的负载大于隧道1,无法进行用户的隧道调整,仍会浪费带宽,导致用户体验不佳。
针对上述问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供一种隧道调整方法和装置,用以解决现有技术中即使用户会话的流量发生变化,也无法进行隧道调整,而导致的资源浪费和用户体验度差的技术问题。
为解决上述技术问题,一方面,本发明实施例提供一种隧道调整方法,该方法包括:获取各隧道中各用户会话的权值;获取所述各隧道的隧道权值;根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。
在一个实施方式中,在获取各隧道中各用户会话的权值之前,上述方法还包括:建立链路状态表;确定各隧道中各用户会话的权值;根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
在一个实施方式中,确定各隧道中各用户会话的权值,包括:根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值。
在一个实施方式中,根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值,包括:对所述各用户会话的平均速率和平均时延进行加权运算;将加权运算的结果作为该用户会话的权值。
在一个实施方式中,根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整,包括:接收用户会话建立请求;响应于所述用户会话建立请求,在隧道权值最小的隧道建立用户会话。
在一个实施方式中,根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整,包括:确定是否到对隧道进行调整的时间点;如果已经到达对隧道进行调整的时间点,则计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值之间的差值最小的用户会话;将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道。
在一个实施方式中,将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道,包括:在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最
小的用户会话;在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
在一个实施方式中,确定是否到对隧道进行调整的时间点,包括:确定所述各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;如果有一条或多条隧道的隧道权值超出所述预设阈值,则确定达到对隧道进行调整的时间点。
在一个实施方式中,所述隧道包括:二层隧道协议隧道。
另一方面,本发明实施例还提供一种隧道调整装置,该装置包括:第一获取模块,设置为获取各隧道中各用户会话的权值;第二获取模块,设置为获取所述各隧道的隧道权值;调整模块,设置为根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。
在一个实施方式中,上述装置还包括:建立模块,设置为在获取各隧道中各用户会话的权值之前,建立链路状态表;第一确定模块,设置为确定各隧道中各用户会话的权值;第二确定模块,设置为根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;添加模块,设置为将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
在一个实施方式中,所述第一确定模块设置为根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值。
在一个实施方式中,所述第一确定模块包括:加权单元,设置为对所述各用户会话的平均速率和平均时延进行加权运算;生成单元,设置为将加权运算的结果作为该用户会话的权值。
在一个实施方式中,所述调整模块包括:接收单元,设置为接收用户会话建立请求;建立单元,设置为响应于所述用户会话建立请求,在隧道权值最小的隧道建立用户会话。
在一个实施方式中,所述调整模块包括:确定单元,设置为确定是否到对隧道进行调整的时间点;计算单元,设置为在确定已经到达对隧道进行调整的时间点的情况下,计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;查找单元,设置为从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值之间的差值最小的用户会话;切换单元,设置为将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道。
在一个实施方式中,所述切换单元包括:建立子单元,设置为在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;传输子单元,设置为在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;断开单元,设置为在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
在一个实施方式中,所述确定单元包括:第一确定子单元,设置为确定所述各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;第二确定子单元,设置为在确定有一条或多条隧道的隧道权值超出所述预设阈值的情况下,确定达到对隧道进行调整的时间点。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行的一个或多个程序,所述一个或多个程序被所述计算机执行时使所述计算机执行上述方法。
本发明实施例提供的技术方案具有有益效果如下:通过各用户会话的权值和/或各隧道的隧道权值,进行隧道调整,因为考虑到了每个用户会话的权值以及隧道权值,从而可以使得调整结果更为有效,提升了带宽利用率和用户体验。
图1是本发明实施例中隧道调整方法的一种方法流程图;
图2是本发明实施例中隧道调整装置的一种结构框图;
图3是本发明实施例中隧道调整装置的另一种结构框图;
图4是本发明实施例中隧道调整方法的另一种方法流程图。
为了解决现有技术中即使用户会话的流量发生变化,也无法进行隧道调整,而导致的资源浪费和用户体验度差的技术问题,本发明实施例提供了一种隧道调整方法和装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。
如图1所示,在本发明实施例中提供了一种隧道调整方法,可以包括以下步骤:
步骤101:获取各隧道中各用户会话的权值;
为了获取各用户会话的权值,可以采用实时测量的方式,也可以是采用预先计算的方式。如果采用预先计算的方式,可以设置一张记录链路状态的表,将各个用户会话的权值或者是各个隧道的隧道权值记录在里面,在需要的时候,直接查找读取就可以。
例如:在获取各隧道中各用户会话的权值之前,建立链路状态表;确定各隧道中各用户会话的权值;根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
其中,各隧道中各用户会话的权值可以是根据各用户会话的平均速率和平均时延确定。即,可以通过采集每个用户会话一定时间内网络流量(即平均速率)以及进行这一段时间内多次ping检测所得到的平均时延,对二者进行一定的加权计算。其中,加权计算可以根据具体的网络环境需求(即,不同的隧道可能承载的业务也是不同的,这就对不同的隧道的网络特征会有不同的要求)来设置。例如:如果此隧道是进行ftp大数据下载(包含但不局限于ftp),则可以对速率的权值相对增加,从而保证此隧道能够更好的进行高速率大流量的数据传输。如果此隧道是进行http上网(包含但不局限于http),则可以对时延的权值相对增加,从而保证对网络流畅度以及响应时间的要求。
上述隧道的隧道权值可以是通过对该隧道的用户会话的权值进行累加得到的。
步骤102:获取所述各隧道的隧道权值;
在获取隧道权值的时候,可以是实时计算的,也可以是通过查表获得的,具体的获取方式,可以根据实际情况和需要选择,本申请对此不作限定。
步骤103:根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。
基于各用户会话的权值和/或各隧道的隧道权值,进行隧道调整可以包括以下两个方面:
1)新建新的用户会话:
在接收用户会话建立请求之后,可以响应于该用户会话建立请求,在隧道权值最小的隧道建立用户会话。
2)对隧道中用户会话进行切换调整,以实现隧道负载均衡
根据一示例性实施例,可以先确定是否到对隧道进行调整的时间点;如果已经到达对隧道进行调整的时间点,则计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值最接近的用户会话;将查找出的用户会话的权值与所述平均值最接近(即两者之间差值最小)的用户会话,切换至所述隧道权值最小的隧道。
为了保证在切换过程中业务的不中断,将查找出的用户会话的权值与所述平均值最接近的用户会话,切换至所述隧道权值最小的隧道,可以包括:在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
考虑到一直进行状态调整的话,系统负荷过大,因此,为了减少系统负荷,可以设置一个阈值,确定各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;如果有一条或多条隧道的隧道权值超出所述预设阈值,则确定达到对隧道进行调整的时间点。该阈值在实际实现的时候可以根据上一次记录表中记录的各个隧道的隧道权值的均值确定。
上述隧道可以包括但不限于:二层隧道协议隧道。
基于同一发明构思,本发明实施例中还提供了一种隧道调整装置,如下面的实施例所述。由于隧道调整装置解决问题的原理与隧道调整方法相似,因此隧道调整装置的实施可以参见隧道调整方法的实施,重复之处不再赘述。以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。图2是本发明实施例的隧道调整装置的一种结构框图,如图2所示,可以包括:第一获取模块201、第二获取模块202和调整模块203,下面对该结构进行说明。
第一获取模块201,可以设置为获取各隧道中各用户会话的权值;
第二获取模块202,可以设置为获取所述各隧道的隧道权值;
调整模块203,可以设置为根据所述各用户会话的权值和/或所述各隧道的隧道权
值,进行隧道调整。
在一个实施方式中,上述隧道调整装置可以包括:建立模块,设置为在获取各隧道中各用户会话的权值之前,建立链路状态表;第一确定模块,设置为确定各隧道中各用户会话的权值;第二确定模块,设置为根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;添加模块,设置为将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
在一个实施方式中,第一确定模块201可以设置为根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值。
在一个实施方式中,第一确定模块201可以包括:加权单元,设置为对所述各用户会话的平均速率和平均时延进行加权运算;生成单元,设置为将加权运算的结果作为该用户会话的权值。
在一个实施方式中,调整模块203可以包括:接收单元,设置为接收用户会话建立请求;建立单元,设置为响应于所述用户会话建立请求,在隧道权值最小的隧道建立用户会话。
在一个实施方式中,调整模块203可以包括:确定单元,设置为确定是否到对隧道进行调整的时间点;计算单元,设置为在确定已经到达对隧道进行调整的时间点的情况下,计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;查找单元,设置为从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值之间的差值最小的用户会话;切换单元,设置为将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道。
在一个实施方式中,切换单元可以包括:建立子单元,设置为在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;传输子单元,设置为在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;断开单元,设置为在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
在一个实施方式中,确定单元可以包括:第一确定子单元,设置为确定所述各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;第二确定子单元,设置为在确定有一条或多条隧道的隧道权值超出所述预设阈值的情况下,确定达到对隧道进行调
整的时间点。
下面结合一示例性实施例对上述隧道调整方法进行说明,然而值得注意的是,该示例性实施例仅是为了更好地说明本发明,并不构成对本发明的不当限定。
在CPE中设置L2TP隧道链路状态表,在该表中记录所有隧道以及用户会话数据,例如,该表可以有:tunnel id、session id、session weight、tunnel weight等参数,其中,tunnel id以及session id是L2TP隧道以及用户的id由相关协议进行数据的提供,session weight是用户会话的权值,此权值的计算可以包含单位时间内的用户会话数据流量(可以通过iptables功能提供,当然不仅限于iptables进行速率的统计,还可以通过其它方式确定),以及在一定时间内增加ping检测功能(由CPE设备在用户会话中构建ICMP报文,并发送到L2TP用户会话的对端),计算当前用户会话的时延,从而获得当前用户会话的状态信息,将二者进行一定的加权计算,得出相应的用户会话权值。tunnel weight(隧道权重)就是各个隧道中所有session weight(用户会话权值)的叠加,此隧道状态表可以设置为每隔一段时间自动更新(这主要是考虑到网络流量的不稳定性)或是在有新的用户会话建立的时候也要先进行数据的更新(即权值的计算)。L2TP隧道链路状态表可以如下表1所示。
表1
表1中权值与阀值可以按照以下方式设定:
1)关于权值的计算,其中session(用户会话)weight可以通过采集每个用户会话一定时间内网络流量(即平均速率)以及进行这一段时间内多次ping检测所得到的平均时延,对二者进行一定的加权计算。其中,加权计算可以根据具体的网络环境需求(即不同的隧道可能承载的业务也是不同的,这就对不同的隧道的网络特征会有不同的要求)来设置。如果此隧道是进行ftp大数据下载(包含但不局限于ftp),则可以对速率的权值相对增加,从而保证此隧道能够更好的进行高速率大流量的数据传输。如果此隧道是进行http上网(包含但不局限于http),则对时延的权值相对增加,从而保证对网络流畅度以及响应时间的要求。tunnel weight是此隧道内所有的session weight之和。
2)关于阀值的计算,阀值为所有隧道的平均权值(这里的平均权值可以是上一次常规更新链路状态表时所得到的平均值)的300%,如表1中,此时的阀值为124。当由于某个用户会话导致本条隧道的权值大于124,则认为超过了阀值,则会强制进行链路状态表的更新。此阀值的设置作用是为了更好的优化隧道的网络带宽,避免出现突然的流量爆炸的时候瞬间阻塞隧道,导致数据的丢失,甚至网络的瘫痪。
软切换,可以应用于L2TP隧道中用户会话进行性调整的情况,这里以三个隧道为例进行说明(其中,可以包含但不仅限于三个隧道)。由表1可以看出,tunnel 23900的权值是51、tunnel 45690的权值是58,tunnel 55750的权值是15。情形1:如果现在要建立新的用户会话。则直接在tunnel 55750隧道中建立。情形2:当时间节点到了,用户会话的隧道状态会进行调整,将权值最大的隧道与权值最小的隧道进行数据的平均,即58加15除以2,得出数据36,然后计算出58-36为22则将最接近22的这个用户会话,由表1中数据可知session 3525这个用户会话会被从tunnel id 45690中调整到tunnel 55750。当用户会话进行调整时,会先在新的隧道即tunnel 55750中建立此用户会话,此时,建立好会话后,CPE设备会将传输的数据报文进行复制标记,在新旧用户会话中同时传输,隧道另一端的设备则会比较新旧会话中的所有被标记的报文,当新的用户会话的数据完全能够与旧的用户会话一致之后,再断开旧的用户会话。新的L2TP隧道链路状态表可以如下表2所示:
表2
由表2中,隧道用户会话3525调整到了tunnel 55750,再计算三个权值为51、40、33,最高与最低的平均数是44,与任意一个tunnel weight的差值小于其tunnel中任意session weight的值,故调整结束。
在本例中,还提供了一种均衡装置,如图3所示,该装置可以包括如下模块:监听模块、L2TP状态链路表模块、软切换模块、防火墙模块和高级策略路由模块。其中,监听模块,设置为监听所有的用户会话,并判断是否是已知的用户会话。L2TP状态链路表模块,设置为记录各个隧道中用户会话信息及隧道状态权值。软切换模块,设置为在调整用户会话的时候,优先在新隧道中建立被调整的用户会话,当数据完全流通后,再切断当前隧道的用户会话,从而实现用户会话的不中断,很好地提升用户体验。防火墙模块,设置为将不同的用户会话进行标记。高级策略路由,设置为根据防火墙模块的标记并结合动态路由表中的对应信息将打上特定标签的数据流进行策略分配。
如图4所示,可以包括以下步骤:
步骤1:CPE设备对LAN侧传入的用户会话数据进行监听。
步骤2:CPE设备对传输的用户会话进行记录,提取关键信息,例如:会话号、
数据目的地址、源地址、目的端口和源端口。
步骤3:查找自建的链路状态表中的条目,如果查找到,则进行步骤5,如果没有查找到,则进行步骤4。
步骤4:如果没有查找到,则新建用户会话,此时查询链路状态表中的信息,寻找到权值最低的隧道并新建这个用户会话,计算其权值并将其记录到链路状态表中。
步骤5:如果是已有的用户会话,设备会实时监控所有隧道内的用户会话并计算权值,只是为了避免过于频繁的调整用户会话所在的隧道,这些权值并不会实时更新到链路状态表中,但此处会设置一个阀值,如果某条隧道的权值超过了这个阀值,则会优先发起更新链路状态表的工作,继而进行软切换。如果未超过阀值,则按照原有的用户会话进行数据的传输。
步骤6:在一段时间后,设备根据这一段时间内的各个隧道状态信息计算平均权值,从而更新状态链路表,并根据权值进行软切换。
步骤7:根据链路数据表项,利用netfilter的mangle链功能来对通过CPE的对不同的用户会话报文进行不同的标签标记工作。
步骤8:根据netfilter规则配置的标签来进行高级策略路由的配置,将不同的报文传输利用不同的用户会话进行数据的传输。
在上例中,对L2TP隧道中用户会话的进行了智能建立和调整,相对于现有技术中,L2T隧道会话建立是随机的,这样当隧道十分拥塞时,仍有可能在此隧道进行新用户会话的建立,这就导致即使别的隧道十分畅通,仍然无法有效的利用其带宽,给用户体验带来了很大的困扰。虽然有些实现方式是根据用户会话数来调整不同隧道中的用户,仍会显得十分的生硬,因为即使某个隧道中用户会话数很多,但也许这些用户会话仅仅是进行低流量的数据传输,而一个用户会话数较少的隧道中的某个用户会话正在进行大数据的传输。在本例中,通过各用户会话的权值和/或各隧道的隧道权值,进行隧道调整,因为考虑到了每个用户会话的权值以及隧道权值,从而可以使得调整结果更为有效,可以使得隧道资源得到更为有效的利用。进一步的,在控制用户会话处于可以切换隧道的方式,使得隧道资源可以更为有效地分配,从而提升了带宽利用率和用户体验。
显然,本领域的技术人员应该明白,上述的本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算
装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明实施例不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明实施例可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
本发明实施例提供的技术方案可以适用于移动通讯领域。通过各用户会话的权值和/或各隧道的隧道权值,进行隧道调整,因为考虑到了每个用户会话的权值以及隧道权值,从而可以使得调整结果更为有效,提升了带宽利用率和用户体验。
Claims (18)
- 一种隧道调整方法,其中,包括:获取各隧道中各用户会话的权值;获取所述各隧道的隧道权值;根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。
- 根据权利要求1所述的方法,其中,在获取各隧道中各用户会话的权值之前,所述方法还包括:建立链路状态表;确定各隧道中各用户会话的权值;根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
- 根据权利要求2所述的方法,其中,确定各隧道中各用户会话的权值,包括:根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值。
- 根据权利要求3所述的方法,其中,根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值,包括:对所述各用户会话的平均速率和平均时延进行加权运算;将加权运算的结果作为该用户会话的权值。
- 根据权利要求1所述的方法,其中,根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整,包括:接收用户会话建立请求;响应于所述用户会话建立请求,在隧道权值最小的隧道建立用户会话。
- 根据权利要求1所述的方法,其中,根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整,包括:确定是否到对隧道进行调整的时间点;如果已经到达对隧道进行调整的时间点,则计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值之间的差值最小的用户会话;将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道。
- 根据权利要求6所述的方法,其中,将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道,包括:在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
- 根据权利要求6所述的方法,其中,确定是否到对隧道进行调整的时间点,包括:确定所述各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;如果有一条或多条隧道的隧道权值超出所述预设阈值,则确定达到对隧道进行调整的时间点。
- 根据权利要求1至8中任一项所述的方法,其中,所述隧道包括:二层隧道协议隧道。
- 一种隧道调整装置,其中,包括:第一获取模块,设置为获取各隧道中各用户会话的权值;第二获取模块,设置为获取所述各隧道的隧道权值;调整模块,设置为根据所述各用户会话的权值和/或所述各隧道的隧道权值,进行隧道调整。
- 根据权利要求10所述的装置,其中,还包括:建立模块,设置为在获取各隧道中各用户会话的权值之前,建立链路状态表;第一确定模块,设置为确定各隧道中各用户会话的权值;第二确定模块,设置为根据所述各隧道中各用户会话的权值,确定所述各隧道的隧道权值;添加模块,设置为将所述各用户会话的权值和各隧道的隧道权值,添加至所述状态链路表中。
- 根据权利要求11所述的装置,其中,所述第一确定模块设置为根据所述各用户会话的平均速率和平均时延,确定所述各用户会话的权值。
- 根据权利要求12所述的装置,其中,所述第一确定模块包括:加权单元,设置为对所述各用户会话的平均速率和平均时延进行加权运算;生成单元,设置为将加权运算的结果作为该用户会话的权值。
- 根据权利要求10所述的装置,其中,所述调整模块包括:接收单元,设置为接收用户会话建立请求;建立单元,设置为响应于所述用户会话建立请求,在隧道权值最小的隧道建立用户会话。
- 根据权利要求10所述的装置,其中,所述调整模块包括:确定单元,设置为确定是否到对隧道进行调整的时间点;计算单元,设置为在确定已经到达对隧道进行调整的时间点的情况下,计算隧道权值最大的隧道和隧道权值最小的隧道的隧道权值的平均值;查找单元,设置为从所述隧道权值最大的隧道中,查找出用户会话的权值与所述平均值之间的差值最小的用户会话;切换单元,设置为将查找出的用户会话的权值与所述平均值之间的差值最小的用户会话,切换至所述隧道权值最小的隧道。
- 根据权利要求15所述的装置,其中,所述切换单元包括:建立子单元,设置为在所述隧道权值最小的隧道中,建立第一会话,其中,所述第一会话为所述查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;传输子单元,设置为在第一会话和第二会话中同时传输数据,其中,所述第二会话为隧道权值最大的隧道中查找出的用户会话的权值与所述平均值之间的差值最小的用户会话;断开单元,设置为在确定所述第一会话和所述第二会话中传输的数据一致之后,断开所述第二会话。
- 根据权利要求15所述的装置,其中,所述确定单元包括:第一确定子单元,设置为确定所述各隧道中是否有一条或多条隧道的隧道权值超出预设阈值;第二确定子单元,设置为在确定有一条或多条隧道的隧道权值超出所述预设阈值的情况下,确定达到对隧道进行调整的时间点。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行的一个或多个程序,所述一个或多个程序被所述计算机执行时使所述计算机执行如根据权利要求1-9中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610953529.4 | 2016-11-03 | ||
CN201610953529.4A CN108024290B (zh) | 2016-11-03 | 2016-11-03 | 一种隧道调整方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018082518A1 true WO2018082518A1 (zh) | 2018-05-11 |
Family
ID=62070153
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/108318 WO2018082518A1 (zh) | 2016-11-03 | 2017-10-30 | 一种隧道调整方法和装置和计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108024290B (zh) |
WO (1) | WO2018082518A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111949860A (zh) * | 2019-05-15 | 2020-11-17 | 北京字节跳动网络技术有限公司 | 用于生成相关度确定模型的方法和装置 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109905310B (zh) * | 2019-03-26 | 2020-12-29 | 杭州迪普科技股份有限公司 | 数据传输方法、装置、电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1630251A (zh) * | 2003-12-16 | 2005-06-22 | 华为技术有限公司 | 在通信网络中实现隧道负载均衡的方法 |
CN1863121A (zh) * | 2006-01-09 | 2006-11-15 | 华为技术有限公司 | 二层隧道协议网络服务器及其隧道建立方法 |
US7487243B1 (en) * | 2003-08-29 | 2009-02-03 | Juniper Networks, Inc. | Network tunnel termination device selection using weighted load balancing |
CN102394889A (zh) * | 2011-11-15 | 2012-03-28 | 迈普通信技术股份有限公司 | 一种接入网络服务器的方法及接入系统 |
CN105939240A (zh) * | 2015-11-25 | 2016-09-14 | 杭州迪普科技有限公司 | 负载均衡方法及装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6862622B2 (en) * | 1998-07-10 | 2005-03-01 | Van Drebbel Mariner Llc | Transmission control protocol/internet protocol (TCP/IP) packet-centric wireless point to multi-point (PTMP) transmission system architecture |
US7606929B2 (en) * | 2003-06-30 | 2009-10-20 | Microsoft Corporation | Network load balancing with connection manipulation |
CN101227407B (zh) * | 2008-01-25 | 2011-08-10 | 华为技术有限公司 | 基于二层隧道协议的报文发送方法及装置 |
CN102098201B (zh) * | 2009-12-14 | 2014-08-20 | 中兴通讯股份有限公司 | 一种实现l2tp用户接入备份的方法及网络系统 |
CN105591869B (zh) * | 2015-07-22 | 2019-03-01 | 新华三技术有限公司 | 一种选择二层隧道协议网络服务器的方法和装置 |
-
2016
- 2016-11-03 CN CN201610953529.4A patent/CN108024290B/zh active Active
-
2017
- 2017-10-30 WO PCT/CN2017/108318 patent/WO2018082518A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7487243B1 (en) * | 2003-08-29 | 2009-02-03 | Juniper Networks, Inc. | Network tunnel termination device selection using weighted load balancing |
CN1630251A (zh) * | 2003-12-16 | 2005-06-22 | 华为技术有限公司 | 在通信网络中实现隧道负载均衡的方法 |
CN1863121A (zh) * | 2006-01-09 | 2006-11-15 | 华为技术有限公司 | 二层隧道协议网络服务器及其隧道建立方法 |
CN102394889A (zh) * | 2011-11-15 | 2012-03-28 | 迈普通信技术股份有限公司 | 一种接入网络服务器的方法及接入系统 |
CN105939240A (zh) * | 2015-11-25 | 2016-09-14 | 杭州迪普科技有限公司 | 负载均衡方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111949860A (zh) * | 2019-05-15 | 2020-11-17 | 北京字节跳动网络技术有限公司 | 用于生成相关度确定模型的方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN108024290A (zh) | 2018-05-11 |
CN108024290B (zh) | 2022-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3166267B1 (en) | Method and apparatus for diverting flow | |
US9876723B2 (en) | Methods and systems for evaluating network performance of an aggregated connection | |
EP3761591B1 (en) | Tcp link configuration method, apparatus, and computer program product | |
Jiang et al. | Understanding bufferbloat in cellular networks | |
US9338192B1 (en) | Connection management using connection request transfer protocol | |
US20160261504A1 (en) | Methods and systems for transmitting data packets | |
CN106453116B (zh) | 一种基于sdn的最小连接负载均衡方法和系统 | |
EP3806407A1 (en) | Method, system, and routing device for establishing network | |
US10439950B2 (en) | Dynamic discovery of network packet size | |
US8862869B1 (en) | Method and apparatus for providing network initiated session encryption | |
US9917871B2 (en) | Optimizing media bitrate with explicit network feedback on one client only | |
CN104702527B (zh) | 多路径tcp中面向多优先级连接的拥塞时间窗控制方法 | |
CN108234309A (zh) | 一种网络数据的传输方法 | |
US20160286452A1 (en) | Data Transmission Method and Router | |
Hussein et al. | SDN for MPTCP: An enhanced architecture for large data transfers in datacenters | |
CN104168212A (zh) | 发送报文的方法和装置 | |
US20160164690A1 (en) | Communication system | |
JP6472876B2 (ja) | コンピュータ・プログラム、装置及び記憶媒体 | |
WO2018082518A1 (zh) | 一种隧道调整方法和装置和计算机存储介质 | |
Zhu et al. | A congestion-aware and robust multicast protocol in SDN-based data center networks | |
Sharma et al. | Demonstrating resilient quality of service in Software Defined Networking | |
US20220070736A1 (en) | Traffic steering device | |
CN106789650B (zh) | 基于ip的广域网加速方法及装置 | |
Adalian et al. | Load balancing in LTE core networks using SDN | |
WO2017041569A1 (zh) | 业务数据传输方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17866819 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17866819 Country of ref document: EP Kind code of ref document: A1 |