Movatterモバイル変換


[0]ホーム

URL:


CN115665047A - Message transmission control method, device, medium and equipment - Google Patents

Message transmission control method, device, medium and equipment
Download PDF

Info

Publication number
CN115665047A
CN115665047ACN202211328824.2ACN202211328824ACN115665047ACN 115665047 ACN115665047 ACN 115665047ACN 202211328824 ACN202211328824 ACN 202211328824ACN 115665047 ACN115665047 ACN 115665047A
Authority
CN
China
Prior art keywords
port
message
mptcp
connection
information
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.)
Granted
Application number
CN202211328824.2A
Other languages
Chinese (zh)
Other versions
CN115665047B (en
Inventor
房若民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Volcano Engine Technology Co LtdfiledCriticalBeijing Volcano Engine Technology Co Ltd
Priority to CN202211328824.2ApriorityCriticalpatent/CN115665047B/en
Publication of CN115665047ApublicationCriticalpatent/CN115665047A/en
Application grantedgrantedCritical
Publication of CN115665047BpublicationCriticalpatent/CN115665047B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

本公开涉及一种报文传输控制方法、装置、介质及设备,所述方法包括:接收目标报文,从所述目标报文中解析对应的通信连接类型;若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。由此,针对接到的MPTCP类型的报文,可以在报文封装之前进行出端口的预分发,以在一定程度上保证属于同一MPTCP会话下的多个连接的报文能够进行端口分散转发,提高MPTCP会话的数据传输效率。

Figure 202211328824

The present disclosure relates to a message transmission control method, device, medium, and equipment. The method includes: receiving a target message, and parsing the corresponding communication connection type from the target message; if the target message corresponds to a communication If the connection type is the multiplex transmission control protocol MPTCP type, then determine the outgoing port corresponding to the target message; encapsulate the target message and encapsulate the port number of the outgoing port as extended information to obtain the target The encapsulated message corresponding to the message; the control message forwarder forwards the encapsulated message based on the port corresponding to the port number in the encapsulation information. Therefore, for the received MPTCP type message, the pre-distribution of the outgoing port can be performed before the message is encapsulated, so as to ensure that the messages belonging to multiple connections under the same MPTCP session can be forwarded in a distributed manner. Improve the data transmission efficiency of MPTCP sessions.

Figure 202211328824

Description

Translated fromChinese
报文传输控制方法、装置、介质及设备Message transmission control method, device, medium and equipment

技术领域technical field

本公开涉及计算机技术领域,具体地,涉及一种报文传输控制方法、装置、介质及设备。The present disclosure relates to the field of computer technology, and in particular, to a message transmission control method, device, medium and equipment.

背景技术Background technique

多路传输控制协议(Multi-Path Transmission Control Protocol,简称MPTCP)定义了一种在两个主机之间建立多个连接的方式,其目的是允许传输控制协议(TCP)连接使用多个路径来最大化信道资源使用。在标准TCP中,连接应在两个IP地址之间建立,在MPTCP中允许连接同时使用多个路径。为此,MPTCP会话在每个需要使用的路径上创建一个称为subflow子连接的TCP连接。The Multi-Path Transmission Control Protocol (MPTCP) defines a way to establish multiple connections between two hosts. Its purpose is to allow Transmission Control Protocol (TCP) connections to use multiple paths to maximize Optimized channel resource usage. While in standard TCP a connection should be established between two IP addresses, in MPTCP a connection is allowed to use multiple paths simultaneously. To do this, the MPTCP session creates a TCP connection called a subflow on each path that needs to be used.

随机虚拟化技术的发展,在虚拟化场景下的虚拟机之间的报文传输一般会使用隧道技术,基于隧道技术,则会对接收到的报文进行封装,从而将封装之后进行转发。然而在对封装之后的报文进行转发时,基于封装之后的报文难以对MPTCP的多个连接的报文进行区分,使得MPTCP下的多个路径的报文拥塞,降低MPTCP传输性能。With the development of random virtualization technology, tunneling technology is generally used for packet transmission between virtual machines in virtualization scenarios. Based on tunneling technology, received packets are encapsulated and forwarded after encapsulation. However, when the encapsulated message is forwarded, it is difficult to distinguish the messages of multiple MPTCP connections based on the encapsulated message, which makes the message congestion of multiple paths under MPTCP and reduces the transmission performance of MPTCP.

发明内容Contents of the invention

提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

第一方面,本公开提供一种报文传输控制方法,所述方法包括:In a first aspect, the present disclosure provides a message transmission control method, the method comprising:

接收目标报文,从所述目标报文中解析对应的通信连接类型;receiving the target message, and parsing the corresponding communication connection type from the target message;

若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;If the communication connection type corresponding to the target message is a multiplex transmission control protocol MPTCP type, then determine the corresponding output port of the target message;

对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;Encapsulating the target message and encapsulating the port number of the outgoing port as extended information together to obtain an encapsulated message corresponding to the target message;

控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。The control message forwarder forwards the encapsulated message based on the port corresponding to the port number in the encapsulation information.

第二方面,本公开提供一种报文传输控制装置,所述装置包括:In a second aspect, the present disclosure provides a message transmission control device, the device comprising:

接收模块,用于接收目标报文,从所述目标报文中解析对应的通信连接类型;A receiving module, configured to receive a target message, and parse the corresponding communication connection type from the target message;

确定模块,用于若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;A determining module, configured to determine the outgoing port corresponding to the target message if the communication connection type corresponding to the target message is a multiplex transmission control protocol MPTCP type;

封装模块,用于对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;An encapsulation module, configured to encapsulate the target message and encapsulate the port number of the outgoing port as extended information to obtain an encapsulated message corresponding to the target message;

发送模块,用于控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。A sending module, configured to control the message forwarder to forward the encapsulated message based on the port corresponding to the port number in the encapsulation information.

第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现第一方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.

第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:

存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;

处理装置,用于执行所述存储装置中的所述计算机程序,以实现第一方面所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.

在上述技术方案中,通过对接收到的目标报文进行解析可以确定其对应的通信连接类型,则可以针对接到的MPTCP类型的报文,可以在报文封装之前预先根据该报文的信息进行出端口的预分发,以在一定程度上保证属于同一MPTCP会话下的多个子连接的报文能够进行端口分散转发,并将确定出的出端口的端口号存储至封装报文中,使得报文转发器可以直接基于封装报文中指示的出端口对报文进行转发,从而避免现有技术中在基于封装后的报文进行端口分发时,由于无法对属于同一MPTCP会话下的多个MPTCP子连接进行识别,而将同一MPTCP会话下的报文调度到同一出端口进行转发而导致的数据转发堵塞现象,提高MPTCP会话的使用率,同时提高MPTCP会话的数据传输效率,实现MPTCP会话和链路聚合下的数据高效率传输,提升用户使用体验。In the above technical solution, the corresponding communication connection type can be determined by parsing the received target message, then the received MPTCP type message can be pre-encapsulated according to the information of the message The pre-distribution of the outgoing port is carried out to ensure that the packets belonging to multiple sub-connections under the same MPTCP session can be forwarded in a distributed manner, and the port number of the determined outgoing port is stored in the encapsulated packet, so that the packet The file forwarder can directly forward the message based on the outbound port indicated in the encapsulated message, thereby avoiding the failure of multiple MPTCPs belonging to the same MPTCP session when port distribution is performed based on the encapsulated message in the prior art. Sub-connections are identified, and packets under the same MPTCP session are scheduled to the same outbound port for forwarding, resulting in data forwarding congestion, which improves the utilization rate of MPTCP sessions, improves the data transmission efficiency of MPTCP sessions, and realizes MPTCP sessions and links. High-efficiency data transmission under road aggregation improves user experience.

本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.

附图说明Description of drawings

结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:

图1A是根据本公开的一种实施方式提供的两个主机之间创建MPTCP会话下的多个连接的信令交互图;FIG. 1A is a signaling interaction diagram for establishing multiple connections under an MPTCP session between two hosts according to an embodiment of the present disclosure;

图1B所示,为虚拟化场景下的虚拟机之间的报文传输示意图;As shown in FIG. 1B, it is a schematic diagram of message transmission between virtual machines in a virtualization scenario;

图2是根据本公开的一种实施方式提供的报文传输控制方法的流程图;FIG. 2 is a flowchart of a message transmission control method provided according to an implementation manner of the present disclosure;

图3所示,为基于本公开提供的实施例对应的信令交互图;As shown in FIG. 3, it is a signaling interaction diagram corresponding to an embodiment based on the present disclosure;

图4是根据本公开的一种实施方式提供的报文传输控制装置的框图;Fig. 4 is a block diagram of a message transmission control device provided according to an embodiment of the present disclosure;

图5示出了适于用来实现本公开实施例的电子设备的结构示意图。FIG. 5 shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.

应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this regard.

本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.

需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.

需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".

本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.

可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed of the type, scope of use, and use scenarios of the personal information involved in the present disclosure in an appropriate manner in accordance with relevant laws and regulations, and the authorization of the user should be obtained. .

例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving the user's active request, send prompt information to the user to clearly remind the user that the requested operation will require the acquisition and use of the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as electronic devices, application programs, servers, or storage media that perform the operations of the technical solution of the present disclosure according to the prompt information.

作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。As an optional but non-limiting implementation, in response to receiving the active request from the user, the prompt information may be sent to the user, for example, in the form of a pop-up window, and the prompt information may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。It can be understood that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

同时,可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。At the same time, it can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of data) should comply with the requirements of corresponding laws and regulations and relevant regulations.

以下首先对主机之间建立MPTCP会话连接的方式进行说明。假设主机A有两个地址,分别为地址A1和地址A2,主机B的地址为地址B1。首次建立主机A和主机B的MPTCP主连接时,与标准TCP连接的建立方式类似。其中,在TCP头部有用于表示数据偏移量的选项。建立MPTCP连接时会使用这个选项,并且所有的MPTCP信号都会包含在这个选项字段里。如图1A所示,建立主机A和主机B之间的MPTCP主连接的方式,如下:The method of establishing an MPTCP session connection between hosts will be firstly described below. Suppose host A has two addresses, namely address A1 and address A2, and the address of host B is address B1. When establishing the MPTCP main connection between host A and host B for the first time, it is similar to the establishment method of a standard TCP connection. Among them, there is an option for representing data offset in the TCP header. This option will be used when establishing an MPTCP connection, and all MPTCP signals will be included in this option field. As shown in Figure 1A, the way to establish the MPTCP main connection between host A and host B is as follows:

S1、主机A通过地址A1向主机B的地址B1发送SYN消息,其中MPTCP字段里包括MPTCP标识信息MP_CAPABLE,同时SYN消息中还可以包括主机A生成的一个密钥A。密钥A用于该MPTCP后续建立子连接时进行验证,则主机A建立不同MPTCP主连接生成的密钥不同。S1. The host A sends a SYN message to the address B1 of the host B through the address A1, wherein the MPTCP field includes the MPTCP identification information MP_CAPABLE, and the SYN message may also include a key A generated by the host A. Key A is used for verification when the MPTCP subsequently establishes sub-connections, and the keys generated by host A establishing different MPTCP main connections are different.

S2、主机B通过地址B1向主机A的地址A1发送SYN+ACK消息,同样地,该消息的MPTCP字段里包含MPTCP标识信息MP_CAPABLE,同时消息中包括主机B生成的一个密钥B。S2. Host B sends a SYN+ACK message to host A's address A1 through address B1. Similarly, the MPTCP field of the message contains MPTCP identification information MP_CAPABLE, and the message includes a key B generated by host B.

S3、主机A通过地址A1向主机B的地址B1发送ACK消息,其中包含MPTCP标识信息MP_CAPABLE、密钥A和密钥B,此时主机A和主机B建立了主连接。S3. Host A sends an ACK message to host B's address B1 through address A1, which includes MPTCP identification information MP_CAPABLE, key A and key B, and host A and host B establish a master connection at this time.

由此,可以使用ACK和MP_CAPABLE信号完成TCP和MPTCP的握手过程,确保主机A和主机B都得到了对方的MPTCP会话数据。Thus, the handshake process between TCP and MPTCP can be completed by using the ACK and MP_CAPABLE signals to ensure that both host A and host B have obtained the other party's MPTCP session data.

之后若主机A需要通过地址A2与主机B的地址B1建立连接时(可以称为子连接),步骤可以如下:Afterwards, if host A needs to establish a connection with address B1 of host B through address A2 (which can be called a sub-connection), the steps can be as follows:

S4、主机A通过地址A2向主机B的地址B1发送SYN消息,该消息的MPTCP字段中包括子连接标识信息MP_JOIN、验证信息Token和随机数A。其中,Token是MPTCP主连接建立时的密钥B的哈希值,随机数A可以由主机A生成的。S4. The host A sends a SYN message to the address B1 of the host B through the address A2, and the MPTCP field of the message includes sub-connection identification information MP_JOIN, authentication information Token and random number A. Among them, Token is the hash value of key B when the MPTCP main connection is established, and random number A can be generated by host A.

S5、主机B通过地址B1向主机A的地址A2发送SYN+ACK消息,该消息的MPTCP字段中包括子连接标识信息MP_JOIN、验证信息HMAC-B和随机数B,其中,HMAC-B由密钥A、密钥B、随机数A和随机数B进行哈希运算得到,随机数B为主机B生成的。S5. Host B sends a SYN+ACK message to address A2 of host A through address B1. The MPTCP field of the message includes sub-connection identification information MP_JOIN, verification information HMAC-B and random number B, wherein HMAC-B is determined by the key A, key B, random number A and random number B are obtained through hash operation, and random number B is generated by host B.

S6、主机A通过地址A2向主机B的地址B1发送ACK消息,其中该消息的MPTCP字段中包括子连接标识信息MP_JOIN、验证信息HMAC-A,其中,HMAC-A由密钥A、密钥B、随机数A和随机数B进行哈希运算得到。S6. Host A sends an ACK message to address B1 of host B through address A2, wherein the MPTCP field of the message includes sub-connection identification information MP_JOIN and authentication information HMAC-A, wherein HMAC-A consists of key A and key B , random number A and random number B are obtained by hash operation.

S7、主机B通过地址B1向主机A的地址A2发送ACK消息,此时,子连接建立完成。由此,可以创建同一MPTCP会话下的多个MPTCP连接。S7. The host B sends an ACK message to the address A2 of the host A through the address B1, and at this time, the establishment of the sub-connection is completed. Thus, multiple MPTCP connections under the same MPTCP session can be created.

在虚拟化场景下,虚拟机之间的报文传输,一般会使用隧道技术,即对报文进行封装之后发出,如可以通过VXLAN技术进行封装。如图1B所示,在物理机中可以安装有虚拟机A和虚拟机B,且虚拟机A和虚拟机B分别都配置了多个端口,若采用MPTCP技术,虚拟交换机vSwitch接收到虚拟机报文之后,可以做VXLAN封装,并将封装之后的报文发送到报文转发器,报文转发器根据封装完的VXLAN报文确定出端口,基于该确定出的出端口将封装后的VXLAN报文发送至交换机。In a virtualization scenario, tunneling technology is generally used to transmit packets between virtual machines, that is, packets are encapsulated and then sent out, for example, VXLAN technology can be used for encapsulation. As shown in Figure 1B, virtual machine A and virtual machine B can be installed in the physical machine, and virtual machine A and virtual machine B are respectively configured with multiple ports. If the MPTCP technology is used, the virtual switch vSwitch receives the virtual machine report After the packet, VXLAN encapsulation can be performed, and the encapsulated packet can be sent to the packet forwarder. The packet forwarder determines the outgoing port according to the encapsulated VXLAN packet, and based on the determined outgoing port, the encapsulated VXLAN packet The text is sent to the switch.

图2所示,为根据本公开的一种实施方式提供的报文传输控制方法的流程图,如图2所示,所述方法可以包括:As shown in FIG. 2, it is a flowchart of a message transmission control method provided according to an implementation manner of the present disclosure. As shown in FIG. 2, the method may include:

在步骤11中,接收目标报文,从目标报文中解析对应的通信连接类型。其中,该目标报文为接收到的当前待转发的报文,其可以包括MPTCP类型的报文,也可以包括TCP类型的报文。示例地,该方法可以应用于虚拟交换机,以实现对报文的转发。Instep 11, the target message is received, and the corresponding communication connection type is parsed from the target message. Wherein, the target message is a received message currently to be forwarded, which may include a MPTCP type message or a TCP type message. Exemplarily, the method can be applied to a virtual switch to forward packets.

由上文所述可知,可以通过获取目标报文中的MPTCP字段中的取值以确定目标报文对应的通信连接类型,若目标报文的MPTCP字段中为MP_CAPABLE或MP_JOIN,则可以确定该目标报文对应的通信连接类型为MPTCP类型。若目标报文的MPTCP字段中不是MP_CAPABLE或者该MPTCP字段中不是MP_JOIN,则确定该目标报文的通信连接类型不是MPTCP类型。As can be seen from the above, the value of the MPTCP field in the target message can be obtained to determine the communication connection type corresponding to the target message. If the MPTCP field of the target message is MP_CAPABLE or MP_JOIN, the target can be determined The communication connection type corresponding to the message is MPTCP type. If the MPTCP field of the target message is not MP_CAPABLE or the MPTCP field is not MP_JOIN, it is determined that the communication connection type of the target message is not the MPTCP type.

在步骤12中,若目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定目标报文对应的出端口。Instep 12, if the communication connection type corresponding to the target message is the MPTCP type, then determine the output port corresponding to the target message.

其中,在本领域中进行报文转发时,通常采用链路聚合(Link Aggregation)的方式增加链路带宽,并实现链路传输弹性。链路聚合是指将多个物理端口汇聚在一起,形成一个逻辑端口,以实现出/入流量吞吐量在各成员端口的负荷分担。在进行报文转发时可以根据预先设置的算法确定报文从哪个成员端口发送到对端的设备。Wherein, when packet forwarding is performed in this field, link aggregation (Link Aggregation) is usually used to increase link bandwidth and realize link transmission elasticity. Link aggregation refers to the aggregation of multiple physical ports to form a logical port, so as to realize the load sharing of outbound/incoming traffic throughput on each member port. During packet forwarding, the member port from which the packet is sent to the peer device can be determined according to a preset algorithm.

相应地,在该实施例中,在确定出目标报文对应的通信连接类型为MPTCP类型时,可以对目标报文进行预分发,即提前确定出该目标报文对应的出端口,该出端口用于指示该目标报文从终端设备的哪一端口进行发出,以保证确定出端口时对各个MPTCP子连接的区分,保证MPTCP连接的数据传输效率。Correspondingly, in this embodiment, when it is determined that the communication connection type corresponding to the target message is the MPTCP type, the target message can be pre-distributed, that is, the output port corresponding to the target message is determined in advance, and the output port It is used to indicate which port of the terminal device the target message is sent from, so as to ensure the distinction of each MPTCP sub-connection when determining the outgoing port, and ensure the data transmission efficiency of the MPTCP connection.

在步骤13中,对目标报文进行封装并将出端口的端口号作为扩展信息一并封装得到目标报文对应的封装报文。Instep 13, the target message is encapsulated and the port number of the outgoing port is used as extended information to obtain an encapsulated message corresponding to the target message.

示例地,可以基于本领域中常用的封装方式对目标报文进行封装,如VXLAN方式进行封装。申请人发现,相关技术中在虚拟机配置多个端口且通过MPTCP进行报文传输时,由于需要对目标报文进行封装,若直接将封装报文发送至报文转发器,则报文转发器无法感知到MPTCP的子连接的存在,则报文转发器对封装报文进行转发时,则可能会将MPTCP的多个子连接下的报文调度到同一个出端口,出现端口拥塞。在本公开实施例中,可以将步骤12中确定出的报文对应的出端口的端口号作为扩展信息添加至封装报文中。如可以在封装报文的头部字段中选择一个可用字段作为该扩展信息的存储字段,以便于封装后所得的封装报文中可以携带有其对应的端口号。Exemplarily, the target packet may be encapsulated based on an encapsulation manner commonly used in the field, such as VXLAN encapsulation. The applicant found that in the related art, when the virtual machine is configured with multiple ports and the message is transmitted through MPTCP, since the target message needs to be encapsulated, if the encapsulated message is directly sent to the message forwarder, the message forwarder Unable to perceive the existence of the sub-connection of MPTCP, when the packet forwarder forwards the encapsulated packet, the packets under multiple sub-connections of MPTCP may be scheduled to the same egress port, resulting in port congestion. In the embodiment of the present disclosure, the port number of the outgoing port corresponding to the message determined instep 12 may be added to the encapsulated message as extended information. For example, an available field can be selected in the header field of the encapsulated message as a storage field for the extended information, so that the encapsulated message obtained after encapsulation can carry its corresponding port number.

在步骤14中,控制报文转发器基于封装信息中的端口号对应的端口对封装报文进行转发,该报文转发器可以为Bond驱动。Instep 14, the control message forwarder forwards the encapsulated message based on the port corresponding to the port number in the encapsulation information, and the message forwarder may be driven by Bond.

在上述技术方案中,通过对接收到的目标报文进行解析可以确定其对应的通信连接类型,则可以针对接到的MPTCP类型的报文,可以在报文封装之前预先根据该报文的信息进行出端口的预分发,以在一定程度上保证属于同一MPTCP会话下的多个子连接的报文能够进行端口分散转发,并将确定出的出端口的端口号存储至封装报文中,使得报文转发器可以直接基于封装报文中指示的出端口对报文进行转发,从而避免现有技术中在基于封装后的报文进行端口分发时,由于无法对属于同一MPTCP会话下的多个MPTCP子连接进行识别,而将同一MPTCP会话下的报文调度到同一出端口进行转发而导致的数据转发堵塞现象,提高MPTCP会话的使用率,同时提高MPTCP会话的数据传输效率,实现MPTCP会话和链路聚合下的数据高效率传输,提升用户使用体验。In the above technical solution, the corresponding communication connection type can be determined by parsing the received target message, then the received MPTCP type message can be pre-encapsulated according to the information of the message The pre-distribution of the outgoing port is carried out to ensure that the packets belonging to multiple sub-connections under the same MPTCP session can be forwarded in a distributed manner, and the port number of the determined outgoing port is stored in the encapsulated packet, so that the packet The file forwarder can directly forward the message based on the outbound port indicated in the encapsulated message, thereby avoiding the failure of multiple MPTCPs belonging to the same MPTCP session when port distribution is performed based on the encapsulated message in the prior art. Sub-connections are identified, and packets under the same MPTCP session are scheduled to the same outbound port for forwarding, resulting in data forwarding congestion, which improves the utilization rate of MPTCP sessions, improves the data transmission efficiency of MPTCP sessions, and realizes MPTCP sessions and links. High-efficiency data transmission under road aggregation improves user experience.

在一种可能实施例中,所述报文转发器用于根据所述扩展信息确定所述封装报文对应的转发端口,并基于所述转发端口对删除所述封装报文中的所述扩展信息所得的转发报文进行转发。In a possible embodiment, the message forwarder is configured to determine the forwarding port corresponding to the encapsulated message according to the extended information, and delete the extended information in the encapsulated message based on the forwarding port pair The obtained forwarded message is forwarded.

在该实施例中,报文转发器在接收到封装报文时,可以先获取该封装报文中的扩展信息,从而可以直接基于扩展信息中指示的端口确定该封装报文的转发路径,即从扩展信息中指示的转发端口进行转发。在该过程中,扩展信息用于通知报文转发器进行报文转发的端口,则在报文转发器对封装报文进行转发时可以删除封装报文中的扩展信息,以保证该基于本公开的方法转发的封装报文与相关技术中的封装报文的一致性,同时无需报文转发器进行端口路由,提高报文转发过程中端口路由的准确性和合理性的同时,能够降低对报文转发器的性能要求。In this embodiment, when the message forwarder receives the encapsulated message, it can first obtain the extended information in the encapsulated message, so that it can directly determine the forwarding path of the encapsulated message based on the port indicated in the extended information, namely Forwarding is performed from the forwarding port indicated in the extended information. In this process, the extended information is used to notify the message forwarder of the port for message forwarding, and the extended information in the encapsulated message can be deleted when the message forwarder forwards the encapsulated message, so as to ensure the The encapsulated message forwarded by the method is consistent with the encapsulated message in the related technology, and at the same time, there is no need for a message forwarder to perform port routing, which improves the accuracy and rationality of port routing in the message forwarding process, and at the same time reduces the need for packet routing. The performance requirements of the text forwarder.

在一种可能的实施例中,所述确定目标报文对应的出端口的示例性实现方式如下,该步骤可以包括:In a possible embodiment, an exemplary implementation manner of determining the egress port corresponding to the target message is as follows, and this step may include:

确定所述目标报文中的各个报文对应的MPTCP连接。Determine the MPTCP connection corresponding to each message in the target message.

其中,可以获取目标报文中的MPTCP字段,从而可以基于MPTCP字段的值确定信息确定其对应的MPTCP连接的连接标识。如,MP_CAPABLE用于表示报文对应的MPTCP主连接,MP_JOIN用于表示报文对应的MPTCP子连接,并且可以进一步地确定出报文对应的不同子连接。其中,该步骤中MPTCP连接可以包括属于同一MPTCP会话的各个连接,即其中的主连接和各个子连接。Wherein, the MPTCP field in the target packet can be obtained, so that the connection identifier of the corresponding MPTCP connection can be determined based on the value determination information of the MPTCP field. For example, MP_CAPABLE is used to indicate the MPTCP main connection corresponding to the message, and MP_JOIN is used to indicate the MPTCP sub-connection corresponding to the message, and different sub-connections corresponding to the message can be further determined. Wherein, the MPTCP connection in this step may include each connection belonging to the same MPTCP session, that is, the main connection and each sub-connection.

针对每一所述MPTCP连接,确定用于对所述MPTCP连接的报文进行转发的出端口。For each MPTCP connection, determine an egress port for forwarding packets of the MPTCP connection.

在该实施例中,在确定报文对应的出端口时,是基于报文对应的MPTCP连接,确定该MPTCP连接与对应的出端口之间的对应关系,无需针对每一报文进行出端口的确定,与MPTCP连接下的报文转发过程相匹配,在一定程度上提高报文转发的效率。In this embodiment, when determining the outgoing port corresponding to the message, it is based on the MPTCP connection corresponding to the message, and the corresponding relationship between the MPTCP connection and the corresponding outgoing port is determined, and it is not necessary to carry out the outgoing port for each message. Make sure that it matches the packet forwarding process under the MPTCP connection, and improves the efficiency of packet forwarding to a certain extent.

在一种可能的实施例中,所述确定用于对所述MPTCP连接的报文进行转发的出端口的示例性实现方式如下,该步骤可以包括:In a possible embodiment, an exemplary implementation manner of determining an egress port for forwarding packets of the MPTCP connection is as follows, and this step may include:

根据所述MPTCP连接的连接标识查询转发对应关系表,其中,所述转发对应关系表中包括连接标识与端口的对应关系。A forwarding correspondence table is queried according to the connection identifier of the MPTCP connection, wherein the forwarding correspondence table includes a correspondence between a connection identifier and a port.

其中,如图1A中所示,通过S1-S3可以创建主机A和主机B之间的MPTCP主连接对应的会话,则针对主机A而言,可以将主机A用发送SYN消息的端口确定为该MPTCP主连接对应的出端口,并创建该MPTCP主连接的连接标识和该端口的对应关系,以添加到该转发对应关系表中,示例地生成连接标识ID1与端口1111的对应关系。Wherein, as shown in Figure 1A, the session corresponding to the MPTCP main connection between host A and host B can be created through S1-S3, then for host A, the port that host A uses to send the SYN message can be determined as the The output port corresponding to the MPTCP main connection, and create the corresponding relationship between the connection identifier of the MPTCP main connection and the port, so as to add it to the forwarding correspondence table, and generate the corresponding relationship between the connection identifier ID1 and the port 1111 by way of example.

若查询到所述MPTCP连接的连接标识对应的端口,则将所述端口确定为所述MPTCP连接对应的出端口。If the port corresponding to the connection identifier of the MPTCP connection is found, the port is determined as the outgoing port corresponding to the MPTCP connection.

相应地,在之后接收到报文,根据其对应的MPTCP连接的连接标识查询转发对应关系表,若该连接标识为ID1,则可以从转发对应关系表中查询到该连接标识对应的端口为1111,则可以将端口1111确定为该MPTCP连接对应的出端口,即基于ID1对应的MPTCP连接接收到的报文均通过端口1111进行发出。Correspondingly, after receiving the message, query the forwarding correspondence table according to the connection identification of the corresponding MPTCP connection. If the connection identification is ID1, you can query from the forwarding correspondence table that the port corresponding to the connection identification is 1111 , port 1111 can be determined as the outgoing port corresponding to the MPTCP connection, that is, all packets received based on the MPTCP connection corresponding to ID1 are sent out through port 1111.

若未查询到所述MPTCP连接的连接标识对应的端口,则根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口。If the port corresponding to the connection identifier of the MPTCP connection is not found, then determine the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder.

若针对接收到报文,其对应的MPTCP连接的连接标识为ID2,根据该连连接标识ID2查询转发对应关系表,未查询到连接标识ID2对应的端口号,此时则可以基于端口信息进行自动分配。If the connection identifier of the corresponding MPTCP connection is ID2 for the received message, query the forwarding correspondence table according to the connection identifier ID2, and the port number corresponding to the connection identifier ID2 is not found. distribute.

其中,在该实施例中,报文转发器可以用于实时对各个端口进行监测,则端口信息中可以用于指示各个端口的可用性。之后,将各个端口的端口信息同步至虚拟交换机,以便于该虚拟交换机能够实时确定各个端口的可用性。如报文转发器监测到端口1122故障,则可以通过该虚拟交换机,以使虚拟交换机在基于端口信息进行出端口确定时不会将该端口1122作为出端口,保证报文的准确有效转发。Wherein, in this embodiment, the packet forwarder can be used to monitor each port in real time, and the port information can be used to indicate the availability of each port. Afterwards, the port information of each port is synchronized to the virtual switch, so that the virtual switch can determine the availability of each port in real time. If the packet forwarder detects that the port 1122 is faulty, the virtual switch can be used to prevent the virtual switch from using the port 1122 as the outgoing port when determining the outgoing port based on the port information, so as to ensure accurate and effective packet forwarding.

由此,通过上述技术方案,在确定MPTCP连接对应的出端口时,可以首先查询转发对应关系表,以便能够基于已分配的出端口实现报文的转发,避免同一MPTCP会话下各个连接的报文的转发冲突的同时,保证同一MPTCP连接下的报文转发的顺序性和完整性。Therefore, through the above technical solution, when determining the corresponding outgoing port of the MPTCP connection, the forwarding correspondence table can be queried first, so that the forwarding of the message can be realized based on the allocated outgoing port, and the message of each connection under the same MPTCP session can be avoided. While forwarding conflicts, the sequence and integrity of message forwarding under the same MPTCP connection are guaranteed.

在一种可能的实施例中,所述根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口,包括以下中的任一者:In a possible embodiment, the determining the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder includes any of the following:

第一种,根据所述端口信息确定可用端口,通过对所述可用端口轮询确定所述MPTCP连接对应的出端口。The first method is to determine an available port according to the port information, and determine the outgoing port corresponding to the MPTCP connection by polling the available port.

其中,在端口信息中可以通过标识位标注其对应的端口的可用性,如标识位为1表示端口可用,标识位为0表示端口不可用,则报文转发器在监测端口的过程中可以基于监测到的情况对各个端口的标识位进行修改。相应地,该步骤中,可以将端口信息中标识位为1的端口作为可用端口,如端口port1-port8,则进一步可以基于对可用端口进行轮询确定MPTCP连接对应的出端口。Among them, in the port information, the availability of the corresponding port can be marked by the identification bit. If the identification bit is 1, it means that the port is available, and if the identification bit is 0, it means that the port is unavailable. Modify the identification bit of each port in case of arrival. Correspondingly, in this step, the port whose identification bit is 1 in the port information can be used as an available port, such as ports port1-port8, and the outgoing port corresponding to the MPTCP connection can be further determined based on polling the available ports.

示例地,连接标识ID2和连接标识ID3均未查询到对应的端口,则基于轮询机制可以将port1作为连接标识ID2对应的MPTCP连接对应的出端口,将port2作为连接标识ID3对应的MPTCP连接对应的出端口。由此,可以在一定程度上保证MPTCP会话中的多个MPTCP连接的负载均衡,以降低报文转发的传输压力。For example, if neither the connection ID2 nor the connection ID3 finds the corresponding port, port1 can be used as the outbound port corresponding to the MPTCP connection corresponding to the connection ID2 based on the polling mechanism, and port2 can be used as the corresponding port of the MPTCP connection corresponding to the connection ID3. out port. Therefore, load balancing of multiple MPTCP connections in the MPTCP session can be guaranteed to a certain extent, so as to reduce the transmission pressure of message forwarding.

第二种,根据所述端口信息确定可用端口以及所述可用端口对应的负载信息,将指示最小负载的负载信息所对应的可用端口确定为所述MPTCP连接对应的出端口。The second type is determining an available port and load information corresponding to the available port according to the port information, and determining the available port corresponding to the load information indicating the minimum load as the outgoing port corresponding to the MPTCP connection.

其中,根据端口信息确定可用端口的方式与上文相同,在此不再赘述。相应地,报文转发器在监测各个端口时,可以通过监测各个端口的负载信息,该负载信息可以是当前端口对应的已用带宽信息,则报文转发器可以将各个端口对应的标识位和负载信息对应发送至虚拟交换机,则在确定MPTCP连接对应的出端口,则可以基于标识位确定出端口port1-port8为可用端口,其中port4的负载信息对应于最小负载,则可以将该port作为该MPTCP连接对应的出端口。由此,可以提高报文转发过程中的负载均衡,同时提高报转发的效率,并且可以降低报文传输丢包的风险。Wherein, the manner of determining the available ports according to the port information is the same as above, and will not be repeated here. Correspondingly, when the message forwarder monitors each port, the load information of each port can be monitored, and the load information can be the used bandwidth information corresponding to the current port, and then the message forwarder can use the identification bits corresponding to each port and The load information is correspondingly sent to the virtual switch, then when determining the output port corresponding to the MPTCP connection, the port port1-port8 can be determined based on the identification bit as an available port, and the load information of port4 corresponds to the minimum load, then the port can be used as the port The output port corresponding to the MPTCP connection. In this way, the load balance in the message forwarding process can be improved, the efficiency of message forwarding can be improved, and the risk of packet loss in message transmission can be reduced.

第三种,根据所述端口信息确定可用端口,将所述可用端口中除已分配端口之外的任一者作为确定为所述MPTCP连接对应的出端口,其中,所述已分配端口为MPTCP连接所属的会话中的各个MPTCP连接对应的出端口。The third method is to determine the available port according to the port information, and use any one of the available ports except the allocated port as the outbound port corresponding to the MPTCP connection, wherein the allocated port is MPTCP Outbound port corresponding to each MPTCP connection in the session to which the connection belongs.

其中,根据端口信息确定可用端口的方式与上文相同,在此不再赘述。若当前MPTCP连接所属的会话中包含MPTCP连接L1-L4,确定出的可用端口为port1-port8,且L1对应的出端口为port1,L2对应的出端口为port2,即port1和port2为已分配端口,则在为L3和L4确定对应的出端口时,可以从port3-port8选择端口作为L3和L4对应出端口,如确定port3作为L3对应的出端口,确定port5作为L4对应的出端口。由此,可以在确定同一MPTCP会话中的不同MPTCP连接的报文可以调度到不同的出端口进行转发,提高MPTCP会话的数据传输效率。Wherein, the manner of determining the available ports according to the port information is the same as above, and will not be repeated here. If the session to which the current MPTCP connection belongs includes MPTCP connections L1-L4, the determined available ports are port1-port8, and the outbound port corresponding to L1 is port1, and the outbound port corresponding to L2 is port2, that is, port1 and port2 are allocated ports , then when determining the corresponding egress ports for L3 and L4, ports can be selected from port3-port8 as the corresponding egress ports of L3 and L4, such as determining port3 as the corresponding egress port of L3, and determining port5 as the corresponding egress port of L4. Therefore, it can be determined that packets of different MPTCP connections in the same MPTCP session can be scheduled to different egress ports for forwarding, thereby improving the data transmission efficiency of the MPTCP session.

在一种可能的实施例中,在根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口的步骤之后,所述方法还可以包括:In a possible embodiment, after the step of determining the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder, the method may further include:

生成所述MPTCP连接的连接标识与确定出的出端口之间的对应关系,并将所述对应关系存储至所述转发对应关系表中。A correspondence between the connection identifier of the MPTCP connection and the determined outbound port is generated, and the correspondence is stored in the forwarding correspondence table.

如上述示例,基于轮询机制可以将port1作为连接标识ID2对应的MPTCP连接对应的出端口,将port2作为连接标识ID3对应的MPTCP连接对应的出端口,则可以根据分配的出端口生成对应关系,如生成对应关系1:<ID2,port1>,对应关系2:<ID3,port2>。As in the above example, based on the polling mechanism, port1 can be used as the outbound port corresponding to the MPTCP connection corresponding to the connection ID ID2, and port2 can be used as the outbound port corresponding to the MPTCP connection corresponding to the connection ID ID3, then a corresponding relationship can be generated according to the allocated outbound port, For example, generate corresponding relationship 1: <ID2, port1>, and corresponding relationship 2: <ID3, port2>.

由此,可以实现对转发对应关系表的更新,从而进一步提高基于转发对应关系表确定各个MPTCP连接的出端口的效率,同时也可以使得同一MPTCP连接的报文可以通过同一出端口进行转发,保证报文转发的顺序性和安全性。Thus, the update of the forwarding correspondence table can be realized, thereby further improving the efficiency of determining the outgoing port of each MPTCP connection based on the forwarding correspondence table, and at the same time, the packets of the same MPTCP connection can be forwarded through the same outgoing port, ensuring The sequence and security of packet forwarding.

在一种可能的实施例中,所述方法还可以包括:In a possible embodiment, the method may also include:

若所述MPTCP连接对应的通信连接结束,则删除所述转发对应关系表中与所述MPTCP连接的连接标识的对应关系。If the communication connection corresponding to the MPTCP connection ends, delete the correspondence between the forwarding correspondence table and the connection identifier of the MPTCP connection.

其中,在该实施例中,同一MPTCP会话中可以包括多个MPTCP连接,当其中的某一MPTCP子连接终止时,并不会影响MPTCP会话的通信。其中可以基于与标准TCP类似的方式通过FIN消息使得MPTCP连接对应的通信连接结束,此时可以在该MPTCP会话中删除该MPTCP连接对应的通道,相应地,在该实施例中,在MPTCP连接对应的通信连接结束的情况下,可以进一步将该MPTCP连接的连接标识的对应关系删除,保证转发对应关系的准确性和实时性,并且在一定程度上避免出端口分配的冲突,保证基于MPTCP会话进行报文转发的安全性和效率。Wherein, in this embodiment, the same MPTCP session may include multiple MPTCP connections, and when one of the MPTCP sub-connections terminates, it will not affect the communication of the MPTCP session. Wherein, the communication connection corresponding to the MPTCP connection can be terminated through a FIN message in a manner similar to standard TCP. At this time, the channel corresponding to the MPTCP connection can be deleted in the MPTCP session. Correspondingly, in this embodiment, the MPTCP connection corresponds to When the communication connection ends, the corresponding relationship of the connection identifier of the MPTCP connection can be further deleted to ensure the accuracy and real-time performance of the forwarding corresponding relationship, and to a certain extent avoid the conflict of the outbound port allocation, and ensure that based on the MPTCP session Security and efficiency of packet forwarding.

在一种可能的实施例中,所述方法还可以包括:In a possible embodiment, the method may also include:

若所述目标报文对应的通信连接类型不是MPTCP类型,则对所述目标报文进行封装,并将封装所得的报文发送至所述报文转发器,以由所述报文转发器确定该封装所得的报文对应的出端口,并基于确定出的出端口对封装所得的报文进行转发。If the communication connection type corresponding to the target message is not the MPTCP type, then the target message is encapsulated, and the encapsulated message is sent to the message forwarder to be determined by the message forwarder The outbound port corresponding to the encapsulated message is forwarded based on the determined outbound port.

由此,针对非MPTCP类型的报文,每一会话的报文都是通过同一连接进行传输,其对应的报文都会通过同一出端口进行转发,则其可以直接进行封装以由报文转发器确定其对应的出端口进行转发,保证报文转发的安全性和效率。Therefore, for non-MPTCP type messages, the messages of each session are transmitted through the same connection, and the corresponding messages will be forwarded through the same output port, so they can be directly encapsulated by the message forwarder Determine the corresponding outbound port for forwarding to ensure the security and efficiency of message forwarding.

图3所示,为本公开提供的实施例对应的信令交互图,报文转发器可以实时对各个端口进行监测,将各个端口的端口信息同步至虚拟交换机,虚拟交换机根据报文转发器对应的端口信息,更新出端口。其中该过程可以间隔预设时长进行同步,在此不做限定。示例地,客户端VM1中有两个地址,分别为192.168.1.10和192.168.1.20,首先基于192.168.1.10发起MPTCP主连接,虚拟交换机接收到VM1的带有MP_CAPABLE标志的报文后,根据当前的可用端口,确定对应该报文对应的出端口为X,生成该连接的连接标识与该出端口之间的对应关系,并存储至转发对应关系表,之后可以对报文进行封装发送至报文转发器,控制报文转发器删除扩展信息并基于物理接口X进行转发。As shown in FIG. 3 , it is the signaling interaction diagram corresponding to the embodiment provided by the present disclosure. The message forwarder can monitor each port in real time, and synchronize the port information of each port to the virtual switch. The virtual switch corresponds to the port information and update the outgoing port. The process can be synchronized at intervals of preset time intervals, which is not limited here. For example, there are two addresses in the client VM1, namely 192.168.1.10 and 192.168.1.20. First, the MPTCP primary connection is initiated based on 192.168.1.10. After the virtual switch receives the message with the MP_CAPABLE flag from VM1, it Available ports, determine that the outgoing port corresponding to the message is X, generate the corresponding relationship between the connection identifier of the connection and the outgoing port, and store it in the forwarding correspondence table, and then the message can be encapsulated and sent to the message Forwarder, the control packet forwarder deletes the extended information and forwards based on physical interface X.

之后,接收到客户端VM2的回复报文,如图3中物理接口X想报文转发器发送的报文,并进一步发送至虚拟交换机,虚拟交换机接收到VM2的带有MP_CAPABLE标志的报文后,计算出VM2的token,保存会话信息,并与之前VM1生成对应关系建立关联,即在虚拟交换机中保存用于VM1和VM2进行通信的会话信息。After that, the reply message from the client VM2 is received, as shown in Figure 3, the message sent by the physical interface X to the message forwarder, and further sent to the virtual switch, after the virtual switch receives the message with the MP_CAPABLE flag of VM2 , calculate the token of VM2, save the session information, and establish an association with the corresponding relationship generated by VM1 before, that is, save the session information used for communication between VM1 and VM2 in the virtual switch.

进一步地,基于VM1的地址192.168.1.10发起MPTCP子连接,虚拟交换机接收到发往VM2的带有MP_JOIN标志的子连接报文后,根据token识别出子连接对应的MPTCP主连接信息,确定出端口为Y,并将端口信息作为扩展信息,之后可以对报文进行封装发送至报文转发器,控制报文转发器删除扩展信息并基于物理接口Y进行转发。Further, an MPTCP sub-connection is initiated based on the address 192.168.1.10 of VM1. After receiving the sub-connection message with the MP_JOIN flag sent to VM2, the virtual switch recognizes the MPTCP main connection information corresponding to the sub-connection according to the token, and determines the outgoing port is Y, and the port information is used as extended information, and then the packet can be encapsulated and sent to the packet forwarder, and the packet forwarder is controlled to delete the extended information and forward it based on the physical interface Y.

其中,上述过程中创建MPTCP主连接和MPTCP子连接的方式已在上文进行详述,在此不再赘述。若要结束子连接的会话,则可以通过发送TCP FIN报文实现,从而可以将子连接对应的会话信息删除。会话信息的删除可以通过本领域中常用的方式进行处理,本公开对此不做限定。Wherein, the manner of creating the MPTCP main connection and the MPTCP sub-connection in the above process has been described in detail above, and will not be repeated here. To end the session of the sub-connection, it can be realized by sending a TCP FIN message, so that the session information corresponding to the sub-connection can be deleted. Deletion of session information can be processed by common methods in this field, which is not limited in this disclosure.

本公开还提供一种报文传输控制装置,如图4所示,所述装置10包括:The present disclosure also provides a message transmission control device. As shown in FIG. 4, thedevice 10 includes:

接收模块100,用于接收目标报文,从所述目标报文中解析对应的通信连接类型;The receivingmodule 100 is configured to receive a target message, and parse the corresponding communication connection type from the target message;

确定模块200,用于若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;Thedetermination module 200 is used to determine the corresponding output port of the target message if the communication connection type corresponding to the target message is a multiplex transmission control protocol MPTCP type;

封装模块300,用于对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;Anencapsulation module 300, configured to encapsulate the target message and encapsulate the port number of the outgoing port as extended information to obtain an encapsulated message corresponding to the target message;

发送模块400,用于控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。The sendingmodule 400 is configured to control the message forwarder to forward the encapsulated message based on the port corresponding to the port number in the encapsulation information.

可选地,所述确定模块200包括:Optionally, the determiningmodule 200 includes:

第一确定子模块,用于确定所述目标报文中的各个报文对应的MPTCP连接;The first determining submodule is configured to determine the MPTCP connection corresponding to each message in the target message;

第二确定子模块,用于针对每一所述MPTCP连接,确定用于对所述MPTCP连接的报文进行转发的出端口。The second determining submodule is configured to determine, for each MPTCP connection, an egress port for forwarding packets of the MPTCP connection.

可选地,所述第二确定子模块包括:Optionally, the second determining submodule includes:

查询子模块,用于根据所述MPTCP连接的连接标识查询转发对应关系表,其中,所述转发对应关系表中包括连接标识与端口的对应关系;The query submodule is used to query the forwarding correspondence table according to the connection identification of the MPTCP connection, wherein the forwarding correspondence table includes the correspondence between the connection identification and the port;

第三确定子模块,用于若查询到所述MPTCP连接的连接标识对应的端口,则将所述端口确定为所述MPTCP连接对应的出端口;The third determining submodule is used to determine the port as the outgoing port corresponding to the MPTCP connection if the port corresponding to the connection identifier of the MPTCP connection is found;

第四确定子模块,用于若未查询到所述MPTCP连接的连接标识对应的端口,则根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口。The fourth determining submodule is configured to determine the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder if the port corresponding to the connection identifier of the MPTCP connection is not found.

可选地,所述第四确定子模块包括以下中的任一者:Optionally, the fourth determination submodule includes any one of the following:

第五确定子模块,用于根据所述端口信息确定可用端口,通过对所述可用端口轮询确定所述MPTCP连接对应的出端口;The fifth determining submodule is configured to determine an available port according to the port information, and determine the outgoing port corresponding to the MPTCP connection by polling the available port;

第六确定子模块,用于根据所述端口信息确定可用端口以及所述可用端口对应的负载信息,将指示最小负载的负载信息所对应的可用端口确定为所述MPTCP连接对应的出端口;The sixth determination submodule is configured to determine an available port and load information corresponding to the available port according to the port information, and determine the available port corresponding to the load information indicating the minimum load as the output port corresponding to the MPTCP connection;

第七确定子模块,用于根据所述端口信息确定可用端口,将所述可用端口中除已分配端口之外的任一者作为确定为所述MPTCP连接对应的出端口,其中,所述已分配端口为MPTCP连接所属的会话中的各个MPTCP连接对应的出端口。The seventh determination submodule is configured to determine an available port according to the port information, and use any one of the available ports except the allocated port as the output port corresponding to the MPTCP connection, wherein the allocated The assigned port is the outgoing port corresponding to each MPTCP connection in the session to which the MPTCP connection belongs.

可选地,所述装置还包括:Optionally, the device also includes:

生成模块,用于在所述第四确定子模块根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口之后,生成所述MPTCP连接的连接标识与确定出的出端口之间的对应关系,并将所述对应关系存储至所述转发对应关系表中。A generating module, configured to generate the connection identifier and the determined outbound port of the MPTCP connection after the fourth determining submodule determines the outbound port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder and store the corresponding relationship in the forwarding corresponding relationship table.

可选地,所述装置还包括:Optionally, the device also includes:

删除模块,用于若所述MPTCP连接对应的通信连接结束,则删除所述转发对应关系表中与所述MPTCP连接的连接标识的对应关系。A deletion module, configured to delete the correspondence between the forwarding correspondence table and the connection identifier of the MPTCP connection if the communication connection corresponding to the MPTCP connection ends.

可选地,所述报文转发器用于根据所述扩展信息确定所述封装报文对应的转发端口,并基于所述转发端口对删除所述封装报文中的所述扩展信息所得的转发报文进行转发。Optionally, the message forwarder is configured to determine the forwarding port corresponding to the encapsulated message according to the extended information, and delete the forwarding message obtained by deleting the extended information in the encapsulated message based on the forwarding port pair. The text is forwarded.

下面参考图5,其示出了适于用来实现本公开实施例的电子设备600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 5 , it shows a schematic structural diagram of anelectronic device 600 suitable for implementing the embodiments of the present disclosure. The terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 5 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.

如图5所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 5, anelectronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may be randomly accessed according to a program stored in a read-only memory (ROM) 602 or loaded from astorage device 608. Various appropriate actions and processes are executed by programs in the memory (RAM) 603 . In theRAM 603, various programs and data necessary for the operation of theelectronic device 600 are also stored. Theprocessing device 601 ,ROM 602 andRAM 603 are connected to each other through abus 604 . An input/output (I/O)interface 605 is also connected to thebus 604 .

通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 605:input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration anoutput device 607 such as a computer; astorage device 608 including, for example, a magnetic tape, a hard disk, etc.; and acommunication device 609. The communication means 609 may allow theelectronic device 600 to perform wireless or wired communication with other devices to exchange data. While FIG. 5 showselectronic device 600 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609 , or from storage means 608 , or fromROM 602 . When the computer program is executed by theprocessing device 601, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server can communicate using any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium (eg, communication network) interconnections. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.

上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收目标报文,从所述目标报文中解析对应的通信连接类型;若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives the target message, and parses the corresponding communication connection type from the target message ; If the communication connection type corresponding to the target message is the multiplex transmission control protocol MPTCP type, then determine the corresponding outgoing port of the target message; encapsulate the target message and use the port number of the outgoing port and encapsulating the packaged message corresponding to the target message together as the extended information; the control message forwarder forwards the encapsulated message based on the port corresponding to the port number in the encapsulation information.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,接收模块还可以被描述为“接收目标报文,从所述目标报文中解析对应的通信连接类型的模块”。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself in some cases, for example, the receiving module can also be described as a module that "receives the target message and parses the corresponding communication connection type from the target message." ".

本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

根据本公开的一个或多个实施例,示例1提供了一种报文传输控制方法,其中,所述方法包括:According to one or more embodiments of the present disclosure, Example 1 provides a packet transmission control method, wherein the method includes:

接收目标报文,从所述目标报文中解析对应的通信连接类型;receiving the target message, and parsing the corresponding communication connection type from the target message;

若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;If the communication connection type corresponding to the target message is a multiplex transmission control protocol MPTCP type, then determine the corresponding output port of the target message;

对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;Encapsulating the target message and encapsulating the port number of the outgoing port as extended information together to obtain an encapsulated message corresponding to the target message;

控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。The control message forwarder forwards the encapsulated message based on the port corresponding to the port number in the encapsulation information.

根据本公开的一个或多个实施例,示例2提供了示例1的方法,其中,所述确定目标报文对应的出端口,包括:According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the determining the egress port corresponding to the target message includes:

确定所述目标报文中的各个报文对应的MPTCP连接;Determine the MPTCP connection corresponding to each message in the target message;

针对每一所述MPTCP连接,确定用于对所述MPTCP连接的报文进行转发的出端口。For each MPTCP connection, determine an egress port for forwarding packets of the MPTCP connection.

根据本公开的一个或多个实施例,示例3提供了示例2的方法,其中,所述确定用于对所述MPTCP连接的报文进行转发的出端口,包括:According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the determining the egress port used to forward the packet of the MPTCP connection includes:

根据所述MPTCP连接的连接标识查询转发对应关系表,其中,所述转发对应关系表中包括连接标识与端口的对应关系;Query the forwarding correspondence table according to the connection identification of the MPTCP connection, wherein the forwarding correspondence table includes the correspondence between the connection identification and the port;

若查询到所述MPTCP连接的连接标识对应的端口,则将所述端口确定为所述MPTCP连接对应的出端口;If the port corresponding to the connection identifier of the MPTCP connection is found, the port is determined as the corresponding outgoing port of the MPTCP connection;

若未查询到所述MPTCP连接的连接标识对应的端口,则根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口。If the port corresponding to the connection identifier of the MPTCP connection is not found, then determine the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the message forwarder.

根据本公开的一个或多个实施例,示例4提供了示例3的方法,其中,所述根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口,包括以下中的任一者:According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein the determining the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the packet forwarder includes the following either:

根据所述端口信息确定可用端口,通过对所述可用端口轮询确定所述MPTCP连接对应的出端口;Determine an available port according to the port information, and determine an outgoing port corresponding to the MPTCP connection by polling the available port;

根据所述端口信息确定可用端口以及所述可用端口对应的负载信息,将指示最小负载的负载信息所对应的可用端口确定为所述MPTCP连接对应的出端口;Determining an available port and load information corresponding to the available port according to the port information, and determining the available port corresponding to the load information indicating the minimum load as the outgoing port corresponding to the MPTCP connection;

根据所述端口信息确定可用端口,将所述可用端口中除已分配端口之外的任一者作为确定为所述MPTCP连接对应的出端口,其中,所述已分配端口为MPTCP连接所属的会话中的各个MPTCP连接对应的出端口。Determine available ports according to the port information, and use any one of the available ports except the allocated port as the outgoing port corresponding to the MPTCP connection, wherein the allocated port is the session to which the MPTCP connection belongs The outbound port corresponding to each MPTCP connection in .

根据本公开的一个或多个实施例,示例5提供了示例3的方法,其中,在所述根据所述报文转发器对应的端口信息,确定所述MPTCP连接对应的出端口的步骤之后,所述方法还包括:According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 3, wherein, after the step of determining the outgoing port corresponding to the MPTCP connection according to the port information corresponding to the packet forwarder, The method also includes:

生成所述MPTCP连接的连接标识与确定出的出端口之间的对应关系,并将所述对应关系存储至所述转发对应关系表中。A correspondence between the connection identifier of the MPTCP connection and the determined outbound port is generated, and the correspondence is stored in the forwarding correspondence table.

根据本公开的一个或多个实施例,示例6提供了示例3的方法,其中,所述方法还包括:According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 3, wherein the method further includes:

若所述MPTCP连接对应的通信连接结束,则删除所述转发对应关系表中与所述MPTCP连接的连接标识的对应关系。If the communication connection corresponding to the MPTCP connection ends, delete the correspondence between the forwarding correspondence table and the connection identifier of the MPTCP connection.

根据本公开的一个或多个实施例,示例7提供了示例1的方法,其中,所述报文转发器用于根据所述扩展信息确定所述封装报文对应的转发端口,并基于所述转发端口对删除所述封装报文中的所述扩展信息所得的转发报文进行转发。According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein the packet forwarder is configured to determine the forwarding port corresponding to the encapsulated packet according to the extended information, and based on the forwarding The port forwards the forwarded message obtained by deleting the extended information in the encapsulated message.

根据本公开的一个或多个实施例,示例8提供了一种报文传输控制装置,其中,所述装置包括:According to one or more embodiments of the present disclosure, Example 8 provides a message transmission control device, wherein the device includes:

接收模块,用于接收目标报文,从所述目标报文中解析对应的通信连接类型;A receiving module, configured to receive a target message, and parse the corresponding communication connection type from the target message;

确定模块,用于若所述目标报文对应的通信连接类型为多路传输控制协议MPTCP类型,则确定所述目标报文对应的出端口;A determining module, configured to determine the outgoing port corresponding to the target message if the communication connection type corresponding to the target message is a multiplex transmission control protocol MPTCP type;

封装模块,用于对所述目标报文进行封装并将所述出端口的端口号作为扩展信息一并封装得到所述目标报文对应的封装报文;An encapsulation module, configured to encapsulate the target message and encapsulate the port number of the outgoing port as extended information to obtain an encapsulated message corresponding to the target message;

发送模块,用于控制报文转发器基于所述封装信息中的端口号对应的端口对所述封装报文进行转发。A sending module, configured to control the message forwarder to forward the encapsulated message based on the port corresponding to the port number in the encapsulation information.

根据本公开的一个或多个实施例,示例9提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1-7中任一项所述方法的步骤。According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any one of the methods described in Examples 1-7 are implemented .

根据本公开的一个或多个实施例,示例10提供了一种电子设备,包括:According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising:

存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;

处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-7中任一项所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of any one of the methods in Examples 1-7.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (10)

CN202211328824.2A2022-10-272022-10-27 Message transmission control method, device, medium and equipmentActiveCN115665047B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211328824.2ACN115665047B (en)2022-10-272022-10-27 Message transmission control method, device, medium and equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211328824.2ACN115665047B (en)2022-10-272022-10-27 Message transmission control method, device, medium and equipment

Publications (2)

Publication NumberPublication Date
CN115665047Atrue CN115665047A (en)2023-01-31
CN115665047B CN115665047B (en)2025-07-11

Family

ID=84994200

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211328824.2AActiveCN115665047B (en)2022-10-272022-10-27 Message transmission control method, device, medium and equipment

Country Status (1)

CountryLink
CN (1)CN115665047B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101605091A (en)*2009-02-132009-12-16华为技术有限公司 A multi-port load sharing method, device and network system
CN107005470A (en)*2014-10-202017-08-01萨热姆通信宽带简易股份有限公司 Method for creating subflows of data packets
CN114205301A (en)*2020-08-282022-03-18华为技术有限公司 MPTCP load balancing method, medium and device
CN114285802A (en)*2021-12-212022-04-05北京字节跳动网络技术有限公司Network load balancing method, device, electronic equipment, medium and program product
CN114666265A (en)*2022-03-282022-06-24阿里巴巴(中国)有限公司Data transmission method, device, computing equipment and medium
CN114731557A (en)*2019-11-292022-07-08华为技术有限公司Message transmission method, communication device and communication system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101605091A (en)*2009-02-132009-12-16华为技术有限公司 A multi-port load sharing method, device and network system
CN107005470A (en)*2014-10-202017-08-01萨热姆通信宽带简易股份有限公司 Method for creating subflows of data packets
CN114731557A (en)*2019-11-292022-07-08华为技术有限公司Message transmission method, communication device and communication system
CN114205301A (en)*2020-08-282022-03-18华为技术有限公司 MPTCP load balancing method, medium and device
CN114285802A (en)*2021-12-212022-04-05北京字节跳动网络技术有限公司Network load balancing method, device, electronic equipment, medium and program product
CN114666265A (en)*2022-03-282022-06-24阿里巴巴(中国)有限公司Data transmission method, device, computing equipment and medium

Also Published As

Publication numberPublication date
CN115665047B (en)2025-07-11

Similar Documents

PublicationPublication DateTitle
CN110708393B (en)Method, device and system for transmitting data
US11277313B2 (en)Data transmission method and corresponding device
CN102571756B (en)Multichannel in file system session connects
CN113326228B (en)Message forwarding method, device and equipment based on remote direct data storage
CN106790420B (en)A kind of more session channel method for building up and system
US20190387051A1 (en)Method, device and computer program product for managing network system
CN106464596B (en) Open flow communication method, system, controller and service gateway
CN110545230B (en)Method and device for forwarding VXLAN message
WO2023185804A1 (en)Multi-stream load balancing method and apparatus for vpn, and system and storage medium
CN114828140B (en)Service flow message forwarding method and device, storage medium and electronic equipment
WO2021008591A1 (en)Data transmission method, device, and system
WO2024021414A1 (en)Data transmission
WO2023151264A1 (en)Load balancing method and apparatus, node, and storage medium
CN113497762B (en) Data message transmission method and device
CN110971498A (en)Communication method, communication device, electronic apparatus, and storage medium
CN118764464B (en)Data transmission method, device and equipment based on cloud network
CN112702338B (en)IKE message acquisition method and device
CN112272134B (en)IPSec tunnel establishment method and device, branch equipment and center-end equipment
CN113645283A (en)Multilink communication method, device, storage medium and electronic equipment
CN112653716B (en) Method and device for service binding
CN113542431A (en) Information processing method, device, electronic device and storage medium
CN112398754A (en)Data transmission method, device, medium, electronic equipment and network access equipment
US20240244040A1 (en)Communication based on relay cluster
CN115665047A (en)Message transmission control method, device, medium and equipment
CN113114565B (en)Data message forwarding method and device, storage medium and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp