Detection Method, Device, Computer Equipment and Storage Medium for Interface Service Status

By setting up timing tasks in the core system, and periodically launching heartbeat detection requests to the service system, the problem of interface service exceptions not being discovered in time in the prior art is solved, real-time monitoring and exception handling of interface service status are realized.

CN115987852BActive Publication Date: 2025-05-27PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211652190.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-05-27
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

The prior art is difficult to detect and handle abnormal interface services in a timely manner, especially when the server is running normally, the abnormal interface service situation is not perceived by the system.

Method used

By setting up timing tasks in the core system, a heartbeat detection request is periodically initiated to the service system and a preset interface service in the heartbeat detection class is called to respond. If the heartbeat message is received within the preset time, confirm that the service is normal; otherwise, add abnormal information and send a SMS alert.

Benefits of technology

It realizes interface services that promptly detect and handle exceptions, ensuring that the system can respond promptly and deal with potential problems, and avoid service interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987852B_ABST
    Figure CN115987852B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, computer device and storage medium for detecting the status of an interface service. This solution is applied to a core system, which is connected to at least two service systems. Through the interface call service in a preset timing task implementation class, a heartbeat detection request is periodically sent to the service system to call a preset interface service in the heartbeat detection class of the service system for response. If the heartbeat information is received through the preset interface service within the preset time, it is determined that the preset remote call service of the service system that feedbacks the heartbeat information is normal. If the heartbeat information is not received through the preset interface service within the preset time, the abnormal information corresponding to the service system that does not feedback the heartbeat information is added to a preset position of a short message prompt template to obtain a short message prompt information. Based on the short message prompt information, a short message alarm operation is performed, so as to timely discover and handle the abnormal interface service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technology, and in particular to a method, device, computer device and storage medium for detecting the status of an interface service. Background Art

[0002] With the development of society, independent application systems interact through remote service calls. Currently, application systems mainly provide interface services to other systems by registering interfaces to achieve remote service calls.

[0003] In the prior art, only when a failure occurs in the server corresponding to the system, an alarm reminder will be given. However, if the server is running normally and only the interface service is abnormal, the system will not be aware of it, so that the abnormal interface service cannot be discovered and processed in time. Summary of the Invention

[0004] Embodiments of this application provide a method, device, computer device and storage medium for detecting the status of an interface service that can be used in fintech or other related fields, which can discover and process abnormal interface services in time.

[0005] Embodiments of this application provide a method for detecting the status of an interface service, which is applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service system, and a preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service, including:

[0006] Implement an interface call service through a preset timed task implementation class, and periodically send a heartbeat detection request to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response;

[0007] If heartbeat information is received through the preset interface service within a preset time, it is determined that the preset remote call service of the service system that feeds back the heartbeat information is normal;

[0008] If no heartbeat information is received through the preset interface service within a preset time, add the abnormal information corresponding to the service system that does not feed back the heartbeat information to a preset position in the SMS prompt template to obtain an SMS prompt message;

[0009] Based on the above SMS prompt message, perform an SMS alarm operation.

[0010] Correspondingly, an embodiment of the present application further provides a detection device for the interface service status, which is applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service systems, and a preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service, including:

[0011] A request module, configured to implement an interface call service through a preset timing task implementation class, and periodically send a heartbeat detection request to at least one of the service systems, so as to call the preset interface service in the heartbeat detection class of the service system for response;

[0012] An information receiving module, configured to determine that the preset remote call service of the service system that feeds back the heartbeat information is normal if the heartbeat information fed back through the preset interface service is received within a preset time;

[0013] An information adding module, configured to add the exception information corresponding to the service system that does not feed back the heartbeat information to a preset position of a short message prompt template to obtain a short message prompt information if the heartbeat information fed back through the preset interface service is not received within a preset time;

[0014] An alarm module, configured to perform a short message alarm operation based on the short message prompt information.

[0015] Correspondingly, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the detection method for the interface service status provided by any embodiment of the present application.

[0016] Correspondingly, an embodiment of the present application further provides a storage medium, which stores multiple instructions suitable for being loaded by a processor to execute the detection method for the interface service status as described above.

[0017] The embodiment of the present application is applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service systems, and a preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service. An interface call service is implemented through a preset timing task implementation class, and a heartbeat detection request is periodically sent to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response; if the heartbeat information fed back through the preset interface service is received within a preset time, it is determined that the preset remote call service of the service system that feeds back the heartbeat information is normal; if the heartbeat information fed back through the preset interface service is not received within a preset time, the exception information corresponding to the service system that does not feed back the heartbeat information is added to the short message prompt template

[0018] At a preset position, a text message prompt information is obtained; based on the above text message prompt information, a text message alarm operation is performed. Thus, by setting an interface call service in the timing task implementation class, heartbeat detection is performed at regular intervals,

[0019] and when an anomaly is detected, an alarm operation is carried out to promptly detect and handle the interface service with anomalies. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other accompanying drawings based on these drawings without creative efforts.

[0021] FIG. is a schematic flowchart of a method for detecting the status of an interface service provided by an embodiment of the present application.

[0022] Figure 1 FIG. is a structural block diagram of a device for detecting the status of an interface service provided by an embodiment of the present application.

[0023] Figure 2 FIG. is a schematic structural diagram of a computer device provided by an embodiment of the present application.

[0024] Figure 3 FIG. is a schematic structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0026] The embodiments of the present application provide a method, a device, a storage medium, and a computer device for detecting the status of an interface service. Specifically, the method for detecting the status of an interface service in the embodiments of the present application can be executed by a computer device, where the computer device can be a server or a terminal device, etc. Among them, the server can be an independent physical server, or a server cluster or

[0027] a distributed system composed of multiple physical servers, and can also be a cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, as well as big data and people

[0028] A cloud server for basic cloud computing services such as an artificial intelligence platform. The terminal can be a smart phone, a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not limit this here.

[0029] For example, the computer device can be a terminal, and the terminal can be applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service systems. A preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service. The interface call service in the preset timing task implementation class is used to periodically send a heartbeat detection request to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response; if heartbeat information is received through the preset interface service within a preset time, it is determined that the preset remote call service of the service system that feedbacks the heartbeat information is normal; if no heartbeat information is received through the preset interface service within the preset time, the abnormal information corresponding to the service system that does not feedback the heartbeat information is added to a preset position of a short message prompt template to obtain a short message prompt information; based on the short message prompt information, a short message warning operation is performed.

[0030] Based on the above problems, the embodiments of the present application provide a method, device, computer device and storage medium for detecting the status of an interface service, which can timely discover and process abnormal interface services.

[0031] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0032] The embodiments of the present application provide a method for detecting the status of an interface service. This method can be executed by a terminal or a server. The embodiments of the present application will be described by taking the method for detecting the status of an interface service executed by a core system as an example.

[0033] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for detecting the status of an interface service provided by the embodiments of the present application. The method for detecting the status of an interface service is applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service systems. A preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service. The specific process can be as follows:

[0034] 101. Use the interface call service in the preset timing task implementation class to periodically send a heartbeat detection request to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response.

[0035] Among them, the above-mentioned core system and the above-mentioned at least two service systems are all application systems. The core system and the at least two service systems can be set in a distributed manner and can be integrated into a large-scale application system.

[0036] For example, the development bank includes a core system, and the open bank also includes service systems, which can be an official website portal system, a platform back-office system, etc.

[0037] Among them, the above-mentioned heartbeat detection class is a class in the service system used to respond to the heartbeat detection request sent by the core system. An interface service is set in this heartbeat detection class, so that when the service system receives the heartbeat detection request sent by the core system, it can respond to this heartbeat detection request by calling the interface service in the heartbeat detection class located inside the system.

[0038] Correspondingly, a heartbeat detection component needs to be deployed in the service system to configure the heartbeat detection class in the service system.

[0039] Among them, the above-mentioned interface service can be an ESA interface service, so that the guest can configure the ESA heartbeat detection interface to respond through this interface when calling the corresponding interface service.

[0040] Specifically, in this embodiment, the ESA heartbeat detection interface can be registered with the distributed service framework (denoted as Dubbo), so as to configure the ESA heartbeat detection interface in the service system.

[0041] It can be understood that since each application system cannot perceive whether the interface services of other application systems that can interact with it are normal, in this embodiment, a timing task implementation class is configured for the core system, so that through this timing task implementation class, the core system is prompted to execute a certain task regularly. Further, an interface call service is configured in this timing task implementation class, so as to prompt the core system to call a certain interface service regularly.

[0042] In this embodiment, the core system realizes periodic heartbeat detection requests to at least one associated service system through the timing task implementation class preset inside it, and configures heartbeat detection logic in this timing task implementation class, and configures an interface call service for this heartbeat detection logic, so as to call the heartbeat detection class of the service system that receives this heartbeat detection request to respond to this request, thereby realizing the monitoring of the interaction between systems through the response situation of the heartbeat detection class.

[0043] Among them, the initiation period of the above heartbeat detection request can be set based on user requirements. For example, it can be set to initiate a heartbeat detection request every 5 minutes, that is, execute a scheduled task in the scheduled task implementation class every 5 minutes, so as to realize calling the interface service of the service system associated with the core system for response every 5 minutes.

[0044] Among them, the above remote call service is the remote call service required for interaction between two application systems.

[0045] It can be understood that in order to facilitate real-time detection of whether the remote call service that supports interaction between systems is normal, in this embodiment, an interface service is set in the heartbeat detection class in the server system, so as to represent all remote call services in the service system through this interface service.

[0046] Since the service system can interact with each associated application system, the application system here can be the core system or other service systems. Therefore, the service system needs to set up multiple interface services to realize interaction with different application systems.

[0047] In this embodiment, in order to avoid interaction conflicts with other systems, an interface service is set in the heartbeat detection class to be used to respond to the heartbeat detection request through the interface service in the heartbeat detection class.

[0048] Therefore, the interface service set in the heartbeat detection class in this embodiment represents all remote call services in the service system. This interface service is a part of the remote call service. That is to say, whether the interface service in this heartbeat detection class can respond normally indicates that the remote call service of the service system is normal and there is no abnormality. If, however, the interface service in this heartbeat detection class does not respond normally, it means that the remote call service in the service system is abnormal, and corresponding processing needs to be carried out based on this abnormal state.

[0049] 102. If heartbeat information is received through a preset interface service within a preset time, it is determined that the above preset remote call service of the service system that feedbacks the heartbeat information is normal.

[0050] In this embodiment, when the service system receives a heartbeat detection request initiated by the core system, it will call the preset interface service in the heartbeat detection class located in the system to respond, that is, feedback heartbeat information through the preset interface service.

[0051] If the core system receives the heartbeat information fed back by the service system through the preset interface service within the preset time, it indicates that the interface service in the heartbeat detection class of the service system is running normally. And the interface service in the heartbeat detection class of the service system represents all the remote call services in the service system. Therefore, it means that all the remote call services of the service system that feeds back the heartbeat information are normal.

[0052] In some embodiments, it is necessary to record the interaction log of the interaction between the service system and the core system for this heartbeat detection request, and record the log with the interface service status being normal in the interface service log (denoted as Dubbo log) in the core system. That is, this interface service log is only used to record the logs at the interface level, that is, only record the interface service performed by the service system for this heartbeat detection request and whether the corresponding interface service status is normal.

[0053] In some embodiments, it is necessary to record the interaction log of the interaction between the service system and the core system for this heartbeat detection request, and record the normal operation information of the system during the interaction between the service system and the core system, that is, the system operation details, in the system details log (denoted as Cat log). That is, this system details log is used to record all the information during the interaction of the system, so that based on all the information during the interaction of the system, a more intuitive understanding of the running state of the system can be obtained.

[0054] 103. If the heartbeat information fed back through the preset interface service is not received within the preset time, then add the exception information corresponding to the service system that does not feed back the heartbeat information to the preset position of the SMS prompt template to obtain the SMS prompt information.

[0055] In this embodiment, when the service system receives the heartbeat detection request initiated by the core system, it will call the preset interface service in the heartbeat detection class of the system to respond, that is, feed back the heartbeat information through the preset interface service.

[0056] If the core system does not receive the heartbeat information fed back by the service system through the preset interface service within the preset time, it indicates that the interface service in the heartbeat detection class of the service system runs abnormally. And the interface service in the heartbeat detection class of the service system represents all the remote call services in the service system. Therefore, it means that all the remote call services of the service system that feeds back the heartbeat information may have exceptions, and corresponding processing is required.

[0057] In this embodiment, for the interface service exception of the service system, the exception information corresponding to the service system that has not fed back the heartbeat information can be obtained. This exception information is the heartbeat detection result of the service system that has not fed back the heartbeat information, so as to add this exception information to the SMS prompt template to generate an SMS prompt message. Among them, this SMS prompt message can be a timed task SMS.

[0058] In some embodiments, it is necessary to record the interaction log of the interaction between the service system and the core system for this heartbeat detection request, and record the log with the interface service status being an abnormal status in the Dubbo log in the core system.

[0059] In some embodiments, it is necessary to record the interaction log of the interaction between the service system and the core system for this heartbeat detection request, and record the system exception operation information during the interaction between the service system and the core system, that is, the system operation details, in the Cat log.

[0060] In some embodiments, in order to make the SMS prompt message more in line with the personalized needs of users, adding the exception information corresponding to the service system that has not fed back the heartbeat information to the preset position of the SMS prompt template to obtain the SMS prompt message may include: determining the exception level of the service system that has not fed back the heartbeat information, and adding the exception information corresponding to the service system that has not fed back the heartbeat information to the preset position of the SMS prompt template corresponding to the above exception level to obtain the SMS prompt message corresponding to the exception level.

[0061] It can be understood that the SMS prompt templates corresponding to the above different exception levels are different. For example, the fonts, colors, etc. in the templates are different.

[0062] In some embodiments, a priority can be assigned to the service system in advance, and the exception level of the service system that has not fed back the heartbeat information is determined based on the priority of the service system that has not fed back the heartbeat information.

[0063] In some embodiments, determining the exception level of the service system that has not fed back the heartbeat information includes:

[0064] 5 In some embodiments, the above determining the exception level of the service system that has not fed back the heartbeat information includes:

[0065] Obtaining the number of times that the service system that has not fed back the heartbeat information has not fed back the heartbeat information within a preset period; determining the exception level of the service system that has not fed back the heartbeat information based on the number of times that the service system has not fed back the heartbeat information within the preset period, so as to increase the exception level of the service system through the number of times the service system has an exception, so as to enable the user to speed up the processing speed.

[0066] 0 104. Perform an SMS alarm operation based on the above SMS prompt message.

[0067] In this embodiment, through the SMS alert operation, SMS prompt information can be sent to relevant staff, such as product developers or product testers, to prompt the relevant staff that the interface service of a certain system is abnormal, so that the relevant staff can timely discover and handle the abnormal interface service.

[0068] 5 In some embodiments, after the relevant staff receive the SMS containing the SMS prompt information,

[0069] it is necessary to clarify the service system to which the abnormal interface service belongs to quickly solve and restore the abnormal interface service.

[0070] In this embodiment, since the interface service log is set in the above core system, and the interface service status of at least one service system corresponding to each heartbeat detection request is stored in the interface service log, therefore, based on the interface service log, the service system with abnormal status can be quickly located, so as to quickly solve and restore the abnormal interface service in the system.

[0071] Specifically, at least one interface service status corresponding to the service system can be obtained from the interface service log, and the interface service status includes abnormal status and / or normal status; based on at least one interface service status corresponding to the service system, the address information of the service system with the above interface service status being abnormal status is stored in the abnormal address set; receive the abnormal information acquisition request sent by the user, respond to the above abnormal information acquisition request, and send the above abnormal address set to the user, so that the user can quickly locate the service system to which the abnormal interface service belongs.

[0072] In some embodiments, in order to provide system data when the user processes the service system to which the abnormal interface service belongs, so that the user can quickly solve and restore the abnormal interface service in the system based on the system data. Further, based on the system details log set in the core system, and the system operation information of at least one service system corresponding to each heartbeat detection request is stored in the system details log, the system operation information of the corresponding service system is obtained from the system details log, so as to quickly solve and restore the abnormal interface service in the system based on the system operation information.

[0073] Specifically, based on the address information of at least one service system in the above abnormal address set, the corresponding system operation information can be found from the above system details log; based on the arrangement order of the address information of at least one service system in the above abnormal address set, the system operation information corresponding to at least one service system in the above abnormal address set is arranged in order as an abnormal file; when sending the above abnormal address set to the user, the above abnormal file is sent to the above user, so as to organize the system operation information of the service system to which the abnormal interface service belongs, which is convenient for the user to view, thereby accelerating the processing time of the abnormal interface service in the service system.

[0074] In some embodiments, sometimes there are problems with the interface call service of the core system, resulting in the core system being unable to receive the heartbeat information fed back by the associated service system. Therefore, a preset number of times can be set to determine whether the core system is abnormal by comparing the number of times of initiating the heartbeat detection request for not receiving the feedback heartbeat information of the service system with this preset number of times. That is, if at least one service system corresponding to the heartbeat detection request of the preset number of times does not feed back heartbeat information, it is determined that the above core system is abnormal, and a short message warning operation is performed on the abnormal core system. Among them, for the specific operation method of the short message warning operation in this embodiment, the short message warning operation method corresponding to the above service system can be referred to.

[0075] The embodiment of the present application discloses a method for detecting the status of an interface service. This method is applied to a core system, and the above core system is connected to at least two service systems. A heartbeat detection class is configured in the above service system, and a preset interface service is set in the above heartbeat detection class. The above preset interface service is a part of a preset remote call service, and the interface call service in the preset timing task implementation class is used to periodically initiate a heartbeat detection request to at least one of the above service systems to call the preset interface service in the heartbeat detection class of the above service system for response; if the heartbeat information fed back through the preset interface service is received within the preset time, it is determined that the above preset remote call service of the service system that feeds back the heartbeat information is normal; if the heartbeat information fed back through the preset interface service is not received within the preset time, the abnormal information corresponding to the service system that does not feed back the heartbeat information is added to a preset position in the short message prompt template to obtain a short message prompt information; based on the above short message prompt information, a short message warning operation is performed, so that abnormal interface services can be discovered and processed in a timely manner.

[0076] To facilitate better implementation of the method for detecting the status of an interface service provided by the embodiment of the present application, the embodiment of the present application also provides a device for detecting the status of an interface service based on the above method for detecting the status of an interface service. The meanings of the terms are the same as those in the above method for detecting the status of an interface service, and the specific implementation details can be referred to the description in the method embodiment.

[0077] Please refer to Figure 2 , Figure 2 which is a structural block diagram of a detection device for the interface service status provided by an embodiment of the present application. This device is applied to a core system, which is connected to at least two service systems. A heartbeat detection class is configured in the service systems, and a preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service. The device includes:

[0078] A request module 201, which is used to implement the interface call service in a preset timing task implementation class, and periodically send a heartbeat detection request to at least one of the above service systems to call the preset interface service in the heartbeat detection class of the service system for response;

[0079] An information receiving module 202, which is used to determine that the above preset remote call service of the service system that feeds back the heartbeat information is normal if the heartbeat information fed back through the preset interface service is received within a preset time;

[0080] An information adding module 203, which is used to add the abnormal information corresponding to the service system that does not feed back the heartbeat information to a preset position of a short message prompt template to obtain a short message prompt information if the heartbeat information fed back through the preset interface service is not received within a preset time;

[0081] An alarm module 204, which is used to perform a short message alarm operation based on the above short message prompt information.

[0082] In some embodiments, an interface service log is set in the core system, and the interface service status of at least one service system corresponding to each heartbeat detection request is stored in the interface service log. The detection device for the interface service status further includes:

[0083] A status acquisition module, which is used to acquire at least one interface service status corresponding to the service system from the interface service log;

[0084] An information storage module, which is used to store the address information of the service system with the above interface service status being an abnormal status in an abnormal address set based on at least one interface service status corresponding to the service system;

[0085] A request response module, which is used to receive an abnormal information acquisition request sent by a user, respond to the abnormal information acquisition request, and send the above abnormal address set to the user.

[0086] In some embodiments, a system details log is also set in the core system, and the system operation information of at least one service system corresponding to each heartbeat detection request is stored in the system details log. The detection device for the interface service status further includes:

[0087] An information search module, configured to search for corresponding system operation information from the above system detail logs based on the address information of at least one service system in the above abnormal address set;

[0088] A file generation module, configured to arrange the system operation information corresponding to at least one service system in the above abnormal address set in sequence as an abnormal file according to the arrangement order of the address information of at least one service system in the above abnormal address set;

[0089] A file sending module, configured to send the above abnormal file to the above user while sending the above abnormal address set to the user.

[0090] In some embodiments, the above information adding module 203 is specifically configured to:

[0091] Determine the abnormal level of the service system that has not fed back heartbeat information;

[0092] Add the abnormal information corresponding to the service system that has not fed back heartbeat information to a preset position of the above short message prompt template corresponding to the above abnormal level to obtain a short message prompt information.

[0093] In some embodiments, the above information adding module 203 is further specifically configured to:

[0094] Obtain the number of times that the service system that has not fed back heartbeat information has not fed back heartbeat information within a preset period;

[0095] Determine the abnormal level of the service system that has not fed back heartbeat information based on the number of times that the service system that has not fed back heartbeat information has not fed back heartbeat information within the above preset period.

[0096] In some embodiments, the above detection device for the interface service status further includes:

[0097] An abnormality determination module, configured to determine that the above core system is abnormal if at least one service system corresponding to a preset number of heartbeat detection requests has not fed back heartbeat information, and perform a short message warning operation on the core system with abnormalities.

[0098] An interface service status detection device disclosed in an embodiment of the present application is applied to a core system. The core system is connected to at least two service systems. A heartbeat detection class is configured in the service systems, and a preset interface service is set in the heartbeat detection class. The preset interface service is a part of a preset remote call service. The request module 201 is used to implement the interface call service in the preset timing task class, and periodically send a heartbeat detection request to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response; the information receiving module 202 is used to determine that the preset remote call service of the service system that feeds back the heartbeat information is normal if the heartbeat information fed back through the preset interface service is received within a preset time; the information adding module 203 is used to add the abnormal information corresponding to the service system that does not feed back the heartbeat information to a preset position of the SMS prompt template to obtain an SMS prompt message if the heartbeat information fed back through the preset interface service is not received within a preset time; the alarm module 204 is used to perform an SMS alarm operation based on the SMS prompt message. In this way, the abnormal interface service can be discovered and processed in time.

[0099] Correspondingly, an embodiment of the present application further provides a computer device, and the computer device may be a terminal. As Figure 3 shown, Figure 3 is a schematic structural diagram of the computer device provided by an embodiment of the present application. The computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored on the memory 302 and executable on the processor. Among them, the processor 301 is electrically connected to the memory 302. Those skilled in the art can understand that the structural diagram of the computer device shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components.

[0100] The processor 301 is the control center of the computer device 300, connects various parts of the entire computer device 300 through various interfaces and lines, and executes various functions and processes data of the computer device 300 by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, so as to monitor the computer device 300 as a whole.

[0101] In an embodiment of the present application, the processor 301 in the computer device 300 will load the instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:

[0102] Implement the interface call service in the class through a preset scheduled task, and periodically send a heartbeat detection request to at least one of the above service systems to call the preset interface service in the heartbeat detection class of the above service system for response;

[0103] If the heartbeat information is received through the preset interface service within the preset time, it is determined that the above preset remote call service of the service system that feedbacks the heartbeat information is normal;

[0104] If the heartbeat information is not received through the preset interface service within the preset time, add the exception information corresponding to the service system that does not feedback the heartbeat information to the preset position of the SMS prompt template to obtain the SMS prompt information;

[0105] Based on the above SMS prompt information, perform an SMS alarm operation.

[0106] For the specific implementation of each of the above operations, please refer to the previous embodiments and will not be elaborated here.

[0107] Optionally, as Figure 3 shown, the computer device 300 further includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. Among them, the processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307 respectively. Those skilled in the art can understand that Figure 3 the computer device structure shown in

[0108] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display messages input by the user or messages provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like can be used to configure the display panel. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch message from the touch detection device, converts it into contact coordinates, and then sends it to the processor 301, and can receive and execute the command sent by the processor 301. The touch panel can cover the display panel. After the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to implement input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to implement the input function.

[0109] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other computer devices through wireless communication, and transmit and receive signals with the network device or other computer devices.

[0110] The audio circuit 305 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and then converted into audio data. After the audio data is output and processed by the processor 301, it is sent through the radio frequency circuit 304 to, for example, another computer device, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between the peripheral earphone and the computer device.

[0111] The input unit 306 can be used to receive input digital, character messages or user feature messages (such as fingerprint, iris, face messages, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0112] The power supply 307 is used to supply power to each component of the computer device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 307 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0113] Although Figure 3 not shown in the figure, the computer device 300 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.

[0114] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0115] As can be seen from the above, the computer device provided in this embodiment realizes the interface call service in the class through a preset timing task, periodically sends a heartbeat detection request to at least one of the above service systems, and calls the preset interface service in the heartbeat detection class of the above service system for response; if the heartbeat information is received through the preset interface service within the preset time, it is determined that the above preset remote call service of the service system that feedbacks the heartbeat information is normal; if the heartbeat information is not received through the preset interface service within the preset time, the abnormal information corresponding to the service system that does not feedback the heartbeat information is added to the preset position of the short message prompt template to obtain a short message prompt information; based on the above short message prompt information, a short message alarm operation is performed.

[0116] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0117] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute the steps in any of the interface service status detection methods provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0118] Implement an interface call service through a preset timing task class, and periodically send a heartbeat detection request to at least one of the above service systems to call a preset interface service in the heartbeat detection class of the above service system for response;

[0119] If heartbeat information feedback through the preset interface service is received within the preset time, it is determined that the above preset remote call service of the service system that feedbacks the heartbeat information is normal;

[0120] If heartbeat information feedback through the preset interface service is not received within the preset time, add the exception information corresponding to the service system that does not feedback the heartbeat information to a preset position in the SMS prompt template to obtain an SMS prompt message;

[0121] Based on the above SMS prompt message, perform an SMS alarm operation.

[0122] For the specific implementation of each of the above operations, reference can be made to the previous embodiments and will not be elaborated here.

[0123] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0124] Since the computer programs stored in the storage medium can execute the steps in any of the interface service status detection methods provided by the embodiments of the present application, the beneficial effects that can be achieved by any of the interface service status detection methods provided by the embodiments of the present application can be realized. For details, reference can be made to the previous embodiments and will not be elaborated here.

[0125] The above has introduced in detail a method, apparatus, computer device, and storage medium for detecting the status of an interface service provided by an embodiment of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present application.

Claims

1. A method for detecting the status of an interface service, characterized in that, it is applied to a core system, the core system is connected to at least two service systems, a heartbeat detection class is configured in the service systems, a preset interface service is set in the heartbeat detection class, the preset interface service is a part of a preset remote call service, an interface service log and a system details log are set in the core system, the interface service log stores the interface service status of at least one service system corresponding to each heartbeat detection request, the system details log stores the system operation information of at least one service system corresponding to each heartbeat detection request, and the method includes: Implementing an interface call service through a preset timed task implementation class, periodically sending a heartbeat detection request to at least one of the service systems to call the preset interface service in the heartbeat detection class of the service system for response; If heartbeat information is received through the preset interface service within a preset time, it is determined that the preset remote call service of the service system that feedbacks the heartbeat information is normal; If no heartbeat information is received through the preset interface service within a preset time, adding the exception information corresponding to the service system that does not feedback the heartbeat information to a preset position in the SMS prompt template to obtain an SMS prompt message; Based on the SMS prompt message, performing an SMS alarm operation; Obtaining at least one interface service status corresponding to the service system from the interface service log; Based on at least one interface service status corresponding to the service system, storing the address information of the service system with the interface service status being an abnormal status in an abnormal address set; Receiving an abnormal information acquisition request sent by a user, responding to the abnormal information acquisition request, and sending the abnormal address set to the user; Based on the address information of at least one service system in the abnormal address set, searching for corresponding system operation information from the system details log; Based on the arrangement order of the address information of at least one service system in the abnormal address set, arranging the system operation information corresponding to at least one service system in the abnormal address set in order as an abnormal file; While sending the abnormal address set to the user, sending the abnormal file to the user.

2. The method according to claim 1, characterized in that, the adding the exception information corresponding to the service system that does not feedback the heartbeat information to a preset position in the SMS prompt template to obtain an SMS prompt message includes: Determining the exception level of the service system that does not feedback the heartbeat information; Adding the exception information corresponding to the service system that does not feedback the heartbeat information to a preset position in the SMS prompt template corresponding to the exception level to obtain an SMS prompt message.

3. The method according to claim 2, characterized in that, the determining the exception level of the service system that does not feedback the heartbeat information includes: Obtaining the number of times that the service system that does not feedback the heartbeat information does not feedback the heartbeat information within a preset period; Based on the number of times that the service system that does not feedback the heartbeat information does not feedback the heartbeat information within the preset period, determining the exception level of the service system that does not feedback the heartbeat information.

4. The method according to any one of claims 1 to 3, characterized in that, It further includes: If none of the at least one service system corresponding to the heartbeat detection requests for the preset number of times feedbacks heartbeat information, it is determined that there is an abnormality in the core system, and a text message warning operation is performed on the core system with the abnormality.

5. A detection device for the interface service status Characterized in that It is applied to a core system, the core system is connected to at least two service systems, a heartbeat detection class is configured in the service system, a preset interface service is set in the heartbeat detection class, the preset interface service is a part of a preset remote call service, an interface service log and a system details log are set in the core system, the interface service status of at least one service system corresponding to each heartbeat detection request is stored in the interface service log, and the system operation information of at least one service system corresponding to each heartbeat detection request is stored in the system details log. The device includes: A request module, configured to initiate a heartbeat detection request to at least one of the service systems periodically through an interface call service in a preset timing task implementation class, so as to call the preset interface service in the heartbeat detection class of the service system for response; An information receiving module, configured to determine that the preset remote call service of the service system that feedbacks heartbeat information is normal if the heartbeat information feedbacked through the preset interface service is received within the preset time; An information adding module, configured to add the abnormal information corresponding to the service system that does not feedback heartbeat information to a preset position in the text message prompt template to obtain a text message prompt information if the heartbeat information feedbacked through the preset interface service is not received within the preset time; A warning module, configured to perform a text message warning operation based on the text message prompt information; A status obtaining module, configured to obtain at least one interface service status corresponding to the service system from the interface service log; An information storage module, configured to store the address information of the service system with the interface service status being an abnormal status in an abnormal address set based on at least one interface service status corresponding to the service system; A request response module, configured to receive an abnormal information obtaining request sent by a user, respond to the abnormal information obtaining request, and send the abnormal address set to the user; An information searching module, configured to search for the corresponding system operation information from the system details log based on the address information of at least one service system in the abnormal address set; A file generating module, configured to arrange the system operation information corresponding to at least one service system in the abnormal address set in order as an abnormal file based on the arrangement order of the address information of at least one service system in the abnormal address set; A file sending module, configured to send the abnormal file to the user while sending the abnormal address set to the user.

6. A computer device Characterized in that It includes a memory, a processor, and a computer program stored on the memory and running on the processor. Wherein, when the processor executes the program, it implements the detection method for the interface service status according to any one of claims 1 to 4.

7. A storage medium Characterized in that The storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method for detecting the interface service state according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Heartbeat detection method for system of called party, storage medium and server

    CN107957915A

  • Micro-service automatic put-out-of-service method and device, computer equipment and storage medium

    CN111176873A