CN117692984A - Link selection method, device, terminal equipment and storage medium - Google Patents
Link selection method, device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN117692984A CN117692984A CN202311788417.4A CN202311788417A CN117692984A CN 117692984 A CN117692984 A CN 117692984A CN 202311788417 A CN202311788417 A CN 202311788417A CN 117692984 A CN117692984 A CN 117692984A
- Authority
- CN
- China
- Prior art keywords
- link
- network quality
- network
- access
- quality value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/12—Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/123—Evaluation of link metrics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/124—Shortest path evaluation using a combination of metrics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种链路选择方法、装置、终端设备以及存储介质,涉及网络通信技术领域,方法包括:根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。采用本申请技术方案能够提高多WAN通信设备提供的网络服务的网络通信质量。
This application discloses a link selection method, device, terminal equipment and storage medium, relating to the field of network communication technology. The method includes: calculating the respective network quality parameters of each access link according to the respective network quality parameters of each access link. Network quality value; sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use the access link other than the main link Other access links are used as slave links; the first network quality value is compared with the last first network quality value to obtain a comparison result; based on the comparison result and the number of links currently accessing the external network, the slave link is Select a target slave link to access an external network from the slave links, and connect the target slave link and the main link to the external network. Adopting the technical solution of the present application can improve the network communication quality of network services provided by multiple WAN communication devices.
Description
技术领域Technical field
本申请涉及网络通信技术领域,尤其涉及一种链路选择方法、装置、终端设备以及存储介质。The present application relates to the field of network communication technology, and in particular to a link selection method, device, terminal equipment and storage medium.
背景技术Background technique
随着网络的普及,为满足用户对4K电视、虚拟现实等高带宽低时延电子设备的需求,为用户多样化的视听生活提供网络基础,网络通信设备也从单一WAN(Wide AreaNetwork广域网)通信设备逐渐向多WAN通信设备转变。With the popularity of the Internet, in order to meet users' needs for high-bandwidth and low-latency electronic devices such as 4K TVs and virtual reality, and to provide a network foundation for users' diversified audio-visual lives, network communication equipment also communicates from a single WAN (Wide Area Network) Equipment is gradually transforming into multi-WAN communication equipment.
目前,市面上的多WAN通信设备通常是通过检测当前上网WAN链路的通断来进行链路选择,即以一条主链路为用户提供网络服务,其他链路闲置,在当前主链路处于无法上网状态时,切换至其他链路为用户提供网络服务。然而,这种链路选择方式在主链路的网络通信质量不佳时,仍是以该主链路进行上网,其他链路都处于空闲状态,无法实现链路的自动切换,设备的链路利用率较低,导致网络通信质量较差。Currently, multi-WAN communication equipment on the market usually performs link selection by detecting the continuity of the current Internet WAN link. That is, one main link is used to provide network services to users, and other links are idle. When the current main link is in When the Internet is unavailable, it switches to other links to provide network services to users. However, with this link selection method, when the network communication quality of the main link is poor, the main link is still used to access the Internet, and other links are in an idle state. Automatic link switching cannot be realized. The link of the device Low utilization rate results in poor network communication quality.
综上,如何提高多WAN通信设备提供的网络服务的网络通信质量,俨然已经成为本领域亟待解决的技术问题。In summary, how to improve the network communication quality of network services provided by multiple WAN communication devices has become an urgent technical issue in this field that needs to be solved.
发明内容Contents of the invention
本申请的主要目的在于提供一种链路选择方法、装置、终端设备以及存储介质,旨在提高多WAN通信设备提供的网络服务的网络通信质量。The main purpose of this application is to provide a link selection method, device, terminal equipment and storage medium, aiming to improve the network communication quality of network services provided by multi-WAN communication equipment.
为实现上述目的,本申请提供一种链路选择方法,所述链路选择方法包括:To achieve the above objectives, this application provides a link selection method, which includes:
根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;Calculate the respective network quality value of each access link according to the respective network quality parameters of each access link;
将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;Sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use other access links except the main link. road as a slave link;
将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;Compare the first network quality value with the last first network quality value to obtain a comparison result;
根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。According to the comparison result and the number of links currently connected to the external network, select a target slave link to access the external network from the slave links, and connect the target slave link and the main link External network.
可选地,所述方法还包括:Optionally, the method also includes:
实时监测链路接入状态,并根据所述链路接入状态确定接入链路的数量;Monitor link access status in real time, and determine the number of access links based on the link access status;
若所述接入链路的数量大于一,则执行根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值及之后的步骤;If the number of the access links is greater than one, then perform the steps of calculating the network quality value of each access link according to the network quality parameter of each access link and subsequent steps;
若所述接入链路的数量等于一,则将所述接入链路接入外部网络。If the number of the access links is equal to one, the access links are connected to the external network.
可选地,所述根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值的步骤,包括:Optionally, the step of calculating the network quality value of each access link according to the network quality parameter of each access link includes:
按照预设的检测频率周期性获取各接入链路各自的网络质量参数,其中,所述网络质量参数包括时延、丢包率和吞吐量;Periodically obtain network quality parameters of each access link according to a preset detection frequency, where the network quality parameters include delay, packet loss rate and throughput;
针对每个所述接入链路,将所述接入链路对应的所述时延、所述丢包率和所述吞吐量按照各自的权重进行加权计算,得到所述接入链路对应的网络质量值。For each access link, the delay, the packet loss rate and the throughput corresponding to the access link are weighted and calculated according to their respective weights to obtain the corresponding network quality value.
可选地,在所述按照预设的检测频率周期性获取各接入链路各自的网络质量参数的步骤之前,所述方法还包括:Optionally, before the step of periodically obtaining network quality parameters of each access link according to a preset detection frequency, the method further includes:
实时监测用户配置数据,其中,所述用户配置数据包括检测频率、时延的优先级、丢包率的优先级和吞吐量的优先级;Monitor user configuration data in real time, where the user configuration data includes detection frequency, priority of delay, priority of packet loss rate, and priority of throughput;
根据所述时延的优先级、所述丢包率的优先级和所述吞吐量的优先级确定所述时延、所述丢包率和所述吞吐量各自的权重。The respective weights of the delay, the packet loss rate and the throughput are determined according to the priority of the delay, the priority of the packet loss rate and the priority of the throughput.
可选地,所述根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路的步骤,包括:Optionally, the step of selecting a target secondary link to access the external network from the secondary links based on the comparison result and the number of links currently accessing the external network includes:
确定当前接入外部网络的链路数量;Determine the number of links currently connected to the external network;
若所述链路数量为一,且比较结果为所述第一网络质量值大于或者等于所述上一次第一网络质量值,则从所述从链路中选择接入外部网络的目标从链路的数量为零;If the number of links is one and the comparison result is that the first network quality value is greater than or equal to the last first network quality value, select a target slave link to access the external network from the slave links. The number of roads is zero;
若所述链路数量为一,且比较结果为所述第一网络质量值小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值和所述从链路的网络质量值从所述从链路中选择接入外部网络的目标从链路。If the number of links is one and the comparison result is that the first network quality value is less than the last first network quality value, then calculate the first network quality value and the last first network quality value. and select a target slave link to access the external network from the slave links based on the ratio and the network quality value of the slave link.
可选地,在所述确定当前接入外部网络的链路数量的步骤之后,所述方法还包括:Optionally, after the step of determining the number of links currently accessing the external network, the method further includes:
若所述链路数量大于一,则获取当前接入外部网络的历史主链路和历史从链路各自的负载百分比,以及,将所述从链路的网络质量值与历史从链路的网络质量值进行比较,得到第二比较结果;If the number of links is greater than one, obtain the respective load percentages of the historical primary link and the historical secondary link currently connected to the external network, and compare the network quality value of the secondary link with the network quality value of the historical secondary link. Compare the quality values to obtain the second comparison result;
若比较结果为所述第一网络质量值等于所述上一次第一网络质量值,则根据所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路;If the comparison result is that the first network quality value is equal to the last first network quality value, then according to the second comparison result, select a target slave link to access the external network from the slave links;
若比较结果为所述第一网络质量值大于或者小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值、所述负载百分比和所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路。If the comparison result is that the first network quality value is greater than or less than the last first network quality value, then the ratio between the first network quality value and the last first network quality value is calculated, and based on The ratio, the load percentage and the second comparison result are used to select a target secondary link for accessing the external network from the secondary links.
可选地,在所述将所述网络质量值按照从大到小的顺序排序的步骤之后,所述方法还包括:Optionally, after the step of sorting the network quality values from large to small, the method further includes:
按照所述网络质量值的排序更新路由选择表,以使所述路由选择表中的各接入链路按照网络质量值的排序进行排列;Update the routing table according to the sorting of the network quality value, so that each access link in the routing table is arranged according to the sorting of the network quality value;
基于更新后的所述路由选择表进行路由选择。Routing is selected based on the updated routing table.
此外,为实现上述目的,本申请还提供一种链路选择装置,所述链路选择装置包括:In addition, to achieve the above object, this application also provides a link selection device, the link selection device includes:
计算模块,用于根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;A calculation module configured to calculate the respective network quality values of each access link based on the respective network quality parameters of each access link;
排序模块,用于将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;A sorting module, configured to sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use the access link other than the main link Other access links serve as slave links;
比较模块,用于将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;A comparison module, used to compare the first network quality value with the last first network quality value to obtain a comparison result;
链路选择模块,用于根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。A link selection module, configured to select a target slave link that accesses the external network from the slave links based on the comparison result and the number of links currently connected to the external network, and combine the target slave link and The main link is connected to an external network.
其中,本申请链路选择装置的各个功能模块在运行时实现如上所述的链路选择方法的步骤。Wherein, each functional module of the link selection device of the present application implements the steps of the link selection method as described above during operation.
此外,为实现上述目的,本申请还提供一种终端设备,所述终端设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的链路选择程序,所述链路选择程序被所述处理器执行时实现如上所述的链路选择方法的步骤。In addition, to achieve the above object, the present application also provides a terminal device, which includes: a memory, a processor, and a link selection program stored on the memory and executable on the processor. When the link selection program is executed by the processor, the steps of the link selection method as described above are implemented.
此外,为实现上述目的,本申请还提出一种存储介质,所述存储介质为计算机可读存储介质,所述存储介质上存储有链路选择程序,所述链路选择程序被处理器执行时实现如上所述的链路选择方法的步骤。In addition, in order to achieve the above object, this application also proposes a storage medium. The storage medium is a computer-readable storage medium. A link selection program is stored on the storage medium. When the link selection program is executed by a processor, Steps to implement the link selection method as described above.
本申请提供的一种链路选择方法、装置、终端设备以及存储介质,其中,链路选择方法包括:根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。This application provides a link selection method, device, terminal equipment and storage medium, wherein the link selection method includes: calculating the respective network quality parameters of each access link according to the respective network quality parameters of each access link. Quality value: Sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use other links except the main link. The access link is used as a slave link; the first network quality value is compared with the last first network quality value to obtain a comparison result; based on the comparison result and the number of links currently accessing the external network, the slave link is Select a target slave link to access the external network from the slave links, and connect the target slave link and the main link to the external network.
如此,本申请通过根据多WAN通信设备的各接入链路的网络质量优劣来选择用于连接外部网络的主链路,实现链路的自动切换,并根据实际运用时主链路的质量状态前后变化来进行评估和选择添加从链路用于优化网络通信质量,既保证了网络整体质量的综合性,同时也兼顾了网络切换的灵活性,从而提高了多WAN通信设备提供的网络服务的网络通信质量。In this way, this application selects the main link for connecting to the external network based on the network quality of each access link of the multi-WAN communication device to achieve automatic link switching, and based on the quality of the main link during actual use Evaluate and select to add slave links based on status changes before and after to optimize network communication quality, which not only ensures the comprehensiveness of the overall network quality, but also takes into account the flexibility of network switching, thus improving the network services provided by multiple WAN communication devices. network communication quality.
附图说明Description of the drawings
图1为本申请实施例方案涉及的终端设备硬件运行环境的设备结构示意图;Figure 1 is a schematic diagram of the equipment structure of the terminal equipment hardware operating environment involved in the embodiment of the present application;
图2为本申请链路选择方法一实施例的实施流程示意图;Figure 2 is a schematic diagram of an implementation flow of an embodiment of the link selection method of the present application;
图3为本申请链路选择方法一实施例所涉及的通信设备结构示意图;Figure 3 is a schematic structural diagram of a communication device involved in an embodiment of the link selection method of the present application;
图4为本申请链路选择方法一实施例所涉及的路由选择实施流程示意图;Figure 4 is a schematic diagram of the routing implementation process involved in one embodiment of the link selection method of this application;
图5为本申请链路选择装置一实施例的功能模块示意图。Figure 5 is a schematic diagram of functional modules of an embodiment of the link selection device of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
需要说明,本申请实施例中所有方向性指示(诸如上、下、左、右、前、后……)仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of this application are only used to explain the relationship between components in a specific posture (as shown in the drawings). Relative positional relationship, movement conditions, etc., if the specific posture changes, the directional indication will also change accordingly.
在本申请中,除非另有明确的规定和限定,术语“连接”、“固定”等应做广义理解,例如,“固定”可以是固定连接,也可以是可拆卸连接,或成一体;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系,除非另有明确的限定。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。In this application, unless otherwise clearly stated and limited, the terms "connection", "fixing", etc. should be understood in a broad sense. For example, "fixing" can be a fixed connection, a detachable connection, or an integral body; it can It can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be an internal connection between two elements or an interactive relationship between two elements, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
另外,在本申请中如涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。In addition, descriptions such as "first", "second", etc. in this application are for descriptive purposes only and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions in various embodiments can be combined with each other, but it must be based on the realization by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that such a combination of technical solutions does not exist. , nor is it within the scope of protection required by this application.
本申请实施例提供一种终端设备。An embodiment of the present application provides a terminal device.
需要说明的是,本申请实施例终端设备可以是具备多WAN口的交换机、路由器、网关或者CPE等网络通信设备。It should be noted that the terminal device in this embodiment of the present application may be a network communication device such as a switch, router, gateway or CPE with multiple WAN ports.
如图1所示,图1是本申请实施例方案涉及的终端设备硬件运行环境的设备结构示意图。在终端设备的硬件运行环境中,该终端设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in Figure 1, Figure 1 is a schematic diagram of the equipment structure of the terminal equipment hardware operating environment involved in the embodiment of the present application. In the hardware running environment of the terminal device, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). The optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的终端设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the terminal device shown in Figure 1 does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及链路选择程序。As shown in Figure 1, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module and a link selection program.
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:In the device shown in Figure 1, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client (user) and communicate with the client; and the processor 1001 may be used to call the link selection program stored in memory 1005 and perform the following operations:
根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;Calculate the respective network quality value of each access link according to the respective network quality parameters of each access link;
将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;Sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use other access links except the main link. road as a slave link;
将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;Compare the first network quality value with the last first network quality value to obtain a comparison result;
根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。According to the comparison result and the number of links currently connected to the external network, select a target slave link to access the external network from the slave links, and connect the target slave link and the main link External network.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
实时监测链路接入状态,并根据所述链路接入状态确定接入链路的数量;Monitor link access status in real time, and determine the number of access links based on the link access status;
若所述接入链路的数量大于一,则执行根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值及之后的步骤;If the number of the access links is greater than one, then perform the steps of calculating the network quality value of each access link according to the network quality parameter of each access link and subsequent steps;
若所述接入链路的数量等于一,则将所述接入链路接入外部网络。If the number of the access links is equal to one, the access links are connected to the external network.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
按照预设的检测频率周期性获取各接入链路各自的网络质量参数,其中,所述网络质量参数包括时延、丢包率和吞吐量;Periodically obtain network quality parameters of each access link according to a preset detection frequency, where the network quality parameters include delay, packet loss rate and throughput;
针对每个所述接入链路,将所述接入链路对应的所述时延、所述丢包率和所述吞吐量按照各自的权重进行加权计算,得到所述接入链路对应的网络质量值。For each access link, the delay, the packet loss rate and the throughput corresponding to the access link are weighted and calculated according to their respective weights to obtain the corresponding network quality value.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
实时监测用户配置数据,其中,所述用户配置数据包括检测频率、时延的优先级、丢包率的优先级和吞吐量的优先级;Monitor user configuration data in real time, where the user configuration data includes detection frequency, priority of delay, priority of packet loss rate, and priority of throughput;
根据所述时延的优先级、所述丢包率的优先级和所述吞吐量的优先级确定所述时延、所述丢包率和所述吞吐量各自的权重。The respective weights of the delay, the packet loss rate and the throughput are determined according to the priority of the delay, the priority of the packet loss rate and the priority of the throughput.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
确定当前接入外部网络的链路数量;Determine the number of links currently connected to the external network;
若所述链路数量为一,且比较结果为所述第一网络质量值大于或者等于所述上一次第一网络质量值,则从所述从链路中选择接入外部网络的目标从链路的数量为零;If the number of links is one and the comparison result is that the first network quality value is greater than or equal to the last first network quality value, select a target slave link to access the external network from the slave links. The number of roads is zero;
若所述链路数量为一,且比较结果为所述第一网络质量值小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值和所述从链路的网络质量值从所述从链路中选择接入外部网络的目标从链路。If the number of links is one and the comparison result is that the first network quality value is less than the last first network quality value, then calculate the first network quality value and the last first network quality value. and select a target slave link to access the external network from the slave links based on the ratio and the network quality value of the slave link.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
若所述链路数量大于一,则获取当前接入外部网络的历史主链路和历史从链路各自的负载百分比,以及,将所述从链路的网络质量值与历史从链路的网络质量值进行比较,得到第二比较结果;If the number of links is greater than one, obtain the respective load percentages of the historical primary link and the historical secondary link currently connected to the external network, and compare the network quality value of the secondary link with the network quality value of the historical secondary link. Compare the quality values to obtain the second comparison result;
若比较结果为所述第一网络质量值等于所述上一次第一网络质量值,则根据所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路;If the comparison result is that the first network quality value is equal to the last first network quality value, then according to the second comparison result, select a target slave link to access the external network from the slave links;
若比较结果为所述第一网络质量值大于或者小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值、所述负载百分比和所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路。If the comparison result is that the first network quality value is greater than or less than the last first network quality value, then the ratio between the first network quality value and the last first network quality value is calculated, and based on The ratio, the load percentage and the second comparison result are used to select a target secondary link for accessing the external network from the secondary links.
可选地,处理器1001还可以用于调用存储器1005中存储的链路选择程序,并执行以下操作:Optionally, the processor 1001 can also be used to call the link selection program stored in the memory 1005, and perform the following operations:
按照所述网络质量值的排序更新路由选择表,以使所述路由选择表中的各接入链路按照网络质量值的排序进行排列;Update the routing table according to the sorting of the network quality value, so that each access link in the routing table is arranged according to the sorting of the network quality value;
基于更新后的所述路由选择表进行路由选择。Routing is selected based on the updated routing table.
基于上述的硬件结构,提出本申请链路选择方法的各个实施例的整体构思。Based on the above hardware structure, the overall concept of each embodiment of the link selection method of the present application is proposed.
在本申请实施例中,随着网络的普及,为满足用户对4K电视、虚拟现实等高带宽低时延电子设备的需求,为用户多样化的视听生活提供网络基础,网络通信设备也从单一WAN通信设备逐渐向多WAN通信设备转变。In the embodiment of this application, with the popularization of the network, in order to meet users' needs for high-bandwidth and low-latency electronic devices such as 4K TVs and virtual reality, and to provide a network foundation for users' diversified audio-visual lives, network communication equipment has also evolved from a single WAN communication equipment is gradually transforming into multi-WAN communication equipment.
目前,市面上的多WAN通信设备通常是通过检测当前上网WAN链路的通断来进行链路选择,即以一条主链路为用户提供网络服务,其他链路闲置,在当前主链路处于无法上网状态时,切换至其他链路为用户提供网络服务。然而,这种链路选择方式在主链路的网络通信质量不佳时,仍是以该主链路进行上网,其他链路都处于空闲状态,无法实现链路的自动切换,设备的链路利用率较低,导致网络通信质量较差。Currently, multi-WAN communication equipment on the market usually performs link selection by detecting the continuity of the current Internet WAN link. That is, one main link is used to provide network services to users, and other links are idle. When the current main link is in When the Internet is unavailable, it switches to other links to provide network services to users. However, with this link selection method, when the network communication quality of the main link is poor, the main link is still used to access the Internet, and other links are in an idle state. Automatic link switching cannot be realized. The link of the device Low utilization rate results in poor network communication quality.
综上,如何提高多WAN通信设备提供的网络服务的网络通信质量,俨然已经成为本领域亟待解决的技术问题。In summary, how to improve the network communication quality of network services provided by multiple WAN communication devices has become an urgent technical issue in this field that needs to be solved.
针对上述问题,本申请实施例提出一种链路选择方法,该链路选择方法包括:根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。In response to the above problems, an embodiment of the present application proposes a link selection method. The link selection method includes: calculating the network quality value of each access link according to the network quality parameter of each access link; The network quality values are sorted from large to small, and the access link corresponding to the first network quality value ranked first is used as the main link, and other access links except the main link are As a slave link; compare the first network quality value with the last first network quality value to obtain a comparison result; according to the comparison result and the number of links currently connected to the external network, from the slave link Select a target secondary link to access the external network, and connect the target secondary link and the primary link to the external network.
如此,本申请通过根据多WAN通信设备的各接入链路的网络质量优劣来选择用于连接外部网络的主链路,实现链路的自动切换,并根据实际运用时主链路的质量状态前后变化来进行评估和选择添加从链路用于优化网络通信质量,既保证了网络整体质量的综合性,同时也兼顾了网络切换的灵活性,从而提高了多WAN通信设备提供的网络服务的网络通信质量。In this way, this application selects the main link for connecting to the external network based on the network quality of each access link of the multi-WAN communication device to achieve automatic link switching, and based on the quality of the main link during actual use Evaluate and select to add slave links based on status changes before and after to optimize network communication quality, which not only ensures the comprehensiveness of the overall network quality, but also takes into account the flexibility of network switching, thus improving the network services provided by multiple WAN communication devices. network communication quality.
基于上述本申请链路选择方法的总体构思,提出本申请链路选择方法的各个实施例。Based on the above overall concept of the link selection method of the present application, various embodiments of the link selection method of the present application are proposed.
请参照图2,图2为本申请链路选择方法第一实施例的流程示意图。需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。Please refer to Figure 2, which is a schematic flow chart of the first embodiment of the link selection method of the present application. It should be noted that although a logical sequence is shown in the flowcharts, in some cases the steps shown or described may be performed in a sequence different from that herein.
在本实施例中,为便于理解和阐述,在本实施例中均以多WAN通信设备作为直接的执行主体,以下简称为通信设备,以针对本申请链路选择方法进行阐述。In this embodiment, in order to facilitate understanding and explanation, the multi-WAN communication device is used as the direct execution subject in this embodiment, hereinafter referred to as the communication device, to explain the link selection method of this application.
如图2所示,在本实施例中,本申请链路选择方法可以包括:As shown in Figure 2, in this embodiment, the link selection method of this application may include:
步骤S10:根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;Step S10: Calculate the respective network quality values of each access link according to the respective network quality parameters of each access link;
需要说明的是,在本实施例中,通信设备包括多个WAN口,该WAN口是用来连接外部I SP(I nternet Servi ce Provi der互联网服务提供商)网络,如ADSL(AsymmetricDigital Subscriber Line非对称数字用户线路)、DDN(Digital Data Network数字数据网络)、以太网等各种接入线路,接入链路指已经开通了网络服务的WAN口链路,接入链路可以接入外部网络来为用户提供网络服务,也可以暂时不接入外部网络,仅作为接入了外部网络的链路的备份进行闲置。It should be noted that in this embodiment, the communication device includes multiple WAN ports, and the WAN ports are used to connect to an external ISP (Internet Service Provider) network, such as ADSL (Asymmetric Digital Subscriber Line). Symmetrical Digital Subscriber Line), DDN (Digital Data Network), Ethernet and other access lines. The access link refers to the WAN port link that has opened network services. The access link can be connected to the external network To provide network services to users, it can also be temporarily not connected to the external network, and can only be idle as a backup for the link connected to the external network.
在本实施例中,通信设备获取各个WAN接口各自的接入链路的网络质量参数,并根据网络质量参数计算各个接入链路各自的网络质量值。In this embodiment, the communication device obtains the network quality parameters of the respective access links of each WAN interface, and calculates the respective network quality values of each access link based on the network quality parameters.
需要说明的是,在本实施例中,链路的网络质量参数可以包括链路的时延、丢包、吞吐量等网络质量参数,网络质量值为通信设备根据各链路的网络质量参数的值,所计算出的各链路的质量评分,网络质量值的得分制度可以为百分之、十分制、百分比制等,具体的得分制度在本实施例中不作限定,可根据实际场景进行设置。It should be noted that in this embodiment, the network quality parameters of the link may include network quality parameters such as link delay, packet loss, and throughput. The network quality value is the value of the communication device based on the network quality parameters of each link. value, the calculated quality score of each link. The scoring system of the network quality value can be percent, ten points, percentage, etc. The specific scoring system is not limited in this embodiment and can be set according to the actual scenario. .
步骤S20:将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;Step S20: Sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use other links except the main link. The access link serves as the slave link;
在本实施例中,通信设备将计算得到的网络质量值按照从大到小的顺序排列,并将排序第一的第一网络质量值对应的接入链路作为主链路,将除了主链路之外的其他接入链路作为从链路,即,将网络质量值最大、网络质量最好的接入链路作为主链路,将其他接入链路作为从链路,从而通过根据网络质量选择接入外部网络的主链路,有效改善通信设备所提供的网络服务的网络质量。In this embodiment, the communication device arranges the calculated network quality values in order from large to small, and uses the access link corresponding to the first network quality value ranked first as the main link. Other access links outside the network are used as slave links, that is, the access link with the largest network quality value and the best network quality is used as the master link, and other access links are used as slave links. Network quality selects the main link to the external network to effectively improve the network quality of network services provided by communication equipment.
步骤S30:将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;Step S30: Compare the first network quality value with the last first network quality value to obtain a comparison result;
在本实施例中,通信设备在根据各接入链路的网络质量值确定网络质量最好的主链路后,将该主链路的第一网络质量值与上一次第一网络质量值进行大小比较,得到两个值的大小比较结果,其中,上一次第一网络质量值指通信设备在上一次根据各接入链路的网络质量参数所确定的主链路的网络质量值,也即当前接入外部网络的主链路的网络质量值。In this embodiment, after the communication device determines the main link with the best network quality based on the network quality value of each access link, the communication device compares the first network quality value of the main link with the last first network quality value. Compare the sizes to obtain the size comparison results of the two values. The last first network quality value refers to the network quality value of the main link determined by the communication device based on the network quality parameters of each access link last time, that is, The network quality value of the main link currently connected to the external network.
步骤S40:根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。Step S40: According to the comparison result and the number of links currently connected to the external network, select a target slave link that accesses the external network from the slave links, and combine the target slave link and the main link access the external network.
在本实施例中,通信设备根据第一网络质量值和历史第一网络值的大小比较结果和当前接入外部网络的链路数量,从从链路中选择接入外部网络的目标从链路,具体选择接入外部网络的目标从链路的数量,以及确定目标从链路的业务负载百分比和主链路的业务负载百分比,确定好链路的数量和业务负载百分比后,将目标从链路和主链路接入外部网络,通过该主链路和目标从链路为用户提供网络服务,增大带宽,提高网络服务质量。In this embodiment, the communication device selects a target slave link to access the external network from the slave links based on the comparison result between the first network quality value and the historical first network value and the number of links currently connected to the external network. , specifically select the number of target slave links to access the external network, and determine the business load percentage of the target slave link and the business load percentage of the main link. After determining the number of links and the business load percentage, add the target slave link The main link and the main link are connected to the external network, and network services are provided to users through the main link and target slave links, increasing bandwidth and improving network service quality.
需要说明的是,在本实施例中,选择接入外部网络的目标从链路时,按照各从链路各自的网络质量值从高到低进行选择,以确保接入的网络质量最佳。It should be noted that in this embodiment, when selecting the target slave link to access the external network, the selection is made according to the network quality value of each slave link from high to low to ensure that the quality of the accessed network is the best.
进一步地,在一种可行的实施例中,本申请链路选择方法还可以包括:Further, in a feasible embodiment, the link selection method of this application may also include:
步骤A10:实时监测链路接入状态,并根据所述链路接入状态确定接入链路的数量;Step A10: Monitor the link access status in real time, and determine the number of access links based on the link access status;
在本实施例中,通信设备在开启后,通过自身的WAN链路监控模块实时监测自身各WAN口的WAN链路接入状态,链路接入状态可以分为WAN链路的接入和断开,并根据监测到的链路接入状态统计接入WAN链路的数量,有接入则数量加一,如果已存在WAN链路被断开,则数量减一。In this embodiment, after the communication device is turned on, it monitors the WAN link access status of each WAN port of its own WAN port in real time through its own WAN link monitoring module. The link access status can be divided into WAN link access and disconnection. Turn on, and count the number of accessed WAN links based on the monitored link access status. If there is access, the number will be increased by one. If an existing WAN link is disconnected, the number will be reduced by one.
步骤A20:若所述接入链路的数量大于一,则执行根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值及之后的步骤;Step A20: If the number of the access links is greater than one, perform the following steps: calculate the network quality value of each access link according to the network quality parameter of each access link;
在本实施例中,通信设备判断接入链路的数量是否大于一,若接入链路的数量大于一,则根据各接入链路各自的网络质量参数,计算各接入链路各自的网络质量值;然后,将网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除主链路之外的其他接入链路作为从链路;将第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;最后,根据比较结果和当前接入外部网络的链路数量,从从链路中选择接入外部网络的目标从链路,并将目标从链路和主链路接入外部网络。In this embodiment, the communication device determines whether the number of access links is greater than one. If the number of access links is greater than one, it calculates the respective network quality parameters of each access link based on the respective network quality parameters of each access link. Network quality value; then, sort the network quality values from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use other access links except the main link The incoming link is used as the slave link; the first network quality value is compared with the last first network quality value to obtain the comparison result; finally, based on the comparison result and the number of links currently connected to the external network, the slave link is Select the target secondary link that connects to the external network, and connect the target secondary link and primary link to the external network.
步骤A30:若所述接入链路的数量等于一,则将所述接入链路接入外部网络。Step A30: If the number of access links is equal to one, connect the access links to the external network.
在本实施例中,通信设备判断接入链路的数量是否大于一,若接入链路的数量等于一,说明只有一条WAN链路可作为上网接口,则将该条接入链路接入外部网络。In this embodiment, the communication device determines whether the number of access links is greater than one. If the number of access links is equal to one, it means that only one WAN link can be used as an Internet access interface, and then the access link is connected External network.
如此,通信设备通过实时统计当前接入的WAN链路数量,在有多条链路时灵活的从这多条链路中选择网络质量更好的链路进行网络切换,以优化网络环境,为用户带来更好的上网体验,在只有一条链路时将该唯一的链路作为上网接口,无需计算该链路的网络质量值,节省设备的计算资源。In this way, the communication device counts the number of currently accessed WAN links in real time, and when there are multiple links, flexibly selects links with better network quality from these multiple links for network switching to optimize the network environment and provide It brings users a better Internet experience. When there is only one link, the only link is used as the Internet interface. There is no need to calculate the network quality value of the link, saving the computing resources of the device.
示例性地,在一种可行的实施例中,如图3所示,通信设备包括WAN链路监控模块、链路参数获取模块、链路质量评分模块和路由选择模块,其中,WAN链路监控模块负责WAN链路的接入与断开的监控和统计,当有WAN链路接入或者断开时,该模块实时统计设备接入网络的WAN链路数量,并发送事件通知链路参数获取模块;链路参数获取模块负责周期性获取各WAN链路的时延、丢包、吞吐量三项网络质量参数,并记录于数据表中,以供链路质量评分模块取用;链路质量评分模块负责通过以上三项网络质量指标和用户配置,通过加权运算,计算出各WAN链路的质量评分,即网络质量值,然后进行排序和记录,作为路由选择模块更新的依据;路由选择模块,用于负责维护和更新通信设备的路由选择表,以最终决定通过哪条WAN链路接入外部I SP网络。Exemplarily, in a feasible embodiment, as shown in Figure 3, the communication device includes a WAN link monitoring module, a link parameter acquisition module, a link quality scoring module and a routing module, where the WAN link monitoring module The module is responsible for monitoring and counting the access and disconnection of WAN links. When a WAN link is connected or disconnected, the module counts the number of WAN links connected to the network by the device in real time, and sends event notifications to obtain link parameters. module; the link parameter acquisition module is responsible for periodically acquiring the three network quality parameters of delay, packet loss, and throughput of each WAN link, and recording them in the data table for use by the link quality scoring module; link quality The scoring module is responsible for calculating the quality score of each WAN link, that is, the network quality value, through weighted calculations through the above three network quality indicators and user configurations, and then sorting and recording them as the basis for updating the routing module; the routing module , responsible for maintaining and updating the routing table of communication equipment to ultimately decide which WAN link to access the external ISP network.
在本实施例中,本申请实施例通过根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。In this embodiment, the embodiment of the present application calculates the network quality value of each access link according to the network quality parameter of each access link; and sorts the network quality values in order from large to small. Sort, use the access link corresponding to the first network quality value ranked first as the main link, use other access links except the main link as the slave link; use the first network quality value The value is compared with the last first network quality value to obtain the comparison result; according to the comparison result and the number of links currently accessing the external network, select the target secondary link to access the external network from the secondary link, And connect the target slave link and the main link to the external network.
如此,本申请实施例通过根据多WAN通信设备的各接入链路的网络质量优劣来选择用于连接外部网络的主链路,实现链路的自动切换,并根据实际运用时主链路的质量状态前后变化来进行评估和选择添加从链路用于优化网络通信质量,既保证了网络整体质量的综合性,同时也兼顾了网络切换的灵活性,从而提高了多WAN通信设备提供的网络服务的网络通信质量。In this way, the embodiment of the present application selects the main link for connecting to the external network based on the network quality of each access link of the multi-WAN communication device, thereby realizing automatic link switching, and based on the actual use of the main link The quality status changes before and after to evaluate and select to add slave links to optimize the network communication quality. This not only ensures the comprehensiveness of the overall network quality, but also takes into account the flexibility of network switching, thus improving the quality provided by multi-WAN communication equipment. Network communication quality of network services.
进一步地,基于上述本申请链路选择方法的第一实施例,提出本申请链路选择方法的第二实施例。Furthermore, based on the first embodiment of the link selection method of the present application, a second embodiment of the link selection method of the present application is proposed.
在本实施例中,上述步骤S10:根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值,包括:In this embodiment, the above step S10: Calculate the network quality value of each access link according to the network quality parameter of each access link, including:
步骤S101:按照预设的检测频率周期性获取各接入链路各自的网络质量参数,其中,所述网络质量参数包括时延、丢包率和吞吐量;Step S101: Periodically obtain the network quality parameters of each access link according to the preset detection frequency, where the network quality parameters include delay, packet loss rate and throughput;
在本实施例中,通信设备在开启后,按照预设的检测频率周期性的获取自身各个接入WAN链路的网络质量参数,该网络质量参数包括链路的时延、丢包率和吞吐量,时延、丢包率和吞吐量均为检测网络质量的性能指标。In this embodiment, after the communication device is turned on, it periodically obtains the network quality parameters of each of its access WAN links according to the preset detection frequency. The network quality parameters include the link delay, packet loss rate and throughput. Volume, delay, packet loss rate and throughput are all performance indicators for detecting network quality.
具体地,在本实施例中,通信设备中预置有网络测试工具,目前网络测试工具有很多,比如ping、speedtest、tracerouter、iperf等。由于iperf工具可同时检测网络时延、丢包率和吞吐量,功能全面且强大,在本实施中以iperf为例,通信设备在开启后通过自身配置的定时器进行计时,在计时达到预设的检测频率时即启动iperf,检测各WAN链路的时延、丢包率和吞吐量这些网络质量参数并记录下来,形成一张各WAN链路的网络质量参数检测表。Specifically, in this embodiment, the communication device is preset with a network testing tool. Currently, there are many network testing tools, such as ping, speedtest, tracerouter, iperf, etc. Since the iperf tool can detect network delay, packet loss rate and throughput at the same time, it has comprehensive and powerful functions. In this implementation, iperf is used as an example. After the communication device is turned on, it counts through its own configured timer. When the timing reaches the preset When the detection frequency is set, iperf is started to detect the network quality parameters such as delay, packet loss rate and throughput of each WAN link and record them to form a network quality parameter detection table of each WAN link.
步骤S102:针对每个所述接入链路,将所述接入链路对应的所述时延、所述丢包率和所述吞吐量按照各自的权重进行加权计算,得到所述接入链路对应的网络质量值。Step S102: For each access link, weight the delay, the packet loss rate and the throughput corresponding to the access link according to their respective weights to obtain the access link. The network quality value corresponding to the link.
在本实施例中,通信设备针对每个接入WAN链路,将链路对应的时延、丢包率和吞吐量等网络质量参数按照各自的权重进行加权计算,得到链路对应的网络质量值,网络质量值ST=ω1S1+ω2S2+ω3S3,其中,S1、S2和S3分别代表某一WAN链路在时延、丢包率和吞吐量上的评分,ω1、ω2和ω3分别代表各项评分的权重,ST则代表加权后的总评分,即链路的网络质量值,这样使得网络质量评分算法既考虑了三项核心的网络指标,同时也可根据网络的需求来决定三项指标影响的大小,既保证了网络整体质量的综合性,同时也兼顾了网络质量的灵活性。In this embodiment, the communication device weights and calculates the network quality parameters such as delay, packet loss rate, and throughput corresponding to the link according to their respective weights for each access WAN link to obtain the network quality corresponding to the link. value, network quality value S T =ω 1 S 1 +ω 2 S 2 +ω 3 S 3 , where S 1 , S 2 and S 3 respectively represent the delay, packet loss rate and throughput of a certain WAN link. For the ratings on network indicators, and the impact of the three indicators can also be determined according to the needs of the network, which not only ensures the comprehensiveness of the overall network quality, but also takes into account the flexibility of the network quality.
需要说明的是,在本实施例中,通信设备在获取到各接入链路的网络质量参数后,需对这些参数进行预处理,以便于对这些参数进行加权计算,得到网络质量值,预处理的步骤具体包括:It should be noted that in this embodiment, after the communication device obtains the network quality parameters of each access link, it needs to preprocess these parameters in order to perform weighted calculations on these parameters to obtain the network quality value. The processing steps specifically include:
针对时延的预处理步骤:根据通行的网络时延等级划分,可分别划分为0~10ms、10ms~50ms、50ms~100ms和大于100ms四个等级,对应时延的评分可分别设定为10、8、5和3,代表时延好、正常、一般、差,时延越小,代表网络越稳定。Preprocessing steps for delay: According to the popular network delay levels, it can be divided into four levels: 0~10ms, 10ms~50ms, 50ms~100ms and greater than 100ms. The corresponding delay scores can be set to 10 respectively. , 8, 5 and 3 represent good, normal, average and poor latency. The smaller the latency, the more stable the network is.
针对丢包率的预处理步骤:根据通行的网络丢包率等级划分,可分别划分为0~0.1%、0.1%~1%、1%~5%和大于5%四个等级,同样对应评分可分别设定为10、8、5和3,代表丢包率好、正常、一般和差,丢包越低,代表数据可靠性越高。Preprocessing steps for packet loss rate: According to the popular network packet loss rate classification, it can be divided into four levels: 0 to 0.1%, 0.1% to 1%, 1% to 5%, and greater than 5%, which also correspond to scores. It can be set to 10, 8, 5 and 3 respectively, representing good, normal, average and poor packet loss rates. The lower the packet loss, the higher the data reliability.
吞吐量:吞吐量是衡量一条WAN链路单位时间内实际收发数据量的能力。可根据实际的吞吐量将等级分别划分为大于100Mbps、50Mbps~100Mbps、20Mbps~50Mbp及小于20Mbps四个等级,同样对应评分可分别设定为10、8、5和3,代表吞吐量好、正常、一般和差,吞吐量越高,代表获取数据越快。Throughput: Throughput is a measure of the ability of a WAN link to actually send and receive data per unit time. The levels can be divided into four levels according to the actual throughput: greater than 100Mbps, 50Mbps~100Mbps, 20Mbps~50Mbp and less than 20Mbps. The corresponding scores can also be set to 10, 8, 5 and 3 respectively, which means good and normal throughput. , General and difference, the higher the throughput, the faster the data is obtained.
进一步地,在一种可行的实施例中,在上述步骤S101之前,本申请链路选择方法还可以包括:Further, in a feasible embodiment, before the above step S101, the link selection method of the present application may also include:
步骤S103:实时监测用户配置数据,其中,所述用户配置数据包括检测频率、时延的优先级、丢包率的优先级和吞吐量的优先级;Step S103: Monitor user configuration data in real time, where the user configuration data includes detection frequency, priority of delay, priority of packet loss rate, and priority of throughput;
需要说明的是,在本实施例中,用户配置数据为用户在通信设备的用户配置界面进行配置的数据,通常情况下,用户可在用户终端进入通信设备的用户配置界面,在界面中进行WAN口的相关设置。It should be noted that in this embodiment, the user configuration data is data configured by the user on the user configuration interface of the communication device. Normally, the user can enter the user configuration interface of the communication device on the user terminal and perform WAN configuration in the interface. Port related settings.
在本实施例中,通信设备实时监测用户配置数据,监测的数据具体包括针对链路网络质量参数的检测频率、链路时延的优先级、链路丢包率的优先级和链路吞吐量的优先级。In this embodiment, the communication device monitors user configuration data in real time. The monitored data specifically includes the detection frequency of link network quality parameters, the priority of link delay, the priority of link packet loss rate, and link throughput. priority.
具体地,检测频率初始默认为1h,同时具有配置值15min、30min、1h、3h、6h等等,在存在多WAN链路的条件下,通信设备配置的定时器启动后,达到了配置时长,通信设备即进行链路质量检测和切换,用户可根据实际需要对此值进行设置调整;对于时延、丢包率和吞吐量的优先级,初始默认三者的优先级一致,三者的权重比为1:1:1,用户可根据实际需要对三者的优先级进行调整,例如,用户配置时延优先时,则三者的权重比切换为2:1:1。Specifically, the detection frequency initially defaults to 1h, and has configuration values of 15min, 30min, 1h, 3h, 6h, etc. Under the condition that there are multiple WAN links, after the timer configured by the communication device is started, the configured duration is reached. The communication equipment performs link quality detection and switching. Users can set and adjust this value according to actual needs; for the priorities of delay, packet loss rate and throughput, the initial default priority of the three is the same, and the weight of the three is the same. The ratio is 1:1:1. Users can adjust the priorities of the three according to actual needs. For example, when the user configures delay priority, the weight ratio of the three is switched to 2:1:1.
步骤S104:根据所述时延的优先级、所述丢包率的优先级和所述吞吐量的优先级确定所述时延、所述丢包率和所述吞吐量各自的权重。Step S104: Determine the respective weights of the delay, the packet loss rate and the throughput according to the priority of the delay, the priority of the packet loss rate and the priority of the throughput.
在本实施例中,通信设备根据链路时延的优先级、链路丢包率的优先级和链路吞吐量的优先级确定时延、丢包率和吞吐量各自所占的权重,针对优先级更高的参数,通信设备增加其所占的权重。In this embodiment, the communication device determines the respective weights of the delay, packet loss rate, and throughput based on the priority of the link delay, the priority of the link packet loss rate, and the priority of the link throughput. For parameters with higher priority, the communication device increases its weight.
示例性地,在一种可行的实施例中,通信设备根据用户配置的检测频率和网络质量参数优先级进行网络质量值的计算,通信设备为用户提供了多种配置选择,以通信设备具有三条接入链路为例,在各链路的网络质量参数唯一的情况,基于用户配置的不同优先级得到该三条链路各自的网络质量值和排列顺序如下表所示:Exemplarily, in a feasible embodiment, the communication device calculates the network quality value according to the detection frequency and network quality parameter priority configured by the user, and the communication device provides the user with a variety of configuration options, so that the communication device has three Taking the access link as an example, when the network quality parameters of each link are unique, the network quality values and ranking order of each of the three links are obtained based on the different priorities configured by the user, as shown in the following table:
如此,基于用户配置的不同,即使通信设备的多条WAN链路在各自的网络质量参数不变的情况下,各链路的网络质量值大小也会发生改变,进而导致设备接入外部网络的链路发生切换,在用户配置为时延优先时通信设备能更好的支持直播和在线游戏等实时业务,在用户配置为丢包率优先时通信设备能更好的支持视频会议和高清电视等业务,用户配置为吞吐量优先时通信设备优先能更好的支持下载和网页浏览等业务,从而满足了用户的不同网络需求,给用户带来更好的上网体验。In this way, based on different user configurations, even if the network quality parameters of multiple WAN links of communication devices remain unchanged, the network quality value of each link will change, which will cause the device to access the external network. When the link is switched, the communication equipment can better support real-time services such as live broadcasts and online games when the user configures latency priority, and the communication equipment can better support video conferencing and high-definition TV when the user configures packet loss rate priority. For services, when the user configures the communication device as priority throughput, it can better support services such as downloading and web browsing, thus meeting the different network needs of users and giving users a better Internet experience.
进一步地,基于上述本申请链路选择方法的第一实施例和/或者第二实施例,提出本申请链路选择方法的第三实施例。Furthermore, based on the above-mentioned first embodiment and/or second embodiment of the link selection method of the present application, a third embodiment of the link selection method of the present application is proposed.
在本实施例中,上述步骤S40中“根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路”的步骤,包括:In this embodiment, the step of "selecting a target slave link to access the external network from the slave links based on the comparison result and the number of links currently connected to the external network" in step S40 includes:
步骤S401:确定当前接入外部网络的链路数量;Step S401: Determine the number of links currently connected to the external network;
在本实施例中,通信设备确定当前接入外部网络的链路数量,即上一次进行网络质量值排序后所确定的接入外部网络的链路数量。In this embodiment, the communication device determines the number of links currently connected to the external network, that is, the number of links connected to the external network determined after the last sorting of network quality values.
步骤S402:若所述链路数量为一,且比较结果为所述第一网络质量值大于或者等于所述上一次第一网络质量值,则从所述从链路中选择接入外部网络的目标从链路的数量为零;Step S402: If the number of links is one and the comparison result is that the first network quality value is greater than or equal to the last first network quality value, select the link to access the external network from the slave link. The number of target slave links is zero;
在本实施例中,若确定当前接入外部网络的链路数量为1,且第一网络质量值和上一次第一网络质量值之间的比较结果为第一网络质量值大于或者等于上一次第一网络质量值时,说明主链路的网络质量存在优化或者维持稳定的趋势,则通信设备只需要由主链路进行网络服务即可满足用户上网需求,则无需加入从链路去连接外部网络。In this embodiment, if it is determined that the number of links currently connected to the external network is 1, and the comparison result between the first network quality value and the last first network quality value is that the first network quality value is greater than or equal to the last time The first network quality value indicates that the network quality of the main link has a trend of optimization or stability. Then the communication equipment only needs to provide network services through the main link to meet the user's Internet access needs, and there is no need to add a slave link to connect to the outside. network.
步骤S403:若所述链路数量为一,且比较结果为所述第一网络质量值小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值和所述从链路的网络质量值从所述从链路中选择接入外部网络的目标从链路。Step S403: If the number of links is one and the comparison result is that the first network quality value is less than the last first network quality value, calculate the first network quality value and the last first network quality value. A ratio between network quality values, and selecting a target slave link to access the external network from the slave links based on the ratio and the network quality value of the slave link.
在本实施例中,若确定当前接入外部网络的链路数量为1,且第一网络质量值和上一次第一网络质量值之间的比较结果为第一网络质量值小于上一次第一网络质量值时,说明主链路的网络质量存在劣化的趋势,网络负载较重,则通信设备计算第一网络质量值与历史第一网络值之间的比值,并根据比值和从链路的网络质量值从从链路中选择接入外部网络的目标从链路。In this embodiment, if it is determined that the number of links currently connected to the external network is 1, and the comparison result between the first network quality value and the last first network quality value is that the first network quality value is smaller than the last first first network quality value, When the network quality value is high, it indicates that the network quality of the main link has a tendency to deteriorate and the network load is heavy. The communication device calculates the ratio between the first network quality value and the historical first network value, and calculates the ratio based on the ratio and the slave link's The network quality value selects the target slave link to access the external network from the slave links.
示例性地,在本实施例中,第一网络质量值与上一次第一网络质量值之间的比值为4:5,即说明主链路的网络质量值下降比例为20%,通信设备即可按照该下降比例,将业务负载中的20%交由从链路进行处理,业务负载中的80%仍由主链路处理,然,根据从链路的网络质量值确定是由一条目标从链路来处理这20%的网络负载还是多条目标从链路进行处理,具体的从链路负载均衡方式在此不作赘述。For example, in this embodiment, the ratio between the first network quality value and the last first network quality value is 4:5, which means that the decline ratio of the network quality value of the main link is 20%, and the communication device is According to this reduction ratio, 20% of the business load can be handed over to the slave link for processing, and 80% of the business load can still be processed by the master link. However, according to the network quality value of the slave link, it is determined whether it is a target slave link. Whether the link handles the 20% of the network load or multiple target slave links handle it, the specific slave link load balancing method will not be described in detail here.
进一步地,在一种可行的实施例中,在上述步骤S401之后,本申请链路选择方法,还可以包括:Further, in a feasible embodiment, after the above step S401, the link selection method of the present application may also include:
步骤S404:若所述链路数量大于一,则获取当前接入外部网络的历史主链路和历史从链路各自的负载百分比,以及,将所述从链路的网络质量值与历史从链路的网络质量值进行比较,得到第二比较结果;Step S404: If the number of links is greater than one, obtain the respective load percentages of the historical primary link and the historical secondary link currently connected to the external network, and compare the network quality value of the secondary link with the historical secondary link. Compare the network quality values of the road to obtain the second comparison result;
在本实施例中,若确定当前接入外部网络的链路数量大于1,即通信设备当前接入外部网络的链路包括主链路和至少一条从链路,则通信设备获取当前接入外部网络的主链路和从链路各自的负载百分比,以及,将本次确定的从链路的网络质量值和历史从链路的网络质量值进行比较,得到第二比较结果。In this embodiment, if it is determined that the number of links currently connected to the external network is greater than 1, that is, the link currently connected to the external network by the communication device includes a master link and at least one slave link, then the communication device obtains the current link connected to the external network. The respective load percentages of the primary link and the secondary link of the network are compared, and the network quality value of the secondary link determined this time is compared with the network quality value of the historical secondary link to obtain a second comparison result.
步骤S405:若比较结果为所述第一网络质量值等于所述上一次第一网络质量值,则根据所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路;Step S405: If the comparison result is that the first network quality value is equal to the last first network quality value, select a target slave link to access the external network from the slave link according to the second comparison result. road;
需要说明的是,在以下实施例中,为便于理解和阐述,将本次确定的主链路称为L1,第一网络质量值为S1,将本次确定的从链路称为L2,第二网络质量值为S2,将当前连接外部网络的主链路称为L1’,上一次第一网络质量值为S1’,将当前连接外部网络的从链路称为L2’,历史第二网络质量值为S2’,其中,本次确定的从链路可以为多条,当前连接外部网络的从链路也可以为多条,各条从链路各自对应有一个网络质量值。It should be noted that in the following embodiments, for ease of understanding and explanation, the primary link determined this time is called L1, the first network quality value is S1, the secondary link determined this time is called L2, and the first network quality value is S1. The second network quality value is S2, the current primary link connecting to the external network is called L1', the last first network quality value is S1', the current secondary link connecting to the external network is called L2', and the historical second network The quality value is S2', where there can be multiple slave links determined this time, and there can also be multiple slave links currently connected to the external network. Each slave link corresponds to a network quality value.
在本实施例中,当前接入外部网络的链路数量大于1,且S1和S1’之间的比较结果为S1=S1’时,则通信设备根据S2与S2’之间的第二比较结果,从从链路中选择接入外部网络的目标从链路。In this embodiment, when the number of links currently connected to the external network is greater than 1, and the comparison result between S1 and S1' is S1=S1', the communication device will use the second comparison result between S2 and S2' to , select the target slave link to access the external network from the slave link.
具体地,在当前连接外部网络的从链路只有一条时,若S2=S2’,则将S2对应的一条从链路作为目标从链路接入外部网络,若当前连接外部网络的从链路有多条时,同样将本次确定的L2的网络质量值S2依次和多条L2’的网络质量值S2’进行比较,根据比较结果确定目标从链路的数量和各个的负载百分比。Specifically, when there is only one slave link currently connected to the external network, if S2=S2', then a slave link corresponding to S2 is used as the target slave link to access the external network. If the slave link currently connected to the external network When there are multiple links, the network quality value S2 of L2 determined this time is also compared with the network quality values S2' of multiple L2's in sequence, and the number of target slave links and the load percentage of each are determined based on the comparison results.
步骤S406:若比较结果为所述第一网络质量值大于或者小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值、所述负载百分比和所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路。Step S406: If the comparison result is that the first network quality value is greater than or less than the last first network quality value, calculate the ratio between the first network quality value and the last first network quality value. , and select a target slave link for accessing the external network from the slave links based on the ratio, the load percentage and the second comparison result.
在本实施例中,当前接入外部网络的链路数量大于1,且S1和S1’之间的比较结果为S1>S1’或者S1<S1’时,则通信设备根据S1与S1’之间的比值、L1’和L2’各自的负载百分比和S2与S2’之间的大小比较结果,从从链路中选择接入外部网络的目标从链路。In this embodiment, when the number of links currently connected to the external network is greater than 1, and the comparison result between S1 and S1' is S1>S1' or S1<S1', the communication device will The ratio, the respective load percentages of L1' and L2', and the size comparison results between S2 and S2' are used to select the target slave link to access the external network from the slave links.
进一步地,在一种可行的实施例中,在上述步骤S20中“将所述网络质量值按照从大到小的顺序排序”的步骤之后,本申请链路选择方法还可以包括:Further, in a feasible embodiment, after the step of "sorting the network quality values in order from large to small" in the above step S20, the link selection method of the present application may also include:
步骤B10:按照所述网络质量值的排序更新路由选择表,以使所述路由选择表中的各接入链路按照网络质量值的排序进行排列;Step B10: Update the routing table according to the sorting of the network quality value, so that each access link in the routing table is arranged according to the sorting of the network quality value;
步骤B20:基于更新后的所述路由选择表进行路由选择。Step B20: Perform routing selection based on the updated routing table.
需要说明的是,在本实施例中,路由选择表中存储着指向特定网络地址的路径(在有些情况下,还记录有路径的路由度量值),路由选择表中含有网络周边的拓扑信息,路由选择表用于实现路由协议和路由选择,路由(routing)是指分组从源到目的地时,决定端到端路径的网络范围的进程。It should be noted that in this embodiment, the routing table stores the path to a specific network address (in some cases, the routing metric value of the path is also recorded), and the routing table contains topology information around the network. Routing tables are used to implement routing protocols and routing. Routing refers to the network-wide process of determining the end-to-end path of a packet from source to destination.
在本实施例中,通信设备按照各接入链路的网络质量值的排序更新路由选择表,以使路由选择表中记录的各个接入链路按照网络质量值从高到低的排序进行排列,通信设备再基于该路由选择表进行路由选择,为用户提供网络服务。In this embodiment, the communication device updates the routing table according to the sorting of the network quality value of each access link, so that the various access links recorded in the routing table are arranged according to the sorting of the network quality value from high to low. , the communication device then performs routing selection based on the routing table to provide network services to users.
示例性地,在本实施例中,如图4所示,在通信设备启动后,实时监测是否有WAN链路接入状态,当有WAN链路接入或断开时,统计接入WAN链路的数量,若接入链路的数量大于1,则启动定时器,并在达到定时器计时时长时获取各接入WAN链路的网络质量参数,若接入链路的数量不大于1,则选择唯一的WAN链路作为上网接口;通信设备在获取各接入WAN链路的网络质量参数之后,检测用户是否进行各参数优先级的配置,若有,则根据用户配置和参数对链路进行评分得到链路的网络质量值,若无,则采用默认配置进行链路网络质量值的评分,得到各条链路的评分后选择出评分最高的WAN链路,然后,判断当前路由表(即路由选择表)是否对应评分最高的WAN链路,若对应,则保持当前路由表,若不对应,则根据评分最高的WAN链路更新路由表,通信设备根据更新后的路由表进行路由选择,即将网络质量值最高的链路接入外部网络,并通过定时器周期性重复上述过程,以保证通信设备为用户提供网络质量最高的网络服务。Exemplarily, in this embodiment, as shown in Figure 4, after the communication device is started, whether there is a WAN link access status is monitored in real time. When a WAN link is connected or disconnected, the access WAN link statistics are The number of access links. If the number of access links is greater than 1, the timer is started, and the network quality parameters of each access WAN link are obtained when the timer duration is reached. If the number of access links is not greater than 1, Then select the only WAN link as the Internet interface; after obtaining the network quality parameters of each access WAN link, the communication device detects whether the user has configured the priority of each parameter. If so, the link is configured based on the user configuration and parameters. Perform scoring to obtain the network quality value of the link. If not, use the default configuration to score the network quality value of the link. After obtaining the scores of each link, select the WAN link with the highest score, and then determine the current routing table ( That is, whether the routing table) corresponds to the WAN link with the highest score. If it corresponds, the current routing table is maintained. If it does not correspond, the routing table is updated based on the WAN link with the highest score. The communication device performs routing selection based on the updated routing table. , that is, the link with the highest network quality value is connected to the external network, and the above process is periodically repeated through a timer to ensure that the communication equipment provides users with network services with the highest network quality.
如此,在本实施例中,通过平衡主链路和从链路的负载均衡,减轻了主WAN链路的负载压力,同时提高了各条WAN链路的利用率,既充分利用了从网络的闲置带宽,又有效地改善了网络质量。In this way, in this embodiment, by balancing the load of the primary link and the secondary link, the load pressure of the primary WAN link is reduced, and the utilization rate of each WAN link is improved, which not only fully utilizes the capacity of the secondary network Idle bandwidth effectively improves network quality.
此外,本申请实施例还提出一种链路选择装置。In addition, the embodiment of the present application also provides a link selection device.
请参照图5,本申请链路选择装置包括:Please refer to Figure 5. The link selection device of this application includes:
计算模块10,用于根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值;The calculation module 10 is used to calculate the respective network quality values of each access link according to the respective network quality parameters of each access link;
排序模块20,用于将所述网络质量值按照从大到小的顺序排序,将排序第一的第一网络质量值对应的接入链路作为主链路,将除所述主链路之外的其他接入链路作为从链路;The sorting module 20 is configured to sort the network quality values in order from large to small, use the access link corresponding to the first network quality value ranked first as the main link, and use the access link except the main link Access links other than the link are used as slave links;
比较模块30,用于将所述第一网络质量值与上一次第一网络质量值进行比较,得到比较结果;The comparison module 30 is used to compare the first network quality value with the last first network quality value to obtain a comparison result;
链路选择模块40,用于根据所述比较结果和当前接入外部网络的链路数量,从所述从链路中选择接入外部网络的目标从链路,并将所述目标从链路和所述主链路接入外部网络。The link selection module 40 is configured to select a target slave link that accesses the external network from the slave links according to the comparison result and the number of links currently connected to the external network, and select the target slave link from the slave link. and the main link to access the external network.
可选地,本申请链路选择装置还可以包括:Optionally, the link selection device of this application may also include:
状态监测模块,用于实时监测链路接入状态,并根据所述链路接入状态确定接入链路的数量;若所述接入链路的数量大于一,则执行根据各接入链路各自的网络质量参数,计算各所述接入链路各自的网络质量值及之后的步骤;若所述接入链路的数量等于一,则将所述接入链路接入外部网络。The status monitoring module is used to monitor the link access status in real time, and determine the number of access links according to the link access status; if the number of access links is greater than one, execute the The network quality parameters of each of the access links are calculated, and the subsequent steps are to calculate the network quality value of each of the access links; if the number of the access links is equal to one, connect the access links to the external network.
可选地,所述计算模块10,包括:Optionally, the computing module 10 includes:
参数获取单元,用于按照预设的检测频率周期性获取各接入链路各自的网络质量参数,其中,所述网络质量参数包括时延、丢包率和吞吐量;A parameter acquisition unit configured to periodically acquire network quality parameters of each access link according to a preset detection frequency, where the network quality parameters include delay, packet loss rate and throughput;
计算单元,用于针对每个所述接入链路,将所述接入链路对应的所述时延、所述丢包率和所述吞吐量按照各自的权重进行加权计算,得到所述接入链路对应的网络质量值。A calculation unit configured to weight and calculate the delay, the packet loss rate and the throughput corresponding to the access link according to their respective weights for each access link to obtain the The network quality value corresponding to the access link.
可选地,本申请链路选择装置还可以包括:Optionally, the link selection device of this application may also include:
用户配置监测模块,用于实时监测用户配置数据,其中,所述用户配置数据包括检测频率、时延的优先级、丢包率的优先级和吞吐量的优先级;根据所述时延的优先级、所述丢包率的优先级和所述吞吐量的优先级确定所述时延、所述丢包率和所述吞吐量各自的权重。The user configuration monitoring module is used to monitor user configuration data in real time, where the user configuration data includes detection frequency, priority of delay, priority of packet loss rate and priority of throughput; according to the priority of the delay The level, the priority of the packet loss rate and the priority of the throughput determine the respective weights of the delay, the packet loss rate and the throughput.
可选地,所述链路选择模块40,包括:Optionally, the link selection module 40 includes:
链路数量确定单元,用于确定当前接入外部网络的链路数量;The link number determination unit is used to determine the number of links currently connected to the external network;
第一链路选择单元,用于若所述链路数量为一,且比较结果为所述第一网络质量值大于或者等于所述上一次第一网络质量值,则从所述从链路中选择接入外部网络的目标从链路的数量为零;A first link selection unit configured to select from the slave link if the number of links is one and the comparison result is that the first network quality value is greater than or equal to the last first network quality value. The number of target slave links selected to access the external network is zero;
第二链路选择单元,用于若所述链路数量为一,且比较结果为所述第一网络质量值小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值和所述从链路的网络质量值从所述从链路中选择接入外部网络的目标从链路。A second link selection unit configured to calculate the first network quality value and the last network quality value if the number of links is one and the comparison result is that the first network quality value is less than the last first network quality value. The ratio between the last first network quality values, and selecting a target slave link to access the external network from the slave links based on the ratio and the network quality value of the slave link.
可选地,所述链路选择模块40,还包括:Optionally, the link selection module 40 also includes:
获取单元,用于若所述链路数量大于一,则获取当前接入外部网络的历史主链路和历史从链路各自的负载百分比,以及,将所述从链路的网络质量值与历史从链路的网络质量值进行比较,得到第二比较结果;An acquisition unit configured to, if the number of links is greater than one, acquire respective load percentages of the historical primary link and the historical slave link currently connected to the external network, and compare the network quality value of the slave link with the historical Compare the network quality value of the link to obtain the second comparison result;
第三链路选择单元,用于若比较结果为所述第一网络质量值等于所述上一次第一网络质量值,则根据所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路;A third link selection unit configured to select access from the secondary link according to the second comparison result if the comparison result is that the first network quality value is equal to the last first network quality value. External network target slave link;
第四链路选择单元,用于若比较结果为所述第一网络质量值大于或者小于所述上一次第一网络质量值,则计算所述第一网络质量值与所述上一次第一网络质量值之间的比值,并根据所述比值、所述负载百分比和所述第二比较结果,从所述从链路中选择接入外部网络的目标从链路。A fourth link selection unit, configured to calculate the first network quality value and the last first network quality value if the comparison result is that the first network quality value is greater than or less than the last first network quality value. A ratio between quality values, and based on the ratio, the load percentage and the second comparison result, select a target secondary link to access the external network from the secondary links.
可选地,本申请链路选择装置还可以包括:Optionally, the link selection device of this application may also include:
路由选择模块,用于按照所述网络质量值的排序更新路由选择表,以使所述路由选择表中的各接入链路按照网络质量值的排序进行排列;基于更新后的所述路由选择表进行路由选择。A routing module configured to update the routing table according to the sorting of the network quality value, so that each access link in the routing table is arranged according to the sorting of the network quality value; based on the updated routing table for routing selection.
其中,上述链路选择装置中各个模块的功能实现与上述链路选择方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。Among them, the functional implementation of each module in the above-mentioned link selection device corresponds to each step in the above-mentioned link selection method embodiment, and its functions and implementation processes will not be described in detail here.
此外,本申请还提出一种存储介质,该存储介质为计算机可读存储介质,该存储介质上存储有链路选择的程序,该链路选择程序被处理器执行时实现如上所述本申请链路选择方法的步骤。In addition, this application also proposes a storage medium. The storage medium is a computer-readable storage medium. A link selection program is stored on the storage medium. When the link selection program is executed by the processor, the link selection process of the application is implemented as described above. Steps of the path selection method.
本申请存储介质的具体实施例与上述链路选择方法各实施例基本相同,在此不作赘述。The specific embodiments of the storage medium of the present application are basically the same as the above embodiments of the link selection method, and will not be described again here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present application may be directly or indirectly used in other related technical fields. , are all equally included in the patent protection scope of this application.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311788417.4A CN117692984A (en) | 2023-12-22 | 2023-12-22 | Link selection method, device, terminal equipment and storage medium |
| PCT/CN2024/136296 WO2025130586A1 (en) | 2023-12-22 | 2024-12-03 | Link selection method and apparatus, terminal device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311788417.4A CN117692984A (en) | 2023-12-22 | 2023-12-22 | Link selection method, device, terminal equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117692984A true CN117692984A (en) | 2024-03-12 |
Family
ID=90135214
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311788417.4A Pending CN117692984A (en) | 2023-12-22 | 2023-12-22 | Link selection method, device, terminal equipment and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN117692984A (en) |
| WO (1) | WO2025130586A1 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118590433A (en) * | 2024-08-02 | 2024-09-03 | 成都俊云科技有限公司 | Communication link selection method and device |
| CN119928958A (en) * | 2025-01-10 | 2025-05-06 | 卡斯柯信号(成都)有限公司 | A vehicle safety platform data acquisition method based on real-time channel switching |
| WO2025130586A1 (en) * | 2023-12-22 | 2025-06-26 | 深圳创维数字技术有限公司 | Link selection method and apparatus, terminal device, and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111835639B (en) * | 2020-07-06 | 2021-03-19 | 杭州网银互联科技股份有限公司 | SD-WAN network intelligent link selection method based on cloud computing |
| US11252084B1 (en) * | 2020-09-29 | 2022-02-15 | Palo Alto Networks, Inc. | Enhanced SD-WAN path quality measurement and selection |
| CN112468376B (en) * | 2021-02-02 | 2021-05-07 | 深圳市阿卡索资讯股份有限公司 | Network line switching method and device based on big data |
| CN116566954A (en) * | 2023-06-09 | 2023-08-08 | 上海洛塔信息技术有限公司 | Multi-IP link connection management method, system, device and storage medium |
| CN117692984A (en) * | 2023-12-22 | 2024-03-12 | 深圳创维数字技术有限公司 | Link selection method, device, terminal equipment and storage medium |
-
2023
- 2023-12-22 CN CN202311788417.4A patent/CN117692984A/en active Pending
-
2024
- 2024-12-03 WO PCT/CN2024/136296 patent/WO2025130586A1/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025130586A1 (en) * | 2023-12-22 | 2025-06-26 | 深圳创维数字技术有限公司 | Link selection method and apparatus, terminal device, and storage medium |
| CN118590433A (en) * | 2024-08-02 | 2024-09-03 | 成都俊云科技有限公司 | Communication link selection method and device |
| CN119928958A (en) * | 2025-01-10 | 2025-05-06 | 卡斯柯信号(成都)有限公司 | A vehicle safety platform data acquisition method based on real-time channel switching |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2025130586A1 (en) | 2025-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN117692984A (en) | Link selection method, device, terminal equipment and storage medium | |
| US11522734B2 (en) | Method for controlling a remote service access path and relevant device | |
| US9866624B2 (en) | Managing access to digital content sources | |
| US7412516B1 (en) | Using a network bandwidth setting based on determining the network environment | |
| US8537709B2 (en) | Network device, and multi-wide area network interface selection module and method | |
| CN108777666A (en) | Shunting method for link aggregation and related equipment | |
| EP3429276B1 (en) | Network access method and terminal | |
| CN113783775A (en) | Data transmission method and device | |
| CN112997528B (en) | Network switching method and related equipment | |
| US20250050205A1 (en) | Cloud gaming wireless network optimization method, apparatus and device, and storage medium | |
| CN109120524B (en) | Link aggregation method and related equipment | |
| WO2022127475A1 (en) | Data transmission method and apparatus, electronic device, and storage medium | |
| CN108306763A (en) | Household appliance and its network connection processing method, computer readable storage medium | |
| WO2024113834A1 (en) | Path device selection method and apparatus, and electronic device and readable storage medium | |
| WO2018036256A1 (en) | Method and apparatus for generating acl | |
| CN115835250A (en) | A user network quality analysis method, system and device | |
| CN108696859B (en) | A method for accessing the Internet by a dual-card mobile terminal and the dual-card mobile terminal | |
| TW201933909A (en) | Network access method, client, network interaction method, and scheduling and network systems | |
| CN110380981B (en) | Flow distribution method and equipment | |
| CN114827104B (en) | Time delay adjustment method, device, equipment and computer readable storage medium | |
| CN113347089B (en) | Software Defined Network (SDN) system, network configuration method, device and equipment | |
| CN106954240B (en) | Intelligent mobile terminal interface selection system and method | |
| CN106911815B (en) | Information processing method, capacity expansion method, manager, controller and DNS | |
| CN116962395A (en) | Cloud node determining method, device, equipment and computer readable storage medium | |
| US9924016B2 (en) | Content download method, related device, and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |