[go: up one dir, main page]

CN110661673A - Method and device for heartbeat detection - Google Patents

Method and device for heartbeat detection Download PDF

Info

Publication number
CN110661673A
CN110661673A CN201810692078.2A CN201810692078A CN110661673A CN 110661673 A CN110661673 A CN 110661673A CN 201810692078 A CN201810692078 A CN 201810692078A CN 110661673 A CN110661673 A CN 110661673A
Authority
CN
China
Prior art keywords
server
heartbeat
client
response
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810692078.2A
Other languages
Chinese (zh)
Other versions
CN110661673B (en
Inventor
邓泽斌
郑陆菲菲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810692078.2A priority Critical patent/CN110661673B/en
Publication of CN110661673A publication Critical patent/CN110661673A/en
Application granted granted Critical
Publication of CN110661673B publication Critical patent/CN110661673B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请实施例涉及通信技术领域,尤其涉及一种心跳检测的方法及装置。本申请实施例中,第一服务器接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,第一服务器确定存储有针对第二服务器的有效的心跳响应时,将有效的心跳响应发送至客户端,有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。如此,第一服务器不需要将每一个接收到的心跳请求发送给第二服务器,并要求第二服务器作出反馈,而是在存储的心跳响应有效时,由第一服务器作出反馈,可以减少心跳请求对第二服务器资源的占用。

Figure 201810692078

The embodiments of the present application relate to the field of communication technologies, and in particular, to a method and apparatus for heartbeat detection. In the embodiment of this application, the first server receives a heartbeat request sent by the client, and the heartbeat request is used to determine the communication status of the second server. The first server is the domain name server DNS that receives the heartbeat domain name sent by the client for the second server. When parsing the request, it is assigned to the client. When the first server determines that a valid heartbeat response for the second server is stored, it sends the valid heartbeat response to the client. The valid heartbeat response is based on the first server and the second server. The communication status between them is determined. In this way, the first server does not need to send each received heartbeat request to the second server and ask the second server to give feedback, but when the stored heartbeat response is valid, the first server makes feedback, which can reduce the number of heartbeat requests Occupation of resources of the second server.

Figure 201810692078

Description

一种心跳检测的方法及装置Method and device for heartbeat detection

技术领域technical field

本申请实施例涉及通信技术领域,尤其涉及一种心跳检测的方法及装置。The embodiments of the present application relate to the field of communication technologies, and in particular, to a method and apparatus for heartbeat detection.

背景技术Background technique

基于传输控制协议(Transmission Control Protocol,TCP)和网络协议(Internet Protocol,IP)来进行数据传输时,通信的可靠性成为保障业务质量的关键。为了保证基于TCP/IP协议的通信的快速性和稳定性,通信设备之间通常采用心跳检测机制。所谓心跳检测机制,就是一个根据自定义协议生成的且循环发送的数据包,主要用于判断通信设备是否处于连接状态。具体表现为,一端定时地发送通信包,如果在指定时间内未接收到另一端的响应,则判断与对方的连接已经中断。When data transmission is performed based on the Transmission Control Protocol (Transmission Control Protocol, TCP) and the Internet Protocol (Internet Protocol, IP), the reliability of the communication becomes the key to guaranteeing the service quality. In order to ensure the rapidity and stability of communication based on the TCP/IP protocol, a heartbeat detection mechanism is usually used between communication devices. The so-called heartbeat detection mechanism is a data packet generated according to a custom protocol and sent cyclically, which is mainly used to determine whether the communication device is in a connected state. The specific performance is that one end sends communication packets regularly, and if it does not receive a response from the other end within a specified time, it is determined that the connection with the other end has been interrupted.

现有技术中,随着客户端和服务器之间大数据量传输模式的开启,一台服务器服务的客户端的数量会越来越多,客户端为了保证和服务器之间通信的稳定性,都可以定时地向服务器发送心跳检测数据包进行通信检测,这导致了大量的服务器资源被客户端的心跳检测数据包占用。In the prior art, with the opening of the large data transmission mode between the client and the server, the number of clients served by a server will increase. In order to ensure the stability of communication with the server, the client can The heartbeat detection packets are sent to the server periodically for communication detection, which causes a large number of server resources to be occupied by the client's heartbeat detection packets.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种心跳检测的方法及装置,用于减少客户端的心跳请求对服务器资源的占用。Embodiments of the present application provide a method and apparatus for heartbeat detection, which are used to reduce the occupation of server resources by a client's heartbeat request.

本申请实施例提供一种心跳检测的方法,适用于包括多个客户端、第一服务器和第二服务器的系统,第二服务器用于为客户端提供业务服务,方法包括第一服务器接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,第一服务器确定存储有针对第二服务器的有效的心跳响应时,将有效的心跳响应发送至客户端,该有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。An embodiment of the present application provides a method for heartbeat detection, which is applicable to a system including multiple clients, a first server, and a second server, where the second server is used to provide business services for the client, and the method includes the first server receiving the client The heartbeat request sent. The heartbeat request is used to determine the communication status of the second server. The first server is assigned by the domain name server DNS to the client when it receives the heartbeat domain name resolution request for the second server sent by the client. When the server determines that a valid heartbeat response for the second server is stored, it sends the valid heartbeat response to the client, where the valid heartbeat response is determined based on the communication state between the first server and the second server.

可选的,第一服务器接收客户端发送的心跳请求之后,还包括:第一服务器确定未存储有针对第二服务器的有效的心跳响应时,第一服务器向第二服务器发送心跳请求,第一服务器接收第二服务器发送的响应指示,并根据响应指示确定为有效的心跳响应,第一服务器将有效的心跳响应发送至客户端。如此,第一服务器可以在特定条件下从第二服务器获取响应指示,为后续接收到心跳请求时奠定基础。Optionally, after the first server receives the heartbeat request sent by the client, the method further includes: when the first server determines that no valid heartbeat response for the second server is stored, the first server sends a heartbeat request to the second server, and the first server sends a heartbeat request to the second server. The server receives the response indication sent by the second server, and determines a valid heartbeat response according to the response indication, and the first server sends the valid heartbeat response to the client. In this way, the first server can obtain the response indication from the second server under certain conditions, which lays a foundation for the subsequent reception of the heartbeat request.

可选的,第一服务器接收第二服务器发送的响应指示,并根据响应指示确定有效的心跳响应,包括:第一服务器接收第二服务器发送的响应指示,第一服务器从响应指示中解析得到心跳响应,第一服务器将心跳响应确定为有效的心跳响应并保存至本地。Optionally, the first server receives the response indication sent by the second server, and determines a valid heartbeat response according to the response indication, including: the first server receives the response indication sent by the second server, and the first server parses the response indication to obtain the heartbeat response. In response, the first server determines the heartbeat response as a valid heartbeat response and saves it locally.

可选的,第一服务器接收第二服务器发送的响应指示,并根据响应指示确定有效的心跳响应,包括:第一服务器接收第二服务器发送的响应指示,第一服务器根据响应指示从本地获取心跳响应,并将心跳响应确定为有效的心跳响应。Optionally, the first server receives the response indication sent by the second server, and determines a valid heartbeat response according to the response indication, including: the first server receives the response indication sent by the second server, and the first server obtains the heartbeat locally according to the response indication. response, and determine the heartbeat response as a valid heartbeat response.

可选的,心跳请求包括客户端的标识、客户端发送心跳请求的次数和客户端的运行状态,第一服务器接收客户端发送的心跳请求之后,还包括:第一服务器根据客户端的标识、客户端发送心跳请求的次数和客户端的运行状态生成客户端的心跳记录,第一服务器将预设时段内客户端的心跳记录发送至第二服务器。如此,第二服务器可以通过心跳记录监控客户端是否在线。Optionally, the heartbeat request includes the identifier of the client, the number of times the client sends the heartbeat request, and the running state of the client. After the first server receives the heartbeat request sent by the client, it also includes: The number of heartbeat requests and the running state of the client generate a heartbeat record of the client, and the first server sends the heartbeat record of the client within a preset period to the second server. In this way, the second server can monitor whether the client is online through the heartbeat record.

可选的,第一服务器接收客户端发送的心跳请求之前,还包括:第一服务器将心跳请求规则发送至客户端,心跳请求规则用于使得客户端根据心跳请求规则生成心跳请求,心跳请求规则是第二服务器发送至第一服务器的,且第二服务器根据心跳请求规则生成响应指示。如此,第一服务器、第二服务器和客户端可以通过心跳请求规则统一标准,在心跳检测过程中不用出错。Optionally, before the first server receives the heartbeat request sent by the client, it further includes: the first server sends the heartbeat request rule to the client, the heartbeat request rule is used to make the client generate a heartbeat request according to the heartbeat request rule, and the heartbeat request rule is sent by the second server to the first server, and the second server generates a response indication according to the heartbeat request rule. In this way, the first server, the second server and the client can use the heartbeat request rule to unify the standard, and no error is required in the heartbeat detection process.

本申请提供一种心跳检测的装置,该装置包括接收单元、处理单元和发送单元:接收单元,用于接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,装置是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,发送单元,用于处理单元确定存储有针对第二服务器的有效的心跳响应时,将有效的心跳响应发送至客户端,该有效的心跳响应是基于装置与第二服务器之间的通信状态确定的。The application provides a heartbeat detection device, the device includes a receiving unit, a processing unit and a sending unit: the receiving unit is used to receive a heartbeat request sent by a client, the heartbeat request is used to determine the communication state of the second server, and the device is a domain name When the server DNS receives the heartbeat domain name resolution request for the second server sent by the client, the sending unit is allocated to the client, and the sending unit is used for the processing unit to determine that a valid heartbeat response for the second server is stored. A heartbeat response is sent to the client, and the valid heartbeat response is determined based on the communication status between the device and the second server.

可选的,发送单元,还用于处理单元确定未存储有针对第二服务器的有效的心跳响应时,向第二服务器发送心跳请求,接收单元,还用于接收第二服务器发送的响应指示,并通过处理单元根据响应指示确定有效的心跳响应,发送单元,还用于将有效的心跳响应发送至客户端。Optionally, the sending unit is further configured to send a heartbeat request to the second server when the processing unit determines that no valid heartbeat response for the second server is stored, and the receiving unit is further configured to receive a response indication sent by the second server, The processing unit determines a valid heartbeat response according to the response indication, and the sending unit is further configured to send the valid heartbeat response to the client.

可选的,接收单元,具体用于接收第二服务器发送的响应指示,处理单元,具体用于从响应指示中解析得到心跳响应,将心跳响应确定为有效的心跳响应并保存至本地。Optionally, the receiving unit is specifically configured to receive a response indication sent by the second server, and the processing unit is specifically configured to parse the response indication to obtain a heartbeat response, determine the heartbeat response as a valid heartbeat response, and save it locally.

可选的,接收单元,具体用于接收第二服务器发送的响应指示,处理单元,具体用于根据响应指示从本地获取有效的心跳响应。Optionally, the receiving unit is specifically configured to receive a response indication sent by the second server, and the processing unit is specifically configured to acquire a valid heartbeat response locally according to the response indication.

可选的,心跳请求包括客户端的标识、客户端发送心跳请求的次数和客户端的运行状态,处理单元,还用于:根据客户端的标识、客户端发送心跳请求的次数和客户端的运行状态生成客户端的心跳记录,发送单元,还用于将预设时段内客户端的心跳记录发送至第二服务器。Optionally, the heartbeat request includes the identity of the client, the number of times the client sends the heartbeat request, and the running state of the client, and the processing unit is also used to: generate a client according to the identity of the client, the number of times the client sends the heartbeat request, and the running state of the client. The heartbeat record of the client, the sending unit is further configured to send the heartbeat record of the client within a preset period to the second server.

可选的,发送单元,还用于:将心跳请求规则发送至客户端,心跳请求规则用于使得客户端根据心跳请求规则生成心跳请求,心跳请求规则是第二服务器发送至装置的,且第二服务器根据心跳请求规则生成响应指示。Optionally, the sending unit is also used to: send the heartbeat request rule to the client, the heartbeat request rule is used to make the client generate a heartbeat request according to the heartbeat request rule, the heartbeat request rule is sent to the device by the second server, and the first heartbeat request rule is sent to the device. The second server generates a response indication according to the heartbeat request rule.

本申请实施例中,第一服务器接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,第一服务器在确定存储有针对第二服务器的有效的心跳响应后,将有效的心跳响应发送至客户端,该有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。如此,第二服务器无需直接接收来自各个客户端的心跳请求,而是通过第一服务器来对客户端的心跳请求进行响应,从而节省了系统资源。第一服务器在接收到来自客户端的心跳请求时,可先从本地获取有效的心跳响应,直接对客户端进行响应,不需要将每一个接收到的心跳请求发送给第二服务器,并要求第二服务器作出反馈,可进一步减少心跳请求对第二服务器资源的占用。In the embodiment of this application, the first server receives a heartbeat request sent by the client, and the heartbeat request is used to determine the communication status of the second server. The first server is the domain name server DNS that receives the heartbeat domain name sent by the client for the second server. When parsing the request, it is assigned to the client. After determining that a valid heartbeat response for the second server is stored, the first server sends the valid heartbeat response to the client. The valid heartbeat response is based on the relationship between the first server and the first server. The communication status between the two servers is determined. In this way, the second server does not need to directly receive the heartbeat request from each client, but responds to the client's heartbeat request through the first server, thereby saving system resources. When the first server receives a heartbeat request from the client, it can first obtain a valid heartbeat response locally and respond directly to the client without sending each received heartbeat request to the second server and requesting the second server. The server provides feedback, which can further reduce the resource occupation of the second server by the heartbeat request.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为本申请实施例提供的一种适用的系统架构示意图;1 is a schematic diagram of a suitable system architecture provided by an embodiment of the present application;

图2为本申请实施例提供的一种心跳检测的方法的流程示意图;2 is a schematic flowchart of a method for heartbeat detection provided by an embodiment of the present application;

图3为本申请实施例提供的一种心跳检测的方法的流程示意图;3 is a schematic flowchart of a method for heartbeat detection provided by an embodiment of the present application;

图4为本申请实施例提供的一种心跳检测的装置的结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for heartbeat detection provided by an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objectives, technical solutions and beneficial effects of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

图1示例性示出了本申请实施例适用的一种系统架构图,如图1所示,包括多个客户端101、第一服务器102和第二服务器集群103。其中,第二服务器集群103可以包括多台第二服务器,同一个服务器集群中的多台第二服务器可以是为客户端101提供同一个业务服务的服务器,每台第二服务器都有自己的网络协议(Internet Protocol,IP)地址。其次,第一服务器的数量可以是如图1所示的一台,还可以根据业务需求设置多台第一服务器,而且,每台第一服务器都有自己的IP地址。FIG. 1 exemplarily shows a system architecture diagram to which the embodiments of the present application are applied. As shown in FIG. 1 , the system includes multiple clients 101 , a first server 102 and a second server cluster 103 . The second server cluster 103 may include multiple second servers, the multiple second servers in the same server cluster may be servers that provide the same business service for the client 101, and each second server has its own network Protocol (Internet Protocol, IP) address. Secondly, the number of the first servers may be one as shown in FIG. 1 , or multiple first servers may be set according to business requirements, and each first server has its own IP address.

基于上述的系统架构图,第一服务器和第二服务器集群中任一个第二服务器之间的通信链路可以是客户端在给第二服务器发送访问请求之前,已经建立好了,或者是在第一服务器接收到第一个客户端给第二服务器发送心跳请求时,实时建立的。Based on the above system architecture diagram, the communication link between the first server and any second server in the second server cluster may be established before the client sends an access request to the second server, or the communication link between the first server and any second server in the second server cluster may be established before the client sends an access request to the second server. It is established in real time when a server receives a heartbeat request sent by the first client to the second server.

客户端向第二服务器集群中的第二服务器发送心跳请求时,需先经过客户端侧的域名服务器(Domain Name Sever,DNS)对心跳请求中的目标访问域名进行解析,以获得具体的访问地址,包含目标IP地址和目标端口,在本发明所提供的实施例中,当域名服务器识别到来自客户端的心跳域名解析请求时,直接为客户端分配第一服务器,并将第一服务器的访问地址作为解析结果发送给客户端。如此,客户端基于域名解析结果,将心跳请求发送给第一服务器。When the client sends a heartbeat request to the second server in the second server cluster, the domain name server (Domain Name Server, DNS) on the client side needs to first parse the target access domain name in the heartbeat request to obtain a specific access address , including the target IP address and the target port, in the embodiment provided by the present invention, when the domain name server recognizes the heartbeat domain name resolution request from the client, it directly allocates the first server to the client, and assigns the access address of the first server to the client. Sent to the client as the parsing result. In this way, the client sends the heartbeat request to the first server based on the domain name resolution result.

第一服务器在接收到来自客户端针对第二服务器的心跳请求时,可以根据第一服务器将本地存储的针对第二服务器的有效的心跳响应,直接发送至客户端。When receiving the heartbeat request from the client for the second server, the first server may directly send the locally stored valid heartbeat response to the second server to the client according to the first server.

图2示例性示出了本申请实施例适用的一种心跳检测的方法的流程示意图,如图2所示,包括:FIG. 2 exemplarily shows a schematic flowchart of a method for heartbeat detection applicable to an embodiment of the present application, as shown in FIG. 2 , including:

步骤201,第一服务器接收客户端发送的心跳请求,该心跳请求用于确定第二服务器的通信状态;第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的;Step 201, the first server receives the heartbeat request sent by the client, and the heartbeat request is used to determine the communication state of the second server; the first server is a domain name server DNS that receives the heartbeat domain name resolution request for the second server sent by the client , allocated for the client;

步骤202,第一服务器确定存储有针对第二服务器的有效的心跳响应时,将该有效心跳响应发送至客户端,其中,该有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。Step 202, when the first server determines that a valid heartbeat response for the second server is stored, the valid heartbeat response is sent to the client, wherein the valid heartbeat response is based on the communication between the first server and the second server. status confirmed.

本申请实施例中,由于第一服务器接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,第一服务器是在确定存储有针对第二服务器的有效的心跳响应后,将有效的心跳响应发送至客户端,该有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。In the embodiment of the present application, since the first server receives the heartbeat request sent by the client, the heartbeat request is used to determine the communication status of the second server, and the first server is the domain name server DNS after receiving the heartbeat sent by the client for the second server When a domain name resolution request is made, it is allocated to the client. The first server sends a valid heartbeat response to the client after determining that a valid heartbeat response for the second server is stored. The valid heartbeat response is based on the first server. The communication status with the second server is determined.

如此,第二服务器无需直接接收来自各个客户端的心跳请求,而是通过第一服务器来对客户端的心跳请求进行响应,从而节省了系统资源。第一服务器在接收到来自客户端的心跳请求时,可先从本地获取有效的心跳响应,直接对客户端进行响应,不需要将每一个接收到的心跳请求发送给第二服务器,并要求第二服务器作出反馈,可进一步减少心跳请求对第二服务器资源的占用。In this way, the second server does not need to directly receive the heartbeat request from each client, but responds to the client's heartbeat request through the first server, thereby saving system resources. When the first server receives a heartbeat request from the client, it can first obtain a valid heartbeat response locally and respond directly to the client without sending each received heartbeat request to the second server and requesting the second server. The server provides feedback, which can further reduce the resource occupation of the second server by the heartbeat request.

本申请实施例中,第二服务器可以为客户端提供业务服务,比如,提供视频、音频、文本、图片等等,因此,该第二服务器可以被称为业务服务器。In this embodiment of the present application, the second server may provide business services for the client, for example, provide video, audio, text, pictures, etc. Therefore, the second server may be referred to as a business server.

本申请实施例中,第一服务器可以是装载Squid软件的服务器,可以被称为Squid服务器。Squid是一种web类的缓存代理,该缓存代理支持超文本传输协议(Hyper TextTransfer Protocol,HTTP)、安全层的超文本传输协议(Hyper Text Transfer Protocolover Secure Socket Layer,HTTPS)和文件传输协议(File Transfer Protocol,FTP)。Squid可以减少带宽并提高响应时间,同时,Squid拥有灵活的访问控制功能,即Squid服务器可以确定哪些请求是可以接收的,哪些请求时是不可以接收的,基于上述这些功能,Squid是一种非常优秀的服务器加速器。In this embodiment of the present application, the first server may be a server that loads Squid software, which may be referred to as a Squid server. Squid is a web-based caching proxy that supports Hyper Text Transfer Protocol (HTTP), Hyper Text Transfer Protocol over Secure Socket Layer (HTTPS) and File Transfer Protocol (File Transfer Protocol). Transfer Protocol, FTP). Squid can reduce bandwidth and improve response time. At the same time, Squid has a flexible access control function, that is, the Squid server can determine which requests are acceptable and which requests are not acceptable. Based on the above functions, Squid is a very Excellent server accelerator.

除此以外,Squid可以对服务器和客户端之间的数据进行优化,以提高性能,并通过多种方式将内容请求路由至服务器,构建了一种可以优化网络吞吐量的缓存服务器结构。In addition, Squid can optimize the data between the server and the client to improve performance, and route content requests to the server in various ways, building a cache server structure that can optimize network throughput.

步骤201之前,即第一服务器接收客户端发送的心跳请求之前,一种可选的实施方式中,第一服务器和第二服务器集群已经建立了通信链路,在该通信链路被建立之后,第二服务器或者第二服务器集群可以将心跳请求规则发送给第一服务器,该心跳请求规则可以在客户端和第一服务器建立通信链路后,由第一服务器将该心跳请求规则发送给客户端,以使得客户端可以根据心跳请求规则生成心跳请求。Before step 201, that is, before the first server receives the heartbeat request sent by the client, in an optional implementation manner, a communication link has been established between the first server and the second server cluster, and after the communication link is established, The second server or the second server cluster may send the heartbeat request rule to the first server, and the heartbeat request rule may be sent by the first server to the client after the client and the first server establish a communication link. , so that the client can generate a heartbeat request according to the heartbeat request rule.

可选的,心跳请求规则可以包括第二服务器为客户端配置的一个极小的资源类文件,比如可以是一个TXT文件,客户端在接收到给心跳请求规则之后,解析获取该极小的资源类文件,并根据心跳请求规则生成一个可以直接访问的链接。在客户端要发送心跳请求时,可以访问该链接,获取该极小的资源类文件,将该极小的资源类文件封装好,作为心跳请求发送至第一服务器,上述TXT文件可以是一个空文件,该极小的资源类文件还可以是某个字段、字符串。极小的资源类文件的优势是在于占用的容量少,如此,在客户端将心跳请求发送给第一服务器时,可以节省带宽。Optionally, the heartbeat request rule may include a very small resource class file configured for the client by the second server, such as a TXT file. After receiving the heartbeat request rule, the client parses and obtains the very small resource. class file, and generate a link that can be accessed directly according to the heartbeat request rule. When the client wants to send a heartbeat request, it can access the link to obtain the extremely small resource class file, encapsulate the extremely small resource class file, and send it to the first server as a heartbeat request. The above TXT file can be an empty file. file, the very small resource class file can also be a field or a string. The advantage of the extremely small resource class file is that it occupies less capacity. In this way, when the client sends the heartbeat request to the first server, bandwidth can be saved.

步骤202之前,第一服务器接收客户端发送的心跳请求,第一服务器可以确定是否存储有针对第二服务器的有效的心跳响应。一种可选的实施方式中,第一服务器只存储有效的心跳响应,则可以直接将该心跳响应发送至客户端。该心跳响应是用于确定第一服务器和第二服务器的通信状态的,即第一服务器存储有有效的心跳响应,则第一服务器和第二服务器之间可以进行正常通信,也就是说第二服务器可以通过第一服务器向客户端提供正常的业务服务。Before step 202, the first server receives the heartbeat request sent by the client, and the first server may determine whether a valid heartbeat response for the second server is stored. In an optional implementation manner, if the first server only stores a valid heartbeat response, the heartbeat response may be directly sent to the client. The heartbeat response is used to determine the communication status between the first server and the second server, that is, if the first server stores a valid heartbeat response, normal communication can be performed between the first server and the second server, that is, the second server can perform normal communication. The server may provide normal business services to the client through the first server.

另一种可选的实施方式中,第一服务器接收到该心跳请求,确定在第一服务器中未存储有针对第二服务器的有效的心跳响应,第一服务器可以向第二服务器发送心跳请求,并接收第二服务器发送的响应指示,根据响应指示确定有效的心跳响应,第一服务器将心跳响应发送至所述客户端。In another optional implementation manner, the first server receives the heartbeat request and determines that no valid heartbeat response for the second server is stored in the first server, and the first server can send the heartbeat request to the second server, and receiving the response indication sent by the second server, determining a valid heartbeat response according to the response indication, and sending the heartbeat response to the client by the first server.

下面介绍第一服务器如何根据接收到的第二服务器发送的响应指示,确定出有效的心跳响应的方式。The following describes how the first server determines a valid heartbeat response according to the received response indication sent by the second server.

第二服务器接收到第一服务器发送的心跳请求后,第一种可选的实施方式中,可以根据该心跳请求生成响应指示,举个例子,该心跳请求中的内容为“请回复1”,第二服务器获取该心跳请求后,可以解析该心跳请求,并根据心跳请求中的内容生成“1”,并将“1”封装成心跳响应,作为响应指示的一部分发送至第一服务器。对应地,第一服务器接收第二服务器发送的响应指示,第一服务器可以从响应指示中解析得到心跳响应,第一服务器将心跳响应作为有效的心跳响应并保存至本地。上述的响应指示用来指示第一服务器从该响应指示中获取心跳响应,并将该心跳响应作为有效的心跳响应保存至第一服务器的本地缓存。After the second server receives the heartbeat request sent by the first server, in the first optional implementation manner, a response indication may be generated according to the heartbeat request. For example, the content of the heartbeat request is "please reply 1", After acquiring the heartbeat request, the second server can parse the heartbeat request, generate "1" according to the content in the heartbeat request, and encapsulate the "1" into a heartbeat response, which is sent to the first server as part of the response indication. Correspondingly, the first server receives the response indication sent by the second server, the first server can obtain a heartbeat response by parsing the response indication, and the first server saves the heartbeat response as a valid heartbeat response locally. The above-mentioned response indication is used to instruct the first server to obtain a heartbeat response from the response indication, and save the heartbeat response as a valid heartbeat response to the local cache of the first server.

第二种可选的实施方式中,第一服务器接收到该心跳请求,并确定第一服务器中没有存储有针对所述第二服务器的有效的心跳响应时,可以按照心跳请求规则在该心跳请求的包头上打上一个预设的标记,并将该带有标记的心跳请求发送给第二服务器。第二服务器接收到该带有标记的心跳请求后,获取该标记,但不用解析该心跳请求中的具体内容,按照该标记就直接将带有心跳响应的心跳指示发送给第一服务器。In a second optional embodiment, when the first server receives the heartbeat request and determines that the first server does not store a valid heartbeat response for the second server, it can request the heartbeat request according to the heartbeat request rule. A preset mark is marked on the header of the packet, and the marked heartbeat request is sent to the second server. After receiving the marked heartbeat request, the second server obtains the mark, but does not need to parse the specific content of the heartbeat request, and directly sends a heartbeat instruction with a heartbeat response to the first server according to the mark.

对应地,第一服务器接收第二服务器发送的响应指示,第一服务器可以从响应指示中解析得到心跳响应,第一服务器将心跳响应作为有效的心跳响应并保存至本地。上述的响应指示用来指示第一服务器从该响应指示中获取心跳响应,并将该心跳响应作为有效的心跳响应保存至第一服务器的本地缓存。第二服务器获取带有该标记的心跳请求后直接返回带有心跳响应的响应指示的处理过程是根据心跳请求规则确定的。即第二服务器可以根据心跳请求规则生成响应指示。Correspondingly, the first server receives the response indication sent by the second server, the first server can obtain a heartbeat response by parsing the response indication, and the first server saves the heartbeat response as a valid heartbeat response locally. The above-mentioned response indication is used to instruct the first server to obtain a heartbeat response from the response indication, and save the heartbeat response as a valid heartbeat response to the local cache of the first server. The processing process that the second server directly returns the response indication with the heartbeat response after obtaining the heartbeat request with the mark is determined according to the heartbeat request rule. That is, the second server may generate a response indication according to the heartbeat request rule.

在上述第二种实施方式中,心跳请求中的内容可以是TXT文件、字符串或者为空,因为第二服务器并不是根据心跳请求中的内容生成心跳响应的,而是基于心跳请求规则根据预设的标记生成心跳响应的。因此,该心跳响应也是根据心跳请求规则确定的。因此,在该种方式下,第一服务器将心跳请求规则发送给客户端时,客户端可以基于心跳请求规则根据接收到的心跳响应确定第二服务器在为客户端提供业务服务。In the above-mentioned second embodiment, the content in the heartbeat request may be a TXT file, a string or empty, because the second server does not generate a heartbeat response according to the content in the heartbeat request, but based on the heartbeat request rule according to the predetermined Set the flag to generate a heartbeat response. Therefore, the heartbeat response is also determined according to the heartbeat request rule. Therefore, in this manner, when the first server sends the heartbeat request rule to the client, the client can determine that the second server is providing business services for the client according to the received heartbeat response based on the heartbeat request rule.

举个例子,客户端根据接收到的心跳请求规则发送内容为空的心跳请求,第一服务器接收到该心跳请求后,确定没有存储有效的心跳响应后,直接在该心跳请求后的包头上打上一个预设的标记,并将该带有标记的心跳请求发送给第二服务器。第二服务器接收到该带有标记的心跳请求后,获取该标记,并基于心跳请求规则生成心跳响应携带于响应指示中,第二服务器将该响应指示发送至第一服务器,第一服务器解析该响应指示,获取心跳响应。将心跳响应保存至第一服务器的本地缓存,并将该心跳响应发送给客户端。客户端接收到该心跳响应后,解析该心跳响应,获取了一个特殊字符串。根据心跳请求规则中的信息,该特殊字符串可以表示第二服务器在为客户端提供业务服务,即第二服务器目前是可用的。For example, the client sends a heartbeat request with an empty content according to the received heartbeat request rule. After the first server receives the heartbeat request, it determines that there is no valid heartbeat response stored, and directly marks the packet header after the heartbeat request. a preset mark, and send the heartbeat request with the mark to the second server. After receiving the marked heartbeat request, the second server obtains the mark, and generates a heartbeat response based on the heartbeat request rule and carries it in the response indication, the second server sends the response indication to the first server, and the first server parses the Response indication, get the heartbeat response. The heartbeat response is saved to the local cache of the first server, and the heartbeat response is sent to the client. After the client receives the heartbeat response, it parses the heartbeat response and obtains a special string. According to the information in the heartbeat request rule, the special string may indicate that the second server is providing business services for the client, that is, the second server is currently available.

上述的两种方式中,在第一服务器中确定未存储有针对所述第二服务器的有效的心跳响应时,通过第二服务器的响应指示获取有效的心跳响应的。可选的,每个心跳响应可以是有时间限制的,比如,该心跳响应是自第二服务器发送出五分钟内是有效的,在这五分钟内,第一服务器接收到任何客户端发送的心跳请求后,可以直接将心跳请求反馈给客户端,不用在向第二服务器请求该心跳请求的响应。五分钟之后,若第一服务器获取接收到心跳请求,则重复上述过程。如此可以减少客户端的心跳检测数据包(即心跳请求)对第二服务器资源的占用。In the above two manners, when it is determined that no valid heartbeat response for the second server is stored in the first server, a valid heartbeat response is obtained through the response instruction of the second server. Optionally, each heartbeat response can be time-limited. For example, the heartbeat response is valid within five minutes from the second server sending it. During these five minutes, the first server receives any client sending After the heartbeat request is made, the heartbeat request can be directly fed back to the client without requesting a response to the heartbeat request from the second server. Five minutes later, if the first server obtains and receives the heartbeat request, the above process is repeated. In this way, the resource occupancy of the second server by the heartbeat detection data packet (ie, the heartbeat request) of the client can be reduced.

第三种可选的实施方式中,第一服务器接收所述第二服务器发送的响应指示,第一服务器根据所述响应指示从本地获取心跳响应,并将心跳响应作为有效的心跳响应。In a third optional implementation manner, the first server receives a response indication sent by the second server, the first server obtains a heartbeat response locally according to the response indication, and takes the heartbeat response as a valid heartbeat response.

上述第三种方式中,由于第一服务器可以是Squid服务器,可选的,可以通过refresh_pattern属性,配置心跳请求对应的心跳响应的强制缓存,即心跳响应是始终存储在第一服务器中的本地缓存中,但是未接收到第二服务器的指示的时候是无效的。In the third method above, since the first server can be a Squid server, optionally, a mandatory cache of the heartbeat response corresponding to the heartbeat request can be configured through the refresh_pattern attribute, that is, the heartbeat response is a local cache that is always stored in the first server. , but it is invalid when the instruction from the second server is not received.

下面介绍具体过程,第一服务器将该心跳请求发送给第二服务器,第二服务器接收到心跳请求后可以根据心跳请求规则生成响应指示,该响应指示用于指示第一服务器在后续可以从本地缓存中获取预设存储的心跳响应,并反馈给客户端。第一服务器接收到该响应指示后,从本地缓存中获取心跳响应发送至客户端。The specific process is described below. The first server sends the heartbeat request to the second server. After receiving the heartbeat request, the second server can generate a response instruction according to the heartbeat request rule. Get the preset stored heartbeat response from the server and feed it back to the client. After receiving the response indication, the first server obtains the heartbeat response from the local cache and sends it to the client.

可选的,上述的响应指示是带有时限的,比如,接收到该响应指示的五分钟内,第一服务器可以获取本地缓存中的心跳响应,即在这五分钟之内,该心跳响应是有效的,五分钟之后,若第一服务器获取接收到心跳请求,则重复上述过程。如此可以减少客户端的心跳检测数据包(即心跳请求)对第二服务器资源的占用。可以理解的是,本说明书中对有效时限的具体设定可基于实际情况来确定,并不限制于本说明书中提供的实施例。Optionally, the above-mentioned response indication is time-limited, for example, within five minutes of receiving the response indication, the first server can obtain the heartbeat response in the local cache, that is, within these five minutes, the heartbeat response is Effectively, after five minutes, if the first server obtains and receives the heartbeat request, the above process is repeated. In this way, the resource occupancy of the second server by the heartbeat detection data packet (ie, the heartbeat request) of the client can be reduced. It can be understood that the specific setting of the effective time limit in this specification can be determined based on the actual situation, and is not limited to the embodiments provided in this specification.

本申请实施例中,在Squid服务器可以写入一个永久缓存的资源,心跳请求等于请求了一个极小的资源,只要该心跳请求能命中该资源,就可以反馈一个心响应给客户端,如此,保证了心跳的有效性。由于Squid服务器利用Squid的原生特性,可以支持大量的并发性的心跳请求,且由于Squid本身宁易扩展的特点,若当前第一服务器已达到接收心跳请求的瓶颈,则可以在此基础上增加硬件,并再作Squid的部署即可扩展心跳服务,此外,Squid服务器可以一次性写入脚本,已于安装部署和维护。In the embodiment of the present application, the Squid server can write a permanently cached resource, and the heartbeat request is equal to requesting a very small resource. As long as the heartbeat request can hit the resource, a heart response can be fed back to the client. In this way, The validity of the heartbeat is guaranteed. Since the Squid server utilizes the native features of Squid, it can support a large number of concurrent heartbeat requests, and due to the fact that Squid itself is rather easy to expand, if the current first server has reached the bottleneck of receiving heartbeat requests, you can add hardware on this basis. , and then deploy Squid to expand the heartbeat service. In addition, the Squid server can write scripts at one time, and it has been installed, deployed and maintained.

一种可选的实施方式中,心跳请求包括客户端的标识、客户端发送心跳请求的次数和客户端的运行状态,第一服务器接收客户端发送的心跳请求之后,第一服务器根据客户端的标识、客户端发送心跳请求的次数和客户端的运行状态生成客户端的心跳记录,第一服务器将预设时段内所述客户端的心跳记录发送至所述第二服务器。In an optional embodiment, the heartbeat request includes the identity of the client, the number of times the client sends the heartbeat request, and the operating state of the client. After the first server receives the heartbeat request sent by the client, the first server The number of heartbeat requests sent by the client and the running state of the client generate a heartbeat record of the client, and the first server sends the heartbeat record of the client within a preset period to the second server.

具体地,心跳请求增加index、status及cliented三个参数值,index主要用来表示客户端当前的心跳请求为第几次心跳请求,status用来表示当前客户端的状态(是否支付方面存在问题等等),cliented用来表示客户端的标识。Specifically, three parameter values, index, status and cliented, are added to the heartbeat request. Index is mainly used to indicate that the current heartbeat request of the client is the number of heartbeat requests, and status is used to indicate the status of the current client (whether there is a problem with payment, etc.) ), cliented is used to represent the identity of the client.

例如:E.g:

http://heartbeat_domian.com:port/heartbeat?inde=11&status=1&http://heartbeat_domian.com:port/heartbeat? inde=11&status=1& cliented=111111client=111111

上述heartbeat_domian第一服务器的域名或者IP地址,port为第一服务器监听的端口,index为11标识这个客户端已经是第11次发送心跳请求,status为1标识当前客户端访问正常且该客户端无任何其他问题,cliented表示该心跳请求是标识为111111的客户端发送的。The domain name or IP address of the first server of the above heartbeat_domian, port is the port that the first server listens on, index is 11 to indicate that this client has sent a heartbeat request for the 11th time, and status of 1 indicates that the current client access is normal and the client has no Any other questions, cliented means that the heartbeat request was sent by the client identified as 111111.

可选的,若客户端111111在发送给第一服务器若干个心跳请求后,断开了连接,当重新和第一服务器建立连接后,可以将发送心跳请求次数重置为0。Optionally, if the client 111111 disconnects after sending several heartbeat requests to the first server, after re-establishing a connection with the first server, the number of times of sending heartbeat requests can be reset to 0.

第一服务器可以以客户端的标识为基准,将该客户端的心跳请求次数和每次心跳请求中携带的客户端的运行状态归类到一起,生成该客户端的心跳记录。可选的,第一服务器可以在预设时段内将每个客户端的心跳记录发送给第二服务器。The first server may use the identifier of the client as a reference, classify the number of heartbeat requests of the client and the running state of the client carried in each heartbeat request, and generate a heartbeat record of the client. Optionally, the first server may send the heartbeat record of each client to the second server within a preset time period.

可选的,第一服务器可以将运行状态不正常的客户端的心跳记录发送给第二服务器,可选的,第一服务器可以将运行状态不正常的客户端的运行状态不正常的那几次的心跳记录发送给第二服务器。如此,第二服务器可以统计所有客户端实施的在线情况及网络状态,方便对海量客户端做运行监控。Optionally, the first server may send the heartbeat record of the client whose running state is abnormal to the second server. Optionally, the first server may send the heartbeat records of the several times when the running state of the client whose running state is abnormal is abnormal. The record is sent to the second server. In this way, the second server can count the online status and network status implemented by all clients, so as to facilitate operation monitoring of a large number of clients.

可选的,可以增加ACL规则,将心跳请求强制转移到第二服务器的极小资源类文件上,即可以将心跳请求内容以特别小的文件格式保存在第二服务器上。Optionally, an ACL rule may be added to forcibly transfer the heartbeat request to a very small resource class file of the second server, that is, the content of the heartbeat request may be saved on the second server in a particularly small file format.

图3示例性示出了本申请实施例适用的一种心跳检测的方法的流程示意图,如图3所示,包括:FIG. 3 exemplarily shows a schematic flowchart of a method for heartbeat detection applicable to an embodiment of the present application, as shown in FIG. 3 , including:

步骤301,第一服务器和第二服务器集群建立了通信链路后,第二服务器可以将心跳请求规则发送给第一服务器;Step 301, after the first server and the second server cluster have established a communication link, the second server can send the heartbeat request rule to the first server;

步骤302,客户端访问第二服务器集群时,通过DNS获得了第一服务器的地址。客户端和第一服务器建立通信链路后,第一服务器将该心跳请求规则发送至客户端;Step 302, when the client accesses the second server cluster, it obtains the address of the first server through DNS. After the client and the first server establish a communication link, the first server sends the heartbeat request rule to the client;

步骤303,客户端根据心跳请求规则生成心跳请求,该心跳请求中包括客户端的标识、客户端发送心跳请求的次数和客户端的运行状态;Step 303, the client generates a heartbeat request according to the heartbeat request rule, and the heartbeat request includes the identity of the client, the number of times the client sends the heartbeat request and the running state of the client;

步骤304,客户端将心跳请求发送至第一服务器;Step 304, the client sends the heartbeat request to the first server;

步骤305,第一服务器接收到心跳请求后,根据客户端的标识、客户端发送心跳请求的次数和客户端的运行状态生成该客户端的心跳记录;Step 305, after the first server receives the heartbeat request, generates the heartbeat record of the client according to the identity of the client, the number of times the client sends the heartbeat request and the operating state of the client;

步骤306,第一服务器判断是否存储有针对第二服务器的有效的心跳响应,若有,则转至步骤307,若否,则转至步骤309;Step 306, the first server judges whether there is a valid heartbeat response for the second server stored, if so, go to step 307, if not, go to step 309;

步骤307,第一服务器从本地缓存中获取有效的心跳响应;Step 307, the first server obtains an effective heartbeat response from the local cache;

步骤308,第一服务器将心跳响应发送给客户端。Step 308, the first server sends the heartbeat response to the client.

步骤309,第一服务器可以向第二服务器发送心跳请求;Step 309, the first server may send a heartbeat request to the second server;

步骤310,第二服务器根据该心跳请求生成响应指示;Step 310, the second server generates a response indication according to the heartbeat request;

步骤311,第二服务器将响应指示发送给第一服务器;Step 311, the second server sends the response indication to the first server;

步骤312,第一服务根据该响应指示确定有效的心跳响应,并将该心跳响应存储在本地缓存;Step 312, the first service determines an effective heartbeat response according to the response indication, and stores the heartbeat response in the local cache;

步骤313,第一服务器将心跳响应发送给客户端。Step 313, the first server sends the heartbeat response to the client.

步骤314,第一服务器将该客户端的心跳记录发送至第二服务器。Step 314, the first server sends the heartbeat record of the client to the second server.

一种可选的实施方式中,该Squid软件可以直接装在第二服务器上,也就是将第二服务器和Squid软件结合起来,如此,在一定时间内可以节省中间设备的投入,可以节省成本。In an optional implementation manner, the Squid software can be directly installed on the second server, that is, the second server and the Squid software are combined. In this way, the investment of intermediate equipment can be saved within a certain period of time, and the cost can be saved.

基于以上实施例及相同构思,图示出了本申请实施例提供的一种装置的结构示意图,如图4所示,心跳检测装置400可以包括接收单元401、处理单元402和发送单元403。Based on the above embodiments and the same concept, the figure shows a schematic structural diagram of an apparatus provided by an embodiment of the present application. As shown in FIG.

本申请提供一种心跳检测的装置,该装置包括接收单元、处理单元和发送单元:接收单元,用于接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,装置是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,发送单元,用于处理单元确定存储有针对第二服务器的有效的心跳响应时,将有效的心跳响应发送至客户端,有效的心跳响应是基于装置与第二服务器之间的通信状态确定的。The application provides a heartbeat detection device, the device includes a receiving unit, a processing unit and a sending unit: the receiving unit is used to receive a heartbeat request sent by a client, the heartbeat request is used to determine the communication state of the second server, and the device is a domain name When the server DNS receives the heartbeat domain name resolution request for the second server sent by the client, the sending unit is allocated to the client, and the sending unit is used for the processing unit to determine that a valid heartbeat response for the second server is stored. A heartbeat response is sent to the client, and a valid heartbeat response is determined based on the communication status between the device and the second server.

本申请实施例中,由于接收客户端发送的心跳请求,是通过确定存储有针对第二服务器的有效的心跳响应后,将心跳响应发送至客户端,心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。如此,第二服务器无需直接接收来自各个客户端的心跳请求,而是通过该装置来对客户端的心跳请求进行响应,从而节省了系统资源。该装置在接收到来自客户端的心跳请求时,可先从本地获取有效的心跳响应,直接对客户端进行响应,不需要将每一个接收到的心跳请求发送给第二服务器,并要求第二服务器作出反馈,可进一步减少心跳请求对第二服务器资源的占用。In the embodiment of the present application, since the heartbeat request sent by the client is received, the heartbeat response is sent to the client after it is determined that a valid heartbeat response for the second server is stored, and the heartbeat response is based on the first server and the second server. The communication status between them is determined. In this way, the second server does not need to directly receive the heartbeat request from each client, but responds to the client's heartbeat request through the device, thereby saving system resources. When the device receives a heartbeat request from a client, it can first obtain a valid heartbeat response locally, and directly respond to the client, without sending each received heartbeat request to the second server and requesting the second server By making feedback, the resource occupation of the second server by the heartbeat request can be further reduced.

一种可选的实施方式中,发送单元,还用于处理单元确定未存储有针对第二服务器的有效的心跳响应时,向第二服务器发送心跳请求,接收单元,还用于接收第二服务器发送的响应指示,并通过处理单元根据响应指示确定为有效的心跳响应,发送单元,还用于将心跳响应发送至客户端。In an optional embodiment, the sending unit is further configured to send a heartbeat request to the second server when the processing unit determines that no valid heartbeat response for the second server is stored, and the receiving unit is further configured to receive the second server. The sent response indication is determined by the processing unit as a valid heartbeat response according to the response indication, and the sending unit is further configured to send the heartbeat response to the client.

一种可选的实施方式中,接收单元,具体用于接收第二服务器发送的响应指示,处理单元,具体用于从响应指示中解析得到心跳响应,将心跳响应确定为有效的心跳响应并保存至本地。In an optional embodiment, the receiving unit is specifically used to receive the response indication sent by the second server, and the processing unit is specifically used to parse and obtain the heartbeat response from the response indication, determine the heartbeat response as a valid heartbeat response and save it. to local.

一种可选的实施方式中,接收单元,具体用于接收第二服务器发送的响应指示,处理单元,具体用于根据响应指示从本地获取心跳响应,并将心跳响应确定为有效的心跳响应。In an optional implementation manner, the receiving unit is specifically configured to receive a response indication sent by the second server, and the processing unit is specifically configured to acquire a heartbeat response locally according to the response indication, and determine the heartbeat response as a valid heartbeat response.

一种可选的实施方式中,心跳请求包括客户端的标识、客户端发送心跳请求的次数和客户端的运行状态,处理单元,还用于:根据客户端的标识、客户端发送心跳请求的次数和客户端的运行状态生成客户端的心跳记录,发送单元,还用于将预设时段内客户端的心跳记录发送至第二服务器。In an optional embodiment, the heartbeat request includes the identity of the client, the number of times the client sends the heartbeat request and the operating state of the client, and the processing unit is also used for: according to the client's identity, the number of times the client sends the heartbeat request, and the client. The running state of the terminal generates a heartbeat record of the client, and the sending unit is further configured to send the heartbeat record of the client within a preset period to the second server.

一种可选的实施方式中,发送单元,还用于:将心跳请求规则发送至客户端,心跳请求规则用于使得客户端根据心跳请求规则生成心跳请求,心跳请求规则是第二服务器发送至装置的,且第二服务器根据心跳请求规则生成响应指示。In an optional embodiment, the sending unit is also used to: send the heartbeat request rule to the client, the heartbeat request rule is used to make the client generate a heartbeat request according to the heartbeat request rule, and the heartbeat request rule is sent by the second server to the client. device, and the second server generates a response indication according to the heartbeat request rule.

本申请实施例提供的心跳检测装置具体阐述可参考上述实施例提供的心跳检测方法,在这里不再赘述。For a specific description of the heartbeat detection device provided by the embodiment of the present application, reference may be made to the heartbeat detection method provided by the above embodiment, and details are not repeated here.

需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation. Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

本申请实施例提供的一种计算机装置,该计算机设备可以包括存储器、收发器和处理器。In a computer apparatus provided by an embodiment of the present application, the computer device may include a memory, a transceiver, and a processor.

存储器可用于存储指令和数据,存储器可主要包括存储指令区和存储数据区,存储数据区可存储关联关系;存储指令区可存储操作系统、至少一个功能所需的指令等;指令可使处理器执行以下方法,具体方法包括:第一服务器接收客户端发送的心跳请求,心跳请求用于确定第二服务器的通信状态,第一服务器是域名服务器DNS在接收到客户端发送的针对第二服务器的心跳域名解析请求时,为客户端分配的,第一服务器确定存储有针对第二服务器的有效的心跳响应时,将有效的心跳响应发送至客户端,该有效的心跳响应是基于第一服务器与第二服务器之间的通信状态确定的。The memory can be used to store instructions and data. The memory can mainly include a storage instruction area and a storage data area, and the storage data area can store association relationships; the storage instruction area can store the operating system, instructions required for at least one function, etc.; Execute the following method, and the specific method includes: the first server receives a heartbeat request sent by the client, the heartbeat request is used to determine the communication state of the second server, and the first server is the domain name server DNS after receiving the message sent by the client for the second server. When the heartbeat domain name resolution request is made, it is allocated to the client. When the first server determines that a valid heartbeat response for the second server is stored, it sends the valid heartbeat response to the client. The valid heartbeat response is based on the first server and the second server. The communication status between the second servers is determined.

处理器是计算机设备的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器内的指令以及调用存储在存储器内的数据,执行计算机设备的各种功能和处理数据。可选的,处理器可包括一个或多个处理单元;可选的,处理器可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。在一些实施例中,处理器和存储器可以在单一芯片上实现,在一些实施例中,他们也可以在独立的芯片上分别实现。The processor is the control center of the computer equipment. It uses various interfaces and lines to connect various parts of the entire mobile phone, and executes various functions and processing of the computer equipment by running or executing the instructions stored in the memory and calling the data stored in the memory. data. Optionally, the processor may include one or more processing units; optionally, the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. The modem processor mainly handles wireless communication. In some embodiments, the processor and memory may be implemented on a single chip, or in some embodiments, they may be implemented separately on separate chips.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现、当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。指令可以存储在计算机存储介质中,或者从一个计算机存储介质向另一个计算机存储介质传输,例如,指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带、磁光盘(MO)等)、光介质(例如,CD、DVD、BD、HVD等)、或者半导体介质(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(Solid State Disk,SSD))等。The above embodiments may be implemented in whole or in part by software, hardware, firmware or any combination thereof, and when implemented using software programs, may be implemented in whole or in part in the form of computer program products. The computer program product includes one or more instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Instructions may be stored in or transmitted from one computer storage medium to another computer storage medium, for example, instructions may be transmitted from a website site, computer, server, or data center via wireline (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center. A computer storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. Useful media may be magnetic media (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical media (eg, CD, DVD, BD, HVD, etc.), or semiconductor media (eg, ROM, EPROM, EEPROM, Non-volatile memory (NAND FLASH), solid state disk (Solid State Disk, SSD), etc.

本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请实施例是参照根据本申请实施例的方法、装置、和计算机程序产品的流程图和/或方框图来描述的。应理解可由指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, apparatuses, and computer program products according to the embodiments of the present application. It will be understood that each flow and/or block in the flowcharts and/or block diagrams, and combinations of flows and/or blocks in the flowcharts and/or block diagrams, can be implemented by instructions. These instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that execution of the instructions by the processor of the computer or other programmable data processing device produces a A means for the functions specified in a flow or flows of a flowchart and/or a block or blocks of a block diagram.

这些指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means that implements A function specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。The instructions may also be loaded on a computer or other programmable data processing device such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide Steps for implementing the function specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.

显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (12)

1.一种心跳检测的方法,其特征在于,适用于包括多个客户端、第一服务器和第二服务器的系统,所述第二服务器用于为所述客户端提供业务服务;所述方法包括:1. A method for heartbeat detection, characterized in that it is applicable to a system comprising a plurality of clients, a first server and a second server, and the second server is used to provide business services for the client; the method include: 所述第一服务器接收所述客户端发送的心跳请求,所述心跳请求用于确定所述第二服务器的通信状态;所述第一服务器是域名服务器DNS在接收到所述客户端发送的针对所述第二服务器的心跳域名解析请求时,为所述客户端分配的;The first server receives the heartbeat request sent by the client, and the heartbeat request is used to determine the communication state of the second server; the first server is the domain name server DNS after receiving the target sent by the client. When the heartbeat domain name resolution request of the second server is requested, it is allocated for the client; 所述第一服务器确定存储有针对所述第二服务器的有效的心跳响应时,将所述有效的心跳响应发送至所述客户端,所述有效的心跳响应是基于所述第一服务器与所述第二服务器之间的通信状态确定的。When the first server determines that a valid heartbeat response for the second server is stored, the valid heartbeat response is sent to the client, and the valid heartbeat response is based on the relationship between the first server and the client. The communication status between the second servers is determined. 2.如权利要求1所述的方法,其特征在于,所述第一服务器接收所述客户端发送的所述心跳请求之后,还包括:2. The method according to claim 1, wherein after the first server receives the heartbeat request sent by the client, the method further comprises: 所述第一服务器确定未存储有针对所述第二服务器的有效的心跳响应时,所述第一服务器向所述第二服务器发送所述心跳请求;When the first server determines that no valid heartbeat response for the second server is stored, the first server sends the heartbeat request to the second server; 所述第一服务器接收所述第二服务器发送的响应指示,并根据所述响应指示确定为有效的心跳响应;The first server receives the response indication sent by the second server, and determines a valid heartbeat response according to the response indication; 所述第一服务器将所述有效的心跳响应发送至所述客户端。The first server sends the valid heartbeat response to the client. 3.如权利要求2所述的方法,其特征在于,所述第一服务器接收所述第二服务器发送的响应指示,并根据所述响应指示确定有效的心跳响应,包括:3. The method of claim 2, wherein the first server receives a response indication sent by the second server, and determines a valid heartbeat response according to the response indication, comprising: 所述第一服务器接收所述第二服务器发送的所述响应指示;receiving, by the first server, the response indication sent by the second server; 所述第一服务器从所述响应指示中解析得到心跳响应;The first server obtains a heartbeat response by parsing the response indication; 所述第一服务器将所述心跳响应确定为所述有效的心跳响应并保存至本地。The first server determines the heartbeat response as the valid heartbeat response and saves it locally. 4.如权利要求2所述的方法,其特征在于,所述第一服务器接收所述第二服务器发送的响应指示,并根据所述响应指示确定有效的心跳响应,包括:4. The method of claim 2, wherein the first server receives a response indication sent by the second server, and determines a valid heartbeat response according to the response indication, comprising: 所述第一服务器接收所述第二服务器发送的所述响应指示;receiving, by the first server, the response indication sent by the second server; 所述第一服务器根据所述响应指示从本地获取心跳响应,并将所述心跳响应确定为有效的心跳响应。The first server obtains a heartbeat response locally according to the response indication, and determines the heartbeat response as a valid heartbeat response. 5.如权利要求1所述的方法,其特征在于,所述心跳请求包括所述客户端的标识、所述客户端发送心跳请求的次数和所述客户端的运行状态;5. The method of claim 1, wherein the heartbeat request comprises the identity of the client, the number of times the client sends the heartbeat request and the running state of the client; 所述第一服务器接收所述客户端发送的心跳请求之后,还包括:After the first server receives the heartbeat request sent by the client, the method further includes: 所述第一服务器根据所述客户端的标识、所述客户端发送心跳请求的次数和所述客户端的运行状态生成所述客户端的心跳记录;The first server generates a heartbeat record of the client according to the identifier of the client, the number of times the client sends a heartbeat request, and the running state of the client; 所述第一服务器将预设时段内所述客户端的所述心跳记录发送至所述第二服务器。The first server sends the heartbeat record of the client within a preset period to the second server. 6.如权利要求1至5任一项所述的方法,其特征在于,所述第一服务器接收所述客户端发送的心跳请求之前,还包括:6. The method according to any one of claims 1 to 5, wherein before the first server receives the heartbeat request sent by the client, the method further comprises: 所述第一服务器将心跳请求规则发送至所述客户端;所述心跳请求规则用于使得所述客户端根据所述心跳请求规则生成所述心跳请求;The first server sends a heartbeat request rule to the client; the heartbeat request rule is used to make the client generate the heartbeat request according to the heartbeat request rule; 所述心跳请求规则是所述第二服务器发送至所述第一服务器的,且所述第二服务器根据所述心跳请求规则生成响应指示。The heartbeat request rule is sent by the second server to the first server, and the second server generates a response indication according to the heartbeat request rule. 7.一种心跳检测的装置,其特征在于,所述装置包括接收单元、处理单元和发送单元:7. A device for heartbeat detection, wherein the device comprises a receiving unit, a processing unit and a sending unit: 所述接收单元,用于接收所述客户端发送的心跳请求,所述心跳请求用于确定第二服务器的通信状态;所述装置是域名服务器在接收到所述客户端发送的针对所述第二服务器的心跳域名解析请求时,为所述客户端分配的;The receiving unit is configured to receive a heartbeat request sent by the client, where the heartbeat request is used to determine the communication state of the second server; When the second server's heartbeat domain name resolves a request, it is allocated for the client; 所述发送单元,用于所述处理单元确定存储有针对所述第二服务器的有效的心跳响应时,将所述有效的心跳响应发送至所述客户端,所述有效的心跳响应是基于所述装置与所述第二服务器之间的通信状态确定的。The sending unit is configured to send the valid heartbeat response to the client when the processing unit determines that a valid heartbeat response for the second server is stored, and the valid heartbeat response is based on the valid heartbeat response. The communication state between the device and the second server is determined. 8.如权利要求7所述的装置,其特征在于,8. The apparatus of claim 7, wherein 所述发送单元,还用于所述处理单元确定未存储有针对所述第二服务器的有效的心跳响应时,向所述第二服务器发送所述心跳请求;The sending unit is further configured to send the heartbeat request to the second server when the processing unit determines that no valid heartbeat response for the second server is stored; 所述接收单元,还用于接收所述第二服务器发送的响应指示,并通过所述处理单元根据所述响应指示确定有效的心跳响应;The receiving unit is further configured to receive a response indication sent by the second server, and determine a valid heartbeat response according to the response indication by the processing unit; 所述发送单元,还用于将所述有效的心跳响应发送至所述客户端。The sending unit is further configured to send the valid heartbeat response to the client. 9.如权利要求8所述的装置,其特征在于,9. The apparatus of claim 8, wherein 所述接收单元,具体用于接收所述第二服务器发送的所述响应指示;The receiving unit is specifically configured to receive the response indication sent by the second server; 所述处理单元,具体用于从所述响应指示中解析得到心跳响应;将所述心跳响应确定为所述有效的心跳响应并保存至本地。The processing unit is specifically configured to parse and obtain a heartbeat response from the response indication; determine the heartbeat response as the valid heartbeat response and save it locally. 10.如权利要求8所述的装置,其特征在于,10. The apparatus of claim 8, wherein 所述接收单元,具体用于接收所述第二服务器发送的所述响应指示;The receiving unit is specifically configured to receive the response indication sent by the second server; 所述处理单元,具体用于根据所述响应指示从本地获取所述有效的心跳响应。The processing unit is specifically configured to obtain the valid heartbeat response locally according to the response indication. 11.如权利要求7所述的装置,其特征在于,所述心跳请求包括所述客户端的标识、所述客户端发送心跳请求的次数和所述客户端的运行状态;11. The apparatus according to claim 7, wherein the heartbeat request comprises the identity of the client, the number of times the client sends the heartbeat request and the running state of the client; 所述处理单元,还用于:The processing unit is also used for: 根据所述客户端的标识、所述客户端发送心跳请求的次数和所述客户端的运行状态生成所述客户端的心跳记录;Generate a heartbeat record of the client according to the identifier of the client, the number of times the client sends a heartbeat request, and the running state of the client; 所述发送单元,还用于将预设时段内所述客户端的所述心跳记录发送至所述第二服务器。The sending unit is further configured to send the heartbeat record of the client within a preset period to the second server. 12.如权利要求7至11任一项所述的装置,其特征在于,所述发送单元,还用于:12. The apparatus according to any one of claims 7 to 11, wherein the sending unit is further configured to: 将心跳请求规则发送至所述客户端;所述心跳请求规则用于使得所述客户端根据所述心跳请求规则生成所述心跳请求;sending the heartbeat request rule to the client; the heartbeat request rule is used to make the client generate the heartbeat request according to the heartbeat request rule; 所述心跳请求规则是所述第二服务器发送至所述装置的,且所述第二服务器根据所述心跳请求规则生成响应指示。The heartbeat request rule is sent by the second server to the device, and the second server generates a response indication according to the heartbeat request rule.
CN201810692078.2A 2018-06-28 2018-06-28 Method and device for heartbeat detection Expired - Fee Related CN110661673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810692078.2A CN110661673B (en) 2018-06-28 2018-06-28 Method and device for heartbeat detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810692078.2A CN110661673B (en) 2018-06-28 2018-06-28 Method and device for heartbeat detection

Publications (2)

Publication Number Publication Date
CN110661673A true CN110661673A (en) 2020-01-07
CN110661673B CN110661673B (en) 2021-02-26

Family

ID=69026460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810692078.2A Expired - Fee Related CN110661673B (en) 2018-06-28 2018-06-28 Method and device for heartbeat detection

Country Status (1)

Country Link
CN (1) CN110661673B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770415A (en) * 2020-12-31 2021-05-07 上海连尚网络科技有限公司 Information processing method and device about wireless hotspot
CN113472606A (en) * 2021-06-29 2021-10-01 聚好看科技股份有限公司 Heartbeat overtime detection method, server and electronic equipment
CN114785846A (en) * 2022-03-23 2022-07-22 南京邮电大学 Heartbeat monitoring method and system based on ProtoBuf protocol
CN115278213A (en) * 2022-07-11 2022-11-01 海南乾唐视联信息技术有限公司 Offline detection method, server, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168495A1 (en) * 2005-01-11 2007-07-19 Rothstein Richard S Systems and methods for network data storage
CN101815104A (en) * 2010-03-19 2010-08-25 中兴通讯股份有限公司 Network protocol address feedback method and domain name resolution server
CN102404378A (en) * 2010-09-07 2012-04-04 成都索贝数码科技股份有限公司 A streaming media distribution transmission network system
CN102624570A (en) * 2012-04-27 2012-08-01 杭州东信北邮信息技术有限公司 Monitoring system and method for detecting availability of web server
CN102769603A (en) * 2011-05-03 2012-11-07 中国移动通信集团公司 Method, system and device for data transmission
CN103560922A (en) * 2013-11-18 2014-02-05 北京特立信电子技术股份有限公司 Disaster recovery method and system
US9578567B1 (en) * 2014-08-26 2017-02-21 Luminate Wireless, Inc. Data center relocation methods and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168495A1 (en) * 2005-01-11 2007-07-19 Rothstein Richard S Systems and methods for network data storage
CN101815104A (en) * 2010-03-19 2010-08-25 中兴通讯股份有限公司 Network protocol address feedback method and domain name resolution server
CN102404378A (en) * 2010-09-07 2012-04-04 成都索贝数码科技股份有限公司 A streaming media distribution transmission network system
CN102769603A (en) * 2011-05-03 2012-11-07 中国移动通信集团公司 Method, system and device for data transmission
CN102624570A (en) * 2012-04-27 2012-08-01 杭州东信北邮信息技术有限公司 Monitoring system and method for detecting availability of web server
CN103560922A (en) * 2013-11-18 2014-02-05 北京特立信电子技术股份有限公司 Disaster recovery method and system
US9578567B1 (en) * 2014-08-26 2017-02-21 Luminate Wireless, Inc. Data center relocation methods and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李战国等: ""基于301重定向技术的DNS动态管理实验"", 《实验室研究与探索》 *
李贤玉等: ""基于心跳检测的跨网域计算机终端可信监控系统构建研究"", 《全国抗恶劣环境计算机第二十七届学术年会》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770415A (en) * 2020-12-31 2021-05-07 上海连尚网络科技有限公司 Information processing method and device about wireless hotspot
CN112770415B (en) * 2020-12-31 2023-07-14 上海连尚网络科技有限公司 Information processing method and device for wireless hotspot
CN113472606A (en) * 2021-06-29 2021-10-01 聚好看科技股份有限公司 Heartbeat overtime detection method, server and electronic equipment
CN113472606B (en) * 2021-06-29 2022-09-30 聚好看科技股份有限公司 Heartbeat overtime detection method, server and electronic equipment
CN114785846A (en) * 2022-03-23 2022-07-22 南京邮电大学 Heartbeat monitoring method and system based on ProtoBuf protocol
CN114785846B (en) * 2022-03-23 2024-05-24 南京邮电大学 Method and system for heartbeat monitoring based on ProtoBuf protocol
CN115278213A (en) * 2022-07-11 2022-11-01 海南乾唐视联信息技术有限公司 Offline detection method, server, electronic device and storage medium

Also Published As

Publication number Publication date
CN110661673B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN109688235B (en) Virtual network service processing method, device and system, controller, storage medium
US10587544B2 (en) Message processing method, processing server, terminal, and storage medium
US9300733B2 (en) System and/or method for client-driven server load distribution
CN104009938B (en) The long method and system connected based on route aspect
WO2018001144A1 (en) Base station, and method, apparatus and system for responding to access request
US10263950B2 (en) Directing clients based on communication format
CN110661673A (en) Method and device for heartbeat detection
WO2018137196A1 (en) Network slicing management method, and management unit and system
CN108200158B (en) request transmission system, method, device and storage medium
US20150350092A1 (en) Distributed api proxy system and apparatus and method for managing traffic in such system
US10848586B2 (en) Content delivery network (CDN) for uploading, caching and delivering user content
CN102035815A (en) Data acquisition method, access node and data acquisition system
JP2024513803A (en) Network information exposure methods, devices, electronic devices, and computer programs
CN102158518B (en) Data transmission method in content distribution network (CDN), network node and system
CN102387201B (en) The methods, devices and systems of business data processing
US20180041439A1 (en) System and method of providing compression technique for jitter sensitive application through multiple network links
CN108989420B (en) Method and system for registering service and method and system for calling service
JP6153639B2 (en) Protocol automatic setting method for PLC system
CN104780230A (en) Method, system and cloud system for automatically obtaining cloud server IP address
CN105264458B (en) Methods, devices and systems for being adapted to session
CN113285920B (en) Service access method, device, equipment and storage medium
WO2017005118A1 (en) Method, device, terminal and server for maintaining communication connection
US11546408B2 (en) Client-side measurement of computer network conditions
CN112994996B (en) Home network sharing method, MEC server, computer device, and medium
JP2023056350A (en) Communication device, control method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210226

CF01 Termination of patent right due to non-payment of annual fee