WO2019100615A1 - 一种被调用方系统的心跳检测方法、装置、服务器及介质 - Google Patents
一种被调用方系统的心跳检测方法、装置、服务器及介质 Download PDFInfo
- Publication number
- WO2019100615A1 WO2019100615A1 PCT/CN2018/077042 CN2018077042W WO2019100615A1 WO 2019100615 A1 WO2019100615 A1 WO 2019100615A1 CN 2018077042 W CN2018077042 W CN 2018077042W WO 2019100615 A1 WO2019100615 A1 WO 2019100615A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- callee
- heartbeat detection
- called party
- priority
- party
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0709—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Definitions
- the present application belongs to the technical field of distributed systems, and in particular, to a heartbeat detection method, apparatus, server and medium of a callee system.
- a first aspect of the embodiment of the present application provides a heartbeat detection method of a callee system, including:
- heartbeat detection on the callee system that obtains the address and calling parameters, and obtaining a heartbeat detection feedback result about the called party system, where the heartbeat detection feedback result includes a call state of the called party system;
- a second aspect of the embodiment of the present application provides a heartbeat detecting apparatus of a called party system, including:
- a priority acquisition module configured to acquire a priority of each called party system recorded by the third-party heartbeat detection center when the preset timing task arrives;
- a system information obtaining module configured to obtain an address and a calling parameter of each callee system from a database of the third-party heartbeat detection center according to a priority of each of the called party systems from high to low;
- a heartbeat detection module configured to perform heartbeat detection on the callee system that obtains an address and a call parameter, and obtain a heartbeat detection feedback result about the called party system, where the heartbeat detection feedback result includes the called party The calling state of the system;
- the feedback module is configured to send a heartbeat detection feedback result of the abnormal system to the caller system corresponding to the abnormal system, where the abnormal system refers to a callee system in which a call state is a call abnormality in a heartbeat detection feedback result.
- a third aspect of the embodiments of the present application provides a heartbeat detection server of a callee system, including a memory, a processor, and the computer storing computer readable instructions executable on the processor, the processing The following steps are implemented when the computer readable instructions are executed:
- heartbeat detection on the callee system that obtains the address and calling parameters, and obtaining a heartbeat detection feedback result about the called party system, where the heartbeat detection feedback result includes a call state of the called party system;
- a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, wherein the computer readable instructions are implemented by at least one processor The following steps:
- heartbeat detection on the callee system that obtains the address and calling parameters, and obtaining a heartbeat detection feedback result about the called party system, where the heartbeat detection feedback result includes a call state of the called party system;
- the caller system can know in advance the situation of the call exception, take remedial or emergency measures for the caller system to gain time, reduce the impact of the call exception on the caller system, and reduce the possible losses.
- FIG. 1 is a flowchart of an embodiment of a heartbeat detecting method of a callee system according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of adjusting a priority of a system of a callee in an application scenario in a heartbeat detection method of a callee system according to an embodiment of the present application;
- step 202 is a schematic flowchart of step 202 in an application scenario in the corresponding embodiment of FIG. 2;
- FIG. 4 is a structural diagram of an embodiment of a heartbeat detecting apparatus of a called party system according to an embodiment of the present application
- FIG. 5 is a schematic diagram of a server according to an embodiment of the present application.
- an embodiment of a heartbeat detection method of a callee system in an embodiment of the present application includes:
- the execution subject in this embodiment may be a designated server or a third-party heartbeat detection center.
- this embodiment is referred to as an execution subject.
- the executor may be pre-configured with a timed task. After the time of the timed task arrives, the heartbeat detection task may be triggered to perform subsequent steps 102-104 to complete heartbeat detection and feedback for each callee system.
- the timed task can be specifically set according to actual conditions, for example, can be set to 10 minutes, half an hour, or 1 hour, that is, equivalent to performing heartbeat detection of the called party system every 10 minutes, half hours, or 1 hour. method.
- the third-party heartbeat detection center in this embodiment is used to record each of the several distributed systems as the called system, that is, the called party system.
- the contents of the description include information such as the priority, address, and calling parameters of these systems. It can be understood that the priority of each of the above-mentioned callee systems can be predetermined in the following two ways:
- Manner 1 The called frequency of each callee system is obtained from the third-party heartbeat detection center, and the called frequency of each callee system is collected and recorded by the third-party heartbeat detection center in advance;
- the priority of the respective callee systems is determined according to the called frequency of the respective callee systems, and the more frequently called, the higher the priority.
- the three-way heartbeat detection center can collect and record the frequency and/or number of times, that is, the frequency, of the called system of each callee. It can be understood that the more frequently the called system of the called party system is called, the more important the system of the called party is, and the calling state of the called party system should be detected first, so accordingly, the called state is called.
- the priority of the party system is also higher.
- Manner 2 The number of call failures of the respective callee systems is obtained from the third-party heartbeat detection center, and the number of call failures of the respective callee systems is previously counted and recorded by the third-party heartbeat detection center; Determining the priority of the respective callee systems according to the number of call failures of the respective callee systems, the higher the number of call failures, the higher the priority.
- the caller system calls the callee system, if the call fails, the number of call failures of the called party system can be accumulated once, and the call to each callee system fails. Statistics of the number of times.
- the caller system periodically reports the number of failed calls of these statistics to the third-party heartbeat detection center, so that the third-party heartbeat detection center can count the number of call failures of each callee system. It can be understood that the more the number of call failures, the higher the probability that the corresponding callee system has a call exception, and the earlier the execution subject should discover the call state of the callee system, and accordingly, the call is invoked accordingly. The priority of the party system is also higher.
- the priority of the callee systems can also be appropriately adjusted to make the priority setting more reasonable and more Conducive to subsequent acquisition and heartbeat detection, including the following steps:
- step 201 Detect whether there is a call relationship between the callee systems, and if yes, execute step 202. If not, execute step 203; 202, adjust a priority of the callee system in which the call relationship exists, so that any one In the calling relationship, the system belonging to the caller has higher priority than the system belonging to the called party; 203. It is not necessary to adjust the priority of the respective called party systems.
- step 201 there may also be a call relationship between the various callee systems.
- a system can call the B system
- the B system can call the C system, which can be recorded as: A (caller) B (callee) - C (indirect callee). Therefore, if the A system wants to communicate with the C system, it must be forwarded through the B system. It can be seen that the execution subject can detect B and then detect C. In some application scenarios, it can be understood that if the B system cannot be called, then for the A system, the A system cannot communicate with the C system regardless of whether the C system can be called.
- step 201 it is detected whether there is a call relationship between the respective callee systems, that is, whether there is a call relationship between the B system and the C system, if yes, step 202 is performed; otherwise, step 203 is performed.
- the foregoing step 202 may specifically include:
- 301 Filter out, from each of the callee systems, a callee system having a call relationship; 302, for each call relationship, determine whether a priority of a system belonging to the caller in the call relationship is higher than a call to be called The system of the party, if yes, executing step 303, if not, executing step 304; 303, no need to pay attention; 304, setting the priority of the system belonging to the calling party in the calling relationship, so that the set priority is at least A priority unit higher than the priority of the system belonging to the called party.
- step 302 it can be understood that, according to the above example, it is determined whether the priority of the B system is higher than the priority of the C system, and if so, the requirement is met, and no adjustment is needed; if not, step 304 is required to perform B.
- the priority of the system is increased.
- the priority of the B system may be reset to be at least one priority unit higher than the priority of the C system. Assume that the priority is divided into 1-10 levels, level 1 is the lowest, and level 10 is the highest.
- the priority of the C system is 6 and the priority of the B system is 2, then the priority of the B system can be reset to 7 or higher, which is at least higher than the priority of the C system. Level 1.
- the addresses of the callee systems are obtained in order.
- the first callee system that is acquired first enters the heartbeat detection link, which is more conducive to the execution of the main body and the realization of the heartbeat detection purpose. It can be understood that the higher the priority of the called party system, the more the callee system should prioritize the heartbeat detection, so the more preferentially, the address and calling parameters of the higher priority callee system should be obtained in step 102. .
- the address and the calling parameter of each of the above-mentioned callee systems may be pre-configured into the database of the third-party heartbeat detection center by the following manual configuration manner and/or automatic configuration manner.
- the manual configuration mode is: the execution entity first acquires the address and/or the calling parameter of the called party system manually configured by the user; and then stores the obtained address and/or calling parameter of the called party system to the third party.
- the database of the heartbeat testing center is: the execution entity first acquires the address and/or the calling parameter of the called party system manually configured by the user; and then stores the obtained address and/or calling parameter of the called party system to the third party.
- the automatic configuration mode is: the execution entity first establishes a communication connection with each caller system; then, obtains the address and the call parameter of the callee system configured by each of the caller systems; and then, the acquired callee system
- the address and call parameters are stored in a database of the third party heartbeat detection center.
- the caller system reports the address and calling parameters of each callee system, it can report only the newly added callee system and the updated callee system information (address and call). Parameter) to the third party heartbeat detection center. It can be understood that for a caller system, the number of corresponding callee systems and the corresponding address and call parameters are stable most of the time, so it is not necessary to report the reported callee system. The information only needs to report the information that has been updated or added to the called party system.
- the caller system that obtains the address and the calling parameter may perform heartbeat detection to obtain a heartbeat detection feedback result about the called party system, the heartbeat The detection feedback result includes the call status of the called party system.
- the above steps 102 and 103 can be performed asynchronously. After each address and calling parameter of the called party system is obtained in step 102, step 103 can perform heartbeat detection for the called party system.
- the executor of the present application may be a designated server or a third-party heartbeat detection center
- the execution subject is a third-party heartbeat detection center during heartbeat detection
- the address and the calling parameter may be directly obtained.
- the callee system performs heartbeat detection; if the execution subject is a designated server, the execution server needs to invoke a heartbeat detection function of the third-party heartbeat detection center to perform a heartbeat on the called party system that obtains the address and the calling parameter. Detection.
- the normally returned heartbeat detection feedback result includes the calling state of the called party system, such as whether it can be called, the calling delay, and the like.
- the call delay can also be divided into high delay and low delay. The high delay will greatly reduce the real-time nature of the caller's system call. Therefore, when the corresponding caller system is notified in the subsequent steps, it can also be informed.
- the heartbeat detection feedback result of the abnormal system may be sent to the caller system corresponding to the abnormal system, where the abnormal system refers to the called state in the heartbeat detection feedback result
- the caller system informs the corresponding caller system in real time, so that the caller system can take corresponding emergency and remedial measures to deal with.
- the execution body may also send the heartbeat detection feedback result of the abnormal system to the maintenance personnel corresponding to the abnormal system, so that the maintenance personnel can know the abnormal information of the abnormal system in time, and perform the system repair early.
- the heartbeat detection feedback result of each of the callee systems may be displayed differently, wherein the system classification that needs to be differentiated and displayed at least includes: calling the abnormal callee system, and calling the delay exceeds The callee system that presets the threshold, and calls the normal callee system. For example, when displaying each callee system, the callee system can not be called in red, yellow indicates that the callee system call delay is high, and green indicates that the callee system call is normal.
- the priority of each callee system recorded by the third-party heartbeat detection center is obtained; and then, according to the priorities of the respective callee systems, the priority is high to low.
- the heartbeat detection feedback result of the called party system includes a call state of the called party system; finally, the heartbeat detection feedback result of the abnormal system is sent to the caller system corresponding to the abnormal system,
- the abnormal system refers to the called party system in which the calling state is the calling abnormality in the heartbeat detection feedback result.
- the address and the calling parameter of each callee are recorded by the third-party heartbeat detection center, and when the scheduled task arrives, the address and calling parameters of each callee are obtained in order of priority, and heartbeat detection is performed in sequence.
- the corresponding caller system is notified to the calling exception system, so that the caller system can know in advance the situation of calling the exception, and take remedial or emergency measures for the caller system to obtain time, and alleviate the call abnormality to the caller system. Impact and reduce the potential damage.
- the heartbeat detection method of the called party system is mainly described above, and a heartbeat detecting device of the called party system will be described in detail below.
- FIG. 4 is a structural diagram showing an embodiment of a heartbeat detecting apparatus of a callee system in the embodiment of the present application.
- a heartbeat detecting device of the called party system includes:
- the priority obtaining module 401 is configured to acquire the priority of each callee system recorded by the third-party heartbeat detection center when the preset timing task arrives; the system information obtaining module 402 is configured to follow the respective called party systems. Obtaining the address and calling parameters of each callee system from the database of the third-party heartbeat detection center in order of priority, the heartbeat detection module 403 is configured to obtain the address and the calling parameter.
- the callee system performs heartbeat detection to obtain a heartbeat detection feedback result of the called party system, the heartbeat detection feedback result includes a call state of the called party system, and a feedback module 404 for using a heartbeat of the abnormal system
- the detection feedback result is sent to the caller system corresponding to the abnormal system, and the abnormal system refers to a callee system in which the call state is a call exception in the heartbeat detection feedback result.
- the priority of the respective callee systems may be determined in advance by a frequency acquisition module, configured to acquire, from the third-party heartbeat detection center, the called frequency of each callee system, where each The called frequency of the called party system is collected and recorded in advance by the third-party heartbeat detection center; a first priority determining module is configured to determine the respective called party systems according to the called frequency of the respective called party systems The priority of the priority, the higher the frequency of the call, the higher the priority; or the number of failures obtaining module, configured to acquire the number of call failures of the respective callee systems from the third-party heartbeat detection center, where each of the called The number of call failures of the party system is pre-stated and recorded by the third-party heartbeat detection center; the second priority determining module is configured to determine the priority of each callee system according to the number of call failures of the respective callee systems Level, the more calls fail, the higher the priority.
- the heartbeat detecting apparatus of the called party system may further include: a call relationship detecting module, configured to detect whether there is a calling relationship between the respective called party systems; and a priority adjusting module, if the calling If the detection result of the relationship detection module is yes, the priority of the called party system in which the calling relationship exists is adjusted, so that in any of the calling relationships, the system belonging to the calling party has higher priority than the system belonging to the called party.
- a call relationship detecting module configured to detect whether there is a calling relationship between the respective called party systems
- a priority adjusting module if the calling If the detection result of the relationship detection module is yes, the priority of the called party system in which the calling relationship exists is adjusted, so that in any of the calling relationships, the system belonging to the calling party has higher priority than the system belonging to the called party.
- the address and the calling parameter of the respective callee system may be pre-configured into the database of the third-party heartbeat detection center by using a module: a manual configuration information acquiring module, configured to acquire a callee system manually configured by the user. Address and/or call parameters; a first storage module, configured to store the acquired address and/or call parameters of the called party system to a database of the third-party heartbeat detection center; and/or a communication connection module, Establishing a communication connection with each caller system; an automatic configuration information acquisition module, configured to acquire an address and a call parameter of the callee system configured by each of the caller systems; and a second storage module, configured to acquire the acquired The address and calling parameters of the caller system are stored in the database of the third party heartbeat detection center.
- a manual configuration information acquiring module configured to acquire a callee system manually configured by the user. Address and/or call parameters
- a first storage module configured to store the acquired address and/or call parameters of the called party system to a database of the third
- the heartbeat detecting device of the called party system may further include: a difference display module, configured to separately display a heartbeat detection feedback result of each of the called party systems, wherein the system classification that needs to be distinguished display includes at least : Calls the abnormal callee system, calls the callee system whose delay exceeds the preset threshold, and calls the normal callee system.
- a difference display module configured to separately display a heartbeat detection feedback result of each of the called party systems, wherein the system classification that needs to be distinguished display includes at least : Calls the abnormal callee system, calls the callee system whose delay exceeds the preset threshold, and calls the normal callee system.
- FIG. 5 is a schematic diagram of a server according to an embodiment of the present application.
- the server 5 of this embodiment includes a processor 50, a memory 51, and computer readable instructions 52 stored in the memory 51 and operable on the processor 50, for example, performing the above-mentioned call The program of the heartbeat detection method of the square system.
- the processor 50 executes the computer readable instructions 52, the steps in the embodiment of the heartbeat detection method of each of the callee systems are implemented, such as steps 101 to 104 shown in FIG.
- the processor 50 when executing the computer readable instructions 52, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 401 through 404 shown in FIG.
- the computer readable instructions 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50, To complete this application.
- the one or more modules/units may be an instruction segment of a series of computer readable instructions capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 52 in the server 5.
- the server 5 can be a computing device such as a local server or a cloud server.
- the server may include, but is not limited to, a processor 50, a memory 51. It will be understood by those skilled in the art that FIG. 5 is merely an example of the server 5 and does not constitute a limitation of the server 5, and may include more or less components than those illustrated, or combine some components, or different components, such as
- the server may also include an input and output device, a network access device, a bus, and the like.
- the processor 50 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the memory 51 may be an internal storage unit of the server 5, such as a hard disk or a memory of the server 5.
- the memory 51 may also be an external storage device of the server 5, such as a plug-in hard disk, a smart memory card (SMC), and a secure digital (SD) card provided on the server 5. Flash card (Flash Card) and so on.
- the memory 51 may also include both an internal storage unit of the server 5 and an external storage device.
- the memory 51 is for storing the computer readable instructions and other programs and data required by the server.
- the memory 51 can also be used to temporarily store data that has been output or is about to be output.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
本方案公开了一种被调用方系统的心跳检测方法、存储介质和服务器,用于解决被调用方系统发生异常时,调用方系统无法及时得知的问题。本方案提供的方法包括:当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果;将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
Description
本申请要求于2017年11月21日提交中国专利局、申请号为201711165402.7、发明名称为“一种被调用方系统的心跳检测方法、存储介质和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于分布式系统技术领域,尤其涉及一种被调用方系统的心跳检测方法、装置、服务器及介质。
目前,为了满足系统的多功能、多服务需求,很多系统采用分布式系统。在分布式系统中,系统与系统之间通过暴露服务集成在一起,若在系统调用之前,被调用方已出现down机等异常情况,这会产生调用异常。因此,当被调用方系统发生异常时,如果调用方系统无法及时得知,将会对调用方系统的服务造成影响,尤其是调用方系统在调用及时性要求较强的服务时,甚至可能造成无法挽回的损失。
当被调用方系统发生异常时,如果调用方系统无法及时得知,将会出现调用异常的问题。
本申请实施例的第一方面提供了一种被调用方系统的心跳检测方法,包括:
当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;
按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;
对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;
将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
本申请实施例的第二方面提供了一种被调用方系统的心跳检测装置,包括:
优先级获取模块,用于当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;
系统信息获取模块,用于按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;
心跳检测模块,用于对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;
反馈模块,用于将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
本申请实施例的第三方面提供了一种被调用方系统的心跳检测服务器,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;
按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;
对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;
将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:
当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;
按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;
对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;
将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
调用方系统可以提前得知调用异常的情形,为调用方系统采取补救或应急措施争取了时间,减轻了调用异常情况对调用方系统的影响,减少可能造成的损失。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例中一种被调用方系统的心跳检测方法一个实施例流程图;
图2为本申请实施例中一种被调用方系统的心跳检测方法在一个应用场景下调整被调用方系统优先级的流程示意图;
图3为图2对应实施例中步骤202在一个应用场景下的流程示意图;
图4为本申请实施例中一种被调用方系统的心跳检测装置一个实施例结构图;
图5为本申请一实施例提供的服务器的示意图。
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
请参阅图1,本申请实施例中一种被调用方系统的心跳检测方法一个实施例包括:
101、当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;
首先,需要说明的是,本实施例中的执行主体可以是指定服务器,也可以是该第三方心跳检测中心。为便于描述,本实施例均称为执行主体。
该执行主体可以预先配置有定时任务,该定时任务的时间到达后,即可触发心跳检测任务来执行后续步骤102~104,用以完成对各个被调用方系统的心跳检测和反馈。该定时任务可以根据实际情况进行具体设定,例如可以设定为10分钟、半小时、或者1小时,即相当于每10分钟、半小时、或者1小时执行一次该被调用方系统的心跳检测方法。
本实施例中的第三方心跳检测中心用于记载若干个分布式系统上各个作为被调用的系统,也即被调用方系统。其中,记载的内容包括这些系统的优先级、地址、调用参数等信息。可以理解的是,上述各个被调用方系统的优先级可以通过以下两种方式预先确定:
方式一:从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;然后,根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高。在分布式系统的调用过程中,调用方系统每次调用被调用方系统时,均可以累积调用次数在调用方系统上,然后定期将这些统计的调用次数上报至第三方心跳检测中心,从而第三方心跳检测中心可以收集并记录得知各个被调用方系统的被调用频率和/或次数,也即频次。可以理解的是,被调用方系统的被调用频次越多,则说明该被调用方系统越重要,该被调用方系统的调用状态也应当越先被检测得知,因此相应地,该被调用方系统的优先级也越高。
方式二:从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;然后,根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。在分布式系统的调用过程中,调用方系统每次调用被调用方系统时,若调用失败,则可以累积该被调用方系统的调用失败次数1次,实现对各个被调用方系统的调用失败次数的统计。然后调用方系统定期将这些统计的调用失败次数上报至第三方心跳检测中心,从而第三方心跳检测中心可以统计得知各个被调用方系统的调用失败次数。可以理解的是,调用失败次数越多,说明对应的被调用方系统出现调用异常的可能性越高,执行主体应当越早发现该被调用方系统的调用状态,因此,相应地,该被调用方系统的优先级也越高。
更进一步地,如图2所示,在预先确定各个被调用方系统的优先级之后,还可以对这些被调用方系统的优先级进行适当的调整,以使得优先级的设置更加合理,也更有利于后续的获取和心跳检测,包括如下步骤:
201、检测所述各个被调用方系统之间是否存在调用关系,若是,则执行步骤202,若否,则执行步骤203;202、调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统;203、无需调整所述各个被调用方系统的优先级。
对于上述步骤201,可以理解的是,在各个被调用方系统之间也可能存在调用关系。例如,在一个分布式系统上包括A、B、C三个系统,三者的调用关系依次为A系统可以调用B系统,B系统可以调用C系统,可以记为:A(调用方)——B(被调用方)——C(间接被调用方)。因此,A系统若要与C系统通信,必须经过B系统进行转发。可见,执行主体可以先检测B再检测C。在一些应用场景下,可以理解的是,如果B系统无法被调用,则对于A系统来说,不论C系统能否被调用,A系统均无法与C系统进行通信。因此,在进行心跳检测时,对于A系统能否正常调用来说,B系统的调用状态要比C系统的调用状态更重要,从而在设定优先级时,可以将B系统的优先级设定高于C系统的优先级。在步骤201,检测各个被调用方系统之间是否存在调用关系,也即检测是否存在如上述B系统和C系统之间的调用关系,如果有,则执行步骤202,反之,则执行步骤203.
如图3所示,上述步骤202具体可以包括:
301、从所述各个被调用方系统中筛选出存在调用关系的被调用方系统;302、针对每个调用关系,判断所述调用关系中属于调用方的系统的优先级是否高于属于被调用方的系统,若是,则执行步骤303,若否,则执行步骤304;303、无需理会;304、设定所述调用关系中属于调用方的系统的优先级,使得设定后的优先级至少比所述属于被调用方的系统的优先级高一个优先级单位。对于上述步骤302,可以理解的是,承接上述例子,判断B系统的优先级是否高于C系统的优先级,如果是,则满足要求,无需调整;如果不是,则需要执行步骤304,将B系统的优先级调高。对于上述步骤304,当需要调高B系统的优先级时,可以重新设定B系统的优先级,让其至少比C系统的优先级高一个优先级单位。假设优先级分为1-10级,1级最低,10级最高。其中,C系统的优先级是6级,B系统的优先级是2级,则可以重新设定B系统的优先级为7级,也可以是8级以上,比C系统的优先级至少高出1级。
102、按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;
在本实施例中,由于第三方心跳检测中心记载的被调用方系统的数量可能极其庞大,而执行主体的运算资源和运算能力是有限的,因此按照顺序来获取这些被调用方系统的地址和调用参数,越先获取到的被调用方系统则越先进入心跳检测环节,这样更有利于执行主体的执行和心跳检测目的的实现。可以理解的是,被调用方系统的优先级越高,则表示该被调用方系统越应当优先进行心跳检测,因此在步骤102中越应当优先获取优先级高的被调用方系统的地址和调用参数。
进一步地,上述各个被调用方系统的地址和调用参数可以通过如下手动配置方式和/或自动配置方式来预先配置到所述第三方心跳检测中心的数据库中。其中,手动配置方式为:执行主体先获取用户手动配置的被调用方系统的地址和/或调用参数;然后,将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库。
自动配置方式为:执行主体先与各个调用方系统建立通信连接;然后,获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;接着,将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。对于上述自动配置方式,进一步地,调用方系统在上报各个被调用方系统的地址和调用参数时,可以只上报新增的被调用方系统以及发生更新的被调用方系统的信息(地址和调用参数)至第三方心跳检测中心。可以理解的是,对于一个调用方系统来说,大多数时候其对应的被调用方系统的数量、以及相应的地址和调用参数都是稳定的,因此可以不用上报已上报过的被调用方系统的信息,只需上报发生了信息更新或者新增部分的被调用方系统的信息。
103、对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果;
在获取到被调用方系统的地址和调用参数之后,可以对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态。一般来说,上述步骤102和步骤103可以异步执行,即步骤102中每获取到一个被调用方系统的地址和调用参数之后,步骤103即可针对该被调用方系统进行心跳检测。
需要说明的是,由于本申请的执行主体可以是指定服务器或第三方心跳检测中心,因此,在进行心跳检测时,若执行主体为第三方心跳检测中心,则可以直接对获取到地址和调用参数的所述被调用方系统进行心跳检测;若执行主体为指定服务器,则该执行服务器需要调用第三方心跳检测中心的心跳检测功能来对获取到地址和调用参数的所述被调用方系统进行心跳检测。可以理解的是,在进行心跳检测之后,通常返回的心跳检测反馈结果包括该被调用方系统的调用状态,比如,能否被调用、调用时延,等等。其中,调用时延也可以分为高时延和低时延,其中高时延会大大降低调用方系统调用的实时性,因此在后续步骤通知相应的调用方系统时,也可以一并告知。
104、将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统。
在执行主体得到上述心跳检测反馈结果之后,可以将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统,从而实时告知相应的调用方系统,以便于调用方系统采取相应的应急、补救措施来处理。另外,执行主体还可以将异常系统的心跳检测反馈结果发送至所述异常系统对应的维修人员,以便于维修人员可以及时得知异常系统的异常信息,并及早进行系统修复。
进一步地,在步骤104之后,还可以将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。比如,在展示各个被调用方系统时,可以用红色表示该被调用方系统无法被调用,黄色表示该被调用方系统调用时延较高,绿色表示该被调用方系统调用正常。
本实施例中,首先,当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;然后,按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;接着,对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;最后,将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。在本实施例中,通过第三方心跳检测中心记载各个被调用方的地址和调用参数,在定时任务到达时,按照优先级的顺序获取各个被调用方的地址和调用参数,并依次进行心跳检测,可以及时获取各个被调用方的调用状态,从而得知哪些被调用方存在调用异常的情况。并且,将调用异常的情况告知相应的调用方系统,使得调用方系统可以提前得知调用异常的情形,为调用方系统采取补救或应急措施争取了时间,减轻了调用异常情况对调用方系统的影响,减少可能造成的损失。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上面主要描述了一种被调用方系统的心跳检测方法,下面将对一种被调用方系统的心跳检测装置进行详细描述。
图4示出了本申请实施例中一种被调用方系统的心跳检测装置一个实施例结构图。
本实施例中,一种被调用方系统的心跳检测装置包括:
优先级获取模块401,用于当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;系统信息获取模块402,用于按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;心跳检测模块403,用于对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;反馈模块404,用于将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
进一步地,所述各个被调用方系统的优先级可以通过以下模块预先确定:频次获取模块,用于从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;第一优先级确定模块,用于根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高;或者失败次数获取模块,用于从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;第二优先级确定模块,用于根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。
进一步地,所述被调用方系统的心跳检测装置还可以包括:调用关系检测模块,用于检测所述各个被调用方系统之间是否存在调用关系;优先级调整模块,用于若所述调用关系检测模块的检测结果为是,则调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统。
进一步地,所述各个被调用方系统的地址和调用参数可以通过以下模块预先配置到所述第三方心跳检测中心的数据库中:手动配置信息获取模块,用于获取用户手动配置的被调用方系统的地址和/或调用参数;第一存储模块,用于将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库;和/或通信连接模块,用于与各个调用方系统建立通信连接;自动配置信息获取模块,用于获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;第二存储模块,用于将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。
进一步地,所述被调用方系统的心跳检测装置还可以包括:区别展示模块,用于将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。
图5是本申请一实施例提供的服务器的示意图。如图5所示,该实施例的服务器5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机可读指令52,例如执行上述被调用方系统的心跳检测方法的程序。所述处理器50执行所述计算机可读指令52时实现上述各个被调用方系统的心跳检测方法实施例中的步骤,例如图1所示的步骤101至104。或者,所述处理器50执行所述计算机可读指令52时实现上述各装置实施例中各模块/单元的功能,例如图4所示模块401至404的功能。
示例性的,所述计算机可读指令52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令的指令段,该指令段用于描述所述计算机可读指令52在所述服务器5中的执行过程。
所述服务器5可以是本地服务器、云端服务器等计算设备。所述服务器可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是服务器5的示例,并不构成对服务器5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述服务器还可以包括输入输出设备、网络接入设备、总线等。
所述处理器50可以是中央处理单元(Central
Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application
Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器51可以是所述服务器5的内部存储单元,例如服务器5的硬盘或内存。所述存储器51也可以是所述服务器5的外部存储设备,例如所述服务器5上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash
Card)等。进一步地,所述存储器51还可以既包括所述服务器5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机可读指令以及所述服务器所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种被调用方系统的心跳检测方法,其特征在于,包括:当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
- 根据权利要求1所述的被调用方系统的心跳检测方法,其特征在于,所述各个被调用方系统的优先级通过以下步骤预先确定:从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高;或者从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。
- 根据权利要求2所述的被调用方系统的心跳检测方法,其特征在于,在预先确定各个被调用方系统的优先级之后,所述被调用方系统的心跳检测方法还包括:检测所述各个被调用方系统之间是否存在调用关系;若所述各个被调用方系统之间存在调用关系,则调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统。
- 根据权利要求1所述的被调用方系统的心跳检测方法,其特征在于,所述各个被调用方系统的地址和调用参数通过以下步骤预先配置到所述第三方心跳检测中心的数据库中:获取用户手动配置的被调用方系统的地址和/或调用参数;将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库;和/或与各个调用方系统建立通信连接;获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。
- 根据权利要求1至4中任一项所述的被调用方系统的心跳检测方法,其特征在于,在对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果之后,还包括:将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。
- 一种被调用方系统的心跳检测装置,其特征在于,包括:优先级获取模块,用于当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;系统信息获取模块,用于按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;心跳检测模块,用于对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;反馈模块,用于将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
- 如权利要求6所述的被调用方系统的心跳检测装置,其特征在于,还包括:频次获取模块,用于从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;第一优先级确定模块,用于根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高;或者失败次数获取模块,用于从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;第二优先级确定模块,用于根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。
- 如权利要求7所述的被调用方系统的心跳检测装置,其特征在于,还包括:调用关系检测模块,用于检测所述各个被调用方系统之间是否存在调用关系;优先级调整模块,用于若所述调用关系检测模块的检测结果为是,则调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统。
- 如权利要求6所述的被调用方系统的心跳检测装置,其特征在于,还包括:手动配置信息获取模块,用于获取用户手动配置的被调用方系统的地址和/或调用参数;第一存储模块,用于将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库;和/或通信连接模块,用于与各个调用方系统建立通信连接;自动配置信息获取模块,用于获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;第二存储模块,用于将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。
- 如权利要求6或9所述的被调用方系统的心跳检测装置,其特征在于,还包括:区别展示模块,用于将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。
- 一种被调用方系统的心跳检测服务器,其特征在于,所述被调用方系统的心跳检测处理服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
- 根据权利要求11所述的被调用方系统的心跳检测服务器,其特征在于,所述各个被调用方系统的优先级通过以下步骤预先确定:从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高;或者从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。
- 根据权利要求12所述的被调用方系统的心跳检测服务器,其特征在于,在预先确定各个被调用方系统的优先级之后,所述被调用方系统的心跳检测方法还包括:检测所述各个被调用方系统之间是否存在调用关系;若所述各个被调用方系统之间存在调用关系,则调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统。
- 根据权利要求11所述的被调用方系统的心跳检测服务器,其特征在于,所述各个被调用方系统的地址和调用参数通过以下步骤预先配置到所述第三方心跳检测中心的数据库中:获取用户手动配置的被调用方系统的地址和/或调用参数;将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库;和/或与各个调用方系统建立通信连接;获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。
- 根据权利要求11至14中任一项所述的被调用方系统的心跳检测服务器,其特征在于,在对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果之后,还包括:将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:当预设的定时任务到达时,获取第三方心跳检测中心记载的各个被调用方系统的优先级;按照所述各个被调用方系统的优先级从高到低的顺序,从所述第三方心跳检测中心的数据库中获取各个被调用方系统的地址和调用参数;对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果,所述心跳检测反馈结果包括所述被调用方系统的调用状态;将异常系统的心跳检测反馈结果发送至所述异常系统对应的调用方系统,所述异常系统是指心跳检测反馈结果中调用状态为调用异常的被调用方系统。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述各个被调用方系统的优先级通过以下步骤预先确定:从所述第三方心跳检测中心获取所述各个被调用方系统的被调用频次,所述各个被调用方系统的被调用频次预先由所述第三方心跳检测中心收集并记录;根据所述各个被调用方系统的被调用频次确定所述各个被调用方系统的优先级,被调用频次越多,则优先级越高;或者从所述第三方心跳检测中心获取所述各个被调用方系统的调用失败次数,所述各个被调用方系统的调用失败次数预先由所述第三方心跳检测中心统计并记录;根据所述各个被调用方系统的调用失败次数确定所述各个被调用方系统的优先级,调用失败次数越多,则优先级越高。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,在预先确定各个被调用方系统的优先级之后,所述被调用方系统的心跳检测方法还包括:检测所述各个被调用方系统之间是否存在调用关系;若所述各个被调用方系统之间存在调用关系,则调整存在调用关系的被调用方系统的优先级,使得在任一个调用关系中,属于调用方的系统的优先级高于属于被调用方的系统。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述各个被调用方系统的地址和调用参数通过以下步骤预先配置到所述第三方心跳检测中心的数据库中:获取用户手动配置的被调用方系统的地址和/或调用参数;将获取到的被调用方系统的地址和/或调用参数存储至所述第三方心跳检测中心的数据库;和/或与各个调用方系统建立通信连接;获取所述各个调用方系统各自配置的被调用方系统的地址和调用参数;将获取到的被调用方系统的地址和调用参数存储至所述第三方心跳检测中心的数据库。
- 根据权利要求16至19中任一项所述的计算机可读存储介质,其特征在于,在对获取到地址和调用参数的所述被调用方系统进行心跳检测,得到关于所述被调用方系统的心跳检测反馈结果之后,还包括:将各个所述被调用方系统的心跳检测反馈结果进行区别展示,其中,需要区别展示的系统分类至少包括:调用异常的被调用方系统、调用时延超过预设阈值的被调用方系统、以及调用正常的被调用方系统。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711165402.7A CN107957915B (zh) | 2017-11-21 | 2017-11-21 | 一种被调用方系统的心跳检测方法、存储介质和服务器 |
| CN201711165402.7 | 2017-11-21 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019100615A1 true WO2019100615A1 (zh) | 2019-05-31 |
Family
ID=61965101
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/077042 Ceased WO2019100615A1 (zh) | 2017-11-21 | 2018-02-23 | 一种被调用方系统的心跳检测方法、装置、服务器及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107957915B (zh) |
| WO (1) | WO2019100615A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110865876A (zh) * | 2019-09-23 | 2020-03-06 | 珠海格力电器股份有限公司 | 一种服务依赖资源的调度方法及装置 |
| CN114840346A (zh) * | 2022-05-25 | 2022-08-02 | 北京声智科技有限公司 | 数据上传方法、装置、终端、存储介质及计算机程序产品 |
| CN115987852B (zh) * | 2022-12-21 | 2025-05-27 | 平安银行股份有限公司 | 接口服务状态的检测方法、装置、计算机设备及存储介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101234017A (zh) * | 2008-02-26 | 2008-08-06 | 中兴通讯股份有限公司 | 心跳检测方法、系统和中央处理单元 |
| CN103560922A (zh) * | 2013-11-18 | 2014-02-05 | 北京特立信电子技术股份有限公司 | 一种容灾方法及系统 |
| CN105025063A (zh) * | 2014-04-29 | 2015-11-04 | 刘广威 | 面向大规模终端设备的在线数据传输方法 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4796086B2 (ja) * | 2008-03-14 | 2011-10-19 | 株式会社東芝 | クラスタシステム及び同システムにおいてマスタノードを選択する方法 |
| BR112013012329B1 (pt) * | 2010-11-19 | 2021-05-04 | Spacelabs Healthcare, Llc | Dispositivo de tela para uso em um sistema de monitoramento de paciente e sistema de monitoramento de paciente |
| US10614098B2 (en) * | 2010-12-23 | 2020-04-07 | Mongodb, Inc. | System and method for determining consensus within a distributed database |
| CN104991850B (zh) * | 2015-06-27 | 2018-06-19 | 广州华多网络科技有限公司 | 一种应用程序的心跳包控制方法和装置 |
| US20170269984A1 (en) * | 2016-03-18 | 2017-09-21 | Qualcomm Incorporated | Systems and methods for improved detection of processor hang and improved recovery from processor hang in a computing device |
| CN106126652B (zh) * | 2016-06-24 | 2019-03-15 | 武汉斗鱼网络科技有限公司 | 用于分布式数据库集群的故障数据库切换方法及系统 |
| CN106445781B (zh) * | 2016-09-27 | 2019-03-26 | 北京航空航天大学 | 基于消息传递的hpc大规模并行程序异常的检测系统 |
-
2017
- 2017-11-21 CN CN201711165402.7A patent/CN107957915B/zh active Active
-
2018
- 2018-02-23 WO PCT/CN2018/077042 patent/WO2019100615A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101234017A (zh) * | 2008-02-26 | 2008-08-06 | 中兴通讯股份有限公司 | 心跳检测方法、系统和中央处理单元 |
| CN103560922A (zh) * | 2013-11-18 | 2014-02-05 | 北京特立信电子技术股份有限公司 | 一种容灾方法及系统 |
| CN105025063A (zh) * | 2014-04-29 | 2015-11-04 | 刘广威 | 面向大规模终端设备的在线数据传输方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107957915B (zh) | 2019-12-24 |
| CN107957915A (zh) | 2018-04-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102740121B (zh) | 应用于视频监控网络的视频质量诊断控制系统及方法 | |
| WO2020024376A1 (zh) | 一种处理运维监控告警的方法及设备 | |
| CN105549508B (zh) | 一种基于信息合并的报警方法及装置 | |
| CN105760240A (zh) | 分布式任务处理方法及装置 | |
| WO2019100615A1 (zh) | 一种被调用方系统的心跳检测方法、装置、服务器及介质 | |
| CN111092865B (zh) | 一种安全事件分析方法及系统 | |
| CN110535715A (zh) | 基于Linux的端口状态实时检测方法、电路和交换机 | |
| US20130246859A1 (en) | Integrated circuit and method for monitoring bus status in integrated circuit | |
| WO2016119389A1 (zh) | 一种系统对接的管理方法、装置和系统 | |
| CN111782431B (zh) | 一种异常的处理方法、装置、终端及存储介质 | |
| CN111752811A (zh) | 异常告警信息处理方法、电子设备及存储介质 | |
| WO2018072561A1 (zh) | 一种视频切换方法、装置及视频巡逻系统 | |
| CN111984495A (zh) | 一种大数据监控方法、装置和存储介质 | |
| CN108153643A (zh) | 日志监控系统及方法 | |
| CN113656207B (zh) | 故障处理方法、装置、电子设备和介质 | |
| WO2025156844A1 (zh) | 故障处理的方法、装置、电子设备及存储介质 | |
| CN111355931A (zh) | 生产线状态监测方法、装置、服务器及存储介质 | |
| CN111782522A (zh) | 追踪消息的输出方法、电子设备及存储介质 | |
| WO2025194850A1 (zh) | 一种日志处理方法、装置、电子设备和可读存储介质 | |
| CN112231157B (zh) | 一种基于硬件拓扑的ai服务器hca卡性能测试方法及系统 | |
| CN105656855A (zh) | 资源访问的控制方法和装置 | |
| CN110633165B (zh) | 故障处理方法、装置、系统服务器及计算机可读存储介质 | |
| CN107612755A (zh) | 一种云资源的管理方法及其装置 | |
| CN108255704B (zh) | 一种脚本调用事件的异常响应方法及其终端 | |
| CN108829563A (zh) | 一种告警方法和告警装置 |
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: 18882251 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.09.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18882251 Country of ref document: EP Kind code of ref document: A1 |