Alarm system and method based on intelligent process monitoring and message queue detection
By designing an intelligent process monitoring and message queue detection and alarm system, the system failure problems caused by key processes being stuck and message queue blocked are solved, and the system is efficient and intelligent monitoring and automatic recovery is realized, which improves the reliability and real-timeness of the system.
Patent Information
- Application Number
- CN202510217900.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-17
AI Technical Summary
In modern information and automation systems, due to the jamming of key processes or the blockage of message queues, system failure or performance degradation, especially in scenarios where high real-time and high reliability requirements, the existing technology lacks a deeply integrated detection and response mechanism.
An alarm system based on intelligent process monitoring and message queue detection is designed, including process status monitoring module, message queue monitoring module, multi-level alarm module, automatic recovery module, timing scheduling module and log and report module. Through the coordinated work of these modules, comprehensive detection and adaptive processing of key processes and message queues are realized.
It effectively improves the intelligence and reliability of the system, can complete monitoring tasks for key processes and message queues in seconds, shorten the troubleshooting time, minimize the need for manual intervention, and promptly discover problems through diversified notification methods.
Smart Images

Figure CN120162214A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring and alarm, in particular to an intelligent process monitoring and message queue detection alarm system and method. Background Art
[0002] In modern information and automation systems, message queues are widely used in asynchronous data transmission and task scheduling, especially in scenarios with high real-time and high reliability requirements (such as power plant production monitoring, industrial control systems). However, due to the jamming or performance degradation of critical processes, message queues may become blocked or even interrupted. Once this problem occurs, it is extremely easy to cause task backlogs and data loss, and then trigger global system failures.
[0003] In the prior art, distributed monitoring tools (such as Zabbix, Prometheus) are usually used for single-level metric monitoring, but there is a lack of a detection and response mechanism for the deep integration of critical business process jamming and message queue accumulation problems. The present invention realizes the comprehensive detection and adaptive processing of business processes and message queues through systematic design, effectively improving the intelligence and reliability of the system. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the problems to be solved by the present invention are: how to solve the problems of system failures or performance degradation caused by critical process jamming or message queue blockage in modern information and automation systems, especially in scenarios with high real-time and high reliability requirements (such as power plant monitoring, industrial control systems, etc.). The prior art usually uses single-level monitoring tools (such as Zabbix, Prometheus) to monitor the system's metrics, but lacks a deep integration detection and response mechanism for critical business process jamming and message queue accumulation problems.
[0006] To solve the above technical problems, the present invention provides the following technical solutions: an intelligent process monitoring and message queue detection alarm system, including a process status monitoring module, a message queue monitoring module, a multi-level alarm module, an automatic recovery module, a timing scheduling module, and a log and report module; the process status monitoring module is used to periodically detect the running status of critical processes; the message queue monitoring module is used to obtain the message queue accumulation situation in real time; the multi-level alarm module is used to trigger an alarm according to abnormal situations and select different notification methods; the automatic recovery module is used to perform recovery operations after an abnormality occurs; the timing scheduling module is used to monitor the real-time performance of tasks and execute them regularly; the log and report module is used to record the results of monitoring tasks, abnormal situations, and processing procedures.
[0007] As a preferred solution of the intelligent process monitoring and message queue detection and alarm system according to the present invention, the process status monitoring module includes periodically calling an API or a monitoring tool to obtain the status of specified key processes, including CPU usage rate, memory occupancy, and process response information; if a process has no output or response within a specific time window, the process is considered stuck; if the CPU or memory occupancy of a process exceeds a preset threshold and no expected output is generated, the process is considered stuck or performance degraded; if it is detected that a process is stuck or performance is degraded, an exception handling process is triggered, and the automatic recovery module automatically attempts to restart the process. If the process is started through a service management tool, it is restored by calling the corresponding restart command; if the restart fails or the problem still exists after restart, the system records the error information and escalates the alarm, and records the relevant information of the stuck process into the log and report module.
[0008] As a preferred solution of the intelligent process monitoring and message queue detection and alarm system according to the present invention, the message queue monitoring module (200) includes periodically obtaining the status data of the message queue, including obtaining the queue length and processing rate information using the management interface of the message queue; setting thresholds according to the actual situation. If the queue length exceeds the warning threshold number of messages, it is regarded as a warning-level alarm. If the queue length exceeds the critical threshold number of messages, it is regarded as a critical-level alarm; if the queue length of the message queue in the queue exceeds the preset warning or critical threshold, it is determined that the queue is blocked abnormally; when the queue length exceeds the warning threshold, a warning alarm is triggered, a log is recorded, and a text message is sent to notify the operation and maintenance personnel; when the queue length exceeds the critical threshold, a critical alarm is triggered, the voice alarm system notifies the duty personnel, and a detailed fault report is generated.
[0009] As a preferred solution of the intelligent process monitoring and message queue detection and alarm system according to the present invention, the multi-level alarm module includes triggering different levels of alarms according to the severity of the exception and notifying the operation and maintenance personnel in various ways; if a process is stuck or the queue length exceeds the warning threshold but does not exceed the critical threshold, a warning-level alarm is triggered, the alarm event and the trigger reason are recorded in detail, and a text message is sent to the duty personnel through the text message service to remind them to check the problem; if the process continues to fail or the queue length exceeds the critical threshold, a critical-level alarm is triggered, a voice alarm is directly played to the duty personnel through the voice alarm system, and a detailed fault report is automatically generated. The fault report includes the stack, timestamp, associated process, and queue data.
[0010] As a preferred solution of the intelligent process monitoring and message queue detection and alarm system described in the present invention, the automatic recovery module includes automatically triggering a recovery operation when a critical process freezes or the message queue is blocked; if the process freezes, the abnormal process is automatically restarted through a service management tool. If the restart is successful, the information of successful restart is recorded and the normal operation is restored; if the queue backlog is caused by slow processing speed or process freezing, an attempt is made to recover the relevant process and the backlogged messages in the queue are diverted to other processing nodes; if the automatic recovery fails, the reason for the failure is recorded and the alarm is escalated.
[0011] As a preferred solution of the intelligent process monitoring and message queue detection and alarm system described in the present invention, the timing scheduling module includes periodically performing process monitoring and queue monitoring tasks according to business requirements, and the scheduling frequency is dynamically adjusted according to business requirements; the log and report module includes recording the status of critical processes, the status of message queues, alarm information, and recovery operations in the log each time a monitoring task is executed; when an exception occurs, a detailed fault report is generated, recording the exception type, trigger time, exception data, processing process, and results; reports are generated regularly to summarize the monitoring data and fault handling situations.
[0012] Another object of the present invention is to provide a method based on an intelligent process monitoring and message queue detection and alarm system, which can solve the problem of intelligent process monitoring and message queue detection and alarm through the intelligent process monitoring and message queue detection and alarm method.
[0013] To solve the above technical problems, the present invention provides the following technical solution: an intelligent process monitoring and message queue detection and alarm method, including initializing and configuring the system, and performing real-time process and message queue monitoring; performing abnormal detection and judgment on the process and message queue; if an abnormality occurs, performing alarm and notification, automatic recovery and fault handling; logging and report generation of monitoring information and abnormal information.
[0014] As a preferred solution of the intelligent process monitoring and message queue detection and alarm method according to the present invention, the system initialization and configuration include configuring the key processes and message queues to be monitored, including the names, identifiers, monitoring thresholds of the key processes, the names and related parameters of the message queues, and setting the time intervals for periodic scanning and checking; scanning the status of the key processes and the backlog of the message queues at regular intervals according to the predetermined time intervals; the automatic recovery includes automatically attempting to restart the stuck process if a process is detected to be stuck or its performance degrades. If the restart is successful, record the information of the successful restart and restore the normal state. If the restart fails, upgrade the alarm and record the error information for subsequent analysis; if the backlog of the queue causes slow processing speed or task delay, attempt to shunt the queue tasks according to the set policy, shunt the accumulated messages to the standby queue or other processing nodes, and continue to process the remaining messages in the queue in order if the processing capacity of the system is restored; multiple recovery attempts, if the automatic recovery operation fails to solve the problem, automatically record the reason for the recovery failure and upgrade the alarm. If the recovery fails, enter the manual intervention mode, and the operation and maintenance personnel need to manually check and handle the fault.
[0015] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the intelligent process monitoring and message queue detection and alarm method as described above are implemented.
[0016] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the intelligent process monitoring and message queue detection and alarm method as described above are implemented.
[0017] The beneficial effects of the present invention are as follows: The intelligent process monitoring and message queue detection and alarm method provided by the present invention can complete the monitoring tasks of key processes and message queues within seconds. Through timed scheduling and real-time alarm, the fault handling time is effectively shortened; after detecting an anomaly, the system will attempt various recovery means, minimizing the need for manual intervention to the greatest extent, and automatically recording the results of each recovery attempt for subsequent analysis and optimization; adopting a hierarchical design, classifying problems according to priorities, and diverse notification means (logs, text messages, voices) ensure that problems are discovered in a timely manner; this system can intervene in a timely manner in the early stage of an anomaly to prevent the spread of the fault, and provide a basis for system optimization through continuous tracking and analysis of anomaly data; the system supports multiple operating environments, is applicable to different business scenarios, and can be integrated into the existing IT operation and maintenance platform through APIs to further improve efficiency. Description of the Drawings
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0019] Figure 1 This is the architecture diagram of the intelligent process monitoring and message queue detection and alarm system provided by the first embodiment of the present invention.
[0020] Figure 2 This is the flowchart of the intelligent process monitoring and message queue detection and alarm method provided by the second embodiment of the present invention.
[0021] Figure 3 This is the flowchart of the intelligent process monitoring and message queue detection and alarm system provided by the third embodiment of the present invention.
[0022] In the figure: 100, process status monitoring module; 200, message queue monitoring module; 300, multi-level alarm module; 400, automatic recovery module; 500, timing scheduling module; 600, log and report module. Specific Embodiments
[0023] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings of the specification.
[0024] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0025] Embodiment 1
[0026] Refer to Figure 1 , which is the first embodiment of the present invention. This embodiment provides an intelligent process monitoring and message queue detection and alarm system, including: a process status monitoring module 100, a message queue monitoring module 200, a multi-level alarm module 300, an automatic recovery module 400, a timing scheduling module (500), and a log and report module 600.
[0027] Detection and Response to Key Process Freezes: In traditional systems, process freezes are usually not detected in a timely manner, resulting in the system being unable to recover promptly. Through the process status monitoring module of the present invention, process freezes can be detected regularly and automatically responded to, reducing the need for manual intervention. Monitoring and Handling of Message Queue Blockages: Existing systems often fail to provide an effective monitoring and early warning mechanism for message queue backlogs, especially when data traffic surges, which may lead to message loss or task delays. Through the message queue monitoring module of the present invention, the system can detect queue backlogs in real time and trigger hierarchical alarms when the set threshold is reached, effectively avoiding the impact of message queue blockages on system stability. Intelligent Adaptive Recovery Mechanism: When the system detects a process freeze or queue blockage, the present invention attempts to restart the frozen process and divert queue tasks through the automatic recovery module, automatically handling exceptions, minimizing manual intervention, and improving the reliability and recovery efficiency of the system. Multilevel Alarm Mechanism: The hierarchical alarm mechanism proposed by the present invention can trigger alarms at different levels according to the severity of the problem, ensuring that operation and maintenance personnel can be aware of system anomalies in a timely manner and take measures promptly. Versatility and Scalability: The system designed by the present invention supports multiple operating systems and message queue frameworks (such as Kafka, RabbitMQ, ActiveMQ), and can be seamlessly docked with existing monitoring platforms (such as Prometheus), enhancing the compatibility and scalability of the system.
[0028] Through these innovations, the present invention solves problems such as process freezes and message queue blockages in the system, improves the intelligent monitoring ability and automatic recovery ability of the system, and ensures the stability and continuity of the business
[0029] Key Process Detection Module 100:
[0030] Regularly scan specified business processes and monitor their running status and resource occupancy. If a process freeze is detected (such as excessive CPU or memory occupancy or no response), trigger an exception handling process.
[0031] Specifically, regularly (for example, every 5 seconds) call system APIs or monitoring tools (such as ps, top or the process management interface provided by the operating system) to obtain the status of specified key processes, including information such as CPU usage, memory occupancy, and process response.
[0032] Criteria for Judging Process Freezes:
[0033] No Response: If a process does not have any output or response (such as no log records, no task processing, etc.) within a specific time window (such as 30 seconds), it is considered that the process may be frozen.
[0034] High resource occupancy: If the CPU or memory occupancy of a process exceeds a preset threshold (e.g., CPU usage exceeds 95% or memory occupancy exceeds 90%) and no expected output is generated, the system deems that the process may be stuck or experience performance degradation.
[0035] When the above conditions are triggered, the system deems that the process is stuck or has performance degradation and triggers an exception handling process.
[0036] The system automatically attempts to restart the process. If the process is started through a service management tool (such as systemd, init.d), it can be restored by calling the corresponding restart command.
[0037] If the restart fails or the problem persists after restart, the system will record the error information and escalate the alarm (e.g., trigger a critical-level alarm).
[0038] Record the relevant information of the stuck process (such as process ID, timestamp, CPU occupancy, memory occupancy, etc.) in the log for subsequent analysis.
[0039] Message queue monitoring module 200:
[0040] Real-time detection of the accumulation length and processing rate of critical queues. Determine whether an abnormality occurs through preset thresholds. For example, when the number of accumulated messages exceeds 60, a "warning level" is triggered, and when it exceeds 200, a "critical level" is triggered.
[0041] Regularly obtain the status data of the message queue (e.g., use the management interface of the message queue to obtain information such as queue length, processing rate, etc.). Common message queues such as Kafka, RabbitMQ, etc. all provide REST APIs or command-line tools to monitor the queue status.
[0042] Set thresholds according to the actual situation. For example, when the queue length exceeds 60 messages, it is regarded as the "warning level", and when it exceeds 200 messages, it is regarded as the "critical level". Judgment of excessive accumulation: If the number of messages in the queue exceeds the preset warning or critical threshold, it is determined that the queue is blocked abnormally.
[0043] Warning level: When the queue length exceeds the warning threshold (e.g., 60 messages), trigger a warning alarm, record the log, and send a text message to notify the operation and maintenance personnel.
[0044] Critical level: When the queue length exceeds the critical threshold (e.g., 200 messages), trigger a critical alarm, notify the on-duty personnel through the voice alarm system, and generate a detailed fault report.
[0045] Divert queue tasks: When the queue is blocked, the system automatically takes diversion measures. For example, divert the messages to a standby queue or other processing nodes to ensure that the business is not affected.
[0046] Optimized queue processing: The system analyzes the reasons for the piled-up messages. If it is caused by a process getting stuck or slow processing speed, the system will attempt to resume the process or optimize task scheduling.
[0047] If the queue is blocked due to an abnormal system process, the system will attempt to restart the relevant process and resume message processing.
[0048] If the automatic recovery fails, the system will escalate the alarm and request manual intervention.
[0049] Multi-level alarm module 300:
[0050] Select the corresponding notification method according to different alarm levels. Warning level: Record the log and send a text message reminder to the on-duty personnel. Severe level: Trigger the voice alarm system and generate a detailed fault report at the same time.
[0051] First, judge the alarm level. If the process gets stuck or the message queue piles up beyond the warning threshold (for example, the queue length exceeds 60), a warning-level alarm will be triggered. If the process getting stuck seriously affects the system operation, or the message queue piles up beyond the severe threshold (for example, the queue length exceeds 200), a severe-level alarm will be triggered.
[0052] If it is a warning-level alarm, record the log, detailedly record the alarm event and its triggering reason. Send a text message notification to the on-duty personnel through the text message service (such as Twilio, text message API) to remind them to check the problem.
[0053] If it is a severe-level alarm, play a voice alarm directly to the on-duty personnel through the voice alarm system (such as voice reminder based on TTS technology). Automatically generate a detailed fault report, including specific information about the anomaly (such as process name, queue status, number of piled-up messages, etc.), and send it to the operation and maintenance personnel.
[0054] If it is a warning level, the operation and maintenance personnel can judge whether further inspection or handling is required based on the alarm information. If it is a severe-level alarm, the system will require the on-duty personnel to respond and handle the anomaly as soon as possible.
[0055] Automatic recovery module 400:
[0056] Combining the process status and the message queue status, attempt to restart the abnormal process and divert the queue tasks. If the automatic recovery fails, the system records the fault reason and escalates the alarm.
[0057] When the system detects that a critical process is stuck or the message queue is blocked, it will automatically trigger the recovery operation.
[0058] For process recovery, the system automatically attempts to restart the stuck process, usually using the operating system's service management tools (such as systemd or init.d) to restart the process. If the restart is successful, the system will record the successful restart information and resume normal operation.
[0059] Queue recovery: If the queue backlog is caused by slow processing speed or a stuck process, the system will first attempt to recover the relevant process and then divert the backlogged messages in the queue to other processing nodes to ensure that the queue processing is no longer backlogged.
[0060] If the automatic recovery fails, the system will record the reason for the failure and escalate the alarm. At this time, the system will transfer the matter to manual intervention or a higher-priority recovery process.
[0061] Timed scheduling module 500:
[0062] Adopt a periodic scheduling method to ensure the real-time nature of monitoring tasks. The scheduling interval can be dynamically adjusted according to business requirements.
[0063] The system will regularly (such as every 5 seconds, every 30 seconds) execute process monitoring and queue monitoring tasks according to business requirements or administrator settings. Timed task scheduling tools (such as cron, Quartz) can be used to achieve the regular execution of tasks.
[0064] According to business requirements, the scheduling frequency can be dynamically adjusted. For example, during high load, it may be necessary to increase the monitoring frequency to detect potential problems in a timely manner; during low load, the monitoring frequency can be reduced to save system resources.
[0065] Log and report module 600:
[0066] Automatically record the detection results, abnormal situations, and handling actions of each monitoring task. Regularly generate operation status reports to provide data support for system optimization.
[0067] When each monitoring task is executed, the system will record the status of key processes, the status of message queues, alarm information, and recovery operations in the log.
[0068] When an exception occurs, the system will generate a detailed fault report, recording the exception type, trigger time, exception data (such as queue length, process status, etc.), handling process and results, which is convenient for operation and maintenance personnel to trace and analyze problems.
[0069] The system regularly generates reports, summarizing monitoring data and fault handling situations, providing a basis for subsequent optimization and system adjustment.
[0070] Example 2
[0071] Refer to Figure 2, which is the second embodiment of the present invention. Different from the previous embodiment, it provides a method for intelligent process monitoring and message queue detection and alarm, including: initializing and configuring the system, and monitoring processes and message queues in real time; detecting and judging abnormalities in processes and message queues; if an abnormality occurs, alarm and notify, and automatically recover and handle faults; logging monitoring information and abnormal information and generating reports.
[0072] S1. Initialize and configure the system, and monitor processes and message queues in real time.
[0073] S1.1. System initialization and configuration.
[0074] Configure monitoring targets. When the system starts, the administrator configures the key processes and message queues to be monitored, including:
[0075] The name, identifier (PID), and monitoring thresholds (CPU, memory occupancy, etc.) of key processes.
[0076] The name and related parameters of the message queue (such as queue length, message processing rate, etc.).
[0077] Configure thresholds. Set thresholds for process stuck judgment (such as CPU usage rate exceeding 95%, memory occupancy exceeding 90%, etc.).
[0078] Set the alarm threshold for message queue accumulation. For example, when the queue length exceeds 60, it is a "warning", and when it exceeds 200, it is "severe".
[0079] Initialize the monitoring task scheduling. After the system starts, configure and start a timed task scheduler, and set the time interval for periodic scanning and checking (such as checking the process status every 5 seconds and the queue status every 30 seconds).
[0080] S1.2. Real-time monitoring and status detection.
[0081] Process monitoring. At a predetermined time interval (such as every 5 seconds), the system calls the APIs or tools provided by the operating system (such as ps, top) to periodically scan the status of key processes.
[0082] The monitored content includes the CPU usage rate, memory occupancy, response time, etc. of the process.
[0083] Check whether the process shows signs of non-response or abnormal resource occupancy (such as CPU usage rate higher than the threshold, non-response, or no output for a long time).
[0084] Message queue monitoring. Every 30 seconds or other appropriate time intervals, the system uses a message queue management tool (such as the REST API of Kafka, RabbitMQ, etc.) to monitor the accumulation of the message queue in real time.
[0085] Obtain data such as the queue length and processing rate, and determine whether the queue is blocked.
[0086] If the number of messages in the queue exceeds the preset warning or critical threshold, the system considers that there is a problem with the queue.
[0087] S2. Detect and judge anomalies in processes and message queues.
[0088] Detect process freezing or performance degradation. If a critical process does not respond for a long time, or its CPU and memory usage are higher than the threshold and no expected output is generated, the system determines that the process may be frozen or have performance degradation.
[0089] At this time, the system triggers an anomaly alarm and executes the subsequent recovery process.
[0090] Detect message queue blockage. If the number of messages in the queue exceeds the warning threshold (e.g., 60 messages) but does not reach the critical threshold (e.g., 200 messages), a warning-level alarm is triggered.
[0091] If the queue length exceeds the critical threshold, a critical-level alarm is triggered.
[0092] S3. If an anomaly occurs, perform alarm and notification, automatic recovery, and fault handling.
[0093] S3.1. Alarm and notification.
[0094] Warning-level alarm. If a process freezes or the message queue accumulates beyond the warning threshold, the system records a log and triggers a text message to remind the operation and maintenance personnel.
[0095] Critical-level alarm. If a process freezes or the message queue accumulates beyond the critical threshold, the system triggers a voice alarm and generates a detailed fault report to notify the on-duty personnel.
[0096] The operation and maintenance personnel respond in a timely manner according to the alarm prompt, check the system, and take appropriate repair measures.
[0097] S3.2. Automatic recovery and fault handling.
[0098] Automatically recover the process. If it is detected that a process freezes or has performance degradation, the system will automatically attempt to restart the frozen process.
[0099] The system will use the service management tools of the operating system (such as systemd, init.d) to restart the process.
[0100] If the restart is successful, the system records the information of the successful restart and returns to the normal state.
[0101] If the restart fails, the system will upgrade the alarm and record the error information for subsequent analysis.
[0102] Automatically handle message queue congestion. If the queue backlog causes slow processing speed or task delay, the system will attempt to shunt queue tasks according to the set policy, and shunt the accumulated messages to the standby queue or other processing nodes.
[0103] If the processing capacity of the system resumes, continue to process the remaining messages in the queue in order.
[0104] After multiple recovery attempts, if the automatic recovery operations (such as process restart, queue shunting, etc.) fail to solve the problem, the system will automatically record the reason for the recovery failure and upgrade the alarm.
[0105] If the recovery fails, it may enter the manual intervention mode, and the operation and maintenance personnel need to manually check and handle the fault.
[0106] S4. Log record and report generation for monitoring information and abnormal information.
[0107] S4.1. Log record and report generation.
[0108] The detection results, abnormal situations, alarm information, recovery operations, etc. of each monitoring task will be detailedly recorded in the system log.
[0109] When each exception occurs, the system will automatically generate a detailed fault report, including the exception type, the time of exception occurrence, relevant system data (such as process status, queue length), recovery operations, etc.
[0110] The operation and maintenance personnel can trace the root cause of the problem by viewing these reports.
[0111] The system regularly generates operation status reports, summarizing monitoring data, abnormal information and recovery situations, providing data support for subsequent system optimization and improvement.
[0112] S4.2. System optimization and improvement.
[0113] According to the system log and the generated reports, analyze the reasons for process freezing and message queue congestion, and evaluate whether it is necessary to adjust the monitoring threshold, increase system resources or optimize task scheduling.
[0114] According to historical fault and exception records, optimize the system configuration, such as adding a fault tolerance mechanism for key processes, adjusting the backlog processing strategy of the message queue, etc.
[0115] If the above-described functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs.
[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a predefined sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0117] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), fiber optic device, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.
[0118] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0119] Embodiment 3
[0120] Referring to Figure 3 , which is the third embodiment of the present invention. The difference from the previous two embodiments is that in order to verify and illustrate the technical effects adopted in the present invention to verify the actual effects of the method.
[0121] In a large hydropower station in Guizhou, due to a process getting stuck, the information in the message queue could not be consumed. After an hour of accumulation, the message queue became blocked. Since the remote control and remote adjustment instructions of the hydropower station also passed through the message queue, the hydropower station lost its regulation and control. By adding an intelligent process monitoring and message queue detection and alarm system, when the message queue accumulation exceeds 20%, an audible and visual alarm will be triggered immediately to remind the operation or maintenance personnel to handle it in time, thus avoiding the loss of regulation and control of the hydropower station and playing a key role in the safety of the power grid. As Figure 3 shown.
[0122] The real-time monitoring system of a power plant depends on the message queue to distribute the operation status data of equipment (such as temperature, pressure, rotation speed). One day, due to a thread deadlock in a key process of the downstream computing module, the message queue accumulated beyond the limit, seriously affecting the system operation.
[0123] During the monitoring task, the system found that the thread of the critical process (critical_service) did not respond for a long time and the CPU usage rate was abnormally high, triggering the automatic restart mechanism.
[0124] Since the data was not processed in time during the abnormal process of the process, the message queue accumulated more than 200 messages, triggering a red light alarm, and the voice alarm system notified the duty personnel.
[0125] The system automatically restarted the critical process and processed the backlogged messages in batches to prevent blockage again.
[0126] According to the alarm prompt, the duty personnel checked the relevant modules and confirmed that the problem had been completely solved.
[0127] From the occurrence of the problem to the complete recovery, the whole process only took 3 minutes, avoiding a greater impact on the business.
[0128] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. Based on intelligent process monitoring and message queue detection and alarm system, it is characterized by: include, A process status monitoring module (100), a message queue monitoring module (200), a multi-level alarm module (300), an automatic recovery module (400), a timing scheduling module (500) and a log and report module (600); The process status monitoring module (100) is used to regularly detect the running status of key processes; The message queue monitoring module (200) is used to obtain the message queue accumulation situation in real time; The multi-level alarm module (300) is used to trigger an alarm according to abnormal conditions and select different notification methods; The automatic recovery module (400) is used to perform a recovery operation after an abnormality occurs; The timing scheduling module (500) is used to monitor the real-time performance and regular execution of tasks; The log and report module (600) is used to record the results, abnormal conditions and processing procedures of the monitoring tasks.
2. The intelligent process monitoring and message queue detection alarm system according to claim 1, characterized in that: The process status monitoring module (100) includes periodically calling an API or a monitoring tool to obtain the status of a specified key process, including CPU usage, memory occupancy, and process response information; If a process does not have any output or response within a specific time window, the process is considered stuck; If the CPU or memory usage of a process exceeds a preset threshold and does not produce the expected output, the process is considered to be stuck or has performance degradation; If it is detected that the process is stuck or performance is degraded, the exception handling process is triggered, and the automatic recovery module (400) automatically attempts to restart the process. If the process is started by the service management tool, it is restored by calling the corresponding restart command; If the restart fails or the problem still exists after the restart, the system records the error information and upgrades the alarm, and records the relevant information of the stuck process in the log and report module (600).
3. The intelligent process monitoring and message queue detection alarm system according to claim 2, characterized in that: The message queue monitoring module (200) includes periodically acquiring status data of the message queue, including acquiring queue length and processing rate information using a management interface of the message queue; Set the threshold according to the actual situation. If the queue length exceeds the warning threshold, it is considered a warning level alarm. If the queue length exceeds the severe threshold, it is considered a severe level alarm. If the queue length of the message queue in the queue exceeds the preset warning or critical threshold, it is determined to be a queue congestion exception; When the queue length exceeds the warning threshold, a warning alarm is triggered, a log is recorded, and a text message is sent to notify the operation and maintenance personnel; When the queue length exceeds the critical threshold, a critical alarm is triggered, the voice alarm system notifies the on-duty personnel, and a detailed fault report is generated.
4. The intelligent process monitoring and message queue detection alarm system according to claim 3, characterized in that: The multi-level alarm module (300) triggers alarms of different levels according to the severity of the abnormality, and notifies the operation and maintenance personnel in various ways; If the process is stuck or the queue length exceeds the warning threshold but not the critical threshold, a warning level alarm is triggered, and the alarm event and triggering cause are recorded in detail. A text message notification is sent to the on-duty personnel through the SMS service to remind them to check the problem. If the process continues to fail or the queue length exceeds the critical threshold, a critical level alarm is triggered, and a voice alarm is played directly to the on-duty personnel through the voice alarm system, and a detailed fault report is automatically generated. The fault report includes the stack, timestamp, associated process, and queue data.
5. The intelligent process monitoring and message queue detection alarm system according to claim 4, characterized in that: The automatic recovery module (400) includes automatically triggering a recovery operation when detecting that a key process is stuck or a message queue is blocked; If the process is stuck, the abnormal process will be automatically restarted through the service management tool. If the restart is successful, the information of the successful restart will be recorded and normal operation will be restored; If the queue accumulation is caused by slow processing speed or process stuck, try to restore the relevant process and divert the backlogged messages in the queue to other processing nodes; If automatic recovery fails, the reason for the failure is recorded and the alarm is upgraded.
6. The intelligent process monitoring and message queue detection alarm system according to claim 5, characterized in that: The timing scheduling module (500) includes regularly executing process monitoring and queue monitoring tasks according to business needs, and dynamically adjusting the scheduling frequency according to business needs; The log and report module (600) includes recording the status of key processes, the status of message queues, alarm information and recovery operations into a log each time a monitoring task is executed; When an exception occurs, a detailed fault report is generated, recording the exception type, trigger time, exception data, handling process and results; Generate reports regularly to summarize monitoring data and troubleshooting situations.
7. A method using the intelligent process monitoring and message queue detection alarm system according to any one of claims 1 to 6, characterized in that: include, Initialize and configure the system, and monitor processes and message queues in real time; Detect and judge abnormalities in processes and message queues; If an abnormality occurs, an alarm and notification will be issued, and automatic recovery and fault handling will be performed; Generate logs and reports on monitoring and exception information.
8. The method for detecting and alarming based on intelligent process monitoring and message queue as claimed in claim 7, characterized in that: The system initialization and configuration includes configuring the key processes and message queues that need to be monitored, including the name, identifier, monitoring threshold of the key process, the name and related parameters of the message queue, and setting the time interval for periodic scanning and checking; Regularly scan the status of key processes and the accumulation of message queues at predetermined time intervals; The automatic recovery includes automatically trying to restart the stuck process if a process is detected to be stuck or performance is degraded. If the restart is successful, the information of the successful restart is recorded and the normal state is restored. If the restart fails, an alarm is upgraded and the error information is recorded for subsequent analysis; If queue accumulation causes slow processing speed or task delay, try to divert queue tasks according to the set strategy, and divert the accumulated messages to the backup queue or other processing nodes. If the system's processing capacity is restored, continue to process the remaining messages in the queue in order; After multiple recovery attempts, if the automatic recovery operation fails to solve the problem, the reason for the recovery failure will be automatically recorded and the alarm will be upgraded. If the recovery fails, the system will enter the manual intervention mode, requiring the operation and maintenance personnel to manually check and handle the fault.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method based on intelligent process monitoring and message queue detection and alarm described in any one of claims 7 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method based on intelligent process monitoring and message queue detection and alarm described in any one of claims 7 to 8 are implemented.
Citation Information
Cited By
SF6 monitoring module based on transformer substation
CN120992507A