WO2017000464A1 - Method and apparatus for sending keepalive message - Google Patents

Method and apparatus for sending keepalive message Download PDF

Info

Publication number
WO2017000464A1
WO2017000464A1 PCT/CN2015/094033 CN2015094033W WO2017000464A1 WO 2017000464 A1 WO2017000464 A1 WO 2017000464A1 CN 2015094033 W CN2015094033 W CN 2015094033W WO 2017000464 A1 WO2017000464 A1 WO 2017000464A1
Authority
WO
WIPO (PCT)
Prior art keywords
keep
alive
instance information
sent
information
Prior art date
Application number
PCT/CN2015/094033
Other languages
French (fr)
Chinese (zh)
Inventor
沈琴
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017000464A1 publication Critical patent/WO2017000464A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for transmitting keep-alive messages.
  • KEEPALIVE is a periodic message exchanged between routing devices to maintain neighbor relationships between devices.
  • the hold time is the maximum time that can elapse between receiving successive KEEPALIVE or UPDATE messages.
  • the keep-alive message is sent in a period of 1/3 of the hold time.
  • the keep-alive message sending method is originally configured by the border gateway protocol itself to construct a keep-alive message, so that when the service is busy, the keep-alive message cannot be sent in time, which may easily lead to the phenomenon of keep-alive timeout neighbors being broken. appear.
  • the embodiment of the present invention provides a method for transmitting a keep-alive message and a device to solve at least the technical problem that the keep-alive message cannot be sent in time due to the busy system service, causing the keep-alive timeout neighbor to be broken.
  • a method for sending a keep-alive message including: the keep-alive library receives and stores instance information sent by a Border Gateway Protocol (BGP), where The instance information is used to instruct the keep-alive database to send the keep-alive message.
  • BGP Border Gateway Protocol
  • the keep-alive library periodically sends the received keep-alive message according to the instance information.
  • the instance information includes at least one of the following: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message.
  • the method further includes: the keep-alive library receiving the changed instance sent by the border gateway protocol Information; the keep-alive library updates the locally saved embodiment information based on the changed instance information.
  • the method further includes: receiving, by the keep-alive library, the gateway sent by the border gateway protocol for deleting The indication information of the instance information; the keep-alive library deletes the locally saved instance information according to the indication information, and stops sending the insurance Live message.
  • the method further includes: the keep-alive library receiving the sent by the border gateway protocol for querying The query information of the number of keep-alive messages is sent, and the keep-alive database queries the number of keep-alive messages that have been sent according to the query information, and reports the number of keep-alive messages that have been sent.
  • a device for transmitting a keep-alive message including: a processing module, configured to receive and save instance information sent by a border gateway protocol, where the instance information is used to indicate The keep-alive library sends the keep-alive message rule; the sending module is configured to periodically send the received keep-alive message according to the instance information.
  • the instance information includes at least one of the following: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message.
  • the apparatus further includes: a first receiving module, configured to receive the changed instance information sent by the border gateway protocol; and an updating module, configured to update the locally saved embodiment information according to the changed instance information.
  • the device further includes: a second receiving module, configured to receive the indication information that is sent by the border gateway protocol to delete the instance information; and the deleting module is configured to delete the locally saved according to the indication information. Instance information, and stop sending the keep-alive message.
  • the device further includes: a third receiving module, configured to receive query information sent by the border gateway protocol for querying the number of sent keepalive messages; and a query module, configured to query according to the query information The number of keep-alive messages sent and the number of keep-alive messages sent.
  • a third receiving module configured to receive query information sent by the border gateway protocol for querying the number of sent keepalive messages
  • a query module configured to query according to the query information The number of keep-alive messages sent and the number of keep-alive messages sent.
  • the keep-alive database receives and saves instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library is saved according to the saved location.
  • the information can continue to send the keep-alive message for the purpose of reducing the burden of the service process and saving the system resources, thereby solving the problem that the keep-alive message is not sent in time due to the busy service of the system in the related art.
  • FIG. 1 is a flowchart of a method for transmitting a keep-alive message according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a device for transmitting a keep-alive message according to an embodiment of the present invention
  • FIG. 3 is a block diagram 1 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention
  • FIG. 4 is a block diagram 2 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention
  • FIG. 5 is a block diagram 3 of an optional structure of a sending apparatus for a keep-alive message according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an interaction process of a keep-alive library according to an alternative embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for transmitting a keep-alive message according to an embodiment of the present invention. As shown in Figure 1, the steps of the method include:
  • Step S102 The keep-alive library receives and saves instance information sent by the border gateway protocol BGP.
  • Step S104 The keep-alive library periodically sends the received keep-alive message according to the instance information.
  • the protection library periodically sends the keep-alive packet according to the sending rule, and the keep-alive packet may first save the keep-alive packet, and then retrieve the keep-alive packet.
  • the keep-alive message sends the keep-alive message according to the sending rule.
  • the keepalive database receives and saves the instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library periodically sends the instance information according to the saved information.
  • the manner of receiving the keep-alive message is as follows: by saving the keep-alive message according to the example information that has been created and saved in the keep-alive library, it is only necessary to construct the keep-alive message and the sample information to continue.
  • the purpose of sending a keep-alive message is to achieve the technical effect of reducing the burden of the service process and saving the system resources, and the technology of the keep-alive timeout neighbor disconnection caused by the keep-alive message being sent in time due to the busy system service in the related art is solved. problem.
  • the instance information involved in the embodiment includes: a sending period of the keep-alive packet, a keep-alive type of the keep-alive packet, and a packet length of the keep-alive packet.
  • the keepalive type is a protocol type of the keepalive message, such as a BGP border gateway protocol, and the packet length may be a frame length of the keepalive packet.
  • the example information may also include the encapsulation mode of the keep-alive message, the sending manner, the carrying method, and the like, which are merely illustrative and do not limit the present invention.
  • the keep-alive embodiment may be further updated.
  • the method further includes: S21 - step S22, wherein
  • Step S21 The keep-alive library receives the changed instance information sent by the foregoing border gateway protocol
  • step S22 the keep-alive library updates the locally saved embodiment information according to the changed instance information.
  • the keep-alive library After receiving the new instance information, the keep-alive library first compares the new instance information with the sample information in the keep-alive library. If the corresponding instance information already exists in the keep-alive library, the old instance information is updated. Then, the keep-alive message is periodically sent according to the new instance information.
  • the example information in the keep-alive database may be deleted, and after the keep-alive database periodically sends the received keep-alive message according to the foregoing instance information, the method in this embodiment further The method includes: step S31 - step S32, wherein
  • Step S31 The keep-alive library receives the indication information sent by the foregoing border gateway protocol for deleting the instance information.
  • the BGP when BGP does not need to maintain a keepalive relationship, that is, when the keep-alive packet is not required to be sent, the BGP sends an indication to the keep-alive database to delete the instance information.
  • Step S32 The keep-alive library deletes the locally saved instance information according to the indication information, and stops sending the keep-alive message.
  • the number of times the keep-alive message is sent may be queried, and after the keep-alive database periodically sends the received keep-alive message according to the instance information, the method in this embodiment The method may further include: step S41 - step S42, wherein
  • step S41 the keep-alive database receives the query information sent by the border gateway protocol for querying the number of keep-alive packets sent;
  • step S42 the keep-alive library queries the number of the keep-alive messages that have been sent according to the query information, and reports the number of keep-alive messages that have been sent.
  • BGP may also query the keep-alive database for the number of keep-alive messages sent.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a plurality of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the above-described methods of various embodiments of the present invention.
  • a device for transmitting keep-alive messages is provided, which is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a structural block diagram of a device for transmitting a keep-alive message according to an embodiment of the present invention. As shown in FIG. 2, the device includes: a processing module 20, and a sending module 22, where
  • the processing module 20 is configured to receive and save instance information sent by the border gateway protocol
  • the sending module 22 is coupled to the processing module 20 and configured to periodically send the received keep-alive message according to the instance information.
  • the sending module 22 processes the keep-alive packet and the instance information received by the module 20, and periodically sends the keep-alive packet according to the sending rule, and the sending module 22 may also save the keep-alive packet first, and then the policy is saved.
  • the keep-alive message in the live library sends the keep-alive message according to the sending rule.
  • the processing module 20 receives and saves the instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive packet, and then the sending module 22 periodically sends the instance information according to the saved instance information.
  • the method of receiving the keep-alive message is to send the keep-alive message according to the example information that has been created and saved in the keep-alive library, so that only one keep-alive message and the sample information can be constructed to continue to send the message.
  • the purpose of the live message is to achieve the technical effect of reducing the burden of the service process and saving system resources, thereby solving the technical problem that the keep-alive timeout neighbor is broken due to the inability of the keep-alive message to be sent in time due to the busy system service.
  • the instance information involved in the embodiment may include: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message.
  • the keepalive type is a protocol type of the keep-alive packet, such as the border gateway protocol BGP, and the packet length may be a frame length of the keep-alive packet, and the instance information may further include a manner of encapsulating the keep-alive packet. It is to be noted that the present invention is not limited to the present invention.
  • FIG. 3 is a block diagram 1 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention, as shown in FIG.
  • the device processing processing module 20 and the sending module 22 include: a first receiving module 30, an updating module 32, wherein
  • the first receiving module 30 is configured to receive the changed instance information sent by the border gateway protocol
  • the update module 32 is coupled to the first receiving module 30 and the transmitting module 22 and is configured to update the locally saved embodiment information according to the changed instance information.
  • the keep-alive library After receiving the new instance information, the keep-alive library first compares the new instance information with the sample information in the keep-alive library. If the corresponding instance information already exists in the keep-alive library, the old instance information is updated. Then, the keep-alive message is periodically sent according to the new instance information.
  • FIG. 4 is a block diagram of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention.
  • the device processing module 20 and the sending module 22 include: a second receiving module 40, Deleting module 42, wherein
  • the second receiving module 40 is configured to receive the indication information that is sent by the foregoing border gateway protocol and used to delete the instance information.
  • the BGP when the BGP does not need to maintain a keepalive relationship with the neighboring device, that is, when the keepalive packet does not need to be sent, the BGP sends the indication information of deleting the instance information to the keep-alive database.
  • the deleting module 42 is configured to delete the locally saved instance information according to the foregoing indication information, and stop sending the keep-alive message.
  • the device processing module 20 and the sending module 22 include: a third receiving module 50, Query module 52, wherein
  • the third receiving module 50 is configured to receive the query information sent by the foregoing border gateway protocol for querying the number of sent keepalive messages;
  • the querying module 52 is configured to query the number of the keep-alive messages that have been sent according to the query information, and report the number of keep-alive messages that have been sent.
  • BGP may also query the keep-alive database for the number of keep-alive messages sent.
  • each of the foregoing modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; Don't be in multiple processors.
  • the optional embodiment provides a method for implementing BGP keepalive message transmission based on the keep-alive library.
  • BGP only needs to construct a keep-alive message once and send it once, which can effectively reduce the service.
  • the burden of the process saves the system resources; the subsequent delivery of keep-alive packets by the keep-alive library avoids the phenomenon that the keep-alive timeout neighbors are broken due to busy traffic, which enhances the stability of the service.
  • the BGP will provide the keep-alive packet format and the sending interval to be sent to the keep-alive database, and the keep-alive library will copy the keep-alive packets. Send it, and BGP itself does not need to send it again. If the negotiated keep-alive time is equal to 0, the keep-alive message is not sent. The number of keep-alive packets sent, based on the neighbor group that BGP needs to query, constructs a message and performs bulk query to the keep-alive library.
  • FIG. 6 is a schematic diagram of an interaction process of a keep-alive library according to an alternative embodiment of the present invention. As shown in FIG. 6, the steps of the interaction process include:
  • Step S602 the BGP creates a keepalive instance corresponding to the neighbor, and the client (Client) synchronizes the keepalive instance information to the server (Server) of the keep-alive library.
  • the keep-alive instance includes an interval for sending packets, a keep-alive type, and a packet length.
  • Step S604 the BGP invokes the keep-alive interface to send the keep-alive message, and the client synchronizes the keep-alive message to the server of the keep-alive library, and the keep-alive message is sent by the keep-alive database periodically;
  • step S606 the instance information is changed.
  • the keepalive interface is re-invoked, and the instance information and the keep-alive message information are synchronized to the keep-alive database.
  • step S608 when the BGP needs to query the number of the keep-alive packets, the keepalive instance corresponding to the neighbor to be queried is packaged into a group, and the client synchronizes the query information to the keep-alive server to query and obtain the query result. After the server synchronizes to the client, BGP asynchronously obtains the required query result;
  • step S610 for the link that does not need to re-send the keep-alive message or the link that needs to be disconnected, the BGP deletes the keep-alive instance corresponding to the neighbor, and the client synchronizes to the server, notifying the keep-alive database that the keep-alive message is no longer sent.
  • the service process periodically sends the keep-alive message, and the original process needs to periodically exchange with the sending and receiving packet process.
  • only one message needs to be constructed once, which can greatly save system resources, and the scheduled keep-alive message is handed over.
  • the completion of the keep-alive database ensures that the periodic keep-alive message transmission is not affected by the busy traffic, which can effectively enhance the stability of the service.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the instance information sent by the border gateway protocol is received and saved, where the instance information is used to indicate that the keep-alive database sends the keep-alive message.
  • the received keep-alive message is periodically sent according to the foregoing instance information.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the keep-alive database receives and saves instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library is saved according to the saved location.
  • the information can continue to send the keep-alive message for the purpose of reducing the burden of the service process and saving the system resources, thereby solving the problem that the keep-alive message is not sent in time due to the busy service of the system in the related art.

Abstract

Disclosed are a method and apparatus for sending a keepalive message. The method comprises: a keepalive base receives and stores instance information sent by a Border Gateway Protocol (BGP), the instance information being used for indicating a rule of sending, by the keepalive base, a keepalive message; and the keepalive base periodically sends the received keepalive message according to the instance information. The present invention resolves the technical problems in the related art of keepalive timeout and neighbor link breakage caused by the fact that a keepalive message cannot be sent in time due to heavy system traffic.

Description

保活报文的发送方法及装置Method and device for transmitting keep-alive message 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种保活报文的发送方法及装置。The present invention relates to the field of communications, and in particular to a method and apparatus for transmitting keep-alive messages.
背景技术Background technique
保活报文(KEEPALIVE)是在路由设备间进行交换的周期性报文,依次来保持设备间的邻居关系。保持时间是接收相继的KEEPALIVE或UPDATE报文之间可经过的最大时间。保活报文以保持时间的1/3为周期来发送。KEEPALIVE is a periodic message exchanged between routing devices to maintain neighbor relationships between devices. The hold time is the maximum time that can elapse between receiving successive KEEPALIVE or UPDATE messages. The keep-alive message is sent in a period of 1/3 of the hold time.
相关技术中的保活报文发送方法原来是由边界网关协议自身构建保活报文进行周期性发送,这样当业务繁忙由于保活报文不能及时发送而容易导致保活超时邻居断链的现象出现。In the related art, the keep-alive message sending method is originally configured by the border gateway protocol itself to construct a keep-alive message, so that when the service is busy, the keep-alive message cannot be sent in time, which may easily lead to the phenomenon of keep-alive timeout neighbors being broken. appear.
针对相关技术中在系统业务繁忙时保活报文不能及时发出,而致使保活超时邻居断链的问题,目前尚未提出有效的解决方案。In the related art, when the system service is busy, the keep-alive message cannot be sent in time, and the problem of the keep-alive timeout neighbor is broken, and no effective solution has been proposed yet.
发明内容Summary of the invention
本发明实施例提供了一种保活报文的发送及装置,以至少解决相关技术中由于系统业务繁忙导致保活报文不能及时发送致使保活超时邻居断链的技术问题。The embodiment of the present invention provides a method for transmitting a keep-alive message and a device to solve at least the technical problem that the keep-alive message cannot be sent in time due to the busy system service, causing the keep-alive timeout neighbor to be broken.
根据本发明实施例的一个方面,提供了一种保活报文的发送方法,包括:保活库接收并保存边界网关协议(Border Gateway Protocol,简称为BGP)发送的实例信息,其中,所述实例信息用于指示所述保活库发送所述保活报文的规则;所述保活库依据所述实例信息周期性发送接收到的保活报文。According to an aspect of the embodiments of the present invention, a method for sending a keep-alive message is provided, including: the keep-alive library receives and stores instance information sent by a Border Gateway Protocol (BGP), where The instance information is used to instruct the keep-alive database to send the keep-alive message. The keep-alive library periodically sends the received keep-alive message according to the instance information.
可选地,所述实例信息包括以下至少之一:所述保活报文的发送周期、所述保活报文的保活类型、所述保活报文的报文长度。Optionally, the instance information includes at least one of the following: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message.
可选地,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:所述保活库接收所述边界网关协议发送的更改后的实例信息;所述保活库根据更改后的实例信息更新本地保存的实施例信息。Optionally, after the keep-alive database periodically sends the received keep-alive message according to the instance information, the method further includes: the keep-alive library receiving the changed instance sent by the border gateway protocol Information; the keep-alive library updates the locally saved embodiment information based on the changed instance information.
可选地,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:所述保活库接收所述边界网关协议发送的用于删除所述实例信息的指示信息;所述保活库根据所述指示信息删除本地保存的实例信息,并停止发送所述保 活报文。Optionally, after the keep-alive database periodically sends the received keep-alive message according to the instance information, the method further includes: receiving, by the keep-alive library, the gateway sent by the border gateway protocol for deleting The indication information of the instance information; the keep-alive library deletes the locally saved instance information according to the indication information, and stops sending the insurance Live message.
可选地,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:所述保活库接收所述边界网关协议发送的用于查询已发送保活报文数目的查询信息;所述保活库根据所述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。Optionally, after the keep-alive database periodically sends the received keep-alive message according to the instance information, the method further includes: the keep-alive library receiving the sent by the border gateway protocol for querying The query information of the number of keep-alive messages is sent, and the keep-alive database queries the number of keep-alive messages that have been sent according to the query information, and reports the number of keep-alive messages that have been sent.
根据本发明实施例的另一方面,还提供了一种保活报文的发送装置,包括:处理模块,设置为接收并保存边界网关协议发送的实例信息,其中,所述实例信息用于指示所述保活库发送所述保活报文的规则;发送模块,设置为依据所述实例信息周期性发送接收到的保活报文。According to another aspect of the present invention, a device for transmitting a keep-alive message is provided, including: a processing module, configured to receive and save instance information sent by a border gateway protocol, where the instance information is used to indicate The keep-alive library sends the keep-alive message rule; the sending module is configured to periodically send the received keep-alive message according to the instance information.
可选地,所述实例信息包括以下至少之一:所述保活报文的发送周期、所述保活报文的保活类型、所述保活报文的报文长度。Optionally, the instance information includes at least one of the following: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message.
可选地,所述装置还包括:第一接收模块,设置为接收所述边界网关协议发送的更改后的实例信息;更新模块,设置为根据更改后的实例信息更新本地保存的实施例信息。Optionally, the apparatus further includes: a first receiving module, configured to receive the changed instance information sent by the border gateway protocol; and an updating module, configured to update the locally saved embodiment information according to the changed instance information.
可选地,所述装置还包括:第二接收模块,设置为接收所述边界网关协议发送的用于删除所述实例信息的指示信息;删除模块,设置为根据所述指示信息删除本地保存的实例信息,并停止发送所述保活报文。Optionally, the device further includes: a second receiving module, configured to receive the indication information that is sent by the border gateway protocol to delete the instance information; and the deleting module is configured to delete the locally saved according to the indication information. Instance information, and stop sending the keep-alive message.
可选地,所述装置还包括:第三接收模块,设置为接收所述边界网关协议发送的用于查询已发送保活报文数目的查询信息;查询模块,设置为根据所述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。Optionally, the device further includes: a third receiving module, configured to receive query information sent by the border gateway protocol for querying the number of sent keepalive messages; and a query module, configured to query according to the query information The number of keep-alive messages sent and the number of keep-alive messages sent.
在本发明实施例中,采用保活库接收并保存边界网关协议发送的用于指示所述保活库发送所述保活报文的规则的实例信息,然后所述保活库依据保存的所述实例信息周期性发送接收到的保活报文的方式,通过在保活库中根据已经创建和保存好的示例信息来发送保活报文,达到了仅需构建一次保活报文和示例信息就能持续发送保活报文的目的,从而实现减轻业务进程负担和节省系统资源的技术效果,进而解决了相关技术中由于系统业务繁忙导致保活报文不能及时发送而导致保活超时邻居断链的技术问题。In the embodiment of the present invention, the keep-alive database receives and saves instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library is saved according to the saved location. The manner in which the instance information periodically sends the received keep-alive message, and sends the keep-alive message according to the example information that has been created and saved in the keep-alive database, and only needs to construct a keep-alive message and an example. The information can continue to send the keep-alive message for the purpose of reducing the burden of the service process and saving the system resources, thereby solving the problem that the keep-alive message is not sent in time due to the busy service of the system in the related art. Technical problems with broken links.
附图说明DRAWINGS
构成本申请的一部分的附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中: The accompanying drawings, which are incorporated in the claims In the drawing:
图1是根据本发明实施例的保活报文的发送方法的流程图;1 is a flowchart of a method for transmitting a keep-alive message according to an embodiment of the present invention;
图2是根据本发明实施例的保活报文的发送装置的结构框图;2 is a structural block diagram of a device for transmitting a keep-alive message according to an embodiment of the present invention;
图3是根据本发明实施例的保活报文的发送装置的可选结构框图一;3 is a block diagram 1 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention;
图4是根据本发明实施例的保活报文的发送装置的可选结构框图二;4 is a block diagram 2 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention;
图5是根据本发明实施例的保活报文的发送装置的可选结构框图三;以及FIG. 5 is a block diagram 3 of an optional structure of a sending apparatus for a keep-alive message according to an embodiment of the present invention;
图6是根据本发明可选实施例的保活库的交互流程示意图。FIG. 6 is a schematic diagram of an interaction process of a keep-alive library according to an alternative embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
根据本发明实施例,提供了一种保活报文的发送方法,图1是根据本发明实施例的保活报文的发送方法的流程图。如图1所示,该方法的步骤包括:According to an embodiment of the present invention, a method for transmitting a keep-alive message is provided, and FIG. 1 is a flowchart of a method for transmitting a keep-alive message according to an embodiment of the present invention. As shown in Figure 1, the steps of the method include:
步骤S102,保活库接收并保存边界网关协议BGP发送的实例信息;Step S102: The keep-alive library receives and saves instance information sent by the border gateway protocol BGP.
步骤S104,保活库依据该实例信息周期性发送接收到的保活报文。Step S104: The keep-alive library periodically sends the received keep-alive message according to the instance information.
可选的,保护库对接收到的保活报文和实例信息,根据发送规则对保活报文进行周期性发送,保活库还可以先保存保活报文,然后调取保活库中的保活报文按照发送规则发送保活报文。Optionally, the protection library periodically sends the keep-alive packet according to the sending rule, and the keep-alive packet may first save the keep-alive packet, and then retrieve the keep-alive packet. The keep-alive message sends the keep-alive message according to the sending rule.
在本实施例中,采用保活库接收并保存边界网关协议发送的用于指示上述保活库发送上述保活报文的规则的实例信息,然后保活库依据保存的该实例信息周期性发送接收到的保活报文的方式,通过在保活库中根据已经创建和保存好的示例信息来发送保活报文的方式,达到了仅需构建一次保活报文和示例信息就能持续发送保活报文的目的,从而实现减轻业务进程负担和节省系统资源的技术效果,进而解决了相关技术中由于系统业务繁忙导致保活报文不能及时发送而导致保活超时邻居断链的技术问题。In this embodiment, the keepalive database receives and saves the instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library periodically sends the instance information according to the saved information. The manner of receiving the keep-alive message is as follows: by saving the keep-alive message according to the example information that has been created and saved in the keep-alive library, it is only necessary to construct the keep-alive message and the sample information to continue. The purpose of sending a keep-alive message is to achieve the technical effect of reducing the burden of the service process and saving the system resources, and the technology of the keep-alive timeout neighbor disconnection caused by the keep-alive message being sent in time due to the busy system service in the related art is solved. problem.
可选地,本实施例中涉及到的实例信息包括:上述保活报文的发送周期、上述保活报文的保活类型、上述保活报文的报文长度。可选地,保活类型为保活报文的协议类型,如BGP边界网关协议,报文长度可以为保活报文的帧长度,需要说明的是,该 实例信息还可以包括保活报文的封装方式,发送方式,承载方法等,在此只是举例说明,并不对本发明构成任何限定。Optionally, the instance information involved in the embodiment includes: a sending period of the keep-alive packet, a keep-alive type of the keep-alive packet, and a packet length of the keep-alive packet. Optionally, the keepalive type is a protocol type of the keepalive message, such as a BGP border gateway protocol, and the packet length may be a frame length of the keepalive packet. The example information may also include the encapsulation mode of the keep-alive message, the sending manner, the carrying method, and the like, which are merely illustrative and do not limit the present invention.
在本实施例的一个可选的实施方式中,还可以对保活实施例进行更新,在上述保活库依据上述实例信息周期性发送接收到的保活报文之后,上述方法还包括:步骤S21-步骤S22,其中,In an optional implementation manner of the embodiment, the keep-alive embodiment may be further updated. After the keep-alive database periodically sends the received keep-alive message according to the foregoing instance information, the method further includes: S21 - step S22, wherein
步骤S21,上述保活库接收上述边界网关协议发送的更改后的实例信息;Step S21: The keep-alive library receives the changed instance information sent by the foregoing border gateway protocol;
可选的,BGP在首次创建和发送保活报文后,可能需要更改实例信息和保活报文。Optionally, after the BGP creates and sends keep-alive packets for the first time, you may need to change the instance information and keep-alive packets.
步骤S22,上述保活库根据更改后的实例信息更新本地保存的实施例信息。In step S22, the keep-alive library updates the locally saved embodiment information according to the changed instance information.
保活库在收到新的实例信息后,首先将新的实例信息和保活库中示例信息进行比对,如果保活库中已经存在对应的实例信息,则对旧的实例信息进行更新,然后按照新的实例信息周期性发送保活报文。After receiving the new instance information, the keep-alive library first compares the new instance information with the sample information in the keep-alive library. If the corresponding instance information already exists in the keep-alive library, the old instance information is updated. Then, the keep-alive message is periodically sent according to the new instance information.
在本实施例一个可选的实施方式中,还可以删除保活库中的示例信息,在上述保活库依据上述实例信息周期性发送接收到的保活报文之后,本实施例的方法还包括:步骤S31-步骤S32,其中,In an optional implementation manner of this embodiment, the example information in the keep-alive database may be deleted, and after the keep-alive database periodically sends the received keep-alive message according to the foregoing instance information, the method in this embodiment further The method includes: step S31 - step S32, wherein
步骤S31,保活库接收上述边界网关协议发送的用于删除上述实例信息的指示信息;Step S31: The keep-alive library receives the indication information sent by the foregoing border gateway protocol for deleting the instance information.
可选的,当BGP不需要保持保活关系,即不需要再发送保活报文时,BGP向保活库发送删除实例信息的指示信息。Optionally, when BGP does not need to maintain a keepalive relationship, that is, when the keep-alive packet is not required to be sent, the BGP sends an indication to the keep-alive database to delete the instance information.
步骤S32,保活库根据该指示信息删除本地保存的实例信息,并停止发送保活报文。Step S32: The keep-alive library deletes the locally saved instance information according to the indication information, and stops sending the keep-alive message.
在本实施例的一个可选的实施方式中,还可以查询保活报文的发送次数,在上述保活库依据上述实例信息周期性发送接收到的保活报文之后,本实施例的方法还可以包括:步骤S41-步骤S42,其中,In an optional implementation manner of this embodiment, the number of times the keep-alive message is sent may be queried, and after the keep-alive database periodically sends the received keep-alive message according to the instance information, the method in this embodiment The method may further include: step S41 - step S42, wherein
步骤S41,上述保活库接收上述边界网关协议发送的用于查询已发送保活报文数目的查询信息;In step S41, the keep-alive database receives the query information sent by the border gateway protocol for querying the number of keep-alive packets sent;
步骤S42,上述保活库根据上述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。In step S42, the keep-alive library queries the number of the keep-alive messages that have been sent according to the query information, and reports the number of keep-alive messages that have been sent.
可选的,BGP为了监控或者管理保活报文,还可以向保活库查询保活报文的发送次数。 Optionally, in order to monitor or manage keep-alive messages, BGP may also query the keep-alive database for the number of keep-alive messages sent.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例上述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM). The instructions include a plurality of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the above-described methods of various embodiments of the present invention.
在本实施例中还提供了一种保活报文的发送装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a device for transmitting keep-alive messages is provided, which is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的保活报文的发送装置的结构框图,如图2所示,该装置包括:处理模块20、发送模块22,其中,2 is a structural block diagram of a device for transmitting a keep-alive message according to an embodiment of the present invention. As shown in FIG. 2, the device includes: a processing module 20, and a sending module 22, where
处理模块20,设置为接收并保存边界网关协议发送的实例信息;The processing module 20 is configured to receive and save instance information sent by the border gateway protocol;
发送模块22,与处理模块20耦合连接,设置为依据上述实例信息周期性发送接收到的保活报文。The sending module 22 is coupled to the processing module 20 and configured to periodically send the received keep-alive message according to the instance information.
可选的,发送模块22处理模块20接收到的保活报文和实例信息,根据发送规则对保活报文进行周期性发送,发送模块22还可以先保存保活报文,然后调取保活库中的保活报文按照发送规则发送保活报文。Optionally, the sending module 22 processes the keep-alive packet and the instance information received by the module 20, and periodically sends the keep-alive packet according to the sending rule, and the sending module 22 may also save the keep-alive packet first, and then the policy is saved. The keep-alive message in the live library sends the keep-alive message according to the sending rule.
在本实施例中,采用处理模块20接收并保存边界网关协议发送的用于指示上述保活库发送上述保活报文的规则的实例信息,然后发送模块22依据保存的上述实例信息周期性发送接收到的保活报文的方式,通过在保活库中根据已经创建和保存好的示例信息来发送保活报文,达到了仅需构建一次保活报文和示例信息就能持续发送保活报文的目的,从而实现减轻业务进程负担和节省系统资源的技术效果,进而解决了相关技术中由于系统业务繁忙导致保活报文不能及时发送而导致保活超时邻居断链的技术问题。In this embodiment, the processing module 20 receives and saves the instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive packet, and then the sending module 22 periodically sends the instance information according to the saved instance information. The method of receiving the keep-alive message is to send the keep-alive message according to the example information that has been created and saved in the keep-alive library, so that only one keep-alive message and the sample information can be constructed to continue to send the message. The purpose of the live message is to achieve the technical effect of reducing the burden of the service process and saving system resources, thereby solving the technical problem that the keep-alive timeout neighbor is broken due to the inability of the keep-alive message to be sent in time due to the busy system service.
可选地,本实施例中涉及到的实例信息可以包括:保活报文的发送周期、保活报文的保活类型、保活报文的报文长度。可选地,保活类型为保活报文的协议类型,如边界网关协议BGP,报文长度可以为保活报文的帧长度,此外,该实例信息还可以包括保活报文的封装方式,发送方式,承载方法等,需要说明的是,在此仅仅举例说明,并不对本发明构成任何限定。Optionally, the instance information involved in the embodiment may include: a sending period of the keep-alive message, a keep-alive type of the keep-alive message, and a packet length of the keep-alive message. Optionally, the keepalive type is a protocol type of the keep-alive packet, such as the border gateway protocol BGP, and the packet length may be a frame length of the keep-alive packet, and the instance information may further include a manner of encapsulating the keep-alive packet. It is to be noted that the present invention is not limited to the present invention.
图3是根据本发明实施例的保活报文的发送装置的可选结构框图一,如图3所示, 该装置处理处理模块20和发送模块22之外,包括:第一接收模块30、更新模块32,其中,3 is a block diagram 1 of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention, as shown in FIG. The device processing processing module 20 and the sending module 22 include: a first receiving module 30, an updating module 32, wherein
第一接收模块30,设置为接收边界网关协议发送的更改后的实例信息;The first receiving module 30 is configured to receive the changed instance information sent by the border gateway protocol;
可选的,BGP在首次创建和发送保活报文后,可能需要更改实例信息和保活报文。Optionally, after the BGP creates and sends keep-alive packets for the first time, you may need to change the instance information and keep-alive packets.
更新模块32,与该第一接收模块30和发送模块22耦合连接,设置为根据更改后的实例信息更新本地保存的实施例信息。The update module 32 is coupled to the first receiving module 30 and the transmitting module 22 and is configured to update the locally saved embodiment information according to the changed instance information.
保活库在收到新的实例信息后,首先将新的实例信息和保活库中示例信息进行比对,如果保活库中已经存在对应的实例信息,则对旧的实例信息进行更新,然后按照新的实例信息周期性发送保活报文。After receiving the new instance information, the keep-alive library first compares the new instance information with the sample information in the keep-alive library. If the corresponding instance information already exists in the keep-alive library, the old instance information is updated. Then, the keep-alive message is periodically sent according to the new instance information.
图4是根据本发明实施例的保活报文的发送装置的可选结构框图二,如图4所示,该装置处理处理模块20和发送模块22之外,包括:第二接收模块40、删除模块42,其中,FIG. 4 is a block diagram of an optional structure of a device for transmitting a keep-alive message according to an embodiment of the present invention. As shown in FIG. 4, the device processing module 20 and the sending module 22 include: a second receiving module 40, Deleting module 42, wherein
第二接收模块40,设置为接收上述边界网关协议发送的用于删除上述实例信息的指示信息;The second receiving module 40 is configured to receive the indication information that is sent by the foregoing border gateway protocol and used to delete the instance information.
可选的,当上述BGP不需要和邻居设备保持保活关系,即不需要再发送保活报文时,BGP向保活库发送删除实例信息的指示信息。Optionally, when the BGP does not need to maintain a keepalive relationship with the neighboring device, that is, when the keepalive packet does not need to be sent, the BGP sends the indication information of deleting the instance information to the keep-alive database.
删除模块42,设置为根据上述指示信息删除本地保存的实例信息,并停止发送上述保活报文。The deleting module 42 is configured to delete the locally saved instance information according to the foregoing indication information, and stop sending the keep-alive message.
图5是根据本发明实施例的保活报文的发送装置的可选结构框图三,如图5所示,该装置处理处理模块20和发送模块22之外,包括:第三接收模块50、查询模块52,其中,5 is a block diagram 3 of an optional structure of a device for transmitting keep-alive messages according to an embodiment of the present invention. As shown in FIG. 5, the device processing module 20 and the sending module 22 include: a third receiving module 50, Query module 52, wherein
第三接收模块50,设置为接收上述边界网关协议发送的用于查询已发送保活报文数目的查询信息;The third receiving module 50 is configured to receive the query information sent by the foregoing border gateway protocol for querying the number of sent keepalive messages;
查询模块52,设置为根据上述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。The querying module 52 is configured to query the number of the keep-alive messages that have been sent according to the query information, and report the number of keep-alive messages that have been sent.
可选的,BGP为了监控或者管理保活报文,还可以向保活库查询保活报文的发送次数。Optionally, in order to monitor or manage keep-alive messages, BGP may also query the keep-alive database for the number of keep-alive messages sent.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分 别位于多个处理器中。It should be noted that each of the foregoing modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; Don't be in multiple processors.
下面结合本实施例的可选实施例对本发明进行举例说明。The invention will now be described in connection with an alternative embodiment of the embodiment.
本可选实施例提供了一种基于保活库的实现BGP保活报文发送的方法,在本可选实施例中,BGP仅需构建一次保活报文,发送一次,能够有效减轻了业务进程的负担,节省了系统资源;后续交由保活库定时发送保活报文,避免了因业务繁忙导致保活超时邻居断链的现象出现,增强了业务的稳定性。The optional embodiment provides a method for implementing BGP keepalive message transmission based on the keep-alive library. In this alternative embodiment, BGP only needs to construct a keep-alive message once and send it once, which can effectively reduce the service. The burden of the process saves the system resources; the subsequent delivery of keep-alive packets by the keep-alive library avoids the phenomenon that the keep-alive timeout neighbors are broken due to busy traffic, which enhances the stability of the service.
在本可选实施例中,如果协商好的保活时间大于0时,BGP将需发送的保活报文格式和发送间隔提供给保活库,保活库将复制过来的保活报文定时发送即可,而BGP自身无须再发送。如果协商好的保活时间等于0时,保活报文不用发送。已发送的保活报文数目,根据BGP需要查询的邻居组,构建一次消息向保活库进行批量查询。In this optional embodiment, if the negotiated keep-alive time is greater than 0, the BGP will provide the keep-alive packet format and the sending interval to be sent to the keep-alive database, and the keep-alive library will copy the keep-alive packets. Send it, and BGP itself does not need to send it again. If the negotiated keep-alive time is equal to 0, the keep-alive message is not sent. The number of keep-alive packets sent, based on the neighbor group that BGP needs to query, constructs a message and performs bulk query to the keep-alive library.
图6是根据本发明可选实施例的保活库的交互流程示意图,如图6所示,该交互流程的步骤包括:FIG. 6 is a schematic diagram of an interaction process of a keep-alive library according to an alternative embodiment of the present invention. As shown in FIG. 6, the steps of the interaction process include:
步骤S602,BGP创建邻居对应的保活实例,并由客户端(Client)同步保活实例信息给保活库的服务端(Server),Step S602, the BGP creates a keepalive instance corresponding to the neighbor, and the client (Client) synchronizes the keepalive instance information to the server (Server) of the keep-alive library.
其中,该保活实例包括发送报文间隔时间,保活类型,报文长度等;The keep-alive instance includes an interval for sending packets, a keep-alive type, and a packet length.
步骤S604,BGP调用保活接口发送保活报文,客户端同步保活报文信息给保活库的服务端,由保活库定时发送保活报文;Step S604, the BGP invokes the keep-alive interface to send the keep-alive message, and the client synchronizes the keep-alive message to the server of the keep-alive library, and the keep-alive message is sent by the keep-alive database periodically;
步骤S606,更改实例信息,当BGP更改了实例信息后,重新调用保活接口,并同步实例信息和保活报文信息给保活库;In step S606, the instance information is changed. After the BGP changes the instance information, the keepalive interface is re-invoked, and the instance information and the keep-alive message information are synchronized to the keep-alive database.
步骤S608,当BGP需要查询已发送的保活报文数目时,将需查询的邻居所对应的保活实例打包成组,由客户端同步查询信息给保活库服务端去查询,获取查询结果后再由服务端同步给客户端,BGP异步获取所需要的查询结果;In step S608, when the BGP needs to query the number of the keep-alive packets, the keepalive instance corresponding to the neighbor to be queried is packaged into a group, and the client synchronizes the query information to the keep-alive server to query and obtain the query result. After the server synchronizes to the client, BGP asynchronously obtains the required query result;
步骤S610,对于不需要再发送保活报文的链接或需要断开的链接,BGP删除邻居对应的保活实例,由客户端同步给服务端,通知保活库不再发送保活报文。In step S610, for the link that does not need to re-send the keep-alive message or the link that needs to be disconnected, the BGP deletes the keep-alive instance corresponding to the neighbor, and the client synchronizes to the server, notifying the keep-alive database that the keep-alive message is no longer sent.
业务进程定时发送保活报文,原来需要与收发包进程进行周期性交互,而本实施例只需要构建一次报文,发送一次,可以极大地节省系统资源;而定时发送保活报文交由保活库完成,保障了周期性的保活报文发送不受业务繁忙影响,可以有效增强业务的稳定性。The service process periodically sends the keep-alive message, and the original process needs to periodically exchange with the sending and receiving packet process. In this embodiment, only one message needs to be constructed once, which can greatly save system resources, and the scheduled keep-alive message is handed over. The completion of the keep-alive database ensures that the periodic keep-alive message transmission is not affected by the busy traffic, which can effectively enhance the stability of the service.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码: Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,接收并保存边界网关协议发送的实例信息,其中,上述实例信息用于指示上述保活库发送上述保活报文的规则;S1. The instance information sent by the border gateway protocol is received and saved, where the instance information is used to indicate that the keep-alive database sends the keep-alive message.
S2,依据上述实例信息周期性发送接收到的保活报文。S2. The received keep-alive message is periodically sent according to the foregoing instance information.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上上述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above is only an alternative embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
在本发明实施例中,采用保活库接收并保存边界网关协议发送的用于指示所述保活库发送所述保活报文的规则的实例信息,然后所述保活库依据保存的所述实例信息周期性发送接收到的保活报文的方式,通过在保活库中根据已经创建和保存好的示例信息来发送保活报文,达到了仅需构建一次保活报文和示例信息就能持续发送保活报文的目的,从而实现减轻业务进程负担和节省系统资源的技术效果,进而解决了相关技术中由于系统业务繁忙导致保活报文不能及时发送而导致保活超时邻居断链的技术问题。 In the embodiment of the present invention, the keep-alive database receives and saves instance information sent by the border gateway protocol for instructing the keep-alive library to send the keep-alive message, and then the keep-alive library is saved according to the saved location. The manner in which the instance information periodically sends the received keep-alive message, and sends the keep-alive message according to the example information that has been created and saved in the keep-alive database, and only needs to construct a keep-alive message and an example. The information can continue to send the keep-alive message for the purpose of reducing the burden of the service process and saving the system resources, thereby solving the problem that the keep-alive message is not sent in time due to the busy service of the system in the related art. Technical problems with broken links.

Claims (10)

  1. 一种保活报文的发送方法,包括:A method for sending keep-alive messages, including:
    保活库接收并保存边界网关协议BGP发送的实例信息,其中,所述实例信息用于指示所述保活库发送所述保活报文的规则;The keep-alive database receives and saves the instance information sent by the border gateway protocol BGP, where the instance information is used to instruct the keep-alive database to send the keep-alive message rule;
    所述保活库依据所述实例信息周期性发送接收到的保活报文。The keep-alive library periodically sends the received keep-alive message according to the instance information.
  2. 根据权利要求1所述的方法,其中,所述实例信息包括以下至少之一:The method of claim 1, wherein the instance information comprises at least one of the following:
    所述保活报文的发送周期、所述保活报文的保活类型、所述保活报文的报文长度。The transmission period of the keep-alive message, the keep-alive type of the keep-alive message, and the packet length of the keep-alive message.
  3. 根据权利要求1所述的方法,其中,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:The method according to claim 1, wherein after the keep-alive library periodically sends the received keep-alive message according to the instance information, the method further includes:
    所述保活库接收所述边界网关协议发送的更改后的实例信息;The keep-alive library receives the changed instance information sent by the border gateway protocol;
    所述保活库根据更改后的实例信息更新本地保存的实施例信息。The keep-alive library updates the locally saved embodiment information according to the changed instance information.
  4. 根据权利要求1或3所述的方法,其中,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:The method according to claim 1 or 3, wherein after the keep-alive library periodically sends the received keep-alive message according to the instance information, the method further includes:
    所述保活库接收所述边界网关协议发送的用于删除所述实例信息的指示信息;The keep-alive library receives the indication information sent by the border gateway protocol for deleting the instance information;
    所述保活库根据所述指示信息删除本地保存的实例信息,并停止发送所述保活报文。The keep-alive library deletes the locally saved instance information according to the indication information, and stops sending the keep-alive message.
  5. 根据权利要求1所述的方法,其中,在所述保活库依据所述实例信息周期性发送接收到的保活报文之后,所述方法还包括:The method according to claim 1, wherein after the keep-alive library periodically sends the received keep-alive message according to the instance information, the method further includes:
    所述保活库接收所述边界网关协议发送的用于查询已发送保活报文数目的查询信息;The keep-alive library receives the query information sent by the border gateway protocol for querying the number of sent keep-alive messages;
    所述保活库根据所述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。The keep-alive database queries the number of keep-alive messages that have been sent according to the query information, and reports the number of keep-alive messages that have been sent.
  6. 一种保活报文的发送装置,包括:A device for transmitting keep-alive messages, comprising:
    处理模块,设置为接收并保存边界网关协议发送的实例信息,其中,所述实例信息用于指示所述保活库发送所述保活报文的规则;a processing module, configured to receive and save instance information sent by the border gateway protocol, where the instance information is used to instruct the keep-alive database to send the keep-alive message rule;
    发送模块,设置为依据所述实例信息周期性发送接收到的保活报文。 The sending module is configured to periodically send the received keep-alive message according to the instance information.
  7. 根据权利要求6所述的装置,其中,所述实例信息包括以下至少之一:The apparatus of claim 6, wherein the instance information comprises at least one of the following:
    所述保活报文的发送周期、所述保活报文的保活类型、所述保活报文的报文长度。The transmission period of the keep-alive message, the keep-alive type of the keep-alive message, and the packet length of the keep-alive message.
  8. 根据权利要求6所述的装置,其中,所述装置还包括:The apparatus of claim 6 wherein said apparatus further comprises:
    第一接收模块,设置为接收所述边界网关协议发送的更改后的实例信息;a first receiving module, configured to receive the changed instance information sent by the border gateway protocol;
    更新模块,设置为根据更改后的实例信息更新本地保存的实施例信息。The update module is set to update locally saved embodiment information based on the changed instance information.
  9. 根据权利要求6或8所述的装置,其中,所述装置还包括:The device according to claim 6 or 8, wherein the device further comprises:
    第二接收模块,设置为接收所述边界网关协议发送的用于删除所述实例信息的指示信息;a second receiving module, configured to receive indication information that is sent by the border gateway protocol to delete the instance information;
    删除模块,设置为根据所述指示信息删除本地保存的实例信息,并停止发送所述保活报文。The deleting module is configured to delete the locally saved instance information according to the indication information, and stop sending the keep-alive message.
  10. 根据权利要求6所述的装置,其中,所述装置还包括:The apparatus of claim 6 wherein said apparatus further comprises:
    第三接收模块,设置为接收所述边界网关协议发送的用于查询已发送保活报文数目的查询信息;a third receiving module, configured to receive the query information sent by the border gateway protocol for querying the number of keep-alive messages sent;
    查询模块,设置为根据所述查询信息查询已发送的保活报文的数目,并上报已发送的保活报文的数目。 The query module is configured to query the number of keep-alive messages that have been sent according to the query information, and report the number of keep-alive messages that have been sent.
PCT/CN2015/094033 2015-06-30 2015-11-06 Method and apparatus for sending keepalive message WO2017000464A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510373771.XA CN106330696A (en) 2015-06-30 2015-06-30 Sending method and device for keep-alive messages
CN201510373771.X 2015-06-30

Publications (1)

Publication Number Publication Date
WO2017000464A1 true WO2017000464A1 (en) 2017-01-05

Family

ID=57607594

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094033 WO2017000464A1 (en) 2015-06-30 2015-11-06 Method and apparatus for sending keepalive message

Country Status (2)

Country Link
CN (1) CN106330696A (en)
WO (1) WO2017000464A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233855A1 (en) * 2006-04-03 2007-10-04 International Business Machines Corporation Adaptible keepalive for enterprise extenders
CN101094186A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method and interface board of retaining neighbourhood
CN101262430A (en) * 2008-04-25 2008-09-10 中兴通讯股份有限公司 A distributed keeping alive routing device and method
CN102957623A (en) * 2012-11-28 2013-03-06 杭州华三通信技术有限公司 Maintenance method and equipment of neighborhood of border gate protocol

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136772B (en) * 2007-09-28 2010-10-27 华为技术有限公司 Timing transmission packet method and packet transmission module
CN102739549B (en) * 2012-07-13 2015-10-21 华为技术有限公司 Receive the method for message, the method sending message and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233855A1 (en) * 2006-04-03 2007-10-04 International Business Machines Corporation Adaptible keepalive for enterprise extenders
CN101094186A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method and interface board of retaining neighbourhood
CN101262430A (en) * 2008-04-25 2008-09-10 中兴通讯股份有限公司 A distributed keeping alive routing device and method
CN102957623A (en) * 2012-11-28 2013-03-06 杭州华三通信技术有限公司 Maintenance method and equipment of neighborhood of border gate protocol

Also Published As

Publication number Publication date
CN106330696A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
US11361027B2 (en) Historical state management in databases
US9654995B2 (en) Method, device, and systems for managing access points controlled by an access point controller
CN106533845A (en) Long-connection state monitoring method and device
WO2023000940A1 (en) Data processing method and apparatus, and network element device, storage medium and program product
CN105516221A (en) Information push system and method
WO2016155015A1 (en) Multi-group regrouping method and device
WO2017167020A1 (en) Configuration information push method and device
WO2021164471A1 (en) Congestion control method, apparatus and system, device and medium
CN105282803A (en) Communication interface and information transfer method and system based on the same
WO2020001439A1 (en) Configuration method and device
US11057475B2 (en) Methods, apparatus and systems for resuming transmission link
US20120226819A1 (en) Local advertisement insertion through web request redirection
WO2017133679A1 (en) Method and device for transmitting data borne by nas
WO2017197983A1 (en) Traffic processing method and system, storage medium, switch
CN103491011B (en) BGP conversation changing method and device
CN106060793B (en) Method and apparatus for detaching service to user equipment from network entity
WO2021114774A1 (en) Method and device for processing aggregated link
TWI740210B (en) Method for terminal device management and server
WO2016141653A1 (en) Sctp connection re-establishing method, device and storage medium
US11973824B2 (en) Method for data transmission of audio and video in end-to-end system
WO2017000464A1 (en) Method and apparatus for sending keepalive message
US11042430B2 (en) Elastic consistency high availability in multiple boards
WO2016177135A1 (en) Resource management method, device, and control terminal
CN111107166B (en) Session synchronization method, device, electronic equipment and medium
JP7228674B2 (en) MANAGEMENT SERVICE MANAGEMENT METHOD AND DEVICE

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15896992

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15896992

Country of ref document: EP

Kind code of ref document: A1