技术领域technical field
本发明涉及分布式数据处理技术领域,尤其涉及的是基于SCTP-CMT的分布式系统并行访问方法及系统。The present invention relates to the technical field of distributed data processing, in particular to a distributed system parallel access method and system based on SCTP-CMT.
背景技术Background technique
分布式数据处理是实现云计算和大数据技术的基础。目前分布式存储系统如DAS(即Direct-Attached Storage,简称DAS,开放系统的直连式存储)、SAN(即Storage AreaNetwork,简称SAN,存储区域网络)、对象存储以及分布式文件系统等,一般为用户提供网络接口进行数据访问,用户通过TCP(即Transmission Control Protocol ,传输控制协议)或UDP(UDP 是User Datagram Protocol的简称,中文名是用户数据报协议)方式访问分布式系统的不同节点,分别与不同节点进行通信。Distributed data processing is the basis for realizing cloud computing and big data technology. At present, distributed storage systems such as DAS (Direct-Attached Storage, DAS for short, open system direct-attached storage), SAN (Storage AreaNetwork, SAN for short), object storage and distributed file systems, etc., generally Provide users with a network interface for data access. Users access different nodes of the distributed system through TCP (Transmission Control Protocol, Transmission Control Protocol) or UDP (UDP is the abbreviation of User Datagram Protocol, and the Chinese name is User Datagram Protocol). Communicate with different nodes respectively.
若数据分布在不同节点时,目前用户只能一对一访问各个节点上传或下载数据,比如P2P下载方式。用户采用TCP协议进行数据传输,需建立多个连接,耗费CPU资源;采用UDP协议又不能保证传输的稳定性。目前,MPTCP(即全称Multipath TCP,多径TCP)和SCTP(即Stream Control Transmission Protocol的缩写,流控制传输协议)协议支持多流和多宿主特性,MPTCP(即Multipath TCP,多径TCP)和SCTP-CMT(CMT,即Concurrent MultipathTransfer的缩写,多路径并行传输)可进行多路径并行传输。MPTCP可建立多个TCP子流进行通信,但每个TCP子流的建立都需要双方地址进行握手,当通信频繁时会造成大量延时,且不利于分布式系统面向用户的虚拟化实现。SCTP可以通过一次协商建立多个地址之间的多路径传输,但要实现对分布式系统的统一访问还需进行改进。If the data is distributed in different nodes, currently users can only access each node one-to-one to upload or download data, such as P2P downloading. The user uses the TCP protocol for data transmission, and needs to establish multiple connections, which consumes CPU resources; the UDP protocol cannot guarantee the stability of the transmission. Currently, MPTCP (full name Multipath TCP, multipath TCP) and SCTP (that is, the abbreviation of Stream Control Transmission Protocol, Stream Control Transmission Protocol) protocols support multi-stream and multi-homing features, MPTCP (ie Multipath TCP, multipath TCP) and SCTP -CMT (CMT, the abbreviation of Concurrent MultipathTransfer, multipath parallel transmission) can perform multipath parallel transmission. MPTCP can establish multiple TCP sub-flows for communication, but the establishment of each TCP sub-flow requires a handshake between the addresses of both parties. When the communication is frequent, it will cause a lot of delay, and it is not conducive to the user-oriented virtualization of distributed systems. SCTP can establish multi-path transmission between multiple addresses through one negotiation, but it needs to be improved to achieve unified access to distributed systems.
因此,现有技术还有待于改进和发展。Therefore, the prior art still needs to be improved and developed.
发明内容Contents of the invention
鉴于上述现有技术的不足之处,本发明的目的在于提供基于SCTP-CMT的分布式系统并行访问方法及系统,旨在解决如何通过一个连接同时访问分布式系统多个不同节点,达到应用SCTP-CMT实现对分布式系统的并行访问,加快数据访问的速度,充分利用分布式系统中各个节点的带宽进行数据上传下载,促进分布式系统和云计算技术的发展。In view of the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a distributed system parallel access method and system based on SCTP-CMT, aiming to solve how to access multiple different nodes of the distributed system at the same time through one connection, so as to achieve the goal of applying SCTP -CMT realizes parallel access to distributed systems, speeds up data access, makes full use of the bandwidth of each node in the distributed system to upload and download data, and promotes the development of distributed systems and cloud computing technology.
为了达到上述目的,本发明解决技术问题所采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the present invention to solve technical problems is as follows:
基于SCTP-CMT的分布式系统并行访问方法,包括以下步骤:The distributed system parallel access method based on SCTP-CMT comprises the following steps:
A、在空闲状态下,代理服务器与系统各个节点定时进行消息通信;A. In the idle state, the proxy server regularly communicates with each node of the system;
B、当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接;B. When it is necessary to access each node of the system, the SCTP-CMT client establishes a sub-flow communication connection with each node of the system through the proxy server;
C、所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接与系统各个节点同时进行通信;C. After the sub-stream communication connection is established, the SCTP-CMT client communicates with each node of the system simultaneously through the sub-stream communication connection;
D、当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接。D. When it is no longer necessary to access each node of the system, the SCTP-CMT client closes the substream communication connection with each node of the system through the proxy server.
所述的基于SCTP-CMT的分布式系统并行访问方法,其中,所述的步骤A具体包括:Described SCTP-CMT-based distributed system parallel access method, wherein, described step A specifically includes:
A1、在空闲状态下,代理服务器定时向系统各个节点发送包含有流号码的心跳报文;A1. In the idle state, the proxy server regularly sends heartbeat messages containing flow numbers to each node of the system;
A2、系统各个节点对心跳报文进行应答,应答报文中包含有需传递给SCTP-CMT客户端的客户端初始化参数。A2. Each node of the system responds to the heartbeat message, and the response message contains client initialization parameters that need to be passed to the SCTP-CMT client.
所述的基于SCTP-CMT的分布式系统并行访问方法,其中,所述的步骤B具体包括:Described SCTP-CMT-based distributed system parallel access method, wherein, described step B specifically comprises:
B1、代理服务器接收SCTP-CMT客户端发送的初始化报文及IP地址、验证标签、初始传输序列号值,并用初始化应答报文进行回应,将系统各个节点IP地址作为目的组地址、及客户端初始化参数发送给SCTP-CMT客户端;B1. The proxy server receives the initialization message sent by the SCTP-CMT client and the IP address, verification label, and initial transmission sequence number value, and responds with an initialization response message, using the IP address of each node in the system as the destination group address, and the client The initialization parameters are sent to the SCTP-CMT client;
B2、代理服务器接收SCTP-CMT客户端发送的用户身份信息回应报文确认信息,并将SCTP-CMT客户端的节点初始化参数采用组播方式发送给系统各个节点;B2, the proxy server receives the user identity information response message confirmation information sent by the SCTP-CMT client, and sends the node initialization parameters of the SCTP-CMT client to each node of the system in a multicast manner;
B3、在系统各个节点应答组播的节点初始化参数报文后,代理服务器通过用户身份信息应答报文回应SCTP-CMT客户端;B3, after each node of the system responds to the node initialization parameter message of the multicast, the proxy server responds to the SCTP-CMT client by the user identity information response message;
B4、系统各个节点应用SCTP-CMT客户端的节点初始化参数信息配置环境,并设置SCTP状态机的状态为连接建立。B4. Each node of the system applies the node initialization parameter information configuration environment of the SCTP-CMT client, and sets the state of the SCTP state machine as connection establishment.
所述的基于SCTP-CMT的分布式系统并行访问方法,其中,所述的节点初始化参数包括IP地址、初始传输序列号值、用户子流接收窗大小、验证标签以及代理服务器验证标签。In the SCTP-CMT-based distributed system parallel access method, wherein, the node initialization parameters include IP address, initial transmission sequence number value, user substream receiving window size, authentication label and proxy server authentication label.
所述的基于SCTP-CMT的分布式系统并行访问方法,其中,所述的步骤D具体包括:The described distributed system parallel access method based on SCTP-CMT, wherein, described step D specifically comprises:
D1、代理服务器接收SCTP-CMT客户端发送的连接断开报文启动关闭通信连接,并向系统各个节点组播连接断开报文;D1, the proxy server receives the connection disconnection message sent by the SCTP-CMT client, starts and closes the communication connection, and multicasts the connection disconnection message to each node of the system;
D2、系统各个节点发送连接断开应答报文、结束流连接并设置SCTP状态机状态为连接关闭;D2. Each node of the system sends a connection disconnection response message, ends the stream connection and sets the state of the SCTP state machine as connection closed;
D3、代理服务器向SCTP-CMT客户端回应连接断开应答报文、并接收SCTP-CMT客户端发送的连接断开完成报文结束关联。D3. The proxy server responds to the SCTP-CMT client with a connection disconnection response message, and receives a connection disconnection completion message sent by the SCTP-CMT client to end the association.
基于SCTP-CMT的分布式系统并行访问系统,包括:Distributed system parallel access system based on SCTP-CMT, including:
代理服务器与节点通信模块,用于在空闲状态下,代理服务器与系统各个节点定时进行消息通信;Proxy server and node communication module, used for in the idle state, the proxy server and each node of the system regularly carry out message communication;
通信连接建立模块,用于当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接;The communication connection establishment module is used to establish a subflow communication connection with each node of the system through the proxy server when the SCTP-CMT client needs to visit each node of the system;
SCTP-CMT客户端与节点通信模块,用于所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接同时访问系统各个节点,与系统各个节点同时进行通信;The SCTP-CMT client and the node communication module are used for after the sub-stream communication connection is established, the SCTP-CMT client accesses each node of the system simultaneously through the sub-stream communication connection, and communicates with each node of the system simultaneously;
通信连接关闭模块,用于当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接。The communication connection closing module is used for closing the sub-flow communication connection with each node of the system through the proxy server when the SCTP-CMT client no longer needs to visit each node of the system.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的代理服务器与节点通信模块包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described proxy server and node communication module include:
心跳报文发送单元,用于在空闲状态下,代理服务器定时向系统各个节点发送包含有流号码的心跳报文;The heartbeat message sending unit is used to send the heartbeat message containing the flow number to each node of the system regularly by the proxy server in an idle state;
心跳报文应答单元,用于系统各个节点对心跳报文进行应答,应答报文中包含有需传递给SCTP-CMT客户端的客户端初始化参数。The heartbeat message response unit is used for each node of the system to respond to the heartbeat message, and the response message contains client initialization parameters that need to be transmitted to the SCTP-CMT client.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的通信连接建立模块包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described communication connection establishment module comprises:
初始化报文发送及应答单元,用于代理服务器接收SCTP-CMT客户端发送的初始化报文及IP地址、验证标签、初始传输序列号值,并用初始化应答报文进行回应,将系统各个节点IP地址作为目的组地址、及客户端初始化参数发送给SCTP-CMT客户端;The initialization message sending and response unit is used for the proxy server to receive the initialization message and IP address, verification label, and initial transmission serial number value sent by the SCTP-CMT client, and respond with the initialization response message, and send the IP address of each node of the system to Send it to the SCTP-CMT client as the destination group address and client initialization parameters;
节点初始化参数组播单元,用于代理服务器接收SCTP-CMT客户端发送的用户身份信息回应报文确认信息,并将SCTP-CMT客户端的节点初始化参数采用组播方式发送给系统各个节点;The node initialization parameter multicast unit is used for the proxy server to receive the user identity information response message confirmation information sent by the SCTP-CMT client, and the node initialization parameters of the SCTP-CMT client are sent to each node of the system in a multicast manner;
用户身份信息应答单元,用于在系统各个节点应答组播的节点初始化参数报文后,代理服务器通过用户身份信息应答报文回应SCTP-CMT客户端;The user identity information response unit is used to respond to the SCTP-CMT client by the user identity information response message after each node of the system responds to the multicast node initialization parameter message;
通信连接建立单元,用于系统各个节点应用SCTP-CMT客户端的节点初始化参数信息配置环境,并设置SCTP状态机的状态为连接建立。The communication connection establishment unit is used for each node of the system to apply the node initialization parameter information configuration environment of the SCTP-CMT client, and set the state of the SCTP state machine as connection establishment.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的节点初始化参数包括IP地址、初始传输序列号值、用户子流接收窗大小、验证标签以及代理服务器验证标签。In the SCTP-CMT-based distributed system parallel access system, the node initialization parameters include IP address, initial transmission sequence number value, user sub-stream receiving window size, authentication label and proxy server authentication label.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的通信连接关闭模块包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described communication connection closing module comprises:
连接断开启动单元,用于代理服务器接收SCTP-CMT客户端发送的连接断开报文启动关闭通信连接,并向系统各个节点组播连接断开报文;The connection disconnection starting unit is used for the proxy server to receive the connection disconnection message sent by the SCTP-CMT client to start and close the communication connection, and to multicast the connection disconnection message to each node of the system;
节点连接关闭单元,用于系统各个节点发送连接断开应答报文、结束流连接并设置SCTP状态机状态为连接关闭;The node connection closing unit is used for each node of the system to send a connection disconnection response message, end the stream connection and set the state of the SCTP state machine to be connection closed;
连接断开完成单元,用于代理服务器向SCTP-CMT客户端回应连接断开应答报文、并接收SCTP-CMT客户端发送的连接断开完成报文结束关联。The connection disconnection completion unit is used for the proxy server to respond to the SCTP-CMT client with a connection disconnection response message, and to receive the connection disconnection completion message sent by the SCTP-CMT client to end the association.
有益效果:相较于现有技术,本发明提供的基于SCTP-CMT的分布式系统并行访问方法及系统,所述方法包括:A、在空闲状态下,代理服务器与系统各个节点定时进行消息通信;B、当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接;C、所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接与系统各个节点同时进行通信;D、当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接。应用SCTP-CMT实现对分布式系统的并行访问,用户的SCTP-CMT客户端无需改动,用户通过SCTP标准的四次握手即可与分布式系统的各个节点建立连接,通过SCTP标准的三次握手即可结束连接,充分利用分布式系统中各个节点的带宽进行数据上传下载,节省了连接时间,可加快数据访问的速度,加快了传输效率,促进分布式系统和云计算技术的发展。Beneficial effects: Compared with the prior art, the SCTP-CMT-based distributed system parallel access method and system provided by the present invention, the method includes: A. In the idle state, the proxy server communicates with each node of the system at regular intervals ; B. When each node of the system needs to be accessed, the SCTP-CMT client establishes a sub-flow communication connection with each node of the system through a proxy server; after C, the sub-flow communication connection is established, the SCTP-CMT client passes the sub-flow communication Connect and communicate with each node of the system at the same time; D. When it is no longer necessary to visit each node of the system, the SCTP-CMT client closes the sub-stream communication connection with each node of the system through the proxy server. Apply SCTP-CMT to achieve parallel access to the distributed system. The user's SCTP-CMT client does not need to be changed. The user can establish a connection with each node of the distributed system through the four-way handshake of the SCTP standard, and the three-way handshake of the SCTP standard. It can end the connection, make full use of the bandwidth of each node in the distributed system to upload and download data, save connection time, speed up data access, speed up transmission efficiency, and promote the development of distributed systems and cloud computing technology.
附图说明Description of drawings
图1为本发明提供的基于SCTP-CMT的分布式系统并行访问方法较佳实施例的流程图。FIG. 1 is a flow chart of a preferred embodiment of an SCTP-CMT-based distributed system parallel access method provided by the present invention.
图2为本发明提供的基于SCTP-CMT的分布式系统并行访问方法中节点SCTP-CMT状态转移过程。FIG. 2 is a node SCTP-CMT state transition process in the SCTP-CMT-based distributed system parallel access method provided by the present invention.
图3为本发明提供的基于SCTP-CMT的分布式系统并行访问方法中代理服务器SCTP-CMT状态转移过程。Fig. 3 is a proxy server SCTP-CMT state transfer process in the SCTP-CMT-based distributed system parallel access method provided by the present invention.
图4为本发明提供的基于SCTP-CMT的分布式系统并行访问系统较佳实施例功能模块图。Fig. 4 is a functional block diagram of a preferred embodiment of the SCTP-CMT-based distributed system parallel access system provided by the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention more clear and definite, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
请参见图1,图1是本发明提供的基于SCTP-CMT的分布式系统并行访问方法较佳实施例流程图,包括步骤:Please refer to Fig. 1, Fig. 1 is the flow chart of a preferred embodiment of the distributed system parallel access method based on SCTP-CMT provided by the present invention, including steps:
S100、在空闲状态下,代理服务器与系统各个节点定时进行消息通信;S100. In the idle state, the proxy server regularly communicates with each node of the system;
所述的步骤S100具体包括:Described step S100 specifically comprises:
S110、在空闲状态下,代理服务器定时向系统各个节点发送包含有流号码的心跳报文;S110. In the idle state, the proxy server regularly sends a heartbeat message containing the flow number to each node of the system;
S120、系统各个节点对心跳报文进行应答,应答报文中包含有需传递给SCTP-CMT客户端的客户端初始化参数。S120. Each node of the system responds to the heartbeat message, and the response message includes client initialization parameters to be delivered to the SCTP-CMT client.
具体实施时,分布式系统由代理服务器和多个节点组成。在空闲状态下,代理服务器定时向分布式系统的各个节点发送心跳报文,心跳报文中包含了流号码;分布式系统的各个节点对心跳报文进行应答,应答报文中包含了需传递给用户的SCTP-CMT客户端的初始化参数:IP地址、端口号、初始TSN值、初始接收窗大小,其中,TSN即Transmission SequenceNumber,传输序列号,TSN保证数据传输中整个关联的可靠性,初始TSN值,即初始传输序列号值。代理服务器可通过可靠组播协议如RMP、SRM、RMTP等向节点发布消息。During specific implementation, the distributed system consists of a proxy server and multiple nodes. In the idle state, the proxy server regularly sends heartbeat messages to each node in the distributed system, and the heartbeat message contains the flow number; each node in the distributed system responds to the heartbeat message, and the response message contains the Initialization parameters of the SCTP-CMT client for users: IP address, port number, initial TSN value, initial receiving window size, where TSN is Transmission SequenceNumber, transmission sequence number, TSN guarantees the reliability of the entire association in data transmission, initial TSN value, which is the initial transfer sequence number value. The proxy server can publish messages to nodes through reliable multicast protocols such as RMP, SRM, RMTP, etc.
S200 、当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接;S200. When it is necessary to access each node of the system, the SCTP-CMT client establishes a subflow communication connection with each node of the system through the proxy server;
所述的步骤S200具体包括:Described step S200 specifically comprises:
S210、代理服务器接收用户端的SCTP-CMT客户端发送的初始化报文及IP地址、验证标签、初始传输序列号值,并用初始化应答报文进行回应,将系统各个节点IP地址作为目的组地址、及客户端初始化参数发送给SCTP-CMT客户端;S210, the proxy server receives the initialization message sent by the SCTP-CMT client of the user end, the IP address, the verification label, and the value of the initial transmission sequence number, and responds with an initialization response message, using the IP address of each node in the system as the destination group address, and The client initialization parameters are sent to the SCTP-CMT client;
S220、代理服务器接收SCTP-CMT客户端发送的用户身份信息回应报文确认信息,并将SCTP-CMT客户端的节点初始化参数采用组播方式发送给系统各个节点;S220, the proxy server receives the user identity information response message confirmation information sent by the SCTP-CMT client, and sends the node initialization parameters of the SCTP-CMT client to each node of the system in a multicast manner;
其中,所述的节点初始化参数包括IP地址、初始传输序列号值、用户子流接收窗大小、验证标签以及代理服务器验证标签。Wherein, the node initialization parameters include IP address, initial transmission sequence number value, user sub-stream receiving window size, verification label and proxy server verification label.
S230、在系统各个节点应答组播的节点初始化参数报文后,代理服务器通过用户身份信息应答报文回应SCTP-CMT客户端;S230. After each node of the system responds to the multicast node initialization parameter message, the proxy server responds to the SCTP-CMT client through the user identity information response message;
S240、系统各个节点应用SCTP-CMT客户端的节点初始化参数信息配置环境,并设置SCTP状态机的状态为连接建立。S240. Each node of the system uses the node initialization parameter information configuration environment of the SCTP-CMT client, and sets the state of the SCTP state machine as connection establishment.
具体来说,实施时,用户应用SCTP-CMT客户端向代理服务器发送INIT报文(INTI,即Initiation,初始化,开始)发起一个连接,向代理服务器发送SCTP-CMT客户端的IP地址、验证标签、初始TSN值(即初始传输序列号值)。代理服务器用INIT-ACK(ACK,即Acknowledgement,应答,确认,INIT-ACK,即初始化应答)报文进行回应,将分布式系统的节点IP地址作为目的组地址,以及初始TSN值、端口号、初始接收窗大小发送给用户端的SCTP-CMT客户端。Specifically, during implementation, the user uses the SCTP-CMT client to send an INIT message (INTI, namely Initiation, initialization, start) to the proxy server to initiate a connection, and sends the IP address of the SCTP-CMT client, the authentication label, Initial TSN value (i.e. initial transmission sequence number value). The proxy server responds with an INIT-ACK (ACK, that is, Acknowledgment, response, confirmation, INIT-ACK, that is, initialization response) message, and uses the node IP address of the distributed system as the destination group address, and the initial TSN value, port number, The initial receive window size is sent to the SCTP-CMT client on the client side.
通过用户端的SCTP-CMT客户端向代理服务器发送COOKIE-ECHO(即用户身份信息回应)报文确认信息,代理服务器将用户的IP地址、初始TSN值、用户子流接收窗大小、验证标签以及代理服务器验证标签采用组播方式发送给各个节点;各个节点回应后,即在系统各个节点应答组播的节点初始化参数报文后,代理服务器用COOKIE-ACK(即用户身份信息应答)报文回应用户端。各个节点应用用户(即SCTP-CMT客户端)信息配置环境,并设置SCTP状态机的状态为ESTABLISHED(即连接建立),实现SCTP-CMT客户端与系统各个节点建立子流通信连接。The SCTP-CMT client on the user side sends a COOKIE-ECHO (user identity information response) message confirmation message to the proxy server, and the proxy server sends the user's IP address, initial TSN value, user substream receiving window size, verification label, and proxy The server verification label is sent to each node in multicast mode; after each node responds, that is, after each node in the system responds to the multicast node initialization parameter message, the proxy server responds to the user with a COOKIE-ACK (ie user identity information response) message end. Each node applies user (SCTP-CMT client) information to configure the environment, and sets the state of the SCTP state machine to ESTABLISHED (ie, connection establishment), so as to realize the establishment of sub-flow communication connections between the SCTP-CMT client and each node of the system.
S300、所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接与系统各个节点同时进行通信;S300. After the sub-stream communication connection is established, the SCTP-CMT client communicates with each node of the system simultaneously through the sub-stream communication connection;
即SCTP-CMT客户端通过子流通信连接同时访问系统各个节点,与系统各个节点同时进行通信,具体来说,用户端通过SCTP-CMT协议与多个节点同时进行通信,每个子流连接一个节点,实现通过一个连接同时访问分布式系统多个不同节点。That is, the SCTP-CMT client accesses each node of the system at the same time through the sub-flow communication connection, and communicates with each node of the system at the same time. Specifically, the client communicates with multiple nodes at the same time through the SCTP-CMT protocol, and each sub-flow connects to a node , realize simultaneous access to multiple different nodes of the distributed system through one connection.
S400、当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接。S400. When it is no longer necessary to access each node of the system, the SCTP-CMT client closes the substream communication connection with each node of the system through the proxy server.
所述的步骤S400具体包括:The step S400 specifically includes:
S410、代理服务器接收SCTP-CMT客户端发送的连接断开报文启动关闭通信连接,并向系统各个节点组播连接断开报文;S410, the proxy server receives the connection disconnection message sent by the SCTP-CMT client, starts and closes the communication connection, and multicasts the connection disconnection message to each node of the system;
S420、系统各个节点发送连接断开应答报文、结束流连接并设置SCTP状态机状态为连接关闭;S420, each node of the system sends a connection disconnection response message, ends the stream connection and sets the state of the SCTP state machine as connection closed;
S430、代理服务器向SCTP-CMT客户端回应连接断开应答报文、并接收SCTP-CMT客户端发送的连接断开完成报文结束关联。S430. The proxy server responds to the SCTP-CMT client with a connection disconnection response message, and receives a connection disconnection complete message sent by the SCTP-CMT client to end the association.
具体实施时,用户端的SCTP-CMT客户端向代理服务器发送SHUTDOWN(即连接断开)报文启动关闭通信连接,代理服务器向系统各个节点组播SHUTDOWN报文,各个节点回应组播报文即系统各个节点发送连接断开应答报文、结束流连接并设置状态为CLOSED(即连接关闭)。代理服务器向用户端的SCTP-CMT客户端回应SHUTDOWN-ACK(即连接断开应答)报文,接收用户端的SCTP-CMT客户端返回的SHUTDOWN-COMPLETE(连接断开完成)报文结束关联。During the specific implementation, the SCTP-CMT client on the client side sends a SHUTDOWN message to the proxy server to start and close the communication connection. Each node sends a connection disconnect response message, ends the stream connection and sets the state to CLOSED (that is, the connection is closed). The proxy server responds with a SHUTDOWN-ACK (connection disconnection response) message to the SCTP-CMT client on the user end, and receives the SHUTDOWN-COMPLETE (connection disconnection complete) message returned by the SCTP-CMT client on the user end to end the association.
在本发明技术方案中,为满足系统需要,在SCTP状态机基础上,对代理服务器和节点的SCTP状态机进行修改,具体修改过程请参阅图2和图3。In the technical solution of the present invention, in order to meet the needs of the system, on the basis of the SCTP state machine, the SCTP state machine of the proxy server and the node is modified. Please refer to FIG. 2 and FIG. 3 for the specific modification process.
图2为本发明提供的基于SCTP-CMT的分布式系统并行访问方法中节点SCTP-CMT状态转移过程,具体如下:Fig. 2 is the node SCTP-CMT state transfer process in the distributed system parallel access method based on SCTP-CMT provided by the present invention, specifically as follows:
1.连接关闭;1. The connection is closed;
SCTP状态机在连接关闭状态(即CLOSED时),接收到代理服务器发送的SCTP-CMT客户端的节点初始化参数后,发送节点初始化参数应答,并设置SCTP状态机的状态为ESTABLISHED(即连接建立)。When the SCTP state machine is in the connection closed state (that is, when CLOSED), after receiving the node initialization parameters of the SCTP-CMT client sent by the proxy server, it sends a node initialization parameter response and sets the state of the SCTP state machine to ESTABLISHED (that is, the connection is established).
2.连接建立;2. Connection establishment;
接收节点连接断开。The receiving node is disconnected.
3.收到连接断开;3. Receive disconnection;
当接收到代理服务器向系统各个节点组播的SHUTDOWN(即节点连接断开)报文时,各个节点回应组播报文、即发送节点连接断开应答,结束流连接并设置状态为CLOSED(即连接关闭)。发送节点连接断开应答,连接关闭。When receiving the SHUTDOWN message that the proxy server multicasts to each node of the system (that is, the node connection is disconnected), each node responds to the multicast message, that is, sends the node connection disconnection response, ends the stream connection and sets the state to CLOSED (that is, connection closed). The sending node disconnects the response and the connection is closed.
图3为本发明提供的基于SCTP-CMT的分布式系统并行访问方法中代理服务器SCTP-CMT状态转移过程,具体如下:Fig. 3 is the proxy server SCTP-CMT state transfer process in the distributed system parallel access method based on SCTP-CMT that the present invention provides, specifically as follows:
11.连接关闭状态;11. The connection is closed;
代理服务器SCTP状态机在连接关闭状态(即CLOSED)时,接收用户端的SCTP-CMT客户端发送的初始化报文,并向客户端发送初始化应答报文进行回应。When the SCTP state machine of the proxy server is in the connection closed state (that is, CLOSED), it receives the initialization message sent by the SCTP-CMT client at the user end, and sends an initialization response message to the client as a response.
12.等待客户端身份信息回应;12. Wait for the client identity information response;
在接收客户端身份信息回应后,转为收到客户端身份信息回应。After receiving the client identity information response, switch to receiving the client identity information response.
13.收到客户端身份信息回应;13. Receipt of client identity information response;
向节点发送节点初始化信息,转为等待节点应答。Send node initialization information to the node, and wait for the node to reply.
14. 等待节点应答;14. Wait for the node to reply;
接收节点初始化应答,转为连接建立。The receiving node initializes the response and turns to connection establishment.
15.连接建立;15. Connection establishment;
接收连接断开,并向节点发送节点连接断开。Receive connection disconnected and send node disconnected.
16.接收连接断开;16. The receiving connection is disconnected;
接收节点连接断开应答,向客户端发送连接断开应答。Receive the node connection disconnection response, and send the connection disconnection response to the client.
17.发送连接断开应答;17. Send a connection disconnect response;
接收连接断开完成,转为连接关闭。Receive connection disconnection complete, transfer to connection close.
总之,本发明技术方案应用SCTP-CMT实现对分布式系统的并行访问,可加快数据访问的速度,充分利用分布式系统中各个节点的带宽进行数据上传下载,促进分布式系统和云计算技术的发展。用户的SCTP-CMT客户端无需改动,用户通过SCTP标准的四次握手即可与分布式系统的各个节点建立连接,通过SCTP标准的三次握手即可结束连接,节省了连接时间,加快了传输效率。In short, the technical scheme of the present invention uses SCTP-CMT to realize parallel access to distributed systems, which can speed up data access, make full use of the bandwidth of each node in the distributed system to upload and download data, and promote the development of distributed systems and cloud computing technologies. develop. The user's SCTP-CMT client does not need to be changed. The user can establish a connection with each node of the distributed system through the four-way handshake of the SCTP standard, and end the connection through the three-way handshake of the SCTP standard, which saves connection time and speeds up the transmission efficiency. .
请参见图4,图4是本发明提供的基于SCTP-CMT的分布式系统并行访问系统的系统较佳实施例功能模块图,包括:Please refer to Fig. 4, Fig. 4 is the system preferred embodiment functional block diagram of the distributed system parallel access system based on SCTP-CMT provided by the present invention, including:
代理服务器与节点通信模块10,用于在空闲状态下,代理服务器与系统各个节点定时进行消息通信,具体如上所述;Proxy server and node communication module 10, for in idle state, proxy server and each node of system regularly carry out message communication, specifically as mentioned above;
通信连接建立模块20,用于当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接,具体如上所述;The communication connection establishment module 20 is used for when each node of the system needs to be accessed, the SCTP-CMT client establishes a sub-flow communication connection with each node of the system through a proxy server, specifically as described above;
SCTP-CMT客户端与节点通信模块30,用于所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接与系统各个节点同时进行通信,具体如上所述;SCTP-CMT client and node communication module 30, after the described sub-stream communication connection is established, the SCTP-CMT client communicates with each node of the system simultaneously through the sub-stream communication connection, specifically as described above;
通信连接关闭模块40,用于当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接,具体如上所述。The communication connection closing module 40 is configured to close the sub-flow communication connection with each node of the system through the proxy server when the SCTP-CMT client no longer needs to visit each node of the system, specifically as described above.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的代理服务器与节点通信模块10包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described proxy server and node communication module 10 comprise:
心跳报文发送单元,用于在空闲状态下,代理服务器定时向系统各个节点发送包含有流号码的心跳报文,具体如上所述;The heartbeat message sending unit is used to send the heartbeat message containing the flow number to each node of the system regularly by the proxy server in an idle state, as specifically described above;
心跳报文应答单元,用于系统各个节点对心跳报文进行应答,应答报文中包含有需传递给SCTP-CMT客户端的客户端初始化参数,具体如上所述。The heartbeat message response unit is used for each node of the system to respond to the heartbeat message. The response message contains client initialization parameters that need to be passed to the SCTP-CMT client, as described above.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的通信连接建立模块20包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described communication connection establishment module 20 comprises:
初始化报文发送及应答单元,用于代理服务器接收SCTP-CMT客户端发送的初始化报文及IP地址、验证标签、初始传输序列号值,并用初始化应答报文进行回应,将系统各个节点IP地址作为目的组地址、及客户端初始化参数发送给SCTP-CMT客户端,具体如上所述;The initialization message sending and response unit is used for the proxy server to receive the initialization message and IP address, verification label, and initial transmission serial number value sent by the SCTP-CMT client, and respond with the initialization response message, and send the IP address of each node of the system to Send it to the SCTP-CMT client as the destination group address and client initialization parameters, as described above;
节点初始化参数组播单元,用于代理服务器接收SCTP-CMT客户端发送的用户身份信息回应报文确认信息,并将SCTP-CMT客户端的节点初始化参数采用组播方式发送给系统各个节点,具体如上所述;The node initialization parameter multicast unit is used for the proxy server to receive the user identity information response message confirmation information sent by the SCTP-CMT client, and send the node initialization parameters of the SCTP-CMT client to each node of the system in multicast mode, as above said;
用户身份信息应答单元,用于在系统各个节点应答组播的节点初始化参数报文后,代理服务器通过用户身份信息应答报文回应SCTP-CMT客户端,具体如上所述;The user identity information response unit is used to respond to the SCTP-CMT client by the user identity information response message after each node of the system responds to the multicast node initialization parameter message, as specifically described above;
通信连接建立单元,用于系统各个节点应用SCTP-CMT客户端的节点初始化参数信息配置环境,并设置SCTP状态机的状态为连接建立,具体如上所述。The communication connection establishment unit is used for each node of the system to apply the node initialization parameter information configuration environment of the SCTP-CMT client, and set the state of the SCTP state machine as connection establishment, specifically as described above.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的节点初始化参数包括IP地址、初始传输序列号值、用户子流接收窗大小、验证标签以及代理服务器验证标签,具体如上所述。The SCTP-CMT-based distributed system parallel access system, wherein the node initialization parameters include IP address, initial transmission sequence number value, user sub-stream receiving window size, verification label and proxy server verification label, specifically as above mentioned.
所述的基于SCTP-CMT的分布式系统并行访问系统,其中,所述的通信连接关闭模块40包括:Described distributed system parallel access system based on SCTP-CMT, wherein, described communication connection closing module 40 comprises:
连接断开启动单元,用于代理服务器接收SCTP-CMT客户端发送的连接断开报文启动关闭通信连接,并向系统各个节点组播连接断开报文,具体如上所述;The connection disconnection start unit is used for the proxy server to receive the connection disconnection message sent by the SCTP-CMT client to start and close the communication connection, and to multicast the connection disconnection message to each node of the system, as specifically described above;
节点连接关闭单元,用于系统各个节点发送连接断开应答报文、结束流连接并设置SCTP状态机状态为连接关闭,具体如上所述;The node connection closing unit is used for each node of the system to send a connection disconnection response message, end the stream connection and set the state of the SCTP state machine as connection closing, specifically as described above;
连接断开完成单元,用于代理服务器向SCTP-CMT客户端回应连接断开应答报文、并接收SCTP-CMT客户端发送的连接断开完成报文结束关联,具体如上所述。The connection disconnection completion unit is used for the proxy server to respond to the SCTP-CMT client with a connection disconnection response message, and receive the connection disconnection completion message sent by the SCTP-CMT client to end the association, specifically as described above.
综上所述,本发明所提供的基于SCTP-CMT的分布式系统并行访问方法及系统,所述方法包括:A、在空闲状态下,代理服务器与系统各个节点定时进行消息通信;B、当需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器与系统各个节点建立子流通信连接;C、所述的子流通信连接建立后,SCTP-CMT客户端通过子流通信连接与系统各个节点同时进行通信;D、当不再需要访问系统各个节点时,SCTP-CMT客户端通过代理服务器关闭与系统各个节点的子流通信连接。应用SCTP-CMT实现对分布式系统的并行访问,用户的SCTP-CMT客户端无需改动,用户通过SCTP标准的四次握手即可与分布式系统的各个节点建立连接,通过SCTP标准的三次握手即可结束连接,充分利用分布式系统中各个节点的带宽进行数据上传下载,节省了连接时间,可加快数据访问的速度,加快了传输效率,促进分布式系统和云计算技术的发展。In summary, the distributed system parallel access method and system based on SCTP-CMT provided by the present invention, said method includes: A, in the idle state, the proxy server regularly carries out message communication with each node of the system; B, when When needing to visit each node of the system, the SCTP-CMT client establishes a sub-flow communication connection with each node of the system through a proxy server; The nodes communicate at the same time; D. When it is no longer necessary to visit each node of the system, the SCTP-CMT client closes the sub-stream communication connection with each node of the system through the proxy server. Apply SCTP-CMT to achieve parallel access to the distributed system. The user's SCTP-CMT client does not need to be changed. The user can establish a connection with each node of the distributed system through the four-way handshake of the SCTP standard, and the three-way handshake of the SCTP standard. It can end the connection, make full use of the bandwidth of each node in the distributed system to upload and download data, save connection time, speed up data access, speed up transmission efficiency, and promote the development of distributed systems and cloud computing technology.
当然,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件(如处理器,控制器等)来完成,所述的程序可存储于一计算机可读取的存储介质中,该程序在执行时可包括如上述各方法实施例的流程。其中所述的存储介质可为存储器、磁碟、光盘等。Of course, those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized by instructing related hardware (such as processors, controllers, etc.) through computer programs, and the programs can be stored in a In the computer-readable storage medium, the program may include the processes of the above-mentioned method embodiments when executed. The storage medium mentioned herein may be a memory, a magnetic disk, an optical disk, and the like.
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610907670.0ACN106549946B (en) | 2016-10-19 | 2016-10-19 | Distributed system parallel access method and system based on SCTP-CMT |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610907670.0ACN106549946B (en) | 2016-10-19 | 2016-10-19 | Distributed system parallel access method and system based on SCTP-CMT |
| Publication Number | Publication Date |
|---|---|
| CN106549946Atrue CN106549946A (en) | 2017-03-29 |
| CN106549946B CN106549946B (en) | 2019-06-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610907670.0AExpired - Fee RelatedCN106549946B (en) | 2016-10-19 | 2016-10-19 | Distributed system parallel access method and system based on SCTP-CMT |
| Country | Link |
|---|---|
| CN (1) | CN106549946B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102546106A (en)* | 2011-12-28 | 2012-07-04 | 南京邮电大学 | Multipath parallel transmission method facing satellite network |
| CN104333512A (en)* | 2014-10-30 | 2015-02-04 | 北京思特奇信息技术股份有限公司 | Distributed memory database access system and method |
| CN105490933A (en)* | 2015-12-28 | 2016-04-13 | 中国电子科技集团公司第五十四研究所 | MPTCP path management method based on multi-path transmission protocol and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102546106A (en)* | 2011-12-28 | 2012-07-04 | 南京邮电大学 | Multipath parallel transmission method facing satellite network |
| CN104333512A (en)* | 2014-10-30 | 2015-02-04 | 北京思特奇信息技术股份有限公司 | Distributed memory database access system and method |
| CN105490933A (en)* | 2015-12-28 | 2016-04-13 | 中国电子科技集团公司第五十四研究所 | MPTCP path management method based on multi-path transmission protocol and device |
| Title |
|---|
| 彭梅: "基于SCTP的多终端间业务移动控制", 《中国优秀硕士学位论文全文数据库》* |
| 朱桂勇: "基于SCTP的负载均衡系统研究与实现", 《中国优秀硕士学位论文全文数据库》* |
| Publication number | Publication date |
|---|---|
| CN106549946B (en) | 2019-06-11 |
| Publication | Publication Date | Title |
|---|---|---|
| US5931913A (en) | Methods, system and computer program products for establishing a session between a host and a terminal using a reduced protocol | |
| EP2843908B1 (en) | Full-duplex bi-directional communication over a remote procedure call based communications protocol, and applications thereof | |
| KR100686705B1 (en) | Method and apparatus for providing multi-client support to a session initiation protocol-enabled terminal | |
| US20070297334A1 (en) | Method and system for network protocol offloading | |
| CN107919994B (en) | Method and server for realizing hot standby of network service dual-computer | |
| CN112631788B (en) | Data transmission method and data transmission server | |
| CN107079046A (en) | Systems and methods for providing subnetwork administration (SA) query caching for dynamic clouds | |
| US20120030687A1 (en) | Efficient data transfer on local network connections using a pseudo socket layer | |
| CN100363870C (en) | Method and apparatus for providing multiple client support on a SIP-enabled terminal | |
| CN101599991A (en) | A method of improving network file system performance based on high-speed communication protocol | |
| CN101369987B (en) | Method and apparatus for establishing communication channel | |
| CA2790409A1 (en) | Method and apparatus for detecting active and orphan session-based connections | |
| CN115509435B (en) | Data reading and writing method, device, equipment, and medium | |
| WO2012075853A1 (en) | Peer-to-peer communication method, apparatus, and system | |
| CN106657076B (en) | TCP service implementation method and device for network name space | |
| CN104995898A (en) | Method, device and system for establishing data channel | |
| CN106549946A (en) | Distributed system concurrent access method and system based on SCTP CMT | |
| CN101179597B (en) | File transfer method, system and a master control board | |
| CN115134395B (en) | Data processing method and device | |
| CN108848175A (en) | A kind of method and device creating TCP connection | |
| CN111371723B (en) | A method and device for realizing PPTP VPN network isolation under DPDK framework | |
| CN115529582A (en) | A remote activation network access method, device, equipment and medium | |
| CN116760504A (en) | Session synchronization method, device, service node, terminal and readable storage medium | |
| CN120710987A (en) | A protocol stack applied to 5G gateway and 5G gateway | |
| CN119011654A (en) | Disconnection reconnection method and device between front-end application and back-end server |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20190611 |