CN102137104A - Transmission control protocol (TCP) long-connection access control method and device - Google Patents
Transmission control protocol (TCP) long-connection access control method and device Download PDFInfo
- Publication number
- CN102137104A CN102137104A CN2011100591385A CN201110059138A CN102137104A CN 102137104 A CN102137104 A CN 102137104A CN 2011100591385 A CN2011100591385 A CN 2011100591385A CN 201110059138 A CN201110059138 A CN 201110059138A CN 102137104 A CN102137104 A CN 102137104A
- Authority
- CN
- China
- Prior art keywords
- tcp
- long
- connects
- network element
- connection
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000005540 biological transmission Effects 0.000 title claims description 15
- 230000004044 response Effects 0.000 claims abstract description 110
- 238000004891 communication Methods 0.000 claims description 7
- 230000002085 persistent effect Effects 0.000 abstract description 195
- 230000001360 synchronised effect Effects 0.000 abstract description 19
- 230000007774 longterm Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
Images
Landscapes
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种TCP长连接接入控制方法,包括:中央控制节点接收长连接前置机发送的包括TCP长连接接入或断开的信息的同步通知消息,统计当前TCP长连接个数;接收长连接前置机发送的TCP长连接申请请求消息;判断当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机。本发明还提供相应的中央控制节点、长连接前置机和电信设备。本发明技术方案中由中央控制节点判断当前TCP长连接个数是否小于设定值,从而决定是否允许再接入TCP长连接的技术方案,能够精确统计并控制接入的TCP长连接的个数,以使电信设备可靠运行。
The invention discloses a TCP long connection access control method, comprising: a central control node receives a synchronous notification message including information about TCP long connection access or disconnection sent by a long connection front end, and counts the number of current TCP long connections ;Receive the TCP persistent connection application request message sent by the persistent connection front-end processor; determine whether the current TCP persistent connection number is less than the set value, and if so, return an application response message allowing access to the persistent connection front-end processor, otherwise return not allowed The access application response message is sent to the long-connection front-end processor. The invention also provides the corresponding central control node, long connection front-end and telecommunication equipment. In the technical solution of the present invention, the central control node judges whether the number of current TCP long connections is less than the set value, thereby deciding whether to allow re-access to the technical solution of TCP long connections, which can accurately count and control the number of TCP long connections that are accessed , to enable reliable operation of telecommunications equipment.
Description
技术领域technical field
本发明涉及通信技术领域,具体涉及一种传输控制协议TCP长连接接入控制方法和装置。The present invention relates to the technical field of communication, in particular to a transmission control protocol TCP persistent connection access control method and device.
背景技术Background technique
传输控制协议(Transmission Control Protocol,TCP)长连接是一种先建立通讯连接,连接建立后不断开,然后可以重复进行报文发送和接收的连接方式,常用于点对点通讯。Transmission Control Protocol (TCP) long connection is a connection method that establishes a communication connection first, does not disconnect after the connection is established, and then repeatedly sends and receives messages, and is often used in point-to-point communication.
随着电信数据业务量的激增,承载数据业务的电信设备例如网关设备通常会接入外部客户建立的大量TCP长连接。一方面,电信设备需要尽量保障外部网元TCP长连接的建立,来满足数据业务的开展;另一方面,为了保障电信设备系统运行的可靠性,需要控制TCP长连接的总数。With the rapid increase of telecommunication data traffic, telecommunication devices carrying data services, such as gateway devices, usually access a large number of long TCP connections established by external customers. On the one hand, telecommunications equipment needs to ensure the establishment of TCP long-term connections of external network elements as much as possible to meet the development of data services; on the other hand, in order to ensure the reliability of the operation of the telecommunications equipment system, it is necessary to control the total number of TCP long-term connections.
请参考图1,一种现有的电信设备包括一个长连接前置机和一个后台处理系统,其中长连接前置机用于接入外部网元建立的TCP长连接,并对接入的TCP长连接个数进行控制,后台处理系统则对接入的TCP长连接的数据业务进行处理。该种电信设备由于只包括一个长连接前置机,可扩展性差,能够接入的TCP长连接的个数有限,最大只能接入65535个并发TCP长连接。Please refer to Figure 1, an existing telecommunication equipment includes a persistent connection front-end processor and a background processing system, wherein the persistent connection front-end processor is used to access the TCP persistent connection established by an external network element, and The number of long connections is controlled, and the background processing system processes the data services of the incoming TCP long connections. Since this kind of telecommunication equipment includes only one long-connection front-end device, the scalability is poor, and the number of TCP long-connections that can be accessed is limited, and only 65535 concurrent TCP long-connections can be connected at most.
请参考图2,另一种电信设备在前一种电信设备的基础上,将长连接前置机从一个增加到了多个,并增加了负载均衡器,由负载均衡器按照分发策略将外部网元发送的TCP长连接请求消息分发到各个长连接前置机。该种电信设备作为包括多个长连接前置机的集群系统,提升了接入TCP长连接的能力;但是,由于各个长连接前置机相互独立,不能协同控制接入的TCP长连接。Please refer to Figure 2. On the basis of the former telecom equipment, another telecom equipment increases the long-connection front-end from one to multiple, and adds a load balancer. The load balancer divides the external network according to the distribution strategy The TCP persistent connection request message sent by the unit is distributed to each persistent connection front end. This type of telecommunication equipment, as a cluster system including multiple persistent connection front-ends, improves the ability to access TCP persistent connections; however, since each persistent connection front-end is independent of each other, it cannot cooperate to control the incoming TCP persistent connections.
发明内容Contents of the invention
本发明实施例提供一种TCP长连接接入控制方法和装置。Embodiments of the present invention provide a TCP persistent connection access control method and device.
一种传输控制协议TCP长连接接入控制方法,包括:A transmission control protocol TCP persistent connection access control method, comprising:
中央控制节点接收长连接前置机发送的同步通知消息,所述同步通知消息包括TCP长连接接入或断开的信息;The central control node receives the synchronization notification message sent by the long connection front end, and the synchronization notification message includes the information of TCP long connection access or disconnection;
根据所述同步通知消息统计当前TCP长连接个数;Counting the number of current TCP long connections according to the synchronization notification message;
接收所述长连接前置机发送的TCP长连接申请请求消息;receiving the TCP persistent connection application request message sent by the persistent connection front end;
判断当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息给所述长连接前置机,否则返回不允许接入的申请应答消息给所述长连接前置机,以控制所述长连接前置机是否接入所述TCP长连接。Determine whether the number of current TCP persistent connections is less than a set value, if so, return an application response message allowing access to the persistent connection front-end processor, otherwise return an application response message that does not allow access to the persistent connection front-end processor , to control whether the persistent connection front end accesses the TCP persistent connection.
一种传输控制协议TCP长连接接入控制方法,包括:A transmission control protocol TCP persistent connection access control method, comprising:
长连接前置机收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点;After receiving the login message sent by the external network element, the persistent connection front-end processor sends a TCP persistent connection application request message to the central control node;
接收所述中央控制节点返回的申请应答消息;receiving an application response message returned by the central control node;
若所述申请应答消息为不允许接入的申请应答消息,则拒绝所述外部网元的登录消息;If the application response message is an application response message that does not allow access, rejecting the login message of the external network element;
若所述申请应答消息为允许接入的申请应答消息,则接入所述外部网元建立的TCP长连接;If the application response message is an application response message allowing access, then access the TCP long connection established by the external network element;
在所述TCP长连接接入或者断开时,发送同步通知消息给所述中央控制节点,所述同步通知消息包括TCP长连接接入或断开的信息,用于供所述中央控制节点统计当前TCP长连接个数。When the TCP long connection is connected or disconnected, a synchronization notification message is sent to the central control node, and the synchronization notification message includes the information of the TCP long connection connection or disconnection, which is used for statistics by the central control node The current number of TCP persistent connections.
一种中央控制节点,包括:A central control node comprising:
接收单元,用于接收长连接前置机发送的同步通知消息和TCP长连接申请请求消息,所述同步通知消息包括TCP长连接接入或断开的信息;The receiving unit is used to receive the synchronization notification message and the TCP persistent connection application request message sent by the persistent connection front end, and the synchronization notification message includes the information of TCP persistent connection access or disconnection;
统计单元,用于根据所述同步通知消息统计当前TCP长连接个数;A statistical unit, configured to count the number of current TCP long connections according to the synchronization notification message;
判断单元,用于判断当前TCP长连接个数是否小于设定值;A judging unit, configured to judge whether the number of current TCP long connections is less than a set value;
发送单元,用于在所述判断单元判断当前TCP长连接个数小于设定值时,返回允许接入的申请应答消息给所述长连接前置机,否则返回不允许接入的申请应答消息给所述长连接前置机,以控制所述长连接前置机是否接入所述TCP长连接。A sending unit, configured to return an application response message allowing access to the persistent connection front end when the judging unit determines that the number of current TCP persistent connections is less than a set value, otherwise returning an application response message not allowing access For the persistent connection front-end, to control whether the persistent connection front-end accesses the TCP persistent connection.
一种长连接前置机,包括:A long connection front-end processor, comprising:
第一接收发送单元,用于收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点,并接收所述中央控制节点返回的申请应答消息;The first receiving and sending unit is configured to send a TCP persistent connection application request message to the central control node after receiving the login message sent by the external network element, and receive an application response message returned by the central control node;
长连接处理单元,用于若所述申请应答消息为不允许接入的申请应答消息,则拒绝所述外部网元的登录消息;若所述申请应答消息为允许接入的申请应答消息,则接入所述外部网元建立的TCP长连接;A persistent connection processing unit, configured to reject the login message of the external network element if the application response message is an application response message that does not allow access; if the application response message is an application response message that allows access, then Accessing the TCP long connection established by the external network element;
第二接收发送单元,用于在所述TCP长连接接入或者断开时,发送同步通知消息给所述中央控制节点,所述同步通知消息包括TCP长连接接入或断开的信息,用于供所述中央控制节点统计当前TCP长连接个数。The second receiving and sending unit is used to send a synchronization notification message to the central control node when the TCP persistent connection is connected or disconnected, and the synchronization notification message includes information about the connection or disconnection of the TCP persistent connection. It is used for the central control node to count the number of current TCP long connections.
一种电信设备,包括:负载均衡器,与所述负载均衡器连接的多个长连接前置机,与所述多个长连接前置机连接的中央控制节点,以及与所述多个长连接前置机连接的后台处理系统;A telecommunications device, comprising: a load balancer, a plurality of long-term connection front-ends connected to the load balancer, a central control node connected to the plurality of long-term connection front-ends, and a plurality of long-term connection front-ends connected to the multiple long-term connection Connect to the background processing system connected to the front-end processor;
所述负载均衡器,用于按照分发策略将外部网元的TCP长连接分发到各个长连接前置机;The load balancer is used to distribute the TCP persistent connection of the external network element to each persistent connection front-end according to the distribution strategy;
所述长连接前置机,用于收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点;接收所述中央控制节点返回的申请应答消息;若所述申请应答消息为不允许接入的申请应答消息,则拒绝所述外部网元的登录消息;若所述申请应答消息为允许接入的申请应答消息,则接入所述外部网元建立的TCP长连接;在所述TCP长连接接入或者断开时,发送同步通知消息给所述中央控制节点,所述同步通知消息包括TCP长连接接入或断开的信息,用于供所述中央控制节点统计当前TCP长连接个数;The persistent connection front-end device is configured to send a TCP persistent connection application request message to the central control node after receiving the login message sent by the external network element; receive the application response message returned by the central control node; if the application response If the message is an application response message that does not allow access, then reject the login message of the external network element; if the application response message is an application response message that allows access, then access the TCP long connection established by the external network element ; When the TCP long connection is connected or disconnected, a synchronization notification message is sent to the central control node, and the synchronization notification message includes the information of the TCP long connection connection or disconnection, which is used for the central control node Count the number of current TCP long connections;
所述中央控制节点,用于接收所述长连接前置机发送的同步通知消息,所述同步通知消息包括TCP长连接接入或断开的信息;根据所述同步通知消息统计当前TCP长连接个数;接收所述长连接前置机发送的TCP长连接申请请求消息;判断当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息给所述长连接前置机,否则返回不允许接入的申请应答消息给所述长连接前置机,以控制所述长连接前置机是否接入所述TCP长连接;The central control node is configured to receive a synchronous notification message sent by the persistent connection front end, the synchronous notification message includes information about the connection or disconnection of the TCP persistent connection; count the current TCP persistent connection according to the synchronous notification message number; receiving the TCP long connection application request message sent by the long connection front end; judging whether the current TCP long connection number is less than a set value, if so, returning an application response message allowing access to the long connection front end machine, otherwise return an application response message that does not allow access to the persistent connection front-end processor, so as to control whether the persistent connection front-end processor accesses the TCP persistent connection;
所述后台处理系统,用于对已接入的TCP长连接的数据业务进行处理。The background processing system is used to process the data service of the accessed TCP persistent connection.
本发明实施例采用由增加的中央控制节点统计并判断当前TCP长连接个数是否小于设定值,从而决定是否允许长连接前置机再接入TCP长连接的技术方案,能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。The embodiment of the present invention adopts the technical solution that the increased central control node counts and judges whether the current number of TCP long connections is less than the set value, so as to determine whether to allow the long connection front-end processor to reconnect to the TCP long connection, and can accurately control access The number of TCP long connections to improve the reliability of telecommunication equipment operation.
附图说明Description of drawings
图1是现有技术的一种电信设备的结构示意图;FIG. 1 is a schematic structural diagram of a telecommunications device in the prior art;
图2是现有技术的另一种电信设备的结构示意图;FIG. 2 is a schematic structural diagram of another telecommunication device in the prior art;
图3是本发明一个实施例提供的TCP长连接接入控制方法的流程图;Fig. 3 is the flowchart of the TCP persistent connection access control method provided by one embodiment of the present invention;
图4是本发明另一个实施例提供的TCP长连接接入控制方法的流程图;Fig. 4 is the flowchart of the TCP persistent connection access control method provided by another embodiment of the present invention;
图5是本发明又一个实施例提供的TCP长连接接入控制方法的流程图;Fig. 5 is a flow chart of a TCP persistent connection access control method provided by another embodiment of the present invention;
图6是本发明的方法用于一个应用场景的流程图;Fig. 6 is a flow chart of the method of the present invention used in an application scenario;
图7是本发明的方法用于另一个应用场景的流程图;Fig. 7 is a flow chart of the method of the present invention used in another application scenario;
图8是本发明的方法用于又一个应用场景的流程图;Fig. 8 is a flow chart of the method of the present invention used in another application scenario;
图9是本发明实施例提供的中央控制节点的结构示意图;FIG. 9 is a schematic structural diagram of a central control node provided by an embodiment of the present invention;
图10是本发明实施例提供的长连接前置机的结构示意图;FIG. 10 is a schematic structural diagram of a long-connection front-end processor provided by an embodiment of the present invention;
图11是本发明实施例提供的电信设备的结构示意图。Fig. 11 is a schematic structural diagram of a telecommunication device provided by an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供一种TCP长连接接入控制方法,采用由增加的中央控制节点统计并判断当前TCP长连接个数是否小于设定值,从而决定是否允许长连接前置机再接入TCP长连接的技术方案,能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。本发明实施例还提供相应的中央控制节点、长连接前置机和电信设备。以下分别进行详细说明。The embodiment of the present invention provides a TCP persistent connection access control method, which uses the added central control node to count and judge whether the current TCP persistent connection number is less than the set value, so as to determine whether to allow the persistent connection front-end processor to re-connect to the TCP The technical solution of persistent connection can accurately control the number of TCP persistent connections to improve the reliability of telecommunication equipment operation. The embodiment of the present invention also provides a corresponding central control node, a persistent connection front-end processor and telecommunication equipment. Each will be described in detail below.
如图2所示,电信设备包括:负载均衡器,与负载均衡器连接的多个长连接前置机,以及与多个长连接前置机连接的后台处理系统。实施本发明实施例提供的方法,还需在现有的电信设备中增加一个与多个长连接前置机连接的中央控制节点,或者以电信设备中已有的某个单元作为中央控制节点。As shown in FIG. 2 , the telecommunication equipment includes: a load balancer, multiple persistent connection front-ends connected to the load balancer, and a background processing system connected to the multiple persistent connection front-ends. To implement the method provided by the embodiment of the present invention, it is also necessary to add a central control node connected to multiple long-connection front-ends in the existing telecommunication equipment, or use an existing unit in the telecommunication equipment as the central control node.
其中,负载均衡器用于按照分发策略将外部网元发送的用于建立连接到电信设备的TCP长连接的TCP长连接请求消息分发到各个长连接前置机;长连接前置机用于接收负载均衡器分发的外部网元发送的TCP长连接请求消息,并接收外部网元发送的登录消息,按照中央控制节点的判断结果拒绝外部网元发送的登录消息或者接入外部网元建立的TCP长连接,返回表示登录成功或失败的应答消息给长连接前置机;后台处理系统用于对已建立的TCP长连接的数据业务进行处理;中央控制节点则用于精确控制接入的TCP长连接的个数。Among them, the load balancer is used to distribute the TCP persistent connection request message sent by the external network element for establishing the TCP persistent connection connected to the telecommunication equipment to each persistent connection front-end processor according to the distribution strategy; the persistent connection front-end processor is used to receive the load The balancer distributes the TCP long connection request message sent by the external network element, and receives the login message sent by the external network element, and rejects the login message sent by the external network element or the TCP long connection established by the external network element according to the judgment result of the central control node. connection, return a response message indicating the success or failure of the login to the long connection front-end; the background processing system is used to process the data service of the established TCP long connection; the central control node is used to precisely control the incoming TCP long connection the number of .
请参考图3,本发明一个实施例提供的TCP长连接接入控制方法包括以下步骤:Please refer to Fig. 3, the TCP persistent connection access control method provided by one embodiment of the present invention includes the following steps:
101、中央控制节点接收长连接前置机发送的同步通知消息,该同步通知消息包括TCP长连接接入或断开的信息。101. The central control node receives a synchronization notification message sent by a persistent connection front end, where the synchronization notification message includes information about connection or disconnection of a TCP persistent connection.
长连接前置机每接入或者断开一个与外部网元的TCP长连接时,都将发送一个同步通知消息给中央控制节点,以便将TCP长连接接入或断开的信息通知中央控制节点。该同步通知消息至少包括长连接接入同步通知消息和长连接断开同步通知消息。Each time the persistent connection front-end processor connects or disconnects a TCP persistent connection with an external network element, it will send a synchronous notification message to the central control node, so as to notify the central control node of the TCP persistent connection access or disconnection information . The synchronization notification message at least includes a persistent connection access synchronization notification message and a persistent connection disconnection synchronization notification message.
102、根据同步通知消息统计当前TCP长连接个数。102. Count the number of current TCP persistent connections according to the synchronization notification message.
中央控制节点可以根据收到的同步通知消息统计当前TCP长连接的总个数,还可以分类统计TCP长连接的个数,例如可以特别统计某一个或某一类外部网元的TCP长连接的个数。The central control node can count the total number of current TCP persistent connections according to the received synchronization notification message, and can also count the number of TCP persistent connections by category, for example, it can specifically count the TCP persistent connections of a certain or a certain type of external network element number.
103、接收长连接前置机发送的TCP长连接申请请求消息。103. Receive the TCP persistent connection application request message sent by the persistent connection front-end processor.
长连接前置机收到外部网元发送的TCP长连接请求消息后,等待该外部网元发送登录消息,在收到该外部网元发送的登录消息后,发送一个TCP长连接申请请求消息给中央控制节点,以便中央控制节点根据策略判断是否允许该外部网元登录以接入该外部网元的TCP长连接。After receiving the TCP persistent connection request message sent by the external network element, the persistent connection front-end processor waits for the external network element to send a login message, and after receiving the login message sent by the external network element, sends a TCP persistent connection application request message to the The central control node, so that the central control node judges whether to allow the external network element to log in to access the TCP persistent connection of the external network element according to the policy.
104、判断当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机,以控制所述长连接前置机是否接入所述TCP长连接。104. Determine whether the number of current TCP persistent connections is less than the set value, if so, return an application response message allowing access to the persistent connection front-end processor, otherwise return an application response message that does not allow access to the persistent connection front-end processor, and Controlling whether the persistent connection front end accesses the TCP persistent connection.
中央控制节点可以通过比较当前TCP长连接个数与设定值的大小以决定是否允许该外部网元登录长连接前置机以接入该外部网元的TCP长连接。其中,设定值是预先设定的允许接入的TCP长连接总个数。当前TCP长连接个数小于设定值时,返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机。The central control node can determine whether to allow the external network element to log in to the persistent connection front-end processor to access the TCP persistent connection of the external network element by comparing the current number of TCP persistent connections with the set value. Wherein, the set value is a preset total number of TCP long connections allowed to be accessed. When the number of current TCP persistent connections is less than the set value, return an application response message for allowing access to the persistent connection front-end processor, otherwise return an application response message for not allowing access to the persistent connection front-end processor.
本发明实施例提供的方法,采用中央控制节点统计当前TCP长连接个数并判断当前TCP长连接个数是否小于设定值,从而决定是否允许长连接前置机再接入TCP长连接,从而能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。In the method provided by the embodiment of the present invention, the central control node is used to count the number of current TCP long connections and judge whether the current number of TCP long connections is less than the set value, so as to determine whether to allow the long connection front end to reconnect to the TCP long connection, thereby It can accurately control the number of TCP long connections to improve the reliability of telecommunication equipment operation.
请参考图4,在另一个实施例中,本发明实施例提供的TCP长连接接入控制方法可以包括以下步骤:Please refer to FIG. 4 , in another embodiment, the TCP persistent connection access control method provided by the embodiment of the present invention may include the following steps:
101′、控制节点接收长连接前置机发送的同步通知消息,该同步通知消息包括指定外部网元的TCP长连接接入或断开的信息。101'. The control node receives a synchronization notification message sent by the persistent connection front-end, where the synchronization notification message includes information about the connection or disconnection of the TCP persistent connection of the specified external network element.
102′、根据该同步通知消息统计指定外部网元的TCP长连接的个数;102'. Count the number of TCP persistent connections of the specified external network element according to the synchronization notification message;
103′、接收长连接前置机发送的对应于指定外部网元的TCP长连接申请请求消息;103'. Receive a TCP persistent connection application request message corresponding to a specified external network element sent by the persistent connection front end;
104′、判断指定外部网元的当前TCP长连接个数是否小于针对该指定外部网元的设定值,若是则返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机。104'. Determine whether the current number of TCP long connections of the specified external network element is less than the set value for the specified external network element, and if so, return an application response message for allowing access to the long connection front-end processor, otherwise return not allowing access The incoming application response message is sent to the long-connection front-end processor.
采用本实施例的方法,可以精确控制来自某个或者某一类指定外部网元的TCP连接,从而提高电信设备的控制能力。By adopting the method of this embodiment, it is possible to precisely control the TCP connection from a certain or a certain type of specified external network element, thereby improving the control capability of the telecommunication equipment.
请参考图5,本发明又一个实施例提供的TCP长连接接入控制方法包括以下步骤:Please refer to Fig. 5, the TCP persistent connection access control method provided by another embodiment of the present invention includes the following steps:
201、长连接前置机收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点。201. After receiving the login message sent by the external network element, the persistent connection front-end processor sends a TCP persistent connection application request message to the central control node.
外部网元发起建立TCP长连接到电信设备的流程,电信设备的负载均衡器会按照分发策略将外部网元发送的TCP长连接请求消息分发到各个长连接前置机,长连接前置机收到TCP长连接请求消息后,等待外部网元发送登录消息。The external network element initiates the process of establishing a TCP long-term connection to the telecommunications equipment. The load balancer of the telecommunications equipment will distribute the TCP long-connection request message sent by the external network element to each long-connection front-end processor according to the distribution policy. After receiving the TCP persistent connection request message, wait for the external network element to send a login message.
长连接前置机收在收到该外部网元发送的登录消息后,发送一个TCP长连接申请请求消息给中央控制节点,以便中央控制节点根据当前接入的TCP长连接个数决定是否允许再接入该外部网元的TCP长连接。After receiving the login message sent by the external network element, the persistent connection front-end processor sends a TCP persistent connection application request message to the central control node, so that the central control node can decide whether to allow another connection according to the number of currently connected TCP persistent connections. The TCP persistent connection to access the external network element.
202、接收中央控制节点返回的申请应答消息。202. Receive an application response message returned by the central control node.
中央控制节点比较当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息,否则返回不允许接入的申请应答消息。The central control node compares whether the number of current TCP long connections is less than the set value, and if so, returns an application response message that allows access, otherwise returns an application response message that does not allow access.
203、若申请应答消息为不允许接入的申请应答消息,则拒绝外部网元的登录消息。203. If the application response message is an application response message that does not allow access, reject the login message of the external network element.
即,不允许接入该外部网元的TCP长连接,并返回登录失败应答消息给外部网元。That is, the TCP long connection to access the external network element is not allowed, and a login failure response message is returned to the external network element.
204、若申请应答消息为允许接入的申请应答消息,则接入外部网元建立的TCP长连接。204. If the application response message is an application response message allowing access, access the TCP persistent connection established by the external network element.
若为允许接入的申请应答消息,则长连接前置机放通该外部网元的登录消息,从而接入外部网元建立的TCP长连接,并返回登录成功应答消息给外部网元。If it is an application response message for allowing access, the persistent connection front-end processor releases the login message of the external network element, thereby accessing the TCP persistent connection established by the external network element, and returns a login success response message to the external network element.
205、在TCP长连接接入或者断开时,发送同步通知消息给中央控制节点,同步通知消息包括TCP长连接接入或断开的信息,用于供中央控制节点统计当前TCP长连接个数。205. When the TCP long connection is connected or disconnected, send a synchronous notification message to the central control node. The synchronous notification message includes the information of the TCP long connection connection or disconnection, and is used for the central control node to count the number of current TCP long connections .
长连接前置机在接入TCP长连接并返回登录成功应答消息给外部网元后,需要发送包括TCP长连接接入信息的同步通知消息给中央控制节点;同样的,在TCP长连接断开时,例如任务结束断开或者因各种异常而断开时,需要发送包括TCP长连接断开信息的同步通知消息给中央控制节点;以便中央控制节点统计当前TCP长连接个数。After the persistent connection front-end processor accesses the TCP persistent connection and returns a login success response message to the external network element, it needs to send a synchronous notification message including the TCP persistent connection access information to the central control node; similarly, when the TCP persistent connection is disconnected When, for example, when the task ends or is disconnected due to various abnormalities, it is necessary to send a synchronous notification message including TCP long connection disconnection information to the central control node; so that the central control node can count the number of current TCP long connections.
本发明实施例提供的方法,长连接前置机可以按照中央控制节点返回的申请应答消息,决定是否允许再接入TCP长连接,从而能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。In the method provided by the embodiment of the present invention, the persistent connection front-end processor can decide whether to allow re-access to the TCP persistent connection according to the application response message returned by the central control node, so as to accurately control the number of TCP persistent connections that are accessed, so as to improve Reliability of telecommunications equipment operation.
另一个实施例中,若长连接前置机收到外部网元发送的登录消息后,发送TCP长连接申请请求消息失败,则接入外部网元建立的TCP长连接。In another embodiment, if the persistent connection front-end processor fails to send the TCP persistent connection application request message after receiving the login message sent by the external network element, it accesses the TCP persistent connection established by the external network element.
又一个实施例中,长连接前置机在发送TCP长连接申请请求消息给中央控制节点之后,若预设时间内未收到中央控制节点返回的申请应答消息,则接入外部网元建立的TCP长连接。In yet another embodiment, after sending the TCP persistent connection application request message to the central control node, if the persistent connection front-end processor does not receive the application response message returned by the central control node within a preset time, it will access the network established by the external network element. TCP long connection.
采用上述两个实施例,即便长连接前置机因异常未能成功发送出TCP长连接申请请求,或者中央控制节点因宕机或者其它原因不能返回申请应答消息,也不影响该外部网元的TCP长连接接入,保障该外部网元数据业务的畅通。With the above two embodiments, even if the persistent connection front-end fails to send out the TCP persistent connection application request due to abnormality, or the central control node cannot return the application response message due to downtime or other reasons, the connection of the external network element will not be affected. TCP persistent connection access ensures the smooth flow of data services of the external network element.
下面,结合具体的应用场景里对本发明实施例的方法做进一步说明。In the following, the method in the embodiment of the present invention will be further described in conjunction with specific application scenarios.
请参考图6,在一个应用场景里中,电信设备包括:负载均衡器,与负载均衡器连接的多个长连接前置机,以及与多个长连接前置机连接的后台处理系统,还包括一个与多个长连接前置机连接的中央控制节点。该电信设备是一个包括多个长连接前置机的集群系统。本发明实施例的方法包括以下步骤:Please refer to Figure 6. In an application scenario, the telecommunications equipment includes: a load balancer, multiple long-connection front-ends connected to the load balancer, and a background processing system connected to multiple long-connection front-ends, and Consists of a central control node connected to multiple long-connection front-ends. The telecommunication equipment is a cluster system including multiple long-connection front-end processors. The method of the embodiment of the present invention comprises the following steps:
301、外部网元发起TCP长连接建立流程,发送TCP长连接请求消息给负载均衡器,以便建立连接到电信设备的TCP长连接;301. The external network element initiates a TCP persistent connection establishment process, and sends a TCP persistent connection request message to the load balancer, so as to establish a TCP persistent connection connected to the telecommunication device;
302、电信设备的负载均衡器按照分发策略,将收到的TCP长连接请求消息分发到各个长连接前置机;302. The load balancer of the telecommunications equipment distributes the received TCP persistent connection request message to each persistent connection front-end according to the distribution strategy;
303、长连接前置机接收分发的TCP长连接请求消息,等待外部网元发送登录消息;303. The persistent connection front-end processor receives the distributed TCP persistent connection request message, and waits for an external network element to send a login message;
304、外部网元给长连接前置机发送登录消息;304. The external network element sends a login message to the long-connection front-end processor;
305、当长连接前置机收到外部网元发送的登录消息后,向中央控制节点发送长连接申请请求消息(LongConnectReq);305. After receiving the login message sent by the external network element, the long connection front-end device sends a long connection application request message (LongConnectReq) to the central control node;
306、中央控制节点收到长连接前置机发送的长连接申请请求消息后,根据当前的TCP长连接个数是否小于电信设备许可的长连接总个数进行判断,决定是否允许接入该TCP长连接;306. After the central control node receives the persistent connection application request message sent by the persistent connection front-end processor, it judges according to whether the current number of TCP persistent connections is less than the total number of persistent connections allowed by the telecommunication equipment, and decides whether to allow access to the TCP Long connection;
307、如果当前TCP长连接个数<许可的长连接总个数,返回允许接入的长连接申请应答消息(LongConnectResp);如果当前TCP长连接个数>=系统许可的长连接总个数,返回不允许接入的长连接申请应答消息;307. If the current number of TCP long connections < the total number of allowed long connections, return a long connection application response message (LongConnectResp) that allows access; if the current number of TCP long connections >= the total number of long connections allowed by the system, Return a persistent connection application response message that does not allow access;
308、长连接前置机根据收到的长连接申请应答消息,决定是否接入该外部网元的TCP长连接;在收到不允许接入的长连接申请应答消息时,拒绝外部网元的登录消息;在收到允许接入的长连接申请应答消息时,放通外部网元的登录消息以接入该TCP长连接;308. The persistent connection front-end processor determines whether to access the TCP persistent connection of the external network element according to the received persistent connection application response message; when receiving a persistent connection application response message that does not allow access, rejects the connection of the external network element Login message; when receiving a persistent connection application response message that allows access, release the login message of the external network element to access the TCP persistent connection;
309、长连接前置机在放通登录消息后,返回登录成功应答消息给外部网元;或者,在拒绝登录消息后,返回登录失败应答消息给外部网元;309. After releasing the login message, the persistent connection front-end processor returns a login success response message to the external network element; or, after rejecting the login message, returns a login failure response message to the external network element;
310、长连接前置机在放通登录消息并返回登录成功应答消息给外部网元后,需要发送包括长连接接入信息的同步通知消息(LongConnectNotify)给中央控制节点;310. After releasing the login message and returning a login success response message to the external network element, the long connection front-end device needs to send a synchronous notification message (LongConnectNotify) including the long connection access information to the central control node;
311、中央控制节点收到同步通知消息后,建立对TCP长连接个数的统计,用于后续是否允许接入TCP长连接的许可判断。311. After receiving the synchronization notification message, the central control node establishes statistics on the number of TCP persistent connections, which is used for subsequent permission judgment on whether to allow access to TCP persistent connections.
本应用场景中,中央控制节点根据当前TCP长连接个数是否小于系统许可的长连接总个数,返回是否允许接入的申请应答消息给长连接前置机,长连接前置机可以按照返回的申请应答消息,决定是否允许再接入TCP长连接,从而能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。In this application scenario, the central control node returns an application response message of whether to allow access to the persistent connection front-end processor according to whether the current number of TCP persistent connections is less than the total number of persistent connections allowed by the system, and the persistent connection front-end processor can return The application response message is used to determine whether to allow the re-access of TCP persistent connections, so as to accurately control the number of incoming TCP persistent connections, so as to improve the reliability of telecommunication equipment operation.
请参考图7,在另一个应用场景里中,网元设备可以是服务提供商(Service Provider,SP)设备,电信设备可以是SAG(Service Access Gateway)网关,SAG网关包括作为长连接前置机的业务接入(Service Access,SA)模块,作为中央控制节点的中央管理服务器(Central Management Server,CM Server),以及后台处理(Service Orchestration,SO)系统。其中,SP可以采用3.3或3.4版本消息转换(short message peer to peer 3.3/3.4,SMPP3.3/3.4)协议,消息发布电脑接口(Computer Interface to Message Distribution 2,CIMD2)协议,或外部机器接口(External Machine Interface,EMI)协议等长连接协议接入SAG网关。本发明实施例的方法包括以下步骤:Please refer to Figure 7. In another application scenario, the network element device can be a service provider (Service Provider, SP) device, and the telecommunication device can be a SAG (Service Access Gateway) gateway. The SAG gateway includes a long-term connection front-end The service access (Service Access, SA) module, the central management server (Central Management Server, CM Server) as the central control node, and the background processing (Service Orchestration, SO) system. Among them, the SP can adopt the 3.3 or 3.4 version message conversion (short message peer to peer 3.3/3.4, SMPP3.3/3.4) protocol, the message publishing computer interface (Computer Interface to Message Distribution 2, CIMD2) protocol, or the external machine interface ( External Machine Interface, EMI) protocol and other long-term connection protocols are connected to the SAG gateway. The method of the embodiment of the present invention comprises the following steps:
401、SP发送用于建立TCP长连接的TCP长连接请求消息给SAG;401. The SP sends a TCP persistent connection request message for establishing a TCP persistent connection to the SAG;
402、SAG的负载均衡器按照分发策略将收到的TCP长连接请求消息分发到各个SA;402. The load balancer of the SAG distributes the received TCP long connection request message to each SA according to the distribution strategy;
403、SA接收分发的TCP长连接请求消息,等待SP发送登录消息;403. The SA receives the distributed TCP long connection request message, and waits for the SP to send a login message;
404、SP向SA发送smpp3.3/3.4bind_transmitter登录消息;404. The SP sends the smpp3.3/3.4bind_transmitter login message to the SA;
405、当SA收到SP发送的smpp3.3/3.4bind_transmitter登录消息后,向CMServer发送长连接申请请求消息LongConnectReq;405. After the SA receives the smpp3.3/3.4bind_transmitter login message sent by the SP, it sends a long connection application request message LongConnectReq to the CMServer;
406、CMServer收到长连接申请请求消息LongConnectReq后,根据当前长连接个数是否小于SAG许可的长连接总个数进行判断,决定是否允许接入该TCP长连接;406. After receiving the long connection application request message LongConnectReq, the CMServer judges according to whether the current number of long connections is less than the total number of long connections allowed by the SAG, and decides whether to allow access to the TCP long connection;
407、如果当前TCP长连接个数<许可的长连接总个数,返回允许接入的长连接申请应答消息LongConnectResp;如果当前TCP长连接个数>=系统许可的长连接总个数,返回不允许接入的长连接申请应答消息LongConnectResp;407. If the current number of TCP long connections < the total number of permitted long connections, return the long connection application response message LongConnectResp that allows access; if the current number of TCP long connections >= the total number of long connections permitted by the system, return No The long connection application response message LongConnectResp that allows access;
408、SA根据收到的连接申请应答消息LongConnectResp,拒绝SP的登录消息,或者放通SP的登录消息以接入该TCP长连接;408. The SA rejects the login message of the SP according to the received connection application response message LongConnectResp, or releases the login message of the SP to access the TCP long connection;
409、如果放通,在放通登录消息后,SA返回登录成功应答消息smpp3.3/3.4bind_transmitter_resp给SP;如果失败,在拒绝登录消息后,SA返回登录失败应答消息smpp3.3/3.4bind_transmitter_resp给SP;409. If it is allowed, after the login message is released, the SA returns a login success response message smpp3.3/3.4bind_transmitter_resp to the SP; if it fails, after rejecting the login message, the SA returns a login failure response message smpp3.3/3.4bind_transmitter_resp to the SP SP;
410、在放通登录消息并返回登录成功应答消息给SP后,SA需要发送包括长连接接入信息的同步通知消息LongConnectNotify给CMServer;410. After releasing the login message and returning a login success response message to the SP, the SA needs to send a synchronous notification message LongConnectNotify including the long connection access information to the CMServer;
411、CMServer收到通知消息,建立对TCP长连接个数的统计,用于后续是否允许接入TCP长连接的许可判断。411. The CMServer receives the notification message, and establishes statistics on the number of TCP persistent connections, which is used for subsequent permission judgment on whether to allow access to the TCP persistent connections.
请参考图8,在又一个应用场景里中,网元设备可以是服务提供商(Service Provider,SP)设备,电信设备可以是SAG(Service Access Gateway)网关,SAG网关包括作为长连接前置机的服务提供商代理(Service Provider Agent,SPAgent),作为中央控制节点的控制管理中心(Control Management Center,CMCenter),以及作为后台处理系统的短消息服务器(Short Message Server,SMServer)。其中,SP可以采用3.0版本中国移动点对点协议(China Mobile Peer to Peer 3.0,CMPP3.0)等长连接协议接入SAG网关。本发明实施例的方法包括以下步骤:Please refer to Figure 8. In another application scenario, the network element device can be a service provider (Service Provider, SP) device, and the telecommunication device can be a SAG (Service Access Gateway) gateway. The SAG gateway includes a long-term connection front-end The service provider agent (Service Provider Agent, SPAgent), the control management center (Control Management Center, CMCenter) as the central control node, and the short message server (Short Message Server, SMSServer) as the background processing system. Among them, the SP can use the 3.0 version of China Mobile Peer to Peer Protocol (China Mobile Peer to Peer 3.0, CMPP3.0) and other long connection protocols to access the SAG gateway. The method of the embodiment of the present invention comprises the following steps:
501、SP发送用于建立TCP长连接的TCP长连接请求消息给SAG;501. The SP sends a TCP persistent connection request message for establishing a TCP persistent connection to the SAG;
502、SAG的负载均衡器按照分发策略将收到的TCP长连接请求消息分发到各SPAgent;502. The load balancer of the SAG distributes the received TCP long connection request message to each SPAgent according to the distribution policy;
503、SPAgent接收分发的TCP长连接请求消息,等待SP发送登录消息;503. The SPAgent receives the distributed TCP long connection request message, and waits for the SP to send a login message;
504、SP向SPAgent发送CMPP3.0CMPP_CONNECT登录消息;504. The SP sends a CMPP3.0CMPP_CONNECT login message to the SPAgent;
505、当SPAgent收到SP发送的CMPP3.0CMPP_CONNECT登录消息后,向CMCenter发送长连接申请请求消息LongConnectReq;505. After receiving the CMPP3.0CMPP_CONNECT login message sent by the SP, the SPAgent sends a long connection application request message LongConnectReq to the CMCenter;
506、CMCenter收到长连接申请请求消息LongConnectReq后,根据当前长连接个数是否小于SAG许可的长连接总个数进行判断,决定是否允许接入该TCP长连接;506. After CMCenter receives the long connection application request message LongConnectReq, it judges according to whether the current number of long connections is less than the total number of long connections allowed by SAG, and decides whether to allow access to the TCP long connection;
507、如果当前TCP长连接个数<许可的长连接总个数,返回允许接入的长连接申请应答消息LongConnectResp;如果当前TCP长连接个数>=系统许可的长连接总个数,返回不允许接入的长连接申请应答消息LongConnectResp;507. If the current number of TCP long connections < the total number of permitted long connections, return the long connection application response message LongConnectResp that allows access; if the current number of TCP long connections >= the total number of long connections permitted by the system, return No The long connection application response message LongConnectResp that allows access;
508、SPAgent根据收到的连接申请应答消息LongConnectResp,拒绝SP的登录消息,或者放通SP的登录消息以接入该TCP长连接;508. The SPAgent rejects the login message of the SP according to the received connection request response message LongConnectResp, or releases the login message of the SP to access the TCP long connection;
509、如果放通,在放通登录消息后,SPAgent返回登录成功应答消息CMPP3.0CMPP_CONNECT_RESP给SP;如果失败,在拒绝登录消息后,SPAgent返回登录失败应答消息CMPP3.0CMPP_CONNECT_RESP给SP;509. If it is allowed, after the login message is released, the SPAgent returns a login success response message CMPP3.0CMPP_CONNECT_RESP to the SP; if it fails, after rejecting the login message, the SPAgent returns a login failure response message CMPP3.0CMPP_CONNECT_RESP to the SP;
510、在放通登录消息并返回登录成功应答消息给SP后,SPAgent需要发送包括长连接接入信息的同步通知消息LongConnectNotify给CMCenter;510. After releasing the login message and returning a login success response message to the SP, the SPAgent needs to send a synchronous notification message LongConnectNotify including the long connection access information to the CMCenter;
511、CMCenter收到通知消息,建立对该长连接个数的统计,用于后续是否允许接入TCP长连接的许可判断。511. The CMCenter receives the notification message, and establishes statistics on the number of the persistent connection, which is used for subsequent permission judgment on whether to allow access to the TCP persistent connection.
请参考图9,本发明实施例还提供一种中央控制节点,包括:Please refer to FIG. 9, the embodiment of the present invention also provides a central control node, including:
接收单元601,用于接收长连接前置机发送的同步通知消息和TCP长连接申请请求消息,该同步通知消息包括TCP长连接接入或断开的信息;The receiving
统计单元602,用于根据同步通知消息统计当前TCP长连接个数;A
判断单元603,用于判断当前TCP长连接个数是否小于设定值;Judging
发送单元604,用于处理单元判断当前TCP长连接个数小于设定值时,返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机,以控制长连接前置机是否接入TCP长连接。The sending
在另一实施例中:In another embodiment:
接收单元601,还用于接收长连接前置机发送的包括指定外部网元的TCP长连接接入或断开信息的同步通知消息,和对应于指定外部网元的TCP长连接申请请求消息;The receiving
统计单元602,还用于根据同步通知消息统计指定外部网元的TCP长连接的个数,该同步通知消息包括指定外部网元的TCP长连接接入或断开的信息;The
判断单元603,还用于判断指定外部网元的当前TCP长连接个数是否小于针对该指定外部网元的设定值;The judging
发送单元604,还用于在判断单元判断指定外部网元的当前TCP长连接个数小于针对该指定外部网元的设定值时,返回允许接入的申请应答消息给长连接前置机,否则返回不允许接入的申请应答消息给长连接前置机。The sending
本发明实施例提供的中央控制节点,能够通过与长连接前置机的交互统计当前TCP长连接个数,并判断当前TCP长连接个数是否小于设定值,从而决定是否允许长连接前置机再接入TCP长连接,在电信设备中采用该中央控制节点能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。The central control node provided by the embodiment of the present invention can count the number of current TCP long connections by interacting with the long-connection front-end processor, and judge whether the current number of TCP long-connections is less than the set value, so as to determine whether to allow long-term connection front-end The machine is then connected to the TCP long connection, and the use of the central control node in the telecommunication equipment can accurately control the number of the TCP long connection connected, so as to improve the reliability of the operation of the telecommunication equipment.
请参考图10,本发明实施例还提供一种长连接前置机,包括:Please refer to FIG. 10, the embodiment of the present invention also provides a long connection front-end processor, including:
第一接收发送单元701,用于收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点,并接收中央控制节点返回的申请应答消息;The first receiving and sending
长连接处理单元702,用于若申请应答消息为不允许接入的申请应答消息,则拒绝外部网元的登录消息;若申请应答消息为允许接入的申请应答消息,则接入外部网元建立的TCP长连接;The persistent
第二接收发送单元703,用于在TCP长连接接入或者断开时,发送同步通知消息给中央控制节点,同步通知消息包括TCP长连接接入或断开的信息,用于供中央控制节点统计当前TCP长连接个数。The second receiving and sending
在另一个实施例中,长连接处理单元702,还用于若第一接收发送单元701发送TCP长连接申请请求消息给中央控制节点之后,预设时间内未收到中央控制节点返回的申请应答消息,则接入外部网元建立的TCP长连接。In another embodiment, the persistent
在又一个实施例中,长连接处理单元702,还用于若第一接收发送单元701收到外部网元发送的登录消息后,发送TCP长连接申请请求消息失败,则接入外部网元建立的TCP长连接。In yet another embodiment, the persistent
本发明实施例提供的长连接前置机,能够通过与上述实施例提供的中央控制节点进行交互,在中央控制节点控制下决定是否再接入TCP长连接,在电信设备中采用该长连接前置机与中央控制节点配合,能够精确控制接入的TCP长连接的个数,以提高电信设备运行的可靠性。The persistent connection front-end processor provided by the embodiment of the present invention can interact with the central control node provided by the above-mentioned embodiment, and decide whether to reconnect to the TCP persistent connection under the control of the central control node. Before adopting the persistent connection in the telecommunication equipment The machine set cooperates with the central control node to accurately control the number of TCP long connections to improve the reliability of telecommunication equipment operation.
请参考图11,本发明实施例提供一种通信设备,包括:负载均衡器800,与负载均衡器800连接的多个长连接前置机700,与多个长连接前置机700连接的中央控制节点600,以及多个长连接前置机700连接的后台处理系统900;Please refer to FIG. 11 , an embodiment of the present invention provides a communication device, including: a
负载均衡器800,用于按照分发策略将外部网元的TCP长连接分发到各个长连接前置机700;The
长连接前置机700,用于收到外部网元发送的登录消息后,发送TCP长连接申请请求消息给中央控制节点600;接收中央控制节点600返回的申请应答消息;若申请应答消息为不允许接入的申请应答消息,则拒绝外部网元的登录消息;若申请应答消息为允许接入的申请应答消息,则接入外部网元建立的TCP长连接;在TCP长连接接入或者断开时,发送同步通知消息给中央控制节点600,同步通知消息包括TCP长连接接入或断开的信息,用于供中央控制节点600统计当前TCP长连接个数;The persistent connection front-
中央控制节点600,用于接收长连接前置机700发送的同步通知消息,同步通知消息包括TCP长连接接入或断开的信息;根据同步通知消息统计当前TCP长连接个数;接收长连接前置机700发送的TCP长连接申请请求消息;判断当前TCP长连接个数是否小于设定值,若是则返回允许接入的申请应答消息给长连接前置机700,否则返回不允许接入的申请应答消息给长连接前置机700,以控制长连接前置机700是否接入TCP长连接;The
后台处理系统900,用于对已接入的TCP长连接的数据业务进行处理。The
本发明实施例提供的通信设备,可以由中央控制节点统计并判断当前TCP长连接个数是否小于设定值,以决定是否允许长连接前置机再接入TCP长连接,从而能够精确控制接入的TCP长连接的个数,提高电信设备运行的可靠性。The communication device provided by the embodiment of the present invention can be counted by the central control node and judged whether the current number of TCP long connections is less than the set value, so as to decide whether to allow the long connection front-end processor to reconnect to the TCP long connection, so as to accurately control the connection The number of incoming TCP long connections improves the reliability of telecom equipment operation.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,所述程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。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 implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.
上述各实施例中所述的中央控制节点,长连接前置机,通信设备等,可以是具有处理器,输入输出接口、存储器等部件的物理实体,当然可以结合软件实现各实施例提及的功能。The central control node, long-connection front-end processor, communication equipment, etc. described in the above-mentioned embodiments can be physical entities with processors, input and output interfaces, memory and other components. Of course, the software mentioned in each embodiment can be implemented. Function.
以上对本发明实施例所提供的传输控制协议TCP长连接接入控制方法及相应的中央控制节点、长连接前置机和电信设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想,不应理解为对本发明的限制。The transmission control protocol TCP long connection access control method provided by the embodiment of the present invention and the corresponding central control node, long connection front-end processor and telecommunication equipment have been introduced in detail above. In this paper, specific examples are used to explain the principles and methods of the present invention. The implementation modes have been described, and the descriptions of the above examples are only used to help understand the method and core idea of the present invention, and should not be construed as limiting the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110059138.5A CN102137104B (en) | 2011-03-11 | 2011-03-11 | Transmission control protocol (TCP) long-connection access control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110059138.5A CN102137104B (en) | 2011-03-11 | 2011-03-11 | Transmission control protocol (TCP) long-connection access control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102137104A true CN102137104A (en) | 2011-07-27 |
CN102137104B CN102137104B (en) | 2014-09-17 |
Family
ID=44296759
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110059138.5A Expired - Fee Related CN102137104B (en) | 2011-03-11 | 2011-03-11 | Transmission control protocol (TCP) long-connection access control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102137104B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103973469A (en) * | 2013-01-30 | 2014-08-06 | 阿里巴巴集团控股有限公司 | Comet connection maintaining method and device |
WO2014179925A1 (en) * | 2013-05-06 | 2014-11-13 | 华为技术有限公司 | Method and apparatus for processing control rules |
CN107070752A (en) * | 2017-04-25 | 2017-08-18 | 上海斐讯数据通信技术有限公司 | A kind of method of testing and test system of long connection capacity |
CN108965424A (en) * | 2018-07-10 | 2018-12-07 | 中国银行股份有限公司 | A kind of method and device for business processing |
WO2019206296A1 (en) * | 2018-04-28 | 2019-10-31 | 北京京东尚科信息技术有限公司 | Fault handling method and device for gateway server |
CN111064636A (en) * | 2019-12-12 | 2020-04-24 | 南方电网数字电网研究院有限公司 | Control method, device and system for connection of front-end processor and computer equipment |
CN114598689A (en) * | 2022-03-08 | 2022-06-07 | 深圳市火火兔智慧科技有限公司 | Interactive method and device of IOT (input/output) equipment, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1561061A (en) * | 2004-02-27 | 2005-01-05 | Ut斯达康通讯有限公司 | Method for two-way access by NAT |
US20070204060A1 (en) * | 2005-05-20 | 2007-08-30 | Hidemitsu Higuchi | Network control apparatus and network control method |
CN101827020A (en) * | 2010-03-03 | 2010-09-08 | 深圳市深信服电子科技有限公司 | Method and system for speeding up built persistent connection without disconnection |
CN101938309A (en) * | 2010-09-15 | 2011-01-05 | 重庆邮电大学 | A WDM Network Specific Segmentation Protection Method Based on Network Coding |
-
2011
- 2011-03-11 CN CN201110059138.5A patent/CN102137104B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1561061A (en) * | 2004-02-27 | 2005-01-05 | Ut斯达康通讯有限公司 | Method for two-way access by NAT |
US20070204060A1 (en) * | 2005-05-20 | 2007-08-30 | Hidemitsu Higuchi | Network control apparatus and network control method |
CN101827020A (en) * | 2010-03-03 | 2010-09-08 | 深圳市深信服电子科技有限公司 | Method and system for speeding up built persistent connection without disconnection |
CN101938309A (en) * | 2010-09-15 | 2011-01-05 | 重庆邮电大学 | A WDM Network Specific Segmentation Protection Method Based on Network Coding |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103973469A (en) * | 2013-01-30 | 2014-08-06 | 阿里巴巴集团控股有限公司 | Comet connection maintaining method and device |
CN103973469B (en) * | 2013-01-30 | 2017-09-15 | 阿里巴巴集团控股有限公司 | The maintaining method and device of Comet connections |
WO2014179925A1 (en) * | 2013-05-06 | 2014-11-13 | 华为技术有限公司 | Method and apparatus for processing control rules |
CN107070752A (en) * | 2017-04-25 | 2017-08-18 | 上海斐讯数据通信技术有限公司 | A kind of method of testing and test system of long connection capacity |
CN107070752B (en) * | 2017-04-25 | 2020-07-24 | 深圳市世纪福科技有限公司 | Testing method and testing system for long connection capacity |
WO2019206296A1 (en) * | 2018-04-28 | 2019-10-31 | 北京京东尚科信息技术有限公司 | Fault handling method and device for gateway server |
US11632424B2 (en) | 2018-04-28 | 2023-04-18 | Beijing Jingdong Shangke Information Technology Co., Ltd. | Fault handling method and device for gateway server |
CN108965424A (en) * | 2018-07-10 | 2018-12-07 | 中国银行股份有限公司 | A kind of method and device for business processing |
CN108965424B (en) * | 2018-07-10 | 2021-02-26 | 中国银行股份有限公司 | Service processing method and device |
CN111064636A (en) * | 2019-12-12 | 2020-04-24 | 南方电网数字电网研究院有限公司 | Control method, device and system for connection of front-end processor and computer equipment |
CN111064636B (en) * | 2019-12-12 | 2022-03-08 | 南方电网数字电网研究院有限公司 | Control method, device and system for connection of front-end processor and computer equipment |
CN114598689A (en) * | 2022-03-08 | 2022-06-07 | 深圳市火火兔智慧科技有限公司 | Interactive method and device of IOT (input/output) equipment, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102137104B (en) | 2014-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102137104B (en) | Transmission control protocol (TCP) long-connection access control method and device | |
US20190261159A1 (en) | Network Slice Selection Policy Updating Method and Apparatus | |
CN103685461B (en) | A kind of cluster management device, management system and management method | |
US10389801B2 (en) | Service request processing method, related apparatus, and system | |
US11233694B2 (en) | Method and device for processing communication path | |
CN114363927B (en) | Management method, management unit, communication system, storage medium, and program product | |
EP3987717A1 (en) | Method and apparatus for adding notifications related with user equipment multicast group and leave | |
WO2015154350A1 (en) | Internet access traffic sharing method, device and terminal | |
EP4070529A1 (en) | User plane function load control | |
US20200092614A1 (en) | Video distribution method and device | |
WO2020119328A1 (en) | Data transmission method, apparatus and device, and storage medium | |
US9370032B2 (en) | Service processing method and apparatus based on android system | |
CN103312593B (en) | A kind of message distributing system and method | |
CN109151082A (en) | A method, device and system for establishing multiple connections | |
CN103546528B (en) | Distributed message method for pushing and system | |
WO2023035925A1 (en) | Service processing method, apparatus and system | |
WO2014108862A2 (en) | Method and system for the handling of redundant long poll | |
CN110391991B (en) | A method and related device for flow control | |
CN114143837A (en) | A kind of N5CW equipment access core network management method and system | |
WO2013159492A1 (en) | Method and system for reporting and downloading information | |
CN105681122A (en) | Method and system for telecommunication device monitoring | |
CN108574615A (en) | A content transmission method, device and system based on multipath MPTCP | |
CN113746574B (en) | Information interaction method, system and equipment | |
CN103563305A (en) | System and method for providing push service to reduce network load | |
CN112040513A (en) | Data transmission method, data transmission device and data transmission system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140917 Termination date: 20200311 |