Abnormal interface alarm method, device, equipment, medium and product
By using the timing task components in a distributed system to detect interface exceptions and generate and send alarm information based on the interface configuration information, the problem of interface exception information cannot be transmitted in time is solved, and the efficiency of abnormal interface alarms is improved.
Patent Information
- Application Number
- CN202411609211.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-04-01
AI Technical Summary
In a distributed system, when an interface abnormality occurs, the details of the interface cannot be sent to the corresponding processing end, resulting in inefficient alarms from the abnormal interface.
The interface is detected through the timing task component. When an interface abnormality is detected, the abnormal information is recorded based on the interface configuration information of the interface, and an alarm information is generated and sent to the corresponding alarm processing end.
It solves the problem that the interface cannot send detailed situations when an exception occurs, improves the efficiency of exception interface alarms, and ensures that the interface exception information can be transmitted to the processing end in time.
Smart Images

Figure CN119739596A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of service interface technology, and in particular to an abnormal interface alarm method, device, equipment, medium and product. Background Art
[0002] With the development of computer technology, especially the widespread application of cloud computing, microservice architecture and container technology, distributed systems have become the mainstream architecture for current enterprise application development. Distributed systems connect multiple independent computing nodes through a network to jointly complete a business task. This architecture has the advantages of strong scalability and high fault tolerance, but it also brings about a significant increase in system complexity and operation and maintenance difficulty.
[0003] In a distributed system, services interact with each other through API interfaces. The overall performance and stability of the system depend to a large extent on the availability of these interfaces. Interface failure or performance degradation may cause communication interruption between services, thereby affecting the operation of the entire system.
[0004] Most of the interface monitoring tools currently on the market only provide basic status monitoring functions, such as checking whether the interface can respond normally by sending HTTP requests at regular intervals. However, these tools are powerless when faced with various failure scenarios in complex distributed systems and cannot meet actual needs.
[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of this application is to provide an abnormal interface alarm method, device, equipment, medium and product, aiming to solve the technical problem that the detailed information of the interface cannot be sent to the corresponding processing end when an abnormality occurs in the interface.
[0007] To achieve the above purpose, the present application proposes an abnormal interface alarm method, the method comprising:
[0008] The interface is detected by a timer task component, and when an abnormality is detected on the interface, the interface abnormality information is recorded according to the interface configuration information of the interface;
[0009] Alarm information is generated based on the interface abnormality information, and the alarm information is sent to a corresponding alarm processing terminal according to the interface configuration information.
[0010] In one embodiment, the interface configuration information includes a detection interface configuration, and the interface is detected by a timed task component. When an abnormality is detected in the interface, the step of recording interface abnormality information includes:
[0011] Performing a timed detection on the interface through the timed task component to obtain a detection result;
[0012] When the detection result indicates that an abnormal situation occurs in the interface, parsing the active interface configuration to obtain a check template;
[0013] Based on the inspection template, the interface is recorded to obtain the interface response time, HTTP status code and interface return data;
[0014] The interface response time, HTTP status code and interface return data are analyzed to obtain interface abnormality information.
[0015] In one embodiment, the interface configuration information further includes an alarm configuration strategy, an alarm upgrade configuration, and an alarm time period configuration. The step of generating alarm information based on the interface abnormality information and sending the alarm information to the corresponding alarm processing terminal according to the interface configuration information includes:
[0016] Parsing the alarm policy configuration to obtain an alarm triggering condition, and determining whether the interface abnormality information satisfies the alarm triggering condition;
[0017] When the interface abnormality information meets the alarm triggering condition, the interface abnormality information and the interface information of the interface are integrated to obtain an error summary, and alarm information is generated based on the error summary;
[0018] According to the alarm upgrade configuration and the alarm time period configuration, the level of the alarm information is adjusted, and the alarm information is sent to the corresponding alarm processing terminal through the alarm robot.
[0019] In one embodiment, the step of sending the alarm information to the corresponding alarm processing terminal through the alarm robot according to the alarm upgrade configuration and the alarm time period configuration includes:
[0020] Based on the alarm level of the alarm information, the alarm information is sent to an alarm processing terminal corresponding to the alarm level through the alarm robot;
[0021] Parsing the alarm time period configuration to obtain an alarm detection time window and an alarm detection frequency;
[0022] Recording the alarm duration of the alarm information based on the alarm detection frequency and the alarm detection time window;
[0023] Parsing the alarm upgrade configuration to obtain an alarm duration threshold;
[0024] When the alarm duration reaches the alarm duration threshold, the alarm level of the alarm information is adjusted to obtain an adjusted alarm level, and the alarm information is sent to the alarm processing terminal corresponding to the adjusted alarm level through the alarm robot.
[0025] In one embodiment, after the step of determining whether the interface abnormality information meets the alarm triggering condition, the method further includes:
[0026] When the interface abnormal information does not meet the alarm triggering condition, record the duration of the interface abnormal information and the operating status of the interface;
[0027] The interface configuration information is updated according to the duration of the interface abnormality information and the operating status of the interface.
[0028] In one embodiment, after the step of generating alarm information based on the interface abnormality information and sending the alarm information to the corresponding alarm processing terminal according to the interface configuration information, the method further includes:
[0029] Receiving the abnormal processing result sent by the alarm processing end;
[0030] When the exception handling result is that the handling is completed, the handling time and recovery operation of the alarm information are recorded;
[0031] An alarm processing report is generated based on the processing duration and the recovery operation.
[0032] In addition, to achieve the above purpose, the present application also proposes an abnormal interface alarm device, the abnormal interface alarm device comprising:
[0033] A recording module is used to detect the interface through a scheduled task component, and when an abnormality is detected in the interface, record the interface abnormality information according to the interface configuration information of the interface;
[0034] The alarm module is used to generate alarm information based on the interface abnormality information and send the alarm information to the corresponding alarm processing terminal according to the interface configuration information.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes an abnormal interface alarm device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the abnormal interface alarm method described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the abnormal interface alarm method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the abnormal interface alarm method described above are implemented.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] The embodiment of the present application proposes an abnormal interface alarm method, device, equipment, medium and product, which detects the interface through a timed task component, and when the interface is detected to be abnormal, the interface abnormal information is recorded according to the interface configuration information of the interface; the alarm information is generated based on the interface abnormal information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information. Thus, when the timed task component detects that the interface is abnormal, the interface abnormal information is recorded based on the interface configuration information of the interface, and then the alarm information is generated using the interface abnormal information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information, which solves the problem that the detailed information of the interface cannot be sent to the corresponding processing terminal when the interface is abnormal, and improves the efficiency of abnormal interface alarm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0042] Figure 1 A flowchart of the first embodiment of the abnormal interface alarm method of the present application is provided;
[0043] Figure 2 A flowchart of the second embodiment of the abnormal interface alarm method of the present application is provided;
[0044] Figure 3 This is a schematic diagram of the abnormal interface alarm method of this application involving alarm upgrade and sending to the corresponding alarm processing end;
[0045] Figure 4 This is a schematic diagram of an alarm processing report related to the abnormal interface alarm method of this application;
[0046] Figure 5 This is a schematic diagram of an alarm processing report related to the abnormal interface alarm method of this application;
[0047] Figure 6 A brief flowchart of the abnormal interface alarm method provided in Example 2 of the present application;
[0048] Figure 7 This is a schematic diagram of the module structure of the abnormal interface alarm device according to an embodiment of the present application;
[0049] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the abnormal interface alarm method in the embodiment of the present application.
[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0053] The main solution of the embodiment of the present application is: perform a timed detection on the interface through the timed task component to obtain the detection result; when the detection result is that the interface is abnormal, parse the live interface configuration to obtain the inspection template; based on the inspection template, record the interface to obtain the interface response time, HTTP status code and interface return data; analyze the interface response time, HTTP status code and interface return data to obtain interface abnormal information. Analyze the alarm policy configuration to obtain the alarm trigger condition, and determine whether the interface abnormal information meets the alarm trigger condition; when the interface abnormal information meets the alarm trigger condition, integrate the interface abnormal information and the interface information of the interface to obtain an error summary, and generate alarm information based on the error summary; according to the alarm upgrade configuration and the alarm time period configuration, adjust the level of the alarm information, and send the alarm information to the corresponding alarm processing end through the alarm robot. Based on the alarm level of the alarm information, the alarm information is sent to the alarm processing end corresponding to the alarm level through the alarm robot; the alarm time period configuration is parsed to obtain the alarm detection time window and the alarm detection frequency; the alarm duration of the alarm information is recorded based on the alarm detection frequency and the alarm detection time window; the alarm upgrade configuration is parsed to obtain the alarm duration threshold; when the alarm duration reaches the alarm duration threshold, the alarm level of the alarm information is adjusted to obtain the adjusted alarm level, and the alarm information is sent to the alarm processing end corresponding to the adjusted alarm level through the alarm robot. When the interface abnormal information does not meet the alarm triggering condition, the duration of the interface abnormal information and the operating status of the interface are recorded; according to the duration of the interface abnormal information and the operating status of the interface, the interface configuration information is updated. Receive the abnormal processing result sent by the alarm processing end; when the abnormal processing result is that the processing is completed, the processing duration and recovery operation of the alarm information are recorded; and an alarm processing report is generated based on the processing duration and recovery operation.
[0054] Thus, the problem that the detailed information of the interface cannot be sent to the corresponding processing end when an abnormality occurs in the interface is solved, the alarm of the abnormal interface is realized, and the efficiency of the abnormal interface alarm is improved. Based on the scheme of the present invention, based on the fact that most of the interface monitoring tools in reality only provide basic status monitoring functions, these tools are powerless when facing various fault scenarios of complex distributed systems, thus leading to low efficiency, an abnormal interface alarm method is designed, and the effectiveness of the abnormal interface alarm method of the present invention is verified when the abnormal interface is alarmed. Finally, the efficiency of abnormal interface alarm is significantly improved by the method of the present invention.
[0055] In this embodiment, for the convenience of description, the abnormal interface alarm device is used as the execution subject for explanation below.
[0056] In the prior art, in a distributed system, various services interact with each other through API interfaces. The overall performance and stability of the system largely depend on the availability of these interfaces. Interface failure or performance degradation may cause communication interruption between services, thereby affecting the operation of the entire system. Currently, most interface monitoring tools on the market only provide basic status monitoring functions, such as checking whether the interface can respond normally by sending HTTP requests at regular intervals. However, these tools are unable to cope with various failure scenarios of complex distributed systems, mainly manifested in the lack of intelligent anomaly judgment, single alarm strategy, weak log analysis capabilities, and chaotic alarm management, which leads to a decrease in the efficiency of interface abnormality alarms.
[0057] The present application provides a solution. When a scheduled task component detects an interface abnormality, the interface abnormality information is recorded according to the pre-configured interface configuration information. At the same time, after the interface abnormality information is used to generate alarm information, the alarm information is sent to the corresponding alarm processing terminal based on the interface configuration information, so as to provide users with better service.
[0058] It can be seen from the above embodiments that the present application detects the interface through a timing task component, and when an abnormality is detected in the interface, the interface abnormality information is recorded according to the interface configuration information of the interface; alarm information is generated based on the interface abnormality information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information. Thus, when the timing task component detects that an abnormality has occurred in the interface, the interface abnormality information is recorded based on the interface configuration information of the interface, and then the alarm information is generated using the interface abnormality information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information, which solves the problem that the detailed information of the interface cannot be sent to the corresponding processing terminal when an abnormality occurs in the interface, and improves the efficiency of abnormal interface alarms.
[0059] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an abnormal interface alarm device, etc. The following takes the abnormal interface alarm device as an example to illustrate this embodiment and the following embodiments.
[0060] Based on this, the embodiment of the present application provides an abnormal interface alarm method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the abnormal interface alarm method of the present application.
[0061] In this embodiment, the abnormal interface alarm method includes steps S01 to S02:
[0062] Step S01, detecting the interface through the scheduled task component, and when detecting that the interface is abnormal, recording the interface abnormality information according to the interface configuration information of the interface;
[0063] Before explaining this embodiment, it should be clear that with the development of computer technology, distributed systems have become the mainstream architecture for current enterprise application development. Distributed systems connect multiple independent computing nodes through a network to jointly complete a business task. This architecture has the advantages of strong scalability and high fault tolerance, but it also brings about a significant increase in system complexity and operation and maintenance difficulty. In a distributed system, various services interact with each other through API interfaces. The overall performance and stability of the system depend to a large extent on the availability of these interfaces. Interface failures or performance degradation may cause communication interruptions between services, thereby affecting the operation of the entire system.
[0064] In response to the above situation, most of the interface monitoring tools currently on the market only provide basic status monitoring functions, which check whether the interface can respond normally by sending HTTP requests at regular intervals. However, these tools are powerless when faced with various failure scenarios of complex distributed systems and cannot meet actual needs.
[0065] In this embodiment, the interface is detected by a timer task component, wherein the interface mentioned here refers to an interface for interaction between multiple applications and platforms in a distributed system, which can greatly improve the processing capability of the system, and the timer task component is usually used to automatically execute periodic tasks, and is widely used in background services and microservice architectures. The timer task component in this embodiment is used to periodically check the status of a certain interface to ensure its normal operation, and its main basis is also the interface configuration information of the interface;
[0066] When the scheduled task component detects an abnormality in the interface, it will record the interface abnormality information based on the interface configuration information. The abnormalities mentioned here include but are not limited to network-related abnormalities, HTTP status code abnormalities, response content abnormalities, authentication / authorization abnormalities, and system resource abnormalities.
[0067] Step S02: generating alarm information based on the interface abnormality information, and sending the alarm information to a corresponding alarm processing terminal according to the interface configuration information.
[0068] After determining the abnormal information of the interface, since there are some specific abnormalities that do not require alarms, it is necessary to further judge the abnormal information. When it is determined that an alarm is needed, the alarm information is generated based on the interface abnormal information, and then the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information. The alarm processing terminal in this embodiment can be one or more. In some small projects, due to the small amount of data, when an alarm is issued, only a single corresponding processing terminal is required for processing. When it comes to some large projects, more levels of departments may be required for development and management. Therefore, the alarm can be upgraded according to the actual alarm situation, and the alarm information can be sent to the corresponding level of alarm processing terminal simultaneously.
[0069] In addition to the conventional information of the interface, the interface configuration information also includes the active interface configuration. Therefore, in the above step S01, the interface is detected by the timer task component. When an abnormality is detected in the interface, the step of recording the interface abnormality information includes:
[0070] Step S011, performing a timed detection on the interface through the timed task component to obtain a detection result;
[0071] Step S012, when the detection result is that the interface is abnormal, parsing the active interface configuration to obtain a check template;
[0072] Step S013, recording the interface based on the inspection template to obtain interface response time, HTTP status code and interface return data;
[0073] Step S014, analyzing the interface response time, HTTP status code and interface return data to obtain interface abnormality information.
[0074] First, the detection of interface anomalies in this embodiment mainly relies on the configuration of the active interface. The system requires users to register the interfaces to be monitored in detail, including the domain name of the system to which the interface belongs and the designated person in charge. It allows multiple interfaces to be configured at one time. The interface configuration involves the interface URL, request type (such as GET, POST, etc.) and other key parameters, providing a customized inspection template for subsequent health checks.
[0075] Therefore, when the scheduled task component detects an abnormality in the interface, it will parse the interface's active interface configuration to obtain a check template, and then record the content on the check template, such as the interface response time, HTTP status code, and interface return data;
[0076] Finally, the recorded information is analyzed to obtain the abnormal information of the interface, including the abnormal timestamp, abnormal parameters and the operation status of the system under abnormal conditions, so as to generate alarm information and archive the information later.
[0077] More specifically, the interface configuration information also includes an alarm configuration strategy, an alarm upgrade configuration, and an alarm time period configuration, which are mainly used to generate alarm information and send alarm information. Therefore, the above step S02 generates alarm information based on the interface abnormal information, and according to the interface configuration information, the alarm information is sent to the corresponding alarm processing terminal. The step includes:
[0078] Step S021, parsing the alarm policy configuration to obtain an alarm triggering condition, and determining whether the interface abnormality information satisfies the alarm triggering condition;
[0079] Step S022, when the interface abnormality information meets the alarm triggering condition, integrating the interface abnormality information and the interface information of the interface to obtain an error summary, and generating alarm information based on the error summary;
[0080] Step S023, adjusting the level of the alarm information according to the alarm upgrade configuration and the alarm time period configuration, and sending the alarm information to the corresponding alarm processing terminal through the alarm robot.
[0081] The interface configuration information also includes alarm configuration strategy, alarm upgrade configuration and alarm time period configuration, which can be set before the interface is used. The configuration in this embodiment can be:
[0082] Alarm policy configuration: To avoid false alarms, this embodiment sets alarm triggering conditions. For example, an alarm is triggered only when the interface fails for a preset number of times (e.g., n times). In addition, an alarm recovery delay is set to reduce frequent alarms. For example, when the interface continues to be abnormal, a minimum time interval between the second alarm and the first alarm is set.
[0083] Therefore, it can be clearly known that the alarm triggering condition is included in the alarm policy configuration, and the interface abnormal information is judged by using the alarm triggering condition. When the interface abnormal information meets the alarm triggering condition, the interface abnormal information and the basic information of the interface (interface information) are integrated to obtain an error summary, and then the alarm information is generated based on the error summary;
[0084] It should be clear that the alarm information generation in this embodiment can generate detailed and intuitive rich-text alarm notifications based on the response time of the interface, HTTP status code and return data. These alarm messages not only contain key abnormal indicators, but are also presented in a structured format, such as timestamps, interface names, error codes, response time charts and possible error summaries, ensuring the readability and comprehensibility of the information. The alarm content is designed to be user-friendly. It not only provides a quick overview of the problem, but also has powerful auxiliary functions. Users can view alarms directly in the communication tool and click on the embedded link to jump to the corresponding troubleshooting platform with one click, such as the log analysis system to view detailed error logs, link tracking tools to track the complete path of the request, or the system management console for direct fault repair. This seamless integration experience significantly improves the efficiency of fault location and resolution and reduces the complexity of operation and maintenance.
[0085] In this way, complex system monitoring information is converted into concise and efficient alarm notifications, providing users with a one-stop solution from problem discovery to problem solving, ensuring problem response speed and system stability in a distributed environment.
[0086] Finally, the alarm information level is adjusted according to the alarm upgrade configuration and the alarm time period configuration, and the alarm information is sent to the corresponding alarm processing end through the alarm robot. The alarm robot can be implemented through the alarm robot configuration. This embodiment supports a flexible alarm notification mechanism. Users can choose a suitable alarm robot. When these robots detect an abnormality, they will push the alarm information to the system manager in real time via SMS, phone or customized communication tools. This ensures the rapid transmission of alarm information, and different notification methods can be selected according to the alarm level.
[0087] This embodiment uses the above scheme to specifically detect the interface through the timing task component. When the interface is detected to be abnormal, the interface abnormality information is recorded according to the interface configuration information of the interface; alarm information is generated based on the interface abnormality information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information. When the timing task component detects that the interface is abnormal, the interface abnormality information is recorded based on the interface configuration information of the interface, and then the alarm information is generated using the interface abnormality information, and the alarm information is sent to the corresponding alarm processing terminal according to the interface configuration information, which solves the problem that the detailed information of the interface cannot be sent to the corresponding processing terminal when the interface is abnormal, and improves the efficiency of abnormal interface alarms.
[0088] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2, step S023, according to the alarm upgrade configuration and the alarm time period configuration, the alarm information is sent to the corresponding alarm processing terminal through the alarm robot, and the abnormal interface alarm method also includes steps S0231 to S0235:
[0089] Step S0231, based on the alarm level of the alarm information, sending the alarm information to the alarm processing terminal corresponding to the alarm level through the alarm robot;
[0090] Step S0232, parsing the alarm time period configuration to obtain an alarm detection time window and an alarm detection frequency;
[0091] Step S0233, recording the alarm duration of the alarm information based on the alarm detection frequency and the alarm detection time window;
[0092] Step S0234, parsing the alarm upgrade configuration to obtain an alarm duration threshold;
[0093] Step S0235, when the alarm duration reaches the alarm duration threshold, the alarm level of the alarm information is adjusted to obtain the adjusted alarm level, and the alarm information is sent to the alarm processing terminal corresponding to the adjusted alarm level through the alarm robot.
[0094] When the alarm information is just generated, its alarm level can be the first level, that is, only the first-level alarm processing terminal needs to be notified. The relevant content of the alarm robot has been explained in the previous embodiment and will not be repeated here.
[0095] After the sending is completed, the alarm information needs to be further tested. Therefore, in this embodiment, the alarm time period configuration is parsed to obtain the alarm detection time window and the alarm detection frequency. The alarm time period configuration in this embodiment can be customized according to the operating characteristics of the business. The frequency and time window of the alarm check may be customized. For example, more frequent checks may be required during working days (such as once every minute in the morning), while during non-working hours or specific trading days, the inspection interval can be appropriately extended (such as once every 3 minutes in the afternoon). The system also supports differentiated settings based on different scenarios such as working days and holidays to improve the pertinence and efficiency of alarms.
[0096] Therefore, the alarm information can be detected and recorded based on the alarm detection frequency and the alarm detection time window to obtain the alarm duration of the alarm information.
[0097] Then, the alarm upgrade configuration is parsed to obtain the alarm duration threshold. When the alarm duration reaches the alarm duration threshold, the alarm level of the alarm information is adjusted to obtain the adjusted alarm level, and the alarm information is sent to the alarm processing end corresponding to the current alarm level through the alarm robot;
[0098] The alarm upgrade configuration of this embodiment is as follows Figure 3 As shown, the alarm level can be divided into three response levels. The initial escalation interval is set to 10 minutes, and each subsequent escalation interval is shortened to 5 minutes to ensure a quick response. Each level of alarm corresponds to a different responsible team or individual. The system supports multi-channel notifications, including SMS, phone calls and emails, to ensure timeliness of notifications. Users can customize the contact information of each level of contact to ensure that the alarm information can be accurately delivered to relevant personnel.
[0099] The alarm level adjustment in this embodiment is implemented through the alarm upgrade execution module, which monitors the abnormal status of the interface in real time. When the abnormal event reaches the preset threshold and is not resolved within 10 minutes, the system will automatically upgrade the alarm to the first level and notify the first-level contact. If the problem is still not resolved within 15 minutes, the alarm will be upgraded to the second level. If the problem is still not effectively handled within 20 minutes, the alarm will reach the highest level. After each alarm upgrade, the system will record and wait for feedback. When the interface problem is handled by manual intervention, it is required to fill in a detailed fault analysis and solution measures to facilitate subsequent fault prevention and system optimization.
[0100] In the use of the interface, a newly developed interface and an interface used at a specific time may be involved, so when an abnormal situation occurs, an alarm may not be issued, which requires corresponding processing. Therefore, in the above embodiment, after step S021, after determining whether the interface abnormality information meets the alarm triggering condition, the method further includes:
[0101] Step S024, when the interface abnormal information does not meet the alarm triggering condition, record the duration of the interface abnormal information and the operating status of the interface;
[0102] Step S025: updating the interface configuration information according to the duration of the interface abnormality information and the operating status of the interface.
[0103] Due to system limitations or limitations in the interface usage phase, in some cases, the interface abnormal information cannot meet the alarm triggering condition, but the abnormal information still exists. In order to avoid the expansion of subsequent abnormal problems, this embodiment also provides a method for recording the duration of the interface abnormal information and the interface operation status when the interface abnormal information is detected but the alarm triggering condition is not met;
[0104] Then, the duration of the interface exception information and the interface operation status are analyzed. For example, due to system limitations, when the service corresponding to the interface is started, the resource loading may be too large, but the duration will not be too long, and it will not have a major impact on the operation of the interface and the system. Therefore, the current exception can be considered to be an acceptable state, and the interface configuration information can be updated based on the current analysis to avoid frequent alarms and no alarms in the future.
[0105] Further, after completing the alarm of the abnormal information and the alarm processing of the alarm processing end, the present embodiment can also sort out the alarm situation. After the step of generating alarm information based on the interface abnormal information and sending the alarm information to the corresponding alarm processing end according to the interface configuration information in the above step S02, the method further includes:
[0106] Step S03, receiving the abnormality processing result sent by the alarm processing end;
[0107] Step S04, when the exception handling result is that the handling is completed, the handling time and recovery operation of the alarm information are recorded;
[0108] Step S05: Generate an alarm processing report based on the processing time and the recovery operation.
[0109] After the alarm processing is completed, the alarm processing end can receive and record the abnormal processing results sent by the alarm processing end, and obtain the following Figure 4 The content shown includes the alarm time number, alarm content, alarm status, alarm time and specific operation details. This embodiment also provides corresponding time interception, interface selection, etc.
[0110] The system records each interface monitoring process in a refined manner, ensuring comprehensive data tracking and analysis. Each round of detection events will be recorded in detail, including the precise detection timestamp, interface response status (success or failure), response time, and detailed analysis of the returned content. For triggered alarm events, the system not only marks its level (such as minor, medium, and severe), but also records the triggering conditions of the alarm to facilitate understanding of the abnormal context. The processing time and recovery operation of each alarm information are recorded;
[0111] In addition, after the exception is resolved, the system will record the complete recovery process, such as Figure 5 The alarm panel displays the status of the fault, the operator information, and the recovery time. This information is crucial for post-fault analysis and the formulation of prevention strategies. All of this data is updated in real time to the dynamic alarm panel, presenting an intuitive interface to users, showing the interface status, alarm status, and alarm frequency, so that problems can be quickly identified.
[0112] Finally, the system will automatically generate health reports regularly, such as daily, weekly or monthly summaries, showing the performance indicators, alarm trends and historical recovery status of the interface in the form of charts and graphs. These reports not only help managers gain insight into the health of the system, but also reveal potential performance problems, provide data support for operation and maintenance decisions, and thus promote continuous optimization and stable operation of the system. Through such a comprehensive recording and reporting mechanism, a powerful tool is provided for efficient management of the system and problem prevention.
[0113] This embodiment adopts the above scheme, specifically based on the alarm level of the alarm information, the alarm robot sends the alarm information to the alarm processing end corresponding to the alarm level; analyzes the alarm time period configuration to obtain the alarm detection time window and the alarm detection frequency; records the alarm duration of the alarm information based on the alarm detection frequency and the alarm detection time window; analyzes the alarm upgrade configuration to obtain the alarm duration threshold; when the alarm duration reaches the alarm duration threshold, adjusts the alarm level of the alarm information to obtain the adjusted alarm level, and sends the alarm information to the alarm processing end corresponding to the adjusted alarm level through the alarm robot. Thus, when the scheduled task component detects that an interface is abnormal, the interface abnormal information is recorded based on the interface configuration information of the interface, and then the interface abnormal information is used to generate the alarm information, and the alarm information is sent to the corresponding alarm processing end according to the interface configuration information, which solves the problem that the detailed information of the interface cannot be sent to the corresponding processing end when the interface is abnormal, and improves the efficiency of abnormal interface alarm.
[0114] For example, to help understand the implementation process of the abnormal interface alarm method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 6 , Figure 6 A brief flowchart of an abnormal interface alarm method is provided, specifically:
[0115] This embodiment monitors and analyzes the business interfaces in the system in real time through scheduled tasks. When an abnormality is detected, the system not only records detailed error codes, error information and abnormal call links, but also automatically evaluates whether to trigger the alarm strategy. Once the conditions are met, the alarm process is started, including the recording of alarm information and multi-level notifications based on the interface status, such as email, SMS or phone calls. If the interface failure is not resolved, the alarm will be escalated step by step according to the preset upgrade mechanism until the problem is resolved. At the same time, all monitoring data and alarm events are recorded, and a real-time alarm panel is generated to intuitively display the system status in the form of charts, which is convenient for quickly evaluating the system health status. Through this comprehensive solution, we aim to improve the efficiency of fault response, optimize alarm management, ensure the stable operation of the system, and provide strong support for efficient operation and maintenance.
[0116] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the abnormal interface alarm method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0117] This application also provides an abnormal interface alarm device, please refer to Figure 7 , the abnormal interface alarm device comprises:
[0118] The recording module 10 is used to detect the interface through the timed task component, and when an abnormality is detected in the interface, record the interface abnormality information according to the interface configuration information of the interface;
[0119] The alarm module 20 is used to generate alarm information based on the interface abnormality information, and send the alarm information to the corresponding alarm processing terminal according to the interface configuration information.
[0120] The abnormal interface alarm device provided by the present application adopts the abnormal interface alarm method in the above embodiment, which can solve the technical problem that the detailed information of the interface cannot be sent to the corresponding processing end when the interface is abnormal. Compared with the prior art, the beneficial effects of the abnormal interface alarm device provided by the present application are the same as the beneficial effects of the abnormal interface alarm method provided by the above embodiment, and the other technical features in the abnormal interface alarm device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0121] The present application provides an abnormal interface alarm device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the abnormal interface alarm method in the above-mentioned embodiment one.
[0122] Reference below Figure 8 , which shows a schematic diagram of the structure of an abnormal interface alarm device suitable for implementing the embodiment of the present application. The abnormal interface alarm device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8The abnormal interface alarm device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0123] like Figure 8 As shown, the abnormal interface alarm device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the abnormal interface alarm device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the abnormal interface alarm device to communicate wirelessly or wired with other devices to exchange data. Although the abnormal interface alarm device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.
[0124] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0125] The abnormal interface alarm device provided by the present application adopts the abnormal interface alarm method in the above embodiment, which can solve the technical problem that the detailed information of the interface cannot be sent to the corresponding processing end when the interface is abnormal. Compared with the prior art, the beneficial effects of the abnormal interface alarm device provided by the present application are the same as the beneficial effects of the abnormal interface alarm method provided by the above embodiment, and the other technical features in the abnormal interface alarm device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0126] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0128] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the abnormal interface alarm method in the above-mentioned embodiment.
[0129] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0130] The computer-readable storage medium may be included in the abnormal interface alarm device; or may exist independently without being assembled into the abnormal interface alarm device.
[0131] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the abnormal interface alarm device, the abnormal interface alarm device: detects the interface through the scheduled task component, and when it is detected that the interface is abnormal, records the interface abnormality information according to the interface configuration information of the interface; generates alarm information based on the interface abnormality information, and sends the alarm information to the corresponding alarm processing end according to the interface configuration information.
[0132] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0135] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned abnormal interface alarm method, and can solve the technical problem that the detailed information of the interface cannot be sent to the corresponding processing end when an abnormality occurs in the interface. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the abnormal interface alarm method provided by the above-mentioned embodiment, and will not be repeated here.
[0136] The present application also provides a computer program product, including a computer program, which implements the steps of the abnormal interface alarm method as described above when executed by a processor.
[0137] The computer program product provided by the present application can solve the technical problem that when an interface is abnormal, the detailed information of the interface cannot be sent to the corresponding processing end. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the abnormal interface alarm method provided by the above embodiment, and will not be repeated here.
[0138] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An abnormal interface alarm method, characterized in that: The method comprises: The interface is detected by a timer task component, and when an abnormality is detected on the interface, the interface abnormality information is recorded according to the interface configuration information of the interface; Alarm information is generated based on the interface abnormality information, and the alarm information is sent to a corresponding alarm processing terminal according to the interface configuration information.
2. The method according to claim 1, characterized in that The interface configuration information includes a detection interface configuration, and the interface is detected by a timed task component. When an abnormality is detected in the interface, the step of recording interface abnormality information includes: Performing a timed detection on the interface through the timed task component to obtain a detection result; When the detection result indicates that an abnormal situation occurs in the interface, parsing the active interface configuration to obtain a check template; Based on the inspection template, the interface is recorded to obtain the interface response time, HTTP status code and interface return data; The interface response time, HTTP status code and interface return data are analyzed to obtain interface abnormality information.
3. The method according to claim 2, characterized in that The interface configuration information also includes an alarm configuration strategy, an alarm upgrade configuration, and an alarm time period configuration. The step of generating alarm information based on the interface abnormality information and sending the alarm information to a corresponding alarm processing terminal according to the interface configuration information includes: Parsing the alarm policy configuration to obtain an alarm triggering condition, and determining whether the interface abnormality information satisfies the alarm triggering condition; When the interface abnormality information meets the alarm triggering condition, the interface abnormality information and the interface information of the interface are integrated to obtain an error summary, and alarm information is generated based on the error summary; According to the alarm upgrade configuration and the alarm time period configuration, the level of the alarm information is adjusted, and the alarm information is sent to the corresponding alarm processing terminal through the alarm robot.
4. The method according to claim 3, characterized in that The step of sending the alarm information to the corresponding alarm processing terminal through the alarm robot according to the alarm upgrade configuration and the alarm time period configuration includes: Based on the alarm level of the alarm information, the alarm information is sent to an alarm processing terminal corresponding to the alarm level through the alarm robot; Parsing the alarm time period configuration to obtain an alarm detection time window and an alarm detection frequency; Recording the alarm duration of the alarm information based on the alarm detection frequency and the alarm detection time window; Parsing the alarm upgrade configuration to obtain an alarm duration threshold; When the alarm duration reaches the alarm duration threshold, the alarm level of the alarm information is adjusted to obtain an adjusted alarm level, and the alarm information is sent to the alarm processing terminal corresponding to the adjusted alarm level through the alarm robot.
5. The method according to claim 3, characterized in that After the step of determining whether the interface abnormality information meets the alarm triggering condition, the method further includes: When the interface abnormal information does not meet the alarm triggering condition, record the duration of the interface abnormal information and the operating status of the interface; The interface configuration information is updated according to the duration of the interface abnormality information and the operating status of the interface.
6. The method according to claim 1, characterized in that After the step of generating alarm information based on the interface abnormality information and sending the alarm information to the corresponding alarm processing terminal according to the interface configuration information, the method further includes: Receiving the abnormal processing result sent by the alarm processing end; When the exception handling result is that the handling is completed, the handling time and recovery operation of the alarm information are recorded; An alarm processing report is generated based on the processing duration and the recovery operation.
7. An abnormal interface alarm device, characterized in that: The device comprises: A recording module is used to detect the interface through a scheduled task component, and when an abnormality is detected in the interface, record the interface abnormality information according to the interface configuration information of the interface; The alarm module is used to generate alarm information based on the interface abnormality information and send the alarm information to the corresponding alarm processing terminal according to the interface configuration information.
8. An abnormal interface alarm device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the abnormal interface alarm method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the abnormal interface alarm method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the abnormal interface alarm method according to any one of claims 1 to 6 are implemented.