CN118590433A - Communication link selection method and device - Google Patents
Communication link selection method and device Download PDFInfo
- Publication number
- CN118590433A CN118590433A CN202411054287.6A CN202411054287A CN118590433A CN 118590433 A CN118590433 A CN 118590433A CN 202411054287 A CN202411054287 A CN 202411054287A CN 118590433 A CN118590433 A CN 118590433A
- Authority
- CN
- China
- Prior art keywords
- communication
- communication links
- network quality
- client
- communication link
- 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
- 238000004891 communication Methods 0.000 title claims abstract description 356
- 238000010187 selection method Methods 0.000 title claims abstract description 23
- 238000001514 detection method Methods 0.000 claims abstract description 55
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 22
- 238000004364 calculation method Methods 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims description 28
- 230000005540 biological transmission Effects 0.000 claims description 17
- 230000000717 retained effect Effects 0.000 claims description 3
- 230000001934 delay Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- 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
-
- 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/302—Route determination based on requested QoS
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供通讯链路选择方法及装置,其中所述通讯链路选择方法包括:基于客户端的通讯需求,建立多个通讯链路;通过客户端向每个通讯链路发送对应的检测数据包,并根据每个检测数据包的往返结果,确定每个通讯链路关联的网络质量参数;基于预设的加权算法,对每个网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个通讯链路的通讯评分,其中,网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;根据每个通讯链路的通讯评分,确定多个通讯链路中的一个作为目标通讯链路。实现了在多个通讯链路中选择通讯质量最佳的一个作为客户端的通讯通道,降低了通讯延迟,且有效避免丢包等问题,提升用户的使用感受。
The present application provides a communication link selection method and device, wherein the communication link selection method includes: establishing multiple communication links based on the communication needs of the client; sending a corresponding detection data packet to each communication link through the client, and determining the network quality parameters associated with each communication link based on the round-trip results of each detection data packet; based on a preset weighted algorithm, performing weighted calculations on multiple network quality sub-parameters contained in each network quality parameter to obtain a communication score for each communication link, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data; according to the communication score of each communication link, determining one of the multiple communication links as the target communication link. It is achieved that one of the multiple communication links with the best communication quality is selected as the client's communication channel, which reduces communication delays, effectively avoids problems such as packet loss, and improves the user experience.
Description
技术领域Technical Field
本申请涉及通信技术领域,特别涉及一种通讯链路选择方法及装置。The present application relates to the field of communication technology, and in particular to a communication link selection method and device.
背景技术Background Art
随着互联网技术的发展,网络逐步的融入人们的工作生活,在一些业务场景中,由于客户端与服务器之间存在物理距离,数据包在传输时会有一定的延迟,进而出现网络质量不好的情况,而业务场景严重依赖于所在客户端与服务器的网络通讯,网络质量的波动必然影响到正常的网络通讯,进而影响业务场景。因此亟待一种方法来找到两点之间的最低延时会话。With the development of Internet technology, the network has gradually been integrated into people's work and life. In some business scenarios, due to the physical distance between the client and the server, there will be a certain delay in the transmission of data packets, resulting in poor network quality. Business scenarios are heavily dependent on the network communication between the client and the server. The fluctuation of network quality will inevitably affect the normal network communication, and then affect the business scenario. Therefore, a method is urgently needed to find the lowest delay session between two points.
发明内容Summary of the invention
有鉴于此,本申请实施例提供了一种通讯链路选择方法,以解决现有技术中存在的技术缺陷。本申请实施例同时提供了一种通讯链路选择装置,一种计算设备,以及一种计算机可读存储介质。In view of this, the embodiment of the present application provides a communication link selection method to solve the technical defects existing in the prior art. The embodiment of the present application also provides a communication link selection device, a computing device, and a computer-readable storage medium.
根据本申请实施例的第一方面,提供了一种通讯链路选择方法,包括:According to a first aspect of an embodiment of the present application, a communication link selection method is provided, comprising:
基于客户端的通讯需求,建立多个通讯链路;Establish multiple communication links based on the client's communication needs;
通过所述客户端向每个所述通讯链路发送对应的检测数据包,并根据每个所述检测数据包的往返结果,确定每个所述通讯链路关联的网络质量参数;Sending a corresponding detection data packet to each of the communication links through the client, and determining a network quality parameter associated with each of the communication links according to a round-trip result of each of the detection data packets;
基于预设的加权算法,对每个所述网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个所述通讯链路的通讯评分,其中,所述网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;Based on a preset weighted algorithm, a plurality of network quality sub-parameters included in each of the network quality parameters are weightedly calculated to obtain a communication score for each of the communication links, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data;
根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路。According to the communication score of each of the communication links, one of the plurality of communication links is determined as a target communication link.
可选地,所述基于客户端的通讯需求,建立多个通讯链路,包括:Optionally, the establishing of multiple communication links based on the communication requirements of the client includes:
确定所述客户端的端口地址,以及所述客户端通讯的目标地址;Determine the port address of the client and the target address of the client communication;
根据所述端口地址与所述目标地址,确定多个接入节点,并根据全部所述接入节点,建立多个所述通讯链路。A plurality of access nodes are determined according to the port address and the target address, and a plurality of the communication links are established according to all the access nodes.
可选地,所述通过所述客户端向每个所述通讯链路发送对应的检测数据包,包括:Optionally, sending a corresponding detection data packet to each of the communication links through the client includes:
确定所述客户端与每个所述通讯链路之间的通信协议,并根据所述通讯协议,生成与每个所述通讯链路对应的所述检测数据包;Determine the communication protocol between the client and each of the communication links, and generate the detection data packet corresponding to each of the communication links according to the communication protocol;
通过所述客户端,向每个所述通讯链路发送对应的所述检测数据包。The corresponding detection data packet is sent to each of the communication links through the client.
可选地,所述根据每个所述检测数据包的往返结果,确定每个所述通讯链路关联的网络质量参数,包括:Optionally, determining the network quality parameter associated with each communication link according to the round-trip result of each detection data packet includes:
每个所述通讯链路关联的接入节点在接受到所述检测数据包后,将所述检测数据包通过关联的所述通讯链路反馈回所述客户端;After receiving the detection data packet, each access node associated with the communication link feeds the detection data packet back to the client through the associated communication link;
监测所述检测数据包通过每个所述通讯链路,在所述客户端与所述接入节点之间的传输过程,确定每个所述通讯链路关联的所述网络质量参数。The transmission process of the detection data packet between the client and the access node through each of the communication links is monitored to determine the network quality parameter associated with each of the communication links.
可选地,所述基于预设的加权算法,对每个所述网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个所述通讯链路的通讯评分,包括:Optionally, the weighted calculation of the multiple network quality sub-parameters included in each of the network quality parameters based on a preset weighted algorithm to obtain a communication score for each of the communication links includes:
根据每个所述网络质量参数中包含的多个所述网络质量子参数,对所述加权算法的权重系数进行调整;Adjusting the weight coefficient of the weighted algorithm according to the plurality of network quality sub-parameters included in each of the network quality parameters;
根据调整后的所述权重系数对每个所述网络质量参数中的多个所述网络质量子参数进行加权计算,得到所述每个所述通讯链路的通讯评分。A weighted calculation is performed on a plurality of the network quality sub-parameters in each of the network quality parameters according to the adjusted weight coefficient to obtain a communication score for each of the communication links.
可选地,通过预设的方差算法对所述延时数据进行处理,得到所述波动数据。Optionally, the delay data is processed by a preset variance algorithm to obtain the fluctuation data.
可选地,所述根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路,包括:Optionally, determining one of the plurality of communication links as a target communication link according to the communication score of each of the communication links comprises:
根据每个所述通讯链路的通讯评分,选择多个所述通讯链路中的一个作为所述目标通讯链路,并选择多个所述通讯链路中的另一个作为备选通讯链路;selecting one of the plurality of communication links as the target communication link according to the communication score of each of the communication links, and selecting another one of the plurality of communication links as an alternative communication link;
当所述目标通讯链路的网络质量不满足所述客户端的通讯质量需求的情况下,将所述备选通讯链路作为所述目标通讯链路。When the network quality of the target communication link does not meet the communication quality requirement of the client, the alternative communication link is used as the target communication link.
可选地,所述根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路之后,还包括:Optionally, after determining one of the plurality of communication links as a target communication link according to the communication score of each of the communication links, the method further comprises:
当全部所述通讯链路的网络质量均不满足所述客户端的通讯质量需求的情况下,确定所述目标通讯链路关联的目标接入节点与目标出口节点;When the network quality of all the communication links does not meet the communication quality requirement of the client, determining a target access node and a target exit node associated with the target communication link;
确定与所述目标接入节点关联的多个中间节点,并通过所述目标接入节点向所述多个中间节点发送补偿数据包;Determining a plurality of intermediate nodes associated with the target access node, and sending compensation data packets to the plurality of intermediate nodes through the target access node;
通过每个所述中间节点将接收的所述补偿数据包发送至所述目标出口节点;Sending the received compensation data packet to the target exit node through each of the intermediate nodes;
保留所述目标出口节点最先接收的所述补偿数据包,并对重复接收的所述补偿数据包进行去重。The compensation data packet first received by the target egress node is retained, and duplicate compensation data packets received repeatedly are deduplicated.
可选地,所述保留所述目标出口节点最先接收的所述补偿数据包,并对重复接收的所述补偿数据包进行去重,包括:Optionally, retaining the compensation data packet first received by the target egress node and deduplicating the compensation data packets received repeatedly includes:
读取所述目标出口节点接收的所述补偿数据包的数据包编码;reading a data packet code of the compensation data packet received by the target egress node;
查询所述目标出口节点的编码表,当所述数据包编码不存在于所述编码表,保留所述补偿数据包,并将所述数据包编码写入所述编码表;querying the coding table of the target egress node, and when the data packet coding does not exist in the coding table, retaining the compensation data packet, and writing the data packet coding into the coding table;
当所述数据包编码存在于所述编码表,丢弃所述补偿数据包。When the packet encoding exists in the encoding table, the compensation packet is discarded.
根据本申请实施例的第二方面,提供了一种通讯链路选择装置,包括:According to a second aspect of an embodiment of the present application, a communication link selection device is provided, comprising:
链路建立模块,被配置为基于客户端的通讯需求,建立多个通讯链路;A link establishment module, configured to establish a plurality of communication links based on the communication requirements of the client;
参数确定模块,被配置为通过所述客户端向每个所述通讯链路发送对应的检测数据包,并根据每个所述检测数据包的往返结果,确定每个所述通讯链路关联的网络质量参数;A parameter determination module is configured to send a corresponding detection data packet to each of the communication links through the client, and determine a network quality parameter associated with each of the communication links according to a round-trip result of each of the detection data packets;
评分计算模块,被配置为基于预设的加权算法,对每个所述网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个所述通讯链路的通讯评分,其中,所述网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;A score calculation module is configured to perform weighted calculation on a plurality of network quality sub-parameters included in each of the network quality parameters based on a preset weighted algorithm to obtain a communication score for each of the communication links, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data;
链路确定模块,被配置为根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路。The link determination module is configured to determine one of the plurality of communication links as a target communication link according to the communication score of each of the communication links.
根据本申请实施例的第三方面,提供了一种计算设备,包括:According to a third aspect of an embodiment of the present application, a computing device is provided, including:
存储器和处理器;Memory and processor;
所述存储器用于存储计算机可执行指令,所述处理器执行所述计算机可执行指令时实现所述通讯链路选择方法的步骤。The memory is used to store computer executable instructions, and the processor implements the steps of the communication link selection method when executing the computer executable instructions.
根据本申请实施例的第四方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现所述通讯链路选择方法的步骤。According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the communication link selection method are implemented.
根据本申请实施例的第五方面,提供了一种芯片,其存储有计算机程序,该计算机程序被芯片执行时实现所述通讯链路选择方法的步骤。According to a fifth aspect of an embodiment of the present application, a chip is provided, which stores a computer program, and the computer program implements the steps of the communication link selection method when executed by the chip.
本申请提供的通讯链路选择方法,基于客户端的通讯需求,建立多个通讯链路;通过客户端向每个通讯链路发送对应的检测数据包,并根据每个检测数据包的往返结果,确定每个通讯链路关联的网络质量参数;基于预设的加权算法,对每个网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个通讯链路的通讯评分,其中,网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;根据每个通讯链路的通讯评分,确定多个通讯链路中的一个作为目标通讯链路。实现了在多个通讯链路中选择通讯质量最佳的一个作为客户端的通讯通道,降低了通讯延迟,且有效避免丢包等问题,提升用户的使用感受。The communication link selection method provided by the present application establishes multiple communication links based on the communication needs of the client; sends a corresponding detection data packet to each communication link through the client, and determines the network quality parameters associated with each communication link based on the round-trip results of each detection data packet; based on a preset weighted algorithm, performs weighted calculation on multiple network quality sub-parameters contained in each network quality parameter to obtain a communication score for each communication link, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data; according to the communication score of each communication link, determines one of the multiple communication links as the target communication link. It realizes the selection of the one with the best communication quality as the communication channel of the client among multiple communication links, reduces communication delay, effectively avoids problems such as packet loss, and improves the user experience.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
图1是本申请一实施例提供的一种通讯链路选择方法的流程图;FIG1 is a flow chart of a communication link selection method provided by an embodiment of the present application;
图2是本申请一实施例提供的一种通讯链路选择装置的结构示意图;FIG2 is a schematic diagram of the structure of a communication link selection device provided in one embodiment of the present application;
图3是本申请一实施例提供的一种计算设备的结构框图。FIG3 is a structural block diagram of a computing device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific implementation disclosed below.
在本申请一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请一个或多个实施例。在本申请一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本申请一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本申请一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
首先,对本发明一个或多个实施例涉及的名词术语进行解释。First, the terms involved in one or more embodiments of the present invention are explained.
UDP:用户数据报协议(User Datagram Protocol),Internet 协议集支持一个无连接的传输协议。UDP 为应用程序提供了一种无需建立连接就可以发送封装的 IP 数据包的方法。UDP: User Datagram Protocol, a connectionless transport protocol supported by the Internet protocol suite. UDP provides a way for applications to send encapsulated IP packets without establishing a connection.
TCP:传输控制协议(Transmission Control Protocol)是一种面向连接的、可靠的、基于字节流的传输层通信协议,由IETF的RFC 793定义。TCP: Transmission Control Protocol is a connection-oriented, reliable, byte stream-based transport layer communication protocol defined by IETF's RFC 793.
ICMP:Internet控制报文协议(Internet Control Message Protocol)。它是TCP/IP协议簇的一个子协议,用于在IP主机、路由器之间传递控制消息。ICMP: Internet Control Message Protocol. It is a sub-protocol of the TCP/IP protocol suite, used to transmit control messages between IP hosts and routers.
PPS:在网络传输过程中,信息需要分割成数据包进行传输,因此,通过PPS表征一定时间内传输的数据包数越多,表示传输速度越快。PPS: During network transmission, information needs to be divided into data packets for transmission. Therefore, the more data packets transmitted in a certain period of time represented by PPS, the faster the transmission speed.
MD5:MD5信息摘要算法(MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。MD5: MD5 Message-Digest Algorithm, a widely used cryptographic hash function, can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission.
在本申请中,提供了一种通讯链路选择方法。本申请同时涉及一种通讯链路选择装置、一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。In the present application, a communication link selection method is provided. The present application also relates to a communication link selection device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
图1示出了根据本申请一实施例提供的一种通讯链路选择方法的流程图,具体包括以下步骤:FIG1 shows a flow chart of a communication link selection method provided according to an embodiment of the present application, which specifically includes the following steps:
步骤S102:基于客户端的通讯需求,建立多个通讯链路;Step S102: establishing multiple communication links based on the communication requirements of the client;
步骤S104:通过所述客户端向每个所述通讯链路发送对应的检测数据包,并根据每个所述检测数据包的往返结果,确定每个所述通讯链路关联的网络质量参数;Step S104: sending a corresponding detection data packet to each of the communication links through the client, and determining a network quality parameter associated with each of the communication links according to a round-trip result of each of the detection data packets;
步骤S106:基于预设的加权算法,对每个所述网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个所述通讯链路的通讯评分,其中,所述网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;Step S106: Based on a preset weighting algorithm, a plurality of network quality sub-parameters included in each of the network quality parameters are weighted to obtain a communication score for each of the communication links, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data;
步骤S108:根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路。Step S108: Determine one of the plurality of communication links as a target communication link according to the communication score of each of the communication links.
其中,通讯链路用于实现客户端与其他设备之间的信息传输,如通过客户端与其他客户端进行数据交互,或通过客户端与服务端进行交互,需要说明的是,客户端与其他客户端进行数据交互的情况下,同样需要服务端进行信息中转。Among them, the communication link is used to realize information transmission between the client and other devices, such as data interaction between the client and other clients, or interaction between the client and the server. It should be noted that when the client interacts with other clients, the server is also required to transfer information.
基于此,由于客户端与服务器之间存在物理距离,数据包在传输时会有一定的延迟,为了找到两点之间的最低延时会话,建立多个通讯链路,之后客户端向建立的多个通讯链路发送检测数据包,对于任意一条通讯链路,检测数据包通过该通讯链路发送至服务器,服务器在接收到检测数据包后,将该检测数据包,通过该通讯链路反馈回客户端,客户端根据检测数据包的往返情况进行监测,即可确定该通讯链路的网络质量参数,通过对网络质量参数中包含的丢包率、延时数据、波动数据以及负载数据进行加权计算,得到该通讯链路的通讯评分,选择通讯评分最高的通讯链路,即目标通讯链路作为客户端进行通讯的链路。Based on this, due to the physical distance between the client and the server, there will be a certain delay in the transmission of data packets. In order to find the lowest delay session between two points, multiple communication links are established. Then the client sends detection data packets to the multiple established communication links. For any communication link, the detection data packet is sent to the server through the communication link. After receiving the detection data packet, the server feeds the detection data packet back to the client through the communication link. The client monitors the round-trip situation of the detection data packet to determine the network quality parameters of the communication link. By weighted calculation of the packet loss rate, delay data, fluctuation data and load data contained in the network quality parameters, the communication score of the communication link is obtained, and the communication link with the highest communication score, that is, the target communication link, is selected as the link for the client to communicate.
具体的,在实际使用场景中,客户端向目的端口发送UDP 数据包时,首先同时创建多条 UDP 和多条 TCP 的链路,链路数根据端口数量决定,一般一个端口 3 条链路,每条链路都使不同的源端口以及不同的目的端口,向每条链路上都发送多个检测数据包,用来分别检测 UDP 和 TCP 链路的网络质量参数,得到每个数据包的网络质量参数后,通过加权算法确定通讯评分,并选择通讯质量最好的通讯链路,作为数据传输的链路,在实测场景中,以上方式往往可以对通讯质量提升5%~10%。Specifically, in actual usage scenarios, when the client sends a UDP data packet to the destination port, it first creates multiple UDP and TCP links at the same time. The number of links is determined by the number of ports. Generally, one port has 3 links, and each link uses a different source port and a different destination port. Multiple detection data packets are sent to each link to detect the network quality parameters of the UDP and TCP links respectively. After obtaining the network quality parameters of each data packet, the communication score is determined by a weighted algorithm, and the communication link with the best communication quality is selected as the link for data transmission. In actual measurement scenarios, the above method can often improve the communication quality by 5%~10%.
进一步的,基于客户端的通讯需求,建立多个通讯链路的过程,在本实施例中,具体实现方式如下:Furthermore, based on the communication requirements of the client, the process of establishing multiple communication links is specifically implemented as follows in this embodiment:
确定所述客户端的端口地址,以及所述客户端通讯的目标地址;根据所述端口地址与所述目标地址,确定多个接入节点,并根据全部所述接入节点,建立多个所述通讯链路。Determine the port address of the client and the target address of the client communication; determine multiple access nodes according to the port address and the target address, and establish multiple communication links according to all the access nodes.
其中,通过客户端的通讯需求,即可确定客户端本身的端口地址,以及客户端与目标设备进行通讯过程中,目标设备的目标地址,根据端口地址和目标地址即可确定对应的接入节点,根据接入节点建立通讯链路。Among them, the client's own port address can be determined through the client's communication needs, as well as the target address of the target device during the communication between the client and the target device. The corresponding access node can be determined based on the port address and the target address, and a communication link can be established based on the access node.
具体的,若客户端的端口地址为U,目标设备的目标地址为V,U与V之间可通过各个城市设立的服务器进行连接,在实际使用场景中各个服务区之间的往往是互相连接的,这种情况下,若客户端在服务器A的通讯负责范围内,且服务器A对应的接入节点为a,目标设备在服务器B的通讯负责范围内,且服务器B对应的接入节点为b,此外还存在服务器C的接入节点c,服务器D的接入节点d,那么此时可以建立的通讯链路为U-a-b-V,U-a-c-b-V,U-a-d-b-V,U-a-c-d-b-V,U-a-d-c-b-V。Specifically, if the port address of the client is U and the target address of the target device is V, U and V can be connected through servers established in each city. In actual usage scenarios, the service areas are often connected to each other. In this case, if the client is within the communication range of server A, and the access node corresponding to server A is a, the target device is within the communication range of server B, and the access node corresponding to server B is b, in addition, there is access node c of server C and access node d of server D, then the communication links that can be established at this time are U-a-b-V, U-a-c-b-V, U-a-d-b-V, U-a-c-d-b-V, and U-a-d-c-b-V.
进一步的,通过客户端向每个通讯链路发送对应的检测数据包的过程,在本实施例中,具体实现方式如下:Furthermore, the process of sending a corresponding detection data packet to each communication link by the client is specifically implemented as follows in this embodiment:
确定所述客户端与每个所述通讯链路之间的通信协议,并根据所述通讯协议,生成与每个所述通讯链路对应的所述检测数据包;通过所述客户端,向每个所述通讯链路发送对应的所述检测数据包。Determine the communication protocol between the client and each of the communication links, and generate the detection data packet corresponding to each of the communication links according to the communication protocol; and send the corresponding detection data packet to each of the communication links through the client.
其中,需要确定客户端与通讯链路之间的通讯协议可用情况,如ICMP、UDP、TCP 协议的可用情况,之后根据通讯协议可用情况发送对应的检测数据包,如ICMP包、UDP包以及TCP 包。Among them, it is necessary to determine the availability of the communication protocol between the client and the communication link, such as the availability of ICMP, UDP, and TCP protocols, and then send corresponding detection data packets, such as ICMP packets, UDP packets, and TCP packets, according to the availability of the communication protocol.
进一步的,根据每个检测数据包的往返结果,确定每个通讯链路关联的网络质量参数的过程,在本实施例中,具体实现方式如下:Furthermore, according to the round-trip result of each detection data packet, the process of determining the network quality parameter associated with each communication link is specifically implemented as follows in this embodiment:
每个所述通讯链路关联的接入节点在接受到所述检测数据包后,将所述检测数据包通过关联的所述通讯链路反馈回所述客户端;监测所述检测数据包通过每个所述通讯链路,在所述客户端与所述接入节点之间的传输过程,确定每个所述通讯链路关联的所述网络质量参数。After receiving the detection data packet, the access node associated with each communication link feeds the detection data packet back to the client through the associated communication link; monitors the transmission process of the detection data packet between the client and the access node through each communication link, and determines the network quality parameters associated with each communication link.
进一步的,基于预设的加权算法,对每个网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个通讯链路的通讯评分的过程,在本实施例中,具体实现方式如下:Furthermore, based on a preset weighted algorithm, a weighted calculation is performed on multiple network quality sub-parameters included in each network quality parameter to obtain a communication score for each communication link. In this embodiment, the specific implementation method is as follows:
根据每个所述网络质量参数中包含的多个所述网络质量子参数,对所述加权算法的权重系数进行调整;根据调整后的所述权重系数对每个所述网络质量参数中的多个所述网络质量子参数进行加权计算,得到所述每个所述通讯链路的通讯评分。According to the multiple network quality sub-parameters contained in each of the network quality parameters, the weight coefficient of the weighted algorithm is adjusted; according to the adjusted weight coefficient, the multiple network quality sub-parameters in each of the network quality parameters are weightedly calculated to obtain the communication score of each of the communication links.
进一步的,通过预设的方差算法对所述延时数据进行处理,得到所述波动数据。Furthermore, the delay data is processed by a preset variance algorithm to obtain the fluctuation data.
其中,确定通讯链路关联的接入节点的过程,可以理解为确定负责客户端通讯的服务器的端口的过程,服务器在接收到客户端发送的检测数据包后,将检测数据包反馈回客户端,通过监测检测数据包是否存在丢包的情况,确定任一通讯链路的丢包率,并对检测数据包的延时情况进行记录,得到任一通讯链路的延时数据;通过方差公式对任一通讯链路的延时数据记性处理,计算得到该通讯链路的波动数据;并根据CPU 利用率、带宽情况、PPS、内存使用率、出口是否通畅等信息确定任一通讯链路的负载数据;最后根据得到的丢包率、延时数据、波动数据以及负载数据进行加权计算,得到该通讯链路的通讯评分。Among them, the process of determining the access node associated with the communication link can be understood as the process of determining the port of the server responsible for the client communication. After receiving the detection data packet sent by the client, the server feeds the detection data packet back to the client, and determines the packet loss rate of any communication link by monitoring whether there is packet loss in the detection data packet, and records the delay of the detection data packet to obtain the delay data of any communication link; the delay data of any communication link is processed by the variance formula to calculate the fluctuation data of the communication link; and the load data of any communication link is determined according to information such as CPU utilization, bandwidth, PPS, memory usage, whether the export is unobstructed, etc.; finally, a weighted calculation is performed based on the obtained packet loss rate, delay data, fluctuation data and load data to obtain the communication score of the communication link.
进一步的,在实际使用场景中,通讯链路的网络质量是实时发生变化的,这种情况下,先前确定的目标通讯链路可能会随着时间变化,出现不满足用户的通讯需求的情况,为了解决该问题,可对客户端传输数据的通讯链路进行更换,在本实施例中,具体实现方式如下:Furthermore, in actual usage scenarios, the network quality of the communication link changes in real time. In this case, the previously determined target communication link may change over time and fail to meet the user's communication needs. In order to solve this problem, the communication link for transmitting data on the client may be replaced. In this embodiment, the specific implementation method is as follows:
根据每个所述通讯链路的通讯评分,选择多个所述通讯链路中的一个作为所述目标通讯链路,并选择多个所述通讯链路中的另一个作为备选通讯链路;当所述目标通讯链路的网络质量不满足所述客户端的通讯质量需求的情况下,将所述备选通讯链路作为所述目标通讯链路。According to the communication score of each of the communication links, one of the multiple communication links is selected as the target communication link, and another one of the multiple communication links is selected as an alternative communication link; when the network quality of the target communication link does not meet the communication quality requirement of the client, the alternative communication link is used as the target communication link.
其中,通过计算得到的通讯评分,进行目标通讯链路与备选通讯链路的选择,在实际使用场景中,目标通讯链路一般着重延迟问题,故此计算通讯评分时,可以通过将延时数据的权重调高的方式,将最低延时的通讯链路选出;而备选通讯链路则可以针对另一方面的网络质量子参数进行选择,如网络通讯的波动情况,在这种情况下计算通讯评分时,通过调高波动数据对应的权重,将网络波动最小,最为稳定的通讯链路选出,在网络质量较差的情况下,将备选通讯链路替换原目标通讯链路,对客户端进行数据传输。Among them, the target communication link and the alternative communication link are selected through the calculated communication score. In the actual usage scenario, the target communication link generally focuses on the delay problem. Therefore, when calculating the communication score, the communication link with the lowest delay can be selected by increasing the weight of the delay data; and the alternative communication link can be selected based on the network quality sub-parameters on the other hand, such as the fluctuation of network communication. In this case, when calculating the communication score, the communication link with the smallest network fluctuation and the most stable one is selected by increasing the weight corresponding to the fluctuation data. In the case of poor network quality, the alternative communication link replaces the original target communication link to transmit data to the client.
基于此,由于通讯链路的网络质量实施变化这一特性,目标通讯链路与备选通讯链路需要及时的变化,可通过一个设定的时间周期,如10秒,每经过一个时间周期,就进行一次目标通讯链路的确定,同样的备选通讯链路同时进行更换,需要说明的是,时间周期的具体数值设定由实际使用场景决定,本实施例不进行限定。Based on this, due to the characteristic that the network quality of the communication link changes, the target communication link and the alternative communication link need to be changed in a timely manner. A set time period, such as 10 seconds, can be used. Every time a time period passes, the target communication link is determined and the alternative communication link is replaced at the same time. It should be noted that the specific value setting of the time period is determined by the actual usage scenario and is not limited in this embodiment.
此外,各个通讯链路的网络质量是由多个因素共同影响的,即丢包率、延时情况、波动情况以及负载情况,而在部分场景中,这些因素中的一个会成为影响网络质量的主因,如在部分场景中,客户端的通讯过程中,目标通讯链路的丢包率、网络波动情况以及负载情况都在正常范围,然而网络的延时情况十分严重,这种网络延迟严重的通讯场景无法满足用户的实际通讯需求,那么此时就会根据对应网络质量中网络延时的延时数据,调整计算通讯评分过程中,延时数据的权重,以实现从多个通讯链路中,选择网络延时问题最轻微的通讯链路作为目标通讯链路。In addition, the network quality of each communication link is affected by multiple factors, namely, packet loss rate, delay, fluctuation and load. In some scenarios, one of these factors will become the main factor affecting the network quality. For example, in some scenarios, during the client's communication, the packet loss rate, network fluctuation and load of the target communication link are all within the normal range, but the network delay is very serious. This communication scenario with serious network delay cannot meet the user's actual communication needs. At this time, the weight of the delay data in the calculation process of the communication score will be adjusted according to the delay data of the network delay in the corresponding network quality, so as to select the communication link with the least network delay problem as the target communication link from multiple communication links.
进一步的,存在多个通讯链路的网络质量均无法满足用户的实际通讯需求的情况,在这种情况下需要对通讯链路进行网络补偿,在本实施中,具体实现方式如下:Furthermore, there is a situation where the network quality of multiple communication links cannot meet the actual communication needs of users. In this case, network compensation is required for the communication links. In this implementation, the specific implementation method is as follows:
当全部所述通讯链路的网络质量均不满足所述客户端的通讯质量需求的情况下,确定所述目标通讯链路关联的目标接入节点与目标出口节点;确定与所述目标接入节点关联的多个中间节点,并通过所述目标接入节点向所述多个中间节点发送补偿数据包;通过每个所述中间节点将接收的所述补偿数据包发送至所述目标出口节点;保留所述目标出口节点最先接收的所述补偿数据包,并对重复接收的所述补偿数据包进行去重。When the network quality of all the communication links does not meet the communication quality requirements of the client, determine the target access node and the target exit node associated with the target communication link; determine multiple intermediate nodes associated with the target access node, and send compensation data packets to the multiple intermediate nodes through the target access node; send the received compensation data packet to the target exit node through each of the intermediate nodes; retain the compensation data packet first received by the target exit node, and deduplicate the compensation data packets received repeatedly.
其中,根据加权计算得到通讯评分后,可以根据通讯评分对网络质量进行分级,如分为优、良、差,或是分为A、B、C等评级,以优、良、差分级为例,若全部的通讯链路的网络质量评级都为“差”,这种情况下,可认定全部通讯链路的网络质量均不满足客户端的通讯质量需求。Among them, after the communication score is obtained according to the weighted calculation, the network quality can be graded according to the communication score, such as excellent, good, poor, or divided into A, B, C and other ratings. Taking the excellent, good, and poor ratings as an example, if the network quality ratings of all communication links are "poor", in this case, it can be determined that the network quality of all communication links does not meet the communication quality requirements of the client.
基于此,将客户端到目标设备之间的关键节点划分为入口节点、中间节点与出口节点,其中,中间节点的数量不限,入口节点可以理解为负责客户端通讯的服务器节点,出口节点则可理解为负责目标设备通讯的服务器节点,而中间节点则是负责以上两个服务器之间数据传输的服务器节点,如以上描述的,服务器A的a节点即为入口节点,服务器B的b节点即为出口节点,而服务器C的c节点以及服务器D的d节点即为中间节点。Based on this, the key nodes between the client and the target device are divided into entry nodes, intermediate nodes and exit nodes, among which the number of intermediate nodes is not limited. The entry node can be understood as the server node responsible for client communication, the exit node can be understood as the server node responsible for target device communication, and the intermediate node is the server node responsible for data transmission between the above two servers. As described above, node a of server A is the entry node, node b of server B is the exit node, and node c of server C and node d of server D are intermediate nodes.
客户端发送补偿数据包的过程中,经过入口节点的补偿数据包,会被发送至全部的中间节点,中间节点在接收到补偿数据包后,会将补偿数据包发送至出口节点,出口节点保留先到达的补偿数据包,后到达的补偿数据包则被舍弃,这种情况下,由于出口节点保留的补偿数据包均为最先达到的补偿数据包,实现数据传输过程中,以最低延迟接收补偿数据包,并且降低丢包情况。In the process of the client sending compensation data packets, the compensation data packets passing through the entry node will be sent to all intermediate nodes. After receiving the compensation data packets, the intermediate nodes will send the compensation data packets to the exit node. The exit node retains the compensation data packets that arrive first, and the compensation data packets that arrive later are discarded. In this case, since the compensation data packets retained by the exit node are the first compensation data packets to arrive, the compensation data packets can be received with the lowest delay during data transmission, and packet loss can be reduced.
进一步的,若客户端持续不断的发送补偿数据包,而补偿数据包经过各个中间节点的通讯速度不同,存在两个中间节点,其中一个中间节点发送的当前的补偿数据包至出口节点,而另一个中间节点发送的上一批次的补偿数据包刚刚到达出口节点的情况,这种情况下会出现补偿数据包混淆的情况,为了避免出现混淆问题,在本实施例中,具体实现方式如下:Furthermore, if the client continuously sends compensation data packets, and the communication speeds of the compensation data packets passing through each intermediate node are different, there are two intermediate nodes, one of which sends the current compensation data packet to the exit node, while the previous batch of compensation data packets sent by the other intermediate node has just arrived at the exit node. In this case, the compensation data packets may be confused. In order to avoid confusion, in this embodiment, the specific implementation method is as follows:
读取所述目标出口节点接收的所述补偿数据包的数据包编码;查询所述目标出口节点的编码表,当所述数据包编码不存在于所述编码表,保留所述补偿数据包,并将所述数据包编码写入所述编码表;当所述数据包编码存在于所述编码表,丢弃所述补偿数据包。Read the data packet code of the compensation data packet received by the target exit node; query the coding table of the target exit node, and when the data packet code does not exist in the coding table, retain the compensation data packet and write the data packet code into the coding table; when the data packet code exists in the coding table, discard the compensation data packet.
其中,通过对每个补偿数据包设置对应的数据包编码,数据包编码作为补偿数据包的唯一身份编码,可以实现不同的补偿数据包的区分。而数据包编码除了选择对补偿数据包进行区分外,还可以对补偿数据包的信息传输安全进行保障,如将MD5码作为补偿数据包的数据包编码,以确定补偿数据包在传输过程中没有被篡改。Among them, by setting a corresponding data packet code for each compensation data packet, the data packet code is used as a unique identity code of the compensation data packet, so that different compensation data packets can be distinguished. In addition to selecting to distinguish compensation data packets, the data packet code can also ensure the information transmission security of the compensation data packet, such as using the MD5 code as the data packet code of the compensation data packet to ensure that the compensation data packet has not been tampered with during the transmission process.
与上述方法实施例相对应,本申请还提供了通讯链路选择装置实施例,图2示出了本申请一实施例提供的一种通讯链路选择装置的结构示意图。如图2所示,该装置包括:Corresponding to the above method embodiment, the present application also provides a communication link selection device embodiment, and FIG2 shows a schematic diagram of the structure of a communication link selection device provided by an embodiment of the present application. As shown in FIG2, the device includes:
链路建立模块202,被配置为基于客户端的通讯需求,建立多个通讯链路;The link establishment module 202 is configured to establish a plurality of communication links based on the communication requirements of the client;
参数确定模块204,被配置为通过所述客户端向每个所述通讯链路发送对应的检测数据包,并根据每个所述检测数据包的往返结果,确定每个所述通讯链路关联的网络质量参数;The parameter determination module 204 is configured to send a corresponding detection data packet to each of the communication links through the client, and determine the network quality parameter associated with each of the communication links according to the round-trip result of each of the detection data packets;
评分计算模块206,被配置为基于预设的加权算法,对每个所述网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个所述通讯链路的通讯评分,其中,所述网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;The score calculation module 206 is configured to perform weighted calculation on the multiple network quality sub-parameters included in each of the network quality parameters based on a preset weighted algorithm to obtain a communication score for each of the communication links, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data;
链路确定模块208,被配置为根据每个所述通讯链路的通讯评分,确定多个所述通讯链路中的一个作为目标通讯链路。The link determination module 208 is configured to determine one of the plurality of communication links as a target communication link according to the communication score of each of the communication links.
一个可选的实施例中,所述链路建立模块202进一步被配置为:In an optional embodiment, the link establishing module 202 is further configured to:
确定所述客户端的端口地址,以及所述客户端通讯的目标地址;根据所述端口地址与所述目标地址,确定多个接入节点,并根据全部所述接入节点,建立多个所述通讯链路。Determine the port address of the client and the target address of the client communication; determine multiple access nodes according to the port address and the target address, and establish multiple communication links according to all the access nodes.
一个可选的实施例中,所述参数确定模块204进一步被配置为:In an optional embodiment, the parameter determination module 204 is further configured to:
确定所述客户端与每个所述通讯链路之间的通信协议,并根据所述通讯协议,生成与每个所述通讯链路对应的所述检测数据包;Determine the communication protocol between the client and each of the communication links, and generate the detection data packet corresponding to each of the communication links according to the communication protocol;
通过所述客户端,向每个所述通讯链路发送对应的所述检测数据包。The corresponding detection data packet is sent to each of the communication links through the client.
一个可选的实施例中,所述参数确定模块204进一步被配置为:In an optional embodiment, the parameter determination module 204 is further configured to:
每个所述通讯链路关联的接入节点在接受到所述检测数据包后,将所述检测数据包通过关联的所述通讯链路反馈回所述客户端;监测所述检测数据包通过每个所述通讯链路,在所述客户端与所述接入节点之间的传输过程,确定每个所述通讯链路关联的所述网络质量参数。After receiving the detection data packet, the access node associated with each communication link feeds the detection data packet back to the client through the associated communication link; monitors the transmission process of the detection data packet between the client and the access node through each communication link, and determines the network quality parameters associated with each communication link.
一个可选的实施例中,所述评分计算模块206进一步被配置为:In an optional embodiment, the score calculation module 206 is further configured to:
根据每个所述网络质量参数中包含的多个所述网络质量子参数,对所述加权算法的权重系数进行调整;Adjusting the weight coefficient of the weighted algorithm according to the plurality of network quality sub-parameters included in each of the network quality parameters;
根据调整后的所述权重系数对每个所述网络质量参数中的多个所述网络质量子参数进行加权计算,得到所述每个所述通讯链路的通讯评分。A weighted calculation is performed on a plurality of the network quality sub-parameters in each of the network quality parameters according to the adjusted weight coefficient to obtain a communication score for each of the communication links.
一个可选的实施例中,所述评分计算模块206进一步被配置为:In an optional embodiment, the score calculation module 206 is further configured to:
通过预设的方差算法对所述延时数据进行处理,得到所述波动数据。The delay data is processed by a preset variance algorithm to obtain the fluctuation data.
一个可选的实施例中,所述链路确定模块208进一步被配置为:In an optional embodiment, the link determination module 208 is further configured to:
根据每个所述通讯链路的通讯评分,选择多个所述通讯链路中的一个作为所述目标通讯链路,并选择多个所述通讯链路中的另一个作为备选通讯链路;selecting one of the plurality of communication links as the target communication link according to the communication score of each of the communication links, and selecting another one of the plurality of communication links as an alternative communication link;
当所述目标通讯链路的网络质量不满足所述客户端的通讯质量需求的情况下,将所述备选通讯链路作为所述目标通讯链路。When the network quality of the target communication link does not meet the communication quality requirement of the client, the alternative communication link is used as the target communication link.
一个可选的实施例中,所述通讯链路选择装置,还包括:In an optional embodiment, the communication link selection device further includes:
补偿模块,被配置为当全部所述通讯链路的网络质量均不满足所述客户端的通讯质量需求的情况下,确定所述目标通讯链路关联的目标接入节点与目标出口节点;确定与所述目标接入节点关联的多个中间节点,并通过所述目标接入节点向所述多个中间节点发送补偿数据包;通过每个所述中间节点将接收的所述补偿数据包发送至所述目标出口节点;保留所述目标出口节点最先接收的所述补偿数据包,并对重复接收的所述补偿数据包进行去重。The compensation module is configured to, when the network quality of all the communication links does not meet the communication quality requirements of the client, determine the target access node and the target exit node associated with the target communication link; determine multiple intermediate nodes associated with the target access node, and send compensation data packets to the multiple intermediate nodes through the target access node; send the received compensation data packets to the target exit node through each of the intermediate nodes; retain the compensation data packet first received by the target exit node, and deduplicate the compensation data packets received repeatedly.
一个可选的实施例中,所述补偿模块进一步被配置为:In an optional embodiment, the compensation module is further configured to:
读取所述目标出口节点接收的所述补偿数据包的数据包编码;查询所述目标出口节点的编码表,当所述数据包编码不存在于所述编码表,保留所述补偿数据包,并将所述数据包编码写入所述编码表;当所述数据包编码存在于所述编码表,丢弃所述补偿数据包。Read the data packet code of the compensation data packet received by the target exit node; query the coding table of the target exit node, and when the data packet code does not exist in the coding table, retain the compensation data packet and write the data packet code into the coding table; when the data packet code exists in the coding table, discard the compensation data packet.
本申请提供的通讯链路选择装置,基于客户端的通讯需求,建立多个通讯链路;通过客户端向每个通讯链路发送对应的检测数据包,并根据每个检测数据包的往返结果,确定每个通讯链路关联的网络质量参数;基于预设的加权算法,对每个网络质量参数中包含的多个网络质量子参数进行加权计算,得到每个通讯链路的通讯评分,其中,网络质量子参数包括丢包率、延时数据、波动数据以及负载数据;根据每个通讯链路的通讯评分,确定多个通讯链路中的一个作为目标通讯链路。实现了在多个通讯链路中选择通讯质量最佳的一个作为客户端的通讯通道,降低了通讯延迟,且有效避免丢包等问题,提升用户的使用感受。The communication link selection device provided by the present application establishes multiple communication links based on the communication needs of the client; sends a corresponding detection data packet to each communication link through the client, and determines the network quality parameters associated with each communication link based on the round-trip results of each detection data packet; based on a preset weighted algorithm, performs weighted calculation on multiple network quality sub-parameters contained in each network quality parameter to obtain a communication score for each communication link, wherein the network quality sub-parameters include packet loss rate, delay data, fluctuation data, and load data; according to the communication score of each communication link, determines one of the multiple communication links as the target communication link. It realizes the selection of the one with the best communication quality among multiple communication links as the communication channel of the client, reduces communication delay, effectively avoids problems such as packet loss, and improves the user experience.
上述为本实施例的一种通讯链路选择装置的示意性方案。需要说明的是,该通讯链路选择装置的技术方案与上述的通讯链路选择方法的技术方案属于同一构思,通讯链路选择装置的技术方案未详细描述的细节内容,均可以参见上述通讯链路选择方法的技术方案的描述。此外,装置实施例中的各组成部分应当理解为实现该程序流程各步骤或该方法各步骤所必须建立的功能模块,各个功能模块并非实际的功能分割或者分离限定。由这样一组功能模块限定的装置权利要求应当理解为主要通过说明书记载的计算机程序实现该解决方案的功能模块构架,而不应当理解为主要通过硬件方式实现该解决方案的实体装置。The above is a schematic scheme of a communication link selection device of the present embodiment. It should be noted that the technical scheme of the communication link selection device and the technical scheme of the communication link selection method mentioned above belong to the same concept. For the details not described in detail in the technical scheme of the communication link selection device, please refer to the description of the technical scheme of the communication link selection method mentioned above. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.
图3示出了根据本申请一实施例提供的一种计算设备300的结构框图。该计算设备300的部件包括但不限于存储器310和处理器320。处理器320与存储器310通过总线330相连接,数据库350用于保存数据。Fig. 3 shows a block diagram of a computing device 300 provided according to an embodiment of the present application. The components of the computing device 300 include but are not limited to a memory 310 and a processor 320. The processor 320 is connected to the memory 310 via a bus 330, and the database 350 is used to store data.
计算设备300还包括接入设备340,接入设备340使得计算设备300能够经由一个或多个网络360通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备340可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。The computing device 300 also includes an access device 340 that enables the computing device 300 to communicate via one or more networks 360. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 340 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
在本申请的一个实施例中,计算设备300的上述部件以及图3中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图3所示的计算设备结构框图仅仅是出于示例的目的,而不是对本申请范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of the present application, the above components of the computing device 300 and other components not shown in FIG. 3 may also be connected to each other, for example, through a bus. It should be understood that the computing device structure block diagram shown in FIG. 3 is only for illustrative purposes and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
计算设备300可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备300还可以是移动式或静止式的服务器。The computing device 300 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 300 may also be a mobile or stationary server.
其中,处理器320用于执行所述通讯链路选择方法各步骤的计算机可执行指令。The processor 320 is used to execute computer executable instructions of each step of the communication link selection method.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的通讯链路选择方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述通讯链路选择方法的技术方案的描述。The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above communication link selection method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above communication link selection method.
本申请一实施例还提供一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时以用于执行所述通讯链路选择方法各步骤。An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used to execute the steps of the communication link selection method when executed by a processor.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的通讯链路选择方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述通讯链路选择方法的技术方案的描述。The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the communication link selection method described above belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the communication link selection method described above.
本申请一实施例还提供一种芯片,其存储有计算机程序,该计算机程序被芯片执行时实现所述通讯链路选择方法的步骤。An embodiment of the present application further provides a chip storing a computer program, which implements the steps of the communication link selection method when executed by the chip.
上述对本申请特定实施例进行了描述。其它实施例在所附权利要求书的 范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
以上公开的本申请优选实施例只是用于帮助阐述本申请。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本申请的内容,可作很多的修改和变化。本申请选取并具体描述这些实施例,是为了更好地解释本申请的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本申请。本申请仅受权利要求书及其全部范围和等效物的限制。The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411054287.6A CN118590433A (en) | 2024-08-02 | 2024-08-02 | Communication link selection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411054287.6A CN118590433A (en) | 2024-08-02 | 2024-08-02 | Communication link selection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118590433A true CN118590433A (en) | 2024-09-03 |
Family
ID=92528497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411054287.6A Pending CN118590433A (en) | 2024-08-02 | 2024-08-02 | Communication link selection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118590433A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112291816A (en) * | 2020-11-13 | 2021-01-29 | Oppo广东移动通信有限公司 | Data transmission method, device, storage medium and electronic equipment |
CN114040429A (en) * | 2022-01-06 | 2022-02-11 | 中国铁道科学研究院集团有限公司通信信号研究所 | Multilink mobile communication service quality simulation test method |
CN115701181A (en) * | 2021-07-31 | 2023-02-07 | 贵州白山云科技股份有限公司 | Node scheduling method, device, medium and equipment |
CN117692984A (en) * | 2023-12-22 | 2024-03-12 | 深圳创维数字技术有限公司 | Link selection method, device, terminal equipment and storage medium |
-
2024
- 2024-08-02 CN CN202411054287.6A patent/CN118590433A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112291816A (en) * | 2020-11-13 | 2021-01-29 | Oppo广东移动通信有限公司 | Data transmission method, device, storage medium and electronic equipment |
CN115701181A (en) * | 2021-07-31 | 2023-02-07 | 贵州白山云科技股份有限公司 | Node scheduling method, device, medium and equipment |
CN114040429A (en) * | 2022-01-06 | 2022-02-11 | 中国铁道科学研究院集团有限公司通信信号研究所 | Multilink mobile communication service quality simulation test method |
CN117692984A (en) * | 2023-12-22 | 2024-03-12 | 深圳创维数字技术有限公司 | Link selection method, device, terminal equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230239241A1 (en) | Systems, Apparatuses and Methods for Network Packet Management | |
US11570098B2 (en) | Systems, apparatuses and methods for cooperating routers | |
EP1876758B1 (en) | Method for probing the peer-to-peer quality of service (QOS) | |
TWI591989B (en) | Data stream segment optimized for heat flow | |
Mahmoodi Khaniabadi et al. | An intelligent sustainable efficient transmission internet protocol to switch between User Datagram Protocol and Transmission Control Protocol in IoT computing | |
WO2021047515A1 (en) | Service routing method and apparatus | |
CN109479030B (en) | Systems and Devices for Transporting Session State Protocols | |
US9356824B1 (en) | Transparently cached network resources | |
EP1950917B1 (en) | Methods for peer-to-peer application message identifying and operating realization and their corresponding devices | |
Uroz et al. | Characterization and evaluation of IoT protocols for data exfiltration | |
JP2024543201A (en) | Data transmission control method, device, computer device, and computer program | |
Oberender et al. | Enabling mobile peer-to-peer networking | |
EP3539235B1 (en) | Systems, apparatuses and methods for cooperating routers | |
CN118590433A (en) | Communication link selection method and device | |
Jin et al. | Content routing and lookup schemes using global bloom filter for content-delivery-as-a-service | |
CN110912904B (en) | Malicious device identification method and device, storage medium and computer device | |
US10497070B2 (en) | Optimizing social information signaling | |
Han et al. | A Novel UDT‐Based Transfer Speed‐Up Protocol for Fog Computing | |
US12238003B2 (en) | Systems, apparatuses and methods for cooperating routers | |
US20230171191A1 (en) | Systems, Apparatuses and Methods for Cooperating Routers | |
An et al. | Evaluating SIP-based VoIP communication quality and network security | |
Yan et al. | Hfbp: Identifying p2p traffic by host level and flow level behavior profiles | |
US10813004B2 (en) | Control information exchange system | |
Bin et al. | Traffic measurements of BitTorrent system based on netfilter | |
CN118413462A (en) | Resource perception method, device, communication equipment and readable storage medium |
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 |